Registry.registerRaw("page.js","5770",function(){return{backup:function(a,v,q,P){var c={safeWindow:{},safeDocument:{},eval:eval,Context:{D:P},exec_fn:function(a,b,c){g(new y.Function(a),b,c)},exec_csp:function(a,b,g){var T="__u__"+(19831206*c.Context.M_r()+1);c.Message.send("csp",{id:T,src:a});c.exec_script(T,b,g)},exec_script:function(b,c,u){var T=a[b];delete a[b];g(T,c,u)}},g,b,x,H,t,G,z,B,u,ba,y=c.safeWindow;(function(){var d=function(a){var b=function(b){return g(a,b,g(x.wrappedJSObject,
arguments,[1]))};b.wrappedJSObject=a;return b},e=function(a,b){for(var c;null!==a&&void 0!==a&&!(c=z(a,b));)a=G(a);return c},fa={i_N:B=function(){return function(a){return!("prototype"in a)}}(),i_SS:u=function(){return function(a,b,c){var d=e(a,b);if(!d||!d.set||B(d.set))return a[b]=c,!0}}(),i_SG:ba=function(){return function(a,b){var c=e(a,b);if(!c||!c.get||B(c.get))return a[b]}}(),F_a:g=function(){"use strict";var b=a.Function.apply;return function(a,c,d){var e;ba(a,"apply")===b?e=a.apply(c,d):u(a,
q,b)&&(e=a[q](c,d),delete a[q]);return e}}(),E_u:function(b,d){if(c.exec_eval){var e="__u__"+(19831206*c.Context.M_r()+1),g=e+"_";a[g]=d;var u=c.Context.F_c(c.Context.eval,a,"(function() {"+b+'}).apply(window["'+g+'"])');delete a[e];delete a[g];return u}c.exec_csp(b,d)},E_c:function(a,b){c.exec_eval?g(new y.Function(a),b):c.exec_csp(a,b)},F_c:d(a.Function.call),F_b:b=d(a.Function.bind),F_tS:d(a.Function.toString),A_fE:d(a.Array.prototype.forEach),A_sl:x=d(a.Array.prototype.slice),A_sp:d(a.Array.prototype.splice),
A_sh:d(a.Array.prototype.shift),A_j:d(a.Array.prototype.join),A_pu:d(a.Array.prototype.push),A_po:d(a.Array.prototype.pop),A_m:d(a.Array.prototype.map),A_c:d(a.Array.prototype.concat),A_f:d(a.Array.prototype.filter),A_iO:d(a.Array.prototype.indexOf),O_k:a.Object.keys,O_dP:a.Object.defineProperties,O_dPy:a.Object.defineProperty,O_gOPN:a.Object.getOwnPropertyNames,O_gOPD:z=a.Object.getOwnPropertyDescriptor,O_gOPDs:a.Object.getOwnPropertyDescriptors||function(a){var b={},c;for(c in a)b[c]=fa.O_gOPD(a,
c);return b},O_gPO:G=a.Object.getPrototypeOf,O_tS:d(a.Object.prototype.toString),J_p:t=a.JSON.parse,J_s:H=a.JSON.stringify,c_l:a.console.log.bind(a.console),c_i:a.console.info.bind(a.console),c_w:a.console.warn.bind(a.console),c_e:a.console.error.bind(a.console),c_d:a.console.debug.bind(a.console),M_f:a.Math.floor,M_r:a.Math.random,M_m:a.Math.max,N_tS:d(a.Number.prototype.toString),P_r:a.Promise?a.Promise.resolve.bind(a.Promise):void 0,P_t:a.Promise?d(a.Promise.prototype.then):void 0,P_c:a.Promise?
d(a.Promise.prototype.catch):void 0,R_rAAB:a.FileReader?d(a.FileReader.prototype.readAsArrayBuffer):void 0,S_fCC:a.String.fromCharCode,S_m:d(a.String.prototype.match),S_su:d(a.String.prototype.substr),S_se:d(a.String.prototype.search),S_sp:d(a.String.prototype.split),S_r:d(a.String.prototype.replace),S_cCA:d(a.String.prototype.charCodeAt),S_tLC:d(a.String.prototype.toLowerCase),S_tUC:d(a.String.prototype.toUpperCase),D_pFS:d(a.DOMParser.prototype.parseFromString),X_o:d(a.XMLHttpRequest.prototype.open),
X_sRH:d(a.XMLHttpRequest.prototype.setRequestHeader),X_oMT:d(a.XMLHttpRequest.prototype.overrideMimeType),X_gARH:d(a.XMLHttpRequest.prototype.getAllResponseHeaders),X_gRH:d(a.XMLHttpRequest.prototype.getResponseHeader),X_s:d(a.XMLHttpRequest.prototype.send),X_a:d(a.XMLHttpRequest.prototype.abort),D_n:a.Date.now};Object.keys(fa).forEach(function(a){c.Context[a]=fa[a]});"String Array Object Number parseInt JSON Math Date Event MutationEvent console location Error Uint8Array Blob FileReader DOMParser XMLHttpRequest Function RegExp frames self top document location Promise".split(" ").forEach(function(b){y[b]=
a[b]});"postMessage addEventListener removeEventListener setTimeout setInterval clearTimeout clearInterval alert prompt confirm encodeURIComponent decodeURIComponent encodeURI decodeURI escape unescape atob btoa close".split(" ").forEach(function(b){var c=a[b];y[b]=function(){return g(c,a,arguments)}});c.createSafeDocument=function(a){"getElementById createEvent createElement dispatchEvent addEventListener removeEventListener".split(" ").forEach(function(b){var d=a[b];c.safeDocument[b]=function(){return g(d,
a,arguments)}})};c.createSafeDocument(v)})();try{c.Message=function(a,b){var c=function(){return g(b.dispatchEvent,b,arguments)},u=function(){return g(b.addEventListener,b,arguments)},q=function(){return g(b.removeEventListener,b,arguments)},y=function(a,c){var d=b.createEvent("MutationEvent");d.initMutationEvent(a,!1,!1,null,null,null,H(c),d.ADDITION);return d},x=function(a,b){var c;a&&(c=I[a])&&(c(b),delete I[a])},Q,v,z,G,r=1,I={},R=function(a){var b=t(a.attrName);"message.response"==b.m?x(b.r,
b.a):Q&&Q(b,b.r?function(a){a=y(z,{m:"message.response",a:a,r:b.r});c(a)}:function(){})};return{init:function(a){G||(G=a);z="2C_"+G;v="2P_"+G;u(v,R,!1)},send:function(a,b,d){if(d){var e=++r;I[r]=d;d=e}else d=null;a=y(z,{m:a,a:b,r:d});c(a)},onMessage:{setListener:function(a){Q=a}},cleanup:function(){R&&q(v,R,!1);R=null}}}(y,c.safeDocument),c.Message.init(q),c.Message.onMessage.setListener(function(d){if(c)if("load"==d.m)c.Context.pageLoaded=!0;else if("DOMContentLoaded"==d.m)c.Context.domContentLoaded=
!0;else if("cleanup"==d.m)c.Message.cleanup(),c=null;else if("next"==d.m)if(d.a.id)c.exec_script(d.a.id,c),c.exec_eval=!1;else{if(void 0===c.exec_eval)try{c.exec_eval=b(c.eval,a)("true")}catch(e){c.exec_eval=!1}c.exec_eval?c.exec_fn(d.a.src,c):c.exec_csp(d.a.src,c)}})}catch(d){}},next:function(a,v,q,P,c,g,b,x,H,t,G,z,B,u,ba){var y="";x&&(y+="var V = true;\n");t&&(y+="var EV = true;\n");H&&(y+="var ENV = true;\n");t="";if(B||"complete"==document.readyState)t+="Context.pageLoaded |= true;\nContext.domContentLoaded |= true;\n";
else if(u||"interactive"==document.readyState)t+="Context.domContentLoaded |= true;\n";return['var backup = this;\n(function TM_back() {var Context = backup.Context;\nvar copy = function(src) {"use strict";var props = Context.O_gOPN(src);for (var kk, ii=0; (kk=props[ii]) !== undefined; ii++) {Context[kk] = src[kk];};};copy(backup);with (Context) {(function() {"use strict";copy({Context: Context,V:',x?"true":"false",",ENV:",H?"true":"false",",TS:",G?"true":"false",",D:",z?"true":"false",",use:",g,",windowProps:",
P,",scripts:",v,",powers:",q,",_content: false,flags:",c,',write_listeners: []});var cleanup = function(evt) {Message.cleanup();safeWindow.removeEventListener("unload", cleanup, false);};safeWindow.addEventListener("unload", cleanup, false);Context.write_listeners.push(function(d) {Context.createSafeDocument(d);Message.init();});',y+("var logLevel = "+b+";\n")+('var contextId = "'+a+'";\n')+"var Event = function() {};var Window = function() {};Window.prototype = {};"+t+"("+ba+")(Context, contextId);\n",
"})();};})()"].join("")},environment:function(a,v){var q=a.V,P=a.EV,c=a.D,g=a.Message,b=a.safeWindow,x=window,H=a.safeDocument,t=a.flags,G=a.i_N,z=a.i_SS,B=a.i_SG,u=a.F_a,ba=a.F_c,y=a.F_b,d=a.F_tS,e=a.A_fE,fa=a.A_sl,T=a.A_sp,F=a.A_pu,ga=a.A_po,qa=a.A_sh,Q=a.A_j,ka=a.A_f,la=a.A_iO,Da=a.A_c,r=a.O_k,I=a.O_dP,R=a.O_dPy,Aa=a.O_gOPN,Ba=a.O_gOPD,Ca=a.O_gOPDs,Ea=a.O_tS,ra=a.J_p,oa=a.J_s,w=a.c_l,Fa=a.c_i,U=a.c_w,ha=a.c_e,S=a.c_d,Ga=a.M_f,sa=a.M_r,ta=a.M_m,Ha=a.P_r,Ia=a.P_t,Ja=a.P_c,V=a.S_fCC,ma=a.S_m,ua=a.S_su,
va=a.S_sp,W=a.S_r,ia=a.S_se,wa=a.S_cCA,xa=a.S_tLC,Ka=a.S_tUC,La=a.R_rAAB,ya=a.D_pFS,Ma=a.X_o,Na=a.X_sRH,Oa=a.X_oMT,Pa=a.X_gARH,Qa=a.X_gRH,Ra=a.X_s,Sa=a.X_a,Ta=a.N_tS,na=a.D_n;a.domContentLoaded|=0;a.pageLoaded|=0;a.domNodeInserted|=0;a.props={};var ca=function(){var d=[],za=function(a){if(document.body)a&&(a(),a=null);else{var b=["load","DOMNodeInserted","DOMContentLoaded"],c=function(){e(b,function(a){H.removeEventListener(a,c,!1)});za(a)};e(b,function(a){H.addEventListener(a,c,!1)})}},Ua=function(c){F(d,
function(){b.setTimeout(c,1)});a.domContentLoaded&&m.runListeners()},m={runListeners:function(){for(var a;a=qa(d);)a()},run:function(b){var e=function(){Va.create(b)};"document-start"==b.script.options.run_at?(c&&S('env: run "'+b.script.name+'" ASAP -> document-start'),e()):"document-body"==b.script.options.run_at?(c&&S('env: schedule "'+b.script.name+'" for document-body'),za(e)):"context-menu"==b.script.options.run_at?(c&&S('env: run "'+b.script.name+'" ASAP -> context-menu'),e()):"document-end"==
b.script.options.run_at?(c&&S('env: schedule "'+b.script.name+'" for document-end'),F(d,e),a.domContentLoaded&&m.runListeners()):(c&&S('env: schedule "'+b.script.name+'" for document-idle'),Ua(e))}};return m}();(q||c)&&S("env: initialized (content, id:"+ua(v,0,10)+"..., "+b.location.origin+b.location.pathname+") ");var Y={createUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*sa()|0;return Ta("x"==a?b:b&3|8,16)})},toType:function(a){return ma(Ea(a,
{}),new b.RegExp("\\s([a-z|A-Z]+)"))[1]}},K={UTF8:{encode:function(a){return b.unescape(b.encodeURIComponent(a))},decode:function(a){return b.decodeURIComponent(b.escape(a))}},Base64:{encode:function(a){for(var c="",d=0;d<a.length;d++)c+=V(wa(a,d)&255);return b.btoa(c)},decode:function(a){return b.atob(a)}},str2arrbuf:function(a){for(var c=new b.Uint8Array(a.length),d=0;d<a.length;d++)c[d]=wa(a,d);return c.buffer},arrbuf2str:function(a){var c="";a=new b.Uint8Array(a);for(var d=0;d<a.length;d+=32687)c+=
u(V,null,a.subarray(d,d+32687));return c}},C=function(){var a={},b,d=function(b){var c=[],d=[],k=function(){u=d=c=null;delete a[b]},u={postMessage:function(a){g.send("port.message",{response_id:b,value:a})},onMessage:{addListener:function(a){F(c,a)}},onDisconnect:{addListener:function(a){F(d,a)}},disconnect:function(){g.send("port.message",{response_id:b,disconnect:!0});k()}};a[b]={message:function(a){c&&e(c,function(b){b(a)})},disconnect:function(a){d&&e(d,function(b){b(a)});k()}};return u};return{message:function(m){var e;
m.connect?b&&b(m.destination,d(m.response_id)):(e=a[m.response_id])?m.disconnect?e.disconnect():e.message(m.value):c&&U("ports: unkown id",m.response_id,m)},connect:function(a){var b=Y.createUUID();g.send("port.message",{response_id:b,connect:!0,destination:a});return d(b)},onConnect:{addListener:function(a){b=a}}}}(),pa=function(){var a={objs:{},push:function(b,c){0!==c&&1!==c&&(c=0);var d=Ga(19831206*sa()+1);a.objs[d]={fn:b,prio:c};return d},remove:function(b){delete a.objs[b]},get:function(b){for(var c=
[],d=0;1>=d;d++)e(r(a.objs),function(e){a.objs[e].prio!==d||void 0!==b&&e!=b||F(c,a.objs[e].fn)});return void 0===b?c:c[0]},finalize:function(b){if(void 0===b){b=a.get();for(var c=0;c<b.length;c++)b[c]()}else return a.objs[b]&&(c=a.objs[b].fn(),delete a.objs[b]),c}};return a}(),k=t.statistics?function(a,c){b.setTimeout(function(){g.send("api",{name:a,type:c},null)},1)}:function(){},aa=function(){var a=function(a,b){k("GM_openInTab");var d=null,e=!1,g=null,u,r=function(){var a=[];return{run:function(b){b&&
F(a,b);if(d)for(;a.length;)ga(a)()}}}(),q=C.connect("openInTab");q.onMessage.addListener(function(a){a.tabId?e?q&&q.postMessage({close:!0}):(d=a.tabId,r.run()):a.name?u=a.name:a.closed&&(e=!0,g&&(g(),g=void 0))});q.onDisconnect.addListener(function(){q=null});q.postMessage({method:"openTab",url:a,options:b});var t={};I(t,{close:{value:function(){k("GM_openInTab.close");e?c&&S("env: attempt to close already closed tab!"):(e=!0,q&&q.postMessage({close:!0}))}},closed:{get:function(){k("GM_openInTab.closed");
return e}},onclose:{get:function(){return g},set:function(a){k("GM_openInTab.onclose=");g=a}},name:{get:function(){return u},set:function(a){r.run(function(){k("GM_openInTab.name=");q&&q.postMessage({name:a})})}}});return t},y=function(a,c){k("GM_download");var d="Object"===Y.toType(a)?a:{url:a,name:c},e=function(a,c){c=c||{};a&&b.setTimeout(function(){u(a,c,[c])},1)},g=C.connect("download");g.onMessage.addListener(function(a){try{a.load?d.onload&&e(d.onload,a.data):a.progress?d.onprogress&&e(d.onprogress,
a.data):a.timeout?d.ontimeout&&e(d.ontimeout,a.data):d.onerror&&e(d.onerror,a.data)}catch(b){w("env: Error: TM_download - ",b,d)}});g.onDisconnect.addListener(function(){g=null});g.postMessage({details:d});return{abort:function(){if(g)return g.postMessage({cancel:!0}),g.disconnect(),g=null,!0}}},x={};return{log:function(){k("GM_log");u(w,this,arguments)},addStyle:function(a,b){k("GM_addStyle");var c=Y.createUUID();g.send("addStyle",{css:a,id:c},b?function(){b()}:null);return H.getElementById(c)},
closeTab:function(a){k("window.close");g.send("closeTab",null,a?function(){a()}:null)},focusTab:function(a){k("window.focus");g.send("focusTab",null,a?function(){a()}:null)},setClipboard:function(a,b,c){k("GM_setClipboard");g.send("setClipboard",{content:a,info:b,id:v},c?function(){c()}:null)},syntaxCheck:function(a,b){g.send("syntaxCheck",{code:a},function(a){b(a)})},of:function(m){var D=m.script,z=function(){var a=[],d=m.storage,p=0,f=function(a,c){if("string"===typeof a){var d=a[0];a=ua(a,1);switch(d){case "b":return"true"===
a;case "n":return b.Number(a);case "x":return K.UTF8.decode(K.Base64.decode(a));case "o":try{return ra(a)}catch(N){w("values: parseValueFromStorage: "+N)}return c;default:return a}}else return c},n=function(b,d,n,p){d!=n&&e(a,function(a){if(a&&a.key==b&&a.cb)try{a.cb(b,f(d),f(n),p)}catch(N){c&&U('values: change listener of "'+b+'" failed with: '+N.message)}})},J=function(a){h.postMessage({method:"saveStorageKey",uuid:D.uuid,key:a,value:d.data[a],id:v,ts:d.ts})},h=C.connect("values");h.onMessage.addListener(function(a){a.storage&&
e(r(a.storage.data),function(b){var c=d.data[b];d.data[b]=a.storage.data[b];var N=d.data[b];q&&w("values: message - config key "+b+": "+c+" -> "+N);n(b,c,N,!0)});a.removed&&(d[a.removed]=void 0)});h.onDisconnect.addListener(function(){c&&w("values: port disconnected")});h.postMessage({method:"addStorageListener",uuid:D.uuid,id:v});return{set:function(a,b){k("GM_setValue");var c=d.data[a];d.ts=na();var N=d.data,p;a:{p=b;var f=(typeof p)[0];switch(f){case "o":try{p=f+oa(p)}catch(E){w(E);p=void 0;break a}break;
case "s":var M=V(8232),A=V(8233);if(-1!==ia(p,M)||-1!==ia(p,A))f="x",p=K.Base64.encode(K.UTF8.encode(p));p=f+p;break;default:p=f+p}}N[a]=p;J(a);n(a,c,d.data[a],!1)},get:function(a,b){k("GM_getValue");return f(d.data[a],b)},remove:function(a){k("GM_deleteValue");var b=d.data[a];d.ts=na();delete d.data[a];J(a);n(a,b,d.data[a],!1)},list:function(){k("GM_listValues");return r(d.data)},registerChangeListener:function(b,c){k("GM_addValueChangeListener");var d=++p;F(a,{id:d,key:b,cb:c});return d},unregisterChangeListener:function(b){k("GM_removeValueChangeListener");
a=ka(a,function(a){return a.id!==b?!0:!1})}}}(),G=function(){return{getText:function(a){k("GM_getResourceText");for(var b=0;b<D.resources.length;b++){var c=D.resources[b];if(c.name==a&&!c.failed){try{if(null!==c.content)return K.UTF8.decode(c.content)}catch(d){}return""}}return null},getURL:function(a){k("GM_getResourceURL");for(var b=0;b<D.resources.length;b++){var c=D.resources[b];if(c.name==a&&!c.failed){if(null===c.content)return"";try{return"data:"+(c.meta||"application")+";base64,"+K.Base64.encode(c.content)}catch(d){}return c.url}}return null}}}(),
I=function(){return{set:function(a,b){k("GM_setTab");g.send("tabsSet",{uuid:D.uuid,tab:a},b?function(){b()}:null)},get:function(a){k("GM_getTab");g.send("tabsGet",{uuid:D.uuid},a?function(b){a(b||{})}:null)},getAll:function(a){k("GM_getTabs");g.send("tabsGetAll",{uuid:D.uuid},a?function(b){a(b||{})}:null)}}}(),H=function(a){k("GM_xmlhttpRequest");var c=!1,d=a.context;delete a.context;var f=function(){var a={};e(r(b.XMLHttpRequest.__proto__),function(b){a[b]=!0});var c=function(){};e(r(b.XMLHttpRequest),
function(d){a[d]||(c[d]=b.XMLHttpRequest[d])});return c}(),n=function(){c=!0},J=function(a,d){d=d||{};a&&!c&&b.setTimeout(function(){d.__proto__=f;u(a,d,[d])},1)};"object"===typeof a.url&&a.url.href&&(a.url=a.url.href);var h=function(a,c){var d=new b.FileReader;d.onload=function(){c(K.arrbuf2str(d.result))};La(d,a)},l=function(a,c){var d,n,f,A=Y.toType(a);if("Blob"===A||"File"===A)h(a,function(b){c({type:A,value:b,meta:a.type,name:a.name,lastModified:a.lastModified})});else if("FormData"===A)if(n=
a.keys&&a.getAll?a.keys():null){var E,O={};for(d=[];!(E=n.next()).done;)F(d,E.value);f=function(){if(d.length){var b=ga(d),A=a.getAll(b);-1===ia(b,/\[\]$/)&&(A=A[0]);l(A,function(a){O[b]=a;f()})}else c({type:"FormData",value:O})};f()}else c({error:A});else if(!(A=Y.toType(a))||"Array"!==A&&"Object"!==A)c({value:a});else{var p,N,e=0;n=0;"Object"===A?(d=r(a),N=function(a){return a<d.length?d[a]:null},p={}):(N=function(b){return b<a.length?b:null},p=[]);f=function(){var d=N(e);null===d?c({type:A,value:p}):
l(a[d],function(a){a.error?c(a):(p[d]=a,e++,1024>n++?f():(n=0,b.setTimeout(f,1)))})};f()}},L=!0;(function(b){if(a.url){var c=a.url.substr(0,5);if(-1!=["data:","blob:"].indexOf(c))return L=!1,b()}if(!a.data)return b();l(a.data,function(c){c.error?(L=!1,U("GM_xmlhttpRequest:","unable to handle data type "+c.error+". Going to use default xhr as fallback.")):(a.binary&&(c.type="Blob"),a.data=c,a.data_type="typified");b()})})(function(){if(!c)if(L){var f=C.connect("xhr"),l=[];a.headers&&e(r(a.headers),
function(b){"cookie"===xa(b)&&(a.cookie=a.headers[b],delete a.headers[b])});f.postMessage({method:"xhr",details:a,callbacks:{onloadstart:!!a.onloadstart,onload:!!a.onload,onreadystatechange:!!a.onreadystatechange,onerror:!0,ontimeout:!!a.ontimeout,onprogress:!!a.onprogress,onpartial:!0},id:v,url:b.location.href,uuid:D.uuid});f.onMessage.addListener(function(c){c.data&&d&&(c.data.context=d);if(c.data&&c.onload){l.length&&(c.data.response_data=Q(l,""),l=null);if(c.data.response_data){var f=c.data.response_data;
e(["response_data"],function(a){delete c.data[a]});var A={response:function(c){k("GM_xmlhttpRequest.response["+(a.responseType||"unknown")+"]");var d=a.responseType?xa(a.responseType):"";if("arraybuffer"==d)c=K.str2arrbuf(c);else if("blob"==d)c=new b.Blob([K.str2arrbuf(c)]);else if("json"==d)c=ra(c);else if("document"==d)return d=new b.DOMParser,ya(d,c,"text/html");return c},responseText:function(a){k("GM_xmlhttpRequest.responseText");return a},responseXML:function(a){k("GM_xmlhttpRequest.responseXML");
var c=new b.DOMParser;return ya(c,a,"text/xml")}};e(r(A),function(a){R(c.data,a,{get:function(){try{return A[a](f)}catch(b){U("GM_xmlhttpRequest:",b)}}})})}J(a.onreadystatechange,c.data);J(a.onload,c.data)}else if(c.onreadystatechange)4!=c.data.readyState&&J(a.onreadystatechange,c.data);else if(c.onpartial)F(l,c.data.partial);else if(c.onerror)c.exception&&ha(c.exception),J(a.onerror,c.data);else{var n=ka(["onloadstart","onprogress","ontimeout"],function(a){return!!c[a]})[0]||"onerror";J(a[n],c.data)}});
q&&f.onDisconnect.addListener(function(){w("env: GM_xmlhttpRequest.onDisconnect! :)")});n=function(){k("GM_xmlhttpRequest.abort");f&&f.disconnect();f=null;c=!0}}else{var h=new b.XMLHttpRequest;void 0===a.async&&(a.async=!0);Ma(h,a.method,a.url,a.async,a.user,a.password);a.headers&&e(r(a.headers),function(b){Na(h,b,a.headers[b])});a.overrideMimeType&&Oa(h,a.overrideMimeType);a.responseType&&(h.responseType=a.responseType);e("abort error load loadstart progress readystatechange timeout".split(" "),
function(b){h["on"+b]=function(){var c="",A=a.url;if(2<h.readyState&&(c=Pa(h),4==h.readyState)){c&&(c=W(c,/TM-finalURL[0-9a-zA-Z]*\: .*[\r\n]{1,2}/,""));var f;try{f=Qa(h,"TM-finalURL"+t.short_id)}catch(n){}f&&(A=f)}c={readyState:h.readyState,status:"",statusText:"",responseHeaders:c,finalUrl:A,context:d};4==h.readyState&&(h.responseType?c.response=h.response:(c.responseText=h.responseText,c.responseXML=h.responseXML),c.status=h.status,c.statusText=h.statusText);J(a["on"+b],c)}});Ra(h,a.data);n=function(){k("GM_xmlhttpRequest.abort");
Sa(h);c=!0}}});return{abort:function(){n()}}},S=function(a){var b={};e(r(a),function(c){b[c]=a[c]});b.id=v;k("GM_notification");b.text||b.highlight?g.send("notification",b,function(a){if(b.onclick&&a.clicked)b.onclick();if(b.ondone)b.ondone(!0===a.clicked)}):U("GM_notification: neither a message text nor hightlight options were given!")},P,T=function(){if(P)return P;var a=m.script,b={observers:1,id:1,enabled:1,hash:1,fileURL:1},c={script:{}};e(r(a),function(d){b[d]||(c.script[d]=a[d])});var d=a.options.updateURL||
a.options.fileURL;c.script["run-at"]=a.options.override.run_at||a.options.run_at;c.script.excludes=a.options.override.orig_excludes;c.script.includes=a.options.override.orig_includes;c.script.matches=a.options.override.orig_matches;c.script.grant=a.grant;c.script.unwrap=!1;c.scriptMetaStr=m.header;c.scriptSource=m.code;c.scriptWillUpdate=!!d;c.scriptUpdateURL=d;c.version=t.version;c.scriptHandler="Tampermonkey";c.isIncognito=t.inIncognitoContext;c.downloadMode=t.downloadMode;return P=c},B,L=function(a,
b){k("GM_webRequest");var c=function(){B==d&&(B=null);d=null};B&&B.disconnect();var d=B=C.connect("webRequest");b&&d.onMessage.addListener(function(a){b(a.type,a.message||"ok",a.details)});d.onDisconnect.addListener(c);d.postMessage({rules:a,uuid:D.uuid});return{abort:function(){k("GM_webRequest.abort");d&&d.disconnect();c()}}},J=function(){var a=0,c={},e={register:function(f,n,J){k("GM_registerMenuCommand");var h=C.connect("registerMenuCommand");h.onMessage.addListener(function(a){"run"===a&&b.setTimeout(n,
1)});h.onDisconnect.addListener(function(){e.unregister(l)});h.postMessage({method:"register",name:f,uuid:D.uuid,accessKey:J});q&&w("env: registerMenuCommand "+d(n));var l=++a;c[l]=h.disconnect;return l},unregister:function(a){k("GM_unregisterMenuCommand");q&&w("env: unregisterMenuCommand "+a);var b;if(b=c[a])b(),delete c[a]}};return e}();x[m.script.uuid]=x[m.script.uuid]||{getInfo:T,registerMenuCommand:J.register,unregisterMenuCommand:J.unregister,download:y,webRequest:L,openInTab:a,setValue:z.set,
getValue:z.get,deleteValue:z.remove,listValues:z.list,addValueChangeListener:z.registerChangeListener,removeValueChangeListener:z.unregisterChangeListener,getResourceText:G.getText,getResourceURL:G.getURL,notification:S,xmlhttpRequest:H,setTab:I.set,getTab:I.get,getTabs:I.getAll};return x[m.script.uuid]}}}(),Va=function(){var X=function(a,b,c){var d=Ca(b);e(r(d),function(c){var f=d[c];if(!f||!f.get||G(f.get)||t.sandbox_allow_getters)"function"===typeof b[c]?a[c]=y(b[c],b):function(){R(a,c,{get:function(){"use strict";
return b[c]}})}()});e(r(c),function(b){a[b]=c[b]});return a},v=function(a,c,d,g){var p={attrChange:0,attrName:null,bubbles:!0,cancelBubble:!1,cancelable:!1,clipboardData:void 0,currentTarget:null,defaultPrevented:!1,eventPhase:0,newValue:null,prevValue:null,relatedNode:null,returnValue:!0,srcElement:null,target:null,timeStamp:na()};d="string"===typeof d?new b.Function(d):d;var f=new Event;e(r(p),function(a){f[a]=p[a]});e(r(c),function(a){f[a]=c[a]});f.type=a;u(d,g,[f])},H=function(a,b,c,d){void 0===
d&&(d=function(a,b){return b});e(Da(["GM_info","GM.info"],b),function(b){var f,n=c[b];n&&(f=d(b,n))&&(a[b]=f)})},m=function(a,b){void 0===b&&(b=100);return b&&a&&(a==document||m(a.parentNode,b-1))},D=function(){var b=null;return function(c){b||(b={instance:c,is_open:!1},e(["write","writeln","open","close"],function(d){b[d]=c[d];c[d]=function(){var k=!1;-1!=la(["write","writeln","open"],d)?b.is_open?k=!0:b.is_open=!0:"close"===d&&(b.is_open=!1);!k&&b.is_open&&g.send("document.write");var p=document.documentElement,
f=u(b[d],c,arguments);if(!k&&b.is_open)return p!==document.documentElement&&(b.instance!==c&&(b=null,D(document)),e(a.write_listeners,function(a){a(document)})),f}}))}}(),K={},C=[],V=function(e,g,k){if(!e.__addEventListener){I(e,{__addEventListener:{value:e.addEventListener,enumerable:!1,configurable:!1},__removeEventListener:{value:e.removeEventListener,enumerable:!1,configurable:!1}});var r=[],p=function(a){for(var b=0;b<r.length;b++)if(r[b].fn===a)return b};e.removeEventListener=function(a,b,c){c=
!!c;var d,f,e;if(void 0!==(d=p(b))&&(f=r[d].listeners)){if(e=f[a+"-"+c])this.__removeEventListener(a,e,c),delete f[a+"-"+c];Aa(f).length||T(r,d,1)}else return u(this.__removeEventListener,this,arguments)};var f=function(a,c,d,f){if(c){var e=C.length;c=b.parseInt(Q(["DOMContentLoaded"==d?1:2,f?1:2,f?c:3-c,na()],"0"));for(d=0;d<C.length;d++)if(f=C[d],!f||!f.prio||f.prio>c){e=d;break}T(C,e,0,{prio:c,fn:a})}else F(C,{fn:a})};e.addEventListener=function(e,ea,h){(q||P)&&w("env: addEventListener "+e);if(ea&&
(1==g&&"load"==e||"DOMContentLoaded"==e||"DOMNodeInserted"==e)){h=!!h;var l,m=!0,L=this;try{try{throw new b.Error;}catch(O){var t=/tms_[0-9a-f_]+/,da=O.stack||O.stacktrace;if(da)for(var x=va(da,"\n"),M,da=0;da<x.length&&(!(M=ma(x[da],t))||!(l=K[M[0]]));da++);else{var A=function(a,e){void 0===e&&(e=10);if(0===e)return null;if(a.caller){var f,E;try{return E=d(a.caller),ma(E,new b.RegExp("^function[^(]+"))&&(void 0).length&&(f=ma((void 0)[0],t))?f[0]:A(a.caller,e-1)}catch(l){c&&U("env: unable to detect caller context",
l)}}return null},E;if(E=A(arguments.callee))l=K[E]}}}catch(O){c&&ha("env: Error: event "+e,O)}l&&"document-idle"!==l.run_at&&(l=null,"load"==e?a.pageLoaded&&(l=function(){var a=ea,c=L,d=L.document||L;(q||P)&&w("env: postLoadEvent!");d=d||document;v("load",{attrName:"null",newValue:"null",prevValue:"null",eventPhase:b.Event.AT_TARGET,attrChange:b.MutationEvent.ADDITION,target:d,relatedNode:d,srcElement:d},a,c)},m=!1,f(l,g,e,h)):"DOMContentLoaded"==e&&a.domContentLoaded&&(l=function(){var a=ea,c=L,
d=L.document||L;(q||P)&&w("env: postDomEventListener!");d=d||document;v("DOMContentLoaded",{attrName:"null",newValue:"null",prevValue:"null",eventPhase:b.Event.AT_TARGET,attrChange:b.MutationEvent.ADDITION,target:d,relatedNode:d,srcElement:d},a,c)},m=!1,f(l,g,e,h)),l&&(b.setTimeout(function(){if(C.length){var a=qa(C);a&&a.fn&&a.fn()}},1),m=!1));m&&(l=function(a){return ja(ba,[ea,this,k(a)],0,!0,L)},void 0===(m=p(ea))&&(m=r.length,F(r,{fn:ea,listeners:{}})),r[m].listeners[e+"-"+h]=l,this.__addEventListener(e,
l,h))}else return u(this.__addEventListener,this,arguments)};F(pa,function(){e.removeEventListener=e.__removeEventListener;e.addEventListener=e.__addEventListener})}},ca=function(a){a.__evaluate||(I(a,{__evaluate:{value:a.evaluate,enumerable:!1,configurable:!1}}),a.evaluate=function(a,b,c,d,e){q&&w("env: document.evaluate "+a);b||(b=this);var n;if("undefined"!=typeof XPathResult){var g=a,h=null;try{n=this.__evaluate(g,b,c,d,e)}catch(k){h=k}var l=!1;try{l|=!!n.snapshotLength}catch(k){}try{l|=!!n.singleNodeValue}catch(k){}if(l||
"."==a[0]||m(b))q&&w("env: queried document for "+g);else{q&&w("env: query added elem for "+g);g=("/"==a[0]?".":"./")+a;try{n=this.__evaluate(g,b,c,d,e)}catch(k){}}q&&w("env: query returned ",n,h);if(!l&&h)throw h;}else q&&w("env: XPathResult == undefined, but selectNodes via ",a),n=b.selectNodes(a);return n},F(pa,function(){a.evaluate=a.__evaluate}))},ja=function(a,c,d,e,g){var f=c[d],n=typeof f;e&&"string"===n?c[d]=new b.Function(f):g&&"function"===n&&(c[d]=function(){return u(f,g,arguments)});
return u(a,x,c)},ia=function(c,d){var g=["eval"],k={};e(r(c),function(a){c[a].context_prop&&(k[(a.split(".")||[])[1]]=!0)});var p=function(a,c,d,h){var l=function(b){return b===c?a:b},p=function(a,b,c,d){c||(c=a);var e=a[b];a=function(){"use strict";var a=u(e,c,arguments);d&&(a=d(a));return a};a.__proto__=e;a.prototype=e.prototype;return a},m=function(c){var d,e=c.substr(2),l;R(a,c,{get:function(){return d},set:function(c){"use strict";(d=c)&&!l?(l=function(){if("function"===typeof d)return u(d,a,arguments)},
b.addEventListener(e,l,!0)):!d&&l&&(b.removeEventListener(e,l,!0),l=null)}})},q=function(b,d,e,h){var g,k={};k.get="function"===typeof d?d:function(){"use strict";h&&h.get_cb&&u(h.get_cb,this,[arguments,q]);return void 0===g?l(c[b]):g};"function"===typeof e?k.set=e:d||(k.set=function(a){g=a});R(a,b,k)};e(r(h),function(a){d[a]=d[a]||!1!==h[a]});var J=t.sandbox_allow_getters,L=t.detect_constructors_by_keys;e(r(d),function(b){var e,E,O,t,w,z,Z,D,F,v,X,C,I,H;try{var B;(B=Ba(c,b))&&B.get&&(w=!G(B.get));try{if(!(E=
h[b])||E.needs_grant&&!0!==k[b])if((e=d[b])&&e.event)I=!0;else if(B&&B.get)if(w)if(J)Z=!0;else return;else Z=function(){"use strict";return l(u(B.get,x))};else"function"===(t=typeof(O=c[b]))?e.proto?z=!0:(B.enumerable||!(L&&r(O).length||!G(O)))&&-1==la(g,b)&&"bind"in O?X=!0:v=!0:"number"===t||"string"===t?Z=!0:v=!0;else if(E.wrap)z=!0,C=E.that;else if(E.direct)v=!0;else if(E.enhance)H=E.enhance;else if(E.get||E.set)Z=E.get,D=E.set,F=E.opts}catch(K){Z=D=!0}if(H)a[b]=H;else if(!w||J)I?m(b):Z||D?q(b,Z,
D,F):z?a[b]=p(c,b,C,l):v?a[b]=l(c[b]):X&&(a[b]=y(c[b],c))}catch(K){U("env: error while creating a new sandbox["+b+"]: "+K.message)}});return a};return function(){var c=new Window,g={setTimeout:{enhance:function(){"use strict";return ja(b.setTimeout,arguments,0,!0,c)}},setInterval:{enhance:function(){"use strict";return ja(b.setInterval,arguments,0,!0,c)}},close:{needs_grant:!0,get:function(){"use strict";return b.self==b.top?function(a){return aa.closeTab(a)}:b.close}},focus:{needs_grant:!0,get:function(){return function(a){"use strict";
return aa.focusTab(a)}}},location:{get:!0,set:function(a){"use strict";b.location.href=a}},name:{get:function(){"use strict";return B(x,"name")},set:function(a){"use strict";z(x,"name",a)}},document:{get:function(){"use strict";var a=b.document;d(a);return a}},clearInterval:{get:function(){"use strict";return b.clearInterval}},clearTimeout:{get:function(){"use strict";return b.clearTimeout}},addEventListener:{enhance:function(){"use strict";return ja(b.addEventListener,arguments,1,!0)}},removeEventListener:{enhance:function(){"use strict";
return ja(b.removeEventListener,arguments,1,!0)}}};(function(){var a=ta(b.frames.length,7);g.length={get:!0,opts:{get_cb:function(c,d){"use strict";for(var e=b.frames.length,f=a;f<e;f++)d(b.String(f),{get:!0});a=ta(e,a)}}};for(var c=0;c<a;c++)g[b.String(c)]={get:!0}})();e(r(b),function(a){b[a]!=x&&(g[a]=g[a]||{enhance:b[a]})});var k=p(c,x,a.windowProps,g),h={context:k,filter:function(a){"use strict";return a==x?k:a},filterEvent:function(a){var b={},c;for(c in a)if("function"===typeof a[c])b[c]=function(){var b=
c;return function(){return u(a[b],a,arguments)}}();else{var d=h.filter(a[c]);b[c]=d}return b}};return h}()},ga=function(){return X({},b.console,{debug:S,log:w,info:Fa,warn:U,error:ha})},ka=function(d,g,k,m,p,f,n){var q=null,h=function(){return"[Tampermonkey property]"};try{var l=m.sandboxes[d.uuid],w=["context","fapply"],x=[void 0,void 0],D=m.elements[d.uuid];e(r(D),function(a){var b=D[a];b.overwrite?(F(w,a),F(x,b.value)):b.context_prop||(F(w,a),F(x,"context."+a),b.getter?R(l,a,{get:b.getter}):l[a]=
b.value);b.protect&&l[a]&&z(l[a],"toString",h)});var v,q=Q(["(function(context, fapply, console) {","with (context) {","(function(module) {",'"use strict";',"try {\n",t.measure_scripts?'console.time("'+(v="SCRIPT RUN TIME["+d.name.replace(/\W+/g," ")+"]")+'");\n':"","fapply(module, context, [",Q(x,","),"]);",t.measure_scripts?'console.timeEnd("'+v+'");\n':"","} catch (e) {","if (e.message && e.stack) {","console.error(\"ERROR: Execution of script '",W(d.name,new b.RegExp("[\"']","g"),"\\$1"),"' failed! \" + e.message);",
'console.log(e.stack.replace(/(\\\\(eval at )?<anonymous>[: ]?)|([\\s.]*at Object.tms_[\\s\\S.]*)/g, ""));',"} else {","console.error(e);","}","}\n","})","(function ",f,"(",Q(w,","),") {",t.enforce_strict_mode?'"use strict";\n':"",k,g,"\n","})","}","})(this.context, this.fapply, this.console);\n",n?"//# sourceURL="+n+"\n":""],""),y={context:l,fapply:u,console:ga()};p?p(q,y):a.E_c(q,y)}catch(M){aa.syntaxCheck(Q([k,g],""),function(a){var f="";if(a.errors){var h=va(k,"\n").length-1,l="";a.errors&&e(r(a.errors),
function(b){if((b=a.errors[b])&&0<=b.line&&b.reason){var c=b.line;l+=Q([c>h?"script:":"require:"," (",b.code,") ",W(b.reason,/.$/,"")," on line: ",c>h?c-h:c," at character: ",b.character,"\n"],"")}});f="JSHINT output:\n"+l}else f=g;var n=M.stack?W(M.stack,/(\\(eval at )?<anonymous>[: ]?)|([\s.]*at Object.tms_[\s\S.]*)/g,""):"";c||a.errors?ha('Syntax error @ "'+d.name+'"!\n##########################\n'+f+"##########################\n\n"+n):ha('Syntax error @ "'+d.name+'"!\n\n',n);b.setTimeout(function(){throw M;
},1)})}};return{create:function(d){var g=d.script,m={},t=-1!==la(g.grant,"none")?function(b,c){a.E_u(b,c)}:null,p=g.namespace+"_"+!!t;void 0===a.props[p]&&(a.props[p]={sandboxes:{},elements:{}},F(pa,function(){a.props[p]=null}));m.CDATA={value:function(a){k("CDATA");this.src=a;this.toXMLString=this.toString=function(){return this.src}}};m.uneval={value:function(a){k("window.uneval");try{return"\\$1 = "+oa(a)+";"}catch(b){w(b)}}};m.define={value:void 0};m.module={value:void 0};m.exports={value:void 0};
var f={},n={},v={},h=aa.of(d);k(g.options.run_at||"<default>","run_at");if(t)k("none","grant");else{k("sandbox","grant");m.window={value:"context",overwrite:!0};var l={window:x};e(r(l),function(a){var b="unsafe"+W(a,/^(.)/g,function(a){return Ka(a)});m[b]={value:l[a]};-1!=la(g.grant,b)&&k(b,"grant")});m.console={value:ga()};m.cloneInto={value:function(a){k("compat.cloneInto");return a}};m.exportFunction={value:function(a,b,c){k("compat.exportFunction");c&&void 0!==c.defineAs&&(b[c.defineAs]=a);return a}};
m.createObjectIn={value:function(a,b){k("compat.createObjectIn");var c={};b&&void 0!==b.defineAs&&(a[b.defineAs]=c);return c}};f.addStyle=aa.addStyle;f.deleteValue=h.deleteValue;f.listValues=h.listValues;f.getValue=h.getValue;f.setValue=h.setValue;f.log=aa.log;f.registerMenuCommand=h.registerMenuCommand;f.unregisterMenuCommand=h.unregisterMenuCommand;f.openInTab=h.openInTab;f.addValueChangeListener=h.addValueChangeListener;f.removeValueChangeListener=h.removeValueChangeListener;v.xmlhttpRequest=h.xmlhttpRequest;
v.download=h.download;f.webRequest=h.webRequest;v.setClipboard=aa.setClipboard;f.getTab=h.getTab;f.setTab=h.setTab;f.saveTab=h.setTab;f.getTabs=h.getTabs;f.getResourceText=h.getResourceText;v.getResourceURL=h.getResourceURL;var y=function(a){return function(){var b=Ha(u(a,this,arguments));z(b,"then",function(a){return Ia(b,a)});z(b,"catch",function(a){return Ja(b,a)});return b}},B=function(a,c){var d,g=new b.Promise(function(b,g){var f={},h=c.onload,k=c.ontimeout,m=c.onerror;e(r(c),function(a){f[a]=
c[a]});f.onerror=function(a){g(a);m&&u(m,this,arguments)};f.ontimeout=function(a){g(a);k&&u(k,this,arguments)};f.onload=function(a){b(a);h&&u(h,this,arguments)};var l=a(f).abort;!0===d?l():d=l});z(g,"abort",function(){d?d():d=!0});return g};e(r(v),function(a){n["GM_"+a]={value:v[a]}});n["GM.getResourceUrl"]={getter:function(){return y(v.getResourceURL)}};n["GM.xmlHttpRequest"]={value:function(a){return B(v.xmlhttpRequest,a)}};n["GM.download"]={value:function(a){return B(v.download,a)}};n["GM.setClipboard"]=
{value:function(a,c){return new b.Promise(function(b){v.setClipboard(a,c,b)})}};n.GM_notification={value:function(a,b,c,d){var f=null,k=["timeout","text","image","title","highlight"],m=null,l={};"object"===typeof a&&(m=a);m?(e(k,function(a){l[a]=m[a]}),f=m.ondone,d=m.onclick,"function"===typeof b&&(f=b)):(l.image=c,l.title=b,l.text=a);l.text&&(l.image=l.image||g.icon64||g.icon,l.title=l.title||g.name);l.onclick=d;l.ondone=f;h.notification(l)}};n["GM.notification"]={value:function(a){return"object"!==
typeof a?U("GM.notification(details): received no details"):new b.Promise(function(b,c){e(r(a),function(a){});h.notification(a)})}};e(r(f),function(a){var b=f[a];n["GM_"+a]={value:b};n["GM."+a]={getter:function(){return y(b)}}});n["window.close"]={context_prop:!0};n["window.focus"]={context_prop:!0}}n.GM_info=n["GM.info"]={getter:h.getInfo};var X={};m.GM={value:X,protect:!0};H(m,g.grant,n,function(a,b){if("GM."===a.substr(0,3))a=a.split(".")[1],R(X,a,{get:b.getter?b.getter:function(){return b.value}});
else return b.protect=!0,b});g.options.compat_prototypes&&((q||c)&&w("env: option: add toSource"),b.Object.prototype.toSource||I(b.Object.prototype,{toSource:{value:function(){k("Object.toSource");var a=Y.toType(this);if("String"===a)return'(String("'+W(this,new b.RegExp('"',"g"),'\\"')+'"))';if("Number"===a)return'(Number("'+b.Number(this)+'"))';if("Array"===a){for(var a="(new Array(",c=0;c<this.length;c++){var d=Y.toType(this[c]),a="Null"===d?a+"null":"Undefined"===d?a+"undefined":a+this[c].toSource();
c+1<this.length&&(a+=",")}return a+"))"}return'JSON.parse(unescape("'+b.escape(oa(this))+'"))'},enumerable:!1,writable:!0,configurable:!0}}),(q||c)&&w("env: option: add some array generics"),e("indexOf lastIndexOf filter forEach every map some slice".split(" "),function(a){if("function"!==typeof b.Array[a]){var c={};c[a]={value:function(c){k("Array."+a);return u(b.Array.prototype[a],c,u(fa.wrappedJSObject,arguments,[1]))},enumerable:!1,writable:!0,configurable:!0};I(b.Array,c)}}));var C,G="";if(t)C=
new Window;else{var M=ia(m,function(a){ca(a);D(a);V(a,2,M.filterEvent)});C={run_at:g.options.run_at,uuid:g.uuid};G="tms_"+W(g.uuid,/-/g,"_");K[G]=C;V(M.context,1,M.filterEvent);C=M.context}a.props[p].sandboxes[g.uuid]=C;a.props[p].elements[g.uuid]=m;(q||c)&&S("env: execute script "+g.name+" @ the "+(t?"un":"")+"safe context now!");ka(g,d.code,d.requires,a.props[p],t,G,d.source_url)}}}();(function(){if(t.external_connect){var a;if(a=x.external){var b=function(a,b){g.send("external.message",a,function(a){b&&
b(a)})};try{I(a,{Tampermonkey:{get:function(){return{getVersion:function(a){b({method:"getVersion"},a)},isInstalled:function(a,c,d){"function"===typeof c&&(d=c,c=null);b({method:"isInstalled",script:{name:a,namespace:c}},d)}}},configurable:!0}})}catch(c){}}}})();g.onMessage.setListener(function(b){var d=b.a;"load"==b.m?(a.pageLoaded=!0,ca.runListeners()):"DOMContentLoaded"==b.m?(a.domContentLoaded=!0,ca.runListeners()):"setForeignAttr"==b.m?x[d.attr]=d.value:"port.message"==b.m?C.message(d):"executeScript"==
b.m?ca.run(b.a):"cleanup"==b.m?g.cleanup():c&&w("env: unkown method",b)});c&&w("Tampermonkey started");e(a.scripts,function(a){ca.run(a)})}}}());
