'use strict';tb("mr.TestProvider");var py,Ox,qy=tb("mr.Init");Gq().init();py=new Jb("MediaRouter.Provider.WakeDuration");Ox=new cy;
var ry=(new Promise(function(a,b){switch(window.location.host){case "enhhojjnijigcajfphajepfemndkmdlo":a();break;case "pkedcjkdefgpdelpbcmbmeomcjbeemfm":chrome.management.get("enhhojjnijigcajfphajepfemndkmdlo",function(c){chrome.runtime.lastError||!c.enabled?a():b(Error("Dev extension is enabled"))});break;default:b(Error("Unknown extension id"))}})).then(function(){return chrome.mojoPrivate&&chrome.mojoPrivate.requireAsync?new Promise(function(a){chrome.mojoPrivate.requireAsync("media_router_bindings").then(function(b){mojo=b.getMojoExports&&
b.getMojoExports();b.start().then(function(c){a({mrService:b,mrInstanceId:c.instance_id||c,mrConfig:c.config})})})}):Promise.reject(Error("No mojo service loaded"))}).then(function(a){if(!a.mrService)throw Error("Failed to get MR service");var b=a.mrInstanceId;if(!b)throw Error("Failed to get MR instance ID.");qy.info("MR instance ID: "+b);var c=a.mrService;if(!Ox)throw Error("providerManager not initialized.");c.setHandlers(Ox);sj(b)&&(py.f="MediaRouter.Provider.FirstWakeDuration");chrome.runtime.onSuspend.addListener(py.b.bind(py));
wj(b);Jq();b=Nx();window.addEventListener("unhandledrejection",function(a){a=a.reason;a.stack||(a=Error(a));qy.error("Unhandled promise rejection.",a)});Ox.Xa(c,b,a.mrConfig)}).then(void 0,function(a){v(qy,a.message);throw a;});[].concat(xa([Mx(),Jx()].concat(xa([lk(),nk()].concat(xa(qk()))),xa([yu(),uu()])))).forEach(function(a){qj(a)});Mx().addListener();Jx().addListener();chrome.runtime.onStartup.addListener(function(){});ry.then(void 0,function(){return window.close()});
