@bygd/gd-sdk-pes 1.22.21 → 1.24.0
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"),l=require("can-autoplay"),c=require("is-plain-object"),h=require("lodash.clonedeep"),p=require("querystringify"),f=require("lodash.merge"),m=require("js-base64"),v=require("validator"),g=require("is-valid-domain"),y=require("get-value"),b=require("set-value");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var w=_(e),A=_(t),E=_(n),k=_(r),T=_(a),x=_(i),D=_(s),S=_(o),R=_(u),I=_(l),O=_(h),C=_(p),P=_(f),L=_(v),M=_(g),j=_(y),U=_(b),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},N=function(e){return e&&e.Math==Math&&e},q=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof B&&B)||function(){return this}()||Function("return this")(),G={},F=function(e){try{return!!e()}catch(e){return!0}},V=!F((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),K=Function.prototype.call,W=K.bind?K.bind(K):function(){return K.apply(K,arguments)},z={},H={}.propertyIsEnumerable,$=Object.getOwnPropertyDescriptor,Q=$&&!H.call({1:2},1);z.f=Q?function(e){var t=$(this,e);return!!t&&t.enumerable}:H;var Y,J,X=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Z=Function.prototype,ee=Z.bind,te=Z.call,ne=ee&&ee.bind(te),re=ee?function(e){return e&&ne(te,e)}:function(e){return e&&function(){return te.apply(e,arguments)}},ae=re,ie=ae({}.toString),se=ae("".slice),oe=function(e){return se(ie(e),8,-1)},de=re,ue=F,le=oe,ce=q.Object,he=de("".split),pe=ue((function(){return!ce("z").propertyIsEnumerable(0)}))?function(e){return"String"==le(e)?he(e,""):ce(e)}:ce,fe=q.TypeError,me=function(e){if(null==e)throw fe("Can't call method on "+e);return e},ve=pe,ge=me,ye=function(e){return ve(ge(e))},be=function(e){return"function"==typeof e},_e=be,we=function(e){return"object"==typeof e?null!==e:_e(e)},Ae=q,Ee=be,ke=function(e){return Ee(e)?e:void 0},Te=function(e,t){return arguments.length<2?ke(Ae[e]):Ae[e]&&Ae[e][t]},xe=re({}.isPrototypeOf),De=Te("navigator","userAgent")||"",Se=q,Re=De,Ie=Se.process,Oe=Se.Deno,Ce=Ie&&Ie.versions||Oe&&Oe.version,Pe=Ce&&Ce.v8;Pe&&(J=(Y=Pe.split("."))[0]>0&&Y[0]<4?1:+(Y[0]+Y[1])),!J&&Re&&(!(Y=Re.match(/Edge\/(\d+)/))||Y[1]>=74)&&(Y=Re.match(/Chrome\/(\d+)/))&&(J=+Y[1]);var Le=J,Me=Le,je=F,Ue=!!Object.getOwnPropertySymbols&&!je((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Me&&Me<41})),Be=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ne=Te,qe=be,Ge=xe,Fe=Be,Ve=q.Object,Ke=Fe?function(e){return"symbol"==typeof e}:function(e){var t=Ne("Symbol");return qe(t)&&Ge(t.prototype,Ve(e))},We=q.String,ze=function(e){try{return We(e)}catch(e){return"Object"}},He=be,$e=ze,Qe=q.TypeError,Ye=function(e){if(He(e))return e;throw Qe($e(e)+" is not a function")},Je=Ye,Xe=function(e,t){var n=e[t];return null==n?void 0:Je(n)},Ze=W,et=be,tt=we,nt=q.TypeError,rt={exports:{}},at=q,it=Object.defineProperty,st=function(e,t){try{it(at,e,{value:t,configurable:!0,writable:!0})}catch(n){at[e]=t}return t},ot=st,dt=q["__core-js_shared__"]||ot("__core-js_shared__",{}),ut=dt;(rt.exports=function(e,t){return ut[e]||(ut[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var lt=me,ct=q.Object,ht=function(e){return ct(lt(e))},pt=ht,ft=re({}.hasOwnProperty),mt=Object.hasOwn||function(e,t){return ft(pt(e),t)},vt=re,gt=0,yt=Math.random(),bt=vt(1..toString),_t=function(e){return"Symbol("+(void 0===e?"":e)+")_"+bt(++gt+yt,36)},wt=q,At=rt.exports,Et=mt,kt=_t,Tt=Ue,xt=Be,Dt=At("wks"),St=wt.Symbol,Rt=St&&St.for,It=xt?St:St&&St.withoutSetter||kt,Ot=function(e){if(!Et(Dt,e)||!Tt&&"string"!=typeof Dt[e]){var t="Symbol."+e;Tt&&Et(St,e)?Dt[e]=St[e]:Dt[e]=xt&&Rt?Rt(t):It(t)}return Dt[e]},Ct=W,Pt=we,Lt=Ke,Mt=Xe,jt=function(e,t){var n,r;if("string"===t&&et(n=e.toString)&&!tt(r=Ze(n,e)))return r;if(et(n=e.valueOf)&&!tt(r=Ze(n,e)))return r;if("string"!==t&&et(n=e.toString)&&!tt(r=Ze(n,e)))return r;throw nt("Can't convert object to primitive value")},Ut=Ot,Bt=q.TypeError,Nt=Ut("toPrimitive"),qt=function(e,t){if(!Pt(e)||Lt(e))return e;var n,r=Mt(e,Nt);if(r){if(void 0===t&&(t="default"),n=Ct(r,e,t),!Pt(n)||Lt(n))return n;throw Bt("Can't convert object to primitive value")}return void 0===t&&(t="number"),jt(e,t)},Gt=Ke,Ft=function(e){var t=qt(e,"string");return Gt(t)?t:t+""},Vt=we,Kt=q.document,Wt=Vt(Kt)&&Vt(Kt.createElement),zt=function(e){return Wt?Kt.createElement(e):{}},Ht=zt,$t=!V&&!F((function(){return 7!=Object.defineProperty(Ht("div"),"a",{get:function(){return 7}}).a})),Qt=V,Yt=W,Jt=z,Xt=X,Zt=ye,en=Ft,tn=mt,nn=$t,rn=Object.getOwnPropertyDescriptor;G.f=Qt?rn:function(e,t){if(e=Zt(e),t=en(t),nn)try{return rn(e,t)}catch(e){}if(tn(e,t))return Xt(!Yt(Jt.f,e,t),e[t])};var an={},sn=q,on=we,dn=sn.String,un=sn.TypeError,ln=function(e){if(on(e))return e;throw un(dn(e)+" is not an object")},cn=V,hn=$t,pn=ln,fn=Ft,mn=q.TypeError,vn=Object.defineProperty;an.f=cn?vn:function(e,t,n){if(pn(e),t=fn(t),pn(n),hn)try{return vn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw mn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var gn=an,yn=X,bn=V?function(e,t,n){return gn.f(e,t,yn(1,n))}:function(e,t,n){return e[t]=n,e},_n={exports:{}},wn=be,An=dt,En=re(Function.toString);wn(An.inspectSource)||(An.inspectSource=function(e){return En(e)});var kn,Tn,xn,Dn=An.inspectSource,Sn=be,Rn=Dn,In=q.WeakMap,On=Sn(In)&&/native code/.test(Rn(In)),Cn=rt.exports,Pn=_t,Ln=Cn("keys"),Mn=function(e){return Ln[e]||(Ln[e]=Pn(e))},jn={},Un=On,Bn=q,Nn=re,qn=we,Gn=bn,Fn=mt,Vn=dt,Kn=Mn,Wn=jn,zn=Bn.TypeError,Hn=Bn.WeakMap;if(Un||Vn.state){var $n=Vn.state||(Vn.state=new Hn),Qn=Nn($n.get),Yn=Nn($n.has),Jn=Nn($n.set);kn=function(e,t){if(Yn($n,e))throw new zn("Object already initialized");return t.facade=e,Jn($n,e,t),t},Tn=function(e){return Qn($n,e)||{}},xn=function(e){return Yn($n,e)}}else{var Xn=Kn("state");Wn[Xn]=!0,kn=function(e,t){if(Fn(e,Xn))throw new zn("Object already initialized");return t.facade=e,Gn(e,Xn,t),t},Tn=function(e){return Fn(e,Xn)?e[Xn]:{}},xn=function(e){return Fn(e,Xn)}}var Zn={set:kn,get:Tn,has:xn,enforce:function(e){return xn(e)?Tn(e):kn(e,{})},getterFor:function(e){return function(t){var n;if(!qn(t)||(n=Tn(t)).type!==e)throw zn("Incompatible receiver, "+e+" required");return n}}},er=V,tr=mt,nr=Function.prototype,rr=er&&Object.getOwnPropertyDescriptor,ar=tr(nr,"name"),ir={EXISTS:ar,PROPER:ar&&"something"===function(){}.name,CONFIGURABLE:ar&&(!er||er&&rr(nr,"name").configurable)},sr=q,or=be,dr=mt,ur=bn,lr=st,cr=Dn,hr=ir.CONFIGURABLE,pr=Zn.get,fr=Zn.enforce,mr=String(String).split("String");(_n.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet,d=r&&void 0!==r.name?r.name:t;or(n)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!dr(n,"name")||hr&&n.name!==d)&&ur(n,"name",d),(a=fr(n)).source||(a.source=mr.join("string"==typeof d?d:""))),e!==sr?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:ur(e,t,n)):s?e[t]=n:lr(t,n)})(Function.prototype,"toString",(function(){return or(this)&&pr(this).source||cr(this)}));var vr={},gr=Math.ceil,yr=Math.floor,br=function(e){var t=+e;return t!=t||0===t?0:(t>0?yr:gr)(t)},_r=br,wr=Math.max,Ar=Math.min,Er=function(e,t){var n=_r(e);return n<0?wr(n+t,0):Ar(n,t)},kr=br,Tr=Math.min,xr=function(e){return e>0?Tr(kr(e),9007199254740991):0},Dr=xr,Sr=function(e){return Dr(e.length)},Rr=ye,Ir=Er,Or=Sr,Cr=function(e){return function(t,n,r){var a,i=Rr(t),s=Or(i),o=Ir(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}},Pr={includes:Cr(!0),indexOf:Cr(!1)},Lr=mt,Mr=ye,jr=Pr.indexOf,Ur=jn,Br=re([].push),Nr=function(e,t){var n,r=Mr(e),a=0,i=[];for(n in r)!Lr(Ur,n)&&Lr(r,n)&&Br(i,n);for(;t.length>a;)Lr(r,n=t[a++])&&(~jr(i,n)||Br(i,n));return i},qr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Gr=Nr,Fr=qr.concat("length","prototype");vr.f=Object.getOwnPropertyNames||function(e){return Gr(e,Fr)};var Vr={};Vr.f=Object.getOwnPropertySymbols;var Kr=Te,Wr=vr,zr=Vr,Hr=ln,$r=re([].concat),Qr=Kr("Reflect","ownKeys")||function(e){var t=Wr.f(Hr(e)),n=zr.f;return n?$r(t,n(e)):t},Yr=mt,Jr=Qr,Xr=G,Zr=an,ea=function(e,t){for(var n=Jr(t),r=Zr.f,a=Xr.f,i=0;i<n.length;i++){var s=n[i];Yr(e,s)||r(e,s,a(t,s))}},ta=F,na=be,ra=/#|\.prototype\./,aa=function(e,t){var n=sa[ia(e)];return n==da||n!=oa&&(na(t)?ta(t):!!t)},ia=aa.normalize=function(e){return String(e).replace(ra,".").toLowerCase()},sa=aa.data={},oa=aa.NATIVE="N",da=aa.POLYFILL="P",ua=aa,la=q,ca=G.f,ha=bn,pa=_n.exports,fa=st,ma=ea,va=ua,ga=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?la:u?la[o]||fa(o,{}):(la[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=ca(n,r))&&s.value:n[r],!va(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;ma(i,a)}(e.sham||a&&a.sham)&&ha(i,"sham",!0),pa(n,r,i,e)}},ya=Nr,ba=qr,_a=Object.keys||function(e){return ya(e,ba)},wa=ht,Aa=_a;ga({target:"Object",stat:!0,forced:F((function(){Aa(1)}))},{keys:function(e){return Aa(wa(e))}});var Ea=Ye,ka=re(re.bind),Ta=function(e,t){return Ea(e),void 0===t?e:ka?ka(e,t):function(){return e.apply(t,arguments)}},xa=oe,Da=Array.isArray||function(e){return"Array"==xa(e)},Sa={};Sa[Ot("toStringTag")]="z";var Ra="[object z]"===String(Sa),Ia=q,Oa=Ra,Ca=be,Pa=oe,La=Ot("toStringTag"),Ma=Ia.Object,ja="Arguments"==Pa(function(){return arguments}()),Ua=Oa?Pa: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=Ma(e),La))?n:ja?Pa(t):"Object"==(r=Pa(t))&&Ca(t.callee)?"Arguments":r},Ba=re,Na=F,qa=be,Ga=Ua,Fa=Dn,Va=function(){},Ka=[],Wa=Te("Reflect","construct"),za=/^\s*(?:class|function)\b/,Ha=Ba(za.exec),$a=!za.exec(Va),Qa=function(e){if(!qa(e))return!1;try{return Wa(Va,Ka,e),!0}catch(e){return!1}},Ya=!Wa||Na((function(){var e;return Qa(Qa.call)||!Qa(Object)||!Qa((function(){e=!0}))||e}))?function(e){if(!qa(e))return!1;switch(Ga(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return $a||!!Ha(za,Fa(e))}:Qa,Ja=q,Xa=Da,Za=Ya,ei=we,ti=Ot("species"),ni=Ja.Array,ri=function(e){var t;return Xa(e)&&(t=e.constructor,(Za(t)&&(t===ni||Xa(t.prototype))||ei(t)&&null===(t=t[ti]))&&(t=void 0)),void 0===t?ni:t},ai=function(e,t){return new(ri(e))(0===t?0:t)},ii=Ta,si=pe,oi=ht,di=Sr,ui=ai,li=re([].push),ci=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,l,c){for(var h,p,f=oi(d),m=si(f),v=ii(u,l),g=di(m),y=0,b=c||ui,_=t?b(d,g):n||s?b(d,0):void 0;g>y;y++)if((o||y in m)&&(p=v(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:li(_,h)}else switch(e){case 4:return!1;case 7:li(_,h)}return i?-1:r||a?a:_}},hi={forEach:ci(0),map:ci(1),filter:ci(2),some:ci(3),every:ci(4),find:ci(5),findIndex:ci(6),filterReject:ci(7)},pi=F,fi=Le,mi=Ot("species"),vi=function(e){return fi>=51||!pi((function(){var t=[];return(t.constructor={})[mi]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},gi=hi.filter;ga({target:"Array",proto:!0,forced:!vi("filter")},{filter:function(e){return gi(this,e,arguments.length>1?arguments[1]:void 0)}});var yi=ga,bi=F,_i=ye,wi=G.f,Ai=V,Ei=bi((function(){wi(1)}));yi({target:"Object",stat:!0,forced:!Ai||Ei,sham:!Ai},{getOwnPropertyDescriptor:function(e,t){return wi(_i(e),t)}});var ki=Ft,Ti=an,xi=X,Di=function(e,t,n){var r=ki(t);r in e?Ti.f(e,r,xi(0,n)):e[r]=n},Si=Qr,Ri=ye,Ii=G,Oi=Di;ga({target:"Object",stat:!0,sham:!V},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Ri(e),a=Ii.f,i=Si(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Oi(s,t,n);return s}});var Ci=Ua,Pi=Ra?{}.toString:function(){return"[object "+Ci(this)+"]"},Li=Ra,Mi=_n.exports,ji=Pi;Li||Mi(Object.prototype,"toString",ji,{unsafe:!0});var Ui=q.Promise,Bi=_n.exports,Ni=q,qi=be,Gi=Ni.String,Fi=Ni.TypeError,Vi=re,Ki=ln,Wi=function(e){if("object"==typeof e||qi(e))return e;throw Fi("Can't set "+Gi(e)+" as a prototype")},zi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Vi(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ki(n),Wi(r),t?e(n,r):n.__proto__=r,n}}():void 0),Hi=an.f,$i=mt,Qi=Ot("toStringTag"),Yi=function(e,t,n){e&&!$i(e=n?e:e.prototype,Qi)&&Hi(e,Qi,{configurable:!0,value:t})},Ji=Te,Xi=an,Zi=V,es=Ot("species"),ts=function(e){var t=Ji(e),n=Xi.f;Zi&&t&&!t[es]&&n(t,es,{configurable:!0,get:function(){return this}})},ns=xe,rs=q.TypeError,as={},is=as,ss=Ot("iterator"),os=Array.prototype,ds=function(e){return void 0!==e&&(is.Array===e||os[ss]===e)},us=Ua,ls=Xe,cs=as,hs=Ot("iterator"),ps=function(e){if(null!=e)return ls(e,hs)||ls(e,"@@iterator")||cs[us(e)]},fs=W,ms=Ye,vs=ln,gs=ze,ys=ps,bs=q.TypeError,_s=function(e,t){var n=arguments.length<2?ys(e):t;if(ms(n))return vs(fs(n,e));throw bs(gs(e)+" is not iterable")},ws=W,As=ln,Es=Xe,ks=function(e,t,n){var r,a;As(e);try{if(!(r=Es(e,"return"))){if("throw"===t)throw n;return n}r=ws(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return As(r),n},Ts=Ta,xs=W,Ds=ln,Ss=ze,Rs=ds,Is=Sr,Os=xe,Cs=_s,Ps=ps,Ls=ks,Ms=q.TypeError,js=function(e,t){this.stopped=e,this.result=t},Us=js.prototype,Bs=Ot("iterator"),Ns=!1;try{var qs=0,Gs={next:function(){return{done:!!qs++}},return:function(){Ns=!0}};Gs[Bs]=function(){return this},Array.from(Gs,(function(){throw 2}))}catch(e){}var Fs,Vs,Ks,Ws,zs=function(e,t){if(!t&&!Ns)return!1;var n=!1;try{var r={};r[Bs]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Hs=Ya,$s=ze,Qs=q.TypeError,Ys=ln,Js=function(e){if(Hs(e))return e;throw Qs($s(e)+" is not a constructor")},Xs=Ot("species"),Zs=function(e,t){var n,r=Ys(e).constructor;return void 0===r||null==(n=Ys(r)[Xs])?t:Js(n)},eo=Function.prototype,to=eo.apply,no=eo.bind,ro=eo.call,ao="object"==typeof Reflect&&Reflect.apply||(no?ro.bind(to):function(){return ro.apply(to,arguments)}),io=Te("document","documentElement"),so=re([].slice),oo=/(?:ipad|iphone|ipod).*applewebkit/i.test(De),uo="process"==oe(q.process),lo=q,co=ao,ho=Ta,po=be,fo=mt,mo=F,vo=io,go=so,yo=zt,bo=oo,_o=uo,wo=lo.setImmediate,Ao=lo.clearImmediate,Eo=lo.process,ko=lo.Dispatch,To=lo.Function,xo=lo.MessageChannel,Do=lo.String,So=0,Ro={};try{Fs=lo.location}catch(e){}var Io=function(e){if(fo(Ro,e)){var t=Ro[e];delete Ro[e],t()}},Oo=function(e){return function(){Io(e)}},Co=function(e){Io(e.data)},Po=function(e){lo.postMessage(Do(e),Fs.protocol+"//"+Fs.host)};wo&&Ao||(wo=function(e){var t=go(arguments,1);return Ro[++So]=function(){co(po(e)?e:To(e),void 0,t)},Vs(So),So},Ao=function(e){delete Ro[e]},_o?Vs=function(e){Eo.nextTick(Oo(e))}:ko&&ko.now?Vs=function(e){ko.now(Oo(e))}:xo&&!bo?(Ws=(Ks=new xo).port2,Ks.port1.onmessage=Co,Vs=ho(Ws.postMessage,Ws)):lo.addEventListener&&po(lo.postMessage)&&!lo.importScripts&&Fs&&"file:"!==Fs.protocol&&!mo(Po)?(Vs=Po,lo.addEventListener("message",Co,!1)):Vs="onreadystatechange"in yo("script")?function(e){vo.appendChild(yo("script")).onreadystatechange=function(){vo.removeChild(this),Io(e)}}:function(e){setTimeout(Oo(e),0)});var Lo,Mo,jo,Uo,Bo,No,qo,Go,Fo={set:wo,clear:Ao},Vo=q,Ko=/ipad|iphone|ipod/i.test(De)&&void 0!==Vo.Pebble,Wo=/web0s(?!.*chrome)/i.test(De),zo=q,Ho=Ta,$o=G.f,Qo=Fo.set,Yo=oo,Jo=Ko,Xo=Wo,Zo=uo,ed=zo.MutationObserver||zo.WebKitMutationObserver,td=zo.document,nd=zo.process,rd=zo.Promise,ad=$o(zo,"queueMicrotask"),id=ad&&ad.value;id||(Lo=function(){var e,t;for(Zo&&(e=nd.domain)&&e.exit();Mo;){t=Mo.fn,Mo=Mo.next;try{t()}catch(e){throw Mo?Uo():jo=void 0,e}}jo=void 0,e&&e.enter()},Yo||Zo||Xo||!ed||!td?!Jo&&rd&&rd.resolve?((qo=rd.resolve(void 0)).constructor=rd,Go=Ho(qo.then,qo),Uo=function(){Go(Lo)}):Zo?Uo=function(){nd.nextTick(Lo)}:(Qo=Ho(Qo,zo),Uo=function(){Qo(Lo)}):(Bo=!0,No=td.createTextNode(""),new ed(Lo).observe(No,{characterData:!0}),Uo=function(){No.data=Bo=!Bo}));var sd=id||function(e){var t={fn:e,next:void 0};jo&&(jo.next=t),Mo||(Mo=t,Uo()),jo=t},od={},dd=Ye,ud=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=dd(t),this.reject=dd(n)};od.f=function(e){return new ud(e)};var ld,cd,hd,pd,fd=ln,md=we,vd=od,gd=function(e,t){if(fd(e),md(t)&&t.constructor===e)return t;var n=vd.f(e);return(0,n.resolve)(t),n.promise},yd=q,bd="object"==typeof window,_d=ga,wd=q,Ad=Te,Ed=W,kd=Ui,Td=_n.exports,xd=function(e,t,n){for(var r in t)Bi(e,r,t[r],n);return e},Dd=zi,Sd=Yi,Rd=ts,Id=Ye,Od=be,Cd=we,Pd=function(e,t){if(ns(t,e))return e;throw rs("Incorrect invocation")},Ld=Dn,Md=function(e,t,n){var r,a,i,s,o,d,u,l=n&&n.that,c=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),f=Ts(t,l),m=function(e){return r&&Ls(r,"normal",e),new js(!0,e)},v=function(e){return c?(Ds(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(!(a=Ps(e)))throw Ms(Ss(e)+" is not iterable");if(Rs(a)){for(i=0,s=Is(e);s>i;i++)if((o=v(e[i]))&&Os(Us,o))return o;return new js(!1)}r=Cs(e,a)}for(d=r.next;!(u=xs(d,r)).done;){try{o=v(u.value)}catch(e){Ls(r,"throw",e)}if("object"==typeof o&&o&&Os(Us,o))return o}return new js(!1)},jd=zs,Ud=Zs,Bd=Fo.set,Nd=sd,qd=gd,Gd=function(e,t){var n=yd.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},Fd=od,Vd=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Kd=Zn,Wd=ua,zd=bd,Hd=uo,$d=Le,Qd=Ot("species"),Yd=Kd.get,Jd=Kd.set,Xd=Kd.getterFor("Promise"),Zd=kd&&kd.prototype,eu=kd,tu=Zd,nu=wd.TypeError,ru=wd.document,au=wd.process,iu=Fd.f,su=iu,ou=!!(ru&&ru.createEvent&&wd.dispatchEvent),du=Od(wd.PromiseRejectionEvent),uu=!1,lu=Wd("Promise",(function(){var e=Ld(eu),t=e!==String(eu);if(!t&&66===$d)return!0;if($d>=51&&/native code/.test(e))return!1;var n=new eu((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Qd]=r,!(uu=n.then((function(){}))instanceof r)||!t&&zd&&!du})),cu=lu||!jd((function(e){eu.all(e).catch((function(){}))})),hu=function(e){var t;return!(!Cd(e)||!Od(t=e.then))&&t},pu=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;Nd((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var s,o,d,u=n[i++],l=a?u.ok:u.fail,c=u.resolve,h=u.reject,p=u.domain;try{l?(a||(2===e.rejection&&gu(e),e.rejection=1),!0===l?s=r:(p&&p.enter(),s=l(r),p&&(p.exit(),d=!0)),s===u.promise?h(nu("Promise-chain cycle")):(o=hu(s))?Ed(o,s,c,h):c(s)):h(r)}catch(e){p&&!d&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&mu(e)}))}},fu=function(e,t,n){var r,a;ou?((r=ru.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),wd.dispatchEvent(r)):r={promise:t,reason:n},!du&&(a=wd["on"+e])?a(r):"unhandledrejection"===e&&Gd("Unhandled promise rejection",n)},mu=function(e){Ed(Bd,wd,(function(){var t,n=e.facade,r=e.value;if(vu(e)&&(t=Vd((function(){Hd?au.emit("unhandledRejection",r,n):fu("unhandledrejection",n,r)})),e.rejection=Hd||vu(e)?2:1,t.error))throw t.value}))},vu=function(e){return 1!==e.rejection&&!e.parent},gu=function(e){Ed(Bd,wd,(function(){var t=e.facade;Hd?au.emit("rejectionHandled",t):fu("rejectionhandled",t,e.value)}))},yu=function(e,t,n){return function(r){e(t,r,n)}},bu=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,pu(e,!0))},_u=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw nu("Promise can't be resolved itself");var r=hu(t);r?Nd((function(){var n={done:!1};try{Ed(r,t,yu(_u,n,e),yu(bu,n,e))}catch(t){bu(n,t,e)}})):(e.value=t,e.state=1,pu(e,!1))}catch(t){bu({done:!1},t,e)}}};if(lu&&(tu=(eu=function(e){Pd(this,tu),Id(e),Ed(ld,this);var t=Yd(this);try{e(yu(_u,t),yu(bu,t))}catch(e){bu(t,e)}}).prototype,(ld=function(e){Jd(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=xd(tu,{then:function(e,t){var n=Xd(this),r=n.reactions,a=iu(Ud(this,eu));return a.ok=!Od(e)||e,a.fail=Od(t)&&t,a.domain=Hd?au.domain:void 0,n.parent=!0,r[r.length]=a,0!=n.state&&pu(n,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),cd=function(){var e=new ld,t=Yd(e);this.promise=e,this.resolve=yu(_u,t),this.reject=yu(bu,t)},Fd.f=iu=function(e){return e===eu||e===hd?new cd(e):su(e)},Od(kd)&&Zd!==Object.prototype)){pd=Zd.then,uu||(Td(Zd,"then",(function(e,t){var n=this;return new eu((function(e,t){Ed(pd,n,e,t)})).then(e,t)}),{unsafe:!0}),Td(Zd,"catch",tu.catch,{unsafe:!0}));try{delete Zd.constructor}catch(e){}Dd&&Dd(Zd,tu)}_d({global:!0,wrap:!0,forced:lu},{Promise:eu}),Sd(eu,"Promise",!1),Rd("Promise"),hd=Ad("Promise"),_d({target:"Promise",stat:!0,forced:lu},{reject:function(e){var t=iu(this);return Ed(t.reject,void 0,e),t.promise}}),_d({target:"Promise",stat:!0,forced:lu},{resolve:function(e){return qd(this,e)}}),_d({target:"Promise",stat:!0,forced:cu},{all:function(e){var t=this,n=iu(t),r=n.resolve,a=n.reject,i=Vd((function(){var n=Id(t.resolve),i=[],s=0,o=1;Md(e,(function(e){var d=s++,u=!1;o++,Ed(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=iu(t),r=n.reject,a=Vd((function(){var a=Id(t.resolve);Md(e,(function(e){Ed(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var wu=ga,Au=Ui,Eu=F,ku=Te,Tu=be,xu=Zs,Du=gd,Su=_n.exports;if(wu({target:"Promise",proto:!0,real:!0,forced:!!Au&&Eu((function(){Au.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=xu(this,ku("Promise")),n=Tu(e);return this.then(n?function(n){return Du(t,e()).then((function(){return n}))}:e,n?function(n){return Du(t,e()).then((function(){throw n}))}:e)}}),Tu(Au)){var Ru=ku("Promise").prototype.finally;Au.prototype.finally!==Ru&&Su(Au.prototype,"finally",Ru,{unsafe:!0})}var Iu=Ua,Ou=q.String,Cu=function(e){if("Symbol"===Iu(e))throw TypeError("Cannot convert a Symbol value to a string");return Ou(e)},Pu=ln,Lu=function(){var e=Pu(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},Mu={},ju=F,Uu=q.RegExp;Mu.UNSUPPORTED_Y=ju((function(){var e=Uu("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Mu.BROKEN_CARET=ju((function(){var e=Uu("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var Bu,Nu=an,qu=ln,Gu=ye,Fu=_a,Vu=V?Object.defineProperties:function(e,t){qu(e);for(var n,r=Gu(t),a=Fu(t),i=a.length,s=0;i>s;)Nu.f(e,n=a[s++],r[n]);return e},Ku=ln,Wu=Vu,zu=qr,Hu=jn,$u=io,Qu=zt,Yu=Mn("IE_PROTO"),Ju=function(){},Xu=function(e){return"<script>"+e+"<\/script>"},Zu=function(e){e.write(Xu("")),e.close();var t=e.parentWindow.Object;return e=null,t},el=function(){try{Bu=new ActiveXObject("htmlfile")}catch(e){}var e,t;el="undefined"!=typeof document?document.domain&&Bu?Zu(Bu):((t=Qu("iframe")).style.display="none",$u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Xu("document.F=Object")),e.close(),e.F):Zu(Bu);for(var n=zu.length;n--;)delete el.prototype[zu[n]];return el()};Hu[Yu]=!0;var tl=Object.create||function(e,t){var n;return null!==e?(Ju.prototype=Ku(e),n=new Ju,Ju.prototype=null,n[Yu]=e):n=el(),void 0===t?n:Wu(n,t)},nl=F,rl=q.RegExp,al=nl((function(){var e=rl(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),il=F,sl=q.RegExp,ol=il((function(){var e=sl("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),dl=W,ul=re,ll=Cu,cl=Lu,hl=Mu,pl=rt.exports,fl=tl,ml=Zn.get,vl=al,gl=ol,yl=pl("native-string-replace",String.prototype.replace),bl=RegExp.prototype.exec,_l=bl,wl=ul("".charAt),Al=ul("".indexOf),El=ul("".replace),kl=ul("".slice),Tl=function(){var e=/a/,t=/b*/g;return dl(bl,e,"a"),dl(bl,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),xl=hl.UNSUPPORTED_Y||hl.BROKEN_CARET,Dl=void 0!==/()??/.exec("")[1];(Tl||Dl||xl||vl||gl)&&(_l=function(e){var t,n,r,a,i,s,o,d=this,u=ml(d),l=ll(e),c=u.raw;if(c)return c.lastIndex=d.lastIndex,t=dl(_l,c,l),d.lastIndex=c.lastIndex,t;var h=u.groups,p=xl&&d.sticky,f=dl(cl,d),m=d.source,v=0,g=l;if(p&&(f=El(f,"y",""),-1===Al(f,"g")&&(f+="g"),g=kl(l,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==wl(l,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",f)),Dl&&(n=new RegExp("^"+m+"$(?!\\s)",f)),Tl&&(r=d.lastIndex),a=dl(bl,p?n:d,g),p?a?(a.input=kl(a.input,v),a[0]=kl(a[0],v),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:Tl&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),Dl&&a&&a.length>1&&dl(yl,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=fl(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var Sl=_l;ga({target:"RegExp",proto:!0,forced:/./.exec!==Sl},{exec:Sl});var Rl=re,Il=_n.exports,Ol=Sl,Cl=F,Pl=Ot,Ll=bn,Ml=Pl("species"),jl=RegExp.prototype,Ul=function(e,t,n,r){var a=Pl(e),i=!Cl((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!Cl((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ml]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=Rl(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=Rl(e),d=t.exec;return d===Ol||d===jl.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Il(String.prototype,e,d[0]),Il(jl,a,d[1])}r&&Ll(jl[a],"sham",!0)},Bl=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Nl=W,ql=ln,Gl=be,Fl=oe,Vl=Sl,Kl=q.TypeError,Wl=function(e,t){var n=e.exec;if(Gl(n)){var r=Nl(n,e,t);return null!==r&&ql(r),r}if("RegExp"===Fl(e))return Nl(Vl,e,t);throw Kl("RegExp#exec called on incompatible receiver")},zl=W,Hl=ln,$l=me,Ql=Bl,Yl=Cu,Jl=Xe,Xl=Wl;Ul("search",(function(e,t,n){return[function(t){var n=$l(this),r=null==t?void 0:Jl(t,e);return r?zl(r,t,n):new RegExp(t)[e](Yl(n))},function(e){var r=Hl(this),a=Yl(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;Ql(s,0)||(r.lastIndex=0);var o=Xl(r,a);return Ql(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var Zl=me,ec=Cu,tc=re("".replace),nc="[\t\n\v\f\r \u2028\u2029\ufeff]",rc=RegExp("^"+nc+nc+"*"),ac=RegExp(nc+nc+"*$"),ic=function(e){return function(t){var n=ec(Zl(t));return 1&e&&(n=tc(n,rc,"")),2&e&&(n=tc(n,ac,"")),n}},sc={start:ic(1),end:ic(2),trim:ic(3)},oc=ir.PROPER,dc=F,uc="\t\n\v\f\r \u2028\u2029\ufeff",lc=sc.trim;ga({target:"String",proto:!0,forced:function(e){return dc((function(){return!!uc[e]()||"
"!=="
"[e]()||oc&&uc[e].name!==e}))}("trim")},{trim:function(){return lc(this)}});var cc={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},hc=zt("span").classList,pc=hc&&hc.constructor&&hc.constructor.prototype,fc=pc===Object.prototype?void 0:pc,mc=F,vc=hi.forEach,gc=function(e,t){var n=[][e];return!!n&&mc((function(){n.call(null,t||function(){throw 1},1)}))},yc=q,bc=cc,_c=fc,wc=gc("forEach")?[].forEach:function(e){return vc(this,e,arguments.length>1?arguments[1]:void 0)},Ac=bn,Ec=function(e){if(e&&e.forEach!==wc)try{Ac(e,"forEach",wc)}catch(t){e.forEach=wc}};for(var kc in bc)bc[kc]&&Ec(yc[kc]&&yc[kc].prototype);Ec(_c);var Tc=be,xc=we,Dc=zi,Sc=we,Rc=oe,Ic=Ot("match"),Oc=function(e){var t;return Sc(e)&&(void 0!==(t=e[Ic])?!!t:"RegExp"==Rc(e))},Cc=V,Pc=q,Lc=re,Mc=ua,jc=function(e,t,n){var r,a;return Dc&&Tc(r=t.constructor)&&r!==n&&xc(a=r.prototype)&&a!==n.prototype&&Dc(e,a),e},Uc=bn,Bc=an.f,Nc=vr.f,qc=xe,Gc=Oc,Fc=Cu,Vc=Lu,Kc=Mu,Wc=_n.exports,zc=F,Hc=mt,$c=Zn.enforce,Qc=ts,Yc=al,Jc=ol,Xc=Ot("match"),Zc=Pc.RegExp,eh=Zc.prototype,th=Pc.SyntaxError,nh=Lc(Vc),rh=Lc(eh.exec),ah=Lc("".charAt),ih=Lc("".replace),sh=Lc("".indexOf),oh=Lc("".slice),dh=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,uh=/a/g,lh=/a/g,ch=new Zc(uh)!==uh,hh=Kc.UNSUPPORTED_Y,ph=Cc&&(!ch||hh||Yc||Jc||zc((function(){return lh[Xc]=!1,Zc(uh)!=uh||Zc(lh)==lh||"/a/i"!=Zc(uh,"i")})));if(Mc("RegExp",ph)){for(var fh=function(e,t){var n,r,a,i,s,o,d=qc(eh,this),u=Gc(e),l=void 0===t,c=[],h=e;if(!d&&u&&l&&e.constructor===fh)return e;if((u||qc(eh,e))&&(e=e.source,l&&(t="flags"in h?h.flags:nh(h))),e=void 0===e?"":Fc(e),t=void 0===t?"":Fc(t),h=e,Yc&&"dotAll"in uh&&(r=!!t&&sh(t,"s")>-1)&&(t=ih(t,/s/g,"")),n=t,hh&&"sticky"in uh&&(a=!!t&&sh(t,"y")>-1)&&(t=ih(t,/y/g,"")),Jc&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,l="";r<=n;r++){if("\\"===(t=ah(e,r)))t+=ah(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:rh(dh,oh(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===l||Hc(s,l))throw new th("Invalid capture group name");s[l]=!0,i[i.length]=[l,u],d=!1,l="";continue}d?l+=t:a+=t}return[a,i]}(e),e=i[0],c=i[1]),s=jc(Zc(e,t),d?this:eh,fh),(r||a||c.length)&&(o=$c(s),r&&(o.dotAll=!0,o.raw=fh(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=ah(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+ah(e,++r);return a}(e),n)),a&&(o.sticky=!0),c.length&&(o.groups=c)),e!==h)try{Uc(s,"source",""===h?"(?:)":h)}catch(e){}return s},mh=function(e){e in fh||Bc(fh,e,{configurable:!0,get:function(){return Zc[e]},set:function(t){Zc[e]=t}})},vh=Nc(Zc),gh=0;vh.length>gh;)mh(vh[gh++]);eh.constructor=fh,fh.prototype=eh,Wc(Pc,"RegExp",fh)}Qc("RegExp");var yh=re,bh=ir.PROPER,_h=_n.exports,wh=ln,Ah=xe,Eh=Cu,kh=F,Th=Lu,xh=RegExp.prototype,Dh=xh.toString,Sh=yh(Th),Rh=kh((function(){return"/a/b"!=Dh.call({source:"a",flags:"b"})})),Ih=bh&&"toString"!=Dh.name;(Rh||Ih)&&_h(RegExp.prototype,"toString",(function(){var e=wh(this),t=Eh(e.source),n=e.flags;return"/"+t+"/"+Eh(void 0===n&&Ah(xh,e)&&!("flags"in xh)?Sh(e):n)}),{unsafe:!0});var Oh=ga,Ch=q,Ph=F,Lh=Da,Mh=we,jh=ht,Uh=Sr,Bh=Di,Nh=ai,qh=vi,Gh=Le,Fh=Ot("isConcatSpreadable"),Vh=Ch.TypeError,Kh=Gh>=51||!Ph((function(){var e=[];return e[Fh]=!1,e.concat()[0]!==e})),Wh=qh("concat"),zh=function(e){if(!Mh(e))return!1;var t=e[Fh];return void 0!==t?!!t:Lh(e)};Oh({target:"Array",proto:!0,forced:!Kh||!Wh},{concat:function(e){var t,n,r,a,i,s=jh(this),o=Nh(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(zh(i=-1===t?s:arguments[t])){if(d+(a=Uh(i))>9007199254740991)throw Vh("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&Bh(o,d,i[n])}else{if(d>=9007199254740991)throw Vh("Maximum allowed index exceeded");Bh(o,d++,i)}return o.length=d,o}});var Hh,$h=Oc,Qh=q.TypeError,Yh=function(e){if($h(e))throw Qh("The method doesn't accept regular expressions");return e},Jh=Ot("match"),Xh=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Jh]=!1,"/./"[e](t)}catch(e){}}return!1},Zh=ga,ep=re,tp=G.f,np=xr,rp=Cu,ap=Yh,ip=me,sp=Xh,op=ep("".startsWith),dp=ep("".slice),up=Math.min,lp=sp("startsWith");Zh({target:"String",proto:!0,forced:!!(lp||(Hh=tp(String.prototype,"startsWith"),!Hh||Hh.writable))&&!lp},{startsWith:function(e){var t=rp(ip(this));ap(e);var n=np(up(arguments.length>1?arguments[1]:void 0,t.length)),r=rp(e);return op?op(t,r,n):dp(t,n,n+r.length)===r}});var cp=re,hp=br,pp=Cu,fp=me,mp=cp("".charAt),vp=cp("".charCodeAt),gp=cp("".slice),yp=function(e){return function(t,n){var r,a,i=pp(fp(t)),s=hp(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=vp(i,s))<55296||r>56319||s+1===o||(a=vp(i,s+1))<56320||a>57343?e?mp(i,s):r:e?gp(i,s,s+2):a-56320+(r-55296<<10)+65536}},bp={codeAt:yp(!1),charAt:yp(!0)},_p=bp.charAt,wp=function(e,t,n){return t+(n?_p(e,t).length:1)},Ap=re,Ep=ht,kp=Math.floor,Tp=Ap("".charAt),xp=Ap("".replace),Dp=Ap("".slice),Sp=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Rp=/\$([$&'`]|\d{1,2})/g,Ip=ao,Op=W,Cp=re,Pp=Ul,Lp=F,Mp=ln,jp=be,Up=br,Bp=xr,Np=Cu,qp=me,Gp=wp,Fp=Xe,Vp=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Rp;return void 0!==a&&(a=Ep(a),d=Sp),xp(i,d,(function(i,d){var u;switch(Tp(d,0)){case"$":return"$";case"&":return e;case"`":return Dp(t,0,n);case"'":return Dp(t,s);case"<":u=a[Dp(d,1,-1)];break;default:var l=+d;if(0===l)return i;if(l>o){var c=kp(l/10);return 0===c?i:c<=o?void 0===r[c-1]?Tp(d,1):r[c-1]+Tp(d,1):i}u=r[l-1]}return void 0===u?"":u}))},Kp=Wl,Wp=Ot("replace"),zp=Math.max,Hp=Math.min,$p=Cp([].concat),Qp=Cp([].push),Yp=Cp("".indexOf),Jp=Cp("".slice),Xp="$0"==="a".replace(/./,"$0"),Zp=!!/./[Wp]&&""===/./[Wp]("a","$0");Pp("replace",(function(e,t,n){var r=Zp?"$":"$0";return[function(e,n){var r=qp(this),a=null==e?void 0:Fp(e,Wp);return a?Op(a,e,r,n):Op(t,Np(r),e,n)},function(e,a){var i=Mp(this),s=Np(e);if("string"==typeof a&&-1===Yp(a,r)&&-1===Yp(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=jp(a);d||(a=Np(a));var u=i.global;if(u){var l=i.unicode;i.lastIndex=0}for(var c=[];;){var h=Kp(i,s);if(null===h)break;if(Qp(c,h),!u)break;""===Np(h[0])&&(i.lastIndex=Gp(s,Bp(i.lastIndex),l))}for(var p,f="",m=0,v=0;v<c.length;v++){for(var g=Np((h=c[v])[0]),y=zp(Hp(Up(h.index),s.length),0),b=[],_=1;_<h.length;_++)Qp(b,void 0===(p=h[_])?p:String(p));var w=h.groups;if(d){var A=$p([g],b,y,s);void 0!==w&&Qp(A,w);var E=Np(Ip(a,void 0,A))}else E=Vp(g,s,y,b,w,a);y>=m&&(f+=Jp(s,m,y)+E,m=y+g.length)}return f+Jp(s,m)}]}),!!Lp((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Xp||Zp);var ef=V,tf=ir.EXISTS,nf=re,rf=an.f,af=Function.prototype,sf=nf(af.toString),of=/^\s*function ([^ (]*)/,df=nf(of.exec);ef&&!tf&&rf(af,"name",{configurable:!0,get:function(){try{return df(of,sf(this))[1]}catch(e){return""}}});var uf={},lf=oe,cf=ye,hf=vr.f,pf=so,ff="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];uf.f=function(e){return ff&&"Window"==lf(e)?function(e){try{return hf(e)}catch(e){return pf(ff)}}(e):hf(cf(e))};var mf={},vf=Ot;mf.f=vf;var gf=q,yf=mt,bf=mf,_f=an.f,wf=function(e){var t=gf.Symbol||(gf.Symbol={});yf(t,e)||_f(t,e,{value:bf.f(e)})},Af=ga,Ef=q,kf=Te,Tf=ao,xf=W,Df=re,Sf=V,Rf=Ue,If=F,Of=mt,Cf=Da,Pf=be,Lf=we,Mf=xe,jf=Ke,Uf=ln,Bf=ht,Nf=ye,qf=Ft,Gf=Cu,Ff=X,Vf=tl,Kf=_a,Wf=vr,zf=uf,Hf=Vr,$f=G,Qf=an,Yf=z,Jf=so,Xf=_n.exports,Zf=rt.exports,em=jn,tm=_t,nm=Ot,rm=mf,am=wf,im=Yi,sm=Zn,om=hi.forEach,dm=Mn("hidden"),um=nm("toPrimitive"),lm=sm.set,cm=sm.getterFor("Symbol"),hm=Object.prototype,pm=Ef.Symbol,fm=pm&&pm.prototype,mm=Ef.TypeError,vm=Ef.QObject,gm=kf("JSON","stringify"),ym=$f.f,bm=Qf.f,_m=zf.f,wm=Yf.f,Am=Df([].push),Em=Zf("symbols"),km=Zf("op-symbols"),Tm=Zf("string-to-symbol-registry"),xm=Zf("symbol-to-string-registry"),Dm=Zf("wks"),Sm=!vm||!vm.prototype||!vm.prototype.findChild,Rm=Sf&&If((function(){return 7!=Vf(bm({},"a",{get:function(){return bm(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ym(hm,t);r&&delete hm[t],bm(e,t,n),r&&e!==hm&&bm(hm,t,r)}:bm,Im=function(e,t){var n=Em[e]=Vf(fm);return lm(n,{type:"Symbol",tag:e,description:t}),Sf||(n.description=t),n},Om=function(e,t,n){e===hm&&Om(km,t,n),Uf(e);var r=qf(t);return Uf(n),Of(Em,r)?(n.enumerable?(Of(e,dm)&&e[dm][r]&&(e[dm][r]=!1),n=Vf(n,{enumerable:Ff(0,!1)})):(Of(e,dm)||bm(e,dm,Ff(1,{})),e[dm][r]=!0),Rm(e,r,n)):bm(e,r,n)},Cm=function(e,t){Uf(e);var n=Nf(t),r=Kf(n).concat(jm(n));return om(r,(function(t){Sf&&!xf(Pm,n,t)||Om(e,t,n[t])})),e},Pm=function(e){var t=qf(e),n=xf(wm,this,t);return!(this===hm&&Of(Em,t)&&!Of(km,t))&&(!(n||!Of(this,t)||!Of(Em,t)||Of(this,dm)&&this[dm][t])||n)},Lm=function(e,t){var n=Nf(e),r=qf(t);if(n!==hm||!Of(Em,r)||Of(km,r)){var a=ym(n,r);return!a||!Of(Em,r)||Of(n,dm)&&n[dm][r]||(a.enumerable=!0),a}},Mm=function(e){var t=_m(Nf(e)),n=[];return om(t,(function(e){Of(Em,e)||Of(em,e)||Am(n,e)})),n},jm=function(e){var t=e===hm,n=_m(t?km:Nf(e)),r=[];return om(n,(function(e){!Of(Em,e)||t&&!Of(hm,e)||Am(r,Em[e])})),r};(Rf||(Xf(fm=(pm=function(){if(Mf(fm,this))throw mm("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Gf(arguments[0]):void 0,t=tm(e),n=function(e){this===hm&&xf(n,km,e),Of(this,dm)&&Of(this[dm],t)&&(this[dm][t]=!1),Rm(this,t,Ff(1,e))};return Sf&&Sm&&Rm(hm,t,{configurable:!0,set:n}),Im(t,e)}).prototype,"toString",(function(){return cm(this).tag})),Xf(pm,"withoutSetter",(function(e){return Im(tm(e),e)})),Yf.f=Pm,Qf.f=Om,$f.f=Lm,Wf.f=zf.f=Mm,Hf.f=jm,rm.f=function(e){return Im(nm(e),e)},Sf&&(bm(fm,"description",{configurable:!0,get:function(){return cm(this).description}}),Xf(hm,"propertyIsEnumerable",Pm,{unsafe:!0}))),Af({global:!0,wrap:!0,forced:!Rf,sham:!Rf},{Symbol:pm}),om(Kf(Dm),(function(e){am(e)})),Af({target:"Symbol",stat:!0,forced:!Rf},{for:function(e){var t=Gf(e);if(Of(Tm,t))return Tm[t];var n=pm(t);return Tm[t]=n,xm[n]=t,n},keyFor:function(e){if(!jf(e))throw mm(e+" is not a symbol");if(Of(xm,e))return xm[e]},useSetter:function(){Sm=!0},useSimple:function(){Sm=!1}}),Af({target:"Object",stat:!0,forced:!Rf,sham:!Sf},{create:function(e,t){return void 0===t?Vf(e):Cm(Vf(e),t)},defineProperty:Om,defineProperties:Cm,getOwnPropertyDescriptor:Lm}),Af({target:"Object",stat:!0,forced:!Rf},{getOwnPropertyNames:Mm,getOwnPropertySymbols:jm}),Af({target:"Object",stat:!0,forced:If((function(){Hf.f(1)}))},{getOwnPropertySymbols:function(e){return Hf.f(Bf(e))}}),gm)&&Af({target:"JSON",stat:!0,forced:!Rf||If((function(){var e=pm();return"[null]"!=gm([e])||"{}"!=gm({a:e})||"{}"!=gm(Object(e))}))},{stringify:function(e,t,n){var r=Jf(arguments),a=t;if((Lf(t)||void 0!==e)&&!jf(e))return Cf(t)||(t=function(e,t){if(Pf(a)&&(t=xf(a,this,e,t)),!jf(t))return t}),r[1]=t,Tf(gm,null,r)}});if(!fm[um]){var Um=fm.valueOf;Xf(fm,um,(function(e){return xf(Um,this)}))}im(pm,"Symbol"),em[dm]=!0;var Bm=ga,Nm=V,qm=q,Gm=re,Fm=mt,Vm=be,Km=xe,Wm=Cu,zm=an.f,Hm=ea,$m=qm.Symbol,Qm=$m&&$m.prototype;if(Nm&&Vm($m)&&(!("description"in Qm)||void 0!==$m().description)){var Ym={},Jm=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Wm(arguments[0]),t=Km(Qm,this)?new $m(e):void 0===e?$m():$m(e);return""===e&&(Ym[t]=!0),t};Hm(Jm,$m),Jm.prototype=Qm,Qm.constructor=Jm;var Xm="Symbol(test)"==String($m("test")),Zm=Gm(Qm.toString),ev=Gm(Qm.valueOf),tv=/^Symbol\((.*)\)[^)]+$/,nv=Gm("".replace),rv=Gm("".slice);zm(Qm,"description",{configurable:!0,get:function(){var e=ev(this),t=Zm(e);if(Fm(Ym,e))return"";var n=Xm?rv(t,7,-1):nv(t,tv,"$1");return""===n?void 0:n}}),Bm({global:!0,forced:!0},{Symbol:Jm})}var av=tl,iv=an,sv=Ot("unscopables"),ov=Array.prototype;null==ov[sv]&&iv.f(ov,sv,{configurable:!0,value:av(null)});var dv=function(e){ov[sv][e]=!0},uv=Pr.includes,lv=dv;ga({target:"Array",proto:!0},{includes:function(e){return uv(this,e,arguments.length>1?arguments[1]:void 0)}}),lv("includes");var cv=ga,hv=Yh,pv=me,fv=Cu,mv=Xh,vv=re("".indexOf);cv({target:"String",proto:!0,forced:!mv("includes")},{includes:function(e){return!!~vv(fv(pv(this)),fv(hv(e)),arguments.length>1?arguments[1]:void 0)}});var gv=ga,yv=hi.find,bv=dv,_v=!0;"find"in[]&&Array(1).find((function(){_v=!1})),gv({target:"Array",proto:!0,forced:_v},{find:function(e){return yv(this,e,arguments.length>1?arguments[1]:void 0)}}),bv("find");var wv="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==wv&&wv,Av="URLSearchParams"in wv,Ev="Symbol"in wv&&"iterator"in Symbol,kv="FileReader"in wv&&"Blob"in wv&&function(){try{return new Blob,!0}catch(e){return!1}}(),Tv="FormData"in wv,xv="ArrayBuffer"in wv;if(xv)var Dv=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Sv=ArrayBuffer.isView||function(e){return e&&Dv.indexOf(Object.prototype.toString.call(e))>-1};function Rv(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 Iv(e){return"string"!=typeof e&&(e=String(e)),e}function Ov(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Ev&&(t[Symbol.iterator]=function(){return t}),t}function Cv(e){this.map={},e instanceof Cv?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 Pv(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Lv(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Mv(e){var t=new FileReader,n=Lv(t);return t.readAsArrayBuffer(e),n}function jv(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Uv(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:kv&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Tv&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Av&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():xv&&kv&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=jv(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):xv&&(ArrayBuffer.prototype.isPrototypeOf(e)||Sv(e))?this._bodyArrayBuffer=jv(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):Av&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},kv&&(this.blob=function(){var e=Pv(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=Pv(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(Mv)}),this.text=function(){var e=Pv(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Lv(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)},Tv&&(this.formData=function(){return this.text().then(qv)}),this.json=function(){return this.text().then(JSON.parse)},this}Cv.prototype.append=function(e,t){e=Rv(e),t=Iv(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Cv.prototype.delete=function(e){delete this.map[Rv(e)]},Cv.prototype.get=function(e){return e=Rv(e),this.has(e)?this.map[e]:null},Cv.prototype.has=function(e){return this.map.hasOwnProperty(Rv(e))},Cv.prototype.set=function(e,t){this.map[Rv(e)]=Iv(t)},Cv.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Cv.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Ov(e)},Cv.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ov(e)},Cv.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Ov(e)},Ev&&(Cv.prototype[Symbol.iterator]=Cv.prototype.entries);var Bv=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Nv(e,t){if(!(this instanceof Nv))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Nv){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Cv(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Cv(t.headers)),this.method=function(e){var t=e.toUpperCase();return Bv.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function qv(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 Gv(e,t){if(!(this instanceof Gv))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 Cv(t.headers),this.url=t.url||"",this._initBody(e)}Nv.prototype.clone=function(){return new Nv(this,{body:this._bodyInit})},Uv.call(Nv.prototype),Uv.call(Gv.prototype),Gv.prototype.clone=function(){return new Gv(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Cv(this.headers),url:this.url})},Gv.error=function(){var e=new Gv(null,{status:0,statusText:""});return e.type="error",e};var Fv=[301,302,303,307,308];Gv.redirect=function(e,t){if(-1===Fv.indexOf(t))throw new RangeError("Invalid status code");return new Gv(null,{status:t,headers:{location:e}})};var Vv=wv.DOMException;try{new Vv}catch(e){Vv=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Vv.prototype=Object.create(Error.prototype),Vv.prototype.constructor=Vv}function Kv(e,t){return new Promise((function(n,r){var a=new Nv(e,t);if(a.signal&&a.signal.aborted)return r(new Vv("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 Cv,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 Gv(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 Vv("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&wv.location.href?wv.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&&(kv?i.responseType="blob":xv&&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 Cv?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Iv(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)}))}Kv.polyfill=!0,wv.fetch||(wv.fetch=Kv,wv.Headers=Cv,wv.Request=Nv,wv.Response=Gv);var Wv={name:"@bygd/gd-sdk-pes",version:"1.22.21",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.3","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",validator:"^13.6.0"}},zv=W,Hv=ln,$v=xr,Qv=Cu,Yv=me,Jv=Xe,Xv=wp,Zv=Wl;Ul("match",(function(e,t,n){return[function(t){var n=Yv(this),r=null==t?void 0:Jv(t,e);return r?zv(r,t,n):new RegExp(t)[e](Qv(n))},function(e){var r=Hv(this),a=Qv(e),i=n(t,r,a);if(i.done)return i.value;if(!r.global)return Zv(r,a);var s=r.unicode;r.lastIndex=0;for(var o,d=[],u=0;null!==(o=Zv(r,a));){var l=Qv(o[0]);d[u]=l,""===l&&(r.lastIndex=Xv(a,$v(r.lastIndex),s)),u++}return 0===u?null:d}]}));var eg=ao,tg=W,ng=re,rg=Ul,ag=Oc,ig=ln,sg=me,og=Zs,dg=wp,ug=xr,lg=Cu,cg=Xe,hg=so,pg=Wl,fg=Sl,mg=F,vg=Mu.UNSUPPORTED_Y,gg=Math.min,yg=[].push,bg=ng(/./.exec),_g=ng(yg),wg=ng("".slice);rg("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=lg(sg(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!ag(e))return tg(t,r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,c=new RegExp(e.source,u+"g");(i=tg(fg,c,r))&&!((s=c.lastIndex)>l&&(_g(d,wg(r,l,i.index)),i.length>1&&i.index<r.length&&eg(yg,d,hg(i,1)),o=i[0].length,l=s,d.length>=a));)c.lastIndex===i.index&&c.lastIndex++;return l===r.length?!o&&bg(c,"")||_g(d,""):_g(d,wg(r,l)),d.length>a?hg(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:tg(t,this,e,n)}:t,[function(t,n){var a=sg(this),i=null==t?void 0:cg(t,e);return i?tg(i,t,a,n):tg(r,lg(a),t,n)},function(e,a){var i=ig(this),s=lg(e),o=n(r,i,s,a,r!==t);if(o.done)return o.value;var d=og(i,RegExp),u=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(vg?"g":"y"),c=new d(vg?"^(?:"+i.source+")":i,l),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===s.length)return null===pg(c,s)?[s]:[];for(var p=0,f=0,m=[];f<s.length;){c.lastIndex=vg?0:f;var v,g=pg(c,vg?wg(s,f):s);if(null===g||(v=gg(ug(c.lastIndex+(vg?f:0)),s.length))===p)f=dg(s,f,u);else{if(_g(m,wg(s,p,f)),m.length===h)return m;for(var y=1;y<=g.length-1;y++)if(_g(m,g[y]),m.length===h)return m;f=p=v}}return _g(m,wg(s,p)),m}]}),!!mg((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]})),vg);var Ag=function(){function e(t){T.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return x.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new R.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return w.default(this,e),this.customParamKeys.some(function(e){return w.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),Eg=function(){function e(t,n){T.default(this,e),this.adContainer=t,this.onResume=n}return x.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(){w.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}(),kg=function(e){if(!e)return!1;var t=Tg.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)},Tg=Object.prototype.toString;function xg(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 Dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xg(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sg(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 Rg=["bidFloor","isDfpBidding"];function Ig(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 Og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ig(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ig(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cg=null,Pg=function(){function e(t,n,r){var a=this;if(T.default(this,e),Cg)return Cg;Cg=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.adType_="",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(){w.default(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){w.default(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,a,i,s,o,u,l,h,p,f,v,g,y,b,_,A,L;return x.default(e,[{key:"start",value:(L=k.default(D.default.mark((function e(){return D.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=k.default(D.default.mark((function r(a){var i,s,o,u,l,h,p,f,m,v,g=this;return D.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,l=u.data,h=l.nsid?l.nsid:"TNL_T-17102571517",p=l.tid?l.tid:"TNL_NS-18101700058",f="".concat(h,"/").concat(p),delete l.nsid,delete l.tid,P.default(l,{tnl_system:"1",tnl_content_category:n.category.toLowerCase()}),n.eventBus.broadcast("AD_REQUEST",{message:l.tnl_ad_pos}),m=n.options,"preroll"===l.tnl_ad_pos&&c.isPlainObject(m.preroll)?m=m.preroll:"midroll"===l.tnl_ad_pos&&c.isPlainObject(m.midroll)?m=m.midroll:"rewarded"===l.tnl_ad_pos&&c.isPlainObject(m.rewarded)&&(m=m.rewarded),!(t&&t.retry_on_success&&c.isPlainObject(m.retry_on_success)&&c.isPlainObject(m.retry_on_success.vast))){r.next=26;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_success.vast,{tnl_keys:l})));case 26:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&c.isPlainObject(m.retry_on_failure.vast))){r.next=30;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_failure.vast,{tnl_keys:l})));case 30:if(!c.isPlainObject(m.vast)){r.next=32;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.vast,{tnl_keys:l})));case 32:return r.next=34,n._create_dp_context(l.tnl_ad_pos,t);case 34:v=r.sent,window.idhb.que.push(function(){var e=this;w.default(this,g),window.idhb.setRefererUrl(encodeURIComponent(n.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(n.userAllowedPersonalizedAds));var t="rewarded"===l.tnl_ad_pos?"rewardedVideo":"gdbanner"===l.tnl_ad_pos?"gd__banner":"midroll"===l.tnl_ad_pos?"midroll":"video1";window.idhb.setDfpAdUnitCodeForAdSlot(t,f),window.idhb.setAdserverTargetingForAdSlot(t,l),window.idhb.requestAds({slots:E.default({},t,{bidFloor:null!=v&&v.floor_price?v.floor_price:void 0}),callback:function(t,n){var r=this;w.default(this,e),v&&!n.bidFloorApplied&&fetch(v.skip_url).catch(function(e){w.default(this,r)}.bind(this)),a({tnl_keys:l,url:t,dp:v,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,a,i=this;w.default(this,t);var s="";!navigator.userAgent.match(/Crosswalk/i)&&void 0===window.cordova||"m.hopy.com"!==this.parentDomain?("undefined"===this.topDomain&&(this.topDomain=void 0),s="page_url=".concat(encodeURIComponent(this.topDomain||this.parentDomain))):s="bundle=com.hopy.frivgames",function(e,t){try{var n={tp:e,data:t};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(m.Base64.encode(JSON.stringify(n)))))}catch(e){console.log("Send Atom Log Error...",e)}}("page_url",{top_domain:this.topDomain,parent_domain:this.parentDomain,game:this.gameId,pageUrl:s});var o=this.nextAdPosition(e);null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(a=this.gameData.loader)&&void 0!==a&&a.enabled||"preroll"!==o||(o="midroll");var u=d.getQueryString("ch",window.location.href),l=d.getQueryString("ch_date",window.location.href),c=u?"&ch=".concat(u):"",h=l?"&ch_date=".concat(l):"",p="https://pub.headerlift.com/opphb?".concat(s,"&player_width=").concat(this.options.width,"&player_height=").concat(this.options.height,"&ad_type=video_image&game_id=").concat(this.gameId,"&ad_position=").concat(o).concat(c).concat(h,"&correlator=").concat(Date.now()),f=new Request(p,{method:"GET"});fetch(f).then(function(e){w.default(this,i);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){w.default(this,i),d.isObjectEmpty(e)&&(e=this._createTunnlReportingFallbackKeys(o),this.eventBus.broadcast("AD_REQUEST_KEYS_EMPTY",{message:"Tunnl returned empty response.",details:p})),n({data:e,url:p})}.bind(this)).catch(function(e){w.default(this,i);var t=this._createTunnlReportingFallbackKeys(o);this.eventBus.broadcast("AD_REQUEST_KEYS_FALLBACK",{message:e.message,details:p}),n({data:t,url:p})}.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(w.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=Og(Og({},t),{},{adTag:o,tnl_ad_pos:i});this.adCounter[i]=this.adCounter[i]||0,this.adCounter[i]++;var u=e.dp,l=e.hl;if(u&&(u.adtag_url=o.url,this._extend_dp_with_adsense(u,l,null==e?void 0:e.tnl_keys)),this._isVMAP(i)){var c=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new R.default(e.adtag_url_1,!0);i.query=Dg(Dg({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new R.default(e.adtag_url_2,!0);o.query=Dg(Dg({},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(Sg({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(Sg({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=c}else if(u&&l.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:(A=k.default(D.default.mark((function e(){var t=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;w.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):I.default.video({inline:!0,muted:!1}).then(function(t){w.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 A.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(_=k.default(D.default.mark((function e(){var t;return D.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 _.apply(this,arguments)})},{key:"startAd",value:(b=k.default(D.default.mark((function e(t){var n,r,a;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.gameData.afg_disabled,r=t.adType,a=t.params,this.adType_=r,r!==d.AdType.Interstitial){e.next=23;break}if(!n){e.next=8;break}return e.abrupt("return",this._startInterstitialAd(a));case 8:if("preroll"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=12;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 12:if("start"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=16;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 16:if("next"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=20;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 20:return e.abrupt("return",this._startInterstitialAd(a));case 21:case 29:e.next=32;break;case 23:if(r!==d.AdType.Rewarded){e.next=31;break}if(!n){e.next=28;break}return e.abrupt("return",this._startRewardedAd(a));case 28:return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 31:throw new Error("Unsupported ad type");case 32:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"preloadAd",value:(y=k.default(D.default.mark((function e(t){return D.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 y.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){w.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new Eg(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(g=k.default(D.default.mark((function e(t){var n=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=k.default(D.default.mark((function e(r,a){var i,s,o,u,l,c,h=this;return D.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")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=u:l.appendChild(document.createTextNode(u)),s.appendChild(l)),(c=document.createElement("div")).id=o,c.classList.add("gd__banner"),s.appendChild(c)),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;w.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){w.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 g.apply(this,arguments)})},{key:"_startInterstitialAd",value:(v=k.default(D.default.mark((function e(t){var n;return D.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(Og(Og({},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 v.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(f=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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,Og({adType:d.AdType.Interstitial},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;w.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){w.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){w.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=k.default(D.default.mark((function e(t){var n;return D.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(Og(Og({},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=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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,Og({adType:d.AdType.Rewarded},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;w.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){w.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){w.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:(l=k.default(D.default.mark((function e(){return D.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 l.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(u=k.default(D.default.mark((function e(){return D.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.adsManager.setVolume(0),r&&this.eventBus.broadcast("AD_T4R"),r&&setTimeout(function(){w.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210))):"click"!==n&&"first_quartile"!==n||(this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1))}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=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(){w.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(){w.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,n=new Date,r=n.getHours(),a=n.getDate(),i=n.getMonth(),s=n.getFullYear(),o=d.getKeyByValue(google.ima.AdEvent.Type,e.type),u=!1,l=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",c=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var h="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:h="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:h="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:u=!0,h="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:h="Fired when the ad is clicked.";var p=e.getAd().getContentType();this._show({mode:"click",contentType:p});break;case google.ima.AdEvent.Type.COMPLETE:u=this._is_completed(e.getAd()),h="Fired when the ad completes playing.",this.adType_===d.AdType.Rewarded&&this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:h="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:h="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",u=!0;break;case google.ima.AdEvent.Type.DURATION_CHANGE:h="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:h="Fired when the ad playhead crosses first quartile.";var f=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:f});break;case google.ima.AdEvent.Type.IMPRESSION:h="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:h="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:h="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var m=e.getAd().getContentType();h=m,this._show({mode:"loaded",contentType:m});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(h=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:h="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:c&&this.adResume.show(),h="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:h="Fired when the ad is resumed.",c&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:h="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:u=this._is_completed(e.getAd()),h="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:h="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:h="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:u=this._is_completed(e.getAd()),h="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:h="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:h="Fired when the ad volume has been muted."}""!==o&&""!==h&&this.eventBus.broadcast(o,{name:o,message:h,status:"success",analytics:{category:o,action:this.parentDomain,label:"h".concat(r," d").concat(a," m").concat(i," y").concat(s)}}),u&&!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(){w.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(kg(e.getInnerError)){var t=e.getInnerError();if(t)return kg(t.getErrorCode)&&kg(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(w.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];c.isPlainObject(i)&&(r.query[a]=C.default.stringify(i))}var s=new R.default(r.url,!0);return P.default(s.query,r.query||{}),Og({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new R.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new R.default(e.url,!0);if(i.query.cust_params){var s=C.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&&c.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&&c.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=O.default(a),c.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=C.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 w.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,P.default(i,u),i.cust_params=C.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i,s,o,d,u,l,c,h=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(null!=e&&null!==(n=e.contentType)&&void 0!==n&&n.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return h&&("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===(l=u.rAds)||void 0===l||null===(c=l.t4r)||void 0===c?void 0:c.enabled));if(null!=e&&e.contentType.startsWith("video/")){var p,f,m,v,g,y,b,_,w,A="preroll"===h?null===(p=this.gameData)||void 0===p||null===(f=p.pAds)||void 0===f||null===(m=f.t4r)||void 0===m?void 0:m.viper:"midroll"===h?null===(v=this.gameData)||void 0===v||null===(g=v.mAds)||void 0===g||null===(y=g.t4r)||void 0===y?void 0:y.viper:"rewarded"===h?null===(b=this.gameData)||void 0===b||null===(_=b.rAds)||void 0===_||null===(w=_.t4r)||void 0===w?void 0:w.viper:0;if(A>0){var E,k,T,x,D,S,R,I,O,C=Math.random()<A;return h&&C&&("preroll"===h&&(null===(E=this.gameData)||void 0===E||null===(k=E.pAds)||void 0===k||null===(T=k.t4r)||void 0===T?void 0:T.enabled)||"midroll"===h&&(null===(x=this.gameData)||void 0===x||null===(D=x.mAds)||void 0===D||null===(S=D.t4r)||void 0===S?void 0:S.enabled)||"rewarded"===h&&(null===(R=this.gameData)||void 0===R||null===(I=R.rAds)||void 0===I||null===(O=I.t4r)||void 0===O?void 0:O.enabled))}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,l,c,h,p,f,m;if(!e)return!1;var v="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===(l=u.vmap)||void 0===l?void 0:l.enabled))||"rewarded"===e&&(!0===(null===(c=this.gameData)||void 0===c||null===(h=c.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(!v)return!1;var g=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?y>=(null==g?void 0:g.start):v}},{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,l,c,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===(l=u.dp)||void 0===l?void 0:l.enabled))||"rewarded"===e&&(!0===(null===(c=this.gameData)||void 0===c||null===(h=c.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;w.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new Ag(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 w.default(this,n),e.json()}.bind(this)).then(function(e){if(w.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){w.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=k.default(D.default.mark((function r(a){var i,s,o,d,u,l,c=this;return D.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 Ag(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,l=(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 w.default(this,c),e.json()}.bind(this)).then(function(e){if(w.default(this,c),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){w.default(this,c),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 R.default(t.vastUrl,!0);if(null===(r=a.query)||void 0===r||!r.cust_params)return;if(!C.default.parse(a.query.cust_params).tnl_asset_id)return;n.bidFloor,n.isDfpBidding;var i=S.default(n,Rg);a.query.cust_params=C.default.stringify(Og(Og({},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=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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 w.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;w.default(this,a),window.idhb.addEventListener("slotRenderEnded",function(t){var n=this;w.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){w.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){w.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=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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 w.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=k.default(D.default.mark((function e(t){var n,r,a,i,s=this;return D.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",(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=12,d.getScript("https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js","afg",{error_prefix:"Blocked:",exists:function(){return w.default(this,s),!!window.adsbygoogle}.bind(this),attrs:i});case 12:window.adsbygoogle=window.adsbygoogle||[],window.adsbygoogle.push({sound:"on",preloadAdBreaks:"auto"});case 14:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"_startAdsensePlacementRewardedAd",value:(a=k.default(D.default.mark((function e(t){var n,r,a,i,s,o,d=this;return D.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(){w.default(this,d),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){w.default(this,d),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){w.default(this,d),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){w.default(this,d),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),s=function(e){w.default(this,d),e()}.bind(this),o=function(e){w.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=k.default(D.default.mark((function e(t){var n,r=this;return D.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){w.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=k.default(D.default.mark((function e(t){var n,r,a,i=this;return D.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(){w.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){w.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){w.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=k.default(D.default.mark((function e(t){var n,r,a,i=this;return D.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(){w.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){w.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){w.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;if(n===d.AdType.Rewarded)t="reward";else if(n===d.AdType.Interstitial){var r,a;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(a=this.gameData.loader)&&void 0!==a&&a.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}e.params.position=t}}]),e}(),Lg=Array.isArray,Mg=Object.prototype.toString,jg=Lg||function(e){return!!e&&"[object Array]"==Mg.call(e)},Ug=ga,Bg=q,Ng=Da,qg=Ya,Gg=we,Fg=Er,Vg=Sr,Kg=ye,Wg=Di,zg=Ot,Hg=so,$g=vi("slice"),Qg=zg("species"),Yg=Bg.Array,Jg=Math.max;Ug({target:"Array",proto:!0,forced:!$g},{slice:function(e,t){var n,r,a,i=Kg(this),s=Vg(i),o=Fg(e,s),d=Fg(void 0===t?s:t,s);if(Ng(i)&&(n=i.constructor,(qg(n)&&(n===Yg||Ng(n.prototype))||Gg(n)&&null===(n=n[Qg]))&&(n=void 0),n===Yg||void 0===n))return Hg(i,o,d);for(r=new(void 0===n?Yg:n)(Jg(d-o,0)),a=0;o<d;o++,a++)o in i&&Wg(r,a,i[o]);return r.length=a,r}});var Xg=ln,Zg=ks,ey=Ta,ty=W,ny=ht,ry=function(e,t,n,r){try{return r?t(Xg(n)[0],n[1]):t(n)}catch(t){Zg(e,"throw",t)}},ay=ds,iy=Ya,sy=Sr,oy=Di,dy=_s,uy=ps,ly=q.Array,cy=function(e){var t=ny(e),n=iy(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=ey(a,r>2?arguments[2]:void 0));var s,o,d,u,l,c,h=uy(t),p=0;if(!h||this==ly&&ay(h))for(s=sy(t),o=n?new this(s):ly(s);s>p;p++)c=i?a(t[p],p):t[p],oy(o,p,c);else for(l=(u=dy(t,h)).next,o=n?new this:[];!(d=ty(l,u)).done;p++)c=i?ry(u,a,[d.value,p],!0):d.value,oy(o,p,c);return o.length=p,o};ga({target:"Array",stat:!0,forced:!zs((function(e){Array.from(e)}))},{from:cy});var hy,py,fy,my=!F((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),vy=q,gy=mt,yy=be,by=ht,_y=my,wy=Mn("IE_PROTO"),Ay=vy.Object,Ey=Ay.prototype,ky=_y?Ay.getPrototypeOf:function(e){var t=by(e);if(gy(t,wy))return t[wy];var n=t.constructor;return yy(n)&&t instanceof n?n.prototype:t instanceof Ay?Ey:null},Ty=F,xy=be,Dy=ky,Sy=_n.exports,Ry=Ot("iterator"),Iy=!1;[].keys&&("next"in(fy=[].keys())?(py=Dy(Dy(fy)))!==Object.prototype&&(hy=py):Iy=!0);var Oy=null==hy||Ty((function(){var e={};return hy[Ry].call(e)!==e}));Oy&&(hy={}),xy(hy[Ry])||Sy(hy,Ry,(function(){return this}));var Cy={IteratorPrototype:hy,BUGGY_SAFARI_ITERATORS:Iy},Py=Cy.IteratorPrototype,Ly=tl,My=X,jy=Yi,Uy=as,By=function(){return this},Ny=ga,qy=W,Gy=ir,Fy=be,Vy=function(e,t,n){var r=t+" Iterator";return e.prototype=Ly(Py,{next:My(1,n)}),jy(e,r,!1),Uy[r]=By,e},Ky=ky,Wy=zi,zy=Yi,Hy=bn,$y=_n.exports,Qy=as,Yy=Gy.PROPER,Jy=Gy.CONFIGURABLE,Xy=Cy.IteratorPrototype,Zy=Cy.BUGGY_SAFARI_ITERATORS,eb=Ot("iterator"),tb=function(){return this},nb=function(e,t,n,r,a,i,s){Vy(n,t,r);var o,d,u,l=function(e){if(e===a&&m)return m;if(!Zy&&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)}},c=t+" Iterator",h=!1,p=e.prototype,f=p[eb]||p["@@iterator"]||a&&p[a],m=!Zy&&f||l(a),v="Array"==t&&p.entries||f;if(v&&(o=Ky(v.call(new e)))!==Object.prototype&&o.next&&(Ky(o)!==Xy&&(Wy?Wy(o,Xy):Fy(o[eb])||$y(o,eb,tb)),zy(o,c,!0)),Yy&&"values"==a&&f&&"values"!==f.name&&(Jy?Hy(p,"name","values"):(h=!0,m=function(){return qy(f,this)})),a)if(d={values:l("values"),keys:i?m:l("keys"),entries:l("entries")},s)for(u in d)(Zy||h||!(u in p))&&$y(p,u,d[u]);else Ny({target:t,proto:!0,forced:Zy||h},d);return p[eb]!==m&&$y(p,eb,m,{name:a}),Qy[t]=m,d},rb=bp.charAt,ab=Cu,ib=Zn,sb=nb,ob=ib.set,db=ib.getterFor("String Iterator");sb(String,"String",(function(e){ob(this,{type:"String Iterator",string:ab(e),index:0})}),(function(){var e,t=db(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=rb(n,r),t.index+=e.length,{value:e,done:!1})})),wf("iterator");var ub=ye,lb=dv,cb=as,hb=Zn,pb=nb,fb=hb.set,mb=hb.getterFor("Array Iterator"),vb=pb(Array,"Array",(function(e,t){fb(this,{type:"Array Iterator",target:ub(e),index:0,kind:t})}),(function(){var e=mb(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");cb.Arguments=cb.Array,lb("keys"),lb("values"),lb("entries");var gb=q,yb=cc,bb=fc,_b=vb,wb=bn,Ab=Ot,Eb=Ab("iterator"),kb=Ab("toStringTag"),Tb=_b.values,xb=function(e,t){if(e){if(e[Eb]!==Tb)try{wb(e,Eb,Tb)}catch(t){e[Eb]=Tb}if(e[kb]||wb(e,kb,t),yb[t])for(var n in _b)if(e[n]!==_b[n])try{wb(e,n,_b[n])}catch(t){e[n]=_b[n]}}};for(var Db in yb)xb(gb[Db]&&gb[Db].prototype,Db);function Sb(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 Rb(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 Rb(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 Rb(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 Ib(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 Ob(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ib(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ib(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}xb(bb,"DOMTokenList");var Cb={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"}},Pb={},Lb=function(e,t){Pb[e]=Ob(Ob({},t),{},{isLoading:!1})},Mb=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(w.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))},jb=function(){var e=k.default(D.default.mark((function e(t){var n,r,a,i,s,o,d,u;return D.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=Pb[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Sb(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=Cb[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Mb({id:s,src:Cb[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,Mb({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)}}(),Ub=function e(t){var n=this;T.default(this,e),E.default(this,"load",k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jb(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),E.default(this,"promo",k.default(D.default.mark((function e(){return D.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},Lb(this.moduleName,this.moduleConfig)},Bb=function e(t){var n=this;T.default(this,e),E.default(this,"load",k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jb(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),E.default(this,"splash",k.default(D.default.mark((function e(){return D.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},Lb(this.moduleName,this.moduleConfig)},Nb=function(e,t){console.log(e,t)},qb={},Gb={},Fb=null;function Vb(){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 qb.version=r,qb.frame=e,qb.function=n,qb.version}function Kb(e){var t=this;return Fb||(Fb=new Promise(function(n){function r(t,r){if(Nb("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:qb,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}w.default(this,t),Vb(),qb.frame?2===qb.version?(Nb("TCF v2 CMP found. Fetching the consent."),qb.function?(Nb("CMP API is directly accessible, calling it now..."),qb.function("addEventListener",qb.version,r)):(Nb("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!==Gb[r.callId]&&Gb[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){w.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=E.default({},d,{command:e,parameter:s,callId:o,version:n});Gb[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,qb.version,n)}("addEventListener",qb.frame,r))):n({result:"cmpVersionNotV2",cmp:qb}):n({result:"cmpNotFound"})}.bind(this)),Fb)}var Wb=new(function(){function e(){T.default(this,e),this.productName="Game Distribution"}var t;return x.default(e,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(t=k.default(D.default.mark((function e(t,n){var r,a,i,s,o,d;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(a=null==t||null===(r=t.visitor)||void 0===r?void 0:r.visitorId){e.next=6;break}return e.abrupt("return");case 6:return i=encodeURIComponent(this.productName),s=encodeURIComponent(a),e.prev=8,o="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=12,fetch(o,{method:"POST"});case 12:e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=22,fetch(d,{method:"POST"});case 22:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function zb(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return j.default(n,e)}function d(e,t){return U.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new R.default(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),L.default.isURL(o)))return o}}}return function(){var e;w.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(M.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?M.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}function Hb(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 $b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hb(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qb=null,Yb=null,Jb=function(){function e(t){var n=this;if(T.default(this,e),Qb)return Qb;Qb=this,this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new zb,this._location.print(),this._parentURL=this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){w.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){w.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e=this;w.default(this,n),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),window.addEventListener("DOMNodeInserted",function(){if(w.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,l,c;return x.default(e,[{key:"testConsent",value:function(){console.log("test-consent. Finding CMP");try{var e=Vb();console.log("CMP found",e),k.default(D.default.mark((function e(){var t;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kb({});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._sendEvent("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:(c=k.default(D.default.mark((function e(t,n){var r,a=this;return D.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 w.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 c.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=O.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=Wv.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){"undefined"===this._topDomain&&(this._topDomain=void 0);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(C.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:Wv.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.4.0/script/gamedock-sdk.min.js"];d.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;w.default(this,e),Yb=this._initGamedockTracker(window.GamedockSDK),this._sendEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&Yb.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"}),Wb.track(Yb,this._gameData),this._gameData.loader.enabled||this._sendLoadedEvent()}.bind(this)).catch(function(t){w.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendEvent",value:function(e){Yb.tracking.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];d.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){w.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 w.default(this,e),window.ga}.bind(this)}).then(function(){w.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){w.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 w.default(this,e),this.eventBus.subscribe(t,function(e){return w.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),d.IMAEvents.forEach(function(t){var n=this;return w.default(this,e),this.eventBus.subscribe(t,function(e){return w.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(w.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 w.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;w.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&Wb.track(Yb,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){w.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){w.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){w.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){w.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){w.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 w.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(Wv.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(l=k.default(D.default.mark((function e(){var t,n,r=this;return D.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(){w.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(C.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 l.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(){w.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,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(u=k.default(D.default.mark((function e(){var t;return D.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 Pg(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=Wv,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return 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;w.default(this,e);var r=this._getDefaultGameData(),a=this._getGameDataUrl();fetch(a).then(function(e){return w.default(this,n),e.json()}.bind(this)).then(function(e){if(w.default(this,n),e.success){var a,i,s,o,u=e.result.game,l={gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,description:u.description,enableAds:!0===u.enableAds||!0===(null===(a=u.enableAds)||void 0===a?void 0:a.enabled),preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,block_exts:this._parseAndSelectRandomOne(u.push_cuda),bloc_gard:this._parseAndSelectRandomOne(u.bloc_gard),cookie:this._parseAndSelectRandomOne(u.cookie),gdpr:this._parseAndSelectRandomOne(u.gdpr),diagnostic:this._parseAndSelectRandomOne(u.diagnostic),sdk:this._parseAndSelectRandomOne(u.sdk)||{},loader:this._parseAndSelectRandomOne(u.loader)||{},splash:this._parseAndSelectRandomOne(u.splash)||{},promo:this._parseAndSelectRandomOne(u.promo)||{},dAds:this._parseAndSelectRandomOne(u.dads)||{},pAds:this._parseAndSelectRandomOne(u.pads)||{},mAds:this._parseAndSelectRandomOne(u.mads)||{},rAds:this._parseAndSelectRandomOne(u.rads)||{}},c=d.extendDefaults(O.default(r),l);c.afg_disabled=!1===(null===(i=c.sdk)||void 0===i||null===(s=i.afg)||void 0===s?void 0:s.enabled),null!==(o=c.pAds)&&void 0!==o&&o.enabled&&(c.preroll=!0),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){w.default(this,n),r.failed=!0,t(r)}.bind(this))}.bind(this))}},{key:"_createSplash",value:(o=k.default(D.default.mark((function e(t,n){var r,a,i=this;return D.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($b($b({},this.options),{},{isConsentDomain:n,version:Wv.version}),t,this._parentDomain)).on("playClick",function(){var e=this;if(w.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){w.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(){w.default(this,i),a.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){w.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=k.default(D.default.mark((function e(t,n){var r,a,i,s,o=this;return D.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($b($b({},this.options),{},{isConsentDomain:n,version:Wv.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){w.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=k.default(D.default.mark((function e(t,n){var r,a,i,s,o=this;return D.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($b($b({},this.options),{},{isConsentDomain:n,version:Wv.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){w.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(){w.default(this,e)}.bind(this))}},{key:"showAd",value:(a=k.default(D.default.mark((function e(t){var n,r=this,a=arguments;return D.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=k.default(D.default.mark((function e(a,i){var s,o,d,u,l,c,h,p,f,m,v,g,y,b=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,p={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=4,r.sdkReady;case 4:return f=e.sent,e.next=7,r.videoAdReady;case 7:return r._sendLoadedEvent(),r._rejectAdIfGameBlocked({gameData:f,adRequest:p}),r._rejectAdIfAdDisabled({gameData:f,adRequest:p}),r._rejectAdIfUnsupportedType({adRequest:p}),r._rejectAdIfRewardedDisabled({gameData:f,adRequest:p}),(null===(s=f.mAds)||void 0===s||null===(o=s.gift)||void 0===o||!o.enabled||null!==(d=f.mAds)&&void 0!==d&&null!==(u=d.gift)&&void 0!==u&&u.enabled&&(null==f||null===(l=f.mAds)||void 0===l||null===(c=l.gift)||void 0===c||null===(h=c.durations[r._giftCount])||void 0===h?void 0:h.after)!==r.adInstance.adMidrollCount)&&r._rejectAdIfAdRateHits({gameData:f,adRequest:p}),r.adInstance.attachAfgPosition(p),r._attachAfgFallback({gameData:f,adRequest:p}),m="main.showad",v=function(e){var t,n,a,s,o;w.default(this,b),r.eventBus.unsubscribeScope(m),r.onResumeGame(e.message,"warning"),null!=f&&null!==(t=f.mAds)&&void 0!==t&&null!==(n=t.gift)&&void 0!==n&&n.enabled&&(null==f||null===(a=f.mAds)||void 0===a||null===(s=a.gift)||void 0===s||null===(o=s.durations[r._giftCount])||void 0===o?void 0:o.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),i(e.message)}.bind(this),g=function(e){var t,n,i,s,o;w.default(this,b),r.eventBus.unsubscribeScope(m),r.adRequestTimer=Date.now(),r.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),null!=f&&null!==(t=f.mAds)&&void 0!==t&&null!==(n=t.gift)&&void 0!==n&&n.enabled&&(null==f||null===(i=f.mAds)||void 0===i||null===(s=i.gift)||void 0===s||null===(o=s.durations[r._giftCount])||void 0===o?void 0:o.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),a(e.message)}.bind(this),y=function(e){var s=this;w.default(this,b),r.eventBus.unsubscribeScope(m),n.fallback_adsense=!1,r.showAd(t,$b($b({},n),{},{adapter:"adsense"})).then(function(e){w.default(this,s),a(e)}.bind(this)).catch(function(e){w.default(this,s),i(e)}.bind(this))}.bind(this),r.eventBus.subscribe("AD_ERROR",null!=n&&n.fallback_adsense?y:v,m),r.eventBus.subscribe("AD_SDK_CANCELED",null!=n&&n.fallback_adsense?y:v,m),r.eventBus.subscribe("AD_SUCCESS",g,m),e.next=24,r.adInstance.startAd(p);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,n,r,a,i,s,o=e.gameData,u=e.adRequest,l=null;u.adType===d.AdType.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(a=r.useMidrollIndex)||void 0===a?void 0:a.indexes.length)-1||(l=6e4*(null===(i=o.diagnostic)||void 0===i||null===(s=i.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):l=o.midroll;if(u.adType===d.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<l)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=k.default(D.default.mark((function e(t){var n=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=k.default(D.default.mark((function e(r,a){var i,s;return D.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=k.default(D.default.mark((function e(){var t=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=k.default(D.default.mark((function e(n,r){return D.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=k.default(D.default.mark((function n(r,a){var i;return D.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(w.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){w.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;w.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 w.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var a=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:d.getParentUrl()),i=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:d.getParentDomain()),s=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===d.getIframeDepth()?i:d.getTopDomain()),o=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:o,noLoadedEvent:u,noBlockerEvent:l,noPreroll:m,parentURL:a,parentDomain:i,topDomain:s&&s.length?s:i,noGAPageView:c,noLotamePageView:h,noGamedockSDK:p,noMinijuegosSDK:f,version:r.version,pauseGameOnStartup:v,depth:d.getIframeDepth(),domainMatched:i===s,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 R.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 R.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new R.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 Bb(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=k.default(D.default.mark((function e(t){var n,r,a,i,s;return D.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 Ub(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 R.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(C.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new R.default(e,!0);return n.query=$b($b({},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"===A.default(e)?e:d.parseJSON(e));return t&&t.version?Wv.version>=t.version?t:void 0:t}},{key:"_selectRandomOne",value:function(e){var t=this;if(!jg(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){w.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=k.default(D.default.mark((function t(n,r){var a;return D.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 w.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var e=this;try{var t,n,r=null===(t=this._gameData)||void 0===t||null===(n=t.mAds)||void 0===n?void 0:n.gift;this.giftInterval=setInterval(k.default(D.default.mark((function t(){var n=this;return D.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning?console.log("Advertisement already running..."):(e.showAd(d.AdType.Interstitial,{position:"midroll"}).catch(function(e){w.default(this,n)}.bind(this)),clearInterval(e.giftInterval),e.giftInterval=void 0,e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*r.durations[this._giftCount].wait)}catch(e){console.log("Advertisement Error...")}}}]),e}(),Xb=new function e(){var t=this;T.default(this,e),E.default(this,"load",k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jb("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),E.default(this,"showLeaderboard",function(){var e=k.default(D.default.mark((function e(n){var r;return D.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)}}()),E.default(this,"addScore",function(){var e=k.default(D.default.mark((function e(n){return D.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"]},Lb(this.moduleName,this.moduleConfig)},Zb=new Jb(function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":A.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===A.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 e_(){var e=this;this.AdType=d.AdType,this.preloadAd=function(e){return Zb.preloadAd(e)},this.showAd=function(e,t){return e===d.AdType.Display?Zb.showDisplayAd(t):Zb.showAd(e)},this.cancelAd=function(){return Zb.cancelAd()},this.openConsole=function(){Zb.openConsole()},this.getSession=function(){return Zb.session()},this.leaderboard={show:function(){w.default(this,e),Xb.showLeaderboard()}.bind(this),addScore:function(t){w.default(this,e),Xb.addScore(t)}.bind(this)}}e_.prototype=new function(){this.showBanner=function(){Zb.showBanner()},this.play=function(){},this.customLog=function(){}},window.gdsdk=new e_,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"),l=require("can-autoplay"),c=require("is-plain-object"),h=require("lodash.clonedeep"),p=require("querystringify"),f=require("lodash.merge"),m=require("js-base64"),v=require("validator"),g=require("is-valid-domain"),y=require("get-value"),b=require("set-value");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var w=_(e),A=_(t),E=_(n),k=_(r),x=_(a),T=_(i),D=_(s),S=_(o),R=_(u),O=_(l),I=_(h),C=_(p),P=_(f),L=_(v),M=_(g),j=_(y),U=_(b),B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},N=function(e){return e&&e.Math==Math&&e},G=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof B&&B)||function(){return this}()||Function("return this")(),q={},F=function(e){try{return!!e()}catch(e){return!0}},V=!F((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),K=Function.prototype.call,W=K.bind?K.bind(K):function(){return K.apply(K,arguments)},z={},H={}.propertyIsEnumerable,$=Object.getOwnPropertyDescriptor,Q=$&&!H.call({1:2},1);z.f=Q?function(e){var t=$(this,e);return!!t&&t.enumerable}:H;var Y,J,X=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Z=Function.prototype,ee=Z.bind,te=Z.call,ne=ee&&ee.bind(te),re=ee?function(e){return e&&ne(te,e)}:function(e){return e&&function(){return te.apply(e,arguments)}},ae=re,ie=ae({}.toString),se=ae("".slice),oe=function(e){return se(ie(e),8,-1)},de=re,ue=F,le=oe,ce=G.Object,he=de("".split),pe=ue((function(){return!ce("z").propertyIsEnumerable(0)}))?function(e){return"String"==le(e)?he(e,""):ce(e)}:ce,fe=G.TypeError,me=function(e){if(null==e)throw fe("Can't call method on "+e);return e},ve=pe,ge=me,ye=function(e){return ve(ge(e))},be=function(e){return"function"==typeof e},_e=be,we=function(e){return"object"==typeof e?null!==e:_e(e)},Ae=G,Ee=be,ke=function(e){return Ee(e)?e:void 0},xe=function(e,t){return arguments.length<2?ke(Ae[e]):Ae[e]&&Ae[e][t]},Te=re({}.isPrototypeOf),De=xe("navigator","userAgent")||"",Se=G,Re=De,Oe=Se.process,Ie=Se.Deno,Ce=Oe&&Oe.versions||Ie&&Ie.version,Pe=Ce&&Ce.v8;Pe&&(J=(Y=Pe.split("."))[0]>0&&Y[0]<4?1:+(Y[0]+Y[1])),!J&&Re&&(!(Y=Re.match(/Edge\/(\d+)/))||Y[1]>=74)&&(Y=Re.match(/Chrome\/(\d+)/))&&(J=+Y[1]);var Le=J,Me=Le,je=F,Ue=!!Object.getOwnPropertySymbols&&!je((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Me&&Me<41})),Be=Ue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ne=xe,Ge=be,qe=Te,Fe=Be,Ve=G.Object,Ke=Fe?function(e){return"symbol"==typeof e}:function(e){var t=Ne("Symbol");return Ge(t)&&qe(t.prototype,Ve(e))},We=G.String,ze=function(e){try{return We(e)}catch(e){return"Object"}},He=be,$e=ze,Qe=G.TypeError,Ye=function(e){if(He(e))return e;throw Qe($e(e)+" is not a function")},Je=Ye,Xe=function(e,t){var n=e[t];return null==n?void 0:Je(n)},Ze=W,et=be,tt=we,nt=G.TypeError,rt={exports:{}},at=G,it=Object.defineProperty,st=function(e,t){try{it(at,e,{value:t,configurable:!0,writable:!0})}catch(n){at[e]=t}return t},ot=st,dt=G["__core-js_shared__"]||ot("__core-js_shared__",{}),ut=dt;(rt.exports=function(e,t){return ut[e]||(ut[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var lt=me,ct=G.Object,ht=function(e){return ct(lt(e))},pt=ht,ft=re({}.hasOwnProperty),mt=Object.hasOwn||function(e,t){return ft(pt(e),t)},vt=re,gt=0,yt=Math.random(),bt=vt(1..toString),_t=function(e){return"Symbol("+(void 0===e?"":e)+")_"+bt(++gt+yt,36)},wt=G,At=rt.exports,Et=mt,kt=_t,xt=Ue,Tt=Be,Dt=At("wks"),St=wt.Symbol,Rt=St&&St.for,Ot=Tt?St:St&&St.withoutSetter||kt,It=function(e){if(!Et(Dt,e)||!xt&&"string"!=typeof Dt[e]){var t="Symbol."+e;xt&&Et(St,e)?Dt[e]=St[e]:Dt[e]=Tt&&Rt?Rt(t):Ot(t)}return Dt[e]},Ct=W,Pt=we,Lt=Ke,Mt=Xe,jt=function(e,t){var n,r;if("string"===t&&et(n=e.toString)&&!tt(r=Ze(n,e)))return r;if(et(n=e.valueOf)&&!tt(r=Ze(n,e)))return r;if("string"!==t&&et(n=e.toString)&&!tt(r=Ze(n,e)))return r;throw nt("Can't convert object to primitive value")},Ut=It,Bt=G.TypeError,Nt=Ut("toPrimitive"),Gt=function(e,t){if(!Pt(e)||Lt(e))return e;var n,r=Mt(e,Nt);if(r){if(void 0===t&&(t="default"),n=Ct(r,e,t),!Pt(n)||Lt(n))return n;throw Bt("Can't convert object to primitive value")}return void 0===t&&(t="number"),jt(e,t)},qt=Ke,Ft=function(e){var t=Gt(e,"string");return qt(t)?t:t+""},Vt=we,Kt=G.document,Wt=Vt(Kt)&&Vt(Kt.createElement),zt=function(e){return Wt?Kt.createElement(e):{}},Ht=zt,$t=!V&&!F((function(){return 7!=Object.defineProperty(Ht("div"),"a",{get:function(){return 7}}).a})),Qt=V,Yt=W,Jt=z,Xt=X,Zt=ye,en=Ft,tn=mt,nn=$t,rn=Object.getOwnPropertyDescriptor;q.f=Qt?rn:function(e,t){if(e=Zt(e),t=en(t),nn)try{return rn(e,t)}catch(e){}if(tn(e,t))return Xt(!Yt(Jt.f,e,t),e[t])};var an={},sn=G,on=we,dn=sn.String,un=sn.TypeError,ln=function(e){if(on(e))return e;throw un(dn(e)+" is not an object")},cn=V,hn=$t,pn=ln,fn=Ft,mn=G.TypeError,vn=Object.defineProperty;an.f=cn?vn:function(e,t,n){if(pn(e),t=fn(t),pn(n),hn)try{return vn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw mn("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var gn=an,yn=X,bn=V?function(e,t,n){return gn.f(e,t,yn(1,n))}:function(e,t,n){return e[t]=n,e},_n={exports:{}},wn=be,An=dt,En=re(Function.toString);wn(An.inspectSource)||(An.inspectSource=function(e){return En(e)});var kn,xn,Tn,Dn=An.inspectSource,Sn=be,Rn=Dn,On=G.WeakMap,In=Sn(On)&&/native code/.test(Rn(On)),Cn=rt.exports,Pn=_t,Ln=Cn("keys"),Mn=function(e){return Ln[e]||(Ln[e]=Pn(e))},jn={},Un=In,Bn=G,Nn=re,Gn=we,qn=bn,Fn=mt,Vn=dt,Kn=Mn,Wn=jn,zn=Bn.TypeError,Hn=Bn.WeakMap;if(Un||Vn.state){var $n=Vn.state||(Vn.state=new Hn),Qn=Nn($n.get),Yn=Nn($n.has),Jn=Nn($n.set);kn=function(e,t){if(Yn($n,e))throw new zn("Object already initialized");return t.facade=e,Jn($n,e,t),t},xn=function(e){return Qn($n,e)||{}},Tn=function(e){return Yn($n,e)}}else{var Xn=Kn("state");Wn[Xn]=!0,kn=function(e,t){if(Fn(e,Xn))throw new zn("Object already initialized");return t.facade=e,qn(e,Xn,t),t},xn=function(e){return Fn(e,Xn)?e[Xn]:{}},Tn=function(e){return Fn(e,Xn)}}var Zn={set:kn,get:xn,has:Tn,enforce:function(e){return Tn(e)?xn(e):kn(e,{})},getterFor:function(e){return function(t){var n;if(!Gn(t)||(n=xn(t)).type!==e)throw zn("Incompatible receiver, "+e+" required");return n}}},er=V,tr=mt,nr=Function.prototype,rr=er&&Object.getOwnPropertyDescriptor,ar=tr(nr,"name"),ir={EXISTS:ar,PROPER:ar&&"something"===function(){}.name,CONFIGURABLE:ar&&(!er||er&&rr(nr,"name").configurable)},sr=G,or=be,dr=mt,ur=bn,lr=st,cr=Dn,hr=ir.CONFIGURABLE,pr=Zn.get,fr=Zn.enforce,mr=String(String).split("String");(_n.exports=function(e,t,n,r){var a,i=!!r&&!!r.unsafe,s=!!r&&!!r.enumerable,o=!!r&&!!r.noTargetGet,d=r&&void 0!==r.name?r.name:t;or(n)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!dr(n,"name")||hr&&n.name!==d)&&ur(n,"name",d),(a=fr(n)).source||(a.source=mr.join("string"==typeof d?d:""))),e!==sr?(i?!o&&e[t]&&(s=!0):delete e[t],s?e[t]=n:ur(e,t,n)):s?e[t]=n:lr(t,n)})(Function.prototype,"toString",(function(){return or(this)&&pr(this).source||cr(this)}));var vr={},gr=Math.ceil,yr=Math.floor,br=function(e){var t=+e;return t!=t||0===t?0:(t>0?yr:gr)(t)},_r=br,wr=Math.max,Ar=Math.min,Er=function(e,t){var n=_r(e);return n<0?wr(n+t,0):Ar(n,t)},kr=br,xr=Math.min,Tr=function(e){return e>0?xr(kr(e),9007199254740991):0},Dr=Tr,Sr=function(e){return Dr(e.length)},Rr=ye,Or=Er,Ir=Sr,Cr=function(e){return function(t,n,r){var a,i=Rr(t),s=Ir(i),o=Or(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}},Pr={includes:Cr(!0),indexOf:Cr(!1)},Lr=mt,Mr=ye,jr=Pr.indexOf,Ur=jn,Br=re([].push),Nr=function(e,t){var n,r=Mr(e),a=0,i=[];for(n in r)!Lr(Ur,n)&&Lr(r,n)&&Br(i,n);for(;t.length>a;)Lr(r,n=t[a++])&&(~jr(i,n)||Br(i,n));return i},Gr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qr=Nr,Fr=Gr.concat("length","prototype");vr.f=Object.getOwnPropertyNames||function(e){return qr(e,Fr)};var Vr={};Vr.f=Object.getOwnPropertySymbols;var Kr=xe,Wr=vr,zr=Vr,Hr=ln,$r=re([].concat),Qr=Kr("Reflect","ownKeys")||function(e){var t=Wr.f(Hr(e)),n=zr.f;return n?$r(t,n(e)):t},Yr=mt,Jr=Qr,Xr=q,Zr=an,ea=function(e,t){for(var n=Jr(t),r=Zr.f,a=Xr.f,i=0;i<n.length;i++){var s=n[i];Yr(e,s)||r(e,s,a(t,s))}},ta=F,na=be,ra=/#|\.prototype\./,aa=function(e,t){var n=sa[ia(e)];return n==da||n!=oa&&(na(t)?ta(t):!!t)},ia=aa.normalize=function(e){return String(e).replace(ra,".").toLowerCase()},sa=aa.data={},oa=aa.NATIVE="N",da=aa.POLYFILL="P",ua=aa,la=G,ca=q.f,ha=bn,pa=_n.exports,fa=st,ma=ea,va=ua,ga=function(e,t){var n,r,a,i,s,o=e.target,d=e.global,u=e.stat;if(n=d?la:u?la[o]||fa(o,{}):(la[o]||{}).prototype)for(r in t){if(i=t[r],a=e.noTargetGet?(s=ca(n,r))&&s.value:n[r],!va(d?r:o+(u?".":"#")+r,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;ma(i,a)}(e.sham||a&&a.sham)&&ha(i,"sham",!0),pa(n,r,i,e)}},ya=Nr,ba=Gr,_a=Object.keys||function(e){return ya(e,ba)},wa=ht,Aa=_a;ga({target:"Object",stat:!0,forced:F((function(){Aa(1)}))},{keys:function(e){return Aa(wa(e))}});var Ea=Ye,ka=re(re.bind),xa=function(e,t){return Ea(e),void 0===t?e:ka?ka(e,t):function(){return e.apply(t,arguments)}},Ta=oe,Da=Array.isArray||function(e){return"Array"==Ta(e)},Sa={};Sa[It("toStringTag")]="z";var Ra="[object z]"===String(Sa),Oa=G,Ia=Ra,Ca=be,Pa=oe,La=It("toStringTag"),Ma=Oa.Object,ja="Arguments"==Pa(function(){return arguments}()),Ua=Ia?Pa: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=Ma(e),La))?n:ja?Pa(t):"Object"==(r=Pa(t))&&Ca(t.callee)?"Arguments":r},Ba=re,Na=F,Ga=be,qa=Ua,Fa=Dn,Va=function(){},Ka=[],Wa=xe("Reflect","construct"),za=/^\s*(?:class|function)\b/,Ha=Ba(za.exec),$a=!za.exec(Va),Qa=function(e){if(!Ga(e))return!1;try{return Wa(Va,Ka,e),!0}catch(e){return!1}},Ya=!Wa||Na((function(){var e;return Qa(Qa.call)||!Qa(Object)||!Qa((function(){e=!0}))||e}))?function(e){if(!Ga(e))return!1;switch(qa(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return $a||!!Ha(za,Fa(e))}:Qa,Ja=G,Xa=Da,Za=Ya,ei=we,ti=It("species"),ni=Ja.Array,ri=function(e){var t;return Xa(e)&&(t=e.constructor,(Za(t)&&(t===ni||Xa(t.prototype))||ei(t)&&null===(t=t[ti]))&&(t=void 0)),void 0===t?ni:t},ai=function(e,t){return new(ri(e))(0===t?0:t)},ii=xa,si=pe,oi=ht,di=Sr,ui=ai,li=re([].push),ci=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,l,c){for(var h,p,f=oi(d),m=si(f),v=ii(u,l),g=di(m),y=0,b=c||ui,_=t?b(d,g):n||s?b(d,0):void 0;g>y;y++)if((o||y in m)&&(p=v(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:li(_,h)}else switch(e){case 4:return!1;case 7:li(_,h)}return i?-1:r||a?a:_}},hi={forEach:ci(0),map:ci(1),filter:ci(2),some:ci(3),every:ci(4),find:ci(5),findIndex:ci(6),filterReject:ci(7)},pi=F,fi=Le,mi=It("species"),vi=function(e){return fi>=51||!pi((function(){var t=[];return(t.constructor={})[mi]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},gi=hi.filter;ga({target:"Array",proto:!0,forced:!vi("filter")},{filter:function(e){return gi(this,e,arguments.length>1?arguments[1]:void 0)}});var yi=ga,bi=F,_i=ye,wi=q.f,Ai=V,Ei=bi((function(){wi(1)}));yi({target:"Object",stat:!0,forced:!Ai||Ei,sham:!Ai},{getOwnPropertyDescriptor:function(e,t){return wi(_i(e),t)}});var ki=Ft,xi=an,Ti=X,Di=function(e,t,n){var r=ki(t);r in e?xi.f(e,r,Ti(0,n)):e[r]=n},Si=Qr,Ri=ye,Oi=q,Ii=Di;ga({target:"Object",stat:!0,sham:!V},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Ri(e),a=Oi.f,i=Si(r),s={},o=0;i.length>o;)void 0!==(n=a(r,t=i[o++]))&&Ii(s,t,n);return s}});var Ci=Ua,Pi=Ra?{}.toString:function(){return"[object "+Ci(this)+"]"},Li=Ra,Mi=_n.exports,ji=Pi;Li||Mi(Object.prototype,"toString",ji,{unsafe:!0});var Ui=G.Promise,Bi=_n.exports,Ni=G,Gi=be,qi=Ni.String,Fi=Ni.TypeError,Vi=re,Ki=ln,Wi=function(e){if("object"==typeof e||Gi(e))return e;throw Fi("Can't set "+qi(e)+" as a prototype")},zi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Vi(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ki(n),Wi(r),t?e(n,r):n.__proto__=r,n}}():void 0),Hi=an.f,$i=mt,Qi=It("toStringTag"),Yi=function(e,t,n){e&&!$i(e=n?e:e.prototype,Qi)&&Hi(e,Qi,{configurable:!0,value:t})},Ji=xe,Xi=an,Zi=V,es=It("species"),ts=function(e){var t=Ji(e),n=Xi.f;Zi&&t&&!t[es]&&n(t,es,{configurable:!0,get:function(){return this}})},ns=Te,rs=G.TypeError,as={},is=as,ss=It("iterator"),os=Array.prototype,ds=function(e){return void 0!==e&&(is.Array===e||os[ss]===e)},us=Ua,ls=Xe,cs=as,hs=It("iterator"),ps=function(e){if(null!=e)return ls(e,hs)||ls(e,"@@iterator")||cs[us(e)]},fs=W,ms=Ye,vs=ln,gs=ze,ys=ps,bs=G.TypeError,_s=function(e,t){var n=arguments.length<2?ys(e):t;if(ms(n))return vs(fs(n,e));throw bs(gs(e)+" is not iterable")},ws=W,As=ln,Es=Xe,ks=function(e,t,n){var r,a;As(e);try{if(!(r=Es(e,"return"))){if("throw"===t)throw n;return n}r=ws(r,e)}catch(e){a=!0,r=e}if("throw"===t)throw n;if(a)throw r;return As(r),n},xs=xa,Ts=W,Ds=ln,Ss=ze,Rs=ds,Os=Sr,Is=Te,Cs=_s,Ps=ps,Ls=ks,Ms=G.TypeError,js=function(e,t){this.stopped=e,this.result=t},Us=js.prototype,Bs=It("iterator"),Ns=!1;try{var Gs=0,qs={next:function(){return{done:!!Gs++}},return:function(){Ns=!0}};qs[Bs]=function(){return this},Array.from(qs,(function(){throw 2}))}catch(e){}var Fs,Vs,Ks,Ws,zs=function(e,t){if(!t&&!Ns)return!1;var n=!1;try{var r={};r[Bs]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Hs=Ya,$s=ze,Qs=G.TypeError,Ys=ln,Js=function(e){if(Hs(e))return e;throw Qs($s(e)+" is not a constructor")},Xs=It("species"),Zs=function(e,t){var n,r=Ys(e).constructor;return void 0===r||null==(n=Ys(r)[Xs])?t:Js(n)},eo=Function.prototype,to=eo.apply,no=eo.bind,ro=eo.call,ao="object"==typeof Reflect&&Reflect.apply||(no?ro.bind(to):function(){return ro.apply(to,arguments)}),io=xe("document","documentElement"),so=re([].slice),oo=/(?:ipad|iphone|ipod).*applewebkit/i.test(De),uo="process"==oe(G.process),lo=G,co=ao,ho=xa,po=be,fo=mt,mo=F,vo=io,go=so,yo=zt,bo=oo,_o=uo,wo=lo.setImmediate,Ao=lo.clearImmediate,Eo=lo.process,ko=lo.Dispatch,xo=lo.Function,To=lo.MessageChannel,Do=lo.String,So=0,Ro={};try{Fs=lo.location}catch(e){}var Oo=function(e){if(fo(Ro,e)){var t=Ro[e];delete Ro[e],t()}},Io=function(e){return function(){Oo(e)}},Co=function(e){Oo(e.data)},Po=function(e){lo.postMessage(Do(e),Fs.protocol+"//"+Fs.host)};wo&&Ao||(wo=function(e){var t=go(arguments,1);return Ro[++So]=function(){co(po(e)?e:xo(e),void 0,t)},Vs(So),So},Ao=function(e){delete Ro[e]},_o?Vs=function(e){Eo.nextTick(Io(e))}:ko&&ko.now?Vs=function(e){ko.now(Io(e))}:To&&!bo?(Ws=(Ks=new To).port2,Ks.port1.onmessage=Co,Vs=ho(Ws.postMessage,Ws)):lo.addEventListener&&po(lo.postMessage)&&!lo.importScripts&&Fs&&"file:"!==Fs.protocol&&!mo(Po)?(Vs=Po,lo.addEventListener("message",Co,!1)):Vs="onreadystatechange"in yo("script")?function(e){vo.appendChild(yo("script")).onreadystatechange=function(){vo.removeChild(this),Oo(e)}}:function(e){setTimeout(Io(e),0)});var Lo,Mo,jo,Uo,Bo,No,Go,qo,Fo={set:wo,clear:Ao},Vo=G,Ko=/ipad|iphone|ipod/i.test(De)&&void 0!==Vo.Pebble,Wo=/web0s(?!.*chrome)/i.test(De),zo=G,Ho=xa,$o=q.f,Qo=Fo.set,Yo=oo,Jo=Ko,Xo=Wo,Zo=uo,ed=zo.MutationObserver||zo.WebKitMutationObserver,td=zo.document,nd=zo.process,rd=zo.Promise,ad=$o(zo,"queueMicrotask"),id=ad&&ad.value;id||(Lo=function(){var e,t;for(Zo&&(e=nd.domain)&&e.exit();Mo;){t=Mo.fn,Mo=Mo.next;try{t()}catch(e){throw Mo?Uo():jo=void 0,e}}jo=void 0,e&&e.enter()},Yo||Zo||Xo||!ed||!td?!Jo&&rd&&rd.resolve?((Go=rd.resolve(void 0)).constructor=rd,qo=Ho(Go.then,Go),Uo=function(){qo(Lo)}):Zo?Uo=function(){nd.nextTick(Lo)}:(Qo=Ho(Qo,zo),Uo=function(){Qo(Lo)}):(Bo=!0,No=td.createTextNode(""),new ed(Lo).observe(No,{characterData:!0}),Uo=function(){No.data=Bo=!Bo}));var sd=id||function(e){var t={fn:e,next:void 0};jo&&(jo.next=t),Mo||(Mo=t,Uo()),jo=t},od={},dd=Ye,ud=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=dd(t),this.reject=dd(n)};od.f=function(e){return new ud(e)};var ld,cd,hd,pd,fd=ln,md=we,vd=od,gd=function(e,t){if(fd(e),md(t)&&t.constructor===e)return t;var n=vd.f(e);return(0,n.resolve)(t),n.promise},yd=G,bd="object"==typeof window,_d=ga,wd=G,Ad=xe,Ed=W,kd=Ui,xd=_n.exports,Td=function(e,t,n){for(var r in t)Bi(e,r,t[r],n);return e},Dd=zi,Sd=Yi,Rd=ts,Od=Ye,Id=be,Cd=we,Pd=function(e,t){if(ns(t,e))return e;throw rs("Incorrect invocation")},Ld=Dn,Md=function(e,t,n){var r,a,i,s,o,d,u,l=n&&n.that,c=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),f=xs(t,l),m=function(e){return r&&Ls(r,"normal",e),new js(!0,e)},v=function(e){return c?(Ds(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(!(a=Ps(e)))throw Ms(Ss(e)+" is not iterable");if(Rs(a)){for(i=0,s=Os(e);s>i;i++)if((o=v(e[i]))&&Is(Us,o))return o;return new js(!1)}r=Cs(e,a)}for(d=r.next;!(u=Ts(d,r)).done;){try{o=v(u.value)}catch(e){Ls(r,"throw",e)}if("object"==typeof o&&o&&Is(Us,o))return o}return new js(!1)},jd=zs,Ud=Zs,Bd=Fo.set,Nd=sd,Gd=gd,qd=function(e,t){var n=yd.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},Fd=od,Vd=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Kd=Zn,Wd=ua,zd=bd,Hd=uo,$d=Le,Qd=It("species"),Yd=Kd.get,Jd=Kd.set,Xd=Kd.getterFor("Promise"),Zd=kd&&kd.prototype,eu=kd,tu=Zd,nu=wd.TypeError,ru=wd.document,au=wd.process,iu=Fd.f,su=iu,ou=!!(ru&&ru.createEvent&&wd.dispatchEvent),du=Id(wd.PromiseRejectionEvent),uu=!1,lu=Wd("Promise",(function(){var e=Ld(eu),t=e!==String(eu);if(!t&&66===$d)return!0;if($d>=51&&/native code/.test(e))return!1;var n=new eu((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[Qd]=r,!(uu=n.then((function(){}))instanceof r)||!t&&zd&&!du})),cu=lu||!jd((function(e){eu.all(e).catch((function(){}))})),hu=function(e){var t;return!(!Cd(e)||!Id(t=e.then))&&t},pu=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;Nd((function(){for(var r=e.value,a=1==e.state,i=0;n.length>i;){var s,o,d,u=n[i++],l=a?u.ok:u.fail,c=u.resolve,h=u.reject,p=u.domain;try{l?(a||(2===e.rejection&&gu(e),e.rejection=1),!0===l?s=r:(p&&p.enter(),s=l(r),p&&(p.exit(),d=!0)),s===u.promise?h(nu("Promise-chain cycle")):(o=hu(s))?Ed(o,s,c,h):c(s)):h(r)}catch(e){p&&!d&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&mu(e)}))}},fu=function(e,t,n){var r,a;ou?((r=ru.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),wd.dispatchEvent(r)):r={promise:t,reason:n},!du&&(a=wd["on"+e])?a(r):"unhandledrejection"===e&&qd("Unhandled promise rejection",n)},mu=function(e){Ed(Bd,wd,(function(){var t,n=e.facade,r=e.value;if(vu(e)&&(t=Vd((function(){Hd?au.emit("unhandledRejection",r,n):fu("unhandledrejection",n,r)})),e.rejection=Hd||vu(e)?2:1,t.error))throw t.value}))},vu=function(e){return 1!==e.rejection&&!e.parent},gu=function(e){Ed(Bd,wd,(function(){var t=e.facade;Hd?au.emit("rejectionHandled",t):fu("rejectionhandled",t,e.value)}))},yu=function(e,t,n){return function(r){e(t,r,n)}},bu=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,pu(e,!0))},_u=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw nu("Promise can't be resolved itself");var r=hu(t);r?Nd((function(){var n={done:!1};try{Ed(r,t,yu(_u,n,e),yu(bu,n,e))}catch(t){bu(n,t,e)}})):(e.value=t,e.state=1,pu(e,!1))}catch(t){bu({done:!1},t,e)}}};if(lu&&(tu=(eu=function(e){Pd(this,tu),Od(e),Ed(ld,this);var t=Yd(this);try{e(yu(_u,t),yu(bu,t))}catch(e){bu(t,e)}}).prototype,(ld=function(e){Jd(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Td(tu,{then:function(e,t){var n=Xd(this),r=n.reactions,a=iu(Ud(this,eu));return a.ok=!Id(e)||e,a.fail=Id(t)&&t,a.domain=Hd?au.domain:void 0,n.parent=!0,r[r.length]=a,0!=n.state&&pu(n,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),cd=function(){var e=new ld,t=Yd(e);this.promise=e,this.resolve=yu(_u,t),this.reject=yu(bu,t)},Fd.f=iu=function(e){return e===eu||e===hd?new cd(e):su(e)},Id(kd)&&Zd!==Object.prototype)){pd=Zd.then,uu||(xd(Zd,"then",(function(e,t){var n=this;return new eu((function(e,t){Ed(pd,n,e,t)})).then(e,t)}),{unsafe:!0}),xd(Zd,"catch",tu.catch,{unsafe:!0}));try{delete Zd.constructor}catch(e){}Dd&&Dd(Zd,tu)}_d({global:!0,wrap:!0,forced:lu},{Promise:eu}),Sd(eu,"Promise",!1),Rd("Promise"),hd=Ad("Promise"),_d({target:"Promise",stat:!0,forced:lu},{reject:function(e){var t=iu(this);return Ed(t.reject,void 0,e),t.promise}}),_d({target:"Promise",stat:!0,forced:lu},{resolve:function(e){return Gd(this,e)}}),_d({target:"Promise",stat:!0,forced:cu},{all:function(e){var t=this,n=iu(t),r=n.resolve,a=n.reject,i=Vd((function(){var n=Od(t.resolve),i=[],s=0,o=1;Md(e,(function(e){var d=s++,u=!1;o++,Ed(n,t,e).then((function(e){u||(u=!0,i[d]=e,--o||r(i))}),a)})),--o||r(i)}));return i.error&&a(i.value),n.promise},race:function(e){var t=this,n=iu(t),r=n.reject,a=Vd((function(){var a=Od(t.resolve);Md(e,(function(e){Ed(a,t,e).then(n.resolve,r)}))}));return a.error&&r(a.value),n.promise}});var wu=ga,Au=Ui,Eu=F,ku=xe,xu=be,Tu=Zs,Du=gd,Su=_n.exports;if(wu({target:"Promise",proto:!0,real:!0,forced:!!Au&&Eu((function(){Au.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Tu(this,ku("Promise")),n=xu(e);return this.then(n?function(n){return Du(t,e()).then((function(){return n}))}:e,n?function(n){return Du(t,e()).then((function(){throw n}))}:e)}}),xu(Au)){var Ru=ku("Promise").prototype.finally;Au.prototype.finally!==Ru&&Su(Au.prototype,"finally",Ru,{unsafe:!0})}var Ou=Ua,Iu=G.String,Cu=function(e){if("Symbol"===Ou(e))throw TypeError("Cannot convert a Symbol value to a string");return Iu(e)},Pu=ln,Lu=function(){var e=Pu(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},Mu={},ju=F,Uu=G.RegExp;Mu.UNSUPPORTED_Y=ju((function(){var e=Uu("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Mu.BROKEN_CARET=ju((function(){var e=Uu("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));var Bu,Nu=an,Gu=ln,qu=ye,Fu=_a,Vu=V?Object.defineProperties:function(e,t){Gu(e);for(var n,r=qu(t),a=Fu(t),i=a.length,s=0;i>s;)Nu.f(e,n=a[s++],r[n]);return e},Ku=ln,Wu=Vu,zu=Gr,Hu=jn,$u=io,Qu=zt,Yu=Mn("IE_PROTO"),Ju=function(){},Xu=function(e){return"<script>"+e+"<\/script>"},Zu=function(e){e.write(Xu("")),e.close();var t=e.parentWindow.Object;return e=null,t},el=function(){try{Bu=new ActiveXObject("htmlfile")}catch(e){}var e,t;el="undefined"!=typeof document?document.domain&&Bu?Zu(Bu):((t=Qu("iframe")).style.display="none",$u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Xu("document.F=Object")),e.close(),e.F):Zu(Bu);for(var n=zu.length;n--;)delete el.prototype[zu[n]];return el()};Hu[Yu]=!0;var tl=Object.create||function(e,t){var n;return null!==e?(Ju.prototype=Ku(e),n=new Ju,Ju.prototype=null,n[Yu]=e):n=el(),void 0===t?n:Wu(n,t)},nl=F,rl=G.RegExp,al=nl((function(){var e=rl(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),il=F,sl=G.RegExp,ol=il((function(){var e=sl("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),dl=W,ul=re,ll=Cu,cl=Lu,hl=Mu,pl=rt.exports,fl=tl,ml=Zn.get,vl=al,gl=ol,yl=pl("native-string-replace",String.prototype.replace),bl=RegExp.prototype.exec,_l=bl,wl=ul("".charAt),Al=ul("".indexOf),El=ul("".replace),kl=ul("".slice),xl=function(){var e=/a/,t=/b*/g;return dl(bl,e,"a"),dl(bl,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Tl=hl.UNSUPPORTED_Y||hl.BROKEN_CARET,Dl=void 0!==/()??/.exec("")[1];(xl||Dl||Tl||vl||gl)&&(_l=function(e){var t,n,r,a,i,s,o,d=this,u=ml(d),l=ll(e),c=u.raw;if(c)return c.lastIndex=d.lastIndex,t=dl(_l,c,l),d.lastIndex=c.lastIndex,t;var h=u.groups,p=Tl&&d.sticky,f=dl(cl,d),m=d.source,v=0,g=l;if(p&&(f=El(f,"y",""),-1===Al(f,"g")&&(f+="g"),g=kl(l,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==wl(l,d.lastIndex-1))&&(m="(?: "+m+")",g=" "+g,v++),n=new RegExp("^(?:"+m+")",f)),Dl&&(n=new RegExp("^"+m+"$(?!\\s)",f)),xl&&(r=d.lastIndex),a=dl(bl,p?n:d,g),p?a?(a.input=kl(a.input,v),a[0]=kl(a[0],v),a.index=d.lastIndex,d.lastIndex+=a[0].length):d.lastIndex=0:xl&&a&&(d.lastIndex=d.global?a.index+a[0].length:r),Dl&&a&&a.length>1&&dl(yl,a[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&h)for(a.groups=s=fl(null),i=0;i<h.length;i++)s[(o=h[i])[0]]=a[o[1]];return a});var Sl=_l;ga({target:"RegExp",proto:!0,forced:/./.exec!==Sl},{exec:Sl});var Rl=re,Ol=_n.exports,Il=Sl,Cl=F,Pl=It,Ll=bn,Ml=Pl("species"),jl=RegExp.prototype,Ul=function(e,t,n,r){var a=Pl(e),i=!Cl((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),s=i&&!Cl((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ml]=function(){return n},n.flags="",n[a]=/./[a]),n.exec=function(){return t=!0,null},n[a](""),!t}));if(!i||!s||n){var o=Rl(/./[a]),d=t(a,""[e],(function(e,t,n,r,a){var s=Rl(e),d=t.exec;return d===Il||d===jl.exec?i&&!a?{done:!0,value:o(t,n,r)}:{done:!0,value:s(n,t,r)}:{done:!1}}));Ol(String.prototype,e,d[0]),Ol(jl,a,d[1])}r&&Ll(jl[a],"sham",!0)},Bl=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Nl=W,Gl=ln,ql=be,Fl=oe,Vl=Sl,Kl=G.TypeError,Wl=function(e,t){var n=e.exec;if(ql(n)){var r=Nl(n,e,t);return null!==r&&Gl(r),r}if("RegExp"===Fl(e))return Nl(Vl,e,t);throw Kl("RegExp#exec called on incompatible receiver")},zl=W,Hl=ln,$l=me,Ql=Bl,Yl=Cu,Jl=Xe,Xl=Wl;Ul("search",(function(e,t,n){return[function(t){var n=$l(this),r=null==t?void 0:Jl(t,e);return r?zl(r,t,n):new RegExp(t)[e](Yl(n))},function(e){var r=Hl(this),a=Yl(e),i=n(t,r,a);if(i.done)return i.value;var s=r.lastIndex;Ql(s,0)||(r.lastIndex=0);var o=Xl(r,a);return Ql(r.lastIndex,s)||(r.lastIndex=s),null===o?-1:o.index}]}));var Zl=me,ec=Cu,tc=re("".replace),nc="[\t\n\v\f\r \u2028\u2029\ufeff]",rc=RegExp("^"+nc+nc+"*"),ac=RegExp(nc+nc+"*$"),ic=function(e){return function(t){var n=ec(Zl(t));return 1&e&&(n=tc(n,rc,"")),2&e&&(n=tc(n,ac,"")),n}},sc={start:ic(1),end:ic(2),trim:ic(3)},oc=ir.PROPER,dc=F,uc="\t\n\v\f\r \u2028\u2029\ufeff",lc=sc.trim;ga({target:"String",proto:!0,forced:function(e){return dc((function(){return!!uc[e]()||"
"!=="
"[e]()||oc&&uc[e].name!==e}))}("trim")},{trim:function(){return lc(this)}});var cc={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},hc=zt("span").classList,pc=hc&&hc.constructor&&hc.constructor.prototype,fc=pc===Object.prototype?void 0:pc,mc=F,vc=hi.forEach,gc=function(e,t){var n=[][e];return!!n&&mc((function(){n.call(null,t||function(){throw 1},1)}))},yc=G,bc=cc,_c=fc,wc=gc("forEach")?[].forEach:function(e){return vc(this,e,arguments.length>1?arguments[1]:void 0)},Ac=bn,Ec=function(e){if(e&&e.forEach!==wc)try{Ac(e,"forEach",wc)}catch(t){e.forEach=wc}};for(var kc in bc)bc[kc]&&Ec(yc[kc]&&yc[kc].prototype);Ec(_c);var xc=be,Tc=we,Dc=zi,Sc=we,Rc=oe,Oc=It("match"),Ic=function(e){var t;return Sc(e)&&(void 0!==(t=e[Oc])?!!t:"RegExp"==Rc(e))},Cc=V,Pc=G,Lc=re,Mc=ua,jc=function(e,t,n){var r,a;return Dc&&xc(r=t.constructor)&&r!==n&&Tc(a=r.prototype)&&a!==n.prototype&&Dc(e,a),e},Uc=bn,Bc=an.f,Nc=vr.f,Gc=Te,qc=Ic,Fc=Cu,Vc=Lu,Kc=Mu,Wc=_n.exports,zc=F,Hc=mt,$c=Zn.enforce,Qc=ts,Yc=al,Jc=ol,Xc=It("match"),Zc=Pc.RegExp,eh=Zc.prototype,th=Pc.SyntaxError,nh=Lc(Vc),rh=Lc(eh.exec),ah=Lc("".charAt),ih=Lc("".replace),sh=Lc("".indexOf),oh=Lc("".slice),dh=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,uh=/a/g,lh=/a/g,ch=new Zc(uh)!==uh,hh=Kc.UNSUPPORTED_Y,ph=Cc&&(!ch||hh||Yc||Jc||zc((function(){return lh[Xc]=!1,Zc(uh)!=uh||Zc(lh)==lh||"/a/i"!=Zc(uh,"i")})));if(Mc("RegExp",ph)){for(var fh=function(e,t){var n,r,a,i,s,o,d=Gc(eh,this),u=qc(e),l=void 0===t,c=[],h=e;if(!d&&u&&l&&e.constructor===fh)return e;if((u||Gc(eh,e))&&(e=e.source,l&&(t="flags"in h?h.flags:nh(h))),e=void 0===e?"":Fc(e),t=void 0===t?"":Fc(t),h=e,Yc&&"dotAll"in uh&&(r=!!t&&sh(t,"s")>-1)&&(t=ih(t,/s/g,"")),n=t,hh&&"sticky"in uh&&(a=!!t&&sh(t,"y")>-1)&&(t=ih(t,/y/g,"")),Jc&&(i=function(e){for(var t,n=e.length,r=0,a="",i=[],s={},o=!1,d=!1,u=0,l="";r<=n;r++){if("\\"===(t=ah(e,r)))t+=ah(e,++r);else if("]"===t)o=!1;else if(!o)switch(!0){case"["===t:o=!0;break;case"("===t:rh(dh,oh(e,r+1))&&(r+=2,d=!0),a+=t,u++;continue;case">"===t&&d:if(""===l||Hc(s,l))throw new th("Invalid capture group name");s[l]=!0,i[i.length]=[l,u],d=!1,l="";continue}d?l+=t:a+=t}return[a,i]}(e),e=i[0],c=i[1]),s=jc(Zc(e,t),d?this:eh,fh),(r||a||c.length)&&(o=$c(s),r&&(o.dotAll=!0,o.raw=fh(function(e){for(var t,n=e.length,r=0,a="",i=!1;r<=n;r++)"\\"!==(t=ah(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),a+=t):a+="[\\s\\S]":a+=t+ah(e,++r);return a}(e),n)),a&&(o.sticky=!0),c.length&&(o.groups=c)),e!==h)try{Uc(s,"source",""===h?"(?:)":h)}catch(e){}return s},mh=function(e){e in fh||Bc(fh,e,{configurable:!0,get:function(){return Zc[e]},set:function(t){Zc[e]=t}})},vh=Nc(Zc),gh=0;vh.length>gh;)mh(vh[gh++]);eh.constructor=fh,fh.prototype=eh,Wc(Pc,"RegExp",fh)}Qc("RegExp");var yh=re,bh=ir.PROPER,_h=_n.exports,wh=ln,Ah=Te,Eh=Cu,kh=F,xh=Lu,Th=RegExp.prototype,Dh=Th.toString,Sh=yh(xh),Rh=kh((function(){return"/a/b"!=Dh.call({source:"a",flags:"b"})})),Oh=bh&&"toString"!=Dh.name;(Rh||Oh)&&_h(RegExp.prototype,"toString",(function(){var e=wh(this),t=Eh(e.source),n=e.flags;return"/"+t+"/"+Eh(void 0===n&&Ah(Th,e)&&!("flags"in Th)?Sh(e):n)}),{unsafe:!0});var Ih=ga,Ch=G,Ph=F,Lh=Da,Mh=we,jh=ht,Uh=Sr,Bh=Di,Nh=ai,Gh=vi,qh=Le,Fh=It("isConcatSpreadable"),Vh=Ch.TypeError,Kh=qh>=51||!Ph((function(){var e=[];return e[Fh]=!1,e.concat()[0]!==e})),Wh=Gh("concat"),zh=function(e){if(!Mh(e))return!1;var t=e[Fh];return void 0!==t?!!t:Lh(e)};Ih({target:"Array",proto:!0,forced:!Kh||!Wh},{concat:function(e){var t,n,r,a,i,s=jh(this),o=Nh(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(zh(i=-1===t?s:arguments[t])){if(d+(a=Uh(i))>9007199254740991)throw Vh("Maximum allowed index exceeded");for(n=0;n<a;n++,d++)n in i&&Bh(o,d,i[n])}else{if(d>=9007199254740991)throw Vh("Maximum allowed index exceeded");Bh(o,d++,i)}return o.length=d,o}});var Hh,$h=Ic,Qh=G.TypeError,Yh=function(e){if($h(e))throw Qh("The method doesn't accept regular expressions");return e},Jh=It("match"),Xh=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Jh]=!1,"/./"[e](t)}catch(e){}}return!1},Zh=ga,ep=re,tp=q.f,np=Tr,rp=Cu,ap=Yh,ip=me,sp=Xh,op=ep("".startsWith),dp=ep("".slice),up=Math.min,lp=sp("startsWith");Zh({target:"String",proto:!0,forced:!!(lp||(Hh=tp(String.prototype,"startsWith"),!Hh||Hh.writable))&&!lp},{startsWith:function(e){var t=rp(ip(this));ap(e);var n=np(up(arguments.length>1?arguments[1]:void 0,t.length)),r=rp(e);return op?op(t,r,n):dp(t,n,n+r.length)===r}});var cp=re,hp=br,pp=Cu,fp=me,mp=cp("".charAt),vp=cp("".charCodeAt),gp=cp("".slice),yp=function(e){return function(t,n){var r,a,i=pp(fp(t)),s=hp(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=vp(i,s))<55296||r>56319||s+1===o||(a=vp(i,s+1))<56320||a>57343?e?mp(i,s):r:e?gp(i,s,s+2):a-56320+(r-55296<<10)+65536}},bp={codeAt:yp(!1),charAt:yp(!0)},_p=bp.charAt,wp=function(e,t,n){return t+(n?_p(e,t).length:1)},Ap=re,Ep=ht,kp=Math.floor,xp=Ap("".charAt),Tp=Ap("".replace),Dp=Ap("".slice),Sp=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Rp=/\$([$&'`]|\d{1,2})/g,Op=ao,Ip=W,Cp=re,Pp=Ul,Lp=F,Mp=ln,jp=be,Up=br,Bp=Tr,Np=Cu,Gp=me,qp=wp,Fp=Xe,Vp=function(e,t,n,r,a,i){var s=n+e.length,o=r.length,d=Rp;return void 0!==a&&(a=Ep(a),d=Sp),Tp(i,d,(function(i,d){var u;switch(xp(d,0)){case"$":return"$";case"&":return e;case"`":return Dp(t,0,n);case"'":return Dp(t,s);case"<":u=a[Dp(d,1,-1)];break;default:var l=+d;if(0===l)return i;if(l>o){var c=kp(l/10);return 0===c?i:c<=o?void 0===r[c-1]?xp(d,1):r[c-1]+xp(d,1):i}u=r[l-1]}return void 0===u?"":u}))},Kp=Wl,Wp=It("replace"),zp=Math.max,Hp=Math.min,$p=Cp([].concat),Qp=Cp([].push),Yp=Cp("".indexOf),Jp=Cp("".slice),Xp="$0"==="a".replace(/./,"$0"),Zp=!!/./[Wp]&&""===/./[Wp]("a","$0");Pp("replace",(function(e,t,n){var r=Zp?"$":"$0";return[function(e,n){var r=Gp(this),a=null==e?void 0:Fp(e,Wp);return a?Ip(a,e,r,n):Ip(t,Np(r),e,n)},function(e,a){var i=Mp(this),s=Np(e);if("string"==typeof a&&-1===Yp(a,r)&&-1===Yp(a,"$<")){var o=n(t,i,s,a);if(o.done)return o.value}var d=jp(a);d||(a=Np(a));var u=i.global;if(u){var l=i.unicode;i.lastIndex=0}for(var c=[];;){var h=Kp(i,s);if(null===h)break;if(Qp(c,h),!u)break;""===Np(h[0])&&(i.lastIndex=qp(s,Bp(i.lastIndex),l))}for(var p,f="",m=0,v=0;v<c.length;v++){for(var g=Np((h=c[v])[0]),y=zp(Hp(Up(h.index),s.length),0),b=[],_=1;_<h.length;_++)Qp(b,void 0===(p=h[_])?p:String(p));var w=h.groups;if(d){var A=$p([g],b,y,s);void 0!==w&&Qp(A,w);var E=Np(Op(a,void 0,A))}else E=Vp(g,s,y,b,w,a);y>=m&&(f+=Jp(s,m,y)+E,m=y+g.length)}return f+Jp(s,m)}]}),!!Lp((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Xp||Zp);var ef=V,tf=ir.EXISTS,nf=re,rf=an.f,af=Function.prototype,sf=nf(af.toString),of=/^\s*function ([^ (]*)/,df=nf(of.exec);ef&&!tf&&rf(af,"name",{configurable:!0,get:function(){try{return df(of,sf(this))[1]}catch(e){return""}}});var uf={},lf=oe,cf=ye,hf=vr.f,pf=so,ff="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];uf.f=function(e){return ff&&"Window"==lf(e)?function(e){try{return hf(e)}catch(e){return pf(ff)}}(e):hf(cf(e))};var mf={},vf=It;mf.f=vf;var gf=G,yf=mt,bf=mf,_f=an.f,wf=function(e){var t=gf.Symbol||(gf.Symbol={});yf(t,e)||_f(t,e,{value:bf.f(e)})},Af=ga,Ef=G,kf=xe,xf=ao,Tf=W,Df=re,Sf=V,Rf=Ue,Of=F,If=mt,Cf=Da,Pf=be,Lf=we,Mf=Te,jf=Ke,Uf=ln,Bf=ht,Nf=ye,Gf=Ft,qf=Cu,Ff=X,Vf=tl,Kf=_a,Wf=vr,zf=uf,Hf=Vr,$f=q,Qf=an,Yf=z,Jf=so,Xf=_n.exports,Zf=rt.exports,em=jn,tm=_t,nm=It,rm=mf,am=wf,im=Yi,sm=Zn,om=hi.forEach,dm=Mn("hidden"),um=nm("toPrimitive"),lm=sm.set,cm=sm.getterFor("Symbol"),hm=Object.prototype,pm=Ef.Symbol,fm=pm&&pm.prototype,mm=Ef.TypeError,vm=Ef.QObject,gm=kf("JSON","stringify"),ym=$f.f,bm=Qf.f,_m=zf.f,wm=Yf.f,Am=Df([].push),Em=Zf("symbols"),km=Zf("op-symbols"),xm=Zf("string-to-symbol-registry"),Tm=Zf("symbol-to-string-registry"),Dm=Zf("wks"),Sm=!vm||!vm.prototype||!vm.prototype.findChild,Rm=Sf&&Of((function(){return 7!=Vf(bm({},"a",{get:function(){return bm(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=ym(hm,t);r&&delete hm[t],bm(e,t,n),r&&e!==hm&&bm(hm,t,r)}:bm,Om=function(e,t){var n=Em[e]=Vf(fm);return lm(n,{type:"Symbol",tag:e,description:t}),Sf||(n.description=t),n},Im=function(e,t,n){e===hm&&Im(km,t,n),Uf(e);var r=Gf(t);return Uf(n),If(Em,r)?(n.enumerable?(If(e,dm)&&e[dm][r]&&(e[dm][r]=!1),n=Vf(n,{enumerable:Ff(0,!1)})):(If(e,dm)||bm(e,dm,Ff(1,{})),e[dm][r]=!0),Rm(e,r,n)):bm(e,r,n)},Cm=function(e,t){Uf(e);var n=Nf(t),r=Kf(n).concat(jm(n));return om(r,(function(t){Sf&&!Tf(Pm,n,t)||Im(e,t,n[t])})),e},Pm=function(e){var t=Gf(e),n=Tf(wm,this,t);return!(this===hm&&If(Em,t)&&!If(km,t))&&(!(n||!If(this,t)||!If(Em,t)||If(this,dm)&&this[dm][t])||n)},Lm=function(e,t){var n=Nf(e),r=Gf(t);if(n!==hm||!If(Em,r)||If(km,r)){var a=ym(n,r);return!a||!If(Em,r)||If(n,dm)&&n[dm][r]||(a.enumerable=!0),a}},Mm=function(e){var t=_m(Nf(e)),n=[];return om(t,(function(e){If(Em,e)||If(em,e)||Am(n,e)})),n},jm=function(e){var t=e===hm,n=_m(t?km:Nf(e)),r=[];return om(n,(function(e){!If(Em,e)||t&&!If(hm,e)||Am(r,Em[e])})),r};(Rf||(Xf(fm=(pm=function(){if(Mf(fm,this))throw mm("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?qf(arguments[0]):void 0,t=tm(e),n=function(e){this===hm&&Tf(n,km,e),If(this,dm)&&If(this[dm],t)&&(this[dm][t]=!1),Rm(this,t,Ff(1,e))};return Sf&&Sm&&Rm(hm,t,{configurable:!0,set:n}),Om(t,e)}).prototype,"toString",(function(){return cm(this).tag})),Xf(pm,"withoutSetter",(function(e){return Om(tm(e),e)})),Yf.f=Pm,Qf.f=Im,$f.f=Lm,Wf.f=zf.f=Mm,Hf.f=jm,rm.f=function(e){return Om(nm(e),e)},Sf&&(bm(fm,"description",{configurable:!0,get:function(){return cm(this).description}}),Xf(hm,"propertyIsEnumerable",Pm,{unsafe:!0}))),Af({global:!0,wrap:!0,forced:!Rf,sham:!Rf},{Symbol:pm}),om(Kf(Dm),(function(e){am(e)})),Af({target:"Symbol",stat:!0,forced:!Rf},{for:function(e){var t=qf(e);if(If(xm,t))return xm[t];var n=pm(t);return xm[t]=n,Tm[n]=t,n},keyFor:function(e){if(!jf(e))throw mm(e+" is not a symbol");if(If(Tm,e))return Tm[e]},useSetter:function(){Sm=!0},useSimple:function(){Sm=!1}}),Af({target:"Object",stat:!0,forced:!Rf,sham:!Sf},{create:function(e,t){return void 0===t?Vf(e):Cm(Vf(e),t)},defineProperty:Im,defineProperties:Cm,getOwnPropertyDescriptor:Lm}),Af({target:"Object",stat:!0,forced:!Rf},{getOwnPropertyNames:Mm,getOwnPropertySymbols:jm}),Af({target:"Object",stat:!0,forced:Of((function(){Hf.f(1)}))},{getOwnPropertySymbols:function(e){return Hf.f(Bf(e))}}),gm)&&Af({target:"JSON",stat:!0,forced:!Rf||Of((function(){var e=pm();return"[null]"!=gm([e])||"{}"!=gm({a:e})||"{}"!=gm(Object(e))}))},{stringify:function(e,t,n){var r=Jf(arguments),a=t;if((Lf(t)||void 0!==e)&&!jf(e))return Cf(t)||(t=function(e,t){if(Pf(a)&&(t=Tf(a,this,e,t)),!jf(t))return t}),r[1]=t,xf(gm,null,r)}});if(!fm[um]){var Um=fm.valueOf;Xf(fm,um,(function(e){return Tf(Um,this)}))}im(pm,"Symbol"),em[dm]=!0;var Bm=ga,Nm=V,Gm=G,qm=re,Fm=mt,Vm=be,Km=Te,Wm=Cu,zm=an.f,Hm=ea,$m=Gm.Symbol,Qm=$m&&$m.prototype;if(Nm&&Vm($m)&&(!("description"in Qm)||void 0!==$m().description)){var Ym={},Jm=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:Wm(arguments[0]),t=Km(Qm,this)?new $m(e):void 0===e?$m():$m(e);return""===e&&(Ym[t]=!0),t};Hm(Jm,$m),Jm.prototype=Qm,Qm.constructor=Jm;var Xm="Symbol(test)"==String($m("test")),Zm=qm(Qm.toString),ev=qm(Qm.valueOf),tv=/^Symbol\((.*)\)[^)]+$/,nv=qm("".replace),rv=qm("".slice);zm(Qm,"description",{configurable:!0,get:function(){var e=ev(this),t=Zm(e);if(Fm(Ym,e))return"";var n=Xm?rv(t,7,-1):nv(t,tv,"$1");return""===n?void 0:n}}),Bm({global:!0,forced:!0},{Symbol:Jm})}var av=tl,iv=an,sv=It("unscopables"),ov=Array.prototype;null==ov[sv]&&iv.f(ov,sv,{configurable:!0,value:av(null)});var dv=function(e){ov[sv][e]=!0},uv=Pr.includes,lv=dv;ga({target:"Array",proto:!0},{includes:function(e){return uv(this,e,arguments.length>1?arguments[1]:void 0)}}),lv("includes");var cv=ga,hv=Yh,pv=me,fv=Cu,mv=Xh,vv=re("".indexOf);cv({target:"String",proto:!0,forced:!mv("includes")},{includes:function(e){return!!~vv(fv(pv(this)),fv(hv(e)),arguments.length>1?arguments[1]:void 0)}});var gv=ga,yv=hi.find,bv=dv,_v=!0;"find"in[]&&Array(1).find((function(){_v=!1})),gv({target:"Array",proto:!0,forced:_v},{find:function(e){return yv(this,e,arguments.length>1?arguments[1]:void 0)}}),bv("find");var wv="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==wv&&wv,Av="URLSearchParams"in wv,Ev="Symbol"in wv&&"iterator"in Symbol,kv="FileReader"in wv&&"Blob"in wv&&function(){try{return new Blob,!0}catch(e){return!1}}(),xv="FormData"in wv,Tv="ArrayBuffer"in wv;if(Tv)var Dv=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Sv=ArrayBuffer.isView||function(e){return e&&Dv.indexOf(Object.prototype.toString.call(e))>-1};function Rv(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 Ov(e){return"string"!=typeof e&&(e=String(e)),e}function Iv(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Ev&&(t[Symbol.iterator]=function(){return t}),t}function Cv(e){this.map={},e instanceof Cv?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 Pv(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Lv(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function Mv(e){var t=new FileReader,n=Lv(t);return t.readAsArrayBuffer(e),n}function jv(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Uv(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:kv&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:xv&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Av&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Tv&&kv&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=jv(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Tv&&(ArrayBuffer.prototype.isPrototypeOf(e)||Sv(e))?this._bodyArrayBuffer=jv(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):Av&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},kv&&(this.blob=function(){var e=Pv(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=Pv(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(Mv)}),this.text=function(){var e=Pv(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=Lv(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)},xv&&(this.formData=function(){return this.text().then(Gv)}),this.json=function(){return this.text().then(JSON.parse)},this}Cv.prototype.append=function(e,t){e=Rv(e),t=Ov(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Cv.prototype.delete=function(e){delete this.map[Rv(e)]},Cv.prototype.get=function(e){return e=Rv(e),this.has(e)?this.map[e]:null},Cv.prototype.has=function(e){return this.map.hasOwnProperty(Rv(e))},Cv.prototype.set=function(e,t){this.map[Rv(e)]=Ov(t)},Cv.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Cv.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Iv(e)},Cv.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Iv(e)},Cv.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Iv(e)},Ev&&(Cv.prototype[Symbol.iterator]=Cv.prototype.entries);var Bv=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Nv(e,t){if(!(this instanceof Nv))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof Nv){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Cv(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Cv(t.headers)),this.method=function(e){var t=e.toUpperCase();return Bv.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Gv(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 qv(e,t){if(!(this instanceof qv))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 Cv(t.headers),this.url=t.url||"",this._initBody(e)}Nv.prototype.clone=function(){return new Nv(this,{body:this._bodyInit})},Uv.call(Nv.prototype),Uv.call(qv.prototype),qv.prototype.clone=function(){return new qv(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Cv(this.headers),url:this.url})},qv.error=function(){var e=new qv(null,{status:0,statusText:""});return e.type="error",e};var Fv=[301,302,303,307,308];qv.redirect=function(e,t){if(-1===Fv.indexOf(t))throw new RangeError("Invalid status code");return new qv(null,{status:t,headers:{location:e}})};var Vv=wv.DOMException;try{new Vv}catch(e){Vv=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},Vv.prototype=Object.create(Error.prototype),Vv.prototype.constructor=Vv}function Kv(e,t){return new Promise((function(n,r){var a=new Nv(e,t);if(a.signal&&a.signal.aborted)return r(new Vv("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 Cv,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 qv(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 Vv("Aborted","AbortError"))}),0)},i.open(a.method,function(e){try{return""===e&&wv.location.href?wv.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&&(kv?i.responseType="blob":Tv&&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 Cv?a.headers.forEach((function(e,t){i.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){i.setRequestHeader(e,Ov(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)}))}Kv.polyfill=!0,wv.fetch||(wv.fetch=Kv,wv.Headers=Cv,wv.Request=Nv,wv.Response=qv);var Wv={name:"@bygd/gd-sdk-pes",version:"1.24.0",files:["dist/*"],scripts:{build:"NODE_ENV=production rollup --config",watch:"rollup --config --watch --sourcemap --environment DEVELOPMENT","deploy-base":"npm install && npm run build && npm publish --access public",deploy:"npm run deploy-base && gdtool pm-upload"},repository:{type:"git",url:"git@gitlab.azerdev.com:gamedistribution/gd-sdk-pes.git"},author:"",license:"ISC",devDependencies:{"@babel/core":"^7.14.6","@babel/plugin-transform-runtime":"^7.14.5","@babel/preset-env":"^7.14.7","@rollup/plugin-babel":"^5.2.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.0.0","@rollup/plugin-replace":"^3.0.0",postcss:"^8.3.5",rollup:"^2.52.8","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-browsersync":"^1.3.3","rollup-plugin-delete":"^2.0.0","rollup-plugin-node-polyfills":"^0.2.1","rollup-plugin-peer-deps-external":"^2.2.4","rollup-plugin-postcss":"^4.0.0","rollup-plugin-terser":"^7.0.2"},dependencies:{"@babel/runtime":"^7.14.6","@bygd/gd-sdk-era":"^0.3.3","can-autoplay":"^3.0.2",events:"^3.3.0","get-value":"^3.0.1","is-plain-object":"^5.0.0","is-valid-domain":"^0.1.2","js-base64":"^3.6.1","leaderboard-lib":"0.1.11","lodash.clonedeep":"^4.5.0","lodash.merge":"^4.6.2",querystringify:"^2.2.0","set-value":"^4.1.0","url-parse":"^1.4.7",validator:"^13.6.0"}},zv=W,Hv=ln,$v=Tr,Qv=Cu,Yv=me,Jv=Xe,Xv=wp,Zv=Wl;Ul("match",(function(e,t,n){return[function(t){var n=Yv(this),r=null==t?void 0:Jv(t,e);return r?zv(r,t,n):new RegExp(t)[e](Qv(n))},function(e){var r=Hv(this),a=Qv(e),i=n(t,r,a);if(i.done)return i.value;if(!r.global)return Zv(r,a);var s=r.unicode;r.lastIndex=0;for(var o,d=[],u=0;null!==(o=Zv(r,a));){var l=Qv(o[0]);d[u]=l,""===l&&(r.lastIndex=Xv(a,$v(r.lastIndex),s)),u++}return 0===u?null:d}]}));var eg=ao,tg=W,ng=re,rg=Ul,ag=Ic,ig=ln,sg=me,og=Zs,dg=wp,ug=Tr,lg=Cu,cg=Xe,hg=so,pg=Wl,fg=Sl,mg=F,vg=Mu.UNSUPPORTED_Y,gg=Math.min,yg=[].push,bg=ng(/./.exec),_g=ng(yg),wg=ng("".slice);rg("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=lg(sg(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[r];if(!ag(e))return tg(t,r,e,a);for(var i,s,o,d=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,c=new RegExp(e.source,u+"g");(i=tg(fg,c,r))&&!((s=c.lastIndex)>l&&(_g(d,wg(r,l,i.index)),i.length>1&&i.index<r.length&&eg(yg,d,hg(i,1)),o=i[0].length,l=s,d.length>=a));)c.lastIndex===i.index&&c.lastIndex++;return l===r.length?!o&&bg(c,"")||_g(d,""):_g(d,wg(r,l)),d.length>a?hg(d,0,a):d}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:tg(t,this,e,n)}:t,[function(t,n){var a=sg(this),i=null==t?void 0:cg(t,e);return i?tg(i,t,a,n):tg(r,lg(a),t,n)},function(e,a){var i=ig(this),s=lg(e),o=n(r,i,s,a,r!==t);if(o.done)return o.value;var d=og(i,RegExp),u=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(vg?"g":"y"),c=new d(vg?"^(?:"+i.source+")":i,l),h=void 0===a?4294967295:a>>>0;if(0===h)return[];if(0===s.length)return null===pg(c,s)?[s]:[];for(var p=0,f=0,m=[];f<s.length;){c.lastIndex=vg?0:f;var v,g=pg(c,vg?wg(s,f):s);if(null===g||(v=gg(ug(c.lastIndex+(vg?f:0)),s.length))===p)f=dg(s,f,u);else{if(_g(m,wg(s,p,f)),m.length===h)return m;for(var y=1;y<=g.length-1;y++)if(_g(m,g[y]),m.length===h)return m;f=p=v}}return _g(m,wg(s,p)),m}]}),!!mg((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]})),vg);var Ag=function(){function e(t){x.default(this,e),this.gameData=t,this.customParamKeys=["vid","_1ld","_1lp"]}return T.default(e,[{key:"_getFakeCustomParams",value:function(){var e={_vid:["bla_bla1","bla_bla2","bla_bla3"],_1ld:["1ld_1","1ld_2","1ld_3","1ld_4"],_1lp:["1lp_1","1lp_2"]},t={};for(var n in e){var r=e[n];t[n]=r[Math.floor(Math.random()*r.length)]}return t}},{key:"checkCustomParams",value:function(){var e=this;try{var t={},n=this.gameData.diagnostic&&this.gameData.diagnostic.cp&&this.gameData.diagnostic.cp.enabled,r=new R.default(location.href,!0);for(var a in r.query)t[a]=r.query[a];return Object.keys(t).filter(function(t){var n=this;return w.default(this,e),this.customParamKeys.some(function(e){return w.default(this,n),e===t}.bind(this))}.bind(this)).length>0||n?(console.log("custom-params",t,n),t):void console.log("custom-params, none")}catch(e){console.log("_checkCustomParams.Error",e)}}}]),e}(),Eg=function(){function e(t,n){x.default(this,e),this.adContainer=t,this.onResume=n}return T.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(){w.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}(),kg=function(e){if(!e)return!1;var t=xg.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)},xg=Object.prototype.toString;function Tg(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 Dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tg(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sg(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 Rg=["bidFloor","isDfpBidding"];function Og(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 Ig(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Og(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cg=null,Pg=function(){function e(t,n,r){var a=this;if(x.default(this,e),Cg)return Cg;Cg=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.adType_="",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(){w.default(this,a),this._clearSafetyTimer("LOADED"),this._startSafetyTimer(8e3,"LOADED")}.bind(this),"ima"),this.eventBus.subscribe("STARTED",function(){w.default(this,a),this._clearSafetyTimer("STARTED")}.bind(this),"ima")}var t,n,r,a,i,s,o,u,l,h,p,f,v,g,y,b,_,A,L;return T.default(e,[{key:"start",value:(L=k.default(D.default.mark((function e(){return D.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=k.default(D.default.mark((function r(a){var i,s,o,u,l,h,p,f,m,v,g=this;return D.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,l=u.data,h=l.nsid?l.nsid:"TNL_T-17102571517",p=l.tid?l.tid:"TNL_NS-18101700058",f="".concat(h,"/").concat(p),delete l.nsid,delete l.tid,P.default(l,{tnl_system:"1",tnl_content_category:n.category.toLowerCase()}),n.eventBus.broadcast("AD_REQUEST",{message:l.tnl_ad_pos}),m=n.options,"preroll"===l.tnl_ad_pos&&c.isPlainObject(m.preroll)?m=m.preroll:"midroll"===l.tnl_ad_pos&&c.isPlainObject(m.midroll)?m=m.midroll:"rewarded"===l.tnl_ad_pos&&c.isPlainObject(m.rewarded)&&(m=m.rewarded),!(t&&t.retry_on_success&&c.isPlainObject(m.retry_on_success)&&c.isPlainObject(m.retry_on_success.vast))){r.next=26;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_success.vast,{tnl_keys:l})));case 26:if(!(t&&t.retry_on_failure&&n.options.retry_on_failure&&c.isPlainObject(m.retry_on_failure.vast))){r.next=30;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.retry_on_failure.vast,{tnl_keys:l})));case 30:if(!c.isPlainObject(m.vast)){r.next=32;break}return r.abrupt("return",a(n._createCustomAdVastUrl(m.vast,{tnl_keys:l})));case 32:return r.next=34,n._create_dp_context(l.tnl_ad_pos,t);case 34:v=r.sent,window.idhb.que.push(function(){var e=this;w.default(this,g),window.idhb.setRefererUrl(encodeURIComponent(n.parentURL)),window.idhb.allowPersonalizedAds(!!parseInt(n.userAllowedPersonalizedAds));var t="rewarded"===l.tnl_ad_pos?"rewardedVideo":"gdbanner"===l.tnl_ad_pos?"gd__banner":"midroll"===l.tnl_ad_pos?"midroll":"video1";window.idhb.setDfpAdUnitCodeForAdSlot(t,f),window.idhb.setAdserverTargetingForAdSlot(t,l),window.idhb.requestAds({slots:E.default({},t,{bidFloor:null!=v&&v.floor_price?v.floor_price:void 0}),callback:function(t,n){var r=this;w.default(this,e),v&&!n.bidFloorApplied&&fetch(v.skip_url).catch(function(e){w.default(this,r)}.bind(this)),a({tnl_keys:l,url:t,dp:v,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,a,i=this;w.default(this,t);var s="";!navigator.userAgent.match(/Crosswalk/i)&&void 0===window.cordova||"m.hopy.com"!==this.parentDomain?("undefined"===this.topDomain&&(this.topDomain=void 0),s="page_url=".concat(encodeURIComponent(this.topDomain||this.parentDomain))):s="bundle=com.hopy.frivgames",function(e,t){try{var n={tp:e,data:t};fetch("https://tag.atom.gamedistribution.com/v1/dmp?ar=".concat(encodeURIComponent(m.Base64.encode(JSON.stringify(n)))))}catch(e){console.log("Send Atom Log Error...",e)}}("page_url",{top_domain:this.topDomain,parent_domain:this.parentDomain,game:this.gameId,pageUrl:s});var o=this.nextAdPosition(e);null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(a=this.gameData.loader)&&void 0!==a&&a.enabled||"preroll"!==o||(o="midroll");var u=d.getQueryString("ch",window.location.href),l=d.getQueryString("ch_date",window.location.href),c=u?"&ch=".concat(u):"",h=l?"&ch_date=".concat(l):"",p="https://pub.headerlift.com/opphb?".concat(s,"&player_width=").concat(this.options.width,"&player_height=").concat(this.options.height,"&ad_type=video_image&game_id=").concat(this.gameId,"&ad_position=").concat(o).concat(c).concat(h,"&correlator=").concat(Date.now()),f=new Request(p,{method:"GET"});fetch(f).then(function(e){w.default(this,i);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){w.default(this,i),d.isObjectEmpty(e)&&(e=this._createTunnlReportingFallbackKeys(o),this.eventBus.broadcast("AD_REQUEST_KEYS_EMPTY",{message:"Tunnl returned empty response.",details:p})),n({data:e,url:p})}.bind(this)).catch(function(e){w.default(this,i);var t=this._createTunnlReportingFallbackKeys(o);this.eventBus.broadcast("AD_REQUEST_KEYS_FALLBACK",{message:e.message,details:p}),n({data:t,url:p})}.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(w.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=Ig(Ig({},t),{},{adTag:o,tnl_ad_pos:i});this.adCounter[i]=this.adCounter[i]||0,this.adCounter[i]++;var u=e.dp,l=e.hl;if(u&&(u.adtag_url=o.url,this._extend_dp_with_adsense(u,l,null==e?void 0:e.tnl_keys)),this._isVMAP(i)){var c=function(e){var t=e.position||"midroll",n=e.dp_1,r=e.dp_2,a=Date.now(),i=new R.default(e.adtag_url_1,!0);i.query=Dg(Dg({},i.query),{},{ad_rule:0,vpos:t,pod:1,ppos:1,lip:!0,correlator:a,output:"xml_vast3"});var s=i.toString(),o=new R.default(e.adtag_url_2,!0);o.query=Dg(Dg({},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(Sg({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(Sg({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=c}else if(u&&l.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:(A=k.default(D.default.mark((function e(){var t=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,n){var r=this;w.default(this,t);var a=navigator.userAgent.toLowerCase();a.indexOf("safari")>-1&&a.indexOf("chrome")<0?e({autoplayAllowed:!0,autoplayRequiresMute:!0}):O.default.video({inline:!0,muted:!1}).then(function(t){w.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 A.apply(this,arguments)})},{key:"_initDisplayContainerWithAutoPlay",value:(_=k.default(D.default.mark((function e(){var t;return D.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 _.apply(this,arguments)})},{key:"startAd",value:(b=k.default(D.default.mark((function e(t){var n,r,a;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.gameData.afg_disabled,r=t.adType,a=t.params,this.adType_=r,r!==d.AdType.Interstitial){e.next=23;break}if(!n){e.next=8;break}return e.abrupt("return",this._startInterstitialAd(a));case 8:if("preroll"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=12;break}return e.abrupt("return",this._startAdsensePlacementPreroll(t));case 12:if("start"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=16;break}return e.abrupt("return",this._startAdsensePlacementStart(t));case 16:if("next"!==(null==a?void 0:a.position)||"adsense"!==(null==a?void 0:a.adapter)){e.next=20;break}return e.abrupt("return",this._startAdsensePlacementNext(t));case 20:return e.abrupt("return",this._startInterstitialAd(a));case 21:case 29:e.next=32;break;case 23:if(r!==d.AdType.Rewarded){e.next=31;break}if(!n){e.next=28;break}return e.abrupt("return",this._startRewardedAd(a));case 28:return e.abrupt("return",this._startAdsensePlacementRewardedAd(t));case 31:throw new Error("Unsupported ad type");case 32:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"preloadAd",value:(y=k.default(D.default.mark((function e(t){return D.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","gdsdk://preloaded");case 4:if(t!==d.AdType.Rewarded){e.next=8;break}return e.abrupt("return","gdsdk://preloaded");case 8:throw new Error("Unsupported ad type");case 9:case"end":return e.stop()}}),e)}))),function(e){return y.apply(this,arguments)})},{key:"addAdResume",value:function(){var e=this,t=function(){w.default(this,e),this.adsManager.resume()}.bind(this);try{this.adResume=new Eg(this.adContainer,t),this.adResume.add()}catch(e){console.log("error on adding adResume",e)}}},{key:"loadDisplayAd",value:(g=k.default(D.default.mark((function e(t){var n=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=k.default(D.default.mark((function e(r,a){var i,s,o,u,l,c,h=this;return D.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")||((l=document.createElement("style")).type="text/css",l.id="gd__banner__style",l.styleSheet?l.styleSheet.cssText=u:l.appendChild(document.createTextNode(u)),s.appendChild(l)),(c=document.createElement("div")).id=o,c.classList.add("gd__banner"),s.appendChild(c)),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;w.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){w.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 g.apply(this,arguments)})},{key:"_startInterstitialAd",value:(v=k.default(D.default.mark((function e(t){var n;return D.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(Ig(Ig({},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 v.apply(this,arguments)})},{key:"_loadInterstitialAd",value:(f=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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,Ig({adType:d.AdType.Interstitial},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;w.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){w.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){w.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=k.default(D.default.mark((function e(t){var n;return D.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(Ig(Ig({},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=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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,Ig({adType:d.AdType.Rewarded},t));case 11:return r=e.sent,e.next=14,new Promise(function(e,t){var n=this;w.default(this,a);var r="videoad.preloadad";this.eventBus.unsubscribeScope(r);var i=function(t){w.default(this,n),this.eventBus.unsubscribeScope(r),e(t.message)}.bind(this),s=function(e){w.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:(l=k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedInterstitialAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(d.AdType.Interstitial);case 5:e.t0=e.sent;case 6:return this.preloadedInterstitialAdVast=e.t0,e.abrupt("return",this.preloadedInterstitialAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"_preloadRewardedAd",value:(u=k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,e.t0=this.preloadedRewardedAdVast,e.t0){e.next=6;break}return e.next=5,this._getAdVast(d.AdType.Rewarded);case 5:e.t0=e.sent;case 6:return this.preloadedRewardedAdVast=e.t0,e.abrupt("return",this.preloadedRewardedAdVast.url);case 10:throw e.prev=10,e.t1=e.catch(0),new Error(e.t1);case 13:case"end":return e.stop()}}),e,this,[[0,10]])}))),function(){return 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.adsManager.setVolume(0),r&&this.eventBus.broadcast("AD_T4R"),r&&setTimeout(function(){w.default(this,t),this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1)}.bind(this),((null==a?void 0:a.min)||1234)+Math.random()*((null==a?void 0:a.max)||3210))):"click"!==n&&"first_quartile"!==n||(this.activeAdContainer.style.opacity=1,this.adsManager.setVolume(1))}}},{key:"_createPlayer",value:function(){var e=this,t=document.body||document.getElementsByTagName("body")[0];this.adContainer=document.createElement("div"),this.adContainer.id="".concat(this.prefix,"advertisement"),this.adContainer.style.position=this.thirdPartyContainer?"absolute":"fixed",this.adContainer.style.zIndex=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(){w.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(){w.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,n=new Date,r=n.getHours(),a=n.getDate(),i=n.getMonth(),s=n.getFullYear(),o=d.getKeyByValue(google.ima.AdEvent.Type,e.type),u=!1,l=(null==e||null===(t=e.getAd())||void 0===t?void 0:t.getContentType())||"",c=!l.startsWith("image")&&!l.startsWith("text");this._sendIMAEventsToHB(e);var h="";switch(e.type){case google.ima.AdEvent.Type.AD_BREAK_READY:h="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:h="Fired when an ads list is loaded.";break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:u=!0,h="Fired when the ads manager is done playing all the ads.";break;case google.ima.AdEvent.Type.CLICK:h="Fired when the ad is clicked.";var p=e.getAd().getContentType();this._show({mode:"click",contentType:p});break;case google.ima.AdEvent.Type.COMPLETE:u=this._is_completed(e.getAd()),h="Fired when the ad completes playing.",this.adType_===d.AdType.Rewarded&&this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"});break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:h="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:h="Fired when content should be resumed. This usually happens when an ad finishes or collapses.",u=!0;break;case google.ima.AdEvent.Type.DURATION_CHANGE:h="Fired when the ad's duration changes.";break;case google.ima.AdEvent.Type.FIRST_QUARTILE:h="Fired when the ad playhead crosses first quartile.";var f=e.getAd().getContentType();this._show({mode:"first_quartile",contentType:f});break;case google.ima.AdEvent.Type.IMPRESSION:h="Fired when the impression URL has been pinged.";break;case google.ima.AdEvent.Type.INTERACTION:h="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:h="Fired when the displayed ad changes from linear to nonlinear, or vice versa.";break;case google.ima.AdEvent.Type.LOADED:var m=e.getAd().getContentType();h=m,this._show({mode:"loaded",contentType:m});break;case google.ima.AdEvent.Type.LOG:e.getAdData().adError&&(h=e.getAdData());break;case google.ima.AdEvent.Type.MIDPOINT:h="Fired when the ad playhead crosses midpoint.";break;case google.ima.AdEvent.Type.PAUSED:c&&this.adResume.show(),h="Fired when the ad is paused.";break;case google.ima.AdEvent.Type.RESUMED:h="Fired when the ad is resumed.",c&&this.adResume.hide();break;case google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED:h="Fired when the displayed ads skippable state is changed.";break;case google.ima.AdEvent.Type.SKIPPED:u=this._is_completed(e.getAd()),h="Fired when the ad is skipped by the user.";break;case google.ima.AdEvent.Type.STARTED:h="Fired when the ad starts playing.";break;case google.ima.AdEvent.Type.THIRD_QUARTILE:h="Fired when the ad playhead crosses third quartile.";break;case google.ima.AdEvent.Type.USER_CLOSE:u=this._is_completed(e.getAd()),h="Fired when the ad is closed by the user.";break;case google.ima.AdEvent.Type.VOLUME_CHANGED:h="Fired when the ad volume has changed.";break;case google.ima.AdEvent.Type.VOLUME_MUTED:h="Fired when the ad volume has been muted."}""!==o&&""!==h&&this.eventBus.broadcast(o,{name:o,message:h,status:"success",analytics:{category:o,action:this.parentDomain,label:"h".concat(r," d").concat(a," m").concat(i," y").concat(s)}}),u&&!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(){w.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(kg(e.getInnerError)){var t=e.getInnerError();if(t)return kg(t.getErrorCode)&&kg(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(w.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];c.isPlainObject(i)&&(r.query[a]=C.default.stringify(i))}var s=new R.default(r.url,!0);return P.default(s.query,r.query||{}),Ig({url:s.toString()},t)}}},{key:"_transformVast",value:function(e,t){var n={url:e.url};try{var r=new R.default(e.url,!0),a=this._transformQuery(e,t,r);a&&(n.url=r.toString());var i=a?r:new R.default(e.url,!0);if(i.query.cust_params){var s=C.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&&c.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&&c.isPlainObject(this.options.retry_on_failure.vast_query)&&(a=this.options.retry_on_failure.vast_query),a=I.default(a),c.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=C.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 w.default(this,r),e.tnl_keys[t.toLowerCase()]}.bind(this)});return i.cust_params=o,P.default(i,u),i.cust_params=C.default.stringify(i.cust_params),!0}}}},{key:"_isT4R",value:function(e){var t,n,r,a,i,s,o,d,u,l,c,h=null===(t=this._adrequest_user_context)||void 0===t?void 0:t.tnl_ad_pos;if(null!=e&&null!==(n=e.contentType)&&void 0!==n&&n.startsWith("image/")||"text"===(null==e?void 0:e.contentType))return h&&("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===(l=u.rAds)||void 0===l||null===(c=l.t4r)||void 0===c?void 0:c.enabled));if(null!=e&&e.contentType.startsWith("video/")){var p,f,m,v,g,y,b,_,w,A="preroll"===h?null===(p=this.gameData)||void 0===p||null===(f=p.pAds)||void 0===f||null===(m=f.t4r)||void 0===m?void 0:m.viper:"midroll"===h?null===(v=this.gameData)||void 0===v||null===(g=v.mAds)||void 0===g||null===(y=g.t4r)||void 0===y?void 0:y.viper:"rewarded"===h?null===(b=this.gameData)||void 0===b||null===(_=b.rAds)||void 0===_||null===(w=_.t4r)||void 0===w?void 0:w.viper:0;if(A>0){var E,k,x,T,D,S,R,O,I,C=Math.random()<A;return h&&C&&("preroll"===h&&(null===(E=this.gameData)||void 0===E||null===(k=E.pAds)||void 0===k||null===(x=k.t4r)||void 0===x?void 0:x.enabled)||"midroll"===h&&(null===(T=this.gameData)||void 0===T||null===(D=T.mAds)||void 0===D||null===(S=D.t4r)||void 0===S?void 0:S.enabled)||"rewarded"===h&&(null===(R=this.gameData)||void 0===R||null===(O=R.rAds)||void 0===O||null===(I=O.t4r)||void 0===I?void 0:I.enabled))}return!1}return!1}},{key:"_isVMAP",value:function(e){var t,n,r,a,i,s,o,d,u,l,c,h,p,f,m;if(!e)return!1;var v="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===(l=u.vmap)||void 0===l?void 0:l.enabled))||"rewarded"===e&&(!0===(null===(c=this.gameData)||void 0===c||null===(h=c.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(!v)return!1;var g=this._get_vmap_config(e),y=this.adCounter[e];return void 0!==(null==g?void 0:g.start)?y>=(null==g?void 0:g.start):v}},{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,l,c,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===(l=u.dp)||void 0===l?void 0:l.enabled))||"rewarded"===e&&(!0===(null===(c=this.gameData)||void 0===c||null===(h=c.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;w.default(this,e);try{var r={id:this.topDomain||this.parentDomain,au:"display",ty:"display",aid:this.gameData.gameId,pgu:this.parentURL},a=new Ag(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 w.default(this,n),e.json()}.bind(this)).then(function(e){if(w.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){w.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=k.default(D.default.mark((function r(a){var i,s,o,d,u,l,c=this;return D.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 Ag(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,l=(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 w.default(this,c),e.json()}.bind(this)).then(function(e){if(w.default(this,c),!e||!e.p)return n.msgrt.send("dp.na",{message:"atom"}),a();var t=e.p/100;a({id:Date.now(),floor_price:t,error_url:"https://tag.atom.gamedistribution.com/v1/err?ar=".concat(d,"&ec=[ERRORCODE]"),impression_url:"https://tag.atom.gamedistribution.com/v1/imp?ar=".concat(d),skip_url:"https://tag.atom.gamedistribution.com/v1/skp?ar=".concat(d),promo_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow?ar=".concat(d):void 0,promo_imp_blue_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/blue":void 0,promo_imp_green_url:l?"https://tag.atom.gamedistribution.com/v1/rainbow/green":void 0})}.bind(this)).catch(function(e){w.default(this,c),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 R.default(t.vastUrl,!0);if(null===(r=a.query)||void 0===r||!r.cust_params)return;if(!C.default.parse(a.query.cust_params).tnl_asset_id)return;n.bidFloor,n.isDfpBidding;var i=S.default(n,Rg);a.query.cust_params=C.default.stringify(Ig(Ig({},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=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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 w.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;w.default(this,a),window.idhb.addEventListener("slotRenderEnded",function(t){var n=this;w.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){w.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){w.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=k.default(D.default.mark((function e(t){var n,r,a=this;return D.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 w.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=k.default(D.default.mark((function e(t){var n,r,a,i,s=this;return D.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 w.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=k.default(D.default.mark((function e(t){var n,r,a,i,s,o,d=this;return D.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(){w.default(this,d),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){w.default(this,d),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(){w.default(this,d),this._send_atom_event("sg.ad.rw.dismissed")}.bind(this),i=function(){w.default(this,d),this.eventBus.broadcast("COMPLETE",{message:"",status:"success"}),this.eventBus.broadcast("SDK_REWARDED_WATCH_COMPLETE",{message:"",status:"success"}),this._send_atom_event("sg.ad.rw.viewed")}.bind(this),s=function(e){w.default(this,d),e()}.bind(this),o=function(e){w.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=k.default(D.default.mark((function e(t){var n,r=this;return D.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){w.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=k.default(D.default.mark((function e(t){var n,r,a,i=this;return D.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(){w.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){w.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){w.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=k.default(D.default.mark((function e(t){var n,r,a,i=this;return D.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(){w.default(this,i),this.eventBus.broadcast("CONTENT_PAUSE_REQUESTED",{message:"",status:"success"}),this.eventBus.broadcast("IMPRESSION",{message:"",status:"success"})}.bind(this),r=function(){w.default(this,i),this.eventBus.broadcast("CONTENT_RESUME_REQUESTED",{message:"",status:"success"})}.bind(this),a=function(e){w.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;if(n===d.AdType.Rewarded)t="reward";else if(n===d.AdType.Interstitial){var r,a;if(this._isAfgPositionStart(e))t=null===(r=this.gameData.pAds)||void 0===r||!r.enabled||null!==(a=this.gameData.loader)&&void 0!==a&&a.enabled?"start":"next";else this._isAfgPositionNext(e)&&(t="next")}e.params.position=t}}]),e}(),Lg=Array.isArray,Mg=Object.prototype.toString,jg=Lg||function(e){return!!e&&"[object Array]"==Mg.call(e)},Ug=ga,Bg=G,Ng=Da,Gg=Ya,qg=we,Fg=Er,Vg=Sr,Kg=ye,Wg=Di,zg=It,Hg=so,$g=vi("slice"),Qg=zg("species"),Yg=Bg.Array,Jg=Math.max;Ug({target:"Array",proto:!0,forced:!$g},{slice:function(e,t){var n,r,a,i=Kg(this),s=Vg(i),o=Fg(e,s),d=Fg(void 0===t?s:t,s);if(Ng(i)&&(n=i.constructor,(Gg(n)&&(n===Yg||Ng(n.prototype))||qg(n)&&null===(n=n[Qg]))&&(n=void 0),n===Yg||void 0===n))return Hg(i,o,d);for(r=new(void 0===n?Yg:n)(Jg(d-o,0)),a=0;o<d;o++,a++)o in i&&Wg(r,a,i[o]);return r.length=a,r}});var Xg=ln,Zg=ks,ey=xa,ty=W,ny=ht,ry=function(e,t,n,r){try{return r?t(Xg(n)[0],n[1]):t(n)}catch(t){Zg(e,"throw",t)}},ay=ds,iy=Ya,sy=Sr,oy=Di,dy=_s,uy=ps,ly=G.Array,cy=function(e){var t=ny(e),n=iy(this),r=arguments.length,a=r>1?arguments[1]:void 0,i=void 0!==a;i&&(a=ey(a,r>2?arguments[2]:void 0));var s,o,d,u,l,c,h=uy(t),p=0;if(!h||this==ly&&ay(h))for(s=sy(t),o=n?new this(s):ly(s);s>p;p++)c=i?a(t[p],p):t[p],oy(o,p,c);else for(l=(u=dy(t,h)).next,o=n?new this:[];!(d=ty(l,u)).done;p++)c=i?ry(u,a,[d.value,p],!0):d.value,oy(o,p,c);return o.length=p,o};ga({target:"Array",stat:!0,forced:!zs((function(e){Array.from(e)}))},{from:cy});var hy,py,fy,my=!F((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),vy=G,gy=mt,yy=be,by=ht,_y=my,wy=Mn("IE_PROTO"),Ay=vy.Object,Ey=Ay.prototype,ky=_y?Ay.getPrototypeOf:function(e){var t=by(e);if(gy(t,wy))return t[wy];var n=t.constructor;return yy(n)&&t instanceof n?n.prototype:t instanceof Ay?Ey:null},xy=F,Ty=be,Dy=ky,Sy=_n.exports,Ry=It("iterator"),Oy=!1;[].keys&&("next"in(fy=[].keys())?(py=Dy(Dy(fy)))!==Object.prototype&&(hy=py):Oy=!0);var Iy=null==hy||xy((function(){var e={};return hy[Ry].call(e)!==e}));Iy&&(hy={}),Ty(hy[Ry])||Sy(hy,Ry,(function(){return this}));var Cy={IteratorPrototype:hy,BUGGY_SAFARI_ITERATORS:Oy},Py=Cy.IteratorPrototype,Ly=tl,My=X,jy=Yi,Uy=as,By=function(){return this},Ny=ga,Gy=W,qy=ir,Fy=be,Vy=function(e,t,n){var r=t+" Iterator";return e.prototype=Ly(Py,{next:My(1,n)}),jy(e,r,!1),Uy[r]=By,e},Ky=ky,Wy=zi,zy=Yi,Hy=bn,$y=_n.exports,Qy=as,Yy=qy.PROPER,Jy=qy.CONFIGURABLE,Xy=Cy.IteratorPrototype,Zy=Cy.BUGGY_SAFARI_ITERATORS,eb=It("iterator"),tb=function(){return this},nb=function(e,t,n,r,a,i,s){Vy(n,t,r);var o,d,u,l=function(e){if(e===a&&m)return m;if(!Zy&&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)}},c=t+" Iterator",h=!1,p=e.prototype,f=p[eb]||p["@@iterator"]||a&&p[a],m=!Zy&&f||l(a),v="Array"==t&&p.entries||f;if(v&&(o=Ky(v.call(new e)))!==Object.prototype&&o.next&&(Ky(o)!==Xy&&(Wy?Wy(o,Xy):Fy(o[eb])||$y(o,eb,tb)),zy(o,c,!0)),Yy&&"values"==a&&f&&"values"!==f.name&&(Jy?Hy(p,"name","values"):(h=!0,m=function(){return Gy(f,this)})),a)if(d={values:l("values"),keys:i?m:l("keys"),entries:l("entries")},s)for(u in d)(Zy||h||!(u in p))&&$y(p,u,d[u]);else Ny({target:t,proto:!0,forced:Zy||h},d);return p[eb]!==m&&$y(p,eb,m,{name:a}),Qy[t]=m,d},rb=bp.charAt,ab=Cu,ib=Zn,sb=nb,ob=ib.set,db=ib.getterFor("String Iterator");sb(String,"String",(function(e){ob(this,{type:"String Iterator",string:ab(e),index:0})}),(function(){var e,t=db(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=rb(n,r),t.index+=e.length,{value:e,done:!1})})),wf("iterator");var ub=ye,lb=dv,cb=as,hb=Zn,pb=nb,fb=hb.set,mb=hb.getterFor("Array Iterator"),vb=pb(Array,"Array",(function(e,t){fb(this,{type:"Array Iterator",target:ub(e),index:0,kind:t})}),(function(){var e=mb(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");cb.Arguments=cb.Array,lb("keys"),lb("values"),lb("entries");var gb=G,yb=cc,bb=fc,_b=vb,wb=bn,Ab=It,Eb=Ab("iterator"),kb=Ab("toStringTag"),xb=_b.values,Tb=function(e,t){if(e){if(e[Eb]!==xb)try{wb(e,Eb,xb)}catch(t){e[Eb]=xb}if(e[kb]||wb(e,kb,t),yb[t])for(var n in _b)if(e[n]!==_b[n])try{wb(e,n,_b[n])}catch(t){e[n]=_b[n]}}};for(var Db in yb)Tb(gb[Db]&&gb[Db].prototype,Db);function Sb(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 Rb(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 Rb(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 Rb(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 Ob(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ib(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ob(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ob(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Tb(bb,"DOMTokenList");var Cb={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"}},Pb={},Lb=function(e,t){Pb[e]=Ib(Ib({},t),{},{isLoading:!1})},Mb=function(e){var t=this,n=e.id,r=e.src;return new Promise(function(e,a){if(w.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))},jb=function(){var e=k.default(D.default.mark((function e(t){var n,r,a,i,s,o,d,u;return D.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=Pb[t]).isLoading){e.next=6;break}return e.abrupt("return");case 6:r.isLoading=!0,a=Sb(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=Cb[s].name,!window[o]){e.next=16;break}return e.abrupt("continue",24);case 16:return e.next=18,Mb({id:s,src:Cb[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,Mb({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)}}(),Ub=function e(t){var n=this;x.default(this,e),E.default(this,"load",k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jb(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),E.default(this,"promo",k.default(D.default.mark((function e(){return D.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},Lb(this.moduleName,this.moduleConfig)},Bb=function e(t){var n=this;x.default(this,e),E.default(this,"load",k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jb(n.moduleName);case 2:n.module=e.sent;case 3:case"end":return e.stop()}}),e)})))),E.default(this,"splash",k.default(D.default.mark((function e(){return D.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},Lb(this.moduleName,this.moduleConfig)},Nb=function(e,t){console.log(e,t)},Gb={},qb={},Fb=null;function Vb(){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 Gb.version=r,Gb.frame=e,Gb.function=n,Gb.version}function Kb(e){var t=this;return Fb||(Fb=new Promise(function(n){function r(t,r){if(Nb("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:Gb,consentData:a}),void n({result:"ok",consentData:t})):void 0;n({result:"ok",consentData:t})}else n({result:"cmpCallFailed"})}w.default(this,t),Vb(),Gb.frame?2===Gb.version?(Nb("TCF v2 CMP found. Fetching the consent."),Gb.function?(Nb("CMP API is directly accessible, calling it now..."),Gb.function("addEventListener",Gb.version,r)):(Nb("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!==qb[r.callId]&&qb[r.callId](r.returnValue,r.success)}}window[a]=function(e,n,i,s){w.default(this,r);var o=Math.random()+"",d="".concat(a,"Call"),u=E.default({},d,{command:e,parameter:s,callId:o,version:n});qb[o]=i,t.postMessage(u,"*")}.bind(this),window.addEventListener("message",i,!1),window[a](e,Gb.version,n)}("addEventListener",Gb.frame,r))):n({result:"cmpVersionNotV2",cmp:Gb}):n({result:"cmpNotFound"})}.bind(this)),Fb)}var Wb=new(function(){function e(){x.default(this,e),this.productName="Game Distribution"}var t;return T.default(e,[{key:"checkIfExcluded",value:function(e){try{var t,n;return!(null===(t=e.diagnostic)||void 0===t||null===(n=t.gameDock)||void 0===n||!n.excluded)}catch(e){return console.log("Error on checkIfExclude check",e),!1}}},{key:"track",value:(t=k.default(D.default.mark((function e(t,n){var r,a,i,s,o,d;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.checkIfExcluded(n)){e.next=3;break}return e.abrupt("return");case 3:if(a=null==t||null===(r=t.visitor)||void 0===r?void 0:r.visitorId){e.next=6;break}return e.abrupt("return");case 6:return i=encodeURIComponent(this.productName),s=encodeURIComponent(a),e.prev=8,o="https://tracker-v4.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=12,fetch(o,{method:"POST"});case 12:e.next=28;break;case 15:return e.prev=15,e.t0=e.catch(8),console.log("GAME_DOCK. fail v4",e.t0),e.prev=18,d="https://tracker.gamedock.io/v1/events-tracker/track/product/".concat(i,"/user_id/").concat(s),e.next=22,fetch(d,{method:"POST"});case 22:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(18),console.log("GAME_DOCK. fail v6",e.t1);case 28:case"end":return e.stop()}}),e,this,[[8,15],[18,25]])}))),function(e,n){return t.apply(this,arguments)})}]),e}());function zb(e){var t=this,n={},r=(null==e?void 0:e._ancestor_origins)||window.location.ancestorOrigins,a=(null==e?void 0:e.self_url)||window.location.href,i=(null==e?void 0:e.self_origin)||window.location.origin,s=(null==e?void 0:e.referrer_url)||document.referrer;function o(e){return j.default(n,e)}function d(e,t){return U.default(n,e,t)}function u(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&""!==e)try{return new R.default(e,t)}catch(e){console.log(e)}}function l(){for(var t=(null==e?void 0:e.urls)||[a,s],n=0;n<t.length;n++){var r,i=u(t[n]);if(i){var o=null===(r=i.query)||void 0===r?void 0:r.gd_sdk_referrer_url;if(o&&(o=decodeURIComponent(o),L.default.isURL(o)))return o}}}return function(){var e;w.default(this,t),function(){var e=0,t=window;try{for(;t!=t.parent;)e++,t=t.parent}catch(e){d("depth.error",e.message)}d("depth.value",e)}(),function(){var e=r,t=n.depth.value,a=i;if(d("top.domain.from","fallback"),e&&e.length>0)a=e[e.length-1],d("top.domain.from","origins");else if(0===t)a=i,d("top.domain.from","self-top");else if(1===t){var o=u(s);o&&(a=o.origin,d("top.domain.from","referrer"))}d("top.domain.value",a.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2"))}(),function(){var e=l();if(e)if(M.default(e))d("partner.domain.value",e),d("partner.domain.from","partner-domain");else{var t=u(e,!1);if(t)d("partner.domain.value",t.origin.replace(/^https?:\/\/(www\.)?(.*)$/i,"$2")),d("partner.domain.from","partner-url");else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","partner-fallback")}else d("partner.domain.value",n.top.domain.value),d("partner.domain.from","fallback")}(),e=l(),0===n.depth.value?(d("partner.url.value",a),d("partner.url.from","self-top")):e?M.default(e)?(d("partner.url.value",a),d("partner.url.from","partner-domain")):(d("partner.url.value",e),d("partner.url.from","partner-url")):(d("partner.url.value",s),d("partner.url.from","fallback"))}.bind(this)(),{get:o,print:function(e){console.log(o(e))}}}function Hb(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 $b(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 $b(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 $b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qb=function(e){var t=this,n=e.src,r=e.attributes,a=e.target,i=e.isAsync;return new Promise(function(e,s){var o=this;w.default(this,t);try{var d=document.createElement("script");if(d.async=null==i||i,d.type="text/javascript",d.onload=function(){w.default(this,o),e()}.bind(this),d.onerror=function(){w.default(this,o);var e="Error on script load, Error: ".concat(n);console.log(e),s(e)}.bind(this),d.src=n,r){var u,l=Hb(r);try{for(l.s();!(u=l.n()).done;){var c=u.value,h=c.key,p=c.value;d.setAttribute(h,p)}}catch(e){l.e(e)}finally{l.f()}}a||(a=document.head),a.appendChild(d)}catch(e){var f="Error on script load catch, Error: ".concat(n);console.log(f,e),s(f)}}.bind(this))},Yb=function(){var e=k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qb({src:"https://cdn.cookielaw.org/consent/tcf.stub.js",attributes:[{key:"id",value:"gd-cookie-pro-tcf-stub"},{key:"charset",value:"UTF-8"}],isAsync:!1});case 3:return e.next=5,Qb({src:"https://cookie-cdn.cookiepro.com/consent/".concat("140feb72-7952-4420-8ae5-e8978d87bc17","/OtAutoBlock.js"),attributes:[{key:"id",value:"gd-cookie-pro-autoblock"}],isAsync:!1});case 5:return e.next=7,Qb({src:"https://cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",attributes:[{key:"id",value:"gd-cookie-pro-stub"},{key:"charset",value:"UTF-8"},{key:"data-domain-script",value:"140feb72-7952-4420-8ae5-e8978d87bc17"}],isAsync:!1});case 7:n=void 0,r=void 0,a=void 0,n=(t={inlineScript:"function OptanonWrapper() { }"}).inlineScript,r=t.target,(a=document.createElement("script")).text=n,r||(r=document.head),r.appendChild(a),console.log("GD: CMP cookie pro loaded successfully."),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log("GD: CMP error on load",e.t0);case 14:case"end":return e.stop()}var t,n,r,a}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();function Jb(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 Xb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jb(Object(n),!0).forEach((function(t){E.default(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zb=null,e_=null,t_=function(){function e(t){var n=this;if(x.default(this,e),Zb)return Zb;Zb=this,this._defaults=this._getDefaultOptions(),this._extendDefaultOptions(this._defaults,t),this._version=t.version||"0.0.0",this._bridge=this._getBridgeContext(),this._location=new zb,this._location.print(),this._parentURL=this._bridge.parentURL,this._parentDomain=this._bridge.parentDomain,this._topDomain=this._bridge.topDomain,this._isFullScreen=!1,this._giftCount=0,this._setConsoleBanner(),this._initializeMessageRouter(),this._checkConsole(),this._subscribeToEvents(),this.sdkReady=new Promise(this._initializeSDKWithGameData.bind(this)),this.sdkReady.then(function(e){w.default(this,n),this._sdk_ready=!0}.bind(this)).catch(function(e){w.default(this,n),this._sdk_ready=!1}.bind(this)).finally(function(){var e=this;w.default(this,n),this._sendLoaderDataEvent(),this._checkSplashAndPromoScreens(),this._initBlockingExternals(),window.addEventListener("DOMNodeInserted",function(){if(w.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,l,c,h;return T.default(e,[{key:"_loadCMP",value:(h=k.default(D.default.mark((function e(){var t,n,r,a;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isMasterGameURL()){e.next=8;break}if(r=new zb,a=r.get("depth"),console.log("CMP location.depth",a),0!==(null==a?void 0:a.value)||null===(t=this._gameData)||void 0===t||null===(n=t.cmp)||void 0===n||!n.enabled){e.next=8;break}return e.next=7,Yb();case 7:console.log("CMP loaded");case 8:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"testConsent",value:function(){console.log("test-consent. Finding CMP");try{var e=Vb();console.log("CMP found",e),k.default(D.default.mark((function e(){var t;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Kb({});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._sendEvent("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:(c=k.default(D.default.mark((function e(t,n){var r,a=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._getGameData();case 3:return this._gameData=e.sent,e.next=6,this._loadCMP();case 6:this._bridge.isCoreSDKMode=!(!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 w.default(this,a),console.error(e.message||e)}.bind(this))),this._sendSDKReady(),t(this._gameData),e.next=22;break;case 17:e.prev=17,e.t0=e.catch(0),this._sendSDKError(e.t0),this.onResumeGame(e.t0.message,"warning"),n(e.t0);case 22:case"end":return e.stop()}}),e,this,[[0,17]])}))),function(e,t){return c.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=I.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=Wv.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){"undefined"===this._topDomain&&(this._topDomain=void 0);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(C.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:Wv.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.4.0/script/gamedock-sdk.min.js"];d.getScript(t[0],"GamedockSDK",{alternates:t}).then(function(){var t,n;w.default(this,e),e_=this._initGamedockTracker(window.GamedockSDK),this._sendEvent("pageview"),null!==(t=this._gameData.diagnostic)&&void 0!==t&&null!==(n=t.gameDock)&&void 0!==n&&n.adViewEvent&&e_.tracking.enableHeartBeatForPage({pageId:this.options.gameId,pageType:"game"}),Wb.track(e_,this._gameData),this._gameData.loader.enabled||this._sendLoadedEvent()}.bind(this)).catch(function(t){w.default(this,e),this._sendSDKError(t)}.bind(this))}catch(e){}}},{key:"_initGamedockTracker",value:function(e){if(!this._bridge.isCoreSDKMode)return e.initialize("gd",this._parentDomain)}},{key:"_sendEvent",value:function(e){e_.tracking.trackEvent(e,{pageId:this.options.gameId,pageType:"game"})}},{key:"_loadMiniJuegosGratisTracker",value:function(){var e=this;window.mpConfig={game:this.options.gameId,partner:"game-distribution"};var t=["https://ext.minijuegosgratis.com/external-host/main.js"];d.getScript(t[0],"MinijuegosSDK",{alternates:t}).catch(function(t){w.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 w.default(this,e),window.ga}.bind(this)}).then(function(){w.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){w.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 w.default(this,e),this.eventBus.subscribe(t,function(e){return w.default(this,n),this._onEvent(e)}.bind(this),"sdk")}.bind(this)),d.IMAEvents.forEach(function(t){var n=this;return w.default(this,e),this.eventBus.subscribe(t,function(e){return w.default(this,n),this._onEvent(e)}.bind(this),"ima")}.bind(this)),this.eventBus.subscribe("COMPLETE",function(){if(w.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 w.default(this,e),this.onPauseGame("New advertisements requested and loaded","success")}.bind(this),"ima"),this.eventBus.subscribe("IMPRESSION",function(t){var n,r;w.default(this,e),this.msgrt.send("ad.impression"),null!==(n=this._gameData.diagnostic)&&void 0!==n&&null!==(r=n.gameDock)&&void 0!==r&&r.adViewEvent&&Wb.track(e_,this._gameData)}.bind(this),"ima"),this.eventBus.subscribe("AD_ERROR",function(t){w.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){w.default(this,e),this._sendAdRequestContext(t.message)}.bind(this),"sdk"),this.eventBus.subscribe("SDK_ERROR",function(t){w.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){w.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){w.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 w.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(Wv.version,"&localTime=").concat((new Date).getHours())}},{key:"_checkBlocking",value:(l=k.default(D.default.mark((function e(){var t,n,r=this;return D.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(){w.default(this,r),window.location.href="https://html5.api.gamedistribution.com/blocked.html?".concat(C.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 l.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(){w.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,a=this._gameData,i=a.gdpr&&!0===a.gdpr.consent,s=a.loader,o=null===(e=a.promo)||void 0===e?void 0:e[null===(t=a.promo)||void 0===t||null===(n=t.template)||void 0===n?void 0:n.preroll];(a.preroll||(this.adRequestTimer=Date.now()),this.options.loader.enabled)?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):s.enabled&&!0!==(null===(r=s.splash)||void 0===r?void 0:r.skip)?this._createSplash(a,i):this.onResumeGame("Skipped splash.","success"):s.enabled||this._bridge.isTokenGameURL&&this._bridge.isExtHostedGameURL||(this.options.advertisementSettings.autoplay||i?null!=o&&o.enabled?this._createPromoBeforeSplash(a,i):!1!==s.enabled&&this._createSplash(a,i):null!=o&&o.enabled&&this._createPromo(a,i))}},{key:"_initializeVideoAd",value:(u=k.default(D.default.mark((function e(){var t;return D.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 Pg(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=Wv,this.adInstance._send("gd.location",this._location.get()),e.next=17,this.adInstance.start();case 17:case"end":return e.stop()}}),e,this)}))),function(){return 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;w.default(this,e);var r=this._getDefaultGameData(),a=this._getGameDataUrl();fetch(a).then(function(e){return w.default(this,n),e.json()}.bind(this)).then(function(e){if(w.default(this,n),e.success){var a,i,s,o,u=e.result.game,l={gameId:u.gameMd5,slug:u.slug,pname:u.pname,dname:u.dname,status:u.status,description:u.description,enableAds:!0===u.enableAds||!0===(null===(a=u.enableAds)||void 0===a?void 0:a.enabled),preroll:u.preRoll,midroll:6e4*u.timeAds,rewardedAds:u.rewardedAds,title:u.title,tags:u.tags,category:u.category,assets:u.assets,disp_2nd_prer:u.disp_2nd_prer,ctry_vst:u.ctry_vst,ctry:u.ctry,crtv:u.crtv,dmain:u.dmain,block_exts:this._parseAndSelectRandomOne(u.push_cuda),bloc_gard:this._parseAndSelectRandomOne(u.bloc_gard),cookie:this._parseAndSelectRandomOne(u.cookie),gdpr:this._parseAndSelectRandomOne(u.gdpr),diagnostic:this._parseAndSelectRandomOne(u.diagnostic),cmp:this._parseAndSelectRandomOne(u.cmp),sdk:this._parseAndSelectRandomOne(u.sdk)||{},loader:this._parseAndSelectRandomOne(u.loader)||{},splash:this._parseAndSelectRandomOne(u.splash)||{},promo:this._parseAndSelectRandomOne(u.promo)||{},dAds:this._parseAndSelectRandomOne(u.dads)||{},pAds:this._parseAndSelectRandomOne(u.pads)||{},mAds:this._parseAndSelectRandomOne(u.mads)||{},rAds:this._parseAndSelectRandomOne(u.rads)||{}},c=d.extendDefaults(I.default(r),l);c.afg_disabled=!1===(null===(i=c.sdk)||void 0===i||null===(s=i.afg)||void 0===s?void 0:s.enabled),null!==(o=c.pAds)&&void 0!==o&&o.enabled&&(c.preroll=!0),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){w.default(this,n),r.failed=!0,t(r)}.bind(this))}.bind(this))}},{key:"_createSplash",value:(o=k.default(D.default.mark((function e(t,n){var r,a,i=this;return D.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(Xb(Xb({},this.options),{},{isConsentDomain:n,version:Wv.version}),t,this._parentDomain)).on("playClick",function(){var e=this;if(w.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){w.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(){w.default(this,i),a.hide()}.bind(this)),this.eventBus.subscribe("SDK_GAME_START",function(){w.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=k.default(D.default.mark((function e(t,n){var r,a,i,s,o=this;return D.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(Xb(Xb({},this.options),{},{isConsentDomain:n,version:Wv.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){w.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=k.default(D.default.mark((function e(t,n){var r,a,i,s,o=this;return D.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(Xb(Xb({},this.options),{},{isConsentDomain:n,version:Wv.version,template:null===(r=t.promo)||void 0===r||null===(a=r.template)||void 0===a?void 0:a.preroll}),t)).on("done",function(){w.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(){w.default(this,e)}.bind(this))}},{key:"showAd",value:(a=k.default(D.default.mark((function e(t){var n,r=this,a=arguments;return D.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=k.default(D.default.mark((function e(a,i){var s,o,d,u,l,c,h,p,f,m,v,g,y,b=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,p={adType:t,params:n,adTimestamp:r.adRequestTimer},e.next=4,r.sdkReady;case 4:return f=e.sent,e.next=7,r.videoAdReady;case 7:return r._sendLoadedEvent(),r._rejectAdIfGameBlocked({gameData:f,adRequest:p}),r._rejectAdIfAdDisabled({gameData:f,adRequest:p}),r._rejectAdIfUnsupportedType({adRequest:p}),r._rejectAdIfRewardedDisabled({gameData:f,adRequest:p}),(null===(s=f.mAds)||void 0===s||null===(o=s.gift)||void 0===o||!o.enabled||null!==(d=f.mAds)&&void 0!==d&&null!==(u=d.gift)&&void 0!==u&&u.enabled&&(null==f||null===(l=f.mAds)||void 0===l||null===(c=l.gift)||void 0===c||null===(h=c.durations[r._giftCount])||void 0===h?void 0:h.after)!==r.adInstance.adMidrollCount)&&r._rejectAdIfAdRateHits({gameData:f,adRequest:p}),r.adInstance.attachAfgPosition(p),r._attachAfgFallback({gameData:f,adRequest:p}),m="main.showad",v=function(e){var t,n,a,s,o;w.default(this,b),r.eventBus.unsubscribeScope(m),r.onResumeGame(e.message,"warning"),null!=f&&null!==(t=f.mAds)&&void 0!==t&&null!==(n=t.gift)&&void 0!==n&&n.enabled&&(null==f||null===(a=f.mAds)||void 0===a||null===(s=a.gift)||void 0===s||null===(o=s.durations[r._giftCount])||void 0===o?void 0:o.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),i(e.message)}.bind(this),g=function(e){var t,n,i,s,o;w.default(this,b),r.eventBus.unsubscribeScope(m),r.adRequestTimer=Date.now(),r.onResumeGame("Advertisement(s) are done. Start / resume the game.","success"),null!=f&&null!==(t=f.mAds)&&void 0!==t&&null!==(n=t.gift)&&void 0!==n&&n.enabled&&(null==f||null===(i=f.mAds)||void 0===i||null===(s=i.gift)||void 0===s||null===(o=s.durations[r._giftCount])||void 0===o?void 0:o.after)===r.adInstance.adMidrollCount&&r.decideToGiveAGift(),a(e.message)}.bind(this),y=function(e){var s=this;w.default(this,b),r.eventBus.unsubscribeScope(m),n.fallback_adsense=!1,r.showAd(t,Xb(Xb({},n),{},{adapter:"adsense"})).then(function(e){w.default(this,s),a(e)}.bind(this)).catch(function(e){w.default(this,s),i(e)}.bind(this))}.bind(this),r.eventBus.subscribe("AD_ERROR",null!=n&&n.fallback_adsense?y:v,m),r.eventBus.subscribe("AD_SDK_CANCELED",null!=n&&n.fallback_adsense?y:v,m),r.eventBus.subscribe("AD_SUCCESS",g,m),e.next=24,r.adInstance.startAd(p);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,n,r,a,i,s,o=e.gameData,u=e.adRequest,l=null;u.adType===d.AdType.Interstitial&&null!==(t=o.diagnostic)&&void 0!==t&&null!==(n=t.useMidrollIndex)&&void 0!==n&&n.enabled&&this.adInstance.noPreroll?this.adInstance.adMidrollCount>(null===(r=o.diagnostic)||void 0===r||null===(a=r.useMidrollIndex)||void 0===a?void 0:a.indexes.length)-1||(l=6e4*(null===(i=o.diagnostic)||void 0===i||null===(s=i.useMidrollIndex)||void 0===s?void 0:s.indexes[this.adInstance.adMidrollCount])):l=o.midroll;if(u.adType===d.AdType.Interstitial&&void 0!==this.adRequestTimer&&Date.now()-this.adRequestTimer<l)throw new Error("The advertisement was requested too soon.")}},{key:"preloadAd",value:(r=k.default(D.default.mark((function e(t){var n=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=k.default(D.default.mark((function e(r,a){var i,s;return D.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=k.default(D.default.mark((function e(){var t=this;return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=k.default(D.default.mark((function e(n,r){return D.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=k.default(D.default.mark((function n(r,a){var i;return D.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(w.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){w.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;w.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 w.default(this,n),e.preventDefault(),this.msgrt.send("external",{message:"H> ".concat(a)}),!1}.bind(this))}.bind(this))}},{key:"_getBridgeContext",value:function(){var e=this._isTokenGameURL(),t=this._isMasterGameURL(),n=this._isExtHostedGameURL(),r=e||n?this._getTokenGameURLConfig():{};r=r||{};var a=decodeURIComponent((e||n)&&r.parentURL?r.parentURL:d.getParentUrl()),i=decodeURIComponent((e||n)&&r.parentDomain?r.parentDomain:d.getParentDomain()),s=decodeURIComponent((e||n)&&r.topDomain?r.topDomain:n&&0===d.getIframeDepth()?i:d.getTopDomain()),o=(e||n)&&r.loaderEnabled,u=(e||n)&&r.loaderEnabled,l=(e||n)&&r.loaderEnabled,c=(e||n)&&r.loaderEnabled,h=(e||n)&&r.loaderEnabled,p=(e||n)&&r.loaderEnabled,f=(e||n)&&r.loaderEnabled,m=(e||n)&&r.loaderEnabled,v=(e||n)&&r.loaderEnabled&&r.hasImpression&&r.version>="1.1.24";return{isTokenGameURL:e,isMasterGameURL:t,isExtHostedGameURL:n,noConsoleBanner:o,noLoadedEvent:u,noBlockerEvent:l,noPreroll:m,parentURL:a,parentDomain:i,topDomain:s&&s.length?s:i,noGAPageView:c,noLotamePageView:h,noGamedockSDK:p,noMinijuegosSDK:f,version:r.version,pauseGameOnStartup:v,depth:d.getIframeDepth(),domainMatched:i===s,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 R.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 R.default(document.referrer,!0);if(!r.query.gd_zone_config)return;e=r.query.gd_zone_config}else{var a=new R.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 Bb(t).splash()}},{key:"_createPrerollPromoTemplate",value:(t=k.default(D.default.mark((function e(t){var n,r,a,i,s;return D.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 Ub(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 R.default(location.href,!0);return n.query=n.query||{},n.query.gd_zone_config=t,"?".concat(C.default.stringify(n.query))}catch(e){return"?gd_zone_config=".concat(t)}}},{key:"_extendUrlQuery",value:function(e,t){var n=new R.default(e,!0);return n.query=Xb(Xb({},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"===A.default(e)?e:d.parseJSON(e));return t&&t.version?Wv.version>=t.version?t:void 0:t}},{key:"_selectRandomOne",value:function(e){var t=this;if(!jg(e)||0===e.length)return e;if(1===e.length)return e[0];var n=0;e.forEach(function(e){w.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=k.default(D.default.mark((function t(n,r){var a;return D.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 w.default(this,e),t.hasOwnProperty("name")&&512===t.width&&512===t.height}.bind(this));return n||(n=t.assets.length>0?t.assets[0]:{name:"logo.svg"}),"https://img.gamedistribution.com/".concat(n.name)}},{key:"_post_message",value:function(e){var t,n=e.topic,r=e.data,a=null!==(t=location.ancestorOrigins)&&void 0!==t&&t.length?location.ancestorOrigins[location.ancestorOrigins.length-1]:"*";try{var i=window.top||window.parent;i&&i.postMessage({source:"gdsdk",topic:n,data:r},a)}catch(e){console.error((null==e?void 0:e.message)||e)}}},{key:"decideToGiveAGift",value:function(){var e=this;try{var t,n,r=null===(t=this._gameData)||void 0===t||null===(n=t.mAds)||void 0===n?void 0:n.gift;this.giftInterval=setInterval(k.default(D.default.mark((function t(){var n=this;return D.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.adInstance.requestRunning?console.log("Advertisement already running..."):(e.showAd(d.AdType.Interstitial,{position:"midroll"}).catch(function(e){w.default(this,n)}.bind(this)),clearInterval(e.giftInterval),e.giftInterval=void 0,e._giftCount++);case 1:case"end":return t.stop()}}),t,this)}))),1e3*r.durations[this._giftCount].wait)}catch(e){console.log("Advertisement Error...")}}}]),e}(),n_=new function e(){var t=this;x.default(this,e),E.default(this,"load",k.default(D.default.mark((function e(){return D.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jb("Leaderboard");case 2:t.leaderboard=e.sent;case 3:case"end":return e.stop()}}),e)})))),E.default(this,"showLeaderboard",function(){var e=k.default(D.default.mark((function e(n){var r;return D.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)}}()),E.default(this,"addScore",function(){var e=k.default(D.default.mark((function e(n){return D.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"]},Lb(this.moduleName,this.moduleConfig)},r_=new t_(function(){var e={};try{"object"===("undefined"==typeof GD_OPTIONS?"undefined":A.default(GD_OPTIONS))&&GD_OPTIONS?e=GD_OPTIONS:window.gdApi&&"object"===A.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 a_(){var e=this;this.AdType=d.AdType,this.preloadAd=function(e){return r_.preloadAd(e)},this.showAd=function(e,t){return e===d.AdType.Display?r_.showDisplayAd(t):r_.showAd(e)},this.cancelAd=function(){return r_.cancelAd()},this.openConsole=function(){r_.openConsole()},this.getSession=function(){return r_.session()},this.leaderboard={show:function(){w.default(this,e),n_.showLeaderboard()}.bind(this),addScore:function(t){w.default(this,e),n_.addScore(t)}.bind(this)}}a_.prototype=new function(){this.showBanner=function(){r_.showBanner()},this.play=function(){},this.customLog=function(){}},window.gdsdk=new a_,window.gdApi=window.gdsdk;
|