3c4716ab0acd0cc2afecfa20e2cae082ae3277b52b6afd61adecd84a3a5c6b55

Source Code:

if (self.CavalryLogger) { CavalryLogger.start_js(["KbZwx"]); }

__d("AppInstallLogger",["Banzai","ErrorPubSub"],(function(a,b,c,d,e,f){var g,h="app_install";a=function(){"use strict";function a(){}var c=a.prototype;c.init=function(){var a=this;(g||(g=b("ErrorPubSub"))).addListener(function(b){b={error_message:b.message,error_type:b.name,error_data:JSON.stringify(b),stack_trace:b.stack};a.log("games_unhandled_js_exception",null,b)})};c.log=function(a,c,d){b("Banzai").post(h,babelHelpers["extends"]({app_id:c,event:a},d||{}))};return a}();e.exports=new a()}),null);
__d("XdArbiterBuffer",[],(function(a,b,c,d,e,f){a.XdArbiter||(a.XdArbiter={_m:[],_p:[],register:function(a,b,c){b=b||(/^apps\./.test(location.hostname)?"canvas":"tab");this._p.push([a,b,c]);return b},handleMessage:function(a,b){this._m.push([a,b])}})}),null);
__d("CanvasIFrameLoader",["XdArbiterBuffer","Banzai","$"],(function(a,b,c,d,e,f){b("XdArbiterBuffer");a={loadFromForm:function(a,c,d){var e=b("$")("iframe_canvas");if(c&&!g()){c.style.display="block";e.style.display="none";return}var f=Date.now();e.onload=function(){var a=Date.now();a=a-f;b("Banzai").post("canvas_iframe_load",{app_id:d,iframe_time_to_load:a})};a.submit()}};function g(){try{var a=document.createElement("canvas");return Boolean(window.WebGLRenderingContext)&&Boolean(a.getContext("webgl")||a.getContext("experimental-webgl"))}catch(a){return!1}}e.exports=a}),null);
__d("PlatformDialog",["cx","CSS","DOMEvent","DOMEventListener"],(function(a,b,c,d,e,f,g){var h;a=function(){"use strict";a.getInstance=function(){return h};function a(a,c,d){var e=this;h=this;this.$1=a;this.$2=c;this.$3=!1;b("DOMEventListener").add(this.$1,"submit",function(c){if(e.$3){new(b("DOMEvent"))(c).kill();return}e.$3=!0;d&&b("CSS").addClass(a,"_32qa")})}var c=a.prototype;c.getForm=function(){return this.$1};c.getDisplay=function(){return this.$2};c.hasBeenSubmitted=function(){return this.$3};return a}();a.RESPONSE="platform/dialog/response";e.exports=a}),null);
__d("PlatformDialogClient",["Arbiter","AsyncDialog","AsyncRequest","DOMEventListener","PlatformDialog","PlatformVersioning","PopupWindow","QueryString","URI","UserAgent_DEPRECATED","guid"],(function(a,b,c,d,e,f){var g,h=575,i="FB_DIALOG_RESPONSE";b("AsyncDialog").getLoadingDialog().setWidth(h);b("DOMEventListener").add(window,"message",function(a){/\.facebook\.com$/.test(a.origin)&&new RegExp("^"+i+":").test(a.data)&&b("Arbiter").inform(b("PlatformDialog").RESPONSE,JSON.parse(a.data.substr(i.length+1)))});var j={};b("Arbiter").subscribe(b("PlatformDialog").RESPONSE,function(a,b){a=b.state;j[a]&&(j[a].callback(b),b.state=j[a].state,delete j[a])},"new");function k(a){return function(){b("Arbiter").inform(b("PlatformDialog").RESPONSE,babelHelpers["extends"]({state:a},m.REQUEST_ABORTED_ERROR))}}function l(a){return function(){b("Arbiter").inform(b("PlatformDialog").RESPONSE,babelHelpers["extends"]({state:a},m.REQUEST_ERROR))}}var m={REQUEST_ABORTED_ERROR:{error_code:-200,error_message:"Request aborted."},REQUEST_ERROR:{error:"async_dialog_request_error",error_code:-300,error_message:"Request error."},async:function(a,c,d){var e=b("guid")(),f=c.state;c.state=e;c.redirect_uri=new(g||(g=b("URI")))("/dialog/return/arbiter").setSubdomain("www").setFragment(b("QueryString").encode({origin:c.redirect_uri})).getQualifiedURI().toString();c.display="async";j[e]={callback:d||function(){},state:f};b("AsyncDialog").send(new(b("AsyncRequest"))(this.getURI(a,c)).setMethod("GET").setReadOnly(!0).setAbortHandler(k(e)).setErrorHandler(l(e)))},popup:function(a,c,d,e,f){var i=b("guid")(),k=d.state;d.state=i;d.client_id=d.app_id=c;d.redirect_uri=new(g||(g=b("URI")))("/dialog/return/arbiter").setSecure(g.getRequestURI().isSecure()).setSubdomain("www").setFragment(b("QueryString").encode({origin:d.redirect_uri})).addQueryData(e||{}).addQueryData({relation:"opener",close:!0}).toString();d.display=b("UserAgent_DEPRECATED").mobile()?"touch":"popup";j[i]={callback:f||function(){},state:k};c=g.getRequestURI();e=c.getDomain();i=e.replace("developers","www");b("PopupWindow").open(new g(this.getURI(a,d)).setDomain(i).setProtocol("https").toString(),210,h)},getURI:function(a,c){if(c.version){var d=new(g||(g=b("URI")))("/"+c.version+"/dialog/"+a);delete c.version;return d.addQueryData(c)}return b("PlatformVersioning").versionAwareURI(new(g||(g=b("URI")))("/dialog/"+a).addQueryData(c))}};e.exports=m}),null);
__d("PlatformDialogResize",["DialogPosition","DOMDimensions","Layer","getElementPosition","getViewportDimensions","throttle"],(function(a,b,c,d,e,f){b("DialogPosition").setFixedTopMargin(40);var g=[],h,i;function j(a){return function(b){return b[a]}}function k(a){return Math.max.apply(null,a)}function l(a,c){return b("DOMDimensions").measureElementBox(a,c,!0,!0,!0)}function m(a){var c=b("DOMDimensions").getElementDimensions(a),d=b("getElementPosition")(a);return{width:d.x+c.width+l(a,"right"),height:d.y+c.height+l(a,"bottom")}}function n(){return g.map(function(a){return a.isShown()&&a.getContentRoot()?m(a.getRoot().children[0]):{width:0,height:0}})}var o=function(){var a=b("getViewportDimensions")(),c=b("DOMDimensions").getDocumentDimensions();c=n().concat(c,a,h);var d=k(c.map(j("width")))-a.width;c=k(c.map(j("height")))-a.height;return{dx:d,dy:c}},p=b("throttle")(function(){var a=o();try{window.outerHeight+a.dy>window.screen.availHeight?(window.resizeBy(a.dx,0),window.resizeTo(window.outerWidth,window.screen.availHeight)):window.resizeBy(a.dx,a.dy),window.moveBy(a.dx/-2,0)}catch(a){}},200);b("Layer").subscribe("show",function(a,b){g.length===0&&(i=window.setInterval(p,200)),g.push(b),p()});b("Layer").subscribe("hide",function(a,b){a=g.indexOf(b);a!==-1&&(g.splice(a,1),p());g.length===0&&(window.clearInterval(i),i=null)});a={auto:function(a,b){h={width:a,height:b},p(),window.setTimeout(p,250)},setSize:function(a,c){o=function(){var d=b("getViewportDimensions")(),e=a-d.width;d=c-d.height;return{dx:e,dy:d}},this.auto(a,c)}};e.exports=a}),null);
__d("XPlatformXOutableElementController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/platform/async/xoutelement/",{type:{type:"Enum",required:!0,enumType:0},fbid:{type:"Int",required:!0}})}),null);
__d("PlatformElementXOut.react",["AsyncRequest","DOM","DOMContainer.react","GamesXOut.react","React","ReactDOM","XPlatformXOutableElementController","prop-types"],(function(a,b,c,d,e,f){var g=b("React");a=function(a){"use strict";babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(){var a=b("XPlatformXOutableElementController").getURIBuilder().setEnum("type",d.props.type).setInt("fbid",d.props.fbid).getURI();new(b("AsyncRequest"))(a).setMethod("POST").send();a=b("ReactDOM").findDOMNode(babelHelpers.assertThisInitialized(d)).parentNode.parentNode;b("ReactDOM").unmountComponentAtNode(a);b("DOM").remove(a)},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){var a=g.jsx(b("DOMContainer.react"),{children:this.props.domChild});return g.jsx(b("GamesXOut.react"),{onClick:this.$1,children:a})};return c}(g.Component);a.propTypes={type:b("prop-types").string.isRequired,fbid:b("prop-types").string.isRequired,domChild:b("prop-types").object.isRequired};e.exports=a}),null);
__d("CanvasNavigationFullScreen",["cx","AppInstallLogger","Arbiter","CSS","Event","FullScreen"],(function(a,b,c,d,e,f,g){var h=!1,i=null;a={initLink:function(a,c){if(h)return;else h=!0;i=a;b("CSS").conditionClass(c,"_4-os",b("FullScreen").isSupported());b("Event").listen(c,"click",this.setFullScreen.bind(null,!0));b("FullScreen").subscribe("changed",function(){b("FullScreen").isFullScreen()?b("Arbiter").inform("canvas.enter_fullscreen"):b("Arbiter").inform("canvas.exit_fullscreen")})},isSupported:function(){var a=h&&b("FullScreen").isSupported();return!!a},getFullScreen:function(){return!!b("FullScreen").isFullScreen()},setFullScreen:function(a){a?(b("AppInstallLogger").log("rhc_settings_unit_app_fullscreened",i),a=b("FullScreen").enableFullScreen(document.getElementById("iframe_canvas"))):a=b("FullScreen").disableFullScreen();return a}};e.exports=a}),null);
__d("XAppFriendsController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/platform/games/appfriends/",{app_id:{type:"Int",required:!0}})}),null);
__d("CanvasPresenceController",["Arbiter","AsyncRequest","AvailableList","AvailableListConstants","PresenceStatus","XAppFriendsController"],(function(a,b,c,d,e,f){var g=60*1e3,h=!1,i=[],j=0,k,l,m,n;function o(){var a=0;i.forEach(function(c){b("PresenceStatus").get(c)==b("AvailableListConstants").ACTIVE&&a++});(m===void 0||m!==a>1)&&(m=a>1,b("Arbiter").inform("canvas.friendsOnlineUpdated",m))}function p(a){var c=b("XAppFriendsController").getURIBuilder().setInt("app_id",j).getURI();new(b("AsyncRequest"))().setURI(c).setHandler(function(b){i=b.payload.ids,a&&a(),o()}).send()}function q(){if(j===0){n=q;return}h=!0;p(function(){k=setInterval(p,g),l=b("AvailableList").subscribe(b("AvailableListConstants").ON_AVAILABILITY_CHANGED,o)})}function r(){h=!1,clearInterval(k),b("AvailableList").unsubscribe(l)}a={setAppID:function(a){j=a,n&&n()},setAppFriends:function(a){i=a},useFriendsOnline:function(a){if(a==h)return;a?q():r()}};e.exports=a}),null);
__d("JSONRPC",["Log"],(function(a,b,c,d,e,f){a=function(){"use strict";function a(a){var b=this;this.$1=0;this.$2={};this.remote=function(a){b.$3=a;return b.remote};this.local={};this.$4=a}var c=a.prototype;c.stub=function(a){var b=this;this.remote[a]=function(){var c={jsonrpc:"2.0",method:a};for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];typeof e[e.length-1]==="function"&&(c.id=++b.$1,b.$2[c.id]=e.pop());c.params=e;b.$4(JSON.stringify(c),b.$3||{method:a})}};c.read=function(a,c){a=JSON.parse(a);var d=a.id;if(!a.method){if(!this.$2[d]){b("Log").warn("Could not find callback %s",d);return}var e=this.$2[d];delete this.$2[d];delete a.id;delete a.jsonrpc;e(a);return}var f=this;e=this.local[a.method];var g;d?g=function(a,b){var e={jsonrpc:"2.0",id:d};e[a]=b;window.setTimeout(function(){f.$4(JSON.stringify(e),c)},0)}:g=function(){};if(!e){b("Log").error('Method "%s" has not been defined',a.method);g("error",{code:-32601,message:"Method not found",data:a.method});return}a.params.push(g.bind(null,"result"));a.params.push(g.bind(null,"error"));try{e=e.apply(c||null,a.params);typeof e!=="undefined"&&g("result",e)}catch(c){b("Log").error("Invokation of RPC method %s resulted in the error: %s",a.method,c.message),g("error",{code:-32603,message:"Internal error",data:c.message})}};return a}();e.exports=a}),null);
__d("SecureMessageListener",["SecurePostMessage","URI"],(function(a,b,c,d,e,f){"use strict";var g;a=function(){function a(a){var b=this;this.$3=null;this.$4=!1;this.$1=a;this.$5=function(a){b.run(a)}}var c=a.prototype;c.setEventHandler=function(a){this.$2=a;return this};c.setSupportedOrigins=function(a){this.$3=a;return this};c.skipOriginCheck_UNSAFE=function(){this.$4=!0;return this};c.beginListening=function(){this.$1.addEventListener("message",this.$5);return this};c.stopListening=function(){this.$1.removeEventListener("message",this.$5);return this};c.run=function(a){if(this.$3==null||this.$3.length===0){if(!this.$4&&a.origin!==this.$1.location.origin)return}else if(!this.isSupportedOrigin(this.$3,a.origin))return;if(this.$2)if(this.$2.length==1)this.$2(a);else{var c=function(c){b("SecurePostMessage").sendMessageToSpecificOrigin(a.source,c,a.origin)};this.$2(a,c)}};c.isSupportedOrigin=function(a,c){if(!new RegExp("^https://").test(c))return!1;var d=new(g||(g=b("URI")))(c);return a.some(function(a){return d.isSubdomainOfDomain(a)})};return a}();e.exports=a}),null);
__d("XdArbiter",["Arbiter","Log","QueryString","Queue","SecurePostMessage"],(function(a,b,c,d,e,f){var g=/^apps\./.test(location.hostname)?"canvas":"tab",h={},i={},j=[],k=new(b("Queue"))(),l={setRpcHandler:function(a){k.start(a)},handleMessage:function(a,c,d){b("Log").debug("XdArbiter at "+(window.name!=null&&window.name!==""?window.name:window==top?"top":"[no name]")+" handleMessage "+JSON.stringify(a));if(typeof a==="string"&&/^FB_RPC:/.test(a)){k.enqueue([a.substring(7),{origin:c,source:d||h[g]}]);return}try{c=typeof a==="string"?JSON.parse(a):a;if(typeof c.method!=="string"||c.method==="")return;typeof c.params==="string"&&(c.params=JSON.parse(c.params));b("Arbiter").inform("Connect.Unsafe."+c.method,c.params,"persistent")}catch(a){}},register:function(a,c,d,e){c=c!=null&&c!==""?c:g;b("Arbiter").inform("XdArbiter/register",{origin:d});h[c]=a;h[d]=a;d===e&&(i[d]=!0);b("Arbiter").inform("XdArbiter.register",c,"persistent");l.scheduleDispatch();return c},scheduleDispatch:function(){var a=42;function b(){var c=j.shift();c&&l.send.apply(this,c);j.length&&window.setTimeout(b,a)}window.setTimeout(b,a)},hasProxy:function(a){a=a!=null&&a!==""?a:g;return!!h[a]},useDirectDispatch:function(a){return!!i[a]},send:function(a,c,d){var e=d in h?d:g;a=typeof a==="string"?a:b("QueryString").encode(a);var f=c;i[d]||(f=c.parent);try{b("SecurePostMessage").sendMessageToSpecificOrigin(f,a,d)}catch(a){b("Log").error("XdArbiter: Proxy for %s not available, page might have been navigated: %s",e,a.message),delete h[e]}return!0}};c=a.XdArbiter;a.XdArbiter=l;if(c){if(c._p.length)while(c._p.length)l.register.apply(l,c._p.shift());if(c._m.length)while(c._m.length)l.handleMessage.apply(l,c._m.shift())}window.addEventListener("message",function(a){b("Log").debug("XdArbiter at "+(window.name||"unnamed window")+" received message "+JSON.stringify(a.data));if(a.data.xdArbiterSyn)b("SecurePostMessage").sendMessageAllowAnyOrigin_UNSAFE(a.source,{xdArbiterAck:!0});else if(a.data.xdArbiterRegister){var c=l.register(a.source,a.data.xdProxyName,a.data.origin,a.origin);b("SecurePostMessage").sendMessageAllowAnyOrigin_UNSAFE(a.source,{xdArbiterRegisterAck:c})}else a.data.xdArbiterHandleMessage&&l.handleMessage(a.data.message,a.data.origin,a.source)},!1);e.exports=l}),null);
__d("PlatformAppController",["errorCode","Arbiter","AsyncRequest","Bootloader","CanvasNavigationFullScreen","CanvasPresenceController","CSS","CurrentUser","Dialog","JSONRPC","PlatformDialogClient","PlatformDialogWhitelistedParams","SecureMessageListener","Style","URI","Vector","XdArbiter","ge"],(function(a,b,c,d,e,f,g){var h,i,j={oauth:!0,test_flow:!0,app_requests:!0,game_group_create:!0,game_group_join:!0,gift:!0,feed:!0,share:!0,share_open_graph:!0,payer_promotion:!0,payerpromotion:!0,payment_module:!0,payment_module_iap:!0,payment_subscription:!0,"stream.publish":!1},k,l,m=!0,n=0,o=!1,p,q=!1,r=window._cstart,s=0,t,u,v={},w=new(b("JSONRPC"))(function(a,c){var d=c.origin||l;c=c.source;if(c==null){var e=b("ge")(k);b("XdArbiter").useDirectDispatch(d)?c=e.contentWindow:c=e.contentWindow.frames.fb_xdm_frame_https}b("XdArbiter").send("FB_RPC:"+a,c,d)});(i=b("Arbiter")).subscribe("XdArbiter/register",function(a,c){t&&c.origin!=l&&new(b("AsyncRequest"))().setURI("/platform/app_owned_url_check/").setData({appid:t,url:c.origin}).setHandler(function(a){a=a.getPayload();a.allowed&&(l=c.origin)}).send()});function a(a){var b=parseInt(a.x,10);a=parseInt(a.y,10);b>=0&&a>=0&&window.scrollTo(b,a)}function c(a){var c=b("ge")(a.frame.replace(/_fb_https$/,""));c&&(b("CSS").addClass(c,"noresize"),c.style.height=a.height+"px")}function d(){var a=b("ge")(k),c=0,d=0;while(a)c+=parseInt(a.offsetLeft,10),d+=parseInt(a.offsetTop,10),a=a.offsetParent;a=b("Vector").getViewportDimensions();var e=b("Vector").getScrollPosition();return{clientWidth:a.x,clientHeight:a.y,scrollLeft:e.x,scrollTop:e.y,offsetLeft:c,offsetTop:d}}function x(a,c){if(!b("PlatformDialogWhitelistedParams")[c])return a;var d={};b("PlatformDialogWhitelistedParams").common.forEach(function(b){d[b]=a[b]});b("PlatformDialogWhitelistedParams")[c].forEach(function(b){d[b]=a[b]});return d}function f(a,c,d){var e=a.method;delete a.method;delete a.access_token;delete a.next;delete a.context;delete a.locale;a.display="async";if(e==null||typeof e!=="string"||!/^[\w\-_.]+$/.test(e))throw new Error("Malformed method name");Object.keys(a).forEach(function(b){if(/[\s\x80-\x9f]/.test(b))delete a[b];else if(/\./.test(b)){var c=b.replace(/\./g,"_");Object.prototype.hasOwnProperty.call(a,c)&&delete a[b]}});var f=this.origin;typeof a.redirect_uri==="string"&&new(h||(h=b("URI")))(a.redirect_uri).getOrigin()===new(h||(h=b("URI")))(this.origin).getOrigin()&&(f=a.redirect_uri);a.redirect_uri=f;e=="apprequests"&&(e="app_requests",a.context="canvas_app_requests");if(e=="pay"){var g=a.action;(g==="purchaseitem"||g==="purchase_item")&&u&&u.usePaymentModules&&(e="payment_module",a.action="payment_module");g==="purchaseiap"&&u&&u.iapUsePaymentModule&&(e="payment_module_iap",a.action="payment_module_iap");g==="purchaseitem"||g==="purchase_item"||g==="purchaseiap"?j[e]=!0:u&&u.useNewPayDialog&&(g==="create_subscription"||g==="createsubscription"||g==="changesubscription"||g==="modifysubscription"||g==="cancelsubscription"||g==="reactivatesubscription"||g==="settlesubscription")?(e="payment_subscription",g==="create_subscription"&&(a.action="createsubscription")):j[e]=!1}e=="fbpromotion"&&(e="payer_promotion",a.action="payer_promotion");e==="stream_publish"&&(e="stream.publish");(e=="permissions.oauth"||e=="permissions.request"||e=="oauth")&&(e="oauth");e==="stream.publish"&&(j[e]=!0);a=x(a,e);if(j[e]){b("PlatformDialogClient").async(e,a,function(d){d.error_code==1340004?b("CurrentUser").getID()&&b("CurrentUser").getID()!="0"?c(d):new(h||(h=b("URI")))("/login.php").addQueryData("next",h.getRequestURI().toString()).go():e==="app_requests"&&d.error_code==1349146?y(e,a,c,d,f):c(d)});return}g=new(h||(h=b("URI")))("/fbml/ajax/dialog/"+e.replace(/\./g,"_")).setQueryData(a);g=new(b("AsyncRequest"))().setMethod("GET").setReadOnly(!0).setURI(g).setAbortHandler(function(){d(b("PlatformDialogClient").REQUEST_ABORTED_ERROR)});new(b("Dialog"))().setAsync(g).setModal(!0).setWideDialog(!0).show().setCloseHandler(c)}function y(a,c,d,e,f){c.redirect_uri=f,b("PlatformDialogClient").async("oauth",c,function(g){g.error?d(e):(c.redirect_uri=f,b("PlatformDialogClient").async(a,c,function(a){d(a)}))})}function g(a){o=a}function z(a,b){q=a,p=b}w.stub("navigate");function A(a){if(o){w.remote.navigate(a);return!0}return!1}w.stub("enterFullScreen");i.subscribe("canvas.enter_fullscreen",w.remote.enterFullScreen);w.stub("exitFullScreen");i.subscribe("canvas.exit_fullscreen",w.remote.exitFullScreen);w.stub("fireEvent");i.subscribe("canvas.friendsOnlineUpdated",w.remote.fireEvent.bind(w.remote));function B(a){var c=a.time-r+s;switch(a.name){case"StopIframeAppTtiTimer":s=c;return{time_delta_ms:c,type:"tti"};case"StartIframeAppTtiTimer":r=a.time;break;case"RecordIframeAppTti":q&&b("Bootloader").loadModules(["CanvasIFrameLogger"],function(b){b.log(c,a.appId,p)},"PlatformAppController");return{time_delta_ms:c,type:"tti"}}}w.local.setSize=c;w.local.getPageInfo=d;w.local.scrollTo=a;w.local.showDialog=f;w.local.setNavigationEnabled=g;w.local.isFullScreenSupported=b("CanvasNavigationFullScreen").isSupported;w.local.getFullScreen=b("CanvasNavigationFullScreen").getFullScreen;w.local.logTtiMessage=B;w.local.useFriendsOnline=b("CanvasPresenceController").useFriendsOnline.bind(b("CanvasPresenceController"));b("XdArbiter").setRpcHandler(function(a){w.read.apply(w,a)});w.stub("hidePluginObjects");i.subscribe("layer_shown",function(){++n===1&&(m?w.remote.hidePluginObjects():b("Style").set(b("ge")("pagelet_canvas_content"),"visibility","hidden"))});w.stub("showPluginObjects");i.subscribe("layer_hidden",function(){--n===0?m?w.remote.showPluginObjects():b("Style").set(b("ge")("pagelet_canvas_content"),"visibility",""):n<0&&(n=0)});function C(a){v[a.name]=a;a=b("ge")(a.name);a&&(k=a);a=function(a,b){if(!a.data.platformAppControllerGetFrameParams)return;b({platformAppControllerGetFrameParamsResponse:!0,name:a.data.name,params:v[a.data.name]})};a=new(b("SecureMessageListener"))(window).setEventHandler(a).setSupportedOrigins(["facebook.com"]);a.beginListening()}c={setActiveIframeAndAppID:function(a,c,d){k=a,l=c,t=d,b("CanvasPresenceController").setAppID(t)},setInformAppOnLayerChange:function(a){m=a},setNavigationEnabled:g,setTtiEnabled:z,handleNavigation:A,init:C,getFrameParams:function(a){return v[a]},setConfig:function(a){u=a}};e.exports=c}),null);
__d("PlatformCanvasController",["fbt","AsyncRequest","CSS","DocumentTitle","DOM","DOMEventListener","FavIcon","PageTransitions","PlatformAppController","UIPagelet","URI","UserActivity","ge"],(function(a,b,c,d,e,f,g){var h,i="iframe_canvas",j=24e4,k=5e3,l=6e4,m,n,o,p,q,r,s;function t(a){var c=b("ge")("pagelet_canvas_content");b("CSS").hide(c);b("DOM").scry(c,"iframe").forEach(function(a){a.src=""});b("DOM").setContent(b("ge")("canvas_throbber_text"),g._("{app-name}\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059",[g._param("app-name",a)]))}function u(a,c,d,e){var f=b("ge")("pagelet_canvas_footer_content"),g=b("ge")("pagelet_canvas_content");b("DOM").setContent(g,a);b("DOM").setContent(f,c);b("CSS").show(g);b("DocumentTitle").set(d);b("FavIcon").set(e)}function v(a){if(a.getSubdomain()!="apps")return!1;var c,d=b("DOM").scry(document,"a[data-appname]");for(var e=0;e<d.length;e++)if(d[e].href==a){c=d[e].getAttribute("data-appname");break}if(!c)return!1;d=a.getPath().split("/")[1];if(d=="l.php")return!1;t(c);e=a.getUnqualifiedURI();new(b("AsyncRequest"))().setURI(new(h||(h=b("URI")))("/ajax/canvas.php")).setData({fb_app_name:d,uri:e.toString()}).setMethod("GET").setReadOnly(!0).setStatusElement("canvas_throbber").setHandler(function(a){a=a.getPayload();b("CSS").conditionClass(document.body,"center_fixed_width_app",!a.is_liquid);u(a.main_html,a.footer_html,a.page_title,a.favicon);b("PageTransitions").transitionComplete()}).send();return!0}function w(a){if(!String(a.getPath()).startsWith("/"+o+"/")&&!String(a.getPath()).startsWith("/"+n+"/"))return!1;a=a.getUnqualifiedURI();a.setPath("/"+a.getPath().split("/").slice(2).join("/"));return b("PlatformAppController").handleNavigation(a.toString())}function x(a){return w(a)||v(a)}function y(){var a=b("ge")("pagelet_ego_pane"),c=Date.now();a!==null&&m>0&&c-p>=j&&(p=c,b("UIPagelet").loadFromEndpoint("WebEgoPane","pagelet_ego_pane",{pid:9,data:[n,++q]},{bundle:!1}))}b("UserActivity").subscribe(function(){var a=Date.now();a-p>=j-k&&setTimeout(y,k)});function z(){var a=Date.now();m>0&&a-r>=l&&(r=a,b("UIPagelet").loadFromEndpoint("CanvasShowcaseSliderPagelet","pagelet_canvas_showcase",{pid:129,data:[n,++s]},{bundle:!1}))}function a(a,c,d,e,f){m=d;p=Date.now();q=0;r=Date.now();s=0;n&&n!==a&&y();n=a;o=c;d=b("ge")(i);b("PlatformAppController").setConfig(f);d&&b("DOMEventListener").add(d,"load",function(){b("PlatformAppController").setNavigationEnabled(!1)});f&&f.displayShowcase&&setInterval(z,l);b("PlatformAppController").setInformAppOnLayerChange(!e);b("PlatformAppController").setNavigationEnabled(!1);b("PageTransitions").registerHandler(x)}c={setup:a};e.exports=c}),null);
__d("RecaptchaV2IFrameContainer",["RecaptchaV2Constants","SecureMessageListener","SecurePostMessage"],(function(a,b,c,d,e,f){var g=b("RecaptchaV2Constants").RecaptchaV2IFrameMessageTypes,h=["facebook.com","messenger.com","workplace.com","instagram.com"],i=16;e.exports={init:function(){var a=0,c=null;window.successCallback=d;b("SecurePostMessage").sendMessageAllowAnyOrigin_UNSAFE(window.parent,{type:g.GET_ORIGIN});window.setInterval(e,250);function d(a){f({type:g.CAPTCHA_SOLVED,token:a})}function e(){var b=document.getElementsByTagName("iframe"),c=0,d=0;for(var e=0;e<b.length;e++){var h=b[e],j=window.getComputedStyle(h);if(j.visibility==="hidden"||j.opacity===0)continue;j=h.getBoundingClientRect();c=Math.min(c,j.top);d=Math.max(d,j.bottom)}h=d-c+i;h!==0&&a!==h&&(a=h,f({type:g.RESIZE_IFRAME,size:{height:a}}))}function f(a,d){var e=(d=d)!=null?d:1;if(c==null){e<=3&&window.setTimeout(function(){f(a,e+1)},250*Math.pow(2,e*e));return}b("SecurePostMessage").sendMessageToSpecificOrigin(window.parent,a,c)}d=new(b("SecureMessageListener"))(window).setEventHandler(function(a){c=a.origin}).setSupportedOrigins(h);d.beginListening()}}}),null);
__d("XGameroomLandingPageController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/gameroom/download/",{at:{type:"String"},fbsource:{type:"Int"},video_id:{type:"FBID"},canvas_url:{type:"String"},app_id:{type:"FBID"}})}),null);