[r]=="function"&&i[r](t.addedTabId,t.removedTabId)}),t=Object.defineProperties({},{addListener:{value:n.addListener.bind(n),configurable:!0,enumerable:!0},removeListener:{value:n.removeListener.bind(n),configurable:!0,enumerable:!0},hasListener:{value:n.hasListener.bind(n),configurable:!0,enumerable:!0}});return Object.defineProperty(window.browser.tabs,"onReplaced",{value:t,configurable:!0,enumerable:!0}),t}var i=Object.defineProperties({},{create:{value:p.bind(n),configurable:!0,enumerable:!0},executeScript:{value:d.bind(n),configurable:!0,enumerable:!0},get:{value:g.bind(n),configurable:!0,enumerable:!0},getCurrent:{value:nt.bind(n),configurable:!0,enumerable:!0},insertCSS:{value:tt.bind(n),configurable:!0,enumerable:!0},query:{value:it.bind(n),configurable:!0,enumerable:!0},remove:{value:ft.bind(n),configurable:!0,enumerable:!0},sendMessage:{value:ot.bind(n),configurable:!0,enumerable:!0},detectLanguage:{value:b.bind(n),configurable:!0,enumerable:!0},update:{value:st.bind(n),configurable:!0,enumerable:!0},onActivated:{get:ht,configurable:!0,enumerable:!0},onCreated:{get:ct,configurable:!0,enumerable:!0},onUpdated:{get:vt,configurable:!0,enumerable:!0},onRemoved:{get:yt,configurable:!0,enumerable:!0},onReplaced:{get:pt,configurable:!0,enumerable:!0}});return i=new Proxy(i,y("tabs.")),Object.defineProperty(window.browser,"tabs",{value:i,configurable:!0,enumerable:!0}),i}function is(){function f(){var o="windows.get",i,f,s,n;return r(o,arguments,[{type:"integer",name:"windowId"},{type:"object",name:"getInfo",optional:!0},{type:"function",name:"callback"}]),i=arguments[1],f=null,t(arguments[1])==="object"&&(s=[{type:"boolean",name:"populate",optional:!0}],e(1,arguments[1],s),i=arguments[2],f=arguments[1]),n={},n.component=a,n.frameId=arguments[0],u(o,ct,n,f,i)}function s(){var s="windows.getCurrent",f,o,h,i;return r(s,arguments,[{type:"object",name:"getInfo",optional:!0},{type:"function",name:"callback"}]),f=arguments[0],o=null,t(arguments[0])==="object"&&(h=[{type:"boolean",name:"populate",optional:!0}],e(0,arguments[0],h),f=arguments[1],o=arguments[0]),i={},i.component=a,i.frameId=n.currentWindowId(),u(s,ct,i,o,f)}function h(){var o="windows.getCurrent",i,f,s,n;return r(o,arguments,[{type:"object",name:"getInfo",optional:!0},{type:"function",name:"callback"}]),i=arguments[0],f=null,t(arguments[0])==="object"&&(s=[{type:"boolean",name:"populate",optional:!0}],e(0,arguments[0],s),i=arguments[1],f=arguments[0]),n={},n.component=a,n.frameId=k,u(o,ct,n,f,i)}function c(){var h="windows.getAll",i,f,c,s;return r(h,arguments,[{type:"object",name:"getInfo",optional:!0},{type:"function",name:"callback"}]),i=arguments[0],f=null,t(arguments[0])==="object"&&(c=[{type:"boolean",name:"populate",optional:!0}],e(0,arguments[0],c),i=arguments[1],f={populate:arguments[0].populate,extensionId:n.getExtensionId()}),s={},s.component=o,u(h,pe,s,f,i)}function v(){var o="windows.create",f,n,s,i;return r(o,arguments,[{type:"object",name:"createData",optional:!0},{type:"function",name:"callback",optional:!0}]),f=arguments[0],n=null,t(arguments[0])==="object"&&(s=[{type:"string or array",name:"url",optional:!0,validator:function(n){if(typeof n!="string")for(var t=0;t<n.length;t++)if(typeof n[t]!="string")return"All items in the array must be strings"}},{type:"integer",name:"tabId",optional:!0,validator:function(n){if(n<0)return"Value must be non-negative integer."}},{type:"integer",name:"left",optional:!0},{type:"integer",name:"top",optional:!0},{type:"integer",name:"width",optional:!0,validator:function(n){if(n<=0)return"Value must be positive integer."}},{type:"integer",name:"height",optional:!0,validator:function(n){if(n<=0)return"Value must be positive integer."}},{type:"boolean",name:"focused",optional:!0},{type:"boolean",name:"inPrivate",optional:!0},{type:"string",name:"type",optional:!0,validator:function(n){if(n!="normal"&&n!="popup")return"Value must be one of: [normal, popup]"}},{type:"string",name:"state",optional:!0,validator:function(n){if(n!="normal"&&n!="minimized"&&n!="maximized"&&n!="fullscreen")return"Value must be one of: [normal, minimized, maximized, fullscreen]"}}],e(0,arguments[0],s),f=arguments[1],n=arguments[0]),i={},i.component=a,i.frameId=k,n.url&&t(n.url)==="string"&&!gt(n.url)&&(n.url=lt(n.url)),u(o,be,i,n,f)}function p(){var t="windows.update",i,n;return r(t,arguments,[{type:"integer",name:"windowId"},{type:"object",name:"updateData",optional:!0},{type:"function",name:"callback",optional:!0}]),i=[{type:"integer",name:"left",optional:!0},{type:"integer",name:"top",optional:!0},{type:"integer",name:"width",optional:!0,validator:function(n){if(n<=0)return"Value must be positive integer."}},{type:"integer",name:"height",optional:!0,validator:function(n){if(n<=0)return"Value must be positive integer."}},{type:"boolean",name:"focused",optional:!0},{type:"boolean",name:"drawAttention",optional:!0},{type:"string",name:"state",optional:!0,validator:function(n){if(n!="normal"&&n!="minimized"&&n!="maximized"&&n!="fullscreen")return"Value must be one of: [normal, minimized, maximized, fullscreen]"}}],e(1,arguments[1],i),n={},n.component=a,n.frameId=arguments[0],u(t,we,n,arguments[1],arguments.length==3?arguments[2]:null)}function w(){var n=l("windows.onCreated",su,function(n,t,i){for(var r=0;r<i.length;r++)typeof i[r]=="function"&&i[r](t)}),t=Object.defineProperties({},{addListener:{value:n.addListener.bind(n),configurable:!0,enumerable:!0},removeListener:{value:n.removeListener.bind(n),configurable:!0,enumerable:!0},hasListener:{value:n.hasListener.bind(n),configurable:!0,enumerable:!0}});return Object.defineProperty(window.browser.windows,"onCreated",{value:t,configurable:!0,enumerable:!0}),t}function b(){var n=l("windows.onRemoved",hu,function(n,t,i){for(var r=0;r<i.length;r++)typeof i[r]=="function"&&i[r](t)}),t=Object.defineProperties({},{addListener:{value:n.addListener.bind(n),configurable:!0,enumerable:!0},removeListener:{value:n.removeListener.bind(n),configurable:!0,enumerable:!0},hasListener:{value:n.hasListener.bind(n),configurable:!0,enumerable:!0}});return Object.defineProperty(window.browser.windows,"onRemoved",{value:t,configurable:!0,enumerable:!0}),t}function d(){var n=l("windows.onFocusChanged",cu,function(n,t,i){for(var r=0;r<i.length;r++)typeof i[r]=="function"&&i[r](t)}),t=Object.defineProperties({},{addListener:{value:n.addListener.bind(n),configurable:!0,enumerable:!0},removeListener:{value:n.removeListener.bind(n),configurable:!0,enumerable:!0},hasListener:{value:n.hasListener.bind(n),configurable:!0,enumerable:!0}});return Object.defineProperty(window.browser.windows,"onFocusChanged",{value:t,configurable:!0,enumerable:!0}),t}var i=Object.defineProperties({},{get:{value:f.bind(n),configurable:!0,enumerable:!0},getCurrent:{value:s.bind(n),configurable:!0,enumerable:!0},getLastFocused:{value:h.bind(n),configurable:!0,enumerable:!0},getAll:{value:c.bind(n),configurable:!0,enumerable:!0},create:{value:v.bind(n),configurable:!0,enumerable:!0},update:{value:p.bind(n),configurable:!0,enumerable:!0},onCreated:{get:w,configurable:!0,enumerable:!0},onRemoved:{get:b,configurable:!0,enumerable:!0},onFocusChanged:{get:d,configurable:!0,enumerable:!0},WINDOW_ID_NONE:{value:-1,configurable:!0,enumerable:!0},WINDOW_ID_CURRENT:{value:-2,configurable:!0,enumerable:!0}});return i=new Proxy(i,y("windows.")),Object.defineProperty(window.browser,"windows",{value:i,configurable:!0,enumerable:!0}),i}function rs(){function a(n,t){var i="webNavigation.getFrame",f;r(i,arguments,[{type:"object",name:"details"},{type:"function",name:"callback"}]);f=[{type:"integer",name:"tabId"},{type:"integer",name:"processId"},{type:"integer",name:"frameId"}];e(0,n,f);var o={component:rt,tabId:n.tabId,frameId:s},h={frameId:n.frameId,processId:n.processId},c=function(n){t(n||null)};return u(i,of,o,h,c)}function p(n,t){var i="webNavigation.getAllFrames",f,o,c,h;return r(i,arguments,[{type:"object",name:"details"},{type:"function",name:"callback"}]),f=[{type:"integer",name:"tabId"}],e(0,n,f),o={component:rt,tabId:n.tabId,frameId:s},h=function(n){t(n||null)},u(i,ef,o,c,h)}var i,o=v(w,eo);if(typeof o=="boolean"&&o){i=Object.defineProperties({},{getFrame:{value:a.bind(n.webNavigation),configurable:!0,enumerable:!0},getAllFrames:{value:p.bind(n.webNavigation),configurable:!0,enumerable:!0}});i=new Proxy(i,y("webNavigation."));function h(n,t){return function(n){var i={};return n&&(i=f.parse(n)),t(i),f.stringify("noReturn")}}function c(i,r,u){var e=n.webNavigation.getFilteredEvent(r),f,o;if(!e)throw"Unexpected eventName: '"+i+"', or internal error.";f=u[0];o=u.length>1?u[1]:"";t(f)==="function"&&e.addListener(h(i,f,o),f)}function l(i,r,u){var e=n.webNavigation.getFilteredEvent(r),f;if(!e)throw"Unexpected eventName: '"+i+"', or internal error.";f=u[0];t(f)==="function"&&e.removeListener(f)}["onBeforeNavigate","onCommitted","onDOMContentLoaded","onCompleted","onErrorOccurred","onCreatedNavigationTarget","onReferenceFragmentUpdated","onTabReplaced","onHistoryStateUpdated"].forEach(function(n,t){si(i,"webNavigation",n,t,c,l)})}return Object.defineProperty(window.browser,"webNavigation",{value:i,configurable:!0,enumerable:!0}),i}function us(){function t(){var n=this.toString(),t=["onBeforeRequest","onBeforeSendHeaders","onSendHeaders","onHeadersReceived","onAuthRequired","onBeforeRedirect","onResponseStarted","onCompleted","onErrorOccurred"].indexOf(n);if(t===-1)throw"unexpected webRequest eventName: "+n+", or internal error";return si(window.browser.webRequest,"webRequest",n,t,a,p)}function l(){n.fireExtensionApiTelemetry("webRequest.handlerBehaviorChanged",!0,!0);r("webRequest.HandlerBehaviorChanged",arguments,[{type:"function",name:"callback",optional:!0}]);arguments[0]&&setImmediate(arguments[0])}function s(n){if(n)u=n;else return u}function a(t,i,u){function y(n){var i={};for(var t in n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i}function p(n,t,i){function u(n){var t=[{type:"array",name:"urls",optional:!1,canValidate:!1,validator:function(n){for(var t=0;t<n.length;t++)ot(n[t])}},{type:"array",name:"types",optional:!0,canValidate:!0,validator:function(n){for(var i=["main_frame","sub_frame","stylesheet","script","image","object","xmlhttprequest","other"],t=0,r=n.length;t<r;t++)i.indexOf(n[t])===-1&&c(1,"Property 'types': Value must be one of: ["+i.toString()+"]")}},{type:"integer",name:"tabId",optional:!0,canValidate:!0},{type:"integer",name:"windowId",optional:!0,canValidate:!0},];e(1,n,t)}function f(n,t){for(var u,r,i=0;i<n.length;i++)u=!1,t.indexOf(n[i])===-1&&c(2,"Value must be one of: ["+t.toString()+"]"),(n[i]=="blocking"||n[i]=="asyncBlocking")&&(r=v(w,so),typeof r=="boolean"&&r||c(2,"The extension requires the blocking web request permission to add blocking listeners."))}if(r("webRequest."+n,t,[{type:"function",name:"callback",optional:!1},{type:"object",name:"filters",optional:!1},{type:"array",name:"extraInfoSpec",optional:!0}]),t[1])u(t[1]);else throw"filter argument is needed";t[2]&&f(t[2],i)}function a(n,t,i){function r(n,t){var r=!1,i;if(t)for(i=0;i<t.length;i++)if(t[i]===n){r=!0;break}return r}i=i||{};var u=r("blocking",i.extraInfoSpec),e=r("asyncBlocking",i.extraInfoSpec);return function(r,o,s,c){var d=!1,y,a,l,rt;if(i.tabId&&(d=i.tabId!==s),i.windowId&&(d=i.windowId!==c),!d){y={};r&&(y=f.parse(r));var p={},nt={onBeforeRequest:["requestId","url","method","frameId","parentFrameId","requestBody","tabId","type","timeStamp"],onBeforeSendHeaders:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","requestHeaders"],onSendHeaders:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","requestHeaders"],onHeadersReceived:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","responseHeaders","statusLine","statusCode"],onAuthRequired:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","scheme","realm","challenger","isProxy","responseHeaders","statusLine","statusCode"],onResponseStarted:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","ip","fromCache","responseHeaders","statusLine","statusCode"],onBeforeRedirect:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","ip","fromCache","responseHeaders","statusLine","statusCode","redirectUrl"],onCompleted:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","ip","fromCache","responseHeaders","statusLine","statusCode"],onErrorOccurred:["requestId","url","method","frameId","parentFrameId","tabId","type","timeStamp","ip","fromCache","error"]}[n],w=Object.keys(y);for(l=0;l<w.length;l++)nt.indexOf(w[l])!==-1&&(p[w[l]]=y[w[l]]);if(e)try{t(p,function(n){var n=n||{},t={};t.component=h;t.tabId=s;t.frameId=c;o=o|-2147483648;it(pr,t,n,o)});a="async"}catch(ft){a="noReturn"}else{try{u?a=t(p):t(p)}catch(ft){a=null}if(u&&a){var v=Object.keys(a),b=!1,k="",g={cancel:["onBeforeRequest","onBeforeSendHeaders","onSendHeaders"],redirectUrl:["onBeforeRequest","onHeadersReceived"],requestHeaders:["onBeforeSendHeaders"],responseHeaders:["onHeadersReceived"],authCredentials:["onAuthRequired"]},tt={onBeforeRequest:["cancel","redirectUrl"],onBeforeSendHeaders:["cancel","requestHeaders"],onSendHeaders:["cancel"],onHeadersReceived:["redirectUrl","responseHeaders"],onAuthRequired:["authCredentials"],onBeforeRedirect:[],onResponseStarted:[],onCompleted:[],onErrorOccurred:[]};for(l=0;l<v.length;l++){if(g[v[l]]){if(g[v[l]].indexOf(n)===-1)b=!0,k="Response error: Unexpected property name for blocking response on given event. Value must be ["+tt[n].toString()+"]";else if(v[l]==="redirectUrl")try{rt=new URL(a.redirectUrl)}catch(ft){b=!0;k="Response error: Invalid value of redirectUrl: "+a.redirectUrl+" is not a valid URL."}}else b=!0,k="Response error: Invalid property name for blocking response: ["+v[l]+"]. expected properties are"+Object.keys(g).toString();if(b){console.error(k);a=null;break}}}}}return a=a||"noReturn",f.stringify(a)}}var l,o,s;if(p(t+".addListener",u,{onBeforeRequest:["blocking","requestBody"],onBeforeSendHeaders:["blocking","requestHeaders"],onSendHeaders:["requestHeaders"],onHeadersReceived:["blocking","responseHeaders"],onAuthRequired:["blocking","responseHeaders","asyncBlocking"],onResponseStarted:["responseHeaders"],onBeforeRedirect:["responseHeaders"],onCompleted:["responseHeaders"],onErrorOccurred:[]}[t]),l=n.webRequest.getFilteredEvent(i),!l)throw"internal error: unexpected webRequest eventIndex "+i;o=y(u[1]);o&&u[2]&&(o.extraInfoSpec=u[2]);s=u[0];o?l.addListener(a(t,s,o),s,JSON.stringify(o)):l.addListener(a(t,s,o),s)}function p(t,i,u){var f,e;if(r("webRequest."+t,u,[{type:"function",name:"callback",optional:!1},]),f=n.webRequest.getFilteredEvent(i),!f)throw"internal error: unexpected webRequest eventIndex: "+i;e=u[0];f.removeListener(e)}var i,o=v(w,oo),u;return typeof o=="boolean"&&o&&(i=Object.defineProperties({},{onBeforeRequest:{get:t.bind("onBeforeRequest"),configurable:!0,enumerable:!0},onBeforeSendHeaders:{get:t.bind("onBeforeSendHeaders"),configurable:!0,enumerable:!0},onSendHeaders:{get:t.bind("onSendHeaders"),configurable:!0,enumerable:!0},onHeadersReceived:{get:t.bind("onHeadersReceived"),configurable:!0,enumerable:!0},onAuthRequired:{get:t.bind("onAuthRequired"),configurable:!0,enumerable:!0},onResponseStarted:{get:t.bind("onResponseStarted"),configurable:!0,enumerable:!0},onBeforeRedirect:{get:t.bind("onBeforeRedirect"),configurable:!0,enumerable:!0},onCompleted:{get:t.bind("onCompleted"),configurable:!0,enumerable:!0},onErrorOccurred:{get:t.bind("onErrorOccurred"),configurable:!0,enumerable:!0},handlerBehaviorChanged:{value:l,configurable:!0,enumerable:!0},MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES:{get:s,set:s,configurable:!0,enumerable:!0}}),i=new Proxy(i,y("webRequest."))),u=20,Object.defineProperty(window.browser,"webRequest",{value:i,configurable:!0,enumerable:!0}),i}function fs(t,i,r,u,f){return{fullName:t+"."+i,name:i,index:r,addHandler:u,removeHandler:f,listeners:[],addListener:function(){try{this.addHandler(this.name,this.index,arguments)}catch(t){n.fireExtensionApiTelemetry(this.fullName+".addListener",!1,!0);throw t;}n.fireExtensionApiTelemetry(this.fullName+".addListener",!0,!0);this.listeners.push(arguments[0])},removeListener:function(){var i,t;try{this.removeHandler(this.name,this.index,arguments)}catch(r){n.fireExtensionApiTelemetry(this.fullName+".removeListener",!1,!0);throw r;}for(n.fireExtensionApiTelemetry(this.fullName+".removeListener",!0,!0),i=arguments[0],t=this.listeners.length-1;t>=0;t--)this.listeners[t]===i&&this.listeners.splice(t,1)},hasListener:function(t){n.fireExtensionApiTelemetry(this.fullName+".hasListener",!0,!0);for(var i=0;i<this.listeners.length;i++)if(this.listeners[i]===t)return!0;return!1},hasListeners:function(){return n.fireExtensionApiTelemetry(this.fullName+".hasListeners",!0,!0),this.listeners.length!==0}}}function si(n,t,i,r,u,f){var e=fs(t,i,r,u,f),o=Object.defineProperties({},{addListener:{value:e.addListener.bind(e),configurable:!0,enumerable:!0},removeListener:{value:e.removeListener.bind(e),configurable:!0,enumerable:!0},hasListener:{value:e.hasListener.bind(e),configurable:!0,enumerable:!0},hasListeners:{value:e.hasListeners.bind(e),configurable:!0,enumerable:!0}});return Object.defineProperty(n,i,{value:o,configurable:!0,enumerable:!0}),o}function hi(t,i){return n.fireExtensionApiTelemetry(t,!0,!0),lt(i)}function lt(t){var r=n.getExtensionId(),i="ms-browser-extension://"+r;return t.substr(0,1)!=="/"&&(i+="/"),i+t}function u(t,i,r,u,f){try{it(i,r,u,f)}catch(e){n.fireExtensionApiTelemetry(t,!1,!0);throw e;}n.fireExtensionApiTelemetry(t,!0,!0)}function it(i,r,u,e){var o,s;e||typeof u!="function"||(e=u,u=null);e&&(o=vi(e));t(u)!="undefined"&&(s=f.stringify(u));n.genericFunction(i,r,s,o)}var f=window.JSON,ft=1,o=4,a=6,h=7,rt=9,at=10,i=4092,vt=i+10,yt=i+33,ci=1,li=2,w=5,g=[],pt=0,nt=[],et=[],tr=i+29,ir=9,rr=3,ur=4,er=8,or=i+25,sr=i+17,hr=i+23,cr=i+24,lr=i+18,ar=14,vr=255,st=524288,d=-2,k=-3,s=-4,ni=-1,pr=i,wr=9,br=11,kr=10,dr=3,gr=2,nu=18,tu=12,iu=13,ru=14,ht=19,uu=1,fu=0,eu=16,ou=5,su=4,hu=6,cu=7,lu=20,au=i+19,vu=i+18,yu=i+32,pu=i+12,wu=i+11,bu=i+18,ku=i+16,du=i+14,gu=i+26,nf=i+27,tf=i+28,rf=7,uf=9,tt=i+38,ff=i+9,ef=i+8,of=i+7,sf=8,hf=i+32,cf=i+33,lf=i+7,af=i+5,vf=i+3,yf=i+9,pf=i+6,wf=i+4,bf=i+2,kf=i+40,df=14,gf=i+41,ne=11,te=i+7,ie=6,re=i+20,ue=i+30,ti=i+2,ii=i+5,fe=i+4,ee=i+2,oe=i+3,ri=i+8,se=i+4,he=i+5,ui=i+7,ce=i+13,le=i+10,ae=i+20,ve=i+44,ye=i+17,ct=i+8,pe=i+19,we=i+17,be=i+28,ke=i+22,de=i+23,fi=i+13,ge=i+14,no=i+25,to=i+26,ei=i+15,io=i+16,ro=12,uo=13,fo=6,ut=10,eo=12,oo=11,so=13,ho=15,co=16,p=[],oi=!1;Object.defineProperty(window,"browser",{get:ao,configurable:!0,enumerable:!0,set:lo});n.registerGenericFunctionCallbackHandler(yi);n.registerGenericListenerHandler(gi)})(window.browser)(function(n){function t(n){var t=typeof n;return t==="number"?parseFloat(n)==parseInt(n)&&(t="integer"):t==="object"&&(n?Array.isArray(n)&&(t="array"):t="null"),t}function g(n,t){var r,i;if(t==="any")return!0;for(r=t.split(" or "),i=0;i<r.length;i++)if(n===r[i])return!0;return!1}function at(n,i,r){for(var f,e="",u=0;u<i.length;u++)u>0&&(e+=", "),e+=t(i[u]);for(f="",u=0;u<r.length;u++)u>0&&(f+=", "),r[u].optional&&(f+="optional "),f+=r[u].type+" "+r[u].name;throw"Error: Invocation of form "+n+"("+e+") doesn't match definition "+n+"("+f+").";}function u(n,i,r){for(var u=!1,c=0,s=!0,f,h,o;!u&&s;){var e=0,f=0,l=0;for(s=!1,u=!0,f=0;f<r.length&&e<i.length&&u;f++){if(r[f].optional)if(h=1<<l,l++,c&