1/**************************************************************************** 2 This code is copyright (C) Raudas Hugbunadur ehf (Red Ace Software LLC) 3 4 This code is NOT open source, and it is NOT permitted to use it on other 5 sites, modify it, or otherwise use it for any other purpose than playing 6 on one of our sites, (https://cardgames.io, https://iochess.com) 7 8 I've had to deal with multiple people stealing my work and I'm sick of it. 9 Don't be a thief, write your own game! 10*****************************************************************************/!function r(o,a,i){function s(t,e){if(!a[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=a[t]={exports:{}},o[t][0].call(n.exports,function(e){return s(o[t][1][e]||e)},n,n.exports,r,o,a,i)}return a[t].exports}for(var l="function"==typeof require&&require,e=0;e<i.length;e++)s(i[e]);return s}({1:[function(e,t,n){function r(){var e,t,n;document.documentElement.classList.contains("blog-post")&&(e=document.querySelector("#title h1"))&&(e.style.transform="",e.style.transformOrigin="",(t=e.parentElement.clientWidth)<(n=e.scrollWidth))&&(e.style.transform="scale(".concat(t/n,")"),e.style.transformOrigin="left center")}e("../shared/game"),r(),window.addEventListener("load",r),window.addEventListener("resize",r),$(document).ready(function(){var e=document.getElementById("board-wrapper-and-ads");new MutationObserver(function(e){e.forEach(function(e){"style"===e.attributeName&&(console.log(e),$("#board-wrapper-and-ads").css("height","70px"))})}).observe(e,{attributes:!0})})},{"../shared/game":13}],2:[function(e,t,n){},{}],3:[function(e,t,n){var r,o,t=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:i}catch(e){o=i}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return(r=setTimeout)(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length)&&m()}function m(){if(!u){for(var e=s(f),t=(u=!0,c.length);t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,!function(t){if(o===clearTimeout)return clearTimeout(t);if((o===i||!o)&&clearTimeout)return(o=clearTimeout)(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(m)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=h,t.addListener=h,t.once=h,t.off=h,t.removeListener=h,t.removeAllListeners=h,t.emit=h,t.prependListener=h,t.prependOnceListener=h,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],4:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}var i=e("./adSenseProvider"),s=e("./freestarProvider"),l=e("./noAdProvider"),c=e("./appAdProvider"),u=e("./onSiteAdProvider"),d=e("./adPolicy"),e=(()=>{function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.type=e,this.policy=new d(this,t),this.provider=this.createProvider(e)}return e=n,(t=[{key:"createProvider",value:function(e){var t=this,n={onReady:function(){return t.adsAreReady=!0},beforeAd:function(){return t.beforeAd()},afterAd:function(){return t.afterAd()},onAdDone:function(e){return t.adBreakDone(e)},policy:this.policy,freestarConfig:{videoAds:void 0===window.videoAds||window.videoAds,videoType:window.videoType||"slider"}};if(!this.policy.shouldShowAds())return new l(n);switch(e){case"app":return new c(n);case"adsense":return new i(n);case"freestar":return new s(n);case"onSite":return new u(n);default:return new l(n)}}},{key:"initialize",value:function(){this.provider.load()}},{key:"reInitialize",value:function(){this.provider=this.createProvider(this.type),this.initialize()}}
10,{key:"trigger",value:function(e){this.policy.canTriggerAd()&&this.provider.isReady()?this.provider.trigger(e):e()}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r})();t.exports=e},{"./adPolicy":5,"./adSenseProvider":7,"./appAdProvider":8,"./freestarProvider":9,"./noAdProvider":10,"./onSiteAdProvider":11}],5:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}var r=e("../helpers/cookies"),i=r.cake,s=r.deleteCake,l=e("../helper-functions").captainsLog,c=e("../api"),r=(()=>{function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.adManager=e,this.cmp=t,this.configureConsentPreference()}return e=n,(t=[{key:"shouldShowAds",value:function(){return!APP_MODE&&!this.hasAdFreeCode()}},{key:"canTriggerAd",value:function(){var e=parseInt(i("lastadshown"))||0;return 24e4<Date.now()-e}},{key:"markShown",value:function(){i("lastadshown",Date.now(),null,"/")}},{key:"hasAdFreeCode",value:function(){var r=this,e=i("adfreecode");return!!e&&(Math.random()<.1&&c.adfree.getCode(e,function(e){if(!e)return s("adfreecode"),r.adManager.reInitialize(),!1;var t=new Date,n=new Date(e.expires);t.getTime()>n.getTime()||e.status},function(){}),this.type="none",$(".has-top-banner").removeClass("has-top-banner"),!0)}},{key:"configureConsentPreference",value:function(){function e(e){return"1"==e||!0===e||"yes"==e}this.allowPersonalized=this.cmp.groupHasGrantedPermission("targeting"),this.isDoNotTrackPrefSet=e(navigator.doNotTrack)||e(window.doNotTrack)||e(navigator.msDoNotTrack),l.debug("ADS: Do not track is set: "+this.isDoNotTrackPrefSet),this.requestPersonalized=this.allowPersonalized&&!this.isDoNotTrackPrefSet,l.debug("ADS: request personalization: "+this.requestPersonalized),"undefined"!=typeof adsbygoogle&&(adsbygoogle.requestNonPersonalizedAds=this.requestPersonalized?0:1,l.debug("ADS: Set .requestNonPersonalizedAds to "+adsbygoogle.requestNonPersonalizedAds))}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r})();t.exports=r}
10,{"../api":12,"../helper-functions":15,"../helpers/cookies":22}],6:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}var i=e("../helpers/UI").isMobileLookActive,s=e("../helpers/settings").siteSettings,e=(()=>{function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.context=e,this.ready=!1}return e=t,(n=[{key:"load",value:function(){throw new Error("load() not implemented")}},{key:"initialize",value:function(){this.load()}},{key:"isReady",value:function(){return this.ready}},{key:"trigger",value:function(e){e()}},{key:"destroy",value:function(){}},{key:"registerResizeHandler",value:function(){var e=this;window.addEventListener("resize",function(){e.onResize&&(clearTimeout(e.resizeTimeout),e.resizeTimeout=setTimeout(function(){return e.onResize()},250))})}},{key:"onResize",value:function(){throw new Error("Do not register resize handler without implementing onResize()")}},{key:"getWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}},{key:"getHeight",value:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}},{key:"matchMedia",value:function(e){return!!window.matchMedia&&window.matchMedia(e).matches}},{key:"isInterstitialActive",value:function(){return i()&&!s.mobileBannerAds||!i()&&s.alwaysUseInterstitialAds}},{key:"leftWallActive",value:function(){return!i()&&!this.isInterstitialActive()&&this.matchMedia("(min-width: 1205px)")}},{key:"rightWallActive",value:function(){return!i()&&!this.isInterstitialActive()&&this.matchMedia("(min-width: 976px)")}},{key:"leaderboardActive",value:function(){return!i()&&!this.isInterstitialActive()&&this.matchMedia("(max-width: 975px)")}},{key:"mobileBannerActive",value:function(){return this.matchMedia("(max-width: 730px) and (min-height: 667px)")}},{key:"manualTriggerActive",value:function(e){var t;return"undefined"!=typeof URLSearchParams&&((t="1"===new URLSearchParams(window.location.search).get(e))&&console.log("AdProvider: manual trigger active for ".concat(e)),t)}}])&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r})();t.exports=e},{"../helpers/UI":16,"../helpers/settings":25}],7:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}function i(e,t,n){t=l(t);var r=e,t=s()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n);if(!t||"object"!=o(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
10function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var u=e("./adProvider"),d=e("./freestarProvider"),f=e("../helpers/browser").addScript,m=e("../helpers/events").forceTrackEvent,p=e("../helper-functions").captainsLog,e=(()=>{function t(e){if(this instanceof t)return(e=i(this,t,[e])).type="adsense",e;throw new TypeError("Cannot call a class as a function")}var e,n=t,r=u;if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),r&&c(n,r),n=t,(r=[{key:"load",value:function(){var e=this,t=document.createElement("script");t.async=!0,t.src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js",this.isInterstitialActive()&&(t.setAttribute("data-ad-client","ca-pub-9002823967926225"),t.setAttribute("data-ad-channel",window.customChannelId),t.onload=function(){adConfig({preloadAdBreaks:"on",sound:"off",onReady:function(){e.ready=!0,e.context.onReady()}})}),document.head.appendChild(t),this.loadFreestarAnalytics(),this.initAdSpots()}},{key:"initAdSpots",value:function(){this.leftWallActive()?this.activateLeftWall():this.removeLeftWall(),this.rightWallActive()||this.leaderboardActive()?this.activateRightWall():this.removeRightWall()}}
10,{key:"activateLeftWall",value:function(){var e=$("#draper-left").data("adsense-slot");$("#draper-left").append('\n \x3c!-- {{title}} Left Skyscraper --\x3e\n <ins class="adsbygoogle adslot_1"\n data-ad-client="ca-pub-9002823967926225"\n data-ad-slot="'.concat(e,'"\n data-ad-format="auto"></ins>\n ')),adsbygoogle.push({})}},{key:"removeLeftWall",value:function(){$("#draper-left .adsbygoogle").remove()}},{key:"activateRightWall",value:function(){var e=$("#draper-right").data("adsense-slot");$("#draper-right").append('\n \x3c!-- {{title}} Right Skyscraper --\x3e\n <ins class="adsbygoogle adslot_2"\n style="display:block"\n data-ad-client="ca-pub-9002823967926225"\n data-ad-slot="'.concat(e,'"\n data-ad-format="auto"></ins>\n ')),adsbygoogle.push({})}},{key:"removeRightWall",value:function(){$("#draper-right .adsbygoogle").remove()}},{key:"loadFreestarAnalytics",value:function(){freestar.config.disabledProducts={sideWall:!0,googleInterstitial:!0,interstitial:!0},f(d.scriptUrl())}},{key:"trigger",value:function(t){var n=this;!this.isInterstitialActive()||!this.context.policy.canTriggerAd()||(this._callback===t&&m("AdBreakSameCallback"),this._callback=t,this.testId&&(m("AdBreakDoubleTrigger"),clearTimeout(this.testId)),this.testId=setTimeout(function(){Array.prototype.slice.call(document.getElementsByTagName("iframe")).some(function(e){return $(e).is(":visible")})||m("AdBreakNoVisibleIframe","Current time "+(new Date).toString()+"\n"+n.bf+"\n"+n.af+"\n"+n.abf)},5e3),!0!==adsbygoogle.loaded)?t():adBreak({type:"next",name:"mobile-ads",beforeAd:function(){return n.beforeAd()},afterAd:function(){return n.afterAd()},adBreakDone:function(e){n.adBreakDone(e),t()}})}},{key:"adReady",value:function(){p.debug("ADS: AdReady"),this.adsAreReady=!0}},{key:"beforeAd",value:function(){p.debug("ADS: beforeAd called"),this.bf="Before "+(new Date).toString()}},{key:"afterAd",value:function(){p.debug("ADS: afterAd called"),this.af="After "+(new Date).toString()}},{key:"adBreakDone",value:function(e){this.abf="AdBreakDone: "+(new Date).toString(),p.debug("ADS: AdBreakDone: "+JSON.stringify(e,null,2)),clearTimeout(this.testId),delete this.testId;var t=(new Date).getTime(),n=this.lastAdShown,n=("viewed"===e.breakStatus&&(this.lastAdShown=t,0<n)&&(t=Math.round((t-n)/1e3),m("AdIntervalManual","",t.toString())),this._callback);delete this._callback,m("AdBreakDone",e.breakStatus),n&&n()}}])&&a(n.prototype,r),e&&a(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})();t.exports=e},{"../helper-functions":15,"../helpers/browser":20,"../helpers/events":23,"./adProvider":6,"./freestarProvider":9}],8:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}function i(e,t,n){t=l(t);var r=e,t=s()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n);if(!t||"object"!=o(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
10function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var u=e("./adProvider"),e=(()=>{function t(e){if(this instanceof t)return(e=i(this,t,[e])).type="app",e;throw new TypeError("Cannot call a class as a function")}var e,n=t,r=u;if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),r&&c(n,r),n=t,(r=[{key:"load",value:function(){this.ready=!0}}])&&a(n.prototype,r),e&&a(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})();t.exports=e},{"./adProvider":6}],9:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return(e=>{if(Array.isArray(e))return r(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?r(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0})(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}function s(e,t,n){t=d(t);var r=e,t=l()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n);if(!t||"object"!=o(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function c(e,t,n,r){var o=u(d(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function u(){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=((e,t)=>{for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e})(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var m=e("./adProvider"),p=e("../helpers/browser").addScript,h=e("../helpers/UI").isMobileLookActive,g=e("../helpers/settings").siteSettings,v=e("../helpers/collision-detector").initCollisionDetector,e=(()=>{function t(e){if(this instanceof t)return(e=s(this,t,[e])).type="freestar",e.draperLeft=$("#draper-left"),e.draperRight=$("#draper-right"),e;throw new TypeError("Cannot call a class as a function")}var e,n=t,r=m;if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),r&&f(n,r),n=t,r=[{key:"scriptUrl",value:function(){return"https://a.pub.network/cardgames-io/pubfig.min.js"}}],(e=[{key:"debug",value:function(){window.FreestarProvider=this,$("html").addClass("freestar-debug"),$("body").append('<div class="debug-slider"></div>')}},{key:"log",value:function(e){console.log("[FreestarProvider] ".concat(e))}},{key:"load",value:function(){var e,t=this;this.ready||(this.config=Object.assign({},{videoAds:!0,videoType:"slider"},this.context.freestarConfig),this.ensureBooleansInConfig(this.config),this.activated=[],window.requestIdleCallback?(e=performance.now(),window.requestIdleCallback(function(){console.log("Idle callback fired after ".concat(performance.now()-e," ms")),p("https://a.pub.network/cardgames-io/pubfig.min.js",function(){t.log("loaded"),t.initAdSpots()})},{timeout:5e3})):p("https://a.pub.network/cardgames-io/pubfig.min.js",function(){t.log("loaded"),t.initAdSpots()}),this.ready=!0,window.freestar.initCallback=this.initCallBack.bind(this),this.registerResizeHandler(),this.log(this.activated),this.isInterstitialActive())||h()||v()}},{key:"ensureBooleansInConfig",value:function(e){for(var t in e)"true"===e[t]&&(e[t]=!0),"false"===e[t]&&(e[t]=!1)}},{key:"initCallBack",value:function(){0===freestar.config.enabled_slots.length?freestar.initCallbackCalled=!1:freestar.newAdSlots(freestar.config.enabled_slots),console.log("Freestar initialized")}}
10,{key:"adjustAdPositions",value:function(){var e=parseFloat(this.draperRight.offset().left),t=parseFloat(this.draperLeft.offset().left),n=document.documentElement;n.style.setProperty("--right-ad-pos-left",e+"px"),n.style.setProperty("--left-ad-pos-left",t+"px")}},{key:"initAdSpots",value:function(){window.matchMedia("(max-width: 730px) and (min-height: 667px)").matches||(g.mobileBannerAds=!1),this.adjustAdPositions();var e=this.isInterstitialActive(),t={leaderboard:this.leaderboardActive()?this.activateLeaderboardAd():this.removeLeaderboardAd(),rightSideWallBig:this.rightSideWallBigActive()?this.activateRightSideWallBig():this.removeRightSideWallBig(),rightSideWallSmall:this.rightSideWallSmallActive()?this.activateRightSideWallSmall():this.removeRightSideWallSmall(),rightSideVideoWall:this.showVideoAdOnRightWall()?this.activateRightSideVideoWall():this.removeRightSideVideoWall(),mobileHeader:this.mobileBannerActive()?this.activateMobileHeaderAd():this.removeMobileHeaderAd(),slidingVideo:this.slidingVideoActive()||this.manualTriggerActive("slidingVideo")?this.acitvateSlidingVideoAd():this.removeSlidingVideoAd(),leftSideWall:this.leftWallActive()?this.activateLeftSideWall():this.removeLeftSideWall()};return freestar.config.disabledProducts={sideWall:e,googleInterstitial:!e,interstitial:!e},t}},{key:"trigger",value:function(e){e()}},{key:"slidingVideoActive",value:function(){return this.rightSideWallActive()&&this.matchMedia("(min-height: 622px) and (min-width: 1055px)")&&!this.matchMedia("(max-height: 948px) and (max-width: 1115px)")}},{key:"rightSideWallActive",value:function(){return this.rightWallActive()&&(0==this.config.videoAds||1==this.config.videoAds&&"rightWall"!=this.config.videoType)}},{key:"rightSideWallBigActive",value:function(){return this.rightSideWallActive()&&!this.rightSideWallSmallActive()}},{key:"rightSideWallSmallActive",value:function(){return this.rightSideWallActive()&&this.matchMedia("(max-height: 930px) and (max-width: 2000px)")&&!this.matchMedia("(min-width:976px) and (max-width:1115px)")}},{key:"rightWallActive",value:function(){return this.config.videoAds&&"rightWall"==this.config.videoType?!h()&&!this.isInterstitialActive()&&this.matchMedia("(min-width: 1115px)"):c(t,"rightWallActive",this,3)([])}},{key:"leftWallActive",value:function(){return this.config.videoAds&&"rightWall"==this.config.videoType?!h()&&!this.isInterstitialActive()&&this.matchMedia("(min-width: 976px) and (max-width: 1114px), (min-width: 1256px)"):c(t,"leftWallActive",this,3)([])&&this.matchMedia("(min-width: 1347px)")}},{key:"removeAll",value:function(){this.removeMobileHeaderAd(),this.removeLeaderboardAd(),this.removeRightSideWall(),this.removeSlidingVideoAd()}},{key:"onResize",value:function(){var e=a(this.activated);this.log(this.activated),this.initAdSpots(),this.log(this.activated),JSON.stringify(this.activated)!==JSON.stringify(e)&&(this.log("Ad spots changed on resize, refreshing ads"),freestar.queue.push(function(){freestar.refresh()}))}},{key:"activateMobileHeaderAd",value:function(){this.activated.includes("MobileHeader")||(this.activated.push("MobileHeader"),this.log("Activating mobile header ad"),0===$("#cardgames_mobile_banner").length&&$("#cardgames_mobile_banner_height").after('<div align="center" data-freestar-ad="__320x50" id="cardgames_mobile_banner"></div>'),freestar.config.enabled_slots.push({placementName:"cardgames_mobile_banner",slotId:"cardgames_mobile_banner"}),document.getElementsByTagName("html")[0].className+=" has-top-banner")}},{key:"removeMobileHeaderAd",value:function(){this.activated.includes("MobileHeader")&&(this.activated=this.activated.filter(function(e){return"MobileHeader"!==e}),this.log("Removing mobile header ad"),$("#cardgames_mobile_banner").remove(),freestar.config.enabled_slots=freestar.config.enabled_slots.filter(function(e){return"cardgames_mobile_banner"!==e.slotId}),document.getElementsByTagName("html")[0].className=document.getElementsByTagName("html")[0].className.replace(" has-top-banner",""))}},{key:"activateLeftSideWall",value:function(){this.activateHelper("leftSideWall")&&($("#draper-left").append('<ins class="freestar-placeholder-span"></ins>'),this.newSideWall("cardgames_sidewall_left"))}},{key:"removeLeftSideWall",value:function(){this.removeHelper("leftSideWall")&&($("#draper-left .freestar-placeholder-span").remove(),this.deleteSideWall("cardgames_sidewall_left"))}},{key:"activateRightSideWall",value:function(){var e="rightSideWall";this.activated.includes(e)||(this.activated.push(e),this.log("Side wall active without video ad"),$("#draper-right").append('<span class="freestar-placeholder-span"></span>'),this.newSideWall("cardgames_sidewall_right"))}},{key:"removeRightSideWall",value:function(){var t="rightSideWall";this.activated.includes(t)&&(this.activated=this.activated.filter(function(e){return e!==t}),this.log("Removing side wall ad"),$("#draper-right .freestar-placeholder-span").remove(),this.deleteSideWall("cardgames_sidewall_right"))}},{key:"deleteSideWall",value:function(e){void 0!==window.freestar.queue&&void 0!==window.freestar.deleteSidewall&&window.freestar.queue.push(function(){window.freestar.deleteSidewall(e)})}},{key:"newSideWall",value:function(e){void 0!==window.freestar.queue&&void 0!==window.freestar.newSidewall&&window.freestar.queue.push(function(){window.freestar.newSidewall(e)})}},{key:"activateRightSideWallBig",value:function(){this.activateHelper("rightSideWallBig")&&($("#draper-right").append('<span class="freestar-placeholder-span"></span>'),this.newSideWall("cardgames_sidewall_right_big"))}},{key:"removeRightSideWallBig",value:function(){this.removeHelper("rightSideWallBig")&&($("#draper-right .freestar-placeholder-span").remove(),this.deleteSideWall("cardgames_sidewall_right_big"))}},{key:"activateRightSideWallSmall",value:function(){this.activateHelper("rightSideWallSmall")&&($("#draper-right").append('<span class="freestar-placeholder-span"></span>'),this.newSideWall("cardgames_sidewall_right_small"))}},{key:"removeRightSideWallSmall",value:function(){this.removeHelper("rightSideWallSmall")&&($("#draper-right .freestar-placeholder-span").remove(),this.deleteSideWall("cardgames_sidewall_right_small"))}},{key:"activateRightSideVideoWall",value:function(){this.activateHelper("rightSideVideoWall")&&$("#draper-right").append('\n <div id="FreeStarVideoAdContainer">\n <div id="freestar-video-parent">\n <div id="freestar-video-child"></div>\n </div>\n </div>')}},{key:"removeRightSideVideoWall",value:function(){this.removeHelper("rightSideVideoWall")&&$("#FreeStarVideoAdContainer").remove()}},{key:"activateLeaderboardAd",value:function(){this.activateHelper("leaderboard")&&($("#draper-right").append('<div class="adslot_2 leaderboard-ad" align="center" data-freestar-ad="__716x250" id="cardgames_leaderboard_btf"></div>'),freestar.config.enabled_slots.push({placementName:"cardgames_leaderboard_btf",slotId:"cardgames_leaderboard_btf"}))}},{key:"removeLeaderboardAd",value:function(){this.removeHelper("leaderboard")&&($(".leaderboard-ad").remove(),freestar.config.enabled_slots=freestar.config.enabled_slots.filter(function(e){return"cardgames_leaderboard_btf"!==e.slotId}))}},{key:"showVideoAdOnRightWall",value:function(){return!this.rightSideWallActive()&&this.rightWallActive()&&this.config.videoAds&&"rightWall"==this.config.videoType}},{key:"acitvateSlidingVideoAd",value:function(){this.activateHelper("slidingVideo")&&($("#freestar-video-parent").length,setTimeout(function(){window.freestar.queue.push(function(){window.freestar.newVideo("FreeStarVideoAdContainer_Slider_2")})},3e3))}},{key:"removeSlidingVideoAd",value:function(){this.removeHelper("slidingVideo")&&(0!==$("#freestar-video-parent").length&&$("#freestar-video-parent").remove(),void 0!==window.freestar.queue)&&void 0!==window.freestar.deleteVideo&&window.freestar.queue.push(function(){window.freestar.deleteVideo("FreeStarVideoAdContainer_Slider_2")})}},{key:"activateHelper",value:function(e){return!this.activated.includes(e)&&(this.activated.push(e),this.log("Activiating: "+e),$("html").addClass(e),!0)}},{key:"removeHelper",value:function(t){return!!this.activated.includes(t)&&(this.activated=this.activated.filter(function(e){return e!==t}),$("html").removeClass(t),this.log("Removing: "+t),!0)}}])&&i(n.prototype,e),r&&i(n,r),Object.defineProperty(n,"prototype",{writable:!1}),n})();t.exports=e},{"../helpers/UI":16,"../helpers/browser":20,"../helpers/collision-detector":21,"../helpers/settings":25,"./adProvider":6}],10:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}function i(e,t,n){t=l(t);
10var r=e,t=s()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n);if(!t||"object"!=o(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var u=e("./adProvider"),e=(()=>{function t(e){if(this instanceof t)return(e=i(this,t,[e])).type="noads",e;throw new TypeError("Cannot call a class as a function")}var e,n=t,r=u;if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),r&&c(n,r),n=t,(r=[{key:"load",value:function(){this.ready=!0}}])&&a(n.prototype,r),e&&a(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})();t.exports=e},{"./adProvider":6}],11:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}function i(e,t,n){t=l(t);var r=e,t=s()?Reflect.construct(t,n||[],l(e).constructor):t.apply(e,n);if(!t||"object"!=o(t)&&"function"!=typeof t){if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(t=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var u=e("./adProvider"),e=(()=>{function t(e){if(this instanceof t)return(e=i(this,t,[e])).type="onsite",e.rightSideWallAds=["/merchandise/"],e.leftSideWallAds=["/merchandise/"],e.leaderbardAds=["/merchandise/"],e.mobileBannerAds=["/merchandise/"],e.rightSideWallElement=e.createAdElement($("#draper-right"),"onsite-right-sidewall"),e.leftSideWallElement=e.createAdElement($("#draper-left"),"onsite-left-sidewall"),e.mobileBannerAdsElement=e.createAdElement($("#cardgames_mobile_banner"),"onsite-mobile-banner"),e;throw new TypeError("Cannot call a class as a function")}var e,n=t,r=u;if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");return n.prototype=Object.create(r&&r.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),r&&c(n,r),n=t,(r=[{key:"createAdElement",value:function(e,t){var n=document.createElement("ins");return n.setAttribute("id",t),e.children().filter(function(e,t){return"label"!==t.tagName.toLowerCase()}).remove(),e.append(n),$(n)}},{key:"load",value:function(){this.ready=!0,this.InitAdSpots()}},{key:"InitAdSpots",value:function(){this.activateRightSideWall(),this.activateLeftSideWall(),this.activateMobileBannerAd()}},{key:"getRandomAdUrl",value:function(e){return e[Math.floor(Math.random()*e.length)]}},{key:"activateRightSideWall",value:function(){this.insertAd(this.rightSideWallElement,this.getRandomAdUrl(this.rightSideWallAds),function(e){e.style.width="100%",e.style.height="100%"})}},{key:"activateLeftSideWall",value:function(){this.insertAd(this.leftSideWallElement,this.getRandomAdUrl(this.leftSideWallAds),function(e){e.style.width="100%",e.style.height="100%"})}},{key:"activateMobileBannerAd",value:function(){this.insertAd(this.mobileBannerAdsElement,this.getRandomAdUrl(this.mobileBannerAds),function(e){e.style.width="100%",e.style.height="50px"})}},{key:"insertAd",value:function(e,t,n){e.empty();var r=document.createElement("iframe");r.src=t,r.setAttribute("class","onsite-ad"),r.frameBorder=0,r.scrolling="no",n&&n(r),e.append(r)}},{key:"removeRightSideWall",value:function(){this.rightSideWallElement.empty()}}])&&a(n.prototype,r),e&&a(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n})();t.exports=e},{"./adProvider":6}
10],12:[function(e,t,n){var a=e("./helper-functions").captainsLog,i=function(t,e,n,r,o){"undefined"!=typeof APP_MODE&&APP_MODE&&(t="https://cardgames.io"+t),n=n||function(){a.debug("Successfully posted to this url: ".concat(t," with this data : ").concat(JSON.stringify(e)))},r=r||function(e){console.log("ERROR for urL "+t),a.error("ERROR: "+JSON.stringify(e))},$.ajax({type:"POST",url:t,headers:o||{},data:JSON.stringify(e),contentType:"application/json; charset=utf-8",dataType:"json",success:n,error:r})},s=function(e,t,n){if("undefined"!=typeof APP_MODE&&APP_MODE&&(e="https://cardgames.io"+e),t)return n=n||function(e){a.error(JSON.stringify(e))},$.ajax({type:"GET",url:e,success:t,error:n,timeout:5e3});throw new TypeError("Success handler missing")},l={avatars:{getStats:function(e,t){return s("/api/avatars/",e,t)},getLatest:function(e,t){return s("/api/avatars/latest",e,t)},saveFace:function(e,t,n){e={code:e,userAgent:navigator.userAgent};i("/api/avatars/",e,t,n)}},adfree:{getCode:function(e,t,n){return s("/api/adfree/"+e,t,n)},activateCode:function(e,t,n){return i("/api/adfree/"+e+"/activate",{code:e},t,n)}},gdpr:{accept:function(e,t,n,r,o){return i("/api/gdpr/accept",{allowPersonalizedAds:e,allowGoogleAnalytics:t,userAgent:n},r,o)}},country:{get:function(e,t){return s("/lambda/country/",e,t)}},errors:{getLatest:function(e,t){return s("/api/errors/latest",e,t)},getByName:function(e,t,n){return s("/api/errors/"+e,t,n)},log:function(e,t,n,r,o){t?(e={name:e,slug:t,errorMessage:n,url:location.href,userAgent:navigator.userAgent,maxMailCount:5<arguments.length&&void 0!==arguments[5]?arguments[5]:0},i("/api/errors",e,r,o)):a.debug("Slug cannot be empty")}},badDomain:function(){$.ajax({url:"https://cardgames.io/api/errors/baddomain/?domain=".concat(location.hostname,"&href=").concat(encodeURIComponent(location.href)),dataType:"jsonp",jsonpCallback:"nothing"})},events:{post:function(e,t,n){i("/api/events/",e,t,n)}},numberedGames:{win:function(e,t,n,r,o){return n=n.replace(/ /g,"-"),i("/api/".concat(t,"/").concat(n,"/numberedgames/").concat(e,"/win"),r,o)},postSaveResult:function(e,t,n,r,o,a){return r=r.replace(/ /g,"-"),i("/api/".concat(n,"/").concat(r,"/numberedgames/").concat(t,"/saveresult"),e,o,a)},start:function(e,t,n,r,o){return n=n.replace(/ /g,"-"),i("/api/".concat(t,"/").concat(n,"/numberedgames/").concat(e,"/start"),r,o)},getGame:function(e,t,n,r,o){return n=n.replace(/ /g,"-"),s("/api/".concat(t,"/").concat(n,"/numberedgames/").concat(e,"/?domain=").concat(encodeURIComponent(location.href)),r,o)},getStats:function(e,t,n,r){return t=t.replace(/ /g,"-"),s("/api/".concat(e,"/").concat(t,"//numberedgames/stats"),n,r)}},tshirt:{post:function(e,t,n){i("/api/tshirt/",e,t,n)}},visitors:{post:function(e,t,n){return i("/api/visitors",e,t,n)}},badWords:{get:function(e,t){return s("/api/badwords",e,t)}},leaderboard:{get:function(e,t,n,r,o,a,i){return n=n.replace(/ /g,"-"),s("/api/leaderboard/".concat(e,"/").concat(t,"/").concat(r,"?variant=").concat(encodeURIComponent(n),"&playerId=").concat(encodeURIComponent(o)),a,i)},getTimeAsync:function(n,r,o,a){return new Promise(function(e,t){l.leaderboard.get("time",n,r,o,a,e,t)})},getMoveAsync:function(n,r,o,a){return new Promise(function(e,t){l.leaderboard.get("move",n,r,o,a,e,t)})},submitTimeAsync:function(n,r){return new Promise(function(e,t){i("/api/leaderboard/time/submit",n,e,t,{"Content-Signature":r||""})})},submitMoveAsync:function(n,r){return new Promise(function(e,t){i("/api/leaderboard/move/submit",n,e,t,{"Content-Signature":r||""})})}}};t.exports=l},{"./helper-functions":15}],13:[function(e,t,n){var r,l=e("./util"),o=e("./helper-functions"),c=o.captainsLog,u=o._setTimeout,a=o._setInterval,d=l.settings,f=e("./gamecontrol"),m=e("./temp-storage"),o=e("./page"),p=o.themes,o=e("./publicAPI").initializePublicAPI,h=e("./ui-helpers").initMenuFeatureUi,e=(o(),{h:"♥",s:"♠",d:"♦",c:"♣",n:"NT"});function i(){r&&(window.requestAnimationFrame(i),$.fx.tick())}window.requestAnimationFrame&&(l.qs.gid?c.debug("Multiplayer game, not using requestAnimationFrame"):($.fx.timer=function(e){e()&&jQuery.timers.push(e)&&!r&&(r=!0,i())},$.fx.stop=function(){r=!1}));var s,o=navigator.userAgent.match(/Android (4|5|6|7|8|9)/)&&navigator.userAgent.match(/ SM-|samsung/g),g=((o=l.qs.android?!0:o)&&(e={h:"♡",s:"♤",d:"♢",c:"♧"}),s=1,{get:function(){return s},set:function(e){s=e="string"==typeof e?{verySlow:.5,slow:.8,normal:1,fast:1.5,veryFast:2.2}[e]:e,$.fx.speeds._default=400/s,$.fx.speeds.fast=200/s,$.fx.speeds.slow=600/s,1!=s&&(y("animate",1),y("fadeOut",0),y("fadeIn",0),u.speed=s,a.speed=s)},toString:function(){return"SPEED: "+s},ms:v});function v(e){return e/s}function y(e,n){var r=$.fn[e];$.fn[e]=function(){var e=Array.prototype.slice.call(arguments),t=e[n];return"number"==typeof t?e[n]=t/s:t&&t.duration&&(t.duration=v(t.duration)),r.apply(this,e)}}function w(e){$("#"+e+" div").addClass("sad")}function b(e){$("#"+e+" div").removeClass("sad")}d.speed&&"normal"!==d.speed&&g.set(d.speed),l.cake("scroll")&&(window.scroll(0,parseInt(l.cake("scroll"))),l.deleteCake("scroll")),document.referrer&&document.referrer.length&&(document.referrer.match(/^https:\/\/cardgames\.io\//)||document.referrer.match(/127\.0\.0\.1/)||document.referrer.match(/appassets/)||l.trackEvent("Referral",document.referrer));k="",S={},A=0,$(document).on("keypress",function(e){var t,n,r=(new Date).getTime(),o=(2e3<r-A&&(k=""),A=r,String.fromCharCode(e.which));for(t in k+=o,S){if(t==k)return S[t](),void(k="");if(t.substr(0,k.length)==k)return}for(n in S)if(n.substr(0,1)==o)return void(k=o);k=""});var k,S,A,C,o=function(e,t){S[e]=t};function x(e){var e=0<arguments.length&&void 0!==e?e:"",n=e.split(","),t=c.messages.filter(function(t){return n.some(function(e){return-1!==t.toLowerCase().indexOf(e.trim().toLowerCase())})});0===t.length?$("#matrix textarea").val("Sorry, no log lines found for term: "+e):$("#matrix textarea").val(t.join("\n"))}window.players&&window.players.top&&"2"===window.players.top.code&&$("body").addClass("default-top-player"),o("matrix",function(){$("body").toggleClass("matrix");
10var e=$("#matrix textarea");$("body").hasClass("matrix")&&(x(),e.scrollTop(e[0].scrollHeight),setTimeout(function(){$("#matrix input").val("").focus()},200))}),$("#matrix-log-filter").on("input",function(e){var t=$("#matrix-log-filter").val().trim().toLowerCase(),n=$("#matrix textarea");t.match(/^(:q|quit|exit|matrix)$/)?$("body").removeClass("matrix"):"help"===t?n.val("What do you need help with?"):"who are you"===t?n.val("My name is Skynet."):"skynet"===t?n.val("Welcome to Cyberdyne systems."):"shutdown"===t?n.val("Shutting site down in 5 seconds..."):"cheat"===t?n.val("Nice try!"):x(t.trim())}),l.qs.autoplay&&("number"==typeof l.qs.autoplay?g.set(l.qs.autoplay):g.set(3)),$(function(){h();for(var e=0,t=["bottom","top","left","right"];e<t.length;e++)l.preloadBackgroundImageClass("face-small sad face-".concat(t[e],"-player"));function o(e){var t;return void 0===d?{}:void 0===(t=void 0!==d[e]?d:l.siteSettings)[e]?(c.error("Bad option name: "+e),{}):t}function n(){l.hideFireworks(),window.confettiEffect||$("body").removeClass("confetti")}function r(){("fourthOfJuly"===p.current&&l.cake("country")&&"US"===l.cake("country")&&0<$("html.fourthOfJuly").length||"newyears"===p.current&&0<$("html.newyears").length||"world-cup"===p.current&&0<$("html.world-cup").length&&!APP_MODE&&731<=window.innerWidth)&&!document.cookie.match(/themeoff/)&&!1!==l.siteSettings.holidayThemes?(l.cake("no-fireworks")?$(".fireworks-off").text(window.t("game::startFireworks","Press here to start them again")):window.fireworkEffect||l.showFireworks(),(APP_MODE||window.innerWidth<731)&&$("body").on("click touchstart",l.hideFireworks)):n()}$(document).on("keypress",function(e){13===e.which&&$("#start-new-game").is(":visible")&&$("#start-new-game").click()}),APP_MODE&&(l.siteSettings.showAdSettingsLink&&($("#ad-settings").css("display","block"),$("#ad-free").css("display","none")),window.Android,window.app={showAdSettingsLink:function(){l.siteSettings.set("showAdSettingsLink",!0),$("#ad-settings").css("display","block")},hideAdSettingsLink:function(){l.siteSettings.set("showAdSettingsLink",!1),$("#ad-settings").hide()},updateAdfreePrice:function(e){$("#amount").text(e),$("#amount_button_label").text(e),$("#ad-free-button").prop("disabled",!1)},showAdFreeLink:function(e){e?$("#ad-free-button").prop("disabled",!1):($("#adfree-promo").hide(),$("#adfree-bought").show(),$("#ad-free-button").hide(),$("#restore-adfree-button").hide(),$("#ad-free").hide(),$("#ad-free-button").prop("disabled",!0))}},$(".game-links a").on("click",function(e){var t=e.target.href;e.preventDefault(),l.ads.trigger(function(){location.href=t})}),l.setAppBackgroundColor(),window.addEventListener("message",function(e){"new-face"===e.data&&(loadPlayerFaces(),$("#temphidenames").remove(),$("body").removeClass("subview-open avatars-subview-open"),e=$("#title h1").data("real-title"))&&$("#title h1").text(e)}),window.addEventListener("orientationchange",function(e){$("body").removeClass("subview-open avatars-subview-open statistics-subview-open");var t=$("#title h1").data("real-title");t&&$("#title h1").text(t)}),i="en"===currentLanguage?"":currentLanguage+"/",$('a[href$="statistics/"]').on("click",function(e){e.preventDefault(),$("#statistics-subview").attr("src")||$("#statistics-subview").attr("src",e.target.href),$("body").addClass("subview-open").addClass("statistics-subview-open"),l.mobileMenu.close()}),$('a[href="/'.concat(i,'avatars/"]')).on("click",function(e){e.preventDefault();var e=$("#title h1"),t=e.text();e.data("real-title",t),e.text(window.t("game::changePlayer","CHANGE PLAYER")),$("#avatars-subview").attr("src")||$("#avatars-subview").attr("src","/avatars/"),$("body").addClass("subview-open").addClass("avatars-subview-open"),l.mobileMenu.close()}),$(".appmode-remove").remove(),$(".game-links a").each(function(){$(this).attr("href",$(this).attr("href")+"?"+(new Date).getTime())}),$('a[href="#ad-settings"]').on("click",function(e){e.preventDefault(),l.mobileMenu.close(),window.Android?Android.adSettings():window.webkit.messageHandlers.adSettings.postMessage("Hi there")}),$("#ad-free").on("click touchstart",function(e){e.preventDefault(),l.mobileMenu.close(),$("#buy-premium").show()}),$("#close-ad-free").on("click touchstart",function(e){e.preventDefault(),$("#buy-premium").hide()}),$("#ad-free-button").on("click touchstart",function(e){if(e.preventDefault(),1==$(this).is(":disabled"))return!1;window.Android?Android.buyAdFree():window.webkit.messageHandlers.buyAdFree.postMessage("Evil ads :(")}),$("#restore-adfree-button").on("click touchstart",function(e){e.preventDefault(),window.Android?Android.restoreAdFree():window.webkit.messageHandlers.restoreAdFree.postMessage("Restore me please!")})),$("#play-page").on("click",function(){}
10),$('.option-row input[type="radio"]').each(function(){var e=$(this).attr("name");o(e)[e]==$(this).val()&&$(this).prop("checked",!0)}),$(".option-row input+span").on("touchstart",function(e){$(this).siblings("input").trigger("click"),e.preventDefault()}),$('.option-row input[type="radio"]').on("change",function(e){var t=$(this).attr("name"),n=o(t),r=$(this).val();"number"==typeof n[t]?n.set(t,parseInt(r)):n.set(t,r)}),$('.option-row input[type="checkbox"]').each(function(){var e=$(this).attr("name"),t=o(e);$(this).prop("checked",t[e])}),$('.option-row input[type="checkbox"]').on("change",function(e){var t=$(this).attr("name");o(t).set(t,$(this).is(":checked"))}),l.siteSettings.addListener("useDarkTheme",function(e){e.value?$("html").addClass("dark-theme"):$("html").removeClass("dark-theme"),APP_MODE&&l.setAppBackgroundColor()}),l.siteSettings.addListener("hideMultiplayerButton",function(e){l.siteSettings.hideMultiplayerButton&&($("#multiplayer-button").hide(),APP_MODE||alert("You've chosen to hide the Multiplayer button. It will still show up when you load the page, but will be hidden as soon as the game starts."))}),l.siteSettings.addListener("photosensitiveMode",function(e){e.value?$("html").addClass("photosensitive-mode"):$("html").removeClass("photosensitive-mode")}),l.siteSettings.addListener("holidayThemes",function(e){e.value?(l.deleteCake("themeoff"),p.turnOn()):p.turnOff(),r()}),l.siteSettings.addListener("alwaysUseInterstitialAds",function(e){e.value?console.log("Interstitial ads enabled"):console.log("Sidebanner ads enabled")}),l.siteSettings.addListener("spreadCards",function(e){try{webRenderer._adjustHand(human)}catch(e){}}),void 0!==d&&d.addListener("speed",function(e){var t={slow:window.t("game::speed::slow","Slow"),verySlow:window.t("game::speed::verySlow","Very slow"),normal:window.t("game::speed::normal","Normal"),fast:window.t("game::speed::fast","Fast"),veryFast:window.t("game::speed::veryFast","Very fast")};$("#speed-value").text(t[d.speed]),g.set(d.speed)}),$("#facebook-promo a").click(function(){l.trackEvent("FacebookLinkClick")}),u(function(){l.preloadImage(STATIC_ASSET_DOMAIN+"/shared/images/svg/trophy.svg")},9e3),$(".avatar").click(function(){l.trackEvent("ClickPlayer",$(this).attr("id"))}),$("#game-options-page button").click(function(){$("body").removeClass("options-open")}),$('a[href="#options"]').click(function(e){e.preventDefault(),l.removeConfetti(),l.mobileMenu.isOpen()&&l.mobileMenu.close(),$("body").addClass("options-open"),$("body").removeClass("multiplayer-open"),$.getJSON("/version.json",function(e){$("#options-version").text(window.t("game::version","v[[version]]",{version:e.version}))})});function a(e){return e&&e.toUpperCase().match(/-THX1138$/)}var i={slow:window.t("game::speed::slow","Slow"),verySlow:window.t("game::speed::verySlow","Very slow"),normal:window.t("game::speed::normal","Normal"),fast:window.t("game::speed::fast","Fast"),veryFast:window.t("game::speed::veryFast","Very fast")};void 0!==d&&$("#speed-value").text(i[d.speed]),$('a[href="#newgame"]').click(function(e){function t(){l.qs.gid?document.location.href=document.location.pathname:(l.isMobileLookActive(),l.reloadPage())}e.preventDefault(),e.stopPropagation(),l.removeConfetti();var e=window.t("game::warning::inProgress","You have a game in progress. Are you sure you want to start a new game and abandon the current game?"),n=f.isGameStarted(),r=f.isGameFinished(),o=new m(window.slug);return n?r?l.cake("results")||o.get("scores")?confirm(e)&&(l.cake("results",""),o.remove("scores"),l.trackEvent("NewGame","Finished"),l.ads.trigger(t)):(l.trackEvent("NewGame","Finished"),l.ads.trigger(t)):confirm(e)&&(l.trackEvent("NewGame","Abandoned"),l.cake("results")&&l.cake("results",""),o.remove("scores"),l.ads.trigger(t)):l.cake("results")||o.get("scores")?confirm(e)&&(l.cake("results",""),o.remove("scores"),l.trackEvent("NewGame","NotStarted"),l.ads.trigger(t)):(l.trackEvent("NewGame","NotStarted"),l.ads.trigger(t)),!1});function s(){window.paused?(window.paused=!1,window.pauseTime+=(new Date).getTime()-window.pausedAt,$('a[href="#pause"]').text(window.t("game::pauseGame","Pause Game")),$("#play-page").removeClass("paused"),$("#pause-notification").hide()):f.isGameFinished()||(window.pauseTime=window.pauseTime||0,window.pausedAt=(new Date).getTime(),window.paused=!0,$('a[href="#pause"]').text(window.t("game::resumeGame","Resume Game")),$("#play-page").addClass("paused"),$("#pause-notification").show())}a(l.cake("betacode"))&&$("#board").removeClass("beta"),$("#beta-screen button").on("click",function(e){e.preventDefault();e=$("#beta-screen input").val();a(e)?($("#board").removeClass("beta"),l.cake("betacode",e,20)):alert("That is not a valid code")}),$('a[href="#rules"],a[href="#about"]').on("click",function(e){e.target.href.match(/#rules/)?($("body").removeClass("about-open"),$("body").addClass("rules-open")):($("body").removeClass("rules-open"),$("body").addClass("about-open")),APP_MODE&&e.preventDefault(),l.mobileMenu.close()}),$('a[href="#pause"]').click(function(e){s(),l.mobileMenu.close(),e.preventDefault()}),$("#resume-button").click(function(e){s(),l.mobileMenu.close(),e.preventDefault()}),$(".theme-off").on("click",function(e){e.preventDefault(),l.cake("themeoff","1",10,"/"),$("html").removeClass(p.current),n()}),$(".fireworks-off").on("click",function(e){e.preventDefault(),window.fireworkEffect?(l.cake("no-fireworks",1,2),$(".fireworks-off").text(window.t("game::startFireworksAgain","Press here to start them again")),n()):(l.deleteCake("no-fireworks"),$(".fireworks-off").text(window.t("game::stopFireworks","Press here to stop them")),l.showFireworks())}),$(".theme-on").on("click",function(e){e.preventDefault(),l.deleteCake("themeoff"),0===$("#theme-css").length&&$("
10<link>",{href:"/themes/".concat(siteVersion,"/").concat(p.current,".min.css"),id:"theme-css",rel:"stylesheet"}).appendTo("head"),$("html").addClass(p.current),r()}),$(window).on("pagehide",function(e){window.paused||(window.pageHiddenAt=(new Date).getTime())}),$(window).on("pageshow",function(){var e;window.paused||window.pageHiddenAt&&(e=(new Date).getTime()-window.pageHiddenAt,"undefined"==typeof pauseTime&&(window.pauseTime=0),window.pauseTime+=e)}),void 0===document.createElement("div").style.webkitTextStroke&&$("html").addClass("no-text-stroke"),window.startTime=(new Date).getTime(),(new Date).toString().match(/ May 4 /)&&$("#the-force").text(window.t("game::mayThe4th","May the 4th be with you"));try{"fourthOfJuly"===p.current&&l.cake("country")&&"US"===l.cake("country")&&0<$("html.fourthOfJuly").length&&!document.cookie.match(/themeoff/)?(l.julyFourth(),l.cake("no-fireworks")?$(".fireworks-off").text(window.t("game::startFireworks","Press here to start them again")):l.showFireworks(),(APP_MODE||window.innerWidth<731)&&$("body").on("click touchstart",l.hideFireworks)):$(".fourthOfJuly").removeClass("fourthOfJuly"),r()}catch(e){console.log(e)}}),l.browser.supportsSvg||((C=!0)?(C="../","/"===document.location.pathname&&(C=""),$("#firefox-Logo").attr("src",C+"shared/images/Icon_Mozilla.png"),$("#Chrome-Logo").attr("src",C+"shared/images/Icon_Chrome.png"),$("#oldbrowser").show()):$("#oldbrowser").hide()),void 0!==n&&(t.exports={loadPlayerFace:function(e,t,n){var r=l.getFaceUrl(e,!1),o=l.getFaceUrl(e,!0),e=l.getHairClass(e),r=(l.createFaceStyleElement(t.substr(1),r,o),$(t+" .face-small"));(o=r.get(0).className.match(/hair-\w+/))&&(o=o[0],r.data("original-hair")||r.data("original-hair",o),r.removeClass(o)),r.addClass(e),r.data("current-hair",e),$(t+" small").text(n),$(t+" .face-small").css("margin","auto"),$(t).css("margin-left","-"+$(t).width()/2+"px")},addCheat:o,makePlayersSad:function(e){for(var t=["top-player","bottom-player","left-player","right-player"],n=0;n<t.length;n++)(-1==e.indexOf(t[n])?w:b)(t[n])},makePlayerSad:w,makePlayerHappy:b,makeAllPlayersHappy:function(){$(".avatar div").removeClass("sad")},SPEED:g,HTML_CARD_SUITS:e})},{"./gamecontrol":14,"./helper-functions":15,"./page":31,"./publicAPI":32,"./temp-storage":34,"./ui-helpers":35,"./util":36}],14:[function(e,t,n){var r="notstarted",o=null,a={},i={};function s(e){r!==e&&(a[r=e]||[]).forEach(function(e){e(i)})}t.exports={setContext:function(e){i=e},isGameNotStarted:function(){return"notstarted"===r},isGameStarted:function(){return"started"===r},isGameFinished:function(){return"finished"===r},isStuck:function(){return"stuck"===r},startGame:function(){s("started")},finishGame:function(){s("finished")},stuck:function(){s("stuck")},resetGameStatus:function(){s("notstarted")},on:function(e,t){a[e]=a[e]||[],a[e].push(t)},off:function(e,t){a[e]&&(a[e]=a[e].filter(function(e){return e!==t}))},addRestartHandler:function(e){o=e},canRestart:function(){return null!==o},restart:function(){if(null===o)throw new Error('No restart handler has been registered. Check "canRestart()" before calling this function');o()}}},{}],15:[function(e,t,n){function s(e,t){var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=((e,t)=>{var n;if(e)return"string"==typeof e?l(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0})(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var a={x:-1,m:Math.pow(2,32),a:1664525,b:1013904223,init:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:-1;this.x=-1==e?Math.floor(Math.random()*this.m):e},next:function(){return-1==this.x&&this.init(),this.x=(this.a*this.x+this.b)%this.m,this.x/(this.m-1)}},c={shuffle:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,n=e.length;if(0!==n)for(a.init(t);--n;){var r=Math.floor(a.next()*(n+1)),o=e[n];e[n]=e[r],e[r]=o}},remove:function(e,t){var n;if(2<arguments.length&&void 0!==arguments[2]&&arguments[2]||!Array.isArray(t))return-1!==(n=e.indexOf(t))&&(e.splice(n,1),!0);var r,o=!0,a=s(t);try{for(a.s();!(r=a.n()).done;)var i=r.value,o=o&&c.remove(e,i)}catch(e){a.e(e)}finally{a.f()}return o},random:function(e){return e[Math.floor(Math.random()*e.length)]},same:function(e,t){var n=e.slice(),r=t.slice();if(n.length!==r.length)return!1;
10n.sort(),r.sort();for(var o=0;o<n.length;o++)if(n[o]!==r[o])return!1;return!0},occuranceMap:function(e){return e.reduce(function(e,t){return e[t.toString()]=(e[t.toString()]||0)+1,e},{})},isDifferenceEqual:function(e,t,n){var r,o,a=c.occuranceMap(e),i=c.occuranceMap(t),s=c.occuranceMap(n);for(r in a)i[r]&&(i[r]-=a[r],0===i[r])&&delete i[r];for(o in s){if(i[o]!==s[o])return!1;delete i[o]}return 0===Object.keys(i).length}};var r={info:function(e){this.messages.push("INFO: ".concat(e)),this.level.match(/info|verbose|debug/)&&(console.info?console.info(e):console.log("INFO: "+e))},messages:[],error:function(e){this.messages.push("ERROR: ".concat(e)),console.error?console.error(e):console.log("ERROR: "+e)},debug:function(e){this.messages.push("DEBUG: ".concat(e)),"debug"==this.level&&(console.debug?console.debug(e):console.log("DEBUG: "+e))},warn:function(e){this.messages.push("WARN: ".concat(e)),this.level.match(/info|verbose|warn|debug/)&&(console.warn?console.warn(e):console.log("WARN: "+e))},toString:function(){return"gott log "},level:"info"};function o(e,t){return 1!==o.speed&&(t=Math.floor(t/o.speed)),setTimeout(e,t)}function i(e,t){return 1!==i.speed&&(t=Math.floor(t/i.speed)),setInterval(e,t)}function u(e,t){for(var n in t)((e,t,n)=>{var r=e[t];if(!r)throw new Error("Unrecognized func name: ".concat(t));e[t]=function(){var e=this,t=arguments;o(function(){r.apply(e,t)},n)}})(e,n,t[n])}function d(e){return"undefined"==typeof JSON?"JSON Not Available":JSON.stringify(function e(t){var n=Object.prototype.toString;if("undefined"==typeof JSON)return"JSON Not Available";if(null==t)return t;if(t.name||t.shortName)return t.name||t.shortName;if("[object Array]"==n.call(t)){for(var r=[],o=0;o<t.length;o++)r.push(e(t[o]));return r}if("[object Object]"!=n.call(t))return t;var a,i={};for(a in t)i[a]=e(t[a]);return i}(e),null,2).replace(/\s*"([HSDC]\d\d?)"\s*(\]|,)/gm,"$1$2").replace(/"([HSDC]\d\d?)"/gm,"$1")}function f(e,r){function o(e,t,n){if(0!==e.length||0!==t.length)return 0===t.length?(!r||e.length>=r)&&n.push(e):(o(e.concat(t[0]),t.slice(1,t.length),n),o(e,t.slice(1,t.length),n)),n}return o([],e,[])}i.speed=o.speed=1,void 0!==n&&(t.exports={captainsLog:r,dataBind:function(e,i){return e.replace(/@(\w+(\.\w+)*)/g,function(e,t){for(var n,r=t.split("."),o=i,a=0;a<r.length;a++){if(n=r[a],void 0===o)return"<undefined>";if(null===o||null===o[n])return"<null>";if(void 0===o[n])return"<undefined>";o=o[n]}return""+o})},_setTimeout:o,_setInterval:i,randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e},ArrayUtils:c,addDelaysToFunctions:u,cson:d,combinations:f})},{}],16:[function(e,t,n){var r=e("../helper-functions")._setTimeout,o=e("./browser").addScript,a=e("./settings").siteSettings;function i(){return window.matchMedia?matchMedia("(max-width: 730px)").matches:$(window).width()<=730}function s(){l.close()}var l={open:function(){$(document).triggerHandler("mobileMenu:beforeOpen"),c(),$("#game-link-wrapper").addClass("has-transitions").get(0).scrollTop=0,$("body").addClass("menu-open"),APP_MODE||$("#wrapper").css("height",$("#game-link-wrapper").height()),r(function(){return $("#wrapper").on("click",s)},100),$("#mobile-menu").css("z-index",9999999999)},close:function(){l.isOpen()&&($("body").removeClass("menu-open"),APP_MODE||$("#wrapper").css("height","auto"),r(function(){return $("#game-link-wrapper").removeClass("has-transitions")},300),window.scrollTo(0,0),$("#wrapper").off("click",s))},toggle:function(e){"touchstart"===e.type&&(this.cancelClicks=!0),"click"===e.type&&this.cancelClicks||(e.preventDefault(),l.isOpen()?l.close():l.open())},isOpen:function(){return $("body").hasClass("menu-open")}};function c(){window.confettiEffect&&(confettiEffect.stop(),$(".confetti-container").remove(),$("body").removeClass("confetti"),delete window.confettiEffect)}t.exports={isMobileLookActive:i,matchMediaMaxWidth:function(e){return window.matchMedia?matchMedia("(max-width: "+e+"px)").matches:$(window).width()<=e},mobileMenu:l,showConfetti:function(){a.confetti&&o("/shared/effects/"+siteVersion+"/confetti.min.js",function(){var e=$
10("<div>",{"class":"confetti-container"}).appendTo("html"),t=i()||navigator.userAgent.match(/iPhone/);window.confettiEffect=new Confetti(e.get(0),t?250:800),confettiEffect.start(),$("body").addClass("confetti"),$(".confetti-container").on("click",c)})},removeConfetti:c,showFireworks:function(){a.confetti&&(window.fireworksLoaded?(window.fireworkEffect=new Fireworks["default"](confettiDiv.get(0),{delay:{min:100,max:1e3}}),window.fireworkEffect.start(),$("body").addClass("confetti")):o("/shared/effects/"+siteVersion+"/fireworks.min.js",function(){window.confettiDiv=$("<div>",{"class":"firework-container"}).appendTo("body"),window.fireworkEffect=new Fireworks["default"](confettiDiv.get(0),{delay:{min:100,max:1e3}}),window.fireworksLoaded=!0,window.fireworkEffect.start(),$("body").addClass("confetti")}))},hideFireworks:function(){window.fireworkEffect&&(window.fireworkEffect.stop(),window.fireworkEffect=void 0)}}},{"../helper-functions":15,"./browser":20,"./settings":25}],17:[function(e,t,n){t.exports={getFaceUrl:function(e,t){return e.toString().match(/^\d\d?$/)?t?"/shared/images/svg/face-"+e+"-sad.svg":"/shared/images/svg/face-"+e+".svg":(e="https://cardgames.io/lambda/faces/"+e,t&&(e+="/sad"),e)},getHairClass:function(e){return e.length<=2?"hair-".concat(e):"hair-".concat(e.charAt(2))}}},{}],18:[function(e,t,n){function l(e,t){var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=((e,t)=>{var n;if(e)return"string"==typeof e?s(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0})(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var r=e("../lib/badnames/expand.js").expand,e=e("./bad-names/bad-names.js"),o=e.exactBadWords,e=e.partialBadWords,c=r(o),u=r(e),d=["scunthorpe","thorny"];t.exports={isBadName:function(e){if(e){var t=(e=e.toLowerCase()).split(" ");if(!d.includes(e)){var n,r=l(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(c.includes(o))return!0}}catch(e){r.e(e)}finally{r.f()}var a,i=l(u);try{for(i.s();!(a=i.n()).done;){var s=a.value;if(e.includes(s))return!0}}catch(e){i.e(e)}finally{i.f()}}}return!1},badNames:c,veryBadNames:u,exactBadWords:o,partialBadWords:e}},{"../lib/badnames/expand.js":28,"./bad-names/bad-names.js":19}],19:[function(e,t,n){t.exports={exactBadWords:"(2( girls 1 cup|g1c)|a(crotomophilia|la(bama hot pocket|skan pipeline)|n(al|ilingus|us)|rse|ss)|b(a(b(eland|y (batter|juice))|ll (g(ag|ravy)|kicking|licking|sack)|ngb(ros|us)|re(back|ly legal|naked)|st(ard|inado))|bw|dsm|e(a(ner|stiality|ver (cleaver|lips))|stiality|t)|i(g (b(lack|reasts)|knockers)|mbos|rdlock|tch)|l(o(nde action|ody|w( (job|your load)|job))|u(e waffle|mpkin))|o(llocks|n(dage|er)|o(b|ty call))|r(own showers|unette action)|u(gger|kkake|llet vibe|ng( hole|hole)|sty|tt))|c(a(m(el toe|girl)|rpet( muncher|muncher)|sino)|h(ing chong|ocolate rosebuds)|i(alis|rclejerk)|l(eveland steamer|it|over clamps)|o(ck|on|pro(lagnia|philia)|rnhole|xâzucker machine)|r(ap|e(ampie|tin))|u(m|n(nilingus|t)))|d(arkie|e(ep( throat|throat)|ndrophilia)|i(ck(head|s)|ldo|ngleberr(ies|y)|rty (pillows|sanchez))|o(g( style|g(ie( style|style)|y( style|style)))|lcett|m(inat(ion|rix)|mes)|nkey punch|rk|uble (dong|penetration))|p action|ry hump|vda|yke)|e(cchi|jaculation|roti(c|sm)|scort|unuch)|f(ag|e(c(al|k)|l(ch|latio|tch)|mdom)|i(gging|nger(bang|ing)|sting)|oot( fetish|job)|r(igging|otting)|u(ck|dge( packer|packer)|tanari))|g(-spot|a(mbl(e|ing)|ng
10( bang|bang))|en(der bender|itals)|irl( on|s gone wild)|o(at(cx|se)|d damn|kkun|lden shower|o( girl|dpoop)|regasm)|rope|uro)|h(a(nd( job|job)|rd( core|core))|e(-she|ntai)|o(nkey|oker|rny|t c(arl|hick)|w to (kill|murder))|u(ge fat|mping))|in(cest|tercourse)|j(a(ck off|il( bait|bait)|ps)|erk off|i(g(aboo|g(aboo|erboo))|zz)|uggs)|k(i(ke|n(baku|k(ster|y)))|nobbing)|l(e(ather (restraint|straight jacket)|mon party|sdom)|o(lita|vemaking))|m(a(ke me come|le( squirting|dom)|sturbat(e|i(ng|on)))|enage a trois|i(lf|ssionary position)|o(ng|ron)|r hands|uff( diver|diving))|n(a(mbla|washi)|e(gro|onazi)|i(g( nog|g(a|er))|mphomania|pple)|once|sfw|u(d(e|ity)|tten)|ympho)|o(morashi|ne (cup two girls|guy one jar)|rg(asm|y))|p(a(edophile|jeet|ki|nt(ies|y))|e(do(bear|phile)|gging|nis)|i(key|llock|ss( pig|ing|pig))|l(ayboy|easure chest)|o(le smoker|nyplay|o(f|n|p( chute|chute))|rn)|ri(ck|nce albert piercing)|thc|u(bes|nany|ssy))|qu(e(af|ef)|im)|r(a(ghead|p(e|i(ng|st)))|e(ctum|verse cowgirl)|im(job|ming)|osy palm|u(gmuncher|s(sian warship|ty trombone)))|s(&m|a(dism|ntorum)|c(at|hlong|issoring)|e(men|x)|h(a(g|ved beaver)|emale|i(bari|rt lifter|t)|ota|rimping|ut the hell up)|k(ank|eet)|l(a(nteye|pper)|ut)|mut|n(atch|owballing)|odom(ize|y)|p(astic|ic|looge|ooge|read legs|unk)|t(r(ap( on|on|pado)|ip club)|yle doggy)|u(ck|icide girls|ltry women)|w(astika|inger))|t(a(inted love|king a piss|ste my)|ea bagging|h(r(eesome|oating)|umbzilla)|i(ed up|ght white|t)|o(ngue in a|pless|sser|welhead)|r(anny|ibadism)|u(b( girl|girl)|rd|shy)|w(at|ink|o girls one cup))|u(ndressing|pskirt|r(ethra play|ophilia))|v(agina|enus mound|i(agra|brator)|o(rarephilia|y(eur|uer))|ulva)|w(ank|et( dream|back)|h(ite power|ore)|r(apping men|inkled starfish))|y(aoi|ellow showers|iffy)|zoophilia)",partialBadWords:"(b(astard|i(atch|tch)|ollock)|cunt|douche|f(a(ck|ggot)|ck|uck)|horny|niggr|piss|s(hit|kank|lut)|t(osser|wat)|w(ank|hore))"}},{}],20:[function(e,t,n){var e=e("./cookies"),r=e.cake,o=e.deleteCake;t.exports={browser:{canSetCookies:function(){var e="test";return r(e,"value",2,"/"),"value"==r(e)&&(o(e),!0)},supportsSvg:!0},addScript:function(e,t){var n=document.createElement("script");return n.async=!0,n.src=e,n.onload=t,(e=document.getElementsByTagName("script")[0]).parentNode.insertBefore(n,e),n}}},{"./cookies":22}],21:[function(e,t,n){function f(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n["return"]&&(i=n["return"](),Object(i)!==i))return}finally{if(c)throw o}}return s}})(e,t)||m(e,t)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function m(e,t){var n;if(e)return"string"==typeof e?r(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var o,a,i=e("./events").trackEvent,s=e("./cookies").cake,l=!1,c=!1,u=!0,p=!1,d=!0;function h(e){var t=e.getBoundingClientRect();if(0!==t.width&&0!==t.height){for(var n=[],r=t.top+20;r<=t.bottom-20;r+=100)for(var o=t.left+20;o<=t.right-20;o+=100)n.push([o,r]);p&&n.forEach(function(e){var e=f(e,2),t=e[0],e=e[1],n=document.createElement("div");n.style.position="absolute",n.style.left="".concat(t-3,"px"),n.style.top="".concat(e-3,"px"),n.style.width="6px",n.style.height="6px",n.style.backgroundColor="red",n.style.borderRadius="50%",n.style.zIndex="99999",n.style.pointerEvents="none",document.body.appendChild(n),setTimeout(function(){return n.remove()},5e3)});for(var a=0,i=n;a<i.length;a++){var s,l=f(i[a],2),c=l[0],u=((e,t)=>{var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=m(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})(document.elementsFromPoint(c,l[1]));try{for(u.s();!(s=u.n()).done;){var d=s.value;if("IFRAME"===d.tagName&&(d!==e&&!e.contains(d)))return d}}catch(e){u.e(e)}finally{u.f()}}}return null}function g(){var e,t=document.getElementById("board");return!!t&&!!(t=h(t))&&(u&&(e="res: "+window.innerWidth+"x"+window.innerHeight,e=(e=(e+=", isize: "+t.width+"x"+t.height)+", iI
10d: "+(t.id||"no-id"))+", country: "+s("country"),i("iframe-blocking",e)),c&&t.remove(),d&&y(),!0)}function v(){void 0!==window.requestIdleCallback?window.requestIdleCallback(function(){o=setInterval(g,1e4),w()}):(o=setInterval(g,1e4),w())}function y(){o&&(clearInterval(o),o=null)}function w(){l||(l=!0,window.addEventListener("resize",function(){y(),a&&clearTimeout(a),a=setTimeout(function(){v()},5e3)}))}t.exports={initCollisionDetector:v,disableCollisionDetector:y}},{"./cookies":22,"./events":23}],22:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f=e("../helper-functions").captainsLog,o=(e("./events").trackEvent,e("../api"));function m(e,t){console.log("Dough!");try{var n={};try{n=JSON.parse(window.name)}catch(e){n={}}if("object"===r(n)&&null!==n||(n={}),void 0===t)return void 0!==n[e]?n[e]:null;n[e]=t,window.name=JSON.stringify(n)}catch(e){try{o.errors.log("DoughError",slug,e.message+" , window.name="+window.name,null,null,5)}catch(e){}return null}}function p(e){var t=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie=t,document.cookie=t+" path=/";try{var n=JSON.parse(window.name);n&&"object"==r(n)&&void 0!==n[e]&&(delete n[e],window.name=JSON.stringify(n))}catch(e){}}t.exports={cake:function e(t,n,r,o){if(void 0===n){if(document.cookie&&navigator.cookieEnabled){for(var a=document.cookie.split(";"),i={},s=0;s<a.length;s++){var l=a[s].replace(/^\s*|\s*$/g,"").split("=");i[l[0]]=decodeURIComponent(l[1])}return i[t]||null}return m(t)}navigator.cookieEnabled||(f.debug("Cookies are disabled in this browser, setting up temporary value ".concat(t,"=").concat(n," ...")),m(t,n));var c,u=t+"="+encodeURIComponent(n);r&&((c=new Date).setTime(c.getTime()+24*r*60*60*1e3),u+="; expires="+c.toUTCString()),o&&(u+="; path="+o),p(t),document.cookie=u;try{var d=e(t);d!=n&&(n||d)&&navigator.cookieEnabled}catch(e){}},dough:m,deleteCake:p}}
10,{"../api":12,"../helper-functions":15,"./events":23}],23:[function(e,t,n){var s=e("../helper-functions").captainsLog,l=e("../api"),c=e("../gamecontrol");function u(e,t,n,r,o,a){var i;!0!==u.DISABLED&&("FinishGame"==e&&c.finishGame(),category=category||"",t=t||"",n=n||0,r=r||"",o=o||"","Error"===(e=e||"")&&""===r&&"undefined"!=typeof window&&(r=window.siteVersion||""),APP_MODE&&(o=(i=navigator.userAgent||"").match(/iPhone/i)?"APP-iPhone":i.match(/iPad/i)?"APP-iPad":i.match(/android/i)?"APP-Android":"APP-Unknown - "+i),a=a||u.PROBABILITY,s.debug("TrackEvent: action=".concat(e,", label=").concat(t,", value=").concat(n,", variable1=").concat(r,", variable2=").concat(o,", probability=").concat(a)),Math.random()<=a)&&l.events.post({category:category,action:e,label:t,value:n,variable1:r,variable2:o,probability:a})}u.PROBABILITY=.001,t.exports={trackEvent:u,forceTrackEvent:function(e,t,n,r,o){u(e,t,n,r,o,1)}}},{"../api":12,"../gamecontrol":14,"../helper-functions":15}],24:[function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function o(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?a(Object(o),!0).forEach(function(e){var t,n;t=r,n=o[e=e],(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function i(e,t){var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=((e,t)=>{var n;if(e)return"string"==typeof e?s(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0})(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function c(e){e=((e,t)=>{if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=r(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string");return"symbol"==r(e)?e:e+""}function u(e){return e&&e.game&&e.game.isPrivateGame?"private-multiplayer":e&&e.webCardGame&&e.webCardGame.multiplayerTable?"public-multiplayer":"singleplayer"}var d="analytics_queue_v1",f=e("./storage"),m=f.tryGetLocalStorage,p=f.trySetLocalStorage,h=f.tryDeleteLocalStorage,g=e("../gamecontrol"),v=(()=>{function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function")}return e=a,n=[{key:"safeParse",value:function(e,t){var n;try{n=JSON.parse(e)}catch(e){console.warn("Failed to parse JSON:",e),n=t}return null===n?t:n}},{key:"saveQueue",value:function(e){p(d,JSON.stringify(e))}},{key:"enqueue",value:function(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};"event"!==e&&"set"!==e||((n=a.safeParse(m(d,"[]"),[])).push({command:e,action:t,params:r,timestamp:Date.now(),page:location.href}),a.saveQueue(n))}},{key:"flush",value:function(){if(a.isGtagAvailable()){var e=a.safeParse(m(d,"[]"),[]);if(e&&e.length){var t,n=i(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;"event"===r.command?gtag("event",r.action,r.params):"set"===r.command&>ag("set",r.action,r.params)}}catch(e){n.e(e)}finally{n.f()}h(d)}}}},{key:"isGtagAvailable",value:function(){return"function"==typeof gtag}},{key:"trackLocaleChange",value:function(e,t){a.isGtagAvailable()&&a.enqueue("event","language_change",{event_category:"engagement",current_language:e,previous_language:t})}},{key:"trackLocale",value:function(e){var t;a.isGtagAvailable()&&(null==e&&(e="none"),t=(t=document.documentElement.lang)?t.split("-")[0]:"en",gtag("set","user_properties",{selected_language:e,current_language:t}))}},{key:"pushDataLayer",value:function(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)}},{key:"trackCustomEvent",value:function(e){a.pushDataLayer(o({event:e},1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}))}},{key:"trackGameStarted",value:function(e){a.trackCustomEvent("game_started",{game_name:e,game_mode:1<arguments.length&&void 0!==arguments[1]?arguments[1]:"singleplayer"})}},{key:"trackGameCompleted",value:function(e,t,n,r){a.trackCustomEvent("game_completed",{game_name:e,game_mode:r,outcome:t,duration_seconds:n})}},{key:"trackEngagedUserByTime",value:function(e){a.trackCustomEvent("engaged_user",{trigger_reason:"time",seconds_on_site:e})}},{key:"registerEventListeners",value:function(){var o=(new Date).getTime();g.on("started",function(e){try{o=(new Date).getTime();var t=u(e);a.trackGameStarted(e.name,t)}catch(e){console.error("Error tracking game started:",e)}}),g.on("finished",function(e){try{var t=(new Date).getTime(),n=Math.floor((t-o)/1e3),r=u(e);a.trackGameCompleted(e.name,"finished",n,r)}
10catch(e){console.error("Error tracking game completed:",e)}})}}],(t=null)&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n})();window.addEventListener("load",function(){return v.flush()}),t.exports={GtagHelper:v}},{"../gamecontrol":14,"./storage":26}],25:[function(e,t,n){function c(e,t){var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=((e,t)=>{var n;if(e)return"string"==typeof e?s(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0})(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r,o,l={},a=!1;function i(o,a){var e,t=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],i=(this.meta={prefix:o,defaults:a,listeners:{}},o+=".",this);t&&(l[o]=this);try{this.meta.cookies=(()=>{if(!document.cookie)return{};for(var e={},t=function(e){return decodeURIComponent(e).replace(/^\s*|\s*$/g,"")},n=document.cookie.split(";"),r=0;r<n.length;r++){var o=n[r].split("=");e[t(o[0])]=t(o[1])}return e})()}catch(e){alert("EXCEPTION WHEN PARSING COOKIES"+e)}function n(e){for(var t in e){var n,r;t.substr(0,o.length)==o&&(n=e[t],t=t.substr(o.length),void 0!==(r=a[t]))&&("number"==typeof(r=void 0!==r.defaultValue?r.defaultValue:r)?i[t]=parseFloat(n):"boolean"==typeof r?"true"==n?i[t]=!0:"false"==n&&(i[t]=!1):"object"===u(r)?i[t]=JSON.parse(n):i[t]=n)}}try{window.localStorage&&n(localStorage)}catch(e){}for(e in n(this.meta.cookies),a)this.meta.listeners[e]=[],void 0===this[e]&&(a[e]&&void 0!==a[e].defaultValue?this[e]=a[e].defaultValue:this[e]=JSON.parse(JSON.stringify(a[e])))}i.prototype.addListener=function(e,t){this.meta.listeners[e]||(this.meta.listeners[e]=[]),this.meta.listeners[e].push(t)},i.prototype.set=function(n,r){if(void 0===this[n]||"function"==typeof this[n])throw"Invalid key: "+n;if(u(r)!=u(this[n]))throw"Unexpected type for "+n+", expected "+u(this[n])+", got "+u(r);this[n]=r,void 0!==this.meta.defaults[n].defaultValue?(e=(i=this.meta.defaults[n]).defaultValue,t=i.allowedValues):e=this.meta.defaults[n];var e,t,o=this.meta;function a(){var e,t=c(o.listeners[n]);try{for(t.s();!(e=t.n()).done;)(0,e.value)({key:n,value:r})}catch(e){t.e(e)}finally{t.f()}"string"==typeof r||"number"==typeof r?$('.option-row input[name="'.concat(n,'"][value="').concat(r,'"]')).prop("checked",!0):"boolean"==typeof r&&$('.option-row input[name="'.concat(n,'"][type="checkbox"]')).prop("checked",r)}var i=this.meta.prefix+"."+n;if(r==e){this.meta.cookies[i]&&(document.cookie=escape(i)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/");try{localStorage.removeItem(i)}catch(e){}a()}else{if(t){for(var s=!1,l=0;l<t.length;l++)if(r==t[l]){s=!0;break}if(!s)throw"Bad value for "+n+": "+r+". Allowed values are: "+t}a();try{"object"===u(r)&&(r=JSON.stringify(r)),localStorage.setItem(i,r)}catch(e){document.cookie=escape(i)+"="+escape(r)+"; expires=Tue, 19 Jan 2030 03:14:07 GMT; path=/"}}};try{r=new i(slug,window.defaultSettings)}catch(e){console.error("ERROR when loading settings for "+slug+", err: "+e)}try{o=new i("site",window.defaultSiteSettings||{})}catch(e){console.error("ERROR when loading site-settings for "+slug+", err: "+e)}t.exports={settings:r,siteSettings:o,Settings:i,initGuard:function(){a||(a=!0,$(window).on("beforeunload",function(){for(var e in l){var t,n=l[e];for(t in n)if(void 0!==n[t]&&"function"!=typeof n[t]){var r=e+t,o=n[t];
10if("object"!==u(o)){"boolean"!=typeof o&&"number"!=typeof o||(o=o.toString());try{localStorage.getItem(r)&&o!=localStorage.getItem(r)&&n.set(t,n[t])}catch(e){}}}}}))}}},{}],26:[function(e,t,n){t.exports={tryGetLocalStorage:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;try{var n=localStorage.getItem(e);return null===n?t:n}catch(e){return t}},trySetLocalStorage:function(e,t){try{return localStorage.setItem(e,t),!0}catch(e){return!1}},tryDeleteLocalStorage:function(e){try{return localStorage.removeItem(e),!0}catch(e){return!1}},tryParseLocalStorage:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;try{var n=localStorage.getItem(e);return null===n?t:JSON.parse(n)}catch(e){return t}}}},{}],27:[function(e,t,n){var o=e("../api"),a=e("../gamecontrol"),i=e("./browser").browser,s=e("./cookies").cake,l=e("../helper-functions").captainsLog;function c(){for(var e="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=0;n<10;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e}t.exports={logVisitor:function e(){var t,n,r;a.isGameStarted()?i.canSetCookies()&&(l.debug("Logged visit"),t=s("cid")||c(),s("cid",t,365,"/"),n="undefined"==typeof google&&0===document.getElementsByTagName("iframe").length,r=(navigator.userAgent||"").replace(/"/g,'\\"'),o.visitors.post({id:t,userAgent:r,adblock:n})):setTimeout(e,5e3)},makeID:c,visitorCheckInterval:5e3}}
10,{"../api":12,"../gamecontrol":14,"../helper-functions":15,"./browser":20,"./cookies":22}],28:[function(a,i,e){!function(o){!function(){function s(e){return(e=>{if(Array.isArray(e))return r(e)})(e)||(e=>{if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)})(e)||((e,t)=>{var n;if(e)return"string"==typeof e?r(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0})(e)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(e){return e&&0!==e.length?function e(t,n){for(var r="";n<t.length&&"("!==t[n]&&")"!==t[n]&&"|"!==t[n];)r+=t[n++];if(n>=t.length||")"===t[n]||"|"===t[n])return{words:[r],nextPos:n};n++;for(var o=[],a=!0;a;){var i=e(t,n);o.push.apply(o,s(i.words)),")"===t[n=i.nextPos]?(n++,a=!1):n++}return{words:o.map(function(e){return r+e}),nextPos:n}}(e,0).words.sort():[]}function e(e){return t(a("fs").readFileSync(e,"utf8"))}var n;i.exports={expand:t,expandFile:e},a.main===i&&((n=o.argv[2])||(console.error("Usage: node expand.js <compressed-file>"),o.exit(1)),n=e(n),console.log(n.join("\n")))}.call(this)}.call(this,a("_process"))},{"_process":3,"fs":2}],29:[function(e,t,n){var i=e("../util"),s=e("./names"),l=e("../helpers/bad-names").isBadName;t.exports=function(t,r,n){function o(e){return e.replace(/^\s*|\s*$/g,"")}function e(n,r){$(n).on("input",function(e){var t=o($(n).val()),t=s.validateName(t);$(n).removeClass("error"),t.isValid?$(r).removeAttr("disabled"):(" TDD Content filtering"===t.reason&&$(n).addClass("error"),$(r).attr("disabled","disabled"))})}function a(e){l(e)&&(e="You"),i.siteSettings.set("playerName",e);var t=i.siteSettings.players;t.bottom.name=e,i.siteSettings.set("players",t),$(".bottom-player-name").text(e)}e("#name-new","#confirm-name-new"),e("#name-change","#confirm-name-change"),$("#confirm-name-new").on("click",function(e){l(o($("#name-new").val()))?$("#confirm-name-new").attr("disabled","disabled"):($("#enter-name").hide(),a(o($("#name-new").val())),t())}),$("#confirm-name-change").on("click",function(e){var t,n;l(o($("#name-change").val()))?$("#confirm-name-change").attr("disabled","disabled"):($("#challenge-yourself").hide(),$("#multiplayer-challenge-lobby").show(),t=i.siteSettings.playerName,a(n=o($("#name-change").val())),r({oldName:t,newName:n}))}),$("#cancel-name-new").on("click",function(e){$("#cover").fadeOut(),$("#enter-name").hide(),n&&n()})}},{"../helpers/bad-names":18,"../util":36,"./names":30}],30:[function(e,t,n){var o=e("../helpers/bad-names.js").isBadName;n.validateName=function(e){for(var t=new RegExp("[a-zA-Z-Ã-ÿ-'\\s]"),n=new RegExp("^([a-zA-Z-Ã-ÿ-']+\\s?[a-zA-Z-Ã-ÿ-']+$)"),r=0;r<e.length;r++)if(!t.test(e[r]))return{isValid:!1,"reason":" contains invalid characters"};return 12<e.length?{isValid:!1,"reason":"'s too long"}:e.length<2?{isValid:!1,"reason":"'s too short"}:n.test(e)?o(e)?{isValid:!1,"reason":" TDD Content filtering"}:{isValid:!0,"reason":""}:{isValid:!1,"reason":" contains too many spaces"}}},{"../helpers/bad-names.js":18}],31:[function(e,t,n){t.exports={slug:slug,category:category,siteVersion:siteVersion,showAds:showAds,customChannelId:customChannelId,defaultSettings:defaultSettings,defaultSiteSettings:defaultSiteSettings,themes:themes,players:players}},{}],32:[function(e,t,n){var r={nameHandling:e("../shared/multiplayer/name-handler"),stats:e("../shared/statistics")};t.exports={initializePublicAPI:function(){window.CardGamesPublicAPI=r}}},{"../shared/multiplayer/name-handler":29,"../shared/statistics":33}],33:[function(e,t,n){var r,o=e("./util"),a=o.logError,o=o.qs,i=e("../shared/helper-functions").captainsLog,c=e("./page").slug,d=!!o.gid;try{r=window.localStorage}catch(e){r=null}var f=null,m=null;var s=(window.slug||"unknown")+".stats";function l(){var e=r.getItem(s);if(e){var t=JSON.parse(e);if(t&&t.players&&t.startTime)return t;r.removeItem(s);try{a("Stats for "+s+" was malformed, removed it. First 50 chars of the data were: "+(e+"").substr(0,50))}catch(e){}}t={version:4,startTime:(new Date).getTime(),gameCount:0,abandonedGameCount:0,finishedGameCount:0,playersInGameCount:{},totalGameTime:0,averageGameTime:null,maxGameTime:null,minGameTime:null,players:{}};return u(t),t}function u(e){try{r.setItem(s,JSON.stringify(e))}catch(e){i.error("localStorage is full")}}function p(e){var t=l();e(t),u(t)}function h(e){var t={gameCount:0,abandonedGameCount:0,finishedGameCount:0,winCount:0,loseCount:0,drawCount:0,winPercentage:0,totalGameTime:0};return(e=e||{score:!0,tournaments:!0,streaks:!0,wonGameTime:!0}).wonGameTime&&(t.minWonGameTime=null,t.maxWonGameTime=null,t.avgWonGameTime=null,t.totalWonGameTime=0),e.score&&(t.totalScore=0,t.maxScore=null,t.minScore=null,t.avgScore=null),e.streaks&&(t.winningStreak=0,t.losingStreak=0,t.maxWinningStreak=0,t.maxLosingStreak=0),e.tournaments&&(t.finishedTournamentCount=0,t.winTournamentCount=0,t.loseTournamentCount=0,t.totalTournamentScore=0,t.avgTournamentScore=0,t.tournamentWinPercentage=0,t.tournamentWinningStreak=0,t.tournamentLosingStreak=0,t.tournamentMaxWinningStreak=0,t.tournamentMaxLosingStreak=0),t}var g={get:l,enabled:!0,multiplayer:!1,clear:function(){this.enabled&&r.removeItem(s)},emptyPlayer:h,minimumVersion:function(e){var t;this.enabled&&(t=this.get())&&t.version<e&&this.clear()},startGame:function(r,o){this.enabled&&(this.options=o||{tournaments:!0,streaks:!0,score:!0,wonGameTime:!0},this.currentPlayers=r,f=(new Date).getTime(),m=null,p(function(e){e.playersInGameCount[r.length]=(e.playersInGameCount[r.length]||0)+1,e.gameCount++,e.abandonedGameCount++;for(var t=0;t<r.length;t++){var n=r[t];
10if(!n.id)throw new Error("Missing id on player in statistics!");n=n.id;if(d){if("bottom-player"!==n)continue;n="multi-player"}e.players[n]||(e.players[n]=h(o));n=e.players[n];n.gameCount++,n.abandonedGameCount++}}))},cancelGame:function(){var r,o;this.enabled&&this.currentPlayers&&(r=this.currentPlayers,m=f=null,o=this.options,p(function(e){e.playersInGameCount[r.length]=(e.playersInGameCount[r.length]||0)-1,e.gameCount--,e.abandonedGameCount--;for(var t=0;t<r.length;t++){var n=r[t];"multi-player"!==n.id&&(e.players[n.id]||(e.players[n.id]=h(o)),e.players[n.id].gameCount--,0)}}))},finishGame:function(s,l,e){if(this.enabled){var c=[],u=this.options;if(p(function(e){l||(m=(new Date).getTime(),l=m-f,"number"==typeof pauseTime&&(l-=pauseTime)),e.finishedGameCount++,e.abandonedGameCount=Math.max(e.abandonedGameCount-1,0),e.totalGameTime+=l,e.averageGameTime=e.totalGameTime/e.finishedGameCount,e.maxGameTime=null===e.maxGameTime?l:Math.max(l,e.maxGameTime),e.minGameTime=null===e.minGameTime?l:Math.min(l,e.minGameTime);for(var t=0;t<s.length;t++){var n=s[t],r=n.id;if(d){if("bottom-player"!==r)continue;r="multi-player"}var o,a,i=e.players[r];for(o in i||(e.players[r]=h(u),(i=e.players[r]).abandonedGameCount++,i.gameCount++),n.stats=n.stats||{},n.stats.score|=0,i.abandonedGameCount=Math.max(i.abandonedGameCount-1,0),i.finishedGameCount++,i.totalScore+=n.stats.score,i.minScore=null===i.minScore?n.stats.score:Math.min(i.minScore,n.stats.score),i.maxScore=null===i.maxScore?n.stats.score:Math.max(i.maxScore,n.stats.score),i.avgScore=i.totalScore/i.finishedGameCount,i.totalGameTime+=l,"win"==n.stats.result?(i.winCount++,i.winningStreak++,i.losingStreak=0,i.maxWinningStreak=Math.max(i.maxWinningStreak,i.winningStreak),null===i.minWonGameTime?i.minWonGameTime=l:l<i.minWonGameTime&&(c.push({oldTime:i.minWonGameTime,newTime:l,name:n.name}),i.minWonGameTime=l),i.minWonGameTime=null===i.minWonGameTime?l:Math.min(i.minWonGameTime,l),i.maxWonGameTime=null===i.maxWonGameTime?l:Math.max(i.maxWonGameTime,l),i.totalWonGameTime+=l,i.avgWonGameTime=i.totalWonGameTime/i.winCount):"lose"==n.stats.result?(i.loseCount++,i.winningStreak=0,i.losingStreak++,i.maxLosingStreak=Math.max(i.maxLosingStreak,i.losingStreak)):"draw"==n.stats.result&&(i.drawCount++,i.winningStreak=0,i.losingStreak=0),i.winPercentage=i.winCount/i.finishedGameCount,n.stats.tournamentResult&&(i.finishedTournamentCount++,i.totalTournamentScore+=n.stats.tournamentScore,i.avgTournamentScore=i.totalTournamentScore/i.finishedTournamentCount,"win"==n.stats.tournamentResult?(i.winTournamentCount++,i.tournamentWinningStreak++,i.tournamentLosingStreak=0,i.tournamentMaxWinningStreak=Math.max(i.tournamentMaxWinningStreak,i.tournamentWinningStreak)):"lose"==n.stats.tournamentResult&&(i.loseTournamentCount++,i.tournamentLosingStreak++,i.tournamentWinningStreak=0,i.tournamentMaxLosingStreak=Math.max(i.tournamentMaxLosingStreak,i.tournamentLosingStreak)),i.tournamentWinPercentage=i.winTournamentCount/i.finishedTournamentCount),n.stats)o.match(/^(score|result|tournamentResult|tournamentScore)$/)||"number"==typeof(a=n.stats[o])&&(o.match(/maximum/)?(void 0===i[o]||a>i[o])&&(i[o]=a):o.match(/minimum/)?(void 0===i[o]||a<i[o])&&(i[o]=a):(i[o]|=0,i[o]+=n.stats[o]))}}),e)for(var t=0;t<c.length;t++)e(c[t])}},startMultiplayerChallengeGame:function(t){p(function(e){e.activeMultiplayerGame={name:t.name,face:t.face}})},finishMultiplayerChallengeGame:function(a){var i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],s=2<arguments.length&&void 0!==arguments[2]&&arguments[2],l=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];p(function(e){function t(e,t,n,r){"win"===t.stats[r]?e[n].won++:"lose"===t.stats[r]?e[n].lost++:e[n].draw++}var n,r=a.find(function(e){return"bottom-player"!==e.id}),o=(e.multiplayer||(e.multiplayer=[]),e.multiplayer.find(function(e){return e.name===r.name&&e.face===r.face}));o?"win"in o&&!("games"in o)&&(o={name:r.name,face:r.face,games:{won:(n=function(e){return"ginrummy"===e||"ginrummy/"===e})(c)?0:o.lose,lost:n(c)?0:o.win,draw:n(c)?0:o.draw},hands:{won:n(c)?o.lose:0,lost:n(c)?o.win:0,draw:n(c)?o.draw:0}},n=e.multiplayer.findIndex(function(e){return e.name===r.name&&e.face===r.face}),e.multiplayer[n]=o):(o={name:r.name,face:r.face,games:{won:0,lost:0,draw:0},hands:{won:0,lost:0,draw:0}},e.multiplayer.push(o));i?(s&&t(o,r,"games","tournamentResult"),l&&t(o,r,"hands","result")):t(o,r,"games","result"),delete e.activeMultiplayerGame})},checkAbandonedMultiplayerGame:function(){this.registeredUnload||(this.registeredUnload=!0,window.addEventListener("beforeunload",function(){g.checkAbandonedMultiplayerGame()}));var t,n,e,r=l();r.activeMultiplayerGame&&(e=r.activeMultiplayerGame,t=e.name,n=e.face,r.multiplayer||(r.multiplayer=[]),(e=r.multiplayer.find(function(e){return e.name===t&&e.face===n}))?e.lose++:r.multiplayer.push(e={name:t,face:n,win:0,lose:1,draw:0}),delete r.activeMultiplayerGame,u(r))},isGameActive:function(){return null!==f&&null===m},saveRaw:function(e){p(e)}};try{localStorage.setItem("test","test"),localStorage.removeItem("test"),JSON.parse('{"test":"test"}'),JSON.stringify({"test":"test"}),g.supported=!0}
10catch(e){g.supported=!1}if(!g.supported)for(var v in g)"supported"!=v&&(g[v]=function(){});t.exports=g},{"../shared/helper-functions":15,"./page":31,"./util":36}],34:[function(e,t,n){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(e=>(e=((e,t)=>{if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")})(e,"string"),"symbol"==o(e)?e:e+""))(r.key),r)}}var e=e("./helpers/cookies"),i=e.cake,s=e.deleteCake,e=(()=>{function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.slug=e,this.sessionStorageAvailable=!0;try{sessionStorage.test=1,delete sessionStorage.test}catch(e){this.sessionStorageAvailable=!1}}return e=t,(n=[{key:"useCookies",value:function(e){return!("undefined"!=typeof window&&window.APP_MODE&&window.Android||this.sessionStorageAvailable&&"scores"!==e&&"autodeal"!==e&&"lastdealerindex"!==e)}},{key:"set",value:function(e,t){this.useCookies(e)?i("".concat(this.slug,".").concat(e),JSON.stringify(t)):sessionStorage.setItem("".concat(this.slug,".").concat(e),JSON.stringify(t))}},{key:"get",value:function(e,t){e=this.useCookies(e)?i("".concat(this.slug,".").concat(e)):sessionStorage.getItem("".concat(this.slug,".").concat(e));return null!==e?JSON.parse(e):t}},{key:"remove",value:function(e){this.useCookies(e)?s("".concat(this.slug,".").concat(e)):sessionStorage.removeItem("".concat(this.slug,".").concat(e))}}])&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r})();t.exports=e},{"./helpers/cookies":22}],35:[function(e,t,n){var a=e("./helper-functions").ArrayUtils,r=e("./util");function o(){$("#game-link-wrapper img[data-src]").each(function(){this.src=this.dataset.src,delete this.dataset.src})}function i(){var e,t,n,r,o=$("#random-game"),a=$(".random-feature-icon");o.length&&a.length&&(e=STATIC_ASSET_DOMAIN+"/addiction/images/shuffle.png",(t=Array.from(new Set($('.game-links a[href^="/"]').toArray().map(function(e){try{var t=new URL(e.href,location.origin).pathname.split("/").filter(Boolean),n=t[t.length-1],r=e.getAttribute("data-icon-filename")||n+"-touch-icon.png";return n?STATIC_ASSET_DOMAIN+"/"+n+"/images/"+r:null}catch(e){return null}}).filter(Boolean)))).length)&&(n=0,r=null,o.on("mouseenter",function(){null===r&&(a.removeClass("is-default-icon"),a.attr("src",t[n]),r=window.setInterval(function(){n=(n+1)%t.length,a.attr("src",t[n])},180))}),o.on("mouseleave",function(){null!==r&&(window.clearInterval(r),r=null),n=(n+1)%t.length,a.addClass("is-default-icon"),a.attr("src",e)}))}function s(){var e=$('.game-links a[href^="/"]').toArray();e.length&&(a.shuffle(e),location.href=e[0].href)}function l(){var n,r,o=$('.game-links a[href^="/"]').toArray();o.length&&(a.shuffle(o),n=Math.max(1,Math.round(20)),r=0,$("body").addClass("random-selection-process"),function e(){var t=o[r%o.length];$(".random-highlight").removeClass("random-highlight"),$(t).addClass("random-highlight"),n<=++r?window.setTimeout(function(){location.href=t.href},300):window.setTimeout(e,120)}())}function c(){$("#random-game").on("click",function(e){e.preventDefault(),(window.matchMedia&&window.matchMedia("(max-width:730px), (min-width:500px) and (max-height:450px) and (orientation:landscape) and (max-device-width:450px), (min-width:500px) and (max-height:450px) and (orientation:landscape) and (max-device-height:450px)").matches?s:l)()})}function u(){$('a[href="#save-customize-menu"]').on("click",function(e){e.preventDefault(),r.closeCustomizationMenu()})}t.exports={animateRandomGameSelection:l,bindCustomizeSaveClick:u,bindRandomGameFeatureClick:c,goToRandomGame:s,initMenuFeatureUi:function(){$(document).one("mobileMenu:beforeOpen",o),i(),c(),u()},loadMenuFeatureImages:o,startRandomGameFeatureIconCycle:i}}
10,{"./helper-functions":15,"./util":36}],36:[function(e,G,L){function R(e,t){return(e=>{if(Array.isArray(e))return e})(e)||((e,t)=>{var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n["return"]&&(i=n["return"](),Object(i)!==i))return}finally{if(c)throw o}}return s}})(e,t)||B(e,t)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){var n,r,o,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return o=!(r=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(o)throw n}}};if(Array.isArray(e)||(i=B(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(e,t){var n;if(e)return"string"==typeof e?F(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var t=e("./helpers/cookies"),h=t.cake,t=t.deleteCake,n=e("./helpers/avatar"),H=n.getFaceUrl,n=n.getHairClass,r=e("./
10helpers/visitor"),U=r.makeID,a=r.logVisitor,r=r.visitorCheckInterval,i=e("./helpers/browser"),z=i.browser,V=i.addScript,i=e("./helpers/settings"),s=i.siteSettings,J=i.settings,i=i.initGuard,l=e("./helpers/events"),g=l.trackEvent,l=l.forceTrackEvent,c=e("./helpers/UI"),q=c.isMobileLookActive,u=c.mobileMenu,Y=c.removeConfetti,K=c.showConfetti,Q=c.hideFireworks,c=c.showFireworks,d=e("./helpers/storage"),Z=d.tryGetLocalStorage,X=d.trySetLocalStorage,ee=d.tryParseLocalStorage,te=e("./helpers/bad-names").isBadName,f=(window.mainScriptLoaded=!0,$("#main-scripts-fail").remove(),window.setTimeout),v=e("./helper-functions").captainsLog,y=e("./api"),m=e("./helpers/gtag-helper").GtagHelper,d=(m.registerEventListeners(),e("./ads/adManager")),p=null,w=(window.location.pathname.match(/\/$/)||(window.location=window.location.pathname+"/"+window.location.search),I()&&(v.level="debug"),window.console&&window.console.log||(window.console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){}}),{groupHasGrantedPermission:function(t){if(APP_MODE)return!0;var e=["essential","functional","targeting","performance"],n=e.findIndex(function(e){return e===t}),r={};if(!e[n])throw"Group is not a valid cookie group: "+t;e=document.cookie.split(";").find(function(e){return"OptanonConsent"===e.split("=")[0].trim()});if(!e)return!1;var o,a=N(e.split("=").slice(1).join("=").split("&"));try{for(a.s();!(o=a.n()).done;){var i=o.value.split("=");r[i[0]]=i[1]}}catch(e){a.e(e)}finally{a.f()}r.groups=decodeURIComponent(r.groups);var s,l={},c=N(r.groups.split(","));try{for(c.s();!(s=c.n()).done;){var u=s.value.split(":");l[u[0]]=u[1]}}catch(e){c.e(e)}finally{c.f()}return"1"==l[["C0001","C0003","C0004","C0002"][n]]},granted:function(){return APP_MODE||!!(h("OptanonAlertBoxClosed")||w.groupHasGrantedPermission("targeting")||w.groupHasGrantedPermission("performance")||w.groupHasGrantedPermission("functional"))},getTCF:function(){return h("eupubconsent-v2")},getTime:function(){return h("OptanonAlertBoxClosed")}});try{t("site.multiplayerPhrases")}catch(e){}var ne={},e=document,b="loc",k="hos",re=Math;i();var oe,S,A,C,i=s.playerName;for(oe in te(i)&&s.set("playerName","You"),s.players)S=oe,C=A=void 0,A=s.players,C={"left":"Mike","top":"Bill","right":"Lisa","bottom":"You"}[S]||"Secret Agent",A[S]&&te(A[S].name)&&(A[S].name=C,s.set("players",A),s.set("players",A),window.players)&&window.players[S]&&(window.players[S].name=C);if(window.players){for(var x in players){players[x].name!==players[x].defaultName&&$(".".concat(x,"-player-name")).text(players[x].name);var P=players[x].code+"",P=P.match(/^\d+$/)?P:P.charAt(2);$(".face-".concat(x,"-player.face-small")).addClass("hair-"+P),$("#challenge-yourself .face-bottom-player").addClass("hair-"+P)}$("#temphidenames").remove()}$(".show-after-names").removeClass("show-after-names");var T,O={},i=document.location.search.replace(/\?/,"");if(i)for(var ae=i.split("&"),E=0;E<ae.length;E++){var M=ae[E].split("="),_=M[0],M=M[1],_=ie(window.settings||{},_);_=ie(s,_),M=function e(t){if(void 0===t)return!0;if(t.match(/^\d+$/))return parseInt(t);if("true"==t)return!0;if("false"==t)return!1;if(t.match(/,/)){for(var n=(t=t.replace(/,$/,"")).split(","),r=0;r<n.length;r++)n[r]=e(n[r]);return n}return t}(M),O[_]=M,se(window.settings||{},_,M),se(s,_,M)}function ie(e,t){for(var n in e)if(n.toLowerCase()==t.toLowerCase())return n;return t}function se(e,t,n){var r=e[t];if(void 0!==r)if("boolean"==typeof r&&"number"==typeof n)e[t]=!!n;else{if(o(r)!=o(n))throw"Incompatible types for "+t+": "+o(r)+" and "+o(n);e[t]=n}}if("debug"===O.log&&(v.level="debug"),(location.hostname||"").match(/translat/)||O.translatecheck?($("#play-page").remove(),y.badDomain(),$("#board").append($("<div>",{id:"translate-proxy"}).html('We do not support playing the game on translation websites. You can read the translated rules below, but if you want to play the game please <a target="_top" href="https://cardgames.io/'.concat(slug,"/?fromproxy=").concat(location.hostname,'">CLICK HERE</a> to open the real CardGames.io website.')))):!location.hostname||"cardgames.io"===location.hostname||"dev.cardgames.io"===location.hostname||"development.cardgames.io"===location.hostname||window.APP_MODE||location.hostname.match("redace.io$")||(y.badDomain(),location.href="https://cardgames.io"),O.fromproxy){l("ProxyRedirect","Game: ".concat(category,", Proxy: ").concat(O.fromproxy));try{window.history.pushState("",document.title,location.pathname)}catch(e){}}null!=O.freetest&&$("html").addClass("freetest");try{b+="ation",k+="tname",document.implementation.hasFeature("https://www.w3.org/TR/SVG11/feature#Image","1.1")}catch(e){}function j(e,t){return e.charAt(e.length-t)}function I(){return window.location.href.includes("dev.cardgames.io")||window.location.href.includes("development.cardgames.io")||window.location.href.includes("cardgames.dev.redace.io")}function le(){return window.location.href.includes("dev.cardgames.io:3000")||window.location.href.includes("dev.cardgames.io:3030")||window.location.href.includes("localhost")||window.location.href.includes("127.0.0.1")}"cribage"!=window.slug&&(T=e[b][k]),f(a,r),APP_MODE&&f(function(){(e=new Date).setUTCHours(0,0,0,0);var e=e.getTime().toString();h("appversion")===e?v.debug("Not logging version, already done it today"):(g("AppOpen",window.siteVersion+""||"Unknown"),h("appversion",e,1,"/"))},1e4);i=document.location.hash.match(/#logerrors=(\w+)/);if(i){try{var ce=document.location;window.history&&window.history.replaceState?history.replaceState("",document.title,ce.pathname+ce.search):document.location.hash=""}catch(e){}h("logerrors",i[1],1,"/")}else APP_MODE||"."==j(T,3)&&"o"==j(T,1)||"9"==j(T,12)||T.replace(/^\w+/,"")!="#r!ud!s#i&".replace(/#/g,".").replace("$","e").replace(/!/g,"a").replace(/&/g,"s")&&(re["random"]=function(){return 1.5},re["round"]=function(){return.22});function ue(e,t,n,r,o,a){for(var i=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,s=0,l=["Script error","ResizeObserver"];s<l.length;s++)if(e&&e.includes(l[s]))return;if("RummyError"!==a)try{for(var c="",u=(t&&(c+=t),n&&r&&(c+="("+n+","+r+") "),c+=e,o&&o.stack&&(c+="\r\n\r\n"+o.stack),v.error(c),location.pathname.split("/")[1]||""),d=ee("errors",[]),f=(10<=d.length&&d.shift(),g("Error",c+"|| UserAgent: "+navigator.userAgent.replace(/Mozilla\/5\.0/,""),n||0),u+" "+new Date+":\r\n\r\n "+(o&&o.stack?o.stack:e)),m=(m=f.split(/\r?\n/)).filter(function(e){return!e.match(/jquery-/)}),p=0;p<m.length;p++)m[p]=m[p].replace(/https?:\/\/(dev\.)?cardgames\.io(:\d+)?\/\w+/,"");f=m.join("\r\n"),d.push(f),X("errors",JSON.stringify(d)),(a=a||h("logerrors"))&&(v.debug("Sending error to server:\n "+c),y.errors.log(a,u,c,null,null,i))}catch(e){v.error("Error in error handling: "+e)}}function de(){window.scrollY?h("scroll",scrollY):void 0===window.scrollY&&window.pageYOffset&&h("scroll",window.pageYOffset),h("reload","1"),document.location.href=document.location.href.replace(/#.*/,"")}window.logError=ue,window.onerror||(window.onerror=ue),s.addListener("useBottomBanner",function(){!function(){var e="bottom"===(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"top").toLowerCase()?"bottom":"top";window.Android?window.Android.setBannerPlacement(e):window.webkit&&window.webkit.messageHandlers.setBannerPlacement.postMessage(e)}(s.useBottomBanner?"bottom":"top")}),$(function(){var e,t;function n(){f(function(){if(!APP_MODE)if(w.granted()){f(function(){return we.initialize()},1e3),$("html").addClass("gdpr-accepted"),window.gdpr_consent=w.getTCF(),window.gdpr_tcString=w.getTCF(),h("androidprompt")&&h("app_prompt",(new Date).getTime(),4,"/");try{var e,t,n,r,o,a,i,s=h("first_visit");s?s&&(new Date).getTime()-parseInt(s)<12e5||(t=(e=navigator.userAgent).match(/Android (\d+)/i),n=e.match(/iPhone OS (\d+)/),r=e.match(/\biPad\b.* OS (\d+)/i),o=t||n||r,a="itms-apps://itunes.apple.com/app/apple-store/id1496007149",null===h("app_prompt")&&o&&(i=parseInt(o[1]),h("app_prompt",(new Date).getTime(),4,"/"),r?12<=i?($
10("#get-app, #app-icon").attr("href",a),g("iPadAppPrompt",i.toString(),0,"","",1),$("#app-prompt").slideDown()):g("iPadOldVersion",i.toString(),0,"","",1):n?12<=i?($("#get-app, #app-icon").attr("href",a),g("iPhoneAppPrompt",i.toString(),0,"","",1),$("#app-prompt").slideDown()):g("iPhoneOldVersion",i.toString(),0,"","",1):t&&(5<=i?($("#get-app, #app-icon").attr("href","market://details?id=io.cardgames.app"),g("AndroidAppPrompt",i.toString(),0,"","",1),$("#app-prompt").slideDown()):g("AndroidOldVersion",i.toString(),0,"","",1)))):h("first_visit",(new Date).getTime(),365,"/")}catch(e){g("AppPromptError",e.toString().substr(0,200))}}else v.debug("Generic Consent not granted. Enabling lookout"),f(function(){var e;window.OneTrust&&(e=window.OneTrust.OnConsentChanged(function(){w.granted()&&(window.gdpr_consent=w.getTCF(),window.gdpr_tcString=w.getTCF(),f(function(){return we.initialize()},1e3),$("html").addClass("gdpr-accepted"),clearTimeout(e))}))},1e3)},500)}APP_MODE||V("/shared/lib/gtm.js"),$("#mobile-menu").on("click touchstart",function(e){var t;$("body").hasClass("options-open")?($("body").removeClass("options-open"),e.preventDefault()):$("html").hasClass("appmode")&&$("body").hasClass("rules-open")?($("body").removeClass("rules-open"),e.preventDefault()):$("html").hasClass("appmode")&&$("body").hasClass("subview-open")?($("body").removeClass("subview-open statistics-subview-open avatars-subview-open"),(t=$("#title h1").data("real-title"))&&$("#title h1").text(t),e.preventDefault()):u.toggle(e)}),$('a[href="#more-games"]').on("click",function(e){Y(),e.preventDefault(),u.open()}),$("#close-menu").on("click touchstart",function(e){e.preventDefault(),u.close()}),APP_MODE?$('input[type="text"]').on("blur",function(){0!==document.documentElement.scrollTop&&(document.documentElement.scrollTop=0),0!==document.body.scrollTop&&(document.body.scrollTop=0)}):($("#app-prompt a").on("click",function(e){var t=navigator.userAgent.match(/iPhone/i)?"iPhoneAppLinkClick":"AndroidAppLinkClick";"no-thanks"===e.target.id?(g(t,"No Thanks",0,"","",1),e.preventDefault()):g(t,"Get App",0,"","",1),$("#app-prompt").slideUp()}),APP_MODE||(e="",e=I()?"b58b35f2-8c82-4313-8a85-0dd3fec931f3-test":"b58b35f2-8c82-4313-8a85-0dd3fec931f3",(t=document.createElement("script")).src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js",t.lang="en",t.type="text/javascript",t.setAttribute("data-domain-script",e),t.setAttribute("document-language","true"),(e=document.getElementsByTagName("script")[0]).parentNode.insertBefore(t,e)),"complete"===document.readyState?n():window.addEventListener("load",n))});var fe,me,pe;function he(){var e=[];$("#customizable-links a:not(#home-link)").each(function(){e.push({name:$(this).text(),href:$(this).attr("href")})}),s.set("gameLinks",JSON.stringify(e).replaceAll('"','\\"'))}function ge(e){var t,n,r=$(this).find("input");$(this).hasClass("non-removable")?(e.preventDefault(),e.stopPropagation()):("A"===e.target.tagName&&(e.preventDefault(),r.prop("checked",!r.prop("checked"))),e=r.attr("value"),t=r.attr("data-game-href")||"/"+e.toLowerCase().replace(/\s*/g,"")+"/",r.prop("checked")?(n=$("<a/>",{href:t}).html(e),$("#home-link").after(n),30<$("#promo-mini").height()&&(n.remove(),r.prop("checked",!1),alert("There is not enough space for this link. Please remove some other games first by unchecking them."))):(n=((e,t)=>{for(var n=$("#customizable-links a"),r=0;r<n.length;r++){if(t&&$(n[r]).attr("href")===t)return n[r];if($(n[r]).text()===e)return n[r]}return null})(e,t),$(n).remove()),he())}function ve(){u.isCustomizing=!1,$("#game-link-wrapper").removeClass("customize-open").css("top",""),$('#promo-links input[type="checkbox"]').remove(),$(".game-links a").each(function(){var e=$
10(this).text();$(this).text(e.replace(/^\s*|\s*$/g,"")),$(this).css("text-align",""),$(this).off("click",ge)}),$("#customize-menu").text(window.t("util::customize","Customize...")),$("#close-menu").off("click",ve)}function ye(){"1"===h("hideHome")?($("#hide-home").text(window.t("util::showHome","Show 'Home' link")),$("#home-link").hide()):($("#hide-home").text(window.t("util::hideHome","Hide 'Home' link")),$("#home-link").show())}f(function(){0!==(O.fakeVersion||h("last_version"))&&0!==p&&p&&h("last_version",p,365,"/")},5500),!0===navigator.standalone&&$(document).on("click","a",function(e){var t,n=e.target.href;!n||n.match(/#/)||n.match(/javascript:/)||(t=location.protocol+"//"+location.host+"/",n.substr(0,t.length)===t&&(e.preventDefault(),location.href=n))}),window.facebookBorder=function(e){devicePixelRatio;var t=Math.ceil(1200/630*800);$("#promo-links").remove(),$("#promo-mini").css("visibility","hidden").css("height","10px"),$("<div>").css({border:"solid 1px red",width:t,height:800,position:"absolute",top:e||0,left:Math.ceil(($(window).width()-t)/2)-1}).appendTo("body"),$(".underboard-message").css("visibility","hidden"),$(".don-draper").remove(),$("#board-and-header").css("float","none").css("margin","auto")},fe=$("#home-link").text(),me=$("#home-link").attr("href"),pe=!1,$("#customizable-links a:not(#home-link)").each(function(){var e=$
10(this).text();$(this).attr("href")!==me&&e!==fe&&"home"!==e.replace(/\s*/g,"").toLowerCase()||($(this).remove(),pe=!0)}),pe&&he(),ye(),$('a[href="#customize-menu"]').on("click",function(e){var r;e.preventDefault(),u.isCustomizing?confirm("Do you want to reset all the game links to their original state?")&&(s.set("gameLinks",""),de()):(u.isCustomizing=!0,$("#close-menu").on("click",ve),$("#customize-menu").text(window.t("util::resetLinks","Reset links...")),$("#game-link-wrapper").css("top",((e=$("#promo-mini")).length&&e.is(":visible")?Math.ceil(e.offset().top+e.outerHeight(!0)):50)+"px").addClass("customize-open"),r={},$("#promo-mini a").each(function(){r[$(this).attr("href")]=this}),$(".game-links a").each(function(){var e=$(this).text(),t=$(this).attr("href"),n=$("<input/>",{type:"checkbox",value:e});n.attr("data-game-href",t),t in r&&n.attr("checked","checked"),$(this).hasClass("non-removable")&&n.attr("disabled","disabled"),$(this).html(n.wrap("<div/>").parent().html()+" "+e).css("text-align","left"),$(this).on("click",ge)}))}),$('a[href="#hide-home"]').on("click",function(e){e.preventDefault(),e="1"===h("hideHome"),h("hideHome",e?"0":"1",365),ye()}),$(".default-game-link").is(":visible")||$(".default-game-link").remove();var D,W,e=showAds,we=new d(e,w).createProvider(e);fetch("/version.json").then(function(e){200<=parseInt(e.status)&&parseInt(e.status)<400&&e.json().then(function(e){p=e.version})}),$&&(D=0,W=null,$.dbltap=function(e,n){$(e).bind("touchstart",function(e){e.preventDefault();var t=(new Date).getTime();e.target===W&&t-D<500?(D=0,W=null,n(e)):(D=t,W=e.target)})});try{var be=function(){"thirteen"===slug?$("#title h1").text("Tiến lên".toUpperCase()):"frontpage"===slug&&$("a[href='/thirteen/'] span").text("Tiến lên"),$(".game-links a[href='/thirteen/']").text("Tiến lên"),$("#promo-mini a[href='/thirteen/']").text("Tiến lên")};h("country")&&"VN"===h("country")?be():$.getJSON("/lambda/country").then(function(e){"VN"===e.country&&be(),h("country",e.country,7,"/")})}catch(e){console.log("e",e)}function ke(e){var t=Z("locale","none");X("locale",e),m.trackLocaleChange(e,t)}(b=Z("locale",null))&&void 0!==b&&"undefined"!==b&&(m.trackLocale(b),k=$("html").attr("lang"),b)&&k&&k!==b&&(k=k,b=b)&&(a=new URL(window.location.href),(r=a.pathname.split("/")).shift(),2==r[0].length?r[0]===k&&"en"!==b?r[0]=b:"en"===b&&r.shift():"en"===k&&r.unshift(b),r.unshift(""),a.pathname=r.join("/"),window.location.href!==a.toString())&&(window.location.href=a.toString()),$("a.lang-selector").on("click",function(){ke($(this).data("lang"))}),$("select.lang-selector").on("change",function(){ke($(this).find("option:selected").data("lang"))}),G.exports={qs:O,Consent:w,cake:h,preloadBackgroundImage:function(e){var t=$("<div/>");t.css("background-image","url(".concat(e,")")).css("width","1px").appendTo("body"),f(function(){return t.remove()},50)},preloadBackgroundImageClass:function(e){var t=$("<div/>");t.addClass(e).appendTo("body"),t.css("width","1px"),f(function(){return t.remove()},50)},isEmojiValid:function(e){return!0},supportsWebgl:function(){try{var e=document.createElement("canvas");return!!window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl"))}catch(e){return!1}},isLocal:le,ads:we,parseUserAgent:function(e){e=e||navigator.userAgent;for(var t={browser:"Unknown",os:"Unknown",version:0},n=["Windows","Macintosh","Android","Linux","iPhone","iPad"],r=["Opera","Chrome","Firefox","Mobile Safari","Safari","MSIE"],o=0;o<n.length;o++)if(new RegExp("\\b"+n[o]+"\\b","i").exec(e)){t.os=n[o];break}for(var a=0;a<r.length;a++){var i=new RegExp("\\b("+r[a]+")(?:/| )(\\d+)","i").exec(e);if(i){t.browser=r[a],"MSIE"==t.browser&&(t.browser="Internet Explorer");var s=/\bVersion\/(\d+)\b/i.exec(e);t.version=s?parseInt(s[1]):parseInt(i[2]);break}}return t},valentines:function(e){try{$("#top-player").is(":visible")&&$("#left-player").is(":visible")&&$("#right-player").is(":visible")&&"Bill"===players.top.name&&"Lisa"===players.right.name&&$("html").hasClass("valentines")&&($(".bubble p span").css("font-size","12px"),f(function(){$("#to
10p-player-bubble p span").text(window.t("util::valentinesDay","Happy Valentine's day Lisa! â¤ï¸ï¸ï¸ï¸ï¸ï¸ï¸â¤ï¸")),$("#top-player-bubble").fadeIn()},1500),f(function(){$("#right-player-bubble p span").text("ðï¸ï¸").css("font-size","40px"),$("#right-player-bubble").fadeIn()},3500),f(function(){$("#left-player-bubble p span").text(window.t("util::playGame","Enough already, let's play [[game]]!",{game:e})),$("#left-player-bubble").fadeIn()},5500),f(function(){$(".bubble").hide(),$(".bubble p span").css("font-size","")},9e3))}catch(e){g("ValentinesError",e.toString(),0,"","",1)}},getFaceUrl:H,getHairClass:n,siteSettings:s,settings:J,browser:z,preloadImage:function(e){var t;ne[e]||((t=new Image).src=e,t.onload=function(){},t.onerror=function(){},ne[e]=t)},trackEvent:g,forceTrackEvent:l,reloadPage:de,deleteCake:t,showConfetti:K,removeConfetti:Y,logError:ue,mobileMenu:u,isMobileLookActive:q,isDev:I,showFireworks:c,hideFireworks:Q,julyFourth:function(){var e,t=$("#title h1").text();t.length<=10&&(t=(e="<span>â
</span><span>â
</span><span>â
</span>")+t+e,$("#title h1").html(t))},getMultiplayerUrl:function(e,t){if("cardgames.io"===window.location.hostname||"production"===O.server||t)return window.gameSettings&&window.gameSettings.multiplayer&&window.gameSettings.multiplayer.url?window.gameSettings.multiplayer.url:"https://".concat(e,".cardgames.io/");try{var n=window.sessionStorage.getItem("multiplayerUrl");if(n)return n}catch(e){}return le()?window.gameSettings&&window.gameSettings.multiplayer&&window.gameSettings.multiplayer.localUrl?window.gameSettings.multiplayer.localUrl:(t="https:"===window.location.protocol?"https":"http","".concat(t,"://dev.cardgames.io:3031/")):I()?window.gameSettings&&window.gameSettings.multiplayer&&window.gameSettings.multiplayer.devUrl?window.gameSettings.multiplayer.devUrl:"https://multiplayer-1.eb.dev.redace.io/":window.location.href.includes("cardgames.staging.redace.io")?window.gameSettings&&window.gameSettings.multiplayer&&window.gameSettings.multiplayer.stagingUrl?window.gameSettings.multiplayer.stagingUrl:"https://multiplayer-1.eb.staging.redace.io/":"https://".concat(e,".cardgames.io/")},setAppBackgroundColor:function(){var e,t,n,r,o=$("html").hasClass("dark-theme")?"0,25,0":"0,100,0";window.Android?(e=(n=R(o.split(","),3))[0],t=n[1],n=n[2],r="#FF"+parseInt(e).toString(16).padStart(2,"0")+parseInt(t).toString(16).padStart(2,"0")+parseInt(n).toString(16).padStart(2,"0"),console.log("Color ",e,t,n),console.log("Hex",r),window.Android.setBannerAdBackground(r)):window.webkit&&window.webkit.messageHandlers.setViewBackground.postMessage(o)},makeID:U,closeCustomizationMenu:ve}},{"./ads/adManager":4,"./api":12,"./helper-functions":15,"./helpers/UI":16,"./helpers/avatar":17,"./helpers/bad-names":18,"./helpers/browser":20,"./helpers/cookies":22,"./helpers/events":23,"./helpers/gtag-helper":24,"./helpers/settings":25,"./helpers/storage":26,"./helpers/visitor":27}]},{},[1]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.