Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@goodgamestudios/cxf-announcements

Package Overview
Dependencies
Maintainers
24
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goodgamestudios/cxf-announcements - npm Package Compare versions

Comparing version 0.19.2-qa.2 to 0.19.2-qa.4

4

dist/announcements.js

@@ -1,2 +0,2 @@

!function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},e={},n={},r=t.parcelRequireb657;function o(t,e,n,r,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function c(t){o(i,r,a,c,u,"next",t)}function u(t){o(i,r,a,c,u,"throw",t)}c(void 0)}))}}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){i(t,e,n[e])}))}return t}function u(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||u(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}null==r&&((r=function(t){if(t in e)return e[t].exports;if(t in n){let r=n[t];delete n[t];let o={id:t,exports:{}};return e[t]=o,r.call(o.exports,o,o.exports),o.exports}var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(t,e){n[t]=e},t.parcelRequireb657=r);var f,h,g,d,p,m={};Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=new Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var a=e[o];if(t.call(r,a,o,e))return a;o++}},configurable:!0,writable:!0});var y,v,w,E,_,N="CXF-ANNOUNCEMENT",O={info:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(h=console).info.apply(h,["%c ".concat(N," ->"),"background: green; color: yellow"].concat(l(e)))},log:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(g=console).info.apply(g,["%c ".concat(N," ->"),"background: green; color: yellow"].concat(l(e)))},warn:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(d=console).warn.apply(d,["%c ".concat(N," ->"),"background: orange; color: yellow"].concat(l(e)))},error:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];(p=console).error.apply(p,["%c ".concat(N," ->"),"background: red; color: yellow"].concat(l(e)))}},A=(f={containsInstance:function(t,e,n){var r=t.find((function(t){return t.id===e}));return!!r&&(r=r.instances.find((function(t){return t===n})),Boolean(r))},sharedCommands:{CLOSE_POPUP:"cxf.announcements.closePopup",MARK_AS_READ:"cxf.announcements.markAsRead",SHOW_ANNOUNCEMENTS:"cxf.announcements.getAllAnnouncements",TRACKING:"cxf.announcements.tracking"},appendLoginParams:function(t,e){return t+"/"+e.network+"/"+e.instance+"/"+e.lang},ANNOUNCEMENTS_LOCALSTORAGE_KEY:"ggs.cxf.announcements.fetchedAnnouncements",hashCode:function(t){for(var e=0,n=0;n<t.length;n++)e=Math.imul(31,e)+t.charCodeAt(n)|0;return e},getHashKey:function(t,e,n,r){var o=[t,e,n,r].join("_");return"ggs.cxf.announcements.".concat(o,".messageHash")},logger:O,subtractArray:function(t,e){return t.filter((function(t){return!e.includes(t)}))}}).subtractArray,S=f.sharedCommands,L=f.ANNOUNCEMENTS_LOCALSTORAGE_KEY,b=(y={CXF_DIALOG_OPEN:"cxf.dialog.open",CXF_DIALOG_CLOSE:"cxf.dialog.close"}).CXF_DIALOG_CLOSE,C="game.button.clicked.",x={GET_ANNOUNCEMENTS:"".concat(C,"getAnnouncements"),OPEN_ANNOUNCEMENTS:"".concat(C,"openAnnouncements")},T=(v={GAME_CALLBACK:{UNREAD_ANNOUNCEMENTS:"setCapToolNotifications"},GAME:{BIG_FARM:"bigfarm",EMPIRE:"empire",E4K:"empirefourkingdoms"},GAME_BUTTON_CLICKED_PREFIX:C,GAME_ANNOUNCEMENTS_EVENT:x,OPEN:x.OPEN_ANNOUNCEMENTS,GET:x.GET_ANNOUNCEMENTS}).GET,I=f.logger,P="cxf.tracking.message",k=(w={init:function(t){I.log("tracking has been initialized",t),E=t},tracking:function(t,e,n){var r=function(t){var e;return t&&(e=Array.isArray(t.Items)?t.Items[0]:t),e}(e),o={eventId:1236,gameId:Number.parseInt(E.gameId,10),networkId:Number.parseInt(E.networkId,10),instanceId:E.instanceId,playerId:E.playerId,language:E.countryCode,date:(new Date).toUTCString(),zoneId:E.zoneId,actionType:t},a=r.id,i=r.start_date,u=r.end_date,s=r.title;(o=c({},o,n)).id=a,o.scheduleStart=new Date(i).toUTCString(),o.scheduleEnd=new Date(u).toUTCString(),o.name=s,I.log(P,JSON.stringify(o,null,4)),E.emit(P,o)},OPEN_ANNOUNCEMENTS:"click",ANNOUNCEMENT_READY:"announcement_ready",CLOSE_CROSS:"close_cross",CLOSE_REGULAR:"close_regular",DONT_SHOW_AGAIN_ACTIVATE:"dont_show_again_activate",DONT_SHOW_AGAIN_DEACTIVATE:"dont_show_again_deactivate",SCROLL:"scroll",LOADED:"loaded"}).tracking,R=w.DONT_SHOW_AGAIN_ACTIVATE,U=w.DONT_SHOW_AGAIN_DEACTIVATE;function G(t){var e=t.hash,n=t.wasRead,r=j(e.key),o=n?R:U,a=!0,i=!1,c=void 0;try{for(var u,s=_[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var l=u.value;k(o,l)}}catch(t){i=!0,c=t}finally{try{a||null==s.return||s.return()}finally{if(i)throw c}}var f=n?r.concat(e.hashList):A(r,e.hashList);0===f.length?localStorage.removeItem(e.key):localStorage.setItem(e.key,JSON.stringify(f))}function M(t){localStorage.removeItem(L),_=void 0,t.emit(b)}function j(t){var e=localStorage.getItem(t)||"[]";return JSON.parse(e)}function D(){var t=localStorage.getItem(L)||"[]";return JSON.parse(t)}var F=function(t,e){return e.start_date-t.start_date};function K(t){var e=t.frameId,n=D().sort(F);if(n&&n.length>0){var r=document.getElementById(e).contentWindow;_=n;var o=Date.now();r.postMessage({messages:n,triggeredTimestamp:o},"*"),localStorage.setItem(L,JSON.stringify([]))}}var J=new Map([["okBtn",w.CLOSE_REGULAR],["crossBtn",w.CLOSE_CROSS],["scrolled",w.SCROLL],["loaded",w.LOADED]]);(m={addWindowListeners:function(t){window.addEventListener("message",(function(e){if(e.data&&e.data.name)switch(e.data.name){case S.MARK_AS_READ:G(e.data),t.emit(T);break;case S.CLOSE_POPUP:M(t);break;case S.SHOW_ANNOUNCEMENTS:K(e.data);break;case S.TRACKING:var n=!0,r=!1,o=void 0;try{for(var a,i=_[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value;if("scrolled"===e.data.action)e.data.params.scrolledAnnouncements.includes(c.id)&&k(J.get(e.data.action),c,e.data.params);else k(J.get(e.data.action),c,e.data.params)}}catch(t){r=!0,o=t}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}}),!1)},getDoNotShowMessages:j}).__internals={markAsRead:G,getDoNotShowMessages:j,getMessages:D,closeFrame:M,showAllMessages:K,setAllActiveAnnouncements:function(t){_=t}};var B,H=m.addWindowListeners,z=f.logger,V=v.GAME;r.register("6G6uw",(function(t,e){t.exports={getPlayerInfo:function(t){var e=JSON.parse(t[1]);return{playername:e.gpi.PN,level:e.gxp.LVL}},getLevel:function(t){return JSON.parse(t[1]).LVL},lastTutorialLevel:5,loginCmd:"gbd",levelUpCmd:"gxp"}})),r.register("6j118",(function(t,e){t.exports={getPlayerInfo:function(t){return{playername:t.playerIdentity.name,level:t.xp.level}},getLevel:function(t){return t.newLevel},lastTutorialLevel:1,loginCmd:"LOGIN_BASIC_DATA",levelUpCmd:"LEVEL_UP"}})),r.register("48Zgp",(function(t,e){t.exports={getPlayerInfo:function(t){var e=JSON.parse(t[1]);return{playername:e.gpi.PN,level:e.gxp.LVL}},getLevel:function(t){return JSON.parse(t[1]).LVL},lastTutorialLevel:5,loginCmd:"gbd",levelUpCmd:"gxp",logoutCmd:"LOGOUT"}}));var W=(i(B={},V.EMPIRE,r("6G6uw")),i(B,V.BIG_FARM,r("6j118")),i(B,V.E4K,r("48Zgp")),B),X=v.OPEN,Y=v.GET,q=w.init;r.register("1u8Ob",(function(t,e){var n=r("2AL7D"),o=(n.mark(C),r("7hs5J"),r("15hBX").acronym),i=f.appendLoginParams,u=f.ANNOUNCEMENTS_LOCALSTORAGE_KEY,l=f.hashCode,h=f.getHashKey,g=f.logger,d=m.getDoNotShowMessages,p=y.CXF_DIALOG_OPEN,E=v.GAME_CALLBACK,_=w.tracking,N=w.OPEN_ANNOUNCEMENTS,O=w.ANNOUNCEMENT_READY,A=function(t){var e=t.game,n=t.playername,r=t.network,o=t.instance,a=h(e,n,r,o);return d(a)},S=function(t){return function(e){return e.filter((function(e){return!t.includes(l(e.title+e.message))}))}},L=function(t){return t&&t.Count>0||!1},b=function(t,e){return function(n,r){var o=r.network,a=r.instance,i=r.lang,s=r.playername,l=e.game;if(L(n)){var f=A({game:l,playername:s,network:o,instance:a}),d=S(f)(n.Items);g.info("Received ".concat(d.length>0?d.length:0," valid announcements"));var m=d.map((function(t){return c({},t,{body:t.message})}));localStorage.setItem(u,JSON.stringify(m));var y=h(l,s,o,a),v=new URLSearchParams({game:l,lang:i,network:o,instance:a,hash:y}),w="".concat(t,"/").concat(l,"_announcement.html?").concat(v.toString());e.emit(p,w)}}};function C(){return(C=a(n.mark((function t(e,r,o){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=i(e,o),t.abrupt("return",fetch(e).then((function(t){return t.json()})).then((function(t){if(0!==Object.keys(t).length&&0!==t.Count)return r(t,o);g.info("".concat(e," shows empty response"))})).catch((function(t){return g.log("failed loading ".concat(e,": ").concat(t))})));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t,e,n){return C.apply(this,arguments)}var T=function(t,e){(!t||!Array.isArray(t)||t.length<4)&&g.error("Received invalid payload from game - ".concat(t," \n the valid payload is [userdata, lang, network, instance]"));var n=s(t),r=n[0],o=n[1],a=n[2],i=n[3];return{userdata:e.getPlayerInfo(r),lang:o,network:a,instance:i}};t.exports=function(t,e){var r,i=b("https://s3-eu-west-1.amazonaws.com/cap-announcements-staging.ggs-stp.com",t),c=o(t.game)||"",u=function(t){!function(t){x("https://bcybh10xrg.execute-api.eu-west-1.amazonaws.com/staging/messages/"+c,i,t)}(t)},s={},l=function(n){if(n||0!==Object.keys(s).length){if(n){var r=T(n,e);Object.assign(s,{lang:r.lang,network:r.network,instance:r.instance,game:t.game,playername:r.userdata.playername})}}else g.warn(" saveLoginData - the user data has not been set/initialized ".concat(s))},f=function(t){l(t),g.log("[getNewAnnouncements] - ".concat(JSON.stringify(s,null,4)));return x("https://bcybh10xrg.execute-api.eu-west-1.amazonaws.com/staging/messages/"+c,(function(t){var e=0;return L(t)&&(e=function(t,e){return S(A(t))(e).length}(s,t.Items),r=t),g.log(" Has announcements: ",e>0),e}),s)},h=function(o){return a(n.mark((function a(i){var c;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return g.log(" onGetMessageStatus - ".concat(o),i),n.next=3,f(i);case 3:c=n.sent,t.gameApi.invokeFn(E.UNREAD_ANNOUNCEMENTS,c),o===e.loginCmd&&c&&_(O,r),g.log(" call ".concat(E.UNREAD_ANNOUNCEMENTS," - ").concat(c));case 7:case"end":return n.stop()}}),a)})))};return{onLogin:function(t){return g.info(" onLogin",t),l(t),u(s)},onLogout:function(){t.once(e.loginCmd,h(e.loginCmd))},placeholder:function(){},onGetMessageStatus:h,onOpenAnnouncements:function(){0!==Object.keys(s).length?(u(s),g.info("onOpenAnnouncement handler for user ".concat(s)),_(N,r)):g.info(" onOpenAnnouncement handler - the user data has not been set/initialized ".concat(s))}}},t.exports.__internals={loadCurrentMessages:x,handleAnnouncementMessage:b,getHashKey:h,hashCode:l,getRootGamePayload:T,hasAnnouncements:L}})),r.register("2AL7D",(function(t,e){var n=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),i=new C(r||[]);return a._invoke=function(t,e,n){var r=f;return function(o,a){if(r===g)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw a;return T()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var c=S(i,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=g;var u=l(t,e,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f="suspendedStart",h="suspendedYield",g="executing",d="completed",p={};function m(){}function y(){}function v(){}var w={};w[a]=function(){return this};var E=Object.getPrototypeOf,_=E&&E(E(x([])));_&&_!==n&&r.call(_,a)&&(w=_);var N=v.prototype=m.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function n(o,a,i,c){var u=l(t[o],t,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return n("throw",t,i,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}}function S(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function x(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}return{next:T}}function T(){return{value:e,done:!0}}return y.prototype=N.constructor=v,v.constructor=y,y.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(N),t},t.awrap=function(t){return{__await:t}},O(A.prototype),A.prototype[i]=function(){return this},t.AsyncIterator=A,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new A(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(N),u(N,c,"Generator"),N[a]=function(){return this},N.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(b),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;b(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:x(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}})),r.register("7hs5J",(function(e,n){
!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n={},t={},r=e.parcelRequireb657;function o(e,n,t,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void t(e)}c.done?n(s):Promise.resolve(s).then(r,o)}function a(e){return function(){var n=this,t=arguments;return new Promise((function(r,a){var i=e.apply(n,t);function c(e){o(i,r,a,c,s,"next",e)}function s(e){o(i,r,a,c,s,"throw",e)}c(void 0)}))}}function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){i(e,n,t[n])}))}return e}function s(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function u(e,n){return function(e){if(Array.isArray(e))return e}(e)||s(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}null==r&&((r=function(e){if(e in n)return n[e].exports;if(e in t){let r=t[e];delete t[e];let o={id:e,exports:{}};return n[e]=o,r.call(o.exports,o,o.exports),o.exports}var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(e,n){t[e]=n},e.parcelRequireb657=r);var f,g,h,d,p,m={};Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var n=new Object(this),t=n.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<t;){var a=n[o];if(e.call(r,a,o,n))return a;o++}},configurable:!0,writable:!0});var y,v,w,E,A,N="CXF-ANNOUNCEMENT",_={info:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];(g=console).info.apply(g,["%c ".concat(N," ->"),"background: green; color: yellow"].concat(l(n)))},log:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];(h=console).info.apply(h,["%c ".concat(N," ->"),"background: green; color: yellow"].concat(l(n)))},warn:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];(d=console).warn.apply(d,["%c ".concat(N," ->"),"background: orange; color: yellow"].concat(l(n)))},error:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];(p=console).error.apply(p,["%c ".concat(N," ->"),"background: red; color: yellow"].concat(l(n)))}},O=(f={containsInstance:function(e,n,t){var r=e.find((function(e){return e.id===n}));return!!r&&(r=r.instances.find((function(e){return e===t})),Boolean(r))},sharedCommands:{CLOSE_POPUP:"cxf.announcements.closePopup",MARK_AS_READ:"cxf.announcements.markAsRead",SHOW_ANNOUNCEMENTS:"cxf.announcements.getAllAnnouncements",TRACKING:"cxf.announcements.tracking"},appendLoginParams:function(e,n){return e+"/"+n.network+"/"+n.instance+"/"+n.lang},ANNOUNCEMENTS_LOCALSTORAGE_KEY:"ggs.cxf.announcements.fetchedAnnouncements",hashCode:function(e){for(var n=0,t=0;t<e.length;t++)n=Math.imul(31,n)+e.charCodeAt(t)|0;return n},getHashKey:function(e,n,t,r){var o=[e,n,t,r].join("_");return"ggs.cxf.announcements.".concat(o,".messageHash")},logger:_,subtractArray:function(e,n){return e.filter((function(e){return!n.includes(e)}))}}).subtractArray,S=f.sharedCommands,L=f.ANNOUNCEMENTS_LOCALSTORAGE_KEY,b=(y={CXF_DIALOG_OPEN:"cxf.dialog.open",CXF_DIALOG_CLOSE:"cxf.dialog.close"}).CXF_DIALOG_CLOSE,C="game.button.clicked.",x={GET_ANNOUNCEMENTS:"".concat(C,"getAnnouncements"),OPEN_ANNOUNCEMENTS:"".concat(C,"openAnnouncements")},T=(v={GAME_CALLBACK:{UNREAD_ANNOUNCEMENTS:"setCapToolNotifications"},GAME:{BIG_FARM:"bigfarm",EMPIRE:"empire",E4K:"empirefourkingdoms"},GAME_BUTTON_CLICKED_PREFIX:C,GAME_ANNOUNCEMENTS_EVENT:x,OPEN:x.OPEN_ANNOUNCEMENTS,GET:x.GET_ANNOUNCEMENTS}).GET,I=f.logger,P="cxf.tracking.message",R=(w={init:function(e){I.log("tracking has been initialized",e),E=e},tracking:function(e,n,t){var r=function(e){var n;return e&&(n=Array.isArray(e.Items)?e.Items[0]:e),n}(n),o={eventId:1236,gameId:Number.parseInt(E.gameId,10),networkId:Number.parseInt(E.networkId,10),instanceId:E.instanceId,playerId:E.playerId,language:E.countryCode,date:(new Date).toUTCString(),zoneId:E.zoneId,actionType:e},a=r.id,i=r.start_date,s=r.end_date,u=r.title;(o=c({},o,t)).id=a,o.scheduleStart=new Date(i).toUTCString(),o.scheduleEnd=new Date(s).toUTCString(),o.name=u,I.log(P,JSON.stringify(o,null,4)),E.emit(P,o)},OPEN_ANNOUNCEMENTS:"click",ANNOUNCEMENT_READY:"announcement_ready",CLOSE_CROSS:"close_cross",CLOSE_REGULAR:"close_regular",DONT_SHOW_AGAIN_ACTIVATE:"dont_show_again_activate",DONT_SHOW_AGAIN_DEACTIVATE:"dont_show_again_deactivate",SCROLL:"scroll",LOADED:"loaded"}).tracking,U=w.DONT_SHOW_AGAIN_ACTIVATE,k=w.DONT_SHOW_AGAIN_DEACTIVATE;function M(e){var n=e.hash,t=e.wasRead,r=j(n.key),o=t?U:k,a=!0,i=!1,c=void 0;try{for(var s,u=A[Symbol.iterator]();!(a=(s=u.next()).done);a=!0){var l=s.value;R(o,l)}}catch(e){i=!0,c=e}finally{try{a||null==u.return||u.return()}finally{if(i)throw c}}var f=t?r.concat(n.hashList):O(r,n.hashList);0===f.length?localStorage.removeItem(n.key):localStorage.setItem(n.key,JSON.stringify(f))}function G(e){console.log("azeino........ closeFrame "),localStorage.removeItem(L),A=void 0,e.emit(b)}function j(e){console.log("azeino........ getDoNotShowMessages ");var n=localStorage.getItem(e)||"[]";return JSON.parse(n)}function D(){console.log("azeino........ getMessages ");var e=localStorage.getItem(L)||"[]";return JSON.parse(e)}var z=function(e,n){return n.start_date-e.start_date};function F(e){var n=e.frameId;console.log("azeino........ showAllMessages frameId ",n);var t=D().sort(z);if(t&&t.length>0){var r=document.getElementById(n).contentWindow;A=t;var o=Date.now();r.postMessage({messages:t,triggeredTimestamp:o},"*"),localStorage.setItem(L,JSON.stringify([]))}}var K=new Map([["okBtn",w.CLOSE_REGULAR],["crossBtn",w.CLOSE_CROSS],["scrolled",w.SCROLL],["loaded",w.LOADED]]);(m={addWindowListeners:function(e){window.addEventListener("message",(function(n){if(n.data&&n.data.name)switch(n.data.name){case S.MARK_AS_READ:M(n.data),e.emit(T);break;case S.CLOSE_POPUP:G(e);break;case S.SHOW_ANNOUNCEMENTS:F(n.data);break;case S.TRACKING:console.log("azeino........ sharedCommands.TRACKING evt.data.action ",n.data.action);var t=!0,r=!1,o=void 0;try{for(var a,i=A[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var c=a.value;if("scrolled"===n.data.action)n.data.params.scrolledAnnouncements.includes(c.id)&&R(K.get(n.data.action),c,n.data.params);else R(K.get(n.data.action),c,n.data.params)}}catch(e){r=!0,o=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw o}}}}),!1)},getDoNotShowMessages:j}).__internals={markAsRead:M,getDoNotShowMessages:j,getMessages:D,closeFrame:G,showAllMessages:F,setAllActiveAnnouncements:function(e){A=e}};var J,B=m.addWindowListeners,H=f.logger,V=v.GAME;r.register("6G6uw",(function(e,n){e.exports={getPlayerInfo:function(e){var n=JSON.parse(e[1]);return{playername:n.gpi.PN,level:n.gxp.LVL}},getLevel:function(e){return JSON.parse(e[1]).LVL},lastTutorialLevel:5,loginCmd:"gbd",levelUpCmd:"gxp"}})),r.register("6j118",(function(e,n){e.exports={getPlayerInfo:function(e){return{playername:e.playerIdentity.name,level:e.xp.level}},getLevel:function(e){return e.newLevel},lastTutorialLevel:1,loginCmd:"LOGIN_BASIC_DATA",levelUpCmd:"LEVEL_UP"}})),r.register("48Zgp",(function(e,n){e.exports={getPlayerInfo:function(e){var n=JSON.parse(e[1]);return{playername:n.gpi.PN,level:n.gxp.LVL}},getLevel:function(e){return JSON.parse(e[1]).LVL},lastTutorialLevel:5,loginCmd:"gbd",levelUpCmd:"gxp",logoutCmd:"LOGOUT"}}));var W=(i(J={},V.EMPIRE,r("6G6uw")),i(J,V.BIG_FARM,r("6j118")),i(J,V.E4K,r("48Zgp")),J),X=v.OPEN,Y=v.GET,q=w.init;r.register("1u8Ob",(function(e,n){var t=r("2AL7D"),o=(t.mark(C),r("7hs5J"),r("15hBX").acronym),i=f.appendLoginParams,s=f.ANNOUNCEMENTS_LOCALSTORAGE_KEY,l=f.hashCode,g=f.getHashKey,h=f.logger,d=m.getDoNotShowMessages,p=y.CXF_DIALOG_OPEN,E=v.GAME_CALLBACK,A=w.tracking,N=w.OPEN_ANNOUNCEMENTS,_=w.ANNOUNCEMENT_READY,O=function(e){console.log("azeino........ alreadyShown ");var n=e.game,t=e.playername,r=e.network,o=e.instance,a=g(n,t,r,o);return d(a)},S=function(e){return function(n){return console.log("azeino........ filterUnread msgs",n),n.filter((function(n){return!e.includes(l(n.title+n.message))}))}},L=function(e){return console.log("azeino........ hasAnnouncements dtoJSON",e),e&&e.Count>0||!1},b=function(e,n){return function(t,r){var o=r.network,a=r.instance,i=r.lang,u=r.playername;console.log("azeino........ handleAnnouncementMessage basepath",e),console.log("azeino........ handleAnnouncementMessage context",n);var l=n.game;if(L(t)){var f=O({game:l,playername:u,network:o,instance:a}),d=S(f)(t.Items);h.info("Received ".concat(d.length>0?d.length:0," valid announcements"));var m=d.map((function(e){return c({},e,{body:e.message})}));console.log("azeino........ formattedAnnouncements ",m),localStorage.setItem(s,JSON.stringify(m));var y=g(l,u,o,a),v=new URLSearchParams({game:l,lang:i,network:o,instance:a,hash:y}),w="".concat(e,"/").concat(l,"_announcement.html?").concat(v.toString());console.log("azeino........ templateUrl ",w),n.emit(p,w)}}};function C(){return(C=a(t.mark((function e(n,r,o){return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("azeino........ loadCurrentMessages loginData",o),n=i(n,o),e.abrupt("return",fetch(n).then((function(e){return e.json()})).then((function(e){if(0!==Object.keys(e).length&&0!==e.Count)return r(e,o);h.info("".concat(n," shows empty response"))})).catch((function(e){return h.log("failed loading ".concat(n,": ").concat(e))})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e,n,t){return C.apply(this,arguments)}var T=function(e,n){console.log("azeino........ getRootGamePayload data",e),console.log("azeino........ getRootGamePayload adapter",n),(!e||!Array.isArray(e)||e.length<4)&&h.error("Received invalid payload from game - ".concat(e," \n the valid payload is [userdata, lang, network, instance]"));var t=u(e),r=t[0],o=t[1],a=t[2],i=t[3];return{userdata:n.getPlayerInfo(r),lang:o,network:a,instance:i}};e.exports=function(e,n){var r,i=b("https://s3-eu-west-1.amazonaws.com/cap-announcements-staging.ggs-stp.com",e),c=o(e.game)||"",s=function(e){!function(e){x("https://bcybh10xrg.execute-api.eu-west-1.amazonaws.com/staging/messages/"+c,i,e)}(e)},u={},l=function(t){if(t||0!==Object.keys(u).length){if(t){var r=T(t,n);Object.assign(u,{lang:r.lang,network:r.network,instance:r.instance,game:e.game,playername:r.userdata.playername})}}else h.warn(" saveLoginData - the user data has not been set/initialized ".concat(u))},f=function(e){console.log("azeino........ getNewAnnouncements data",e),l(e),h.log("[getNewAnnouncements] - ".concat(JSON.stringify(u,null,4)));return x("https://bcybh10xrg.execute-api.eu-west-1.amazonaws.com/staging/messages/"+c,(function(e){console.log("azeino........ countUnreadAnnouncements announcements",e);var n=0;return L(e)&&(n=function(e,n){return console.log("azeino........ countUnread"),S(O(e))(n).length}(u,e.Items),r=e),h.log(" Has announcements: ",n>0),n}),u)},g=function(o){return a(t.mark((function a(i){var c;return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("azeino........ onGetMessageStatus eventName",o),console.log("azeino........ onGetMessageStatus data",i),h.log(" onGetMessageStatus - ".concat(o),i),t.next=5,f(i);case 5:c=t.sent,e.gameApi.invokeFn(E.UNREAD_ANNOUNCEMENTS,c),o===n.loginCmd&&c&&A(_,r),h.log(" call ".concat(E.UNREAD_ANNOUNCEMENTS," - ").concat(c));case 9:case"end":return t.stop()}}),a)})))};return{onLogin:function(e){return h.info(" onLogin",e),l(e),s(u)},onLogout:function(){e.once(n.loginCmd,g(n.loginCmd))},placeholder:function(){},onGetMessageStatus:g,onOpenAnnouncements:function(){console.log("azeino........ onOpenAnnouncements"),0!==Object.keys(u).length?(s(u),h.info("onOpenAnnouncement handler for user ".concat(u)),A(N,r)):h.info(" onOpenAnnouncement handler - the user data has not been set/initialized ".concat(u))}}},e.exports.__internals={loadCurrentMessages:x,handleAnnouncementMessage:b,getHashKey:g,hashCode:l,getRootGamePayload:T,hasAnnouncements:L}})),r.register("2AL7D",(function(e,n){var t=function(e){var n,t=Object.prototype,r=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{s({},"")}catch(e){s=function(e,n,t){return e[n]=t}}function u(e,n,t,r){var o=n&&n.prototype instanceof m?n:m,a=Object.create(o.prototype),i=new C(r||[]);return a._invoke=function(e,n,t){var r=f;return function(o,a){if(r===h)throw new Error("Generator is already running");if(r===d){if("throw"===o)throw a;return T()}for(t.method=o,t.arg=a;;){var i=t.delegate;if(i){var c=S(i,t);if(c){if(c===p)continue;return c}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if(r===f)throw r=d,t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);r=h;var s=l(e,n,t);if("normal"===s.type){if(r=t.done?d:g,s.arg===p)continue;return{value:s.arg,done:t.done}}"throw"===s.type&&(r=d,t.method="throw",t.arg=s.arg)}}}(e,t,i),a}function l(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",g="suspendedYield",h="executing",d="completed",p={};function m(){}function y(){}function v(){}var w={};w[a]=function(){return this};var E=Object.getPrototypeOf,A=E&&E(E(x([])));A&&A!==t&&r.call(A,a)&&(w=A);var N=v.prototype=m.prototype=Object.create(w);function _(e){["next","throw","return"].forEach((function(n){s(e,n,(function(e){return this._invoke(n,e)}))}))}function O(e,n){function t(o,a,i,c){var s=l(e[o],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?n.resolve(f.__await).then((function(e){t("next",e,i,c)}),(function(e){t("throw",e,i,c)})):n.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return t("throw",e,i,c)}))}c(s.arg)}var o;this._invoke=function(e,r){function a(){return new n((function(n,o){t(e,r,n,o)}))}return o=o?o.then(a,a):a()}}function S(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,S(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=l(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function L(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function b(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function x(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(r.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:n,done:!0}}return y.prototype=N.constructor=v,v.constructor=y,y.displayName=s(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(N),e},e.awrap=function(e){return{__await:e}},_(O.prototype),O.prototype[i]=function(){return this},e.AsyncIterator=O,e.async=function(n,t,r,o,a){void 0===a&&(a=Promise);var i=new O(u(n,t,r,o),a);return e.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(N),s(N,c,"Generator"),N[a]=function(){return this},N.toString=function(){return"[object Generator]"},e.keys=function(e){var n=[];for(var t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function o(r,o){return c.type="throw",c.arg=e,t.next=r,o&&(t.method="next",t.arg=n),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,n){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=n&&n<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=n,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(i)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),p},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),b(t),p}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;b(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}})),r.register("7hs5J",(function(n,t){
/**

@@ -9,3 +9,3 @@ *

*/
!function(t){var e,n=function(){try{if(t.URLSearchParams&&"bar"===new t.URLSearchParams("foo=bar").get("foo"))return t.URLSearchParams}catch(t){}return null}(),r=n&&"a=1"===new n({a:1}).toString(),o=n&&"+"===new n("s=%2B").get("s"),a=!n||((e=new n).append("s"," &"),"s=+%26"===e.toString()),i=l.prototype,c=!(!t.Symbol||!t.Symbol.iterator);if(!(n&&r&&o&&a)){var u;i.append=function(t,e){p(this.__URLSearchParams__,t,e)},i.delete=function(t){delete this.__URLSearchParams__[t]},i.get=function(t){var e=this.__URLSearchParams__;return this.has(t)?e[t][0]:null},i.getAll=function(t){var e=this.__URLSearchParams__;return this.has(t)?e[t].slice(0):[]},i.has=function(t){return y(this.__URLSearchParams__,t)},i.set=function(t,e){this.__URLSearchParams__[t]=[""+e]},i.toString=function(){var t,e,n,r,o=this.__URLSearchParams__,a=[];for(e in o)for(n=f(e),t=0,r=o[e];t<r.length;t++)a.push(n+"="+f(r[t]));return a.join("&")},!!o&&n&&!r&&t.Proxy?(u=new Proxy(n,{construct:function(t,e){return new t(new l(e[0]).toString())}})).toString=Function.prototype.toString.bind(l):u=l,Object.defineProperty(t,"URLSearchParams",{value:u});var s=t.URLSearchParams.prototype;s.polyfill=!0,s.forEach=s.forEach||function(t,e){var n=d(this.toString());Object.getOwnPropertyNames(n).forEach((function(r){n[r].forEach((function(n){t.call(e,n,r,this)}),this)}),this)},s.sort=s.sort||function(){var t,e,n,r=d(this.toString()),o=[];for(t in r)o.push(t);for(o.sort(),e=0;e<o.length;e++)this.delete(o[e]);for(e=0;e<o.length;e++){var a=o[e],i=r[a];for(n=0;n<i.length;n++)this.append(a,i[n])}},s.keys=s.keys||function(){var t=[];return this.forEach((function(e,n){t.push(n)})),g(t)},s.values=s.values||function(){var t=[];return this.forEach((function(e){t.push(e)})),g(t)},s.entries=s.entries||function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),g(t)},c&&(s[t.Symbol.iterator]=s[t.Symbol.iterator]||s.entries)}function l(t){((t=t||"")instanceof URLSearchParams||t instanceof l)&&(t=t.toString()),this.__URLSearchParams__=d(t)}function f(t){var e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'\(\)~]|%20|%00/g,(function(t){return e[t]}))}function h(t){return t.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,(function(t){return decodeURIComponent(t)}))}function g(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return c&&(n[t.Symbol.iterator]=function(){return n}),n}function d(t){var e={};if("object"==typeof t)if(m(t))for(var n=0;n<t.length;n++){var r=t[n];if(!m(r)||2!==r.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");p(e,r[0],r[1])}else for(var o in t)t.hasOwnProperty(o)&&p(e,o,t[o]);else{0===t.indexOf("?")&&(t=t.slice(1));for(var a=t.split("&"),i=0;i<a.length;i++){var c=a[i],u=c.indexOf("=");-1<u?p(e,h(c.slice(0,u)),h(c.slice(u+1))):c&&p(e,h(c),"")}}return e}function p(t,e,n){var r="string"==typeof n?n:null!=n&&"function"==typeof n.toString?n.toString():JSON.stringify(n);y(t,e)?t[e].push(r):t[e]=[r]}function m(t){return!!t&&"[object Array]"===Object.prototype.toString.call(t)}function y(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(void 0!==t?t:"undefined"!=typeof window?window:e.exports)})),r.register("15hBX",(function(t,e){!function(){var e;function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var r={1:["poker","poker2","poker"],12:["empire","castle","em"],15:["bigfarm","ranch","bf"],16:["empirefourkingdoms","fourkingdoms","e4k"],23:["legendsofhonor",void 0,"loh"],41:["empiremillenniumwars",void 0,"emmw"]},o=Object.entries(r).reduce((function(t,e){var r=n(e,2),o=r[0],a=r[1];return o=parseInt(o,10),t[o]=o,a.forEach((function(e){t[e]=o})),t}),{}),a=function(t,e){return(e=o[e])&&r[e][t]},i=a.bind(null,0),c=a.bind(null,1),u=a.bind(null,2);e={id:function(t){t=t.toString().toLowerCase();var e=o[t];return e&&0|e},name:i,codename:c,acronym:u},"object"==typeof t.exports?t.exports=e:"function"==typeof define&&define.amd&&define((function(){return e}))}()})),function(t){z.log(" initialized successfully - waiting for player login",t.game),q(t);var e=W[t.game],n=r("1u8Ob")(t,e);H(t),e.logoutCmd&&t.on(e.logoutCmd,n.onLogout),t.once(3,n.placeholder),t.once(24,n.placeholder),t.on(Y,n.onGetMessageStatus(Y)),t.once(e.loginCmd,n.onGetMessageStatus(e.loginCmd)),t.on(X,n.onOpenAnnouncements)}(window.CXF)}();
!function(e){var n,t=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),r=t&&"a=1"===new t({a:1}).toString(),o=t&&"+"===new t("s=%2B").get("s"),a=!t||((n=new t).append("s"," &"),"s=+%26"===n.toString()),i=l.prototype,c=!(!e.Symbol||!e.Symbol.iterator);if(!(t&&r&&o&&a)){var s;i.append=function(e,n){p(this.__URLSearchParams__,e,n)},i.delete=function(e){delete this.__URLSearchParams__[e]},i.get=function(e){var n=this.__URLSearchParams__;return this.has(e)?n[e][0]:null},i.getAll=function(e){var n=this.__URLSearchParams__;return this.has(e)?n[e].slice(0):[]},i.has=function(e){return y(this.__URLSearchParams__,e)},i.set=function(e,n){this.__URLSearchParams__[e]=[""+n]},i.toString=function(){var e,n,t,r,o=this.__URLSearchParams__,a=[];for(n in o)for(t=f(n),e=0,r=o[n];e<r.length;e++)a.push(t+"="+f(r[e]));return a.join("&")},!!o&&t&&!r&&e.Proxy?(s=new Proxy(t,{construct:function(e,n){return new e(new l(n[0]).toString())}})).toString=Function.prototype.toString.bind(l):s=l,Object.defineProperty(e,"URLSearchParams",{value:s});var u=e.URLSearchParams.prototype;u.polyfill=!0,u.forEach=u.forEach||function(e,n){var t=d(this.toString());Object.getOwnPropertyNames(t).forEach((function(r){t[r].forEach((function(t){e.call(n,t,r,this)}),this)}),this)},u.sort=u.sort||function(){var e,n,t,r=d(this.toString()),o=[];for(e in r)o.push(e);for(o.sort(),n=0;n<o.length;n++)this.delete(o[n]);for(n=0;n<o.length;n++){var a=o[n],i=r[a];for(t=0;t<i.length;t++)this.append(a,i[t])}},u.keys=u.keys||function(){var e=[];return this.forEach((function(n,t){e.push(t)})),h(e)},u.values=u.values||function(){var e=[];return this.forEach((function(n){e.push(n)})),h(e)},u.entries=u.entries||function(){var e=[];return this.forEach((function(n,t){e.push([t,n])})),h(e)},c&&(u[e.Symbol.iterator]=u[e.Symbol.iterator]||u.entries)}function l(e){((e=e||"")instanceof URLSearchParams||e instanceof l)&&(e=e.toString()),this.__URLSearchParams__=d(e)}function f(e){var n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return n[e]}))}function g(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,(function(e){return decodeURIComponent(e)}))}function h(n){var t={next:function(){var e=n.shift();return{done:void 0===e,value:e}}};return c&&(t[e.Symbol.iterator]=function(){return t}),t}function d(e){var n={};if("object"==typeof e)if(m(e))for(var t=0;t<e.length;t++){var r=e[t];if(!m(r)||2!==r.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");p(n,r[0],r[1])}else for(var o in e)e.hasOwnProperty(o)&&p(n,o,e[o]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var a=e.split("&"),i=0;i<a.length;i++){var c=a[i],s=c.indexOf("=");-1<s?p(n,g(c.slice(0,s)),g(c.slice(s+1))):c&&p(n,g(c),"")}}return n}function p(e,n,t){var r="string"==typeof t?t:null!=t&&"function"==typeof t.toString?t.toString():JSON.stringify(t);y(e,n)?e[n].push(r):e[n]=[r]}function m(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function y(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}(void 0!==e?e:"undefined"!=typeof window?window:n.exports)})),r.register("15hBX",(function(e,n){!function(){var n;function t(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(t.push(i.value),!n||t.length!==n);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return t}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var r={1:["poker","poker2","poker"],12:["empire","castle","em"],15:["bigfarm","ranch","bf"],16:["empirefourkingdoms","fourkingdoms","e4k"],23:["legendsofhonor",void 0,"loh"],41:["empiremillenniumwars",void 0,"emmw"]},o=Object.entries(r).reduce((function(e,n){var r=t(n,2),o=r[0],a=r[1];return o=parseInt(o,10),e[o]=o,a.forEach((function(n){e[n]=o})),e}),{}),a=function(e,n){return(n=o[n])&&r[n][e]},i=a.bind(null,0),c=a.bind(null,1),s=a.bind(null,2);n={id:function(e){e=e.toString().toLowerCase();var n=o[e];return n&&0|n},name:i,codename:c,acronym:s},"object"==typeof e.exports?e.exports=n:"function"==typeof define&&define.amd&&define((function(){return n}))}()})),function(e){console.log("azeino........ announcments.init context ",e),H.log(" initialized successfully - waiting for player login",e.game),q(e);var n=W[e.game],t=r("1u8Ob")(e,n);B(e),n.logoutCmd&&e.on(n.logoutCmd,t.onLogout),e.once(3,t.placeholder),e.once(24,t.placeholder),e.on(Y,t.onGetMessageStatus(Y)),e.once(n.loginCmd,t.onGetMessageStatus(n.loginCmd)),e.on(X,t.onOpenAnnouncements)}(window.CXF)}();
//# sourceMappingURL=announcements.js.map
{
"name": "@goodgamestudios/cxf-announcements",
"version": "0.19.2-qa.2",
"version": "0.19.2-qa.4",
"scripts": {

@@ -5,0 +5,0 @@ "serve:locally": "http-server dist --port 4002",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc