(()=>{function e(r){var s=n[r];if(void 0!==s)return s.exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}var t={462:(e,t,n)=>{e.exports=function e(t,n,r){function s(o){if(!n[o]){if(!t[o]){if(i)return i(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return s(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var i=void 0,o=0;o>2,a=(3&t)<<4|n>>4,c=p>1?(15&n)<<2|s>>6:64,l=p>2?63&s:64,u.push(i.charAt(o)+i.charAt(a)+i.charAt(c)+i.charAt(l)) ;return u.join("")},n.decode=function(e){var t,n,r,o,a,c,l=0,u=0;if("data:"===e.substr(0,5))throw new Error("Invalid base64 input, it looks like a data url.");var d,A=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===i.charAt(64)&&A--,e.charAt(e.length-2)===i.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=s.uint8array?new Uint8Array(0|A):new Array(0|A);l>4, n=(15&o)<<4|(a=i.indexOf(e.charAt(l++)))>>2,r=(3&a)<<6|(c=i.indexOf(e.charAt(l++))),d[u++]=t,64!==a&&(d[u++]=n),64!==c&&(d[u++]=r);return d}},{"./support":30,"./utils":32}],2:[function(e,t){"use strict";function n(e,t,n,r,s){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=s}var r=e("./external"),s=e("./stream/DataWorker"),i=e("./stream/DataLengthProbe"),o=e("./stream/Crc32Probe");i=e("./stream/DataLengthProbe"),n.prototype={ getContentWorker:function(){var e=new s(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new i("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){ return new s(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},n.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new i("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new i("compressedSize")).withStreamInfo("compression",t)},t.exports=n},{"./external":6,"./stream/Crc32Probe":25, "./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t){"use strict";var n=e("./utils"),r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t }();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,n){var s=r,i=0+n;e^=-1;for(var o=0;o>>8^s[255&(e^t[o])];return-1^e}(0|t,e,e.length):function(e,t,n){var s=r,i=0+n;e^=-1;for(var o=0;o>>8^s[255&(e^t.charCodeAt(o))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null, n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t){"use strict";var n;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,n){"use strict";function r(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),c=s?"uint8array":"array" ;n.magic="\b\0",o.inherits(r,a),r.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(c,e.data),!1)},r.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},r.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},r.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this ;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new r("Deflate",e)},n.uncompressWorker=function(){return new r("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t){"use strict";function n(e,t,n,r){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0, this.entriesCount=0,this.currentFile=null,this._sources=[]}var r=e("../utils"),s=e("../stream/GenericWorker"),i=e("../utf8"),o=e("../crc32"),a=e("../signature"),c=function(e,t){var n,r="";for(n=0;n>>=8;return r},l=function(e,t,n,s,l,u){ var d,A,p=e.file,h=e.compression,f=u!==i.utf8encode,m=r.transformTo("string",u(p.name)),g=r.transformTo("string",i.utf8encode(p.name)),v=p.comment,w=r.transformTo("string",u(v)),b=r.transformTo("string",i.utf8encode(v)),_=g.length!==p.name.length,y=b.length!==v.length,k="",R="",x="",E=p.dir,S=p.date,C={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(C.crc32=e.crc32,C.compressedSize=e.compressedSize,C.uncompressedSize=e.uncompressedSize);var M=0;t&&(M|=8),f||!_&&!y||(M|=2048);var I,U,G=0,Z=0 ;E&&(G|=16),"UNIX"===l?(Z=798,G|=(U=I=p.unixPermissions,I||(U=E?16893:33204),(65535&U)<<16)):(Z=20,G|=63&(p.dosPermissions||0)),d=S.getUTCHours(),d<<=6,d|=S.getUTCMinutes(),d<<=5,d|=S.getUTCSeconds()/2,A=S.getUTCFullYear()-1980,A<<=4,A|=S.getUTCMonth()+1,A<<=5,A|=S.getUTCDate(),_&&(R=c(1,1)+c(o(m),4)+g,k+="up"+c(R.length,2)+R),y&&(x=c(1,1)+c(o(w),4)+b,k+="uc"+c(x.length,2)+x);var T="";return T+="\n\0",T+=c(M,2),T+=h.magic,T+=c(d,2),T+=c(A,2),T+=c(C.crc32,4),T+=c(C.compressedSize,4), T+=c(C.uncompressedSize,4),T+=c(m.length,2),T+=c(k.length,2),{fileRecord:a.LOCAL_FILE_HEADER+T+m+k,dirRecord:a.CENTRAL_FILE_HEADER+c(Z,2)+T+c(w.length,2)+"\0\0\0\0"+c(G,4)+c(s,4)+m+k+w}},u=function(e){return a.DATA_DESCRIPTOR+c(e.crc32,4)+c(e.compressedSize,4)+c(e.uncompressedSize,4)};r.inherits(n,s),n.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length, s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},n.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=l(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},n.prototype.closedSource=function(e){this.accumulate=!1 ;var t=this.streamFiles&&!e.file.dir,n=l(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:u(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},n.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){ return t=void 0!==t?t:a.createFolders,e=f(e),this.files[e]||p.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},g={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){ e(n,r)&&t.push(r)})),t},file:function(e,t,r){if(1===arguments.length){if(n(e)){var s=e;return this.filter((function(e,t){return!t.dir&&s.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,p.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(n(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,r=m.call(this,t),s=this.clone();return s.root=r.name,s},remove:function(e){e=this.root+e;var t=this.files[e] ;if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r=0;--i)if(this.data[i]===t&&this.data[i+1]===n&&this.data[i+2]===r&&this.data[i+3]===s)return i-this.zero;return-1},n.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),s=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&n===i[1]&&r===i[2]&&s===i[3]},n.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[] ;var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./DataReader":18}],18:[function(e,t){"use strict";function n(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}var r=e("../utils");n.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4) ;return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=n},{"../utils":32}],19:[function(e,t){"use strict";function n(e){r.call(this,e)}var r=e("./Uint8ArrayReader");e("../utils").inherits(n,r),n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t){"use strict";function n(e){ r.call(this,e)}var r=e("./DataReader");e("../utils").inherits(n,r),n.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},n.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},n.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./DataReader":18}], 21:[function(e,t){"use strict";function n(e){r.call(this,e)}var r=e("./ArrayReader");e("../utils").inherits(n,r),n.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(e,t){"use strict" ;var n=e("../utils"),r=e("../support"),s=e("./ArrayReader"),i=e("./StringReader"),o=e("./NodeBufferReader"),a=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||r.uint8array?"nodebuffer"===t?new o(e):r.uint8array?new a(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new i(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict" ;n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t){"use strict";function n(e){r.call(this,"ConvertWorker to "+e),this.destType=e}var r=e("./GenericWorker"),s=e("../utils");s.inherits(n,r),n.prototype.processChunk=function(e){this.push({data:s.transformTo(this.destType,e.data),meta:e.meta})},t.exports=n},{"../utils":32, "./GenericWorker":28}],25:[function(e,t){"use strict";function n(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}var r=e("./GenericWorker"),s=e("../crc32");e("../utils").inherits(n,r),n.prototype.processChunk=function(e){this.streamInfo.crc32=s(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t){"use strict";function n(e){s.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)} var r=e("../utils"),s=e("./GenericWorker");r.inherits(n,s),n.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}s.prototype.processChunk.call(this,e)},t.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(e,t){"use strict";function n(e){s.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0, t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}var r=e("../utils"),s=e("./GenericWorker");r.inherits(n,s),n.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1, this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)} return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(e,t){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush() ;try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){ if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=n},{}],29:[function(e,t){"use strict";function n(e,t,n){var o=t;switch(t){case"blob":case"arraybuffer":o="uint8array";break ;case"base64":o="string"}try{this._internalType=o,this._outputType=t,this._mimeType=n,r.checkSupport(o),this._worker=e.pipe(new s(o)),e.lock()}catch(e){this._worker=new i("error"),this._worker.error(e)}}var r=e("../utils"),s=e("./ConvertWorker"),i=e("./GenericWorker"),o=e("../base64"),a=e("../support"),c=e("../external"),l=null;if(a.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}n.prototype={accumulate:function(e){return t=this,n=e,new c.Promise((function(e,s){ var i=[],a=t._internalType,c=t._outputType,l=t._mimeType;t.on("data",(function(e,t){i.push(e),n&&n(t)})).on("error",(function(e){i=[],s(e)})).on("end",(function(){try{var t=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,s=null,i=0;for(n=0;n=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;l[254]=l[254]=1,n.utf8encode=function(e){ return o.nodebuffer?a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,s,i,a=e.length,c=0;for(s=0;s>>6, t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t}(e)},n.utf8decode=function(e){return o.nodebuffer?i.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,r,s,o=e.length,a=new Array(2*o);for(n=0,t=0;t4)a[n++]=65533,t+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&t1?a[n++]=65533:r<65536?a[n++]=r:(r-=65536,a[n++]=55296|r>>10&1023,a[n++]=56320|1023&r)}return a.length!==n&&(a.subarray?a=a.subarray(0,n):a.length=n),i.applyFromCharCode(a)}(e=i.transformTo(o.uint8array?"uint8array":"array",e))},i.inherits(r,c),r.prototype.processChunk=function(e){var t=i.transformTo(o.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0), t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+l[e[n]]>t?n:t}(t),a=t;s!==t.length&&(o.uint8array?(a=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(a=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:n.utf8decode(a),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({ data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=r,i.inherits(s,c),s.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=s},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";function r(e){return e}function s(e,t){for(var n=0;n1;)try{return A.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return A.stringifyByChar(e)}function o(e,t){for(var n=0;n1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}}, t.exports=n},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t){"use strict";function n(e,t){this.options=e,this.loadOptions=t}var r=e("./reader/readerFor"),s=e("./utils"),i=e("./compressedObject"),o=e("./crc32"),a=e("./utf8"),c=e("./compressions"),l=e("./support");n.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22), this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in c)if(c.hasOwnProperty(t)&&c[t].magic===e)return c[t];return null }(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4), this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)}, processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value) ;this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,s=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+40?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==d)throw new Error(c[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var s ;if(s="string"==typeof t.dictionary?a.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=i.deflateSetDictionary(this.strm,s))!==d)throw new Error(c[n]);this._dict_set=!0}}function s(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||c[n.err];return n.result}var i=e("./zlib/deflate"),o=e("./utils/common"),a=e("./utils/strings"),c=e("./zlib/messages"),l=e("./zlib/zstream"),u={}.toString,d=0,A=-1,p=0,h=8 ;r.prototype.push=function(e,t){var n,r,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=a.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new o.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=i.deflate(s,r))&&n!==d)return this.onEnd(n),this.ended=!0,!1 ;0!==s.avail_out&&(0!==s.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(a.buf2binstring(o.shrinkBuf(s.output,s.next_out))):this.onData(o.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===r?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===d):2!==r||(this.onEnd(d),s.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){ e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=r,n.deflate=s,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,s(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e) ;this.options=o.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits) ;if(n!==c.Z_OK)throw new Error(l[n]);this.header=new d,i.inflateGetHeader(this.strm,this.header)}function s(e,t){var n=new r(t);if(n.push(e,!0),n.err)throw n.msg||l[n.err];return n.result}var i=e("./zlib/inflate"),o=e("./utils/common"),a=e("./utils/strings"),c=e("./zlib/constants"),l=e("./zlib/messages"),u=e("./zlib/zstream"),d=e("./zlib/gzheader"),A={}.toString;r.prototype.push=function(e,t){var n,r,s,l,u,d,p=this.strm,h=this.options.chunkSize,f=this.options.dictionary,m=!1 ;if(this.ended)return!1;r=t===~~t?t:!0===t?c.Z_FINISH:c.Z_NO_FLUSH,"string"==typeof e?p.input=a.binstring2buf(e):"[object ArrayBuffer]"===A.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new o.Buf8(h),p.next_out=0,p.avail_out=h),(n=i.inflate(p,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&f&&(d="string"==typeof f?a.string2buf(f):"[object ArrayBuffer]"===A.call(f)?new Uint8Array(f):f,n=i.inflateSetDictionary(this.strm,d)), n===c.Z_BUF_ERROR&&!0===m&&(n=c.Z_OK,m=!1),n!==c.Z_STREAM_END&&n!==c.Z_OK)return this.onEnd(n),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&n!==c.Z_STREAM_END&&(0!==p.avail_in||r!==c.Z_FINISH&&r!==c.Z_SYNC_FLUSH)||("string"===this.options.to?(s=a.utf8border(p.output,p.next_out),l=p.next_out-s,u=a.buf2string(p.output,s),p.next_out=l,p.avail_out=h-l,l&&o.arraySet(p.output,p.output,s,l,0),this.onData(u)):this.onData(o.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0) }while((p.avail_in>0||0===p.avail_out)&&n!==c.Z_STREAM_END);return n===c.Z_STREAM_END&&(r=c.Z_FINISH),r===c.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===c.Z_OK):r!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),p.avail_out=0,!0)},r.prototype.onData=function(e){this.chunks.push(e)},r.prototype.onEnd=function(e){e===c.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}, n.Inflate=r,n.inflate=s,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},n.ungzip=s},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=[].slice.call(arguments,1);t.length;){var n=t.shift();if(n){ if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var s={arraySet:function(e,t,n,r,s){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),s);else for(var i=0;i=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;a[254]=a[254]=1,n.string2buf=function(e){var t,n,r,i,o,a=e.length,c=0 ;for(i=0;i>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63, t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},n.buf2binstring=function(e){return r(e,e.length)},n.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,r=t.length;n4)l[s++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n1?l[s++]=65533:i<65536?l[s++]=i:(i-=65536,l[s++]=55296|i>>10&1023, l[s++]=56320|1023&i)}return r(l,s)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t){"use strict";t.exports=function(e,t,n,r){for(var s=65535&e|0,i=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{i=i+(s=s+t[r++]|0)|0}while(--o);s%=65521,i%=65521}return s|i<<16|0}},{}],44:[function(e,t){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2, Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t){"use strict";var n=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}() ;t.exports=function(e,t,r,s){var i=n,o=s+r;e^=-1;for(var a=s;a>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,n){"use strict";function r(e,t){return e.msg=R[t],t}function s(e){return(e<<1)-(e>4?9:0)}function i(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(b.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n, 0===t.pending&&(t.pending_out=0))}function a(e,t){_._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function c(e,t){e.pending_buf[e.pending++]=t}function l(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function u(e,t){ var n,r,s=e.max_chain_length,i=e.strstart,o=e.prev_length,a=e.nice_match,c=e.strstart>e.w_size-N?e.strstart-(e.w_size-N):0,l=e.window,u=e.w_mask,d=e.prev,A=e.strstart+P,p=l[i+o-1],h=l[i+o];e.prev_length>=e.good_match&&(s>>=2),a>e.lookahead&&(a=e.lookahead);do{if(l[(n=t)+o]===h&&l[n+o-1]===p&&l[n]===l[i]&&l[++n]===l[i+1]){i+=2,n++;do{}while(l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&io){if(e.match_start=t,o=r,r>=a)break;p=l[i+o-1],h=l[i+o]}}}while((t=d[t&u])>c&&0!=--s);return o<=e.lookahead?o:e.lookahead}function d(e){var t,n,r,s,i,o,a,c,l,u,d=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-N)){b.arraySet(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=d?r-d:0}while(--n);t=n=d;do{r=e.prev[--t],e.prev[t]=r>=d?r-d:0}while(--n);s+=d}if(0===e.strm.avail_in)break;if(o=e.strm, a=e.window,c=e.strstart+e.lookahead,l=s,u=void 0,(u=o.avail_in)>l&&(u=l),n=0===u?0:(o.avail_in-=u,b.arraySet(a,o.input,o.next_in,u,c),1===o.state.wrap?o.adler=y(o.adler,a,u,c):2===o.state.wrap&&(o.adler=k(o.adler,a,u,c)),o.next_in+=u,o.total_in+=u,u),e.lookahead+=n,e.lookahead+e.insert>=L)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<=L&&(e.ins_h=(e.ins_h<=L)if(r=_._tr_tally(e,e.strstart-e.match_start,e.match_length-L),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=L){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=L&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=L-1)),e.prev_length>=L&&e.match_length<=e.prev_length){ s=e.strstart+e.lookahead-L,r=_._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-L),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=s&&(e.ins_h=(e.ins_h<15&&(a=2,s-=16),i<1||i>T||n!==Z||s<8||s>15||t<0||t>9||o<0||o>U)return r(e,C);8===s&&(s=9);var c=new f;return e.state=c,c.strm=e,c.wrap=a,c.gzhead=null, c.w_bits=s,c.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(d(e),0===e.lookahead&&t===x)return Q;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n ;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,a(e,!1),0===e.strm.avail_out))return Q;if(e.strstart-e.block_start>=e.w_size-N&&(a(e,!1),0===e.strm.avail_out))return Q}return e.insert=0,t===E?(a(e,!0),0===e.strm.avail_out?X:Y):(e.strstart>e.block_start&&(a(e,!1),e.strm.avail_out),Q) })),new h(4,4,8,4,A),new h(4,5,16,8,A),new h(4,6,32,32,A),new h(4,4,16,16,p),new h(8,16,32,32,p),new h(8,16,128,128,p),new h(8,32,128,256,p),new h(32,128,258,1024,p),new h(32,258,258,4096,p)],n.deflateInit=function(e,t){return v(e,t,Z,15,8,0)},n.deflateInit2=v,n.deflateReset=g,n.deflateResetKeep=m,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?C:(e.state.gzhead=t,S):C},n.deflate=function(e,t){var n,u,A,p;if(!e||!e.state||t>5||t<0)return e?r(e,C):C;if(u=e.state, !e.output||!e.input&&0!==e.avail_in||u.status===H&&t!==E)return r(e,0===e.avail_out?-5:C);if(u.strm=e,n=u.last_flush,u.last_flush=t,u.status===V)if(2===u.wrap)e.adler=0,c(u,31),c(u,139),c(u,8),u.gzhead?(c(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),c(u,255&u.gzhead.time),c(u,u.gzhead.time>>8&255),c(u,u.gzhead.time>>16&255),c(u,u.gzhead.time>>24&255),c(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),c(u,255&u.gzhead.os), u.gzhead.extra&&u.gzhead.extra.length&&(c(u,255&u.gzhead.extra.length),c(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&(e.adler=k(e.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(c(u,0),c(u,0),c(u,0),c(u,0),c(u,0),c(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),c(u,3),u.status=q);else{var h=Z+(u.w_bits-8<<4)<<8;h|=(u.strategy>=2||u.level<2?0:u.level<6?1:6===u.level?2:3)<<6,0!==u.strstart&&(h|=32),h+=31-h%31,u.status=q,l(u,h),0!==u.strstart&&(l(u,e.adler>>>16),l(u,65535&e.adler)), e.adler=1}if(69===u.status)if(u.gzhead.extra){for(A=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),o(e),A=u.pending,u.pending!==u.pending_buf_size));)c(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73 ;if(73===u.status)if(u.gzhead.name){A=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),o(e),A=u.pending,u.pending===u.pending_buf_size)){p=1;break}p=u.gzindexA&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),0===p&&(u.gzindex=0,u.status=91)}else u.status=91;if(91===u.status)if(u.gzhead.comment){A=u.pending ;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>A&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),o(e),A=u.pending,u.pending===u.pending_buf_size)){p=1;break}p=u.gzindexA&&(e.adler=k(e.adler,u.pending_buf,u.pending-A,A)),0===p&&(u.status=z)}else u.status=z;if(u.status===z&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&o(e), u.pending+2<=u.pending_buf_size&&(c(u,255&e.adler),c(u,e.adler>>8&255),e.adler=0,u.status=q)):u.status=q),0!==u.pending){if(o(e),0===e.avail_out)return u.last_flush=-1,S}else if(0===e.avail_in&&s(t)<=s(n)&&t!==E)return r(e,-5);if(u.status===H&&0!==e.avail_in)return r(e,-5);if(0!==e.avail_in||0!==u.lookahead||t!==x&&u.status!==H){var f=2===u.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(d(e),0===e.lookahead)){if(t===x)return Q;break}if(e.match_length=0, n=_._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(a(e,!1),0===e.strm.avail_out))return Q}return e.insert=0,t===E?(a(e,!0),0===e.strm.avail_out?X:Y):e.last_lit&&(a(e,!1),0===e.strm.avail_out)?Q:W}(u,t):3===u.strategy?function(e,t){for(var n,r,s,i,o=e.window;;){if(e.lookahead<=P){if(d(e),e.lookahead<=P&&t===x)return Q;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=L&&e.strstart>0&&(r=o[s=e.strstart-1])===o[++s]&&r===o[++s]&&r===o[++s]){i=e.strstart+P ;do{}while(r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&r===o[++s]&&se.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=L?(n=_._tr_tally(e,1,e.match_length-L),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=_._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(a(e,!1),0===e.strm.avail_out))return Q}return e.insert=0,t===E?(a(e,!0), 0===e.strm.avail_out?X:Y):e.last_lit&&(a(e,!1),0===e.strm.avail_out)?Q:W}(u,t):w[u.level].func(u,t);if(f!==X&&f!==Y||(u.status=H),f===Q||f===X)return 0===e.avail_out&&(u.last_flush=-1),S;if(f===W&&(1===t?_._tr_align(u):5!==t&&(_._tr_stored_block(u,0,0,!1),3===t&&(i(u.head),0===u.lookahead&&(u.strstart=0,u.block_start=0,u.insert=0))),o(e),0===e.avail_out))return u.last_flush=-1,S}return t!==E?S:u.wrap<=0?1:(2===u.wrap?(c(u,255&e.adler),c(u,e.adler>>8&255),c(u,e.adler>>16&255), c(u,e.adler>>24&255),c(u,255&e.total_in),c(u,e.total_in>>8&255),c(u,e.total_in>>16&255),c(u,e.total_in>>24&255)):(l(u,e.adler>>>16),l(u,65535&e.adler)),o(e),u.wrap>0&&(u.wrap=-u.wrap),0!==u.pending?S:1)},n.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==V&&69!==t&&73!==t&&91!==t&&t!==z&&t!==q&&t!==H?r(e,C):(e.state=null,t===q?r(e,-3):S):C},n.deflateSetDictionary=function(e,t){var n,r,s,o,a,c,l,u,A=t.length;if(!e||!e.state)return C ;if(2===(o=(n=e.state).wrap)||1===o&&n.status!==V||n.lookahead)return C;for(1===o&&(e.adler=y(e.adler,t,A,0)),n.wrap=0,A>=n.w_size&&(0===o&&(i(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new b.Buf8(n.w_size),b.arraySet(u,t,A-n.w_size,n.w_size,0),t=u,A=n.w_size),a=e.avail_in,c=e.next_in,l=e.input,e.avail_in=A,e.next_in=0,e.input=t,d(n);n.lookahead>=L;){r=n.strstart,s=n.lookahead-(L-1);do{n.ins_h=(n.ins_h<>>=b=w>>>24,h-=b,0==(b=w>>>16&255))E[i++]=65535&w;else{if(!(16&b)){if(0==(64&b)){w=f[(65535&w)+(p&(1<>>=b,h-=b),h<15&&(p+=x[r++]<>>=b=w>>>24,h-=b,!(16&(b=w>>>16&255))){if(0==(64&b)){w=m[(65535&w)+(p&(1<c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=b,h-=b,y>(b=i-o)){if((b=y-b)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(k=0,R=A,0===d){if(k+=l-b,b<_){_-=b;do{E[i++]=A[k++]}while(--b);k=i-y,R=E}}else if(d2;)E[i++]=R[k++],E[i++]=R[k++],E[i++]=R[k++],_-=3;_&&(E[i++]=R[k++],_>1&&(E[i++]=R[k++]))}else{k=i-y;do{E[i++]=E[k++],E[i++]=E[k++],E[i++]=E[k++],_-=3}while(_>2);_&&(E[i++]=E[k++],_>1&&(E[i++]=E[k++]))}break}}break}}while(r>3,p&=(1<<(h-=_<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new p.Buf16(320), this.work=new p.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function i(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=y,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new p.Buf32(x),t.distcode=t.distdyn=new p.Buf32(E),t.sane=1,t.back=-1,b):_}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,i(e)):_}function a(e,t){var n,r ;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?_:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,o(e))):_}function c(e,t){var n,r;return e?(r=new s,e.state=r,r.window=null,(n=a(e,t))!==b&&(e.state=null),n):_}function l(e){if(S){var t;for(d=new p.Buf32(512),A=new p.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(g(v,e.lens,0,288,d,0,e.work,{bits:9}), t=0;t<32;)e.lens[t++]=5;g(w,e.lens,0,32,A,0,e.work,{bits:5}),S=!1}e.lencode=d,e.lenbits=9,e.distcode=A,e.distbits=5}function u(e,t,n,r){var s,i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(p.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((s=i.wsize-i.wnext)>r&&(s=r),p.arraySet(i.window,t,n-r,s,i.wnext),(r-=s)?(p.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=s, i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,n.check=f(n.check,N,2,0),A=0,x=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&A)<<8)+(A>>8))%31){ e.msg="incorrect header check",n.mode=R;break}if(8!=(15&A)){e.msg="unknown compression method",n.mode=R;break}if(x-=4,j=8+(15&(A>>>=4)),0===n.wbits)n.wbits=j;else if(j>n.wbits){e.msg="invalid window size",n.mode=R;break}n.dmax=1<>8&1),512&n.flags&&(N[0]=255&A,N[1]=A>>>8&255,n.check=f(n.check,N,2,0)),A=0,x=0,n.mode=3;case 3:for(;x<32;){if(0===c)break e;c--,A+=s[o++]<>>8&255,N[2]=A>>>16&255,N[3]=A>>>24&255,n.check=f(n.check,N,4,0)),A=0,x=0,n.mode=4;case 4:for(;x<16;){if(0===c)break e;c--,A+=s[o++]<>8),512&n.flags&&(N[0]=255&A,N[1]=A>>>8&255,n.check=f(n.check,N,2,0)),A=0,x=0,n.mode=5 ;case 5:if(1024&n.flags){for(;x<16;){if(0===c)break e;c--,A+=s[o++]<>>8&255,n.check=f(n.check,N,2,0)),A=0,x=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((C=n.length)>c&&(C=c),C&&(n.head&&(j=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),p.arraySet(n.head.extra,s,o,C,j)),512&n.flags&&(n.check=f(n.check,s,C,o)),c-=C,o+=C,n.length-=C),n.length))break e ;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===c)break e;C=0;do{j=s[o+C++],n.head&&j&&n.length<65536&&(n.head.name+=String.fromCharCode(j))}while(j&&C>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=k;break;case 10:for(;x<32;){if(0===c)break e;c--,A+=s[o++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===c)break e;c--,A+=s[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(l(n),n.mode=20,6===t){A>>>=2,x-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=R}A>>>=2,x-=2;break;case 14:for(A>>>=7&x,x-=7&x;x<32;){if(0===c)break e;c--,A+=s[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=R;break} if(n.length=65535&A,A=0,x=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(C=n.length){if(C>c&&(C=c),C>d&&(C=d),0===C)break e;p.arraySet(i,s,o,C,a),c-=C,o+=C,d-=C,a+=C,n.length-=C;break}n.mode=k;break;case 17:for(;x<14;){if(0===c)break e;c--,A+=s[o++]<>>=5,x-=5,n.ndist=1+(31&A),A>>>=5,x-=5,n.ncode=4+(15&A),A>>>=4,x-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=R;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,F={bits:n.lenbits},D=g(0,n.lens,0,19,n.lencode,0,n.work,F),n.lenbits=F.bits,D){e.msg="invalid code lengths set",n.mode=R;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,Z=65535&P,!((U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>>=U,x-=U,n.lens[n.have++]=Z;else{ if(16===Z){for(L=U+2;x>>=U,x-=U,0===n.have){e.msg="invalid bit length repeat",n.mode=R;break}j=n.lens[n.have-1],C=3+(3&A),A>>>=2,x-=2}else if(17===Z){for(L=U+3;x>>=U)),A>>>=3,x-=3}else{for(L=U+7;x>>=U)),A>>>=7,x-=7}if(n.have+C>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=R;break}for(;C--;)n.lens[n.have++]=j}} if(n.mode===R)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=R;break}if(n.lenbits=9,F={bits:n.lenbits},D=g(v,n.lens,0,n.nlen,n.lencode,0,n.work,F),n.lenbits=F.bits,D){e.msg="invalid literal/lengths set",n.mode=R;break}if(n.distbits=6,n.distcode=n.distdyn,F={bits:n.distbits},D=g(w,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,F),n.distbits=F.bits,D){e.msg="invalid distances set",n.mode=R;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(c>=6&&d>=258){ e.next_out=a,e.avail_out=d,e.next_in=o,e.avail_in=c,n.hold=A,n.bits=x,m(e,S),a=e.next_out,i=e.output,d=e.avail_out,o=e.next_in,s=e.input,c=e.avail_in,A=n.hold,x=n.bits,n.mode===k&&(n.back=-1);break}for(n.back=0;G=(P=n.lencode[A&(1<>>16&255,Z=65535&P,!((U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>T)])>>>16&255,Z=65535&P,!(T+(U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>>=T,x-=T,n.back+=T} if(A>>>=U,x-=U,n.back+=U,n.length=Z,0===G){n.mode=26;break}if(32&G){n.back=-1,n.mode=k;break}if(64&G){e.msg="invalid literal/length code",n.mode=R;break}n.extra=15&G,n.mode=22;case 22:if(n.extra){for(L=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=(P=n.distcode[A&(1<>>16&255,Z=65535&P,!((U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>T)])>>>16&255,Z=65535&P,!(T+(U=P>>>24)<=x);){if(0===c)break e;c--,A+=s[o++]<>>=T,x-=T,n.back+=T}if(A>>>=U,x-=U,n.back+=U,64&G){e.msg="invalid distance code",n.mode=R;break}n.offset=Z,n.extra=15&G,n.mode=24;case 24:if(n.extra){for(L=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=R;break}n.mode=25;case 25: if(0===d)break e;if(C=S-d,n.offset>C){if((C=n.offset-C)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=R;break}C>n.wnext?(C-=n.wnext,M=n.wsize-C):M=n.wnext-C,C>n.length&&(C=n.length),I=n.window}else I=i,M=a-n.offset,C=n.length;C>d&&(C=d),d-=C,n.length-=C;do{i[a++]=I[M++]}while(--C);0===n.length&&(n.mode=21);break;case 26:if(0===d)break e;i[a++]=n.length,d--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===c)break e;c--,A|=s[o++]<=1&&0===B[E];E--);if(S>E&&(S=E),0===E)return l[u++]=20971520,l[u++]=20971520,A.bits=1,0;for(x=1;x0&&(0===e||1!==E))return-1;for(O[1]=0,k=1;k<15;k++)O[k+1]=O[k]+B[k];for(R=0;R852||2===e&&U>592)return 1;for(;;){w=k-M,d[R]v?(b=j[D+d[R]],_=Z[T+d[R]]):(b=96,_=0),p=1<>M)+(h-=p)]=w<<24|b<<16|_|0}while(0!==h);for(p=1<>=1;if(0!==p?(G&=p-1,G+=p):G=0,R++,0==--B[k]){if(k===E)break;k=t[a+d[R]]}if(k>S&&(G&m)!==f){for(0===M&&(M=S),g+=x,I=1<<(C=k-M);C+M852||2===e&&U>592)return 1;l[f=G&m]=S<<24|C<<16|g-u|0}}return 0!==G&&(l[g+G]=k-M<<24|64<<16|0),A.bits=S,0}},{"../utils/common":41}],51:[function(e,t){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,n){"use strict";function r(e){for(var t=e.length;--t>=0;)e[t]=0}function s(e,t,n,r,s){this.static_tree=e,this.extra_bits=t, this.extra_base=n,this.elems=r,this.max_length=s,this.has_stree=e&&e.length}function i(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?L[e]:L[256+(e>>>7)]}function a(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function c(e,t,n){e.bi_valid>M-n?(e.bi_buf|=t<>M-e.bi_valid,e.bi_valid+=n-M):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function d(e,t,n){var r,s,i=new Array(C+1),o=0;for(r=1;r<=C;r++)i[r]=o=o+n[r-1]<<1;for(s=0;s<=t;s++){var a=e[2*s+1];0!==a&&(e[2*s]=u(i[a]++,a))}}function A(e){var t;for(t=0;t8?a(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0, e.bi_valid=0}function h(e,t,n,r){var s=2*t,i=2*n;return e[s]>1;n>=1;n--)f(e,i,n);s=c;do{n=e.heap[1], e.heap[1]=e.heap[e.heap_len--],f(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*s]=i[2*n]+i[2*r],e.depth[s]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=s,e.heap[1]=s++,f(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,s,i,o,a,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,A=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,h=t.stat_desc.max_length,f=0;for(i=0;i<=C;i++)e.bl_count[i]=0 ;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nh&&(i=h,f++),c[2*r+1]=i,r>l||(e.bl_count[i]++,o=0,r>=p&&(o=A[r-p]),a=c[2*r],e.opt_len+=a*(i+o),d&&(e.static_len+=a*(u[2*r+1]+o)));if(0!==f){do{for(i=h-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[h]--,f-=2}while(f>0);for(i=h;0!==i;i--)for(r=e.bl_count[i];0!==r;)(s=e.heap[--n])>l||(c[2*s+1]!==i&&(e.opt_len+=(i-c[2*s+1])*c[2*s],c[2*s+1]=i),r--)}}(e,t),d(i,l,e.bl_count)} function v(e,t,n){var r,s,i=-1,o=t[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)s=o,o=t[2*(r+1)+1],++a>=7;r0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1 ;for(t=32;t=3&&0===e.bl_tree[2*j[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),s=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=s&&(s=i)):s=i=n+5,n+4<=s&&-1!==t?b(e,t,n,r):4===e.strategy||i===s?(c(e,2+(r?1:0),3),m(e,D,F)):(c(e,4+(r?1:0),3),function(e,t,n,r){var s;for(c(e,t-257,5),c(e,n-1,5), c(e,r-4,4),s=0;s>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(P[n]+k+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}, n._tr_align=function(e){c(e,2,3),l(e,I,D),function(e){16===e.bi_valid?(a(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t){"use strict" ;t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}]},{},[10])(10)}},n={};e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){ if("object"==typeof window)return window}}(),e.o=(e,t)=>({}.hasOwnProperty.call(e,t)),(()=>{"use strict";function t(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e;else if(Zo.isArrayBuffer(e)||Zo.isArrayBufferView(e)){var n=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,n)}catch(e){for(var r=0;r=64;){for(a=0;a<16;++a)t[a]=n.getInt32();for(;a<64;++a)r=((r=t[a-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,s=((s=t[a-15])>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,t[a]=r+t[a-7]+s+t[a-16]|0;for(c=e.h0,l=e.h1,u=e.h2,d=e.h3,A=e.h4,p=e.h5,h=e.h6,f=e.h7,a=0;a<64;++a)i=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),o=c&l|u&(c^l),r=f+((A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7))+(h^A&(p^h))+jo[a]+t[a],f=h,h=p,p=A, A=d+r|0,d=u,u=l,l=c,c=r+(s=i+o)|0;e.h0=e.h0+c|0,e.h1=e.h1+l|0,e.h2=e.h2+u|0,e.h3=e.h3+d|0,e.h4=e.h4+A|0,e.h5=e.h5+p|0,e.h6=e.h6+h|0,e.h7=e.h7+f|0,m-=64}}function r(e,t){return e.toLowerCase()===t.toLowerCase()}function s(e){let t="";const n=e=>a(e)?parseInt(e,10):e>="A"&&e<="F"?e.charCodeAt(0)-"A".charCodeAt(0)+10:e.charCodeAt(0)-"a".charCodeAt(0)+10;let r=0;for(;r=e.length||!c(s)||!c(i)?(t+="%", r++):(t+=String.fromCharCode((n(s)<<4)+n(i)),r+=3)}return t}function i(e){return e.replace(/([^\x20-\x7E]|[,;])/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}function o(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function a(e){return e>="0"&&e<="9"}function c(e){return void 0!==e&&(a(e)||e>="A"&&e<="F"||e>="a"&&e<="f")}function l(e){if(e.endsWith("=")&&(e=e.substring(0,e.length-1)),e.endsWith("=")&&(e=e.substring(0,e.length-1)),0===e.length)return!1 ;for(const t of e)if(!o(t)&&!a(t)&&"+"!==t&&t!==yd&&t!==kd&&"_"!==t)return!1;return!0}function u(e,t){const n=e.GetCspNonce();if(!n)return!1;for(const e of t)if(e.isNonce()&&e.getNonce()===n)return!0;return!1}function d(e,t){return e.toLowerCase()===t}function A(e,t,n,r,s){const i=t.scheme;if(!e)return!0;if(e===i)return!0;if("http"===e){if("https"===i)return!0;if(("ws"===i||"wss"===i)&&s)return!0} return!("https"!==e||"wss"!==i||!s)||"ws"===e&&"wss"===i||r&&!n&&("http"===i&&"https"===e||"ws"===i&&"wss"===e)}let p;Object.fromEntries?p=Object.fromEntries:(p=e=>[...e].reduce(((e,[t,n])=>(e[t]=n,e)),{}),Object.fromEntries=p),Object.defineProperties(Promise.prototype,{done:{value:function(e){return this.then(((...t)=>e.apply(this,t)))},configurable:!0,enumerable:!0,writable:!1},fail:{value:function(e){return this.then((()=>{}),((...t)=>e.apply(this,t)))},configurable:!0,enumerable:!0, writable:!1},always:{value:function(e){return this.then(((...t)=>e.apply(this,t)),((...t)=>e.apply(this,t)))},configurable:!0,enumerable:!0,writable:!1}});const h=Promise;let f=0;const m=[],g=()=>{const e=["debug"],t=["log"],n=["warn","info"],r=["error"],s=[...e,...t,...n,...r],i=r;f>=80&&i.push(...e),f>=60&&i.push(...t),f>=30&&i.push(...n),s.forEach((e=>v[e]=i.includes(e)?console[e].bind(console):()=>{}))},v={set:e=>{f=e,m.forEach((e=>{e(v,f)})),g()},get:()=>f,get verbose(){ return(v.debug||(()=>{})).bind(console)},debug:()=>{},log:()=>{},warn:()=>{},info:()=>{},error:()=>{},addChangeListener:e=>{m.push(e)}};g();let w=[];const b={late:!1,init:()=>{},registerLateCallback:e=>{v.debug("toea: register callback"),w.push(e)},ensureLate:e=>{b.late?e():b.registerLateCallback(e)},setReady:()=>{v.debug("toea: run "+w.length+" callbacks"),b.late=!0;for(let e=0;e{const t=(()=>{let e,t;const n=[],r=[],s=e=>{r.push(e),i()},i=()=>{ if(void 0!==e){let n;for(;r.length;)n=r.shift(),void 0!==n.state&&n.state!==e||"function"==typeof n.f&&n.f.call(o,t)}},o={promise:()=>o,done:e=>(s({state:!0,f:e}),o),fail:e=>(s({state:!1,f:e}),o),always:e=>(s({f:e}),o),progress:e=>(e&&n.push(e),o),then:(e,n,r)=>y((s=>{const i=(e,n)=>(...r)=>{const i=e?e(t):void 0,o=i&&"function"==typeof i.promise?i.promise():null,a=i&&"function"==typeof i.then?i:null ;if(o)o.done((e=>s.resolve(e))).fail(((...e)=>s.reject(e[0]))).progress(((...e)=>s.notify(...e)));else if(a)a.then(((...e)=>s.resolve(...e)),(e=>s.reject(e)));else{const t=e?[i]:r;s[n](t[0])}};o.done(i(e,"resolve")),o.fail(i(n,"reject")),o.progress(i(r,"notify"))})).promise(),each:e=>{const t=y();return o.then((n=>{const r=Array.isArray(n)?n:[n];y.when(r.map((t=>e(t)))).then(t.resolve)})),t.promise()},iterate:e=>{const t=y();return o.then((n=>{const r=(Array.isArray(n)?n:[n]).map((t=>()=>e(t))) ;y.onebyone(r,!0).done((e=>{t.resolve(e)})).fail(t.reject)})),t.promise()}};return{get:()=>o,try_resolve:n=>(void 0===e&&(e=!0,t=n),i(),o),try_reject:n=>(void 0===e&&(e=!1,t=n),i(),o),do_notify:e=>((e=>{n.forEach((t=>t(e)))})(e),o)}})(),n={promise:()=>t.get(),resolve:e=>t.try_resolve(e),reject:e=>t.try_reject(e),notify:e=>t.do_notify(e), consume:e=>(e&&e.promise?e.promise().done((e=>n.resolve(e))).fail(((...e)=>n.reject(e[0]))).progress((e=>n.notify(e))):e&&e.then?e.then((e=>n.resolve(e)),((...e)=>n.reject(e[0]))):v.warn("promise: incompatible object given to consume()",e),n.promise())};return e&&e(n),n};y.Pledge=(...e)=>{const t=y();return t.resolve(...e),t.promise()},y.Breach=(...e)=>{const t=y();return t.reject(e[0]),t.promise()},y.onebyone=(e,t=!0)=>{const n=[],r=y();let s=0;const i=()=>{if(s{n.push(e),i()})).fail((()=>{if(n.push(null),t)return r.reject();i()})):o&&o.then?o.then((e=>{n.push(e),i()}),(()=>{if(n.push(null),t)return r.reject();i()})):(n.push(o),i())}else r.resolve(n)};return i(),r.promise()},y.or=e=>{let t;const n=y(),r=()=>{e.length?(t=e.shift(),t&&y.Pledge().then(t).done(n.resolve).fail(r)):n.reject()};return r(),n.promise()},y.sidebyside=e=>{e=Array.isArray(e)?e:[e];const t=y();let n=e.length;return n?e.forEach((e=>{ e&&e.promise&&e.promise().always((()=>{0==--n&&t.resolve()}))})):t.resolve(),t.promise()},y.when=e=>{e=Array.isArray(e)?e:[e];const t=y();let n=e.length;const r=[];return n?e.forEach((e=>{let s;if(e&&e.promise)s=e.promise();else{if(!e.then)return void v.warn("promise: incompatible object given to when()",e);s=e}s.fail((()=>{t.reject(),n=-1})).done((e=>{r.push(e),0==--n&&t.resolve(r)}))})):t.resolve(r),t.promise()},y.all=e=>y.when(e).then((()=>{})),y.from=e=>{const t=y() ;return e.then(t.resolve,t.reject),t.promise()},y.heal=e=>e instanceof Array?y.all(e.map((e=>y.from(e).then((()=>{}),(()=>y.Pledge()))))):y.from(e).then((()=>{}),(()=>{}));const k=globalThis;let R,x,E,S,{chrome:C,browser:M}=k;E=()=>{if(void 0!==R)return R;try{const e=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);e&&(R=parseInt(e[2]))}catch(e){}return R},S=()=>{if(void 0!==x)return x;try{x=-1!=navigator.userAgent.search(/Android|Mobile/)}catch(e){}return x};const I={STORAGE:{ SCHEMA:"#schema",TYPE:"#storage",CONFIG:"#config",SESSION:"#session",VERSION:"#version",LAST_START:"#laststart",UPDATE:"#update",BEGGING:"#begging",LEGACY_VERSION:"TM_version",STATE_DB:"!state",MISC_DB:"!misc",EXT_DB:"!extdb"},PREFIX:{SCRIPT_UID:"@uid#",COND:"@re#",STORE:"@st#",SCRIPT:"@source#",EXTERNAL:"@ext#",META:"@meta#"}},U=E()>=58,G={DEFAULT:"storage.local",SECURE:!1,NO_WARNING:!1},Z={RETRIES:0,PARTIAL_SIZE:1<<23,COOKIE_PASSTHROUGH:!1},T={HAS_SENDER_ID:!0, INTERNAL_PAGE_PROTOCOLS:["chrome-extension:"],SENDS_ORIGIN:!0};[].concat(["chrome"]);const B=(()=>{const e={getInternalPathRegexp:function(e,t){const n=new RegExp("(\\"+["/",".","+","?","|","(",")","[","]","{","}","\\"].join("|\\")+")","g"),r=T.INTERNAL_PAGE_PROTOCOLS[0]+"//"+B.id+"/";return new RegExp(r.replace(n,"\\$1")+"([a-zA-Z"+(e?"\\/":"")+"]*)"+(t||"").replace(n,"\\$1"))},getInternalPageRegexp:function(){return B.getInternalPathRegexp(!1,".html")}, getPlatformInfo:e=>C.runtime.getPlatformInfo(e),getBrowserInfo:e=>{e({name:"Chrome",version:`${E()}`,vendor:"unknown"})}};return Object.defineProperty(e,"lastError",{get:()=>C.runtime.lastError,enumerable:!0}),Object.defineProperty(e,"id",{get:()=>C.runtime.id,enumerable:!0}),Object.defineProperty(e,"short_id",{get:()=>e.id.replace(/[^0-9a-zA-Z]/g,"").substr(0,4),enumerable:!0}),e})(),O=(()=>{let e;return Object.defineProperties({},{inIncognitoContext:{ get:()=>(void 0===e&&(e=C.extension.inIncognitoContext),e),set:t=>{e=t},enumerable:!0},...Object.getOwnPropertyDescriptors({getURL:function(e){return C.runtime.getURL(e)},sendMessage:(e,t)=>C.runtime.sendMessage(e,t),onMessage:{addListener:e=>C.runtime.onMessage.addListener(e)},connect:e=>C.runtime.connect({name:e}),urls:{prepareForReport:function(e){return e}}})})})(),j={isDefaultStoreId:e=>!(void 0!==e),getIdFromStoreId:()=>{}},D={supported:!0,createDocument:async(e,t)=>{ await C.offscreen.createDocument({url:"offscreen.html",...e}),t&&t()},closeDocument:async e=>{await C.offscreen.closeDocument(),e&&e()}},F=e=>new h((t=>N(t,e)));let L=0;const P=async function(e,...t){await(()=>{const e=Date.now();if(L+1e3se((()=>{L=Date.now(),e()}),0)))})(),e.apply(this,t)},N=function(e,t){return t?se.apply(this,[e,t]):(P.apply(this,[e]),0)},V=e=>{const t=[],n=[],r=()=>{let s;if(n.length{let e;(e=n.indexOf(t))>-1&&n.splice(e,1),r()})),s.p.consume(t)}},s={add:function(e){const n=y();return t.push({fn:e,p:n}),r(),n.promise()}};return s},z=e=>{const t={},{retimeout_on_get:n,timeout:r,check_interval:s,auto_remove_mutex:i}=Object.assign({retimeout_on_get:!1,timeout:300,check_interval:120},e||{});let o;const a=()=>{c(),o=se(u,1e3*s)},c=()=>{o&&J(o),o=null},l=e=>{ const n=t[e];if(delete t[e],n){const{d:t,value:r}=n;return t.resolve([e,r]),r}},u=()=>{o=null;const e=Date.now()-1e3*r,n=Object.entries(t).filter((([t,n])=>n.ts{n.forEach((([e,t])=>{const n=t&&t.d;n&&n.resolve([e,t.value]),l(e)})),i&&i.release(),a()})):a()};r&&a();const d={set:(e,n)=>{const r=y();return t[e]={value:n,ts:Date.now(),d:r},r.promise()},get:(e,r)=>{const s=t[e];return s?(n&&(s.ts=Date.now()),s.value):r},remove:l,removeAll:()=>{ Object.keys(t).map((e=>l(e)))}};return d},{AbortController:q,FileReader:H,TextDecoder:Q,atob:W,btoa:X,clearInterval:Y,clearTimeout:J,crypto:K,decodeURIComponent:$,encodeURIComponent:ee,escape:te,location:ne,setInterval:re,setTimeout:se,unescape:ie}=self;let{fetch:oe}=self ;const ae=self,ce=ne.origin,le=ne.host,{addEventListener:ue,removeEventListener:de}=self,Ae=ue,{DOMParser:pe,Notification:he,Image:fe,Worker:me,alert:ge,confirm:ve,document:we,screen:be,webkitNotifications:_e,navigation:ye,showOpenFilePicker:ke}=self;let Re;try{Re=self.localStorage}catch(e){}const xe=Re;let{XMLHttpRequest:Ee}=self;const{clients:Se}=self,Ce=e=>[...new Set(e)],Me=(e,t,n)=>{const r=e.indexOf(t);if(-1==r)return"";if(!n)return e.substr(r+t.length) ;const s=e.substr(r+t.length).indexOf(n);return-1==s?"":e.substr(r+t.length,s)},Ie=(e,t)=>{null==t&&(t=[]);const n=new RegExp("(\\"+["/",".","+","?","|","(",")","[","]","{","}","\\"].concat(t).join("|\\")+")","g");return e.replace(n,"\\$1")},Ue=e=>Ie(e,["*"]),Ge=e=>(({}.toString.apply(e).match(/\s([a-z|A-Z]+)/)||[])[1]),Ze=(e,t)=>{const n=Ge(e);if("Array"===n||"NodeList"===n){for(let n=0;ne.slice(0,t)+r+e.slice(t+Math.abs(n)),Be=(e,t,n,r)=>{let s;if(Array.isArray(n)){const e={};n.forEach((t=>{e[t]=!0})),s=e}else s=n;return Ze(s||e,((n,i)=>{if(!s||s.hasOwnProperty(i)){let n;const o=e[i],a=Ge(o);if("Undefined"==a)return;if(s&&r&&(n=Ge(s[i]))&&n!==a&&("Array"===n||"Object"===n))return;"Object"==a?(t[i]={},Be(o,t[i],s?s[i]:null)):"Array"==a?(t[i]=[], Be(o,t[i])):t[i]=o}})),t},Oe=(e,t)=>{let n=!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return e===t;for(const[r,s]of Object.entries(t))if(void 0!==s&&(n=void 0!==e[r]&&(null===s?null===e[r]:s instanceof RegExp?!!`${e[r]}`.match(s):"object"==typeof s?Oe(e[r],s):e[r]===s),!n))break;return n},je=e=>(()=>{let t={};const n=e||1e3,r={clear:()=>{Ze(t,(e=>J(e))),t={}},is:(e,n)=>{const s=void 0!==t[e];return n&&r.add(e),s},add:(e,s)=>{r.is(e)&&J(t[e]),t[e]=se((()=>{delete t[e] }),s||n)}};return r})(),De=e=>Array.isArray(e)?e:[e],Fe=(e,t,n="both")=>"notinfirst"==n?t.filter((t=>!e.includes(t))):e.concat(t).filter((n=>!e.includes(n)||!t.includes(n))),Le=(e,t,n)=>{void 0===n&&(n="-");const r=t?/[:<>|~?*\x00-\x1F\uFDD0-\uFDEF"]/g:/[:<>|~?*\x00-\x1F\uFDD0-\uFDEF"\/\\]|^[.]|[.]$/g;return!t&&/^((CON|PRN|AUX|NUL|CLOCK\$|COM[1-9]|LPT[1-9])(\..*)?|device(\..*)?|desktop.ini|thumbs.db)$/i.test(e)?(n||"_")+e.replace(r,n):e.replace(r,n) },Pe=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),Ne=(e,t)=>{const n=[];for(let r=0,s=e.length;rthis.off(e,t)}once(e,t,n){const r=void 0===n||Array.isArray(n)?n:[n],s=this.on(e,((...e)=>(s(), t.bind(this)(...e))),r);return s}off(e,t){const n=this.events[e];n&&(this.events[e]=n.filter((e=>e.listener!==t)))}has(e,t){const n=this.events[e];return!!n&&n.some((e=>e.listener===t))}emit(e,...t){const n=this.events[e];if(n)for(const e of n){const{listener:n,filter:r}=e;if((!r||Oe(t,r))&&!0===n(...t))return!0}return!1}listening(e,t){const n=this.events[e];if(n){if(t){const e=Array.isArray(t)?t:[t];return n.filter((t=>!t.filter||Oe(t.filter,e))).length}return n.length}return 0}}class ze{ constructor(e){this.storage={},this.prefix=e}supported(){return y.Pledge(!0)}keys(){return y((({resolve:e})=>{const t=Object.keys(this.storage).filter((e=>e.startsWith(this.prefix)));e(t)})).promise()}list(){return y((({resolve:e})=>{const t=Object.keys(this.storage).filter((e=>e.startsWith(this.prefix))).map((e=>({key:e.substr(this.prefix.length),value:this.storage[e]})));e(t)})).promise()}set(e,t){return y((({resolve:n})=>{this.storage[`${this.prefix}${e}`]=t,n()})).promise()}get(e){ return y((({resolve:t})=>{const n=`${this.prefix}${e}`;n in this.storage?t(this.storage[n]):t(null)})).promise()}delete(e){return y((({resolve:t})=>{delete this.storage[`${this.prefix}${e}`],t()})).promise()}clear(){return y((({resolve:e})=>{this.storage={},e()})).promise()}}class qe{constructor(e,t){this.db=null,this.dbName=e,this.storeName=t}open(){const e=y();if(this.db)return e.resolve(this.db),e.promise();const t=indexedDB.open(this.dbName,1);return t.onerror=()=>{ e.reject(new Error("Error opening database."))},t.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)},t.onsuccess=t=>{this.db=t.target.result,e.resolve(this.db)},e.promise()}supported(){return y((async({resolve:e})=>{"undefined"!=typeof indexedDB?this.list().done((()=>e(!0))).fail((()=>e(!1))):e(!1)})).promise()}keys(){return this.open().then((e=>{ const t=y(),n=e.transaction(this.storeName,"readonly").objectStore(this.storeName).openCursor(),r=[];return n.onerror=()=>{t.reject(new Error("Error getting keys values."))},n.onsuccess=e=>{const n=e.target.result;n?(r.push(n.key),n.continue()):t.resolve(r)},t.promise()}))}list(){return this.open().then((e=>{const t=y(),n=e.transaction(this.storeName,"readonly").objectStore(this.storeName).openCursor(),r=[];return n.onerror=()=>{t.reject(new Error("Error listing values."))},n.onsuccess=e=>{ const n=e.target.result;n?(r.push({key:n.key,value:n.value}),n.continue()):t.resolve(r)},t.promise()}))}set(e,t){return this.open().then((n=>{const r=y(),s=n.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(t,e);return s.onerror=()=>{r.reject(new Error("Error setting value."))},s.onsuccess=()=>{r.resolve()},r.promise()}))}get(e){return this.open().then((t=>{const n=y(),r=t.transaction(this.storeName,"readonly").objectStore(this.storeName).get(e);return r.onerror=()=>{ n.reject(new Error("Error getting value."))},r.onsuccess=()=>{n.resolve(r.result)},n.promise()}))}delete(e){return this.open().then((t=>{const n=y(),r=t.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(e);return r.onerror=()=>{n.reject(new Error("Error deleting value."))},r.onsuccess=()=>{n.resolve()},n.promise()}))}clear(){return this.open().then((e=>{const t=y(),n=e.transaction(this.storeName,"readwrite").objectStore(this.storeName).clear();return n.onerror=()=>{ t.reject(new Error("Error clearing the store."))},n.onsuccess=()=>{t.resolve()},t.promise()}))}}const He=e=>ie(ee(e)),Qe=e=>$(te(e)),We=e=>{let t="";for(let n=0;nW(e),Ye=(e,t)=>{try{let n,r;if("object"==typeof t?(n=t.encoding,r=t.array):n=t,!r&&n)return new Q(n).decode(e);{let t=0;const r=[],s=e.byteLength;for(;t{try{let n;n="object"==typeof t?t.encoding:t,n&&"utf-8"==n.toLowerCase()&&(e=He(e));const r=new Uint8Array(e.length);for(let t=0;tnew Promise(((n,r)=>{const s=t&&t.encoding?"text/plain":"binary/octet-stream",i=new Blob([e],{type:s}),o=new H;o.onload=e=>{ e.target?n(e.target.result):r(new Error("Could not convert array to string!"))},t&&t.encoding?o.readAsText(i,t.encoding):o.readAsBinaryString(i)})),$e=(e,t)=>{const n=(e,t)=>e<>>32-t,r=(e,t)=>{const n=2147483648&e,r=2147483648&t,s=1073741824&e,i=1073741824&t,o=(1073741823&e)+(1073741823&t);return s&i?2147483648^o^n^r:s|i?1073741824&o?3221225472^o^n^r:1073741824^o^n^r:o^n^r},s=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>e&t|~e&n)(t,s,i),o),c)), r(n(e,a),t)),i=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>e&n|t&~n)(t,s,i),o),c)),r(n(e,a),t)),o=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>e^t^n)(t,s,i),o),c)),r(n(e,a),t)),a=(e,t,s,i,o,a,c)=>(e=r(e,r(r(((e,t,n)=>t^(e|~n))(t,s,i),o),c)),r(n(e,a),t)),c=e=>{let t,n,r="",s="";for(n=0;n<=3;n++)t=e>>>8*n&255,s="0"+t.toString(16),r+=s.substr(s.length-2,2);return r};let l,u,d,A,p,h,f,m,g,v=[];for(t&&"utf-8"==t.toLowerCase()&&(e=He(e)),v=(e=>{let t;const n=e.length,r=n+8,s=16*((r-r%64)/64+1),i=Array(s-1) ;let o=0,a=0;for(;a>>29,i})(e),h=1732584193,f=4023233417,m=2562383102,g=271733878,l=0;l{let t;t=e.split(",")[0].includes("base64")?W(e.split(",")[1]):ie(e.split(",")[1]);const n=e.split(",")[0].split(":")[1].split(";")[0];return new Blob([Je(t)],{type:n})},tt=e=>new Promise((t=>{const n=new H;n.onload=e=>{var n;t((null===(n=e.target)||void 0===n?void 0:n.result)||void 0)},n.readAsDataURL(e)})),nt=async(e,t)=>new Promise((n=>{const r=new H;r.onload=()=>{ n(r.result||"")},r.onerror=e=>{v.warn(`unable to decode data ${e}`),n(void 0)},t?r.readAsText(e,t):r.readAsBinaryString(e)}));class rt{constructor(e=1){if(this.waiting=[],e<0)throw new Error("Count must not be negative");this._count=e}acquire(){if(this._count>0)return this._count--,y.Pledge();{const e=y();return this.waiting.push(e.resolve),e.promise()}}release(){if(this.waiting.length>0){const e=this.waiting.shift();e&&e(void 0)}else this._count++}get count(){return this._count}} const st=new rt(1),it=new Ve,ot={};let at=[];it.on("download",(({id:e,url:t,error:n})=>{const r=ot[e];r?(r.state=n?"interrupted":"complete",at.forEach((t=>{t({id:e,state:{current:r.state}})})),se((()=>{delete ot[e]}),6e4)):console.warn("download event for unknown id",e,t)}));const ct={notDetermined:void 0,denied:"denied",authorized:"granted",provisional:"granted"};let lt=[],ut=[],dt=[],At=ct.notDetermined;it.on("notification",(({id:e,clicked:t,error:n})=>{ n?console.warn("notifications: error",e,n):(t&<.forEach((function(t){t(e)})),ut.forEach((function(t){t(e)})))})),it.on("permission",(({permission:e})=>{At=ct[e],dt.forEach((function(e){e(At)}))}));let pt=!0;(async()=>{await null,pt=!1})();const ht=Object.defineProperties({},{...Object.getOwnPropertyDescriptors(O),...Object.getOwnPropertyDescriptors({onConnect:{addListener:function(e){ if(!pt)throw new Error("extension.onConnect listener can only be registered during startup in non-persistent background pages!");return C.runtime.onUserScriptConnect?C.runtime.onUserScriptConnect.addListener(e):console.error("chrome.runtime.onUserScriptConnect is not available!"),C.runtime.onConnect.addListener(e)}},onConnectExternal:{addListener:function(e){if(!pt)throw new Error("extension.onConnectExternal listener can only be registered during startup in non-persistent background pages!") ;return C.runtime.onConnectExternal.addListener(e)}},onMessageExternal:{addListener:function(e){if(!pt)throw new Error("extension.onMessageExternal listener can only be registered during startup in non-persistent background pages!");return C.runtime.onMessageExternal.addListener(e)}},onMessage:{...O.onMessage,addDynamicListener:e=>{const t=(t,n,r)=>e(t,n,r) ;C.runtime.onUserScriptMessage?C.runtime.onUserScriptMessage.addListener(t):console.error("chrome.runtime.onUserScriptMessage is not available!"),O.onMessage.addListener(t)},addListener:e=>{if(!pt)throw new Error("extension.onMessage listener can only be registered during startup in non-persistent background pages!");return ht.onMessage.addDynamicListener(e)}}}),inIncognitoContext:{get:function(){return O.inIncognitoContext}},manifest:{get:function(){return C.runtime.getManifest()}} }),ft=Object.defineProperties({},{...Object.getOwnPropertyDescriptors(B),...Object.getOwnPropertyDescriptors({onInstalled:{addListener:function(e){if(!pt)throw new Error("runtime.onInstalled listener can only be registered during startup in non-persistent background pages!");C.runtime.onInstalled&&C.runtime.onInstalled.addListener(e)}},onUpdateAvailable:{addListener:function(e){ if(!pt)throw new Error("runtime.onUpdateAvailable listener can only be registered during startup in non-persistent background pages!");C.runtime.onUpdateAvailable&&C.runtime.onUpdateAvailable.addListener(e)}},setUninstallURL:e=>{C.runtime.setUninstallURL&&C.runtime.setUninstallURL(e)},getContexts:async e=>{if("getContexts"in C.runtime)return await C.runtime.getContexts(e)}})}),mt={onActivated:{addListener:function(e){ if(!pt)throw new Error("tabs.onActivated listener can only be registered during startup in non-persistent background pages!");return C.tabs.onActivated.addListener(e)},addDynamicListener:function(e){return C.tabs.onActivated.addListener(e)},removeListener:function(e){return C.tabs.onActivated.removeListener(e)}},onUpdated:{addListener:function(e){if(!pt)throw new Error("tabs.onUpdated listener can only be registered during startup in non-persistent background pages!") ;return C.tabs.onUpdated.addListener(e)},addDynamicListener:function(e){return C.tabs.onUpdated.addListener(e)},removeListener:function(e){return C.tabs.onUpdated.removeListener(e)}},onReplaced:{addListener:function(e){if(!pt)throw new Error("tabs.onReplaced listener can only be registered during startup in non-persistent background pages!");if(C.tabs.onReplaced)return C.tabs.onReplaced.addListener(e)},addDynamicListener:function(e){if(C.tabs.onReplaced)return C.tabs.onReplaced.addListener(e)}, removeListener:function(e){return C.tabs.onReplaced.removeListener(e)}},onRemoved:{addListener:function(e){if(!pt)throw new Error("tabs.onRemoved listener can only be registered during startup in non-persistent background pages!");return C.tabs.onRemoved.addListener(e)},addDynamicListener:function(e){return C.tabs.onRemoved.addListener(e)},removeListener:function(e){return C.tabs.onRemoved.removeListener(e)}},executeScript:function(e,t,n){return C.tabs.executeScript(e,t,n)},create:function(e,t){ let{url:n,active:r,index:s,openerTabId:i,windowId:o,parent:a,incognito:c}=e;const l={url:n,active:r,index:s,openerTabId:i,windowId:o};a&&(void 0!==(i=a.id)&&(i<0?console.warn(`tabs.create: openerTabId lower than 0 is not supported -> ${i}!`):l.openerTabId=i),void 0!==(o=a.windowId)&&(l.windowId=o)),c&>.supported?gt.getAll({windowTypes:["normal"]},(e=>{let n;return e.some((e=>e.incognito?n=e.id:null)),void 0===n?C.windows.create({url:l.url,incognito:!0},t):(l.windowId=n,C.tabs.create(l,t)) })):C.tabs.create(l,t)},update:function(e,t,n){return C.tabs.update(e,t,n)},remove:function(e,t){return C.tabs.remove(e,t)},highlight:function(e,t){if(!e||!e.tabs)return void(t&&t());const n=e.tabs instanceof Array?e.tabs:[e.tabs];if(!C.tabs.highlight){const e=n.pop();return C.tabs.update(e,{active:!0},(()=>{t&&t()}))}{const e=[];let r;const s=()=>{if(!n.length)return C.tabs.highlight({windowId:r,tabs:e},(()=>{C.windows.update(r,{focused:!0},(()=>{t&&t()}))}));{const t=n.pop();C.tabs.get(t,(t=>{ void 0===r&&(r=t.windowId),t.windowId===r&&e.push(t.index),s()}))}};s()}},getSelected:function(e,t){let n=1;const r=()=>mt.query({active:!0,lastFocusedWindow:!0,...e?{windowId:e}:{}},(e=>{C.runtime.lastError&&n-- >0?se(r,1):t&&t(e[0])}));return r()},get:function(e,t){return C.tabs.get(e,t)},query:function(e,t){return C.tabs.query(e,(e=>t(e||[])))},sendMessage:function(e,t,n,r){return"function"==typeof n&&(r=n,n={}),C.tabs.sendMessage(e,t,n,r)}},gt=C&&C.windows&&C.windows.getAll?{supported:!0, getAll:function(e,t){C.windows.getAll?C.windows.getAll(e,(e=>t(e||[]))):t([])},update:function(e,t,n){return C.windows.update(e,t,n)},get:function(e,t,n){return C.windows.get(e,t,n)}}:{supported:!1},vt={headerModificationSupported:!0,extraHeaderNeeded:C&&C.webRequest&&C.webRequest.OnBeforeSendHeadersOptions&&C.webRequest.OnBeforeSendHeadersOptions.hasOwnProperty("EXTRA_HEADERS"),onBeforeRequest:{addListener:(e,t,n)=>{ if(!pt)throw new Error("webRequest.onBeforeRequest.addListener can only be registered during startup in non-persistent background pages!");return C.webRequest.onBeforeRequest.addListener(e,t,n)},addDynamicListener:(e,t,n)=>C.webRequest.onBeforeRequest.addListener(e,t,n),removeListener:e=>C.webRequest.onBeforeRequest.removeListener(e),hasListener:e=>C.webRequest.onBeforeRequest.hasListener(e)},onBeforeSendHeaders:{addListener:(e,t,n)=>{ if(!pt)throw new Error("webRequest.onBeforeSendHeaders.addListener can only be registered during startup in non-persistent background pages!");return C.webRequest.onBeforeSendHeaders.addListener(e,t,n)},addDynamicListener:(e,t,n)=>C.webRequest.onBeforeSendHeaders.addListener(e,t,n),removeListener:e=>C.webRequest.onBeforeSendHeaders.removeListener(e),hasListener:e=>C.webRequest.onBeforeSendHeaders.hasListener(e)},onHeadersReceived:{addListener:(e,t,n)=>{ if(!pt)throw new Error("webRequest.onHeadersReceived.addListener can only be registered during startup in non-persistent background pages!");return C.webRequest.onHeadersReceived.addListener(e,t,n)},addDynamicListener:(e,t,n)=>C.webRequest.onHeadersReceived.addListener(e,t,n),removeListener:e=>C.webRequest.onHeadersReceived.removeListener(e),hasListener:e=>C.webRequest.onHeadersReceived.hasListener(e)},onBeforeRedirect:{addListener:(e,t,n)=>{ if(!pt)throw new Error("webRequest.onBeforeRedirect.addListener can only be registered during startup in non-persistent background pages!");return C.webRequest.onBeforeRedirect.addListener(e,t,n)},addDynamicListener:(e,t,n)=>C.webRequest.onBeforeRedirect.addListener(e,t,n),removeListener:e=>C.webRequest.onBeforeRedirect.removeListener(e),hasListener:e=>C.webRequest.onBeforeRedirect.hasListener(e)},onResponseStarted:{addListener:(e,t,n)=>{ if(!pt)throw new Error("webRequest.onResponseStarted.addListener can only be registered during startup in non-persistent background pages!");return C.webRequest.onResponseStarted.addListener(e,t,n)},addDynamicListener:(e,t,n)=>C.webRequest.onResponseStarted.addListener(e,t,n),removeListener:e=>C.webRequest.onResponseStarted.removeListener(e),hasListener:e=>C.webRequest.onResponseStarted.hasListener(e)},onErrorOccurred:{addListener:(e,t)=>{ if(!pt)throw new Error("webRequest.onErrorOccurred.addListener can only be registered during startup in non-persistent background pages!");return C.webRequest.onErrorOccurred.addListener(e,t)},addDynamicListener:(e,t)=>C.webRequest.onErrorOccurred.addListener(e,t),removeListener:e=>C.webRequest.onErrorOccurred.removeListener(e),hasListener:e=>C.webRequest.onErrorOccurred.hasListener(e)},handlerBehaviorChanged:()=>C.webRequest.handlerBehaviorChanged()},wt={supported:!(!C||!C.webNavigation), onCommitted:{addListener:function(e){if(!pt)throw new Error("webNavigation.onCommitted listener can only be registered during startup in non-persistent background pages!");if(C.webNavigation.onCommitted)return C.webNavigation.onCommitted.addListener(e)},addDynamicListener:function(e){if(C.webNavigation.onCommitted)return C.webNavigation.onCommitted.addListener(e)}},onUrlUpdated:C&&C.webNavigation&&(C.webNavigation.onHistoryStateUpdated||C.webNavigation.onReferenceFragmentUpdated)?{ addListener:function(e){if(!pt)throw new Error("webNavigation.onUrlUpdated listener can only be registered during startup in non-persistent background pages!");C.webNavigation.onHistoryStateUpdated&&C.webNavigation.onHistoryStateUpdated.addListener(e),C.webNavigation.onReferenceFragmentUpdated&&C.webNavigation.onReferenceFragmentUpdated.addListener(e)},addDynamicListener:function(e){C.webNavigation.onHistoryStateUpdated&&C.webNavigation.onHistoryStateUpdated.addListener(e), C.webNavigation.onReferenceFragmentUpdated&&C.webNavigation.onReferenceFragmentUpdated.addListener(e)}}:void console.warn("webNavigation onReferenceFragmentUpdated or onHistoryStateUpdated not supported, onurlchange will not work!"),onBeforeNavigate:{addListener:function(e,t){if(!pt)throw new Error("webNavigation.onBeforeNavigate listener can only be registered during startup in non-persistent background pages!") ;if(C.webNavigation.onBeforeNavigate)return C.webNavigation.onBeforeNavigate.addListener(e,t)},addDynamicListener:function(e,t){if(C.webNavigation.onBeforeNavigate)return C.webNavigation.onBeforeNavigate.addListener(e,t)}},onErrorOccurred:{addListener:function(e){if(!pt)throw new Error("webNavigation.onErrorOccurred listener can only be registered during startup in non-persistent background pages!");if(C.webNavigation.onErrorOccurred)return C.webNavigation.onErrorOccurred.addListener(e)}, addDynamicListener:function(e){if(C.webNavigation.onErrorOccurred)return C.webNavigation.onErrorOccurred.addListener(e)}}},bt=C&&C.action,_t=bt?{supported:!0,setIcon:function(e,t){const{path:n,...r}=e;let s={};return n&&(s=E()>=53?{19:n.replace(/\.png$/,"19.png"),38:n.replace(/\.png$/,"38.png"),16:n.replace(/\.png$/,"16.png"),24:n.replace(/\.png$/,"24.png"),32:n.replace(/\.png$/,"32.png")}:{19:n.replace(/\.png$/,"19.png"),38:n.replace(/\.png$/,"38.png")}),bt.setIcon({path:s,...r},t)}, setTitle:function(e){if(bt.setTitle)return bt.setTitle(e)},setBadgeText:function(e){if(bt.setBadgeText)return bt.setBadgeText(e)},setBadgeBackgroundColor:function(e){if(bt.setBadgeBackgroundColor)return bt.setBadgeBackgroundColor(e)},setBadgeTextColor:function(e){return bt.setBadgeTextColor?bt.setBadgeTextColor(e):null},setPopup:function(e){if(bt.setPopup)return bt.setPopup(e)},openPopup:()=>bt.openPopup?bt.openPopup():null}:{supported:!1 },yt=(C&&C.declarativeContent&&C.declarativeContent.onPageChanged&&(C.declarativeContent.PageStateMatcher,C.declarativeContent.RequestContentScript),M&&M.contentScripts&&M.contentScripts.register,M&&M.userScripts&&M.userScripts.register,{supported:!0,register:(...e)=>C.userScripts.register(...e),unregister:(...e)=>C.userScripts.unregister(...e),update:(...e)=>C.userScripts.update(...e),configureWorld:(...e)=>C.userScripts.configureWorld(...e),getScripts:(...e)=>C.userScripts.getScripts(...e), available:()=>{try{return!!C.userScripts}catch{return!1}}}),kt=(()=>{const e=C;return e&&e.scripting&&e.scripting.executeScript?{supported:!0,executeScript:t=>e.scripting.executeScript(t),registerContentScripts:t=>e.scripting.registerContentScripts(t),getRegisteredContentScripts:t=>e.scripting.getRegisteredContentScripts(t),unregisterContentScripts:t=>e.scripting.unregisterContentScripts(t)}:{supported:!1} })(),Rt=C&&C.declarativeNetRequest&&C.declarativeNetRequest.updateSessionRules&&C.declarativeNetRequest.getSessionRules?{supported:!0,getSessionRules:(...e)=>C.declarativeNetRequest.getSessionRules(...e),updateSessionRules:(e,t)=>new Promise(((n,r)=>{try{C.declarativeNetRequest.updateSessionRules(e,(()=>{const e=C.runtime.lastError;if(e){if(r(e),t)throw e}else t&&t(),n()}))}catch(e){if(r(e),t)throw e}}))}:{supported:!1},xt={onChanged:{addListener:function(e){ return C.storage.onChanged.addListener(e)}},local:(()=>{let e={},t={},n=null,r=!1,s=[];const i=e=>{r?s.push(e):e()},o=(i,o)=>{n&&J(n);const a=()=>{r=!0;let i=1;const a=()=>{let n;if((n=C.runtime.lastError)&&console.warn(n),0==--i){r=!1;const n=s;s=[],e={},t={},n.forEach((e=>e())),o&&o()}},c=()=>{Object.keys(e).length&&(i++,C.storage.local.set(e,a))};let l;(l=Object.keys(t)).length?(i++,C.storage.local.remove(l,(()=>{c(),a()}))):c(),a(),n=null};i?a():n=se(a,100)},a=(t,n)=>{if(t instanceof Array){ let e=1;const r={},s=()=>{0==--e&&n(r)};t.forEach((t=>{e++,a(t,(e=>{r[t]=e[t],s()}))})),s()}else if(void 0!==e[t]){const r={};r[t]=e[t],n(r)}else C.storage.local.get(t,n)},c=n=>{n instanceof Array?n.forEach((e=>c(e))):(t[n]=!0,delete e[n])},l={set:function(n,r){i((()=>{r&&s.push(r),Object.keys(n).forEach((r=>{var s,i;s=r,i=n[r],e[s]=i,delete t[s]})),o()}))},get:(e,t)=>{null===e?o(!0,(()=>{C.storage.local.get(null,t)})):i((()=>{const n="string"==typeof e||e instanceof Array?e:Object.keys(e) ;a(n,(e=>t(e)))}))},remove:function(e,t){i((()=>{t&&s.push(t),c(e),o()}))},clear:function(r){i((()=>{n&&J(n),s=[],e={},t={},C.storage.local.clear(r)}))}};return l})(),session:(()=>{const e=M||C;return{supported:e&&e.storage&&e.storage.session,set:t=>e.storage.session.set(t),get:t=>e.storage.session.get(t),remove:t=>e.storage.session.remove(t),clear:()=>e.storage.session.clear()}})(),managed:{supported:!!C&&!!C.storage.managed,set:function(e,t){return C.storage.managed.set(e,t)}, get:function(e,t){return C.storage.managed.get(e,t)},remove:function(e,t){return C.storage.managed.remove(e,t)},clear:function(e){return C.storage.managed.clear(e)}},sync:{supported:!0,set:function(e,t){return C.storage.sync.set(e,t)},get:function(e,t){return C.storage.sync.get(e,t)},remove:function(e,t){return C.storage.sync.remove(e,t)},clear:function(e){return C.storage.sync.clear(e)}}},Et=(()=>{const e=()=>C.downloads;return{supported:!0,onChanged:{addListener:function(t){var n ;if(!pt)throw new Error("downloads.onChanged listener can only be registered during startup in non-persistent background pages!");return null===(n=e())||void 0===n?void 0:n.onChanged.addListener(t)},addDynamicListener:function(t){var n;return null===(n=e())||void 0===n?void 0:n.onChanged.addListener(t)}},search:function(t,n){var r;return null===(r=e())||void 0===r?void 0:r.search(t,n)},cancel:function(t,n){var r;return null===(r=e())||void 0===r?void 0:r.cancel(t,n)},download:function(t,n){var r ;try{return null===(r=e())||void 0===r?void 0:r.download(t,n)}catch(e){n(void 0,e.message)}}}})(),St=async function(e,t,n){try{const n=await oe(e),r=await n.blob();t(await new Response(r).arrayBuffer())}catch(e){n(e.message)}},Ct=Object.defineProperties({},{...Object.getOwnPropertyDescriptors(j),...Object.getOwnPropertyDescriptors({getAll:function(e,t){return C.cookies.getAll(e,t)},remove:function(e,t){return C.cookies.remove(e,t)},set:function(e,t){return C.cookies.set(e,t)}})}),Mt={ supported:!1,set:()=>{}},It=!!(C&&C.commands&&C.commands.onCommand),Ut=(()=>{const e=C&&C.notifications;return e&&e.getPermissionLevel&&e.onPermissionLevelChanged&&e.onClicked?{supported:!0,onPermissionLevelChanged:{addListener:function(t){if(!pt)throw new Error("notifications.onPermissionLevelChanged listener can only be registered during startup in non-persistent background pages!");return e.onPermissionLevelChanged.addListener(t)},removeListener:function(t){ return e.onPermissionLevelChanged.removeListener(t)}},onClicked:{addListener:function(t){if(!pt)throw new Error("notifications.onClicked listener can only be registered during startup in non-persistent background pages!");return e.onClicked.addListener(t)},removeListener:function(t){return e.onClicked.removeListener(t)}},onClosed:{addListener:function(t){if(!pt)throw new Error("notifications.onClosed listener can only be registered during startup in non-persistent background pages!") ;return e.onClosed.addListener(t)},removeListener:function(t){return e.onClosed.removeListener(t)}},getPermissionLevel:function(t){return e.getPermissionLevel(t)},create:function(t,n,r){return e.create(t,n,r)},clear:function(t,n){return e.clear(t,n)}}:{supported:!1}})(),Gt=C&&C.contextMenus&&C.contextMenus.create&&C.contextMenus.update&&C.contextMenus.remove?{supported:!0,create:function(e,t){return C.contextMenus.create(e,t)},update:function(e,t,n){return C.contextMenus.update(e,t,n)}, remove:function(e,t){return C.contextMenus.remove(e,t)},removeAll:function(e){return C.contextMenus.removeAll(e)},onClicked:{addListener:function(e){if(!pt)throw new Error("contextMenus.onClicked listener can only be registered during startup in non-persistent background pages!");return C.contextMenus.onClicked.addListener(e)}}}:{supported:!1},Zt=(()=>{const e=C&&C.permissions&&!!C.permissions.getAll;return e?{supported:e,getAll:t=>{if(e)return C.permissions.getAll(t);t&&t({permissions:[], origins:[]})},contains:(t,n)=>{if(e)return C.permissions.contains(t,n);n&&n(!1)},request:(t,n)=>{if(e)return C.permissions.request(t,n);n&&n(!1)},remove:(t,n)=>{if(e)return C.permissions.remove(t,n);n&&n(!1)},onAdded:{addListener:t=>{if(e&&C.permissions.onAdded)return C.permissions.onAdded.addListener(t)}},onRemoved:{addListener:t=>{if(e&&C.permissions.onRemoved)return C.permissions.onRemoved.addListener(t)}}}:{supported:!1}})(),Tt={native_support:!0,getMessage:function(...e){ return C.i18n.getMessage(...e)},getUILanguage:function(){return C.i18n.getUILanguage?C.i18n.getUILanguage():navigator.language},getAcceptLanguages:function(e){return C.i18n.getAcceptLanguages?C.i18n.getAcceptLanguages(e):e([])}},Bt=function(e,t){return C.idle?C.idle.queryState(e,t):t("unknown")},Ot=(()=>{if(!C||!C.alarms||!C.alarms.create)return{supported:!1};const e={supported:!0,create:(e,t)=>new Promise((n=>{(C.alarms.create(e,t)||Promise.resolve()).then((()=>n()))})), get:e=>new Promise((t=>C.alarms.get(e,(e=>t(e))))),getAll:()=>new Promise((e=>C.alarms.getAll((t=>e(t))))),clear:e=>new Promise((t=>C.alarms.clear(e,(e=>t(e))))),clearAll:()=>new Promise((e=>C.alarms.clearAll((t=>e(t))))),onAlarm:{addListener:e=>{if(!pt)throw new Error("alarms.onAlarm listener can only be registered during startup in non-persistent background pages!");return C.alarms.onAlarm.addListener(e)}}};return e})(),jt={supported:!1};let Dt=!1;(async()=>{try{ xe&&(G.NO_WARNING="nowarning"===xe.getItem("#brokenprofile"))}catch(e){console.warn("prep: error at storage type detection",e)}var e;e=e=>{Dt=e},C.extension.isAllowedFileSchemeAccess?C.extension.isAllowedFileSchemeAccess(e):e(!1)})();const Ft=()=>Dt;class Lt{constructor(e){this.pack=e=>e,this.unpack=e=>e,this.origin=null,this.prefix=e,this.origin=O.inIncognitoContext?"incognito":"normal",this.pack=e=>({origin:this.origin,value:e}),this.unpack=e=>e.value}supported(){return y.Pledge(!!xt.local)} keys(){return y((async({resolve:e})=>{xt.local.get(null,(t=>{const n=Object.keys(t).filter((e=>e.startsWith(this.prefix)));e(n)}))})).promise()}list(){return y((async({resolve:e})=>{xt.local.get(null,(t=>{const n=Object.entries(t).filter((([e,t])=>e.startsWith(this.prefix))).map((([e,t])=>({key:e.substr(this.prefix.length),value:this.unpack(t)})));e(n)}))})).promise()}set(e,t){return y((async({resolve:n})=>{xt.local.set({[`${this.prefix}${e}`]:this.pack(t)},(()=>n()))})).promise()}get(e){ return y((async({resolve:t})=>{const n=`${this.prefix}${e}`;xt.local.get(n,(e=>{const r=e&&n in e?this.unpack(e[n]):null;t(r||null)}))})).promise()}delete(e){return y((async({resolve:t})=>{xt.local.remove(`${this.prefix}${e}`,(()=>t()))})).promise()}clear(){return y((async({resolve:e})=>{this.list().then((t=>{const n=t.map((e=>`${this.prefix}${e.key}`));xt.local.remove(n,(()=>e()))}))})).promise()}on(e,t){if(!["add","change","remove"].includes(e))throw new Error("Unknown event") ;if(!this.origin)throw new Error("No origin set");let n=this.events;if(!n){const e=n=this.events=new Ve;xt.onChanged.addListener(((t,n)=>{if("local"==n&&t)for(const[n,r]of Object.entries(t)){if(!n.startsWith(this.prefix))continue;const{newValue:t,oldValue:s}=r;let i;if(t?i=t:s&&(i=s),i&&"object"==typeof i&&"origin"in i&&i.origin===this.origin)continue;const o=n.substr(this.prefix.length),a=t&&"object"==typeof t&&"origin"in t?this.unpack(t):r,c=s&&"object"==typeof s&&"origin"in s?this.unpack(s):r ;if(t)s?e.emit("change",{key:o,value:a,old:c}):e.emit("add",{key:o,value:a});else{if(!s)throw new Error("Invalid change");e.emit("remove",{key:o,value:a})}}}))}n.on(e,t)}}const Pt=(e,t)=>{if(!e)return t;const n=e[0];switch(e=e.substring(1),n){case"b":return"true"==e;case"n":return Number(e);case"o":try{return JSON.parse(e)}catch(e){console.error("Storage: getValue ERROR: "+e.message)}return t;case"x":try{return Qe(Xe(e))}catch(t){return e}default:return e}},Nt=e=>{const t=(typeof e)[0] ;if("o"===t)try{e=t+JSON.stringify(e)}catch(n){console.error("Storage: setValue ERROR: "+n.message),e=t+JSON.stringify({})}else e=t+e;return e};class Vt{constructor(e){this.prefix=e,this.storage=xe}supported(){let e=!1;try{this.storage&&(this.storage.setItem("test","1"),this.storage.removeItem("test"),e=!0)}catch(e){}return y.Pledge(e)}keys(){return y((({resolve:e})=>{const t=[];for(let e=0;ee.map((e=>({key:e,value:this.storage[e]})))))}set(e,t){return y((({resolve:n})=>{const r=`${this.prefix}.${e}`;this.storage[r]=t,this.storage.setItem(r,Nt(t)),n()})).promise()}get(e){return y((({resolve:t})=>{const n=`${this.prefix}${e}`;t(Pt(this.storage.getItem(n)||null))})).promise()}delete(e){return y((({resolve:t})=>{const n=`${this.prefix}${e}`;this.storage.removeItem(n),t()})).promise()}clear(){return y((({resolve:e})=>{this.keys().then((e=>{e.forEach((e=>{ this.storage.removeItem(e)}))})),e()})).promise()}}const{STORAGE:{EXT_DB:zt,VERSION:qt,TYPE:Ht,LEGACY_VERSION:Qt}}=I,Wt=[qt,Ht];let Xt;const Yt=[{type:"memory",init:()=>new ze("")},{type:"indexedDB",init:()=>new qe("ext","general"),persistent:!0},{type:"localStorage",init:()=>new Vt(""),persistent:!0},(()=>{const e=new Ve;return{type:"storage.local",init:()=>{const t=new Lt(`${zt}.`);return["change","add","remove"].forEach((n=>{t.on(n,(t=>{e.emit(n,t)}))})),t},events:e,persistent:!0}})()] ;let Jt=!1;const Kt=async(e,t,n)=>{const r=await e.list();await Promise.all(r.map((async({key:r,value:s})=>{n.drop&&await e.delete(r),await t.set(r,s)})))},$t=new Ve;let en=G.DEFAULT;const tn={setValue:async(e,t)=>{await h.all(Yt.map((({active:n,instance:r})=>{if(n)return r.set(e,t)})))},setValues:async e=>{await h.all(Object.keys(e).map((t=>{const n=e[t];return tn.setValue(t,n)})))},getValue:(e,t)=>{let n;return Yt[0].instance.get(e).then((e=>n=e)),null!=n?n:t},deleteAll:async()=>{ const e=Yt[0].instance,t=await((e,t)=>{const n={};return y.all(t.map((t=>e.get(t).then((e=>{null!=e&&(n[t]=e)}))))).then((()=>n))})(e,Wt);await h.all(Yt.map((async({active:e,instance:n})=>{e&&(await n.clear(),await((e,t)=>{const n=y(),r=[];return Object.getOwnPropertyNames(t).forEach((n=>{void 0!==t[n]&&r.push(e.set(n,t[n]))})),y.when(r).done((()=>{n.resolve()})),n.promise()})(n,t))})))},deleteValue:async e=>{await h.all(Yt.map((({active:t,instance:n})=>{if(t)return n.delete(e)})))}, listValues:()=>{const e=Yt[0].instance;let t=[];return e.keys().then((e=>t=e)),t},isWorking:async()=>{let e=!0;return await h.all(Yt.map((async({instance:t})=>{const n=await t.supported();e=e&&!!n}))),e},migrate:async(e,t,n)=>{const r=Yt.find((t=>t.type==e)),s=Yt.find((e=>e.type==t)),i=n||{};if(!r||!s)throw new Error(`Migration: unknown storage implementation(s): ${e} -> ${t}`);if(!(i.force||r.active&&s.active))throw new Error("Migration: inactive source or target") ;r.instance=r.instance||r.init(),s.instance=s.instance||s.init();const{instance:o}=r,{instance:a}=s;if(!await o.supported())throw new Error("Migration failed. Source storage is not supported.");if(!await a.supported())throw new Error("Migration failed. Target storage is not supported.");await Kt(o,a,i)},setTemporary:e=>{if(Jt!=e)return Jt=e,tn.init()},init:async()=>{let e,t;for(const n of[...Yt].reverse()){n.active=!1;const{persistent:r,init:s,type:i}=n;let o,a=n.instance ;if(a||(a=n.instance=s(),n.events&&(n.events.on("add",(async({key:e,value:t})=>{n.active&&(await h.all(Yt.map((({type:n,active:r,instance:s})=>{if(r&&i!=n)return s.set(e,t)}))),$t.emit("add",{key:e,value:t}))})),n.events.on("change",(async({key:e,value:t,old:r})=>{n.active&&(await h.all(Yt.map((({type:n,active:r,instance:s})=>{if(r&&i!=n)return s.set(e,t)}))),$t.emit("change",{key:e,value:t,old:r}))})),n.events.on("remove",(async({key:e,value:t})=>{ n.active&&(await h.all(Yt.map((({type:t,active:n,instance:r})=>{if(n&&i!=t)return r.delete(e)}))),$t.emit("remove",{key:e,value:t}))})))),r){if(i!==en)continue;if(o=await a.supported(),!o)continue;const t=await a.get(Ht);if(t&&(en=t,i!==en))continue;e=n}("storage.session"!==i||Jt)&&(void 0===o&&(o=await a.supported()),o&&(t&&await Kt(t.instance,a,{drop:!1}),t=n,Xt&&(await Kt(Xt,a,{drop:!1}),Xt=void 0),Jt&&r||(console.debug("Storage: use "+n.type),n.active=!0)))} e||console.error("No persistent storage found. Using memory only, but this will cause data loss on every background context restart!")},on:(e,t,n)=>{$t.on(e,(({key:e,value:n})=>{t(e,n)}),n)},factoryReset:()=>(xe&&xe.removeItem(Qt),tn.deleteAll()),get used(){return en}},nn=tn,rn=e=>({utm_source:"ext",utm_medium:e.substr(0,3),utm_campaign:B.short_id}),sn={protocol:"https:",www:"www",api:"api",domain:"userscript.zone"},{STORAGE:{MISC_DB:on}}=I,an=(e,t,n)=>{ const r=new rt(1),s=`${e}.${t}`,i=new Lt(`${on}.`),o={get:e=>{let o={};const a=void 0===e||Array.isArray(e)?e:[e];return r.acquire().then((()=>i.get(s))).then((e=>{if(null===e&&n&&xe){const r=n[t];if(r){const{key:t,from:n}="string"==typeof r?{key:r,from:e=>e}:r;try{e=JSON.parse(n(xe.getItem(t))||"")}catch(e){}}}if(null!==e)if(a)for(const t of a)o[t]=e[t];else o=e;return o})).always((()=>r.release()))},set:e=>r.acquire().then((()=>i.get(s))).then((r=>{r||(r={}), Object.entries(e).forEach((([e,t])=>{null===t?delete r[e]:void 0!==t&&(r[e]=t)}));const o=n?n[t]:null;if(o&&xe){const{key:e,to:t}="string"==typeof o?{key:o,to:e=>e}:o;try{xe.setItem(e,t(JSON.stringify(r)))}catch(e){}}return i.set(s,r)})).always((()=>r.release())),delete:e=>{const t=(Array.isArray(e)?e:[e]).reduce(((e,t)=>(e[t]=null,e)),{});return o.set(t)},clear:()=>r.acquire().then((()=>{const e=n?n[t]:null;if(e&&xe){const{key:t}="string"==typeof e?{key:e}:e;xe.removeItem(t)}return i.delete(s) })).always((()=>r.release()))};return o},cn=[{name:"ECMAScript 5",value:["// ==UserScript==","// @name New Userscript","// @namespace http://tampermonkey.net/","// @version <$DATE$>","// @description try to take over the world!","// @author You","// @match <$URL$>","// @icon <$ICON$>","// @grant none","// ==/UserScript==","","(function() {"," 'use strict';",""," // Your code here...","})();"].join("\n")},{name:"ECMAScript 6", value:["// ==UserScript==","// @name New ES6-Userscript","// @namespace http://tampermonkey.net/","// @version <$DATE$>","// @description shows how to use babel compiler","// @author You","// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js","// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js","// @match <$URL$>","// @icon <$ICON$>","// ==/UserScript==","","var inline_src = (<>).toString();",'var c = Babel.transform(inline_src, { presets: [ "es2015", "es2016" ] });',"eval(c.code);"].join("\n") },{name:"CoffeeScript", value:["// ==UserScript==","// @name New Coffee-Userscript","// @namespace http://tampermonkey.net/","// @version <$DATE$>","// @description shows how to use coffeescript compiler","// @author You","// @require http://coffeescript.org/browser-compiler/coffeescript.js","// @match <$URL$>","// @icon <$ICON$>","// ==/UserScript==","","var inline_src = (<>).toString();","var compiled = this.CoffeeScript.compile(inline_src);","eval(compiled);"].join("\n") }],ln={},un={enabled:!0,configMode:0,debug:!1,logLevel:0,showFixedSrc:!1,webrequest_modHeaders:"yes",webrequest_fixCSP:"auto",webrequest_fixContentCSP:"no",notification_showUpdate:"changelog",notification_silentScriptUpdate:!0,script_templates:cn,scriptUpdateCheckPeriod:864e5,scriptUpdateHideNotificationAfter:6e4,scriptUpdateCheckDisabled:!1,scriptUpdateAutomaticInstall:!0,scriptUrlDetection:"auto",script_cookie_access:["iikm","dhdg","fire"].includes(ft.short_id)?"!httponly":"all", script_file_access:"externals",trash_mode:"on",trash_cleanup_after:6048e5,runtime_strict_mode:"byscript",runtime_top_level_await:"default",runtime_run_in:[],runtime_inject_mode:"default",runtime_content_mode:"userscripts",autoReload:!1,appearance_badges:"alltime",appearance_badge_color:["gcal","fcmf","firb","heif"].includes(ft.short_id)?"#444":"#ee3131",appearance_badge_text_color:"#ffffff",context_menu_enabled:!0,context_menu_scripts:!0,context_menu_commands:!0,editor_enabled:!0, editor_fontSize:100,editor_theme:"default",editor_keyMap:"windows",editor_indentUnit:4,editor_tabSize:4,editor_indentWithTabs:"spaces",editor_tabMode:"indent",editor_electricChars:!0,editor_autoSave:!1,editor_easySave:!0,editor_autoLint:!0,editor_autoLintMaxLen:1e6,editor_lineWrapping:!1,userscript_search_url:sn,userscript_search_mode:"off",editor_highlightTrailingWhitespace:!0,editor_trimTrailingSpacesFromModifiedLines:!0,editor_highlightSelectionMatches:"cursor",editor_linter_config:null, favicon_service:"google",i18n:null,action_menu_columns:1,action_menu_scripts_hide_disabled:!1,action_menu_scripts_sort:"auto",incognito_mode:"temporary",layout:"default",layout_user_css:"",sync_enabled:!1,sync_type:2,statistics_enabled:!0,downloads_mode:"default", downloads_extension_whitelist:["/^[^\\.]*$/","/\\.(mp[34a]|m4[ab]|m3u|wma|wav|aac|og[ag]|cda|flac)$/","/\\.(avi|mkv|flv|divx|mpe?g|webm)$/","/\\.(jpe?g|jpe|png|gif|bmp|tiff?|webp|hei[cf]|avif|jxl|svg|eps|ai|ico|dds|psd|xcf|raw|cr2|nef|arw)$/","/\\.(srt|sub|idx)$/","/\\.(ttf|otf|woff)$/","/\\.(txt|pdf|json|yml|xml|csv)$/",".iso","/\\.(zip|tgz|tar|bin)$/","/\\.r(ar|[0-9]{2,2})$/",".rss"],external_update_interval:0,external_connect:"all",require_timeout:2e4, require_blacklist:["/^https?:\\/\\/example.com(:[0-9]{1,5})?\\/.*/"],require_sri_mode:"supported",sandbox_mode:"default",script_include_mode:"default",script_blacklist_server:[],script_blacklist_type:"server",script_blacklist_severity:4,tags_enabled:!0,tags:{"social media":{},utilities:{},games:{},productivity:{},news:{}},background_control:!1,connect_mode:"ask",page_filter_mode:"black",page_whitelist:["/https?:\\/\\/greasyfork\\.org\\/.*/","http://xkcd.com/970/"], forbiddenPages:["*example.org/*","*paypal.tld/*","*stripe.com/*","https://*deutsche-bank-24.tld/*","https://*bankofamerica.tld/*","/^.*:\\/\\/apis\\.google\\.com\\/((?!render)([^\\/]+)\\/)+([^\\/]+)?$/","*://www.facebook.com/plugins/*","*://platform.twitter.com/widgets/*"]},dn={cloud_url:null,cloud_user:null,cloud_pass:null,missing_host_permissions:[]},An=e=>{let t,n=nn.getValue(I.STORAGE.CONFIG,{});return n instanceof Object||(n={}),void 0!==(t=n[e])?t:"function"==typeof(t=un[e])?t():t },pn=(e,t)=>{let n=nn.getValue(I.STORAGE.CONFIG,{});n instanceof Object||(n={});const r=An(e);n[e]=t;const s=nn.setValue(I.STORAGE.CONFIG,n),i=ln[e];return i&&JSON.stringify(r)!=JSON.stringify(t)&&i.forEach((n=>{try{n(e,r,t,s)}catch(e){v.warn("config: changeListener error",e)}})),y.from(s)};let hn={};const fn=an("session","data",{data:{key:I.STORAGE.SESSION,from:e=>Xe(e),to:e=>We(e)}}),mn=e=>{let t;return void 0!==(t=hn[e])?t:dn[e]},gn=(e,t)=>{const n=mn(e) ;return void 0===t?delete hn[e]:hn[e]=t,fn.set(hn).then((()=>{const r=ln[e];r&&JSON.stringify(n)!=JSON.stringify(t)&&r.forEach((r=>{try{r(e,n,t)}catch(e){v.warn("config: changeListener error",e)}}))}))},vn={initialized:!1,values:{},snapshot:{},init:()=>fn.get().then((e=>{e&&(hn=e)})).then((()=>{const e={};Object.defineProperty(vn,"snapshot",{get:function(){return{...vn.values}},enumerable:!0}),Object.keys(un).forEach((t=>{Object.defineProperty(e,t,{get:function(){return An(t)},set:function(e){ pn(t,e)},enumerable:!0})})),Object.keys(dn).forEach((t=>{Object.defineProperty(e,t,{get:function(){return mn(t)},set:function(e){gn(t,e)},enumerable:!0})})),vn.values=e,vn.initialized=!0})),getValue:e=>dn.hasOwnProperty(e)?mn(e):An(e),setValue:(e,t)=>dn.hasOwnProperty(e)?gn(e,t):pn(e,t),getDefaults:()=>un,addChangeListener:(e,t)=>{De(e).forEach((e=>{let n=ln[e];n||(n=ln[e]=[]),n.push(t)}))} },wn=vn,bn=".tld",_n="aaa\naarp\nabb\nabbott\nabogado\nac\nacademy\naccenture\naccountant\naccountants\naco\nactive\nactor\nad\nadac\nads\nadult\nae\naeg\naero\naf\nafl\nag\nagency\nai\naig\nairforce\nairtel\nal\nalibaba\nalipay\nallfinanz\nalsace\nam\namica\namsterdam\nan\nanalytics\nandroid\nao\napartments\napp\napple\naq\naquarelle\nar\naramco\narchi\narmy\narpa\narte\nas\nasia\nassociates\nat\nattorney\nau\nauction\naudi\naudio\nauthor\nauto\nautos\naw\nax\naxa\naz\nazure\nba\nbaidu\nband\nbank\nbar\nbarcelona\nbarclaycard\nbarclays\nbargains\nbauhaus\nbayern\nbb\nbbc\nbbva\nbcn\nbd\nbe\nbeats\nbeer\nbentley\nberlin\nbest\nbet\nbf\nbg\nbh\nbharti\nbi\nbible\nbid\nbike\nbing\nbingo\nbio\nbiz\nbj\nbl\nblack\nblackfriday\nbloomberg\nblue\nbm\nbms\nbmw\nbn\nbnl\nbnpparibas\nbo\nboats\nboehringer\nbom\nbond\nboo\nbook\nboots\nbosch\nbostik\nbot\nboutique\nbq\nbr\nbradesco\nbridgestone\nbroadway\nbroker\nbrother\nbrussels\nbs\nbt\nbudapest\nbugatti\nbuild\nbuilders\nbusiness\nbuy\nbuzz\nbv\nbw\nby\nbz\nbzh\nca\ncab\ncafe\ncal\ncall\ncamera\ncamp\ncancerresearch\ncanon\ncapetown\ncapital\ncar\ncaravan\ncards\ncare\ncareer\ncareers\ncars\ncartier\ncasa\ncash\ncasino\ncat\ncatering\ncba\ncbn\ncc\ncd\nceb\ncenter\nceo\ncern\ncf\ncfa\ncfd\ncg\nch\nchanel\nchannel\nchat\ncheap\nchloe\nchristmas\nchrome\nchurch\nci\ncipriani\ncircle\ncisco\ncitic\ncity\ncityeats\nck\ncl\nclaims\ncleaning\nclick\nclinic\nclinique\nclothing\ncloud\nclub\nclubmed\ncm\ncn\nco\ncoach\ncodes\ncoffee\ncollege\ncologne\ncom\ncommbank\ncommunity\ncompany\ncompare\ncomputer\ncomsec\ncondos\nconstruction\nconsulting\ncontact\ncontractors\ncooking\ncool\ncoop\ncorsica\ncountry\ncoupons\ncourses\ncr\ncredit\ncreditcard\ncreditunion\ncricket\ncrown\ncrs\ncruises\ncsc\ncu\ncuisinella\ncv\ncw\ncx\ncy\ncymru\ncyou\ncz\ndabur\ndad\ndance\ndate\ndating\ndatsun\nday\ndclk\nde\ndealer\ndeals\ndegree\ndelivery\ndell\ndeloitte\ndelta\ndemocrat\ndental\ndentist\ndesi\ndesign\ndev\ndiamonds\ndiet\ndigital\ndirect\ndirectory\ndiscount\ndj\ndk\ndm\ndnp\ndo\ndocs\ndog\ndoha\ndomains\ndoosan\ndownload\ndrive\ndubai\ndurban\ndvag\ndz\nearth\neat\nec\nedeka\nedu\neducation\nee\neg\neh\nemail\nemerck\nenergy\nengineer\nengineering\nenterprises\nepson\nequipment\ner\nerni\nes\nesq\nestate\net\neu\neurovision\neus\nevents\neverbank\nexchange\nexpert\nexposed\nexpress\nfage\nfail\nfairwinds\nfaith\nfamily\nfan\nfans\nfarm\nfashion\nfast\nfeedback\nferrero\nfi\nfilm\nfinal\nfinance\nfinancial\nfirestone\nfirmdale\nfish\nfishing\nfit\nfitness\nfj\nfk\nflickr\nflights\nflorist\nflowers\nflsmidth\nfly\nfm\nfo\nfoo\nfootball\nford\nforex\nforsale\nforum\nfoundation\nfox\nfr\nfresenius\nfrl\nfrogans\nfrontier\nfund\nfurniture\nfutbol\nfyi\nga\ngal\ngallery\ngallup\ngame\ngarden\ngb\ngbiz\ngd\ngdn\nge\ngea\ngent\ngenting\ngf\ngg\nggee\ngh\ngi\ngift\ngifts\ngives\ngiving\ngl\nglass\ngle\nglobal\nglobo\ngm\ngmail\ngmo\ngmx\ngn\ngold\ngoldpoint\ngolf\ngoo\ngoog\ngoogle\ngop\ngot\ngov\ngp\ngq\ngr\ngrainger\ngraphics\ngratis\ngreen\ngripe\ngroup\ngs\ngt\ngu\ngucci\nguge\nguide\nguitars\nguru\ngw\ngy\nhamburg\nhangout\nhaus\nhdfcbank\nhealth\nhealthcare\nhelp\nhelsinki\nhere\nhermes\nhiphop\nhitachi\nhiv\nhk\nhm\nhn\nhockey\nholdings\nholiday\nhomedepot\nhomes\nhonda\nhorse\nhost\nhosting\nhoteles\nhotmail\nhouse\nhow\nhr\nhsbc\nht\nhu\nhyundai\nibm\nicbc\nice\nicu\nid\nie\nifm\niinet\nil\nim\nimmo\nimmobilien\nin\nindustries\ninfiniti\ninfo\ning\nink\ninstitute\ninsurance\ninsure\nint\ninternational\ninvestments\nio\nipiranga\niq\nir\nirish\nis\niselect\nist\nistanbul\nit\nitau\niwc\njaguar\njava\njcb\nje\njetzt\njewelry\njlc\njll\njm\njmp\njo\njobs\njoburg\njot\njoy\njp\njprs\njuegos\nkaufen\nkddi\nke\nkfh\nkg\nkh\nki\nkia\nkim\nkinder\nkitchen\nkiwi\nkm\nkn\nkoeln\nkomatsu\nkp\nkpn\nkr\nkrd\nkred\nkw\nky\nkyoto\nkz\nla\nlacaixa\nlamborghini\nlamer\nlancaster\nland\nlandrover\nlanxess\nlasalle\nlat\nlatrobe\nlaw\nlawyer\nlb\nlc\nlds\nlease\nleclerc\nlegal\nlexus\nlgbt\nli\nliaison\nlidl\nlife\nlifeinsurance\nlifestyle\nlighting\nlike\nlimited\nlimo\nlincoln\nlinde\nlink\nlive\nliving\nlixil\nlk\nloan\nloans\nlol\nlondon\nlotte\nlotto\nlove\nlr\nls\nlt\nltd\nltda\nlu\nlupin\nluxe\nluxury\nlv\nly\nma\nmadrid\nmaif\nmaison\nmakeup\nman\nmanagement\nmango\nmarket\nmarketing\nmarkets\nmarriott\nmba\nmc\nmd\nme\nmed\nmedia\nmeet\nmelbourne\nmeme\nmemorial\nmen\nmenu\nmeo\nmf\nmg\nmh\nmiami\nmicrosoft\nmil\nmini\nmk\nml\nmm\nmma\nmn\nmo\nmobi\nmobily\nmoda\nmoe\nmoi\nmom\nmonash\nmoney\nmontblanc\nmormon\nmortgage\nmoscow\nmotorcycles\nmov\nmovie\nmovistar\nmp\nmq\nmr\nms\nmt\nmtn\nmtpc\nmtr\nmu\nmuseum\nmutuelle\nmv\nmw\nmx\nmy\nmz\nna\nnadex\nnagoya\nname\nnatura\nnavy\nnc\nne\nnec\nnet\nnetbank\nnetwork\nneustar\nnew\nnews\nnexus\nnf\nng\nngo\nnhk\nni\nnico\nnikon\nninja\nnissan\nnl\nno\nnokia\nnorton\nnowruz\nnp\nnr\nnra\nnrw\nntt\nnu\nnyc\nnz\nobi\noffice\nokinawa\nom\nomega\none\nong\nonl\nonline\nooo\noracle\norange\norg\norganic\norigins\nosaka\notsuka\novh\npa\npage\npamperedchef\npanerai\nparis\npars\npartners\nparts\nparty\npe\npet\npf\npg\nph\npharmacy\nphilips\nphoto\nphotography\nphotos\nphysio\npiaget\npics\npictet\npictures\npid\npin\nping\npink\npizza\npk\npl\nplace\nplay\nplaystation\nplumbing\nplus\npm\npn\npohl\npoker\nporn\npost\npr\npraxi\npress\npro\nprod\nproductions\nprof\npromo\nproperties\nproperty\nprotection\nps\npt\npub\npw\npwc\npy\nqa\nqpon\nquebec\nquest\nracing\nre\nread\nrealtor\nrealty\nrecipes\nred\nredstone\nredumbrella\nrehab\nreise\nreisen\nreit\nren\nrent\nrentals\nrepair\nreport\nrepublican\nrest\nrestaurant\nreview\nreviews\nrexroth\nrich\nricoh\nrio\nrip\nro\nrocher\nrocks\nrodeo\nroom\nrs\nrsvp\nru\nruhr\nrun\nrw\nrwe\nryukyu\nsa\nsaarland\nsafe\nsafety\nsakura\nsale\nsalon\nsamsung\nsandvik\nsandvikcoromant\nsanofi\nsap\nsapo\nsarl\nsas\nsaxo\nsb\nsbs\nsc\nsca\nscb\nschaeffler\nschmidt\nscholarships\nschool\nschule\nschwarz\nscience\nscor\nscot\nsd\nse\nseat\nsecurity\nseek\nselect\nsener\nservices\nseven\nsew\nsex\nsexy\nsfr\nsg\nsh\nsharp\nshell\nshia\nshiksha\nshoes\nshow\nshriram\nsi\nsingles\nsite\nsj\nsk\nski\nskin\nsky\nskype\nsl\nsm\nsmile\nsn\nsncf\nso\nsoccer\nsocial\nsoftbank\nsoftware\nsohu\nsolar\nsolutions\nsony\nsoy\nspace\nspiegel\nspreadbetting\nsr\nsrl\nss\nst\nstada\nstar\nstarhub\nstatefarm\nstatoil\nstc\nstcgroup\nstockholm\nstorage\nstudio\nstudy\nstyle\nsu\nsucks\nsupplies\nsupply\nsupport\nsurf\nsurgery\nsuzuki\nsv\nswatch\nswiss\nsx\nsy\nsydney\nsymantec\nsystems\nsz\ntab\ntaipei\ntaobao\ntatamotors\ntatar\ntattoo\ntax\ntaxi\ntc\ntci\ntd\nteam\ntech\ntechnology\ntel\ntelefonica\ntemasek\ntennis\ntf\ntg\nth\nthd\ntheater\ntheatre\ntickets\ntienda\ntiffany\ntips\ntires\ntirol\ntj\ntk\ntl\ntm\ntmall\ntn\nto\ntoday\ntokyo\ntools\ntop\ntoray\ntoshiba\ntours\ntown\ntoyota\ntoys\ntp\ntr\ntrade\ntrading\ntraining\ntravel\ntravelers\ntravelersinsurance\ntrust\ntrv\ntt\ntube\ntui\ntushu\ntv\ntvs\ntw\ntz\nua\nubs\nug\nuk\num\nunicom\nuniversity\nuno\nuol\nus\nuy\nuz\nva\nvacations\nvana\nvc\nve\nvegas\nventures\nverisign\nversicherung\nvet\nvg\nvi\nviajes\nvideo\nvillas\nvin\nvip\nvirgin\nvision\nvista\nvistaprint\nviva\nvlaanderen\nvn\nvodka\nvolkswagen\nvote\nvoting\nvoto\nvoyage\nvu\nwales\nwalter\nwang\nwanggou\nwatch\nwatches\nweather\nweatherchannel\nwebcam\nweber\nwebsite\nwed\nwedding\nweir\nwf\nwhoswho\nwien\nwiki\nwilliamhill\nwin\nwindows\nwine\nwme\nwolterskluwer\nwork\nworks\nworld\nws\nwtc\nwtf\nxbox\nxerox\nxin\n测试\nकॉम\nपरीक्षा\n佛山\n慈善\n集团\n在线\n한국\n点看\nคอม\nভারত\n八卦\n‏موقع‎\nবাংলা\n公益\n公司\n移动\n我爱你\nмосква\nиспытание\nқаз\nонлайн\nсайт\n联通\nсрб\nбел\n‏קום‎\n时尚\n테스트\n淡马锡\nорг\nनेट\n삼성\nசிங்கப்பூர்\n商标\n商店\n商城\nдети\nмкд\n‏טעסט‎\nею\nポイント\n新闻\n工行\n‏كوم‎\n中文网\n中信\n中国\n中國\n娱乐\n谷歌\nభారత్\nලංකා\n购物\n測試\nભારત\nभारत\n‏آزمایشی‎\nபரிட்சை\n网店\nसंगठन\n餐厅\n网络\nком\nукр\n香港\n诺基亚\nδοκιμή\n飞利浦\n‏إختبار‎\n台湾\n台灣\n手表\n手机\nмон\n‏الجزائر‎\n‏عمان‎\n‏ارامكو‎\n‏ایران‎\n‏امارات‎\n‏بازار‎\n‏پاکستان‎\n‏الاردن‎\n‏موبايلي‎\n‏بھارت‎\n‏المغرب‎\n‏السعودية‎\n‏سودان‎\n‏همراه‎\n‏عراق‎\n‏مليسيا‎\n澳門\n닷컴\n政府\n‏شبكة‎\n‏بيتك‎\nგე\n机构\n组织机构\n健康\nไทย\n‏سورية‎\nрус\nрф\n珠宝\n‏تونس‎\n大拿\nみんな\nグーグル\nελ\n世界\nਭਾਰਤ\n网址\n닷넷\nコム\n游戏\nvermögensberater\nvermögensberatung\n企业\n信息\n‏مصر‎\n‏قطر‎\n广东\nஇலங்கை\nஇந்தியா\nհայ\n新加坡\n‏فلسطين‎\nテスト\n政务\nxperia\nxxx\nxyz\nyachts\nyahoo\nyamaxun\nyandex\nye\nyodobashi\nyoga\nyokohama\nyoutube\nyt\nza\nzara\nzero\nzip\nzm\nzone\nzuerich\nzw".split("\n").join("|"),yn="ac.cn\nac.jp\nac.uk\nad.jp\nah.cn\naichi.jp\nakita.jp\naomori.jp\nasn.au\nbj.cn\nchiba.jp\nco.cc\nco.ck\nco.fk\nco.gg\nco.im\nco.in\nco.ir\nco.je\nco.jp\nco.kr\nco.ma\ncom.ac\ncom.af\ncom.ag\ncom.ai\ncom.al\ncom.ar\ncom.au\ncom.aw\ncom.az\ncom.ba\ncom.bb\ncom.bh\ncom.bi\ncom.bm\ncom.bo\ncom.br\ncom.bs\ncom.bt\ncom.by\ncom.bz\ncom.ci\ncom.cm\ncom.cn\ncom.co\ncom.cu\ncom.cw\ncom.cy\ncom.de\ncom.dm\ncom.do\ncom.dz\ncom.ec\ncom.ee\ncom.eg\ncom.es\ncom.et\ncom.fr\ncom.ge\ncom.gh\ncom.gi\ncom.gl\ncom.gn\ncom.gp\ncom.gr\ncom.gt\ncom.gu\ncom.gy\ncom.hk\ncom.hn\ncom.hr\ncom.ht\ncom.im\ncom.io\ncom.iq\ncom.is\ncom.jo\ncom.kg\ncom.ki\ncom.km\ncom.kp\ncom.ky\ncom.kz\ncom.la\ncom.lb\ncom.lc\ncom.lk\ncom.lr\ncom.lv\ncom.ly\ncom.mg\ncom.mk\ncom.ml\ncom.mo\ncom.ms\ncom.mt\ncom.mu\ncom.mv\ncom.mw\ncom.mx\ncom.my\ncom.na\ncom.nf\ncom.ng\ncom.ni\ncom.nr\ncom.om\ncom.pa\ncom.pe\ncom.pf\ncom.ph\ncom.pk\ncom.pl\ncom.pr\ncom.ps\ncom.pt\ncom.py\ncom.qa\ncom.re\ncom.ro\ncom.ru\ncom.rw\ncom.sa\ncom.sb\ncom.sc\ncom.sd\ncom.se\ncom.sg\ncom.sh\ncom.sl\ncom.sn\ncom.so\ncom.st\ncom.sv\ncom.sy\ncom.tj\ncom.tm\ncom.tn\ncom.to\ncom.tr\ncom.tt\ncom.tw\nco.mu\ncom.ua\ncom.ug\ncom.uy\ncom.uz\ncom.vc\ncom.ve\ncom.vi\ncom.vn\ncom.vu\ncom.ws\ncom.zm\nconf.au\nco.nz\nco.rw\nco.th\nco.tj\nco.tt\nco.tv\nco.tz\nco.ug\nco.uk\nco.us\nco.ve\nco.yu\nco.za\nco.zm\nco.zw\ncq.cn\ncsiro.au\nde.net\ndk.org\ned.jp\nedu.au\nedu.cn\nedu.uk\nehime.jp\neu.org\nfukui.jp\nfukuoka.jp\nfukushima.jp\ngb.net\ngd.cn\ngifu.jp\ngo.jp\ngov.au\ngov.cn\ngov.jp\ngov.uk\ngr.jp\ngs.cn\ngunma.jp\ngx.cn\ngz.cn\nhb.cn\nhe.cn\nhi.cn\nhiroshima.jp\nhk.cn\nhl.cn\nhn.cn\nhokkaido.jp\nhyogo.jp\nibaraki.jp\nid.au\ninfo.au\nishikawa.jp\niwate.jp\njl.cn\njs.cn\nkagawa.jp\nkagoshima.jp\nkanagawa.jp\nkanazawa.jp\nkawasaki.jp\nkitakyushu.jp\nkobe.jp\nkochi.jp\nkumamoto.jp\nkyoto.jp\nlg.jp\nln.cn\nltd.uk\nmatsuyama.jp\nme.uk\nmie.jp\nmiyagi.jp\nmiyazaki.jp\nmo.cn\nmod.uk\nnagano.jp\nnagasaki.jp\nnagoya.jp\nnara.jp\nne.jp\nnet.au\nnet.cn\nnet.jp\nnet.uk\nnhs.uk\nnic.uk\nniigata.jp\nnm.cn\nnx.cn\noita.jp\nokayama.jp\nokinawa.jp\norg.au\norg.cn\norg.jp\norg.uk\nor.jp\nosaka.jp\notc.au\noz.au\nplc.uk\npolice.uk\nqh.cn\nsaga.jp\nsaitama.jp\nsapporo.jp\nsc.cn\nsch.uk\nsendai.jp\nsh.cn\nshiga.jp\nshimane.jp\nshizuoka.jp\nsn.cn\nsx.cn\ntakamatsu.jp\ntelememo.au\ntj.cn\ntochigi.jp\ntokushima.jp\ntokyo.jp\ntottori.jp\ntoyama.jp\ntw.cn\nuk.net\nutsunomiya.jp\nwakayama.jp\nxj.cn\nxz.cn\nyamagata.jp\nyamaguchi.jp\nyamanashi.jp\nyn.cn\nyokohama.jp\nzj.cn".split("\n").join("|"),kn=(".("+[_n,yn].join("|")+")").replace(/\./gi,"\\."),Rn=z({ timeout:180,check_interval:120,retimeout_on_get:!0}),xn=/^([^:]+:\/\/)([^/]+)(.*)?/,En=e=>{const t=xn.exec(e);if(t){const[,e,n,r]=t;return{protocol:e,host:n,path:r}}},Sn=e=>e.split("").map((e=>{const t=e.toLowerCase(),n=e.toUpperCase();return t!=n?"["+t+n+"]":e})).join(""),Cn="://",Mn=e=>{let t,n,r,s;const i="/",o=e.replace(/\$$/,"").split(Cn);o.length<2?(t="",n=e):(t=o[0].replace(/^\^/,""),n=o.slice(1).join(Cn));const a=n.split(i);if(s=a.length<2?"/":i+a.slice(1).join(i),r=a[0], "http*"===t||t.match(/\*|http|https|file|ftp/)||(v.warn('uri: override scheme "'+t+'" with "*"'),t="*"),"file"===t)r="";else{const e=r,t=r.match(/\*$|(\*\.)?[^/*]+/);r=(t?t[0]:"").replace(/:[0-9]*$/,""),r!==e&&v.warn('uri: override host "'+e+'" with "'+r+'"')}return s&&s.substr(0,1)===i||(v.warn('uri: prefix path "'+s+'" with "/"'),s=i+s),{scheme:t,host:r,path:s}},In=(e,t)=>{let{scheme:n,host:r,path:s}=Mn(e);return n="http*"===n?"https?":Ie(n).replace(/\*/gi,"[^:/#?]*"), r=Ie(r).replace(/\*\\\./gi,"(*\\.)?").replace(/\*/gi,"[^#?/]*"),s=Ie(s).replace(/\*/gi,".*"),r=r.replace(new RegExp(Ie(bn)+"$"),kn),t?(n=n.toLowerCase(),r=r.toLowerCase()):(n=Sn(n),r=Sn(r)),r+="(:[0-9]{1,5})?","^"+n+Ie(Cn)+r+s+"$"},Un=["protocol","hostname","origin"],Gn=["port"],Zn=["pathname"],Tn=["search","hash"];let Bn;const On={protocol:"",scheme:"",origin:"",pathname:"",hostname:"",port:void 0,search:"",hash:""},jn=(e,t,n)=>{let r=Object.assign({},On) ;if(null==e);else if(["data:","view-source:"].some((t=>e.startsWith(t)))){r.origin="null";const t=e.indexOf(":");r.protocol=e.substr(0,t+1),r.pathname=e.substr(t+1)}else{let s,i;try{s=new URL(e)}catch(t){try{const t="http:";i=Pe(),s=new URL(e||"/",`${t}//${i}/${i}`)}catch(e){i=void 0}}if(s){let{protocol:o,origin:a,pathname:c,hostname:l,port:u,search:d,hash:A,username:p,password:h}=s;if(i&&(o=a="",l===i&&(l=""),c=c.replace(`/${i}`,"")),n){const t=e.indexOf("?"),n=e.indexOf("#") ;-1!==t&&""===d&&(-1===n||n>t)&&(d="?"),-1!==n&&""===A&&(A="#")}if(r={protocol:o,origin:a,pathname:c,hostname:l,port:parseInt(u)||void 0,search:d,hash:A,username:p,password:h},!t&&o){if(0!==e.toLowerCase().indexOf(o))if(e.startsWith("//"))r.origin="",r.protocol="";else{if(!["/","?","#"].includes(e[0]))return jn("/"+e);Bn=Bn||jn("",!0),[...Tn,...Zn].forEach((e=>{Bn[e]===r[e]&&(r[e]="")})),Un.forEach((e=>{r[e]=""})),Gn.forEach((e=>{r[e]=void 0}))} ["tampermonkey:"].includes(r.protocol)&&(r.pathname=((r.hostname?"/"+r.hostname:"")+(r.pathname||"")).replace(/^\/+/,"/"),r.hostname="")}}}return 0===r.port&&(r.port=void 0),Object.defineProperties(r,{domain:{get:function(){const e=r.hostname.split("."),t=e.pop();let n=`${e.pop()}.${t}`;return Nn(n)&&(n=`${e.pop()}.${n}`),n}},scheme:{get:function(){return r.protocol.replace(/:$/,"")}}}),r },Dn=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,Fn=/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/ ;let Ln;const Pn=e=>{return!(!(t=e).match(Dn)&&!t.match(Fn)&&e.includes("."));var t},Nn=e=>(Ln=Ln||new RegExp("^("+yn.replace(/\./g,"\\.")+")$"),!!e.match(Ln)),Vn=(e,t)=>{"string"==typeof t&&(t={base:t});const{base:n,schemes:r,enforce_path:s}=t||{};let i=!1;const o=zn(e);if(!o)return;s&&Hn(o,{nopath:!0})===e&&(e+="/");let a=e;return"tampermonkey:"==o.protocol?o.pathname.includes("..")?i=!0:a=O.getURL(e.replace(/^tampermonkey:\/\//,"")):o.protocol||n&&(a=qn(e,n,r||["http:","https:"]))||(i=!0), i?null:a},zn=(e,t)=>{if(null==e)return;const n=`${e}+${!!t}`;let r=Rn.get(n);return r||(r=jn(e,!1,t),Rn.set(n,r),r)},qn=(e,t,n)=>{let r,s,i;if(e&&t&&(r=zn(e))&&(s="string"==typeof t?zn(t):t)&&s.protocol&&(!n||n.includes(s.protocol)||!e.includes(".."))){if(e.startsWith("//"))return s.protocol+"//"+r.hostname+(r.port?":"+r.port:"")+r.pathname+r.search;if("/"===e[0])i=r.pathname;else{if(t=Hn(s,{nosearch:!0,nofile:!0}),!(s=zn(t+("/"===t[t.length-1]?"":"/")+e)))return;i=s.pathname} return s.protocol+"//"+s.hostname+(s.port?":"+s.port:"")+i+r.search+r.hash}},Hn=(e,t)=>((t=t||{}).noprotocol?"":["about:"].includes(e.protocol)?e.protocol:e.protocol+"//")+(t.auth&&(e.username||e.password)?((e,t)=>{const n=e=>e.replace(/[^A-Za-z0-9-._~!$&'()*+,;=]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()));return n(e)+(t?":"+n(t):"")+"@" })(e.username||"",e.password)+"@":"")+e.hostname+(!t.noport&&e.port&&e.port>0?":"+e.port:"")+(t.nopath?"":t.nofile?e.pathname.replace(/\/[^/]*$/,"/"):e.pathname+(t.nosearch?"":e.search)),Qn=e=>{const t="string"==typeof e?zn(e):e;if(!t)throw new Error("invalid url");return Hn(t)},Wn=e=>{const t="string"==typeof e?zn(e):e;if(!t)throw new Error("invalid url");return Hn(t,{auth:!1}) },Xn=e=>Object.entries(e).map((([e,t])=>void 0===t?null:ee(e)+"="+ee(t))).filter((e=>e)).join("&"),Yn="mtm_visitor",Jn="default",Kn="pageview",$n="script_update",er="script",tr="cloud",nr="deploy",rr="event",sr="pageview",ir="ping",or="https://a.tampermonkey.net/matomo.php",ar=xe;let cr,lr,ur,dr=null;const Ar=()=>({url:or,siteId:4,tracker:{[Jn]:{enabled:Rr(4,1)},[er]:{enabled:!0},[$n]:{enabled:Rr(4,10)},[tr]:{enabled:Rr(4,5e-4)},[nr]:{enabled:!0}}}),pr=()=>({url:or,siteId:5,tracker:{[Jn]:{ enabled:Rr(5,10)},[er]:{enabled:!0},[$n]:{enabled:Rr(5,10)},[tr]:{enabled:Rr(5,.001)},[nr]:{enabled:!0}}}),hr=()=>({url:or,siteId:6,tracker:{[Jn]:{enabled:Rr(6,50)},[er]:{enabled:!0},[$n]:{enabled:Rr(6,10)},[tr]:{enabled:Rr(6,.01)},[nr]:{enabled:!0}}}),fr=()=>({url:or,siteId:7,tracker:{[Jn]:{enabled:!0},[er]:{enabled:!0},[$n]:{enabled:Rr(7,10)},[tr]:{enabled:Rr(7,.01)},[nr]:{enabled:!0}}}),mr={default:pr,gcal:pr,iikm:Ar,fcmf:Ar,saap:fr,swgx:fr,fire:hr,firb:hr,dhdg:()=>({url:or,siteId:3,tracker:{ [Jn]:{enabled:Rr(3,1)},[er]:{enabled:!0},[$n]:{enabled:Rr(3,10)},[tr]:{enabled:Rr(3,5e-4)},[nr]:{enabled:!0}}}),mfdh:pr,heif:()=>({url:"http://a.userscript.grobilan:8081/matomo.php",siteId:2,tracker:{[Jn]:{enabled:!0}}})};let gr;const vr=[{msg:"a disconnected port"},{msg:"Function.prototype.apply: Arguments list has wrong type",url:"event_bindings"},{msg:"Script error."}],wr=e=>[...Array(e)].map((()=>Math.floor(16*Math.random()).toString(16))).join(""),br=e=>{if(!ar)return ;const t=[e.uuid,e.createTs,e.visitCount,e.currentVisitTs,e.lastVisitTs].join(".");ar.setItem(Yn,t)},_r=e=>{const t=e||Jn,n=gr.tracker[t]||gr.tracker[Jn];return n.enabled?{url:gr.url,siteId:gr.siteId,options:n}:null},yr=wr(6),kr=async(e,t,n)=>{if(!e)return;const r=(()=>{if(!ar)return;const e=ar.getItem(Yn);if(!e)return;const t=e.split(".");if(t.length>=5){t.unshift("0");const[e,n,r,s,i,o]=t;return{createdNow:!1,newVisitor:e,uuid:n,createTs:r,visitCount:s,currentVisitTs:i,lastVisitTs:o}} })()||(()=>{const e=Math.floor(Date.now()/1e3).toString(),t={createdNow:!0,newVisitor:"1",uuid:wr(16),createTs:e,visitCount:"0",currentVisitTs:e,lastVisitTs:""};return br(t),t})();let s;const i=new Date,o={idsite:e.siteId,rec:1,action_name:we?we.title:ne.href||B.short_id,url:ne.href,_id:r.uuid,rand:wr(4),apiv:1,h:i.getHours(),m:i.getMinutes(),s:i.getSeconds(),cookie:1,pv_id:yr},a={...o,_idts:Number(r.createTs),_idvc:Number(r.visitCount),_viewts:Number(r.lastVisitTs), res:be?`${be.width}x${be.height}`:"0x0"};if(t==sr){const e=lr?{gt_ms:lr}:{},t={...o,...a,...e,new_visit:1};br((e=>{const t=Math.floor(Date.now()/1e3).toString();return e.newVisitor="0",e.visitCount=(Number(e.visitCount)+1).toString(),e.lastVisitTs=e.currentVisitTs,e.currentVisitTs=t,e})(r)),s=t}else if(t==rr){if(!n)return;s={...o,ca:1,e_c:n.category,e_a:n.action,e_n:n.name,e_v:n.value}}else{if(t!=ir)return;s={...o,...a,ping:1}}s=Object.assign(o,s);const c=`${e.url}?${Xn(s)}`;if(we){ const e=we.createElement("img");e.src=c,e.onload=()=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)},e.onerror=()=>{var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)},(we.body||we.head||we.documentElement).appendChild(e)}else try{await oe(c)}catch(e){v.warn("stats:",e)}},Rr=(e,t)=>{let n=100*Math.random()null===dr&&xr?xr.promise():y.Pledge(!!dr);let Sr;const Cr=e=>{dr=e,xr&&(xr.resolve(dr),xr=void 0),dr?Mr():ur&&(Y(ur),ur=void 0)},Mr=()=>{cr&&(kr(_r(Kn),sr),cr=!1),ur=re((()=>kr(_r(Kn),ir)),864e5)},Ir=async(e,t,n)=>{if(!await Er())return;const r=`${e}${n?` <${n}> `:""}`;let s="",i=null;if("i"===t)s="Installed";else if("u"===t)s="Updated",i=_r($n);else if("m"===t)s="Revealed";else{if("r"!==t)return;s="Removed"} kr(i||_r(er),rr,{category:"Script",action:s,name:r})},Ur=async(e,t,n)=>{if(!await Er())return;let r="",s="";"init"===t?(s="Initialized",r=e):"error"===t&&(s="Error",r=e+" -> "+n),kr(_r(tr),rr,{category:"Cloud",action:s,name:r})},Gr=async(e,t,n)=>{if(!await Er())return;let r="",s="";"installed"===e?(s="Installed",r=t):"error"===e&&(s="Error",r=t+" -> "+n),kr(_r(nr),rr,{category:"Deployment",action:s,name:r})},Zr=async(e,t,n)=>{if(!await Er())return;void 0===n&&(t+=" "+ne.href,n="");let r=!1 ;for(const n of vr){if(!n.msg&&!n.url)return;n.msg&&-1==e.indexOf(n.msg)||n.url&&-1==t.indexOf(n.url)||(r=!0)}r||kr(_r("error"),rr,{category:"Error",action:e,name:t+":"+n})},Tr=async(e,t,n)=>{if(!await Er())return;let r="",s="";"clicked"===e?(s="Click",r=t+":"+n):"button"===e?(s="Button",r=t||"?"):"dialog"===e&&(s="Dialog"),kr(_r("begging"),rr,{category:"Begging",action:s,name:r})},Br="en";let Or={},jr={},Dr=null;const Fr=[],Lr=async e=>{const t=`_locales/${e}/messages.json`,n=await(e=>{let t ;const n=O.getURL(e);return y((async({resolve:r})=>{try{if(Ee){const s=new Ee;Ee.onlyasync?(s.open("GET",n),s.onload=()=>{r(s.responseText)},s.onerror=()=>{r()},s.send(null)):(s.open("GET",n,!1),s.send(null),t=s.responseText,t||v.warn("registry: content of "+e+" is null!"),r(t))}else r(await oe(n).then((e=>e.text())))}catch(e){v.log("getRaw:"+e),r()}})).promise()})(t);try{if(n)return JSON.parse(n)}catch(e){}v.warn("i18n: parsing locale "+e+" failed!")},Pr=async e=>{e=e.concat(Br);let t=-1,n=null ;const r=async()=>{if(t++,te?e.replace(/-/g,"_").split("_").map(((e,t)=>t?e.toUpperCase():e.toLowerCase())).join("_"):e,Vr=(e,t)=>{let n,r;return t=t||(Dr?[Dr,Dr.split("_")[0]].concat(Fr).filter((e=>e)):Fr),Ze(t,((t,s)=>{const i=Number(s) ;if(Ze(e,((e,s)=>{const o=Number(s),a=Nr(e),c=a.split(/_/)[0];if(a==t)return r=o,!1;c==t&&(void 0===n||ie.value)),Hr=!(void 0===Tt)&&Tt.native_support,Qr={init:async()=>{const e=async()=>{Dr||Hr||(Dr=await Pr(Fr))},t=Nr(Hr?Tt.getUILanguage():navigator.language);if(t){const e=[t],n=t.split(/_/);n[0]!==t&&e.push(n[0]),e.forEach((e=>{Fr.unshift(e)}))}await e(),Hr&&(await new Promise((e=>{Tt.getAcceptLanguages((t=>{t?(t.forEach((e=>{Fr.push(Nr(e))})),e()):v.error("getAcceptLanguages returned undefined")}))})),await e())},getMessage:(e,...t)=>{let n ;return Dr&&(n=Or[e]||jr[e])?((e,t)=>{let n,r=e.message;return n=1==t.length&&Array.isArray(t[0])?t[0]:t,e.placeholders&&Object.entries(e.placeholders).forEach((([e,t])=>{try{const s=Number(t.content.replace(/^\$/,""))-1;let i;s{const n=[],r=e=>{ for(let t=0;t{let n;const r=e[t];if(e){let s=e[t+"_i18n"]||{};r&&(s={en:r,...s});const i=Vr(Object.keys(s));void 0!==i&&(n=s[i])}return n||r},setLocale:async e=>{let t=e;if("null"===e&&(t=null),t&&(t=Nr(t)),!t&&Hr)Dr=t;else if(t!==Dr)return Pr([t,...Fr,Dr].filter((e=>e))).then((t=>{Dr=t,Dr!=e&&v.log("i18n: retrieving locale "+t+" failed!")}))},getLocale:()=>Dr,getUiLocale:()=>Nr(Dr||Hr?Tt.getUILanguage():Fr[0]||navigator.language||Br),getBestLocale:Vr,supported:zr};let Wr ;const Xr=["DOM","JavaScript","raw"],Yr={},Jr=e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>[],set:(e,t)=>(e.push(t),e)};return(null==t?void 0:t.length)&&t.forEach((e=>Yr[e]=n)),n},Kr=e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>null,set:(t,n,r)=>{const s=(null==e?void 0:e.convert)?e.convert(n,r):n;return null===t?s:t}};return(null==t?void 0:t.length)&&t.forEach((e=>Yr[e]=n)),n},$r=e=>{const t=null==e?void 0:e.keys,n={default:()=>null,set:()=>!0} ;return(null==t?void 0:t.length)&&t.forEach((e=>Yr[e]=n)),n},es=e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>({}),set:(t,n,r,s)=>{s=s?Nr(s):"default";const i=(null==e?void 0:e.convert)?e.convert(n,r):n;return t[s]=t[s]||i,t}};return(null==t?void 0:t.length)&&t.forEach((e=>Yr[e]=n)),n},ts={name:es({convert:e=>null==e?void 0:e.replace(/\s\s+/g," ")}),version:Kr({convert:e=>(null==e?void 0:e.replace(/\s/g,""))||e}),grants:Jr({keys:["grant"]}),icon:Kr({ keys:["icon","iconURL","iconUrl","defaulticon"]}),icon64:Kr({keys:["icon64","iconURL64"]}),supportURL:Kr({keys:["supportURL","supportUrl"]}),fileURL:Kr(),downloadURL:Kr({keys:["downloadURL","downloadUrl"]}),updateURL:Kr({keys:["updateURL","updateUrl"]}),namespace:Kr({convert:e=>""===e?null:e}),author:Kr(),copyright:Kr(),homepage:Kr({keys:["homepage","homepageURL","homepageUrl","website","source"]}),description:es(),includes:Jr({keys:["include"]}),excludes:Jr({keys:["exclude"]}),matches:Jr({ keys:["match"]}),requires:Jr({keys:["require"]}),resources:(e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>({}),set:(t,n,r)=>{const s=n.match(/^(\S*)\s+(.*)/);if(s&&void 0===t[s[1]]){const n=(null==e?void 0:e.convert)?e.convert(s[2],r):s[2];t[s[1]]=n}return t}};return(null==t?void 0:t.length)&&t.forEach((e=>Yr[e]=n)),n})({keys:["resource"]}),sandbox:Kr({keys:["sandbox","inject-into"],convert:(e,t)=>null!==e&&"inject-into"===t?{auto:"DOM",content:"DOM",page:null}[e]||null:e}),tags:Jr({ keys:["tag"]}),noframes:$r(),unwrap:$r(),connects:Jr({keys:["connect","connect-src","domain"]}),webRequest:Jr(),"run-at":Kr(),"run-in":Jr(),antifeatures:(e=>{const t=null==e?void 0:e.keys,n={keys:t,default:()=>({}),set:(t,n,r,s)=>{var i;s=s?Nr(s):"default";const o=n.match(/^(\S*)\s+(.*)/);if(o){const n=t[i=o[1]]||(t[i]={}),a=(null==e?void 0:e.convert)?e.convert(o[2],r):o[2];n[s]=a}return t}};return(null==t?void 0:t.length)&&t.forEach((e=>Yr[e]=n)),n})({keys:["antifeature"]})},ns={} ;Object.entries(ts).forEach((([e,t])=>{t.keys?t.keys.forEach((t=>{ns[t]=e})):ns[e]=e}));const rs="==UserScript==",ss="==/UserScript==",is=/(?:^|\n)\s*\/\/\x20*==UserScript==([\s\S]*?\n)\s*\/\/\x20*==\/UserScript==|$/,os=()=>{const e={...Object.fromEntries(Object.keys(ts).map((e=>[e,ts[e].default()])))};return{...e}},as=e=>{const t=e.match(is),n=(t?t[1]:"")||"",r={};return n.replace(/(?:^|\n)\s*\/\/\s*(@\S+)(.*)/g,((e,t,n)=>{const[s,i]=t.slice(1).split(":"),o=ns[s];let a ;if(o&&(a=Yr[o]||ts[o]||void 0)){const e=n.trim();let t=r[o];void 0===t&&(t=a.default()),r[o]=a.set(t,e,s,i)}return""})),{...os(),...r}},cs=e=>{const{name:t,description:n,version:r,grants:s,tags:i,fileURL:o,requires:a,resources:c,webRequest:l,namespace:u,sandbox:d,noframes:A,unwrap:p,author:h,copyright:f,antifeatures:m}=e;let{icon:g,icon64:v,updateURL:w,downloadURL:b,supportURL:_,homepage:y,includes:k,matches:R,excludes:x,connects:E}=e ;const S=e["run-at"]||null,C=e["run-in"]||[],M=(e,{[e]:t,...n})=>n,I=s.includes("none")?["none"]:s.filter((e=>e)),U=d&&Xr.includes(d)?d:null;g=g||null,v=v||null,w=w||null,b=b||null,_=_||null,y=y||null;const G=t.default,Z=n.default||"",T=M("default",t),B=M("default",n);k=k.filter((e=>e)),R=R.filter((e=>e)),x=x.filter((e=>e)),E=E.filter((e=>e));const O=Object.entries(c).map((([e,t])=>({name:e,url:t,loaded:!1}))).filter((e=>e.url)),j=a.filter((e=>e)).map((e=>({url:e,loaded:!1,textContent:"" }))),D=l.length?l.map((e=>{const t=JSON.parse(e);return Array.isArray(t)?t:[t]})).reduce(((e,t)=>e.concat(t)),[]):null;return{name:G,description:Z,version:r||"0.0",grant:I,icon:g,icon64:v,supportURL:_,fileURL:o,downloadURL:b,updateURL:w,namespace:u,requires:j,includes:k,matches:R,excludes:x,homepage:y,resources:O,connects:E,webRequest:D,author:h,copyright:f,antifeatures:m,name_i18n:T,description_i18n:B,uuid:null,system:!1,enabled:!0,position:0,blockers:[],lastModified:0,sync:{},options:{ check_for_updates:!0,user_modified:null,comment:null,compatopts_for_requires:!0,compat_wrappedjsobject:!1,compat_metadata:!1,compat_foreach:!1,compat_powerful_this:null,sandbox:U,noframes:A,unwrap:p,run_at:S,run_in:C,tags:i,override:{use_includes:[],orig_includes:[],merge_includes:!0,use_matches:[],orig_matches:[],merge_matches:!0,use_excludes:[],orig_excludes:[],merge_excludes:!0,use_connects:[],orig_connects:[],merge_connects:!0,use_blockers:[],orig_run_at:null,orig_run_in:[], orig_noframes:null,orig_tags:void 0}},textContent:null,header:null}},ls=(()=>{const e=e=>{const t=e.split(".");return t.slice(0,3).concat([t.slice(3).join(".")]).concat([0,0,0,0]).slice(0,4).map((e=>{const t=e.toString().match(/((?:-?[0-9]+)?)([^0-9]*)((?:[0-9]+)?)(.*)/);return t?[Number(t[1]),t[2],Number(t[3]),t[4]]:[]})).reduce(((e,t)=>e.concat(t)))},t=(n,r)=>{const s=Array.isArray(n)?n:e(n),i=Array.isArray(r)?r:e(r);for(let e=0;e<16;e++){const n=s[e],r=i[e];if(e%2==1){if(!n&&r)return t.eNEWER ;if(n&&!r)return t.eOLDER;const e=n.match(/\w/g)||[],s=r.match(/\w/g)||[];for(let n=0;ns[n].charCodeAt(0))return t.eNEWER;if(e[n].charCodeAt(0)s.length)return t.eNEWER;if(e.lengthNumber(r))return t.eNEWER;if(Number(n){const t=(e=>{ const t=Me(e,rs,ss);if(!t)return null;const n=e.indexOf(rs),r=e.indexOf("{const t=(e=>as(e))(e=(e=(e=(e=(e||"").replace(/(\r\n|\n|\r)/gm,"\n")).replace(/\t/g," ")).replace(/\n\n+/g,"\n")).replace(/[^|\n][ \t]+\/\//g,"//"));if(t)return cs(t) },As=()=>cs(os()),ps="try to take over the world!",hs="This script was deleted from Greasy Fork, and due to its negative effects, it has been automatically removed from your browser.",fs={uso:new class{constructor(){this.regexps=["https?://userscripts\\.org/scripts/(source|version)/([0-9]{1,9})\\.user\\.js","https?://userscripts-mirror\\.org/scripts/(source|version)/([0-9]{1,9})\\.user\\.js"],this.domains=["userscripts.org","userscripts-mirror.org"]}test(e){ const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&3==t.length)return{id:t[2],token:"uso",meta_url:!0,url:"http://userscripts-mirror.org/scripts/show/"+t[2],code_url:"http://userscripts-mirror.org/scripts/review/"+t[2],issue_url:"http://contactbyweb.com/userscripts-mirror"}}updates(e){return!1}},gf:new class{constructor(){ this.regexps=["https?://greasyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/code.*\\.user\\.js","https?://update.greasyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/.*\\.user\\.js"],this.domains=["greasyfork.org","update.greasyfork.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&2==t.length){const e=t[1];return{id:e,token:"gf",meta_url:!0,url:"https://greasyfork.org/scripts/"+e,issue_url:"https://greasyfork.org/scripts/"+e+"/feedback", code_url:"https://greasyfork.org/scripts/"+e+"/code"}}}async converts(e){let t,n=e;if(n){const e=n.description.trim();e===ps?n.description="":e===hs&&(n=null,t="deleted by hoster")}return{script:n,warning:t}}updates(e){const t=new RegExp("https?://greasyfork\\.org/scripts/[^/]+/code/.*\\.user\\.js.*version=[0-9]+.*"),n=new RegExp("https?://update\\.greasyfork\\.org/scripts/[^/]+/[^/]+/[^/]+\\.user\\.js");return!e.match(n)&&!e.match(t)}},sf:new class{constructor(){ this.regexps=["https?://sleazyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/code.*\\.user\\.js","https?://update.sleazyfork\\.org/(?:[^/]+/)?scripts/([^/-]+).*/.*\\.user\\.js"],this.domains=["sleazyfork.org","update.sleazyfork.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&2==t.length){const e=t[1];return{id:e,token:"sf",meta_url:!0,url:"https://sleazyfork.org/scripts/"+e,issue_url:"https://sleazyfork.org/scripts/"+e+"/feedback", code_url:"https://sleazyfork.org/scripts/"+e+"/code"}}}async converts(e){let t,n=e;if(n){const e=n.description.trim();e===ps?n.description="":e===hs&&(n=null,t="deleted by hoster")}return{script:n,warning:t}}updates(e){const t=new RegExp("https?://sleazyfork\\.org/scripts/([^/]+)/code/.*\\.user\\.js.*version=[0-9]+.*"),n=new RegExp("https?://update\\.sleazyfork\\.org/scripts/[^/]+/[^/]+/[^/]+\\.user\\.js");return!e.match(n)&&!e.match(t)}},ouj:new class{constructor(){ this.regexps=["https?://openuserjs\\.org/install/([^/]+)+/(.+?)(?:\\.min)?\\.user\\.js"],this.domains=["openuserjs.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&3==t.length)return t.shift(),{id:t.join("/"),token:"ouj",meta_header:!0,url:"https://openuserjs.org/scripts/"+t[0]+"/"+t[1],issue_url:"https://openuserjs.org/scripts/"+t[0]+"/"+t[1]+"/issues",code_url:"https://openuserjs.org/scripts/"+t[0]+"/"+t[1]+"/source"}}async converts(e){const t=e ;return t&&t.description.trim()===ps&&(t.description=""),{script:t,warning:void 0}}updates(e){return!0}},gh:new class{constructor(){ this.regexps=["https?://raw\\.githubusercontent\\.com/([^/]+)/([^/]+)/[^/]+/(.*)\\.user\\.js","https?://github\\.com/([^/]+)/([^/]+)/raw/[^/]+/(.*)\\.user\\.js","https?://raw.github\\.com/([^/]+)/([^/]+)/[^/]+/(.*)\\.user\\.js","https?://github\\.com/([^/]+)/([^/]+)/releases/latest/download/(.*)\\.user\\.js","https?://github\\.com/([^/]+)/([^/]+)/releases/download/[^/]+/(.*)\\.user\\.js","https?://(([^\\.]+).github\\.io)/(.*)\\.user\\.js"], this.domains=["github.com","githubusercontent.com","github.io"]}test(e){let t;const n=this.regexps.slice(0,-1).reduce(((t,n)=>t||e.match(new RegExp(n))),null),r=this.regexps.slice(-1).reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(n&&4==n.length||r&&4==r.length){let e;if(n){n.shift();const[r,s,i]=n;e=[r,s].join("/"),t=[r,s].concat(s==i?[]:i).join("/")}else{if(!r)throw new Error("Should never happen!");{r.shift();const[n,s,i]=r;e=[s,n].join("/"),t=[s,n].concat(n==i?[]:i).join("/")}}return{ id:t,token:"gh",url:"https://github.com/"+e,issue_url:"https://github.com/"+e+"/issues"}}}updates(e){return!0}},gst:new class{constructor(){this.regexps=["https?://gist\\.github\\.com/([^/]+)/([^/]+)/raw/(.*/)?.*\\.user\\.js","https?://gist\\.githubusercontent\\.com/([^/]+)/([^/]+)/raw/(.*/)?.*\\.user\\.js"],this.domains=["gist.github.com","gist.githubusercontent.com"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&4==t.length){ const e=t[1],n=t[2],r=`${e}/${n}`;if(n&&r)return{id:r,token:"gst",url:`https://gist.github.com/${r}`,issue_url:`https://gist.github.com/${r}#new_comment_field`,code_url:`https://gist.github.com/${r}`}}}updates(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);return!(!t||null!=t[3])}},gl:new class{constructor(){this.regexps=["https?://gitlab\\.com/([^/]+)(?:/([^/]+))?/([^/-]{1,1}[^/]+)/?(?:-/)?(snippets/[^/]+/)?(raw|wikis)/(?:[^/]+/)?(.*?)\\.user\\.js"], this.domains=["gitlab.com"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&7==t.length){const[,e,n,r,,,s]=t,i=[e].concat([n,r].filter((e=>e))).join("/");return{id:[i].concat(r==s?[]:s).join("/"),token:"gl",url:"https://gitlab.com/"+i,issue_url:"https://gitlab.com/"+i+"/issues"}}}updates(e){return!0}},bb:new class{constructor(){ this.regexps=["https?://bitbucket\\.org/([^/]+)/([^/]+)/raw/[^/]+/(.*)\\.user\\.js","https?://bitbucket\\.org/([^/]+)/([^/]+)/downloads/(.*)\\.user\\.js"],this.domains=["bitbucket.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&4==t.length){t.shift();const[e,n,r]=t,s=[e,n].concat(n==r?[]:r).join("/"),i=[e,n].join("/");return{id:s,token:"bb",url:"https://bitbucket.org/"+i,issue_url:"https://bitbucket.org/"+i+"/issues"}}}updates(e){return!0}}, usty:new class{constructor(){this.regexps=["https?://userstyles\\.org/styles/userjs/([^/]+)/.*\\.user\\.js"],this.domains=["userstyles.org"]}test(e){const t=this.regexps.reduce(((t,n)=>t||e.match(new RegExp(n))),null);if(t&&2==t.length)return t.shift(),{id:t[0],token:"usty",url:"https://userstyles.org/styles/"+t[0],issue_url:"https://forum.userstyles.org/post/discussion?Discussion/StyleID="+t[0]}}async converts(e){let t,n,r,s;const i=[{tag:"includes", re:/(?: \|\| \(new RegExp\("\^)([^$]+)(?:\$"\)\)\.test\(document\.location\.href\))/g,idx:1,value:e=>"/^"+e.replace(/\\\\(.)/g,"\\$1")+"$/"},{tag:"includes",re:/(?: \|\| \(document\.location\.href\.indexOf\(")([^"]+)"(?:\) == 0\))/g,idx:1,value:e=>e+"*"},{tag:"matches",re:/(?: \|\| \(document\.domain == ")([^"]+)"(?: \|\| document\.domain\.substring\(document\.domain\.indexOf\("[^"]+"\) \+ 1\) == "[^"]+"\))/g,idx:1,value:e=>"*."+e }],o=new RegExp("(?:if \\(false)("+i.map((e=>"(?:"+e.re.source+")")).join("|")+")+","g");return e.textContent&&0===e.includes.length&&0===e.matches.length&&0===e.excludes.length&&e.options&&e.options.override&&e.options.override.orig_includes&&0===e.options.override.orig_includes.length&&e.options.override.orig_matches&&0===e.options.override.orig_matches.length&&(n=e.textContent.match(o))&&(n.forEach((t=>{i.forEach((n=>{for(;r=n.re.exec(t);)if(r.length>n.idx){const t=n.value(r[n.idx]) ;e.options.override["orig_"+n.tag].push(t),e[n.tag].push(t),s=!0}}))})),s&&(t="includes added")),0===e.grant.length&&(e.grant.push("GM_addStyle"),t="includes added"),{script:e,info:t}}updates(e){return!0}},web:new class{constructor(){this.regexps=["https://static\\.iitc\\.me/build/release/(plugins/)?(.*)\\.user\\.js","https://iitc\\.app/build/release/(plugins/)?(.*)\\.user\\.js","https?://socialfixer\\.com/socialfixer\\.user\\.js","https?://www\\.fbpurity\\.com/.*\\.user\\.js"], this.domains=["static.iitc.me","iitc.app","socialfixer.com","fbpurity.com"]}test(e){const[t,n,r,s]=this.regexps,i=e.match(new RegExp(t));if(i&&3===i.length){i.shift();const[e,t]=i,n="iitc-project/ingress-intel-total-conversion";return{id:[n].concat(e?[e,t]:[]).join("/").replace(/\/\//g,"/"),token:"gh",url:"https://github.com/"+n,issue_url:"https://github.com/"+n+"/issues"}}const o=e.match(new RegExp(n));if(o&&3===o.length){o.shift();const[e,t]=o,n="IITC-CE/ingress-intel-total-conversion";return{ id:[n].concat(e?[e,t]:[]).join("/").replace(/\/\//g,"/"),token:"gh",url:"https://github.com/"+n,issue_url:"https://github.com/"+n+"/issues"}}return e.match(new RegExp(r))?{id:"socialfixer",token:"web",url:"http://socialfixer.com",issue_url:"https://www.facebook.com/groups/SocialFixerUsersSupport/"}:e.match(new RegExp(s))?{id:"fbpurity",token:"web",url:"https://www.fbpurity.com/",issue_url:"https://www.facebook.com/fluffbustingpurity"}:void 0}updates(e){return!0}}},ms=e=>{ if(e)for(const t of Object.values(fs)){const n=t.test(e);if(n)return n}},gs=[],vs=[{name:Qr.getMessage("Default"),layout:"default",value:"default"},{name:Qr.getMessage("Default_Light"),layout:"default",theme:"light",value:"default#light"},{name:Qr.getMessage("Default_Dark"),layout:"default",theme:"dark",value:"default#dark"},{name:Qr.getMessage("Default_Darker"),layout:"default",theme:"darker", footer:'Theme by narcolepticinsomniac from the Stylus project.',value:"default#darker"}],ws={default:Qr.getMessage("Default"),monokai:"Monokai",solarized:"Solarized","mdn-like":"MDN-like",eclipse:"Eclipse",railscasts:"RailsCasts",zenburn:"ZenBurn",claude:"Claude"},bs={ unknown:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wKDBcWHLi+jYAAACAASURBVHja7X13nBRV9v15r6p7egIgElUkioCCIqBgxEVEBRMyiJJBUbKAuKvwVUQJKoqooCAGoiKiElVkBRPq7sqKGUHSkNOQplOFd39/vNDVQxB/MiO49n5mB3uqq6vq3ffeveeeey7w1+uv11+vv15/vf5HX+x4nEQIwT3PywGQDSCbMWYTkQAgjtd3/GkHgDEIIcAYO9rfmHqOHoAYgKht2wWcc/F7v98+Hjfh+35OIpGoK4SoZ1lWXcZYaSKKA3D/MgD5IqLf83GLMZYhhMgXQvxkWdb3kUjkewAHTggDEEKEPc+rLIS4gHN+Kef8dAAFRPSHGMDhZtMfOHjHdE2/8h02gAwA2z3PixDRASJaczzuzT5Oz8gmolKc87LhcLhsKBQ6VQhRAoD/19z/fYZGRGCMWZxz2/M83/f9ckRUCoB1whgAEXHGWAZjLNOyrAjnHJzzEIDQX8P622Z84feVAYBzDiFENmMsE0AGEfETxgAYYyAiwRgTyvmDEOI3n+NoD+t4L+uFzxf8Dj0I6r6OeUCD5zza54518Au/T0Q+EQn1rHHCGEDgQkl5/r95NhztgR3vwdcGqs/LGDMeNwBwzg855ljP+WvXfbhz6vs/hu8SAOh4PgeOE+ClB6DwgByrgRSlo6i/+1i+n3P+qyuZNq7C5yu8+hTXy/4jHuqxnkcvwYdbio/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yNEg1LjYyM0E1LjYyMyA1LjYyMyAwIDAgMSAwIDE4LjM3N1Y1LjYyM3oiIGlkPSJhIi8+PC9kZWZzPjxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PG1hc2sgaWQ9ImIiIGZpbGw9IiNmZmYiPjx1c2UgeGxpbms6aHJlZj0iI2EiLz48L21hc2s+PHVzZSBmaWxsLW9wYWNpdHk9IjAiIGZpbGw9IiNGRkYiIHhsaW5rOmhyZWY9IiNhIi8+PHBhdGggZmlsbD0iIzJFQ0M3MSIgbWFzaz0idXJsKCNiKSIgZD0iTTExLjI1IDB2MTQuNjI1SDBWMHoiLz48cGF0aCBmaWxsPSIjRTc0QzNDIiBtYXNrPSJ1cmwoI2IpIiBkPSJNMjQgMHY3Ljg3NUgxMi43NVYweiIvPjxwYXRoIGZpbGw9IiNGMzlDMTIiIG1hc2s9InVybCgjYikiIGQ9Ik0xMS4yNSAxNi4xMjVWMjRIMHYtNy44NzV6Ii8+PHBhdGggZmlsbD0iIzM0OThEQiIgbWFzaz0idXJsKCNiKSIgZD0iTTI0IDkuNTYzdjE0LjYyNEgxMi43NVY5LjU2M3oiLz48L2c+PC9zdmc+" },_s='',ys=[[100,56,22,"#272727"],[120,48,6,"#272727"],[76,48,22,"#272727"],[48,56,22,"#272727"],[84,28,11,"#272727"],[56,36,11,"#272727"],[100,32,11,"#272727"],[132,44,22,"#272727"],[152,132,22,"#1a1a1a",.5902],[116,32,11,"#272727"],[36,44,11,"#272727"],[128,144,22,"#1a1a1a",.2601],[132,36,6,"#272727"],[8,144,22,"#1a1a1a",.5728],[12,112,22,"#1a1a1a",.3512],[4,116,6,"#1a1a1a",.2],[108,24,6,"#272727"],[84,40,6,"#272727"],[64,116,22,"#1a1a1a",.0345],[56,28,6,"#272727"],[96,128,22,"#1a1a1a",.0749],[32,156,22,"#1a1a1a",.5441],[60,156,22,"#1b1b1b",.6994],[148,112,11,"#1a1a1a",.0029],[44,20,11,"#262626"],[124,60,6,"#272727"],[0,124,11,"#1a1a1a",.1999],[28,56,11,"#272727"],[72,144,11,"#1b1b1b",.4494],[76,72,22,"#272727"],[96,120,6,"#1a1a1a",.0066],[84,108,6,"#1d1d1d"],[12,104,6,"#1c1c1c"],[148,104,6,"#1a1a1a",.0687],[76,20,6,"#252525"],[68,104,11,"#1b1b1b",.0739],[0,96,11,"#1a1a1a",.2],[20,44,11,"#262626"],[144,92,11,"#1e1e1e",.9215],[160,124,6,"#1a1a1a",.6605],[0,80,11,"#1b1b1b",.2],[8,4,22,"#1d1d1d",.2362],[16,72,22,"#232323"],[92,160,21,"#1c1c1c",.6],[144,32,11,"#262626"],[12,44,6,"#202020"],[4,72,6,"#1b1b1b",.2],[52,12,6,"#202020"],[0,48,11,"#1b1b1b",.2],[44,0,11,"#1b1b1b",.1986],[144,24,6,"#242424"],[120,84,22,"#202020",.5576],[144,8,11,"#1c1c1c",.6423],[156,36,22,"#202020",.7486],[68,84,6,"#252525"],[156,64,22,"#202020",.7619],[0,60,11,"#1b1b1b",.2],[112,88,6,"#212121"],[52,84,11,"#212121"],[44,92,6,"#1c1c1c",.7096],[148,68,6,"#272727"],[100,88,11,"#222222"],[136,8,6,"#1c1c1c",.9155],[84,4,22,"#212121",.8095],[108,4,11,"#1d1d1d",.6],[76,8,6,"#1c1c1c"],[164,96,16,"#1b1b1b",.5],[148,168,13,"#1a1a1a",.0081],[168,20,12,"#1b1b1b",.0081],[64,28,6,"#272727"],[72,40,6,"#272727"],[44,32,11,"#272727"],[56,20,6,"#252525"],[40,60,6,"#272727"],[84,156,6,"#1d1d1d"],[156,100,6,"#1d1d1d"],[28,104,6,"#1a1a1a",.0182],[136,68,11,"#272727"],[40,72,6,"#272727"],[160,16,6,"#1a1a1a",.091],[120,12,11,"#222222"],[32,4,11,"#1c1c1c",.4571],[140,168,7,"#1a1a1a",.4414],[28,32,11,"#272727"],[4,136,6,"#1a1a1a",.1155],[108,44,11,"#272727"],[116,156,11,"#1a1a1a",.5235],[100,108,11,"#1a1a1a",.0313],[20,36,6,"#232323"],[92,104,6,"#1e1e1e"],[88,140,6,"#1b1b1b"],[12,36,6,"#1e1e1e"],[64,4,11,"#1d1d1d",.6],[88,128,6,"#1b1b1b"],[36,16,6,"#212121"],[16,56,11,"#242424"],[124,76,6,"#272727"],[68,92,6,"#202020"],[164,112,9,"#1a1a1a"],[4,40,6,"#1a1a1a",.1416],[48,48,6,"#272727"],[68,20,6,"#252525"],[128,28,6,"#272727"],[136,28,6,"#272727"],[152,160,6,"#1a1a1a",.9558],[128,68,6,"#272727"],[136,20,6,"#242424"],[144,84,6,"#242424"],[124,4,6,"#1a1a1a",.2],[164,88,9,"#1c1c1c"],[128,168,13,"#1a1a1a",.3226],[112,168,13,"#1a1a1a",.3333],[36,96,6,"#1b1b1b",.3675],[96,152,6,"#1c1c1c"],[24,96,6,"#1e1e1e"],[156,88,6,"#212121"],[104,80,6,"#272727"],[24,168,7,"#1b1b1b",.001],[100,48,6,"#272727"],[112,96,6,"#1b1b1b",.4376],[164,156,16,"#1a1a1a",7e-4],[52,96,11,"#1b1b1b",.0114],[44,12,6,"#1f1f1f"],[44,80,6,"#252525"],[76,28,6,"#272727"],[64,48,6,"#272727"],[116,24,6,"#272727"],[8,28,6,"#1a1a1a",.2598],[168,124,7,"#1a1a1a",.6667],[108,152,6,"#1a1a1a",.1464],[100,100,6,"#1d1d1d",.9972],[88,120,6,"#1a1a1a"],[20,104,6,"#1b1b1b",.992],[16,96,6,"#1e1e1e"],[16,28,6,"#1f1f1f"],[76,96,6,"#202020"],[156,24,11,"#1e1e1e",.9831],[4,108,6,"#1a1a1a",.2],[84,96,6,"#232323"],[92,112,6,"#1b1b1b"],[92,96,6,"#222222"],[108,16,6,"#232323"],[148,76,6,"#262626"],[92,40,6,"#272727"],[88,148,6,"#1d1d1d"],[56,48,6,"#272727"],[12,136,6,"#1a1a1a"],[32,24,6,"#242424"],[20,136,6,"#1a1a1a",.0281],[56,4,6,"#1a1a1a",.2],[156,0,17,"#1a1a1a",7e-4],[32,148,9,"#1a1a1a",.0045],[84,168,9,"#1b1b1b",.5],[112,80,9,"#252525"],[130,5,6,"#1b1b1b",.398],[130,10,6,"#1e1e1e"],[155,10,6,"#1a1a1a",.0019],[30,15,6,"#1f1f1f"],[60,15,6,"#222222"],[65,15,6,"#232323"],[70,15,6,"#232323"],[75,15,6,"#222222"],[115,15,6,"#232323"],[130,15,6,"#222222"],[135,15,6,"#212121"],[155,15,6,"#1b1b1b",.6529],[130,20,6,"#252525"],[150,20,6,"#202020"],[25,25,6,"#222222"],[70,25,6,"#272727"],[95,25,6,"#272727"],[100,25,6,"#272727"],[150,25,6,"#222222"],[70,30,6,"#272727"],[95,30,6,"#272727"],[110,30,6,"#272727"],[5,35,6,"#1a1a1a",.1598],[70,35,6,"#272727"],[75,35,6,"#272727"],[95,35,6,"#272727"],[110,35,6,"#272727"],[30,45,6,"#272727"],[70,45,6,"#272727"],[125,45,6,"#272727"],[10,50,6,"#1e1e1e"],[15,50,6,"#222222"],[30,50,6,"#272727"],[70,50,6,"#272727"],[125,50,6,"#272727"],[10,55,6,"#1e1e1e"],[40,55,6,"#272727"],[70,55,6,"#272727"],[125,55,6,"#272727"],[10,60,6,"#1e1e1e"],[70,60,6,"#272727"],[10,65,6,"#1e1e1e"],[40,65,6,"#272727"],[70,65,6,"#272727"],[10,70,6,"#1e1e1e"],[70,70,6,"#272727"],[10,75,6,"#1e1e1e"],[70,75,6,"#272727"],[130,75,6,"#272727"],[10,80,6,"#1e1e1e"],[110,80,6,"#262626"],[115,80,6,"#262626"],[10,85,6,"#1d1d1d"],[40,85,6,"#222222"],[45,85,6,"#222222"],[150,85,6,"#232323"],[5,90,6,"#1b1b1b",.4],[10,90,6,"#1d1d1d"],[10,95,6,"#1c1c1c"],[30,95,6,"#1c1c1c",.9914],[155,95,6,"#1f1f1f"],[105,100,6,"#1b1b1b",.5139],[155,105,6,"#1b1b1b",.9544],[85,115,6,"#1b1b1b"],[85,135,6,"#1b1b1b"],[90,135,6,"#1b1b1b"],[30,150,6,"#1a1a1a",.0362],[90,155,6,"#1e1e1e"],[150,155,6,"#1a1a1a"],[155,155,6,"#1a1a1a"],[55,160,6,"#1a1a1a",.7636],[55,165,6,"#1b1b1b"],[85,165,6,"#1c1c1c"],[55,170,6,"#1a1a1a",.4],[85,170,6,"#1b1b1b",.4]],ks=e=>bs["gst"==e?"gh":e]||bs.unknown,Rs=e=>"data:image/svg+xml,"+encodeURI({ tampermonkey:`${_s}`,tampermonkey2:`\n\n ${_s}\n ${ys.map((e=>{const[t,n,r,s,i]=e;return``}))}\n`, monkey:"\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", webdav:"", yandex:"", firefox:"", chrome:"", onedrive:"Artboard 1", gdrive:"", dropbox:"", instagram:"", facebook:"", edge:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n', android:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n', safari:'\n', apple:'\n\n' }[e]).replace(/#|%20|%0A/g,(e=>"#"==e?"%23":" "));var xs;!function(e){e[e.OBJ_URL=1]="OBJ_URL",e[e.BLOB=2]="BLOB",e[e.BINARY=4]="BINARY",e[e.DATA_URI=8]="DATA_URI"}(xs||(xs={}));const Es=0+xs.BINARY+xs.DATA_URI,Ss=e=>void 0!==e.objUrl,Cs=e=>void 0!==e.blob,Ms=e=>void 0!==e.dataUri,Is=e=>void 0!==e.binary;class Us{constructor(e,t){if(Ss(e)){this.objUrl=e.objUrl.url,this.type=e.objUrl.type;const t=e.objUrl.revoke;t&&(Us.objUrlDisposers[this.objUrl]=t) }else if(Cs(e))this.blob=e.blob;else if(Ms(e))this.dataUri=e.dataUri;else{if(!Is(e))throw new Error("incompatible TransferableData");this.binary=e.binary,this.type=e.type}this.kinds=t||Es}async dispose(){if(this.objUrl){const e=Us.objUrlDisposers,t=e[this.objUrl];t?(delete e[this.objUrl],await t()):console.error(`Unable to revoke object URL ${this.objUrl} in service worker`)}}async toTransferableData(){if(this.kinds&xs.OBJ_URL){ if(!this.objUrl&&(!this.blob&&this.dataUri&&(this.blob=et(this.dataUri)),this.blob&&(this.objUrl=URL.createObjectURL(this.blob)),!this.objUrl))throw new Error("incomplete Transferable");return{objUrl:{url:this.objUrl,type:this.type}}}if(this.kinds&xs.BLOB){if(!this.blob&&(this.objUrl?this.blob=await oe(this.objUrl).then((e=>e.blob())):this.dataUri&&(this.blob=et(this.dataUri)),!this.blob))throw new Error("incomplete Transferable");return{blob:this.blob}}if(this.kinds&xs.BINARY){ if(void 0===this.binary){let e=this.blob;if(!e&&this.objUrl&&(e=await oe(this.objUrl).then((e=>e.blob()))),e&&(this.binary=await nt(e),this.type=this.type||e.type),void 0===this.binary)throw new Error("incomplete Transferable")}return{binary:this.binary,type:this.type||"application/octet-stream"}}if(this.kinds&xs.DATA_URI){if(!this.dataUri){let e=this.blob;if(!e&&this.objUrl&&(e=await oe(this.objUrl).then((e=>e.blob()))),e&&(this.dataUri=await tt(e)), !this.dataUri)throw new Error("incomplete Transferable")}return{dataUri:this.dataUri}}throw new Error("incompatible Transferable")}get tryObjectUrl(){return this.objUrl}get tryBlob(){return this.blob}get tryDataUri(){return this.dataUri}get tryBinary(){return this.binary}async toBlob(){if(this.blob)return this.blob;if(!this.objUrl){if(this.dataUri)return et(this.dataUri);if(this.binary)return new Blob([Je(this.binary)],{type:this.type||"application/octet-stream"}) ;throw new Error("incompatible Transferable")}try{return await(await oe(this.objUrl)).blob()}catch(e){return}}async toDataUri(){if(this.dataUri)return this.dataUri;{const e=await this.toBlob();if(!e)throw new Error("incompatible Transferable");return await tt(e)}}async toObjectUrl(){if(this.objUrl)return this.objUrl}static fromTransferableData(e){return e&&(Cs(e)||Ss(e)||Ms(e)||Is(e))?new Us(e):void 0}}Us.objUrlDisposers={};const Gs=z({timeout:10800,check_interval:300,retimeout_on_get:!0 }),Zs=V({threads:5}),Ts={},Bs=async(e,t)=>{let n,r;const s=Ts[e];if(s)return await s;const i=Zs.add((async()=>{if(r=Gs.get(e),r&&(n=await r.toBlob()),n||(n=await Os(e)),n){if(!r){const t=r=new Us({blob:n});Gs.set(e,r).then((()=>t.dispose()))}}else if(!r&&t){const t=r=new Us({dataUri:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},xs.DATA_URI);Gs.set(e,r).then((()=>t.dispose()))}return delete Ts[e],r}));return Ts[e]=i,await i},Os=async e=>{try{ const t=await oe(e);if(t.ok&&200===t.status)return await t.blob()}catch(e){}};class js{constructor(e){this.prefix=e}supported(){return y.Pledge(!!xt.session.supported)}keys(){return y((async({resolve:e})=>{const t=await xt.session.get(null),n=Object.values(t).filter((e=>e.startsWith(this.prefix)));e(n)})).promise()}list(){return y((async({resolve:e})=>{const t=await xt.session.get(null),n=Object.entries(t).filter((([e,t])=>e.startsWith(this.prefix))).map((([e,t])=>({ key:e.substr(this.prefix.length),value:t})));e(n)})).promise()}set(e,t){return y((async({resolve:n})=>{await xt.session.set({[`${this.prefix}${e}`]:t}),n()})).promise()}get(e){return y((async({resolve:t})=>{const n=`${this.prefix}${e}`;t((await xt.session.get(n))[n]||null)})).promise()}delete(e){return y((async({resolve:t})=>{await xt.session.remove(`${this.prefix}${e}`),t()})).promise()}clear(){return y((async({resolve:e})=>{ const t=await this.list().then((e=>e.map((e=>`${this.prefix}${e.key}`))));await xt.session.remove(t),e()})).promise()}}const{STORAGE:{STATE_DB:Ds}}=I,Fs=[{type:"storage.session",storage:(e,t)=>new js(`${e}.${t}.`)},{type:"indexedDB",storage:(e,t)=>new qe(e,t)},{type:"storage.local",storage:(e,t)=>new Lt(`${Ds}.${e}.${t}.`)},{type:"memory",storage:(e,t)=>new ze(`${e}.${t}.`)}],Ls={};class Ps{constructor(e){this.dbName=e}init(){if(!this.storage_promise){let e=0 ;this.storage_promise=y((({resolve:t})=>{const n=()=>{if(e>=Fs.length)throw new Error("No supported storage found.");const{type:r,storage:s}=Fs[e++],i=s(this.dbName,"stateStorage");i.supported().then((e=>{if(!e)return n();"memory"===r&&console.warn("InMemoryStorage is not persistent!"),this.storage_type=r,t(i)}))};n()})).promise()}return this.storage_promise}keys(){return this.init().then((e=>e.keys()))}list(){return this.init().then((e=>e.list()))}set(e,t){ return this.init().then((n=>n.set(e,t)))}get(e){return this.init().then((t=>t.get(e)))}delete(e){return this.init().then((t=>t.delete(e)))}clear(){return this.init().then((e=>e.clear()))}type(){return this.init().then((()=>{if(!this.storage_type)throw new Error("internal error");return this.storage_type}))}}const Ns=e=>{let t=Ls[e];return t||(t=Ls[e]=new Ps(e)),t},Vs={},zs=[],qs=Ns("notify"),Hs=new rt(1);Hs.acquire().then((async()=>{for(const{key:e,value:t}of await qs.list())Vs[e]={cbs:[],o:t} })).always((()=>Hs.release()));const Qs=async e=>{Vs[e]&&(delete Vs[e],await qs.delete(e))},Ws=async(e,t)=>{v.log("notify: click",e);const n=Vs[e];if(n){se((()=>Qs(e)),1e3);const r={...n.o,id:e};await h.all(n.cbs.map((async e=>{await e({clicked:t,notification:r})})));for(const e of zs)await e({clicked:t,notification:r})}else v.log("notify: click, notification not found",e)},Xs=async e=>{v.log("notify: close",e);const t=Vs[e];if(t){const n={...t.o,id:e};await Qs(e),t.cbs.forEach((e=>e({ notification:n})));for(const e of zs)e({notification:n})}else v.log("notify: close, notification not found",e)},Ys=(()=>{let e,t=null;const n=()=>{if(e)return e;const n=y(),r=e=>{t=e||"unknown",v.log("notify: chronos level",e),n.resolve()};return Ut.supported?(Ut.getPermissionLevel(r),Ut.onPermissionLevelChanged.addListener(r),Ut.onClicked.addListener((e=>Ws(e,!0))),Ut.onClosed.addListener((e=>Xs(e)))):r("unsupported"),e=n.promise()};return n(),{cancel:e=>new h((t=>{ Ut.supported?Ut.clear(e,(()=>{ft.lastError?t(!1):(Xs(e),t(!0))})):t(!1)})),create:(e,r,s,i,o)=>n().then((async()=>{const n=y();let a=10;const c=async()=>{if(t)if("granted"==t){const{silent:t}=o,a={type:"basic",title:s||"",message:i||""},c=()=>new h((t=>{Ut.supported?Ut.create(e,a,(()=>{ft.lastError?t(!1):(v.log("notify: chronos created",e),t(!0))})):t(!1)}));E()>=70&&void 0!==t&&(a.silent=t),E()>=50&&(a.requireInteraction=!0);const l=Vs[e] ;l&&(v.log("notify: chronos notification already exists",e),await h.all([Ys.cancel(e),Qs(e)])),a.iconUrl=r;let u=await c();if(u||(v.log("notify: chronos creating failed, retry...",ft.lastError),a.iconUrl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",u=await c()),!u)return v.log("notify: chronos creating finally failed",ft.lastError),void n.reject();l&&(Vs[e]=l),n.resolve({type:"chronos",id:e})}else n.resolve();else{const e=()=>{ t?c():a--?se(e,200):n.resolve()};e()}};return c(),n.promise()}))}})(),Js=(()=>{const e={};let t,n=null;const r=he,s={cancel:t=>e[t]?(e[t].close(),delete e[t],Xs(t),h.resolve(!0)):h.resolve(!1),create:(s,i,o,a,c)=>{return(t||(l=r?r.permission:"unsupported",n=l||"unknown",v.log("notify: notification level",l),t=y.Pledge())).then((async()=>{const t=y(),l=async()=>{if("granted"==n||"default"==n){const{silent:n}=c,l={body:a||"",icon:i};E()>=43&&void 0!==n&&(l.silent=n),l.requireInteraction=!0 ;const u=e[s];Vs[s]&&(v.log("notify: notification already exists",s),delete e[s],u&&u.close());const d=new r(o||"",l);d.onclick=()=>{v.log("notify: notification click",s);const t=e[s];t&&t.onClick.forEach((e=>e(s,!0)))},d.onclose=d.onerror=t=>{v.log("notify: notification close",s,t);const n=e[s];n&&n.onClose.forEach((e=>e(s)))},e[s]={close:()=>d.close(),onClose:(u?u.onClose:[]).concat([Xs]),onClick:(u?u.onClick:[]).concat([Ws])},t.resolve({type:"native",id:s}) }else if("denied"==n)t.resolve();else if("unsupported"==n)t.resolve();else{const e=e=>{n="granted"==e?"granted":"denied",l()};r.requestPermission().then(e)}};return l(),t.promise()}));var l}};return s})(),Ks=(()=>{const e={};return{cancel:t=>e[t]?(e[t].close(),delete e[t],Xs(t),h.resolve(!0)):h.resolve(!1),create:(t,n,r,s)=>{if(_e){const i=e[t];Vs[t]&&(v.log("notify: notification already exists",t),delete e[t],i&&i.close());try{const o=_e.createNotification(n,r||"",s||"");return o.onclick=()=>{ v.log("notify: webkit click",t);const n=e[t];n&&n.onClick.forEach((e=>e(t,!0)))},o.onclose=()=>{v.log("notify: webkit close",t);const n=e[t];n&&n.onClose.forEach((e=>e(t)))},e[t]={close:()=>o.cancel(),onClose:(i?i.onClose:[]).concat([Xs]),onClick:(i?i.onClick:[]).concat([Ws])},o.show(),y.Pledge({type:"webkit",id:t})}catch(e){v.warn("notify: webkitNotifications creation failed with: "+e.message)}}return y.Pledge()}}})(),$s=(()=>{const e=ve,t={};return{cancel:e=>t[e]?(t[e](),delete t[e],Xs(e), h.resolve(!0)):h.resolve(!1),create:(t,n,r,s,i)=>{const{informational:o}=i,a=y();return!e||o?(a.resolve(),se((()=>{Xs(t)}),1)):(a.resolve({type:"conf",id:t}),se((()=>{const n=e((r?r+"\n\n":"")+s);Ws(t,!!n),se((()=>Xs(t)),1)}),1)),a.promise()}}})(),ei=(e,t,n,r,s,i)=>{s=s||{};const{timeout:o}=s;let a;const c=o;let l,u=!1,d=null;const A=e=>{switch(e){case"webkit":return Ks;case"native":return Js;case"chronos":return Ys;case"conf":return $s}},p=()=>{d&&J(d),!u&&i&&i({})},h=()=>{if(u=!0,i&&i({ clicked:u}),a){const e=A(a.type);e&&e.cancel(a.id)}};return r=r||ht.getURL("images/icon128.png"),Bs(r,!1).then((e=>null==e?void 0:e.toDataUri())).then((e=>l=e||r)).then((()=>Hs.acquire())).then((()=>Ys.create(e,l,t,n,s))).then((r=>r||Ks.create(e,l,t,n,s))).then((r=>r||Js.create(e,l,t,n,s))).then((r=>r||$s.create(e,l,t,n,{informational:!i,notificationId:e}))).then((e=>{if(!e)return;const{id:i,type:o}=a=e,l=Vs[i]=Vs[i]||((e,t)=>{const n=Vs[e]={cbs:[],o:t};return qs.set(e,t),n})(i,s) ;l.cbs.push((e=>{"clicked"in e&&h&&h(),p&&p()})),d=se((()=>{d=null;const e=A(o);e&&e.cancel(i)}),c||6e5),v.log("notify:",t,n,r,c)})).always((()=>Hs.release())),{cancel:()=>{if(a){const e=A(a.type);e&&e.cancel(a.id)}}}},ti=(e,t,n,r,s)=>ei(r.notificationId||Pe(),e,t,n,r,s),ni={},ri={},si=(e,t)=>{let n;const r=t.id||t.key||"general";if("deleted"in t)return void delete e[r];const s=t.timeout;let i,o;s&&(i=se((()=>{delete e[r]}),s),o=Date.now()+s),(n=e[r])&&n.to&&J(n.to),e[r]={options:t,...s?{ts:o, to:i}:{}}},ii=e=>{const t=Date.now();return Object.keys(e).map((n=>{const r=e[n],s=r.options;let i;if(!r.ts||(i=Math.max(0,r.ts-t)))return s.timeout=i,s})).filter((e=>e))},oi=new Ve,ai={all:e=>{ai.actionPage(e),e&&ai.optionsPage(e)},updateActionPage:()=>{oi.emit("actions",{method:"update"})},actionPage:e=>{oi.emit("actions",{options:e}),si(ri,e)},optionsPage:e=>{oi.emit("options",{options:e}),si(ni,e)},actionStatus:()=>ii(ri),optionsStatus:()=>ii(ni)},ci=ai;let li;const ui={ newV:ht.manifest.version,oldV:void 0,first_run:!1,active:!1},di=()=>{if(!_.late)return void _.registerLateCallback(di);let e,t="version="+ui.newV+"&ext="+ft.short_id+"&updated=true";if(ui.first_run?(e="https://www.tampermonkey.net/installed.php?"+t,ui.active=!0):(t+="&old="+ui.oldV,e="https://www.tampermonkey.net/changelog.php?"+t),"off"==wn.values.notification_showUpdate);else if("notification"==wn.values.notification_showUpdate)n=Qr.getMessage("Updated_to__0version0",ui.newV), r=Qr.getMessage("Click_here_to_see_the_recent_changes"),s=Rs("tampermonkey"),i=t=>{if(t.clicked){const t={url:e};mt.create(t,(()=>{}))}},ei(Pe(),n,r,s,{timeout:3e5},i);else if("changelog"==wn.values.notification_showUpdate){ui.active||(e+="&intr=true"),ui.active=!0;const t={url:e,active:ui.active};mt.create(t,(()=>{}))}var n,r,s,i},Ai=(()=>{const e=y(),t=()=>{const t=Date.now(),n=nn.getValue(I.STORAGE.LAST_START,0),r=Math.round((t-n)/1e3),s=r<=60;v.log("upd: restart?",s,"(",r,"seconds ago)"), e.resolve(s)};return _.late?t():_.registerLateCallback(t),e.promise()})(),pi=()=>{let e=!1,t=!1;(()=>{let e,t;const n=y(),r=()=>{t&&(t=void 0,n.resolve(!!e))};return t=se(r,300),Bt(15,(t=>{e="active"==t,r()})),n.promise()})().then((e=>(t=e,Ai))).then((t=>{e=t})).always((()=>{ui.active=!t||e,di(),fi=!0}))};let hi,fi,mi=!1;const gi={scheduleNotification:(e,t)=>{fi||(ui.oldV=e||void 0,ui.first_run||(ui.first_run=t),hi&&J(hi),hi=se(pi,1e3))},updateAvailable:()=>li,onInstalled:()=>{ gi.scheduleNotification(void 0,!0)},onUpdated:e=>{gi.scheduleNotification(e,!1)},onUpdateAvailable:e=>{mi||(v.info("An update to version",e.version,"is available"),li=e.version,ci.all({domain:"status",key:"extension_update_available",class:"information",text:Qr.getMessage("0name0_0version0_is_available__Please_re_start_your_browser_to_update_",ht.manifest.name,e.version),timeout:864e5}),mi=!0)}};_.registerLateCallback((()=>{nn.setValue(I.STORAGE.LAST_START,Date.now())})) ;const vi=gi,wi=new Ve,bi=new Ve,_i=new Ve,yi=new Ve,ki=new Ve;let Ri={},xi=null;const Ei=()=>{const e=Date.now(),t={},n=Object.keys(Ri);n.forEach((n=>{const r=Ri[n];r?e-r.ts{r.com.reject({error:"timeout",please_close:!0})}),1),Si(n)):v.error("cleanup: e is undefined",n)})),Ri=t,null!==xi&&0===n.length&&(Y(xi),xi=null)},Si=e=>{const t=Ri[e];if(t){delete Ri[e];const n=t.preparat;if((e=>{const t=e;return void 0!==t.script&&"tfd"in t.script})(n)){const{script:e,oldscript:t}=n ;new Us(e.tfd).dispose(),t&&new Us(t.tfd).dispose()}}},Ci=15e3;let Mi=!1;const Ii=(e,t)=>{Mi||Ui.init(),null===xi&&(xi=re(Ei,5e3));const n=y();return((e,t)=>{const n=y();return void 0===t&&(t=!0),mt.getSelected(null,(r=>{const s=r?r.index+1:void 0;mt.create({url:ht.getURL("ask.html")+"?aid="+e,active:t,index:s,parent:r},(e=>{if(!e){const e="tabs.create failed -> giving up now!";return v.error(e),void n.reject({error:e})}n.resolve({id:e.id,close:()=>mt.remove(e.id)})}))})),n.promise()})((e=>{ const t=Pe();return Ri[t]=e,t})({ts:Date.now(),com:n,preparat:t,type:e}),t.active).then((e=>n.promise().done((t=>{(t.ok||t.aborted)&&e.close()}))))},Ui={init:()=>{Mi||(Mi=!0)},onMessage:e=>{const t=y(),n=e.aid,r=Ri[n];if(r){if(r.aborter&&(J(r.aborter),delete r.aborter),"ping"==e.method)Ri[n].ts=Date.now(),t.resolve({pong:!0});else if("preparat"==e.method)t.resolve({preparat:r.preparat,type:r.type});else if("install"==e.method){const s=e.message;r.com.resolve({ok:!0,message:s||{}}),t.resolve({}), Si(n)}else if("import"==e.method){const s=e.message;r.com.resolve({ok:!0,message:s}),t.resolve({}),Si(n)}else if("permission"==e.method){const s=e.message;r.com.resolve({ok:!0,message:s}),t.resolve({}),Si(n)}else if("unload"==e.method||"abort"==e.method){const s=e.message;t.resolve({});const i=()=>{r.com.resolve({ok:!1,aborted:!0,message:s||{}}),Si(n)};"abort"==e.method?i():r.aborter=se(i,3e3)}else if("connect"==e.method){const s=e.message;r.com.resolve({ok:!0,message:s}),t.resolve({}),Si(n)} }else t.reject({error:"unknown_id",please_close:!0});return t.promise()},install:e=>Ii("install",e),import:e=>Ii("import",e),askForPermission:(e,t,n)=>{const r={permissions:e.permissions,origins:e.origins,title:t,message:n};return Ii("permission",r)},installError:e=>Ii("install_error",e),askForConnect:e=>Ii("connect",e)},Gi=Ui;let Zi,Ti,Bi;(()=>{const e=y();Zi=e.promise();const t=Ns("general");t.type().then((n=>{"storage.session"===n?t.get("session_start").then((n=>{n?(Bi=!1, Ti=parseInt(n)):(Bi=!0,Ti=(new Date).getTime(),t.set("session_start",`${Ti}`)),e.resolve()})):(Bi=void 0,Ti=void 0,e.resolve())}))})();const Oi=()=>Zi.then((()=>Bi)),ji=()=>Zi.then((()=>Ti));let Di,Fi,Li;const Pi=()=>Di||y.Pledge(),Ni=e=>{Zt.supported&&(Zt.onAdded.addListener((t=>{e({added:t})})),Zt.onRemoved.addListener((t=>{e({removed:t})})))},Vi=()=>{const e=y(),t=Fi={},n=Li={};return Di=e.promise(),Zt.supported?Zt.getAll((r=>{r.permissions&&Object.values(r.permissions).forEach((e=>t[e]=!0)), r.origins&&Object.values(r.origins).forEach((e=>n[e]=!0)),Di=void 0,e.resolve()})):e.resolve(),e.promise()},zi=Ns("general"),qi=async(e,t,n,r)=>{let s=await Xi.has(e);if(!s){const i=await ji(),o=`asked_for_permission_${e}`,a=void 0===i?void 0:i.toString(),c=await zi.get(o);void 0!==a&&c===a||(s=await Xi.ask(e,t,n),r&&r(s),a&&zi.set(o,a))}return s},Hi=an("runtime_host_permissions","denied");let Qi;const Wi=()=>y((({resolve:e})=>{if(void 0!==Qi)e(Qi);else{if(Zt.supported)return(0, Xi.hasOrigin)("*://*/*").then((t=>{Qi=t,e(Qi)}),(()=>{Qi=!0,e(Qi)}));Qi=!0,e(Qi)}})).promise();Ni((()=>{Qi=void 0}));const Xi={permDownloads:"downloads",permProxy:"proxy",has:e=>Pi().then((()=>!Zt.supported||(Fi&&Li?!!Fi[e]||!!Li[e]:(Ni((()=>{Pi().then((()=>Vi()))})),Vi().then((()=>Xi.has(e))))))),hasOrigin:e=>{const t=De(e);return Pi().then((()=>{const e=y();return Zt.supported?Zt.contains({origins:t},(t=>{e.resolve(t)})):e.resolve(!0),e.promise()}))},ask:(e,t,n)=>{const r=De(e),s=y() ;return Zt.supported?Gi.askForPermission({permissions:r},t,n).done((({message:e})=>{const t=!!(null==e?void 0:e.granted);if(t){Fi||(Fi={});for(const e of r)Fi[e]=!0}s.resolve(t)})):s.resolve(!1),s.promise()},askOrigin:(e,t,n)=>{const r=De(e),s=y();return Zt.supported?Gi.askForPermission({origins:r},t,n).done((({message:e})=>{const t=!!(null==e?void 0:e.granted);if(t){Li||(Li={});for(const e of r)Li[e]=!0}s.resolve(t)})):s.resolve(!1),s.promise()},remove:e=>Pi().then((()=>{const t=y() ;return Zt.supported?(Di=t.promise(),Zt.remove({permissions:[e]},(n=>{Di=void 0,Fi&&(Fi[e]=!1),t.resolve(n)}))):t.resolve(!0),t.promise()})),addListener:Ni},Yi=Xi,Ji={};it.on("xhr",(function(e){let t,n;void 0!==(t=e.id)&&void 0!==(n=Ji[t])&&n.handle(e)&&delete Ji[t]}));class Ki{constructor(e){this.readyState=Ki.UNSENT,this.status=0,this.statusText="",this.responseType="",this.async=!0,this.timeout=-1,this.canceled=!1,this.loaded=0,this.headers={},this.onreadystatechange=null, this.onredirect=null,this.onopen=null,this.onload=null,this.onloadstart=null,this.onprogress=null,this.onabort=null,this.onerror=null,this.ontimeout=null,this.upload={onprogress:null,loaded:0,total:void 0},this.open=function(e,t,n=!0,r,s){if(this.method=e,this.url=t,this.async=n,this.user=r,this.password=s,this.responseURL=t,!this.async)throw new Error("Synchronous requests are not supported");this.onopen&&this.onopen(this)},this.send=async function(e){ this.mime_type&&(this.request_headers||(this.request_headers={}),this.request_headers["content-type"]||(this.request_headers["content-type"]=this.mime_type)),(this.user||this.password)&&(this.request_headers||(this.request_headers={}),this.request_headers.Authorization="Basic "+X((this.user||"")+":"+(this.password||"")));const t=this.method||"GET",n=this.url;if(!n)throw new Error("No URL specified");const r={method:t,url:n,headers:this.request_headers,timeout:this.timeout>0?this.timeout:void 0, anonymous:"withCredentials"in this?!this.withCredentials:this.options&&!!this.options.anonymous},s=e=>{this.method&&"POST"==this.method.toUpperCase()&&(this.request_headers||(this.request_headers={}),this.request_headers["content-type"]||(this.request_headers["content-type"]=e))};if(e){let t,n="";if(e instanceof Blob){t=e.size;const i=await nt(e);i?(r.data=We(i),s(n)):(this.readyState=0,this.statusText="data read error",this.onerror&&this.onerror(this))}else t=e.length,n="text/plain", r.data=We(He(e));s(n),this.upload&&(this.upload.loaded=0,this.upload.total=t)}(async e=>{await st.acquire();try{let t;const n=await Promise.race([new Promise(((n,r)=>{t=se((()=>{t=void 0,r(`timeout: ${e.method}`)}),15e3)})),M.runtime.sendNativeMessage("application",e)]);return void 0!==t&&J(t),n}catch(e){throw console.error("sendNativeMessage",e),e}finally{st.release()}})({method:"xhr",id:this.id,details:r}),e&&this.upload&&this.upload.onprogress&&this.upload.onprogress.apply(this,[this.upload]) },this.abort=function(){this.canceled=!0,delete Ji[this.id],this.onabort&&this.onabort(this)},this.overrideMimeType=function(e){this.mime_type=e},this.getAllResponseHeaders=function(){const e=this.headers;return Object.keys(e).map((function(t){const n=e[t];return n&&n.includes(",")?n.split(",").map((function(e){return t+":"+e.trimStart()})).join("\r\n"):t+":"+n})).join("\r\n")},this.getResponseHeader=function(e){return this.headers[e]},this.setRequestHeader=function(e,t){ null!==t&&(this.request_headers||(this.request_headers={}),this.request_headers[e.trim().toLowerCase()]=t.trim())},this.toString=function(){return"[object XMLHttpRequest]"},this.handle=function(e){const t=e.data,n=()=>{this.onprogress&&this.onprogress(this)};if(t.timeout)this.ontimeout&&this.ontimeout.apply(this,[this]);else if(1==t.readyState&&"loaded"in t)this.upload&&this.upload.onprogress&&(this.upload.loaded=t.loaded||0,this.upload.total=t.total, this.upload.onprogress.apply(this,[this.upload]));else if(2==t.readyState&&301==t.status)Object.assign(this,t),this.onredirect&&this.onredirect(this);else if(t.readyState!=this.readyState){if(Object.assign(this,t),this.onreadystatechange&&this.onreadystatechange(this),4==t.readyState){const e=t.status;return e>=400?this.onload&&this.onload.apply(this,[this]):e>=300||(e>=200?this.onload&&this.onload.apply(this,[this]):e>=100||0===e&&this.onerror&&this.onerror.apply(this,[this])),!0} t.readyState>1?n():1==t.readyState&&this.onloadstart&&this.onloadstart.apply(this,[this])}else 3==t.readyState&&(Object.assign(this,t),n())},this.id=Date.now()+(Math.random()+1).toString(36).substring(7),this.options=e,Ji[this.id]=this}get lengthComputable(){return null!=this.total}get target(){return this}get response(){const e=eo(this.responseData);if(null==e)return null ;const t=this.responseType?this.responseType.toLowerCase():"",n=(this.headers?this.headers["content-type"]:null)||"binary/octet-stream";return $i(e,t,n)}get responseText(){const e=eo(this.responseData);return null==e?null:$i(e,this.mime_type?"binary":"text")}get responseXML(){const e=eo(this.responseData);if(null==e)return null;const t=(this.headers?this.headers["content-type"]:null)||"";return $i(e,"document",t.split(";")[0])}}Ki.UNSENT=0,Ki.OPENED=1,Ki.HEADERS_RECEIVED=2,Ki.LOADING=3, Ki.DONE=4,Ki.toString=function(){return"[XMLHttpRequest]"};const $i=function(e,t,n){let r;if("arraybuffer"==t)r=Je(e);else if("blob"==t)r=new Blob([Je(e)],{type:n});else if("json"==t)r=JSON.parse(Qe(e));else{if("document"==t)return"text/xml"==n&&pe?(new pe).parseFromString(e,n):null;if("text"==t||n&&(n.match(/charset=(utf[-_]?8)/i)||"text/html"==n))try{r=Qe(e)}catch(t){r=e}else r=e}return r},eo=e=>{try{if(void 0===e)return;return Xe(e)}catch(e){return void console.warn("XmlHttpRequest:",e)}} ;var to;!function(e){e.TESTING="TESTING",e.AUDIO_PLAYBACK="AUDIO_PLAYBACK",e.IFRAME_SCRIPTING="IFRAME_SCRIPTING",e.DOM_SCRAPING="DOM_SCRAPING",e.BLOBS="BLOBS",e.DOM_PARSER="DOM_PARSER",e.USER_MEDIA="USER_MEDIA",e.DISPLAY_MEDIA="DISPLAY_MEDIA",e.WEB_RTC="WEB_RTC",e.CLIPBOARD="CLIPBOARD",e.LOCAL_STORAGE="LOCAL_STORAGE",e.WORKERS="WORKERS",e.BATTERY_STATUS="BATTERY_STATUS",e.MATCH_MEDIA="MATCH_MEDIA",e.GEOLOCATION="GEOLOCATION"}(to||(to={}));const no=async(e,t)=>{{let n;try{const r=n=await(e=>e({ justification:"create an object URL",reasons:[to.BLOBS]}))(t),s=(await r.sendBinary({action:"objectURL",blob:e})).url;if(s)return new Us({objUrl:{url:s,revoke:async()=>{r&&(await r.send({action:"objectURL",url:s}),r.release())}}},Es+xs.OBJ_URL);n&&n.release()}catch(e){n&&n.release(),console.warn("offscreen: failed to create object URL",e)}}return new Us({blob:e})},ro=[301,302,303,307,308],so=["arraybuffer","blob","document","json","xml","headers","stream"];let io,oo={},ao=()=>h.resolve({ done:()=>{}}),co=()=>h.resolve({done:()=>{}}),lo=()=>Promise.resolve(!0);const uo=["internal","user-agent","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],Ao={"cache-control":"max-age=0, must-revalidate"},po=e=>{const t={},n={};return Object.keys(e).forEach((r=>{let s=r,i=e[r];var o ;o=r.toLowerCase(),uo.includes(o)||0===o.indexOf("proxy-")||0===o.indexOf("sec-")?n[s]=i:t[s]=i})),{...Object.keys(n).length?{forbidden:n}:{},...Object.keys(t).length?{regular:t}:{}}},ho=e=>({responseText:"",response:null,readyState:4,responseHeaders:"",status:0,statusText:"",error:e=e||"Forbidden"}),fo=e=>e&&"object"==typeof e&&"type"in e&&"value"in e,mo=e=>{if("Blob"===e.type)return new Blob([Je(e.value)]);if("File"===e.type){if(!e.name)return;return new File([Je(e.value)],e.name,{type:e.meta, lastModified:e.lastModified||Date.now()})}if("FormData"==e.type){const t=new FormData;return e.value.forEach((({name:e,value:n})=>{const r=mo(n);void 0!==r?t.append(e,r):v.warn("Unable to un-typify value for FormData field",n)})),t}if("URLSearchParams"===e.type)return new URLSearchParams(e.value);if("Array"===e.type||"Object"===e.type){let t,n,r;"Object"===e.type?(r=Object.keys(e.value),n=e=>et{const t={};return e&&e.split("\n").forEach((e=>{const n=e.match(/^([^:]+): ?(.*)/);if(n){const e=n[1].toLowerCase();t[e]=(void 0!==t[e]?t[e]+",":"")+(n[2]||"").replace(/,/g,"%2C")}})),t},vo=(e,t,n)=>{const r={...t||{}},s=async(e,t)=>{const n=r[e];n&&n("function"==typeof t?await t():t)},i=async(e,t)=>{r[e]&&(await s(e,t),r[e]=void 0)};if(!(n=n||{}).internal&&(o=e.url, !["https:","http:","data:","blob"].some((e=>o.startsWith(e))))){v.warn("xhr: invalid scheme of url:",e.url);const t=ho("Invalid scheme");return i("onerror",t),void i("ondone",t)}var o;const a=void 0!==e.responseType?e.responseType.toLowerCase():void 0,c=e.redirect&&"follow"!==e.redirect,l=(e.proxy&&e.proxy.type,!oo.mozAnon&&e.anonymous||"stream"==a||c||!e.partialSize&&a||"typified"===e.data_type),u=e.fetch||!1;return l||u?_o(e,r,n,e.retries||0,i,s):yo(e,r,n,e.retries||0,i,s) },wo="tm-finalurl"+B.short_id.toLowerCase(),bo="tm-setcookie"+B.short_id.toLowerCase(),_o=(e,t,n,r,s,i)=>{const o=pe,a=!e.redirect||"follow"===e.redirect;let c,l,u,d,A;const p=(t,n,r)=>{const s=[];let i;const o=r||t.headers;if(o){const n=[],r=[];o.forEach(((e,t)=>{const o=t.toLowerCase();o.startsWith(bo)?n.push(e):"set-cookie"===o?r.push(e):o===wo?i=e:s.push(o+":"+e)})),i=a?i||t.url:e.url,(n.length?n:r).forEach((e=>s.push("set-cookie:"+e)))}const c=void 0===n?4:n,l=t.status||0,u=t.statusText||"" ;return{readyState:c,responseHeaders:s.join("\r\n"),finalUrl:i,status:l,statusText:u}},h=(e,t,n)=>Object.assign(n||{},{lengthComputable:void 0!==e,loaded:e,done:e,position:e,total:t,totalSize:t}),f=e=>{let t;d&&d(),l||(u?(t=p({status:408,statusText:"Request Timeout"}),s("ontimeout")):"AbortError"==(null==e?void 0:e.name)?(t=ho("aborted"),s("onabort",t)):(t=p({status:408,statusText:(null==e?void 0:e.message)||"Request Timeout"}),s("onerror",t)),l=!0,s("ondone",t)) },m=e.responseType?e.responseType.toLowerCase():"";if("document"==m&&!o)return void f({name:"Error",message:"response type not supported"});const g=async(e,t,r)=>{let s;if(r)s=e;else{const t=e;if(!n.no_blob&&!n.foreign_context){let e;if(!io)throw new Error("Offscreen document not available");return e=await no(t,io),i("onpartial",{tfd:await e.toTransferableData()}),void se((()=>e.dispose()),2e4)}{const e=await nt(t);if(!e)return void v.warn("xhr: failed to convert blob to binary text");s=e}} const o=Ne(s,t);o.forEach(((e,t)=>{i("onpartial",{partial:e,index:t,length:o.length})}))};let w=!1;const b=e=>{e&&(u=!0),_?_.abort():u?f():f({name:"AbortError",message:"Aborted by user"})};let _;return(async()=>{try{const u={};u.method=e.method||"GET";const y=zn(e.url);let k,R;if(y){let t=!1;y.username&&(e.user=e.user||y.username,t=!0),y.password&&(e.password=e.password||y.password,t=!0),k=t?Hn(y):e.url}else k=e.url;if(e.headers){let{forbidden:t,regular:n}=po(e.headers);if(R=n,t){ const{responseHeaders:n,done:r}=await ao(k,u.method,e.proxy,!a,t);d=()=>{r(),d=void 0},n&&(A=n)}}if(!a&&(u.redirect=e.redirect,!d)){const{responseHeaders:t,done:n}=await ao(k,u.method,e.proxy,!a);d=()=>{n(),d=void 0},t&&(A=t)}if((!await lo()||(e.proxy,0))&&!d){const{responseHeaders:t,done:n}=await ao(k,u.method,e.proxy,!1);d=()=>{n(),d=void 0},t&&(A=t)}if(!d){const{done:e}=await co(k,u.method);d=()=>{e(),d=void 0}}e.nocache?u.cache="reload":e.revalidate&&(u.cache="default",R=R||{},R={...R,...Ao }),e.anonymous?u.credentials="omit":u.credentials="include",e.user&&e.password&&(R=R||{},R.Authorization="Basic "+X(e.user+":"+e.password)),R&&(u.headers=new Headers(R)),void 0!==e.data&&null!==e.data&&(fo(e.data)&&"typified"===e.data_type?u.body=mo(e.data):"string"==typeof e.data?u.body=e.data:u.body=JSON.stringify(e.data)),_=q?new q:void 0,_&&(u.signal=_.signal),s("onloadstart",p({status:0,statusText:""},1)),oe(k,u).then((async a=>{var u,f,b;let _;if(c&&(J(c),c=null),A){ const e=await Promise.race([A,F(5e3)]);if(e){_=(e=>{const t=new Headers;for(const[n,r]of e.entries())t.append(n,r);return t})(a.headers);for(const t of e)if(void 0!==t.value)try{_.set(t.name,t.value)}catch(e){try{_.set(t.name,He(t.value))}catch(e){v.warn("xhr: failed to set header",t.name,t.value)}}}}if(d&&d(),l)return;let y=p(a,void 0,_);if(y.status>0&&(y.status<200||y.status>=399)&&r>0)return void _o(e,t,n,r-1,s,i);const{partialSize:k,overrideMimeType:R,responseType:x}=e ;if(a.ok)if(i("onreadystatechange",p(a,2,_)),"stream"==m){const t=null===(u=a.body)||void 0===u?void 0:u.getReader();if(t)for(;;){const{done:n,value:r}=await t.read();if(r){const t=new Blob([r]);await g(t,parseInt(e.partialSize),!1)}if(n)break}}else{const t=await(async(e,t)=>{var n;const r=null===(n=e.body)||void 0===n?void 0:n.getReader();if(r){const n=[];let s=0;const o=parseInt(e.headers.get("Content-Length")||"-1");for(;;){const{done:a,value:c}=await r.read();if(c&&(n.push(c),s+=c.length, await i("onprogress",(async()=>{const n=p(e,3,t);return h(s,o,n)}))),a)break}const a=new Uint8Array(s);let c=0;for(const e of n)a.set(e,c),c+=e.length;return a}{const n=await e.arrayBuffer();return await i("onprogress",(async()=>{const r=p(e,3,t);return h(n.byteLength,n.byteLength,r)})),new Uint8Array(n)}})(a,_),n=null===(f=a.headers)||void 0===f?void 0:f.get("Content-Type"),r=((null===(b=R||n)||void 0===b?void 0:b.toLowerCase().match(/charset=([^;]+)/))||[])[1],s=()=>new Blob([t],{ type:R||n||"binary/octet-stream"});if(k){let t;["arraybuffer","blob"].includes(m)||void 0!==R?(y.response=s(),t=!1):(y.response=await nt(s(),r||"utf-8"),t=!0),y=await(async(t,n)=>{if(e.partialSize){const r=t.response;["response","responseText","responseXML"].forEach((e=>{delete t[e]})),!w&&r&&(w=!0,await g(r,parseInt(e.partialSize),n))}return t})(y,t)}else if(void 0!==x){let e;if("arraybuffer"==m)y.response=t.buffer;else if("blob"==m)y.response=s();else if("document"==m){ e=(n||"text/xml").toString().split(";")[0];const t=new o,i=await nt(s(),r||"utf-8");y.response=t.parseFromString(i||"",e)}else if("json"==m){const e=await nt(s(),r||"utf-8");y.response=JSON.parse(e||"")}else v.warn("xhr: responseType",m," is not implemented!"),y.responseText=y.response=await nt(s(),r||"utf-8")}else{const e=await nt(s(),r||"utf-8");y.responseText=y.response=e}}else if(y.responseXML=void 0,"follow"!==e.redirect&&"opaqueredirect"==a.type){const e=p(a,2,_) ;e.responseText=e.response=y.responseText=y.response=void 0,e.status=y.status=301,i("onreadystatechange",e)}else{i("onreadystatechange",p(a,2,_));try{if("stream"==m){const t=await a.text(),n=new Blob([t]);await g(n,parseInt(e.partialSize),!1)}else y.responseText=y.response=await a.text()}catch(e){}}s("onreadystatechange",y),s("onload",y),s("ondone",y)})).catch((async e=>{A&&await Promise.race([A,F(500)]),f(e)})),void 0!==e.timeout&&null!==e.data&&(c=se((()=>{c=null,b(!0)}),e.timeout))}catch(e){ d&&d();const t=e;v.error(t.message,t.stack);const n=ho(t.message);s("onerror",n),s("ondone",n)}})(),{abort:()=>b()}},yo=(e,t,n,r,s,i)=>{let o,a,c=!1;const l=(()=>{if(!io)throw new Error("Offscreen document not available");return io({justification:"make a XMLHttpRequest and forward BLOB data",reasons:[to.BLOBS]})})().then((async({connect:l})=>{if(o=await l("xhr",6e4),c){const e=ho("aborted");return await s("onabort"),await s("ondone",e),void o.disconnect()}const u=new rt(1);let d,A,p ;if(e.method=e.method||"GET",e.headers){let t;const{forbidden:n,regular:r}=po(e.headers);t=r;{const{responseHeaders:t,done:r}=await ao(e.url,e.method,e.proxy,!1,n);a=()=>{r(),a=void 0},t&&(d=t)}e.headers=t}if(!a){const{done:t}=await co(e.url,e.method);a=()=>{t(),a=void 0}}o.onMessage.addListener((async e=>{await u.acquire();try{let t;if(e.data&&"responseHeaders"in e.data&&(t=e.data.responseHeaders)){if(d){let e;const n=await Promise.race([d,F(5e3)]);if(n){e=new Headers(go(t)) ;for(const t of n)if(void 0!==t.value)try{e.set(t.name,t.value)}catch(n){try{e.set(t.name,He(t.value))}catch(e){v.warn("xhr: failed to set header",t.name,t.value)}}const{rh:r,fu:s}=(e=>{const t=[],n=[],r=[];let s;return e.forEach(((e,i)=>{const o=i.toLowerCase();o.startsWith(bo)?n.push(e):"set-cookie"===o?r.push(e):o===wo?s=e:t.push(o+":"+e)})),(n.length?n:r).forEach((e=>t.push("set-cookie:"+e))),{rh:t.join("\r\n"),fu:s}})(e);A=r,p=s}d=void 0}a&&a(),A&&(e.data.responseHeaders=A), p&&(e.data.finalUrl=p)}"ondone"===e.type&&a&&a(),await i(e.type,e.data)}finally{u.release()}})),o.onDisconnect.addListener((()=>{o=void 0}));const h=Object.keys(t).reduce(((e,n)=>{const r=n;return t[r]&&(e[r]=!0),e}),{}),{data_type:f,data:m}=e;if(fo(m)&&"typified"===f)throw new Error("unsupported data type");o.postMessage({action:"xhr",details:e,retries:r,callbacks:h,options:n})}));return{abort:async()=>{c||(c=!0,await l,o&&o.postMessage({action:"xhr",abort:!0}))}}};let ko,Ro,xo={} ;const Eo="runtime_host_permissions";let So;const Co=(e,t)=>{if(So||(So=se((()=>{So=void 0,(()=>{let e;y.Pledge().then((()=>Wi())).then((t=>{e=t,e?ci.all({domain:"status",key:Eo,deleted:!0}):ci.all({domain:"status",key:Eo,class:"warning",text:Qr.getMessage("Limited_runtime_host_permissions_might_break_some_Tampermonkey_features_"),timeout:31536e6}),e||void 0!==Ro?e&&Ro&&(wi.off("onRequestRedirect",Ro),Ro=void 0):(Ro=({url:e})=>{Co(e,1e3)},wi.on("onRequestRedirect",Ro)) })).then((()=>ko)).then((()=>{const t=Object.values(xo);if(xo={},e)return t;{const e={},n=ko=y.Pledge().then((async()=>{const n=await Hi.get(),r=[];await h.all(t.map((async t=>{const s=zn(t.url);if(!s||!s.protocol||!s.hostname||["data:","blob:"].includes(s.protocol))return;const i=(e=>{const t="string"==typeof e?zn(e):e;if(!t)throw new Error("invalid url");return Hn(t,{nopath:!0})})(s)+"/";await Yi.hasOrigin(i)?r.push(i):n[i]||(e[i]=Date.now())})));const s=Object.keys(e) ;return s.length&&await Hi.set(e),r.length&&await Hi.delete(r),s})).then((e=>e.length?(v.info("pcx: need to ask for some permissions",e),Yi.askOrigin(e,Qr.getMessage("Cross_Origin_Request_Permission"),Qr.getMessage("Click_here_to_allow_TM_to_access_the_following_hosts_0hostlist0",e.join("\n"))).then((()=>(ko=void 0,t)))):t)).always((()=>{ko=void 0}));return n}})).always((t=>{t&&t.forEach((t=>t.deferred.resolve(e))),Object.keys(xo).length&&Co()}))})()}),t||100)),!e)return y.Pledge() ;if(xo[e])return xo[e].deferred.promise();const n=y(),r={url:e,deferred:n};return xo[e]=r,n.promise()},Mo=(e,t,n,r)=>{let s,i;const o=t||{};return Co(e.url).then((()=>{if(i){const e=ho("aborted");return o.onabort&&o.onabort(e),void(o.ondone&&o.ondone(e))}(n=n||{}).internal=r,s=vo(e,o,n)})),{abort:function(){if(s)return s.abort();i=!0}}},Io={init:()=>{},internal:(e,t,n)=>Mo(e,t,n,!0),external:(e,t,n)=>Mo(e,t,n,!1)},Uo=Io;var Go={},Zo=Go.util=Go.util||{};Zo.isArrayBuffer=function(e){ return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},Zo.isArrayBufferView=function(e){return e&&Zo.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},Zo.ByteBuffer=t,Zo.ByteStringBuffer=t,Zo.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},Zo.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read}, Zo.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},Zo.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},Zo.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var n=this.data;t>0;)1&t&&(n+=e),(t>>>=1)>0&&(e+=e);return this.data=n,this._optimizeConstructedString(t),this},Zo.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this}, Zo.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(Zo.encodeUtf8(e))},Zo.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},Zo.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},Zo.ByteStringBuffer.prototype.putInt32=function(e){ return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},Zo.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},Zo.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},Zo.ByteStringBuffer.prototype.putInt32Le=function(e){ return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},Zo.ByteStringBuffer.prototype.putInt=function(e,t){var n="";do{t-=8,n+=String.fromCharCode(e>>t&255)}while(t>0);return this.putBytes(n)},Zo.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t},Zo.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<=n&&(t-=n<<1),t}, Zo.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},Zo.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},Zo.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)}, Zo.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},Zo.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},Zo.ByteStringBuffer.prototype.copy=function(){var e=Zo.createBuffer(this.data);return e.read=this.read,e},Zo.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this}, Zo.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},Zo.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},Zo.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(n+=e),(t>>>=1)>0&&(e+=e);return n},Zo.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},Zo.decodeUtf8=function(e){return decodeURIComponent(escape(e))};var To=Go.sha256=Go.sha256||{};Go.md=Go.md||{},Go.md.algorithms=Go.md.algorithms||{},Go.md.sha256=Go.md.algorithms.sha256=To,To.create=function(){ Oo||(Bo=String.fromCharCode(128),Bo+=Go.util.fillString(String.fromCharCode(0),64), jo=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298], Oo=!0);var e=null,t=Go.util.createBuffer(),r=new Array(64),s={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,messageLength64:[0,0],start:function(){return s.messageLength=0,s.messageLength64=[0,0],t=Go.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},s}};return s.start(),s.update=function(i,o){return"utf8"===o&&(i=Go.util.encodeUtf8(i)),s.messageLength+=i.length, s.messageLength64[0]+=i.length/4294967296>>>0,s.messageLength64[1]+=i.length>>>0,t.putBytes(i),n(e,r,t),(t.read>2048||0===t.length())&&t.compact(),s},s.digest=function(){var i=Go.util.createBuffer();i.putBytes(t.bytes()),i.putBytes(Bo.substr(0,64-(s.messageLength64[1]+8&63))),i.putInt32(s.messageLength64[0]<<3|s.messageLength64[0]>>>28),i.putInt32(s.messageLength64[1]<<3);var o={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};n(o,r,i);var a=Go.util.createBuffer() ;return a.putInt32(o.h0),a.putInt32(o.h1),a.putInt32(o.h2),a.putInt32(o.h3),a.putInt32(o.h4),a.putInt32(o.h5),a.putInt32(o.h6),a.putInt32(o.h7),a},s};var Bo=null,Oo=!1,jo=null;Zo.hasWideChar=function(e){for(var t=0;t>>8)return!0;return!1};const Do=function(e,t){var n=Go.md.sha256.create();return n.update(e,"UTF-8"==t||void 0===t&&Zo.hasWideChar(e)?"utf8":void 0),n.digest().toHex() },Fo=e=>!!O.inIncognitoContext||(e?e.incognito||!j.isDefaultStoreId(e.cookieStoreId):void 0),Lo=({frameType:e,frameId:t})=>void 0!==e?"outermost_frame"===e:void 0===t||0===t,Po=(e,t)=>{const{frameId:n,documentId:r,frameType:s}=e,{topframe:i}=t||{},o=void 0!==n?n:i?0:void 0;if(r||void 0!==o)return{frameId:o,frameType:s||(i?"outermost_frame":void 0),documentId:r,get id(){return r||`${o}`}}},No=async e=>{const t=async(e,n)=>{const r=e,s=typeof r;if("object"==s){if(null===r)return Do(`${s}:${r}`);{ const s=[];if(n){if(n.includes(r))throw"Found circular structure";n.push(r)}else n=[r];if(Array.isArray(r))for(const e of r)s.push(await t(e,n));else{const i=Object.keys(e).sort();for(const e of i)s.push(await t(r[e],n))}return n.pop(),Do(s.join(""))}}if("function"===s)throw"Functions are not supported";return Do(`${s}:${r}`)};return await t(e)},Vo=(e,t)=>{ if(!e||-1!=e.search(/#bypass=true/)||-1!=e.search(ft.getInternalPageRegexp())||!["https:","http:","file:","ftp:"].some((t=>e.startsWith(t))))return!1;const n=t?e:e.split(/[?#$]/)[0],r=-1!=n.search(/[^/]{1}\.user\.(js#|js\?|js$)/)||-1!=n.search(/[^/]{1}\.tamper\.(js#|js\?|js$)/);return r?!(-1!=n.search(/^htt[ps]{1,2}:\/\/code\.google\.com/)||-1!=n.search(/^htt[ps]{1,2}:\/\/(github|gitlab)\.com/)&&!ms(n)||-1!=n.search(/^htt[ps]{1,2}:\/\/bitbucket\.org/)&&!ms(n)):r},zo=(e,t)=>{const n=y(),r=zn(e) ;if(r&&["file:"].concat(T.INTERNAL_PAGE_PROTOCOLS).includes(r.protocol))St(e,(e=>{n.resolve(e)}),(e=>{n.reject(e)}));else{const r={method:"GET",retries:Z.RETRIES,timeout:6e4,revalidate:!0,headers:null==t?void 0:t.headers,responseType:"arraybuffer",url:e};Uo.internal(r,{onload:t=>{4!=t.readyState||200!=t.status&&0!=t.status||t.error?(v.verbose("getScriptFromUrl: "+e+" req.status = "+t.status),n.reject(t.responseText||"request error")):n.resolve(t.response)}, onerror:e=>n.reject(e.responseText||"request error"),ontimeout:()=>n.reject("timeout")})}return n.promise()},qo=e=>{const t=y();return zo(e,{headers:{Accept:"text/x-userscript, */*"}}).then((e=>{Ke(e,{encoding:"UTF-8"}).then((e=>{t.resolve(e)}),(e=>{t.reject(e.message||"charset issue")}))}),(e=>{t.reject(e)})),t.promise()},Ho=()=>{const e=y();return mt.getSelected(null,(t=>{t?e.resolve(t):e.reject()})),e.promise()},Qo=(e,t)=>{let n,r;try{t||"/"!=e.substr(0,1)?t?(r=In(e),n=new RegExp(r)):(r=(e=>{ let t;if("*"==e)t="^(https?|file)://.*";else{t=e;const n=En(t);if(n){let{protocol:e,host:r,path:s}=n;e=e?Ie(e).replace(/\*/gi,"[^:]*"):"",r=r?Ie(s?r.replace(/\.\*$/,bn):r).replace(/\*+/g,((e,t)=>1==e.length&&(s||!t&&r.length>1&&(r.match(/\*/g)||[]).length>1&&r.replace(/\*\./g,"").length>0)?"[^/]*":".*")):r||"",s=s?Ie(s).replace(/\*/gi,".*"):"",t="^"+[e,r,s].join("")+"$"}else t="^"+Ie(t)+"$",t=t.replace(/\*/gi,".*"),t=t.replace(/(\^|:\/\/)\.\*/,"$1([^?#])*");t=t.replace(Ie(bn+"/"),kn+"/")} return t})(e),n=new RegExp(r,"i")):(r=("^"==e.substr(1,1)?"":".*")+e.replace(/^\//g,"").replace(/\/$/g,"")+("$"==e.substr(-2,1)?"":".*"),r=r.replace(/(\.\*){1,}/g,".*"),n=new RegExp(r,"i"))}catch(t){return void v.warn("scriptman: invalid regexp ",e)}return n},Wo=(e,t)=>""===e.replace(t,""),Xo=(e,t)=>{let n=[],r=[];const s=(e,t)=>e&&e.length?e.map((e=>Qo(e,t))).filter((e=>void 0!==e)):[],{inc:i,match:o,exc:a}=e;return n=s(i).concat(s(o,!0)),r=s(a),{rinc:n.length||t?n:void 0, rexc:r.length||t?r:void 0}},Yo=e=>({source:e.source,flags:e.flags}),Jo=(e,t,n)=>{let r=!1;if(t.rinc){if(t.rinc.every((t=>!Wo(e,t)||(v.debug('scriptman: @include "'+t+'" matched'+(n?" ("+n+")":'"')),r=!0,!1))),!r)return r}else r=!0;return t.rexc&&t.rexc.every((t=>!Wo(e,t)||(v.debug('scriptman: @exclude "'+t+'" matched'+(n?" ("+n+")":'"')),r=!1,!1))),r},Ko=z({timeout:5,check_interval:10,retimeout_on_get:!0}),$o=z({timeout:300,check_interval:120,retimeout_on_get:!0}),ea={ePASTEBIN:1,eCHROMESYNC:2, eSYNCFS:3,eGDRIVE:4,eDROPBOX:5,eWEBDAV:6,eYANDEX:7,eONEDRIVE:8,eUNKNOWN:9},ta={ts:0,data:{}},na={init:()=>{const e=(e,t)=>{const n=e.substr(I.PREFIX.STORE.length),r=t||void 0;if(r)for(const[e,t]of Object.entries(r.data)){const s={},i={uuid:n,storage:s,ts:r.ts};void 0===t?i.removed=e:s[e]=t,wi.emit("scriptStorage",i)}};nn.on("add",e,{key:new RegExp("^"+Ue(I.PREFIX.STORE))}),nn.on("change",e,{key:new RegExp("^"+Ue(I.PREFIX.STORE))})},getUidList:()=>{const e=[];return nn.listValues().forEach((t=>{ t.startsWith(I.PREFIX.SCRIPT_UID)&&e.push(t.substr(I.PREFIX.SCRIPT_UID.length))})),e},getUidsByName:(e,t)=>{const n=[];return na.getUidList().forEach((r=>{const s=na.getMetaByUid(r);!s||s.name!=e||t&&t!=s.namespace||n.push(r)})),n},getUidByName:e=>na.getUidsByName(e)[0],getStorageByUid:e=>{const t=nn.getValue(I.PREFIX.STORE+e,{ts:0,data:{}});let{ts:n,data:r}=t||ta;return void 0===n&&(n=0),void 0===r&&(r={}),{ts:n,data:r}}, setStorageByUid:(e,t)=>t?y.from(nn.setValue(I.PREFIX.STORE+e,t)):y.from(nn.deleteValue(I.PREFIX.STORE+e)),setStorageByUidAndNotify:(e,t,n,r,s,i)=>{v.verbose("sb: ("+e+"): set key "+r+' to "'+s+'"');const o=ra.getStorageByUid(e);i?delete o.data[r]:o.data[r]=s,o.ts=t=t||Date.now();const a=ra.setStorageByUid(e,o),c={storage:{[r]:s},ts:t,removed:i?r:void 0,uuid:e,id:n};return wi.emit("scriptStorage",c),a},getMetaByUid:e=>nn.getValue(I.PREFIX.META+e,null),getByUid:(e,t)=>{ if(!e)return v.error("sb: no UUID set"),{};let n,r=nn.getValue(I.PREFIX.META+e,null);if(r){const{requires:s,resources:i}=r;let{sync:o}=r;r.requires=(s||[]).map((e=>{const{unsafe_url:t,abs_url:n}=e;return{unsafe_url:t,abs_url:n}})),r.resources=(i||[]).map((e=>{const{name:t,unsafe_url:n,abs_url:r}=e;return{name:t,unsafe_url:n,abs_url:r}})),r.uuid=e;const a=r.grant||[];r.grant=a.includes("none")?["none"]:a,r.options.override.use_connects||(r.connects=r.connects||[], r.options.override.merge_connects=!0,r.options.override.use_connects=[]),void 0===r.options.check_for_updates&&(r.options.check_for_updates=!0),void 0===r.options.user_modified&&(r.options.user_modified=null),void 0===r.options.run_in&&(r.options.run_in=null),void 0===r.options.override.orig_run_in&&(r.options.override.orig_run_in=[]),void 0===r.options.tags&&(r.options.tags=[]),void 0===r.options.compat_powerful_this&&(r.options.compat_powerful_this=null),t&&(r=Be(r,{})),o&&!o.imported&&(o={ imported:9});const c=r.textContent,l=nn.getValue(I.PREFIX.SCRIPT+e,c);l&&(n={...r,sync:o,textContent:l})}return{script:n,cond:nn.getValue(I.PREFIX.COND+e,null)}},setByUid:(e,t)=>{if(!e)throw v.error("sb: no UUID set",t),new Error("No UUID set!");if("string"!=typeof t.textContent)throw new Error("No script code set!");const{name:n,includes:r,matches:s,excludes:i}=t,{textContent:o,...a}=t,c={...a,uuid:e},l={};l[I.PREFIX.META+e]=c,l[I.PREFIX.SCRIPT_UID+e]=n,l[I.PREFIX.COND+e]={inc:r,match:s,exc:i}, l[I.PREFIX.SCRIPT+e]=o;const u=nn.setValues(l);return Ko.removeAll(),$o.remove(e),y.from(u)},restoreByUid:e=>{const t=na.getByUid(e);if(!t.script||!t.cond)return y.Breach("invalid script");const{script:n}=t;return delete n.deleted,na.setByUid(e,n)},softRemoveByUid:e=>{const t=na.getByUid(e);if(!t.script||!t.cond)return y.Breach("invalid script");const{script:n}=t;n.deleted=Date.now();const r=na.setByUid(e,n);return Ko.removeAll(),$o.remove(e),r},removeByUid:e=>{const t=na.getByUid(e) ;if(!t)return y.Breach("not found");const n=y.when([nn.deleteValue(I.PREFIX.SCRIPT_UID+e),nn.deleteValue(I.PREFIX.COND+e),nn.deleteValue(I.PREFIX.SCRIPT+e),nn.deleteValue(I.PREFIX.META+e),nn.deleteValue(I.PREFIX.STORE+e)]).then((()=>{})),{script:r}=t;return wn.values&&r&&Ir(r.name,"r"),n}},ra=na,sa=ra,ia=(()=>{let e=!1,t={};const n={setValue:(e,n,r)=>{const s=y(),i=e,o=r?{origin:"normal",value:n}:n;t[i]=o;{let e=se((()=>{v.error(`migrate: storing key ${i} timed out after 30s!`),s.reject()}),3e4) ;const t={};t[i]=o;try{xt.local.set(t,(()=>{e&&J(e),e=void 0,s.resolve()}))}catch{s.reject()}}return s.promise()},getValue:(e,n)=>{let r=t[e];return n&&r&&"object"==typeof r&&"value"in r&&(r=r.value),r},deleteValue:e=>{const n=y(),r=e;delete t[r];{let e=se((()=>{v.error(`migrate: deleting key ${r} timed out after 30s!`),n.reject()}),3e4);try{xt.local.remove(r,(()=>{e&&J(e),e=void 0,n.resolve()}))}catch(e){n.reject()}}return n.promise()},listValues:()=>{const e=[] ;return Object.getOwnPropertyNames(t).forEach((t=>{e.push(t)})),e},init:()=>{const n=y();if(e)n.resolve();else{e=!0;const r=e=>{t={},e&&Object.keys(e).forEach((n=>{t[n]=e[n]})),n.resolve()};xt.local.get(null,r)}return n.promise()},clean:()=>{const n=y();return e=!1,t={},n.resolve(),n.promise()}};return n})(),oa="#schema",aa="#config",ca="#version",la="#update",ua="TM_version",da="@uid#",Aa="@re#",pa="@st#",ha="@source#",fa="@meta#",ma=new rt(1);let ga=0;const va=(()=>{ const e=[],t=n=>new Promise(((r,s)=>{ht.sendMessage({target:"offscreen",method:"offscreen",request:n},(async n=>{let i=1e3;if(ft.lastError)s(ft.lastError),i=0;else if(n){const{result:t,poll:s}=n;i=s||0,t&&e.forEach((e=>{e(t)})),r(n)}else s(new Error("no response"));if(i){await F(i);const e=Math.random().toString(36).substring(2);await t({action:"port",details:{id:e}})}}))}));return{send:e=>{const n=Math.random().toString(36).substring(2);return t({action:"port",details:{id:n,message:e}})}, onMessage:{addListener:t=>{e.push(t)}}}})(),wa=(e=>{const t={};let n;const r=n=>{let r=[],i=[];const o=()=>{r=[],i=[],a=null,delete t[n]};let a={postMessage:t=>{(t=>{if(!a)throw"port is disconnected";e.send({response_id:n,value:t})})(t)},onMessage:{addListener:e=>{r.push(e)}},onDisconnect:{addListener:e=>{i.push(e)}},disconnect:()=>{o(),s(n)}};return t[n]={message:e=>{r&&r.forEach((t=>t(e)))},disconnect:()=>{i.length&&i.forEach((e=>e())),o()}},a},s=t=>{e.send({response_id:t,disconnect:!0})} ;return e.onMessage.addListener((e=>{let s;if(e.connect){if(!e.destination||!e.response_id)throw"invalid message";n&&n(e.destination,r(e.response_id))}else{if(!e.response_id)throw"invalid message";if(!(s=t[e.response_id]))return void console.warn("ports: unknown id",e.response_id,e);if(e.disconnect)s.disconnect();else{const t=e.value;t&&s.message(t)}}})),{connect:function(t){const n=Math.random().toString(36).slice(2);return((t,n)=>{e.send({response_id:n,connect:!0,destination:t})})(t,n),r(n)}, onConnect:{addListener:e=>{n=e}}}})(va),ba=async e=>{if(!D.supported)throw new Error("Offscreen documents not supported");const t=D;await ma.acquire();try{if(1==++ga){try{const n=await ft.getContexts({contextTypes:["OFFSCREEN_DOCUMENT"]});n&&n.length||await t.createDocument(e)}catch(e){console.warn("Failed to create offscreen document -> assume getContexts is not supported and we were restarted")}await new Promise(((e,t)=>{ht.sendMessage({target:"offscreen",method:"offscreen",request:{ action:"config",version:ht.manifest.version,config:wn.snapshot}},(()=>{ft.lastError?t(ft.lastError):e()}))}))}}finally{ma.release()}const n=async e=>{await F(e||15e3),await ma.acquire();try{0==--ga&&await t.closeDocument()}finally{ma.release()}};return{send:e=>new Promise(((t,n)=>{ht.sendMessage({target:"offscreen",method:"offscreen",request:e},(e=>{ft.lastError?n(ft.lastError):e?e.error?n(new Error(e.error)):t(e.result):n(new Error("no response"))}))})),sendBinary:async e=>{ if(!Se)throw new Error("Offscreen documents not supported");const t=ht.getURL("offscreen.html"),n=(await Se.matchAll({includeUncontrolled:!0})).find((e=>e.url===t));if(!n)throw new Error("No running offscreen document found");const r=new MessageChannel;n.postMessage(e,[r.port2]);const s=await new Promise((e=>r.port1.onmessage=e));if(!s||!s.data)throw new Error("Offscreen document sent no response");return s.data.result},connect:(e,t)=>{const r=wa.connect(e) ;return r.onDisconnect.addListener((()=>{n(t)})),r},release:n}},_a=e=>(delete e.firstPartyDomain,e),ya=async(e,t)=>{const{sender_domain:n,cookie_store_id:r,cookie_partition:s,anonymous:i,cookie:o}=t,a=[];if(!i){const t={url:e};n&&(t.firstPartyDomain=null),void 0!==r&&(t.storeId=r);let i=await ka.getAll(t);a.push(...i),void 0!==s&&(t.partitionKey=s,i=await ka.getAll(t),a.push(...i))}return a.map((e=>{ const t=e.name.replace(/[^\x21\x23-\x27\x2A-\x2B\x2D-\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/g,ee);let n=!1,r=e.value;return r.startsWith('"')&&r.endsWith('"')&&(r=r.slice(1,-1),n=!0),r=r.replace(/[^\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/g,ee),t+"="+(n?'"'+r+'"':r)})).concat(o?[o]:[]).join("; ")},ka={getAll:e=>{const t=y();return Ct.getAll(_a(e),(e=>t.resolve(e))),t.promise()},remove:e=>{const t=y();try{Ct.remove(_a(e),(e=>{if(e)t.resolve();else{const e=ft.lastError ;t.reject(e?e.message:"unknown error")}}))}catch(e){t.reject(e?e.message:"unknown error")}return t.promise()},set:e=>{const t=y();try{Ct.set(_a(e),(e=>{if(e)t.resolve(e);else{const e=ft.lastError;t.reject(e?e.message:"unknown error")}}))}catch(e){t.reject(e?e.message:"unknown error")}return t.promise()},get fpi(){}},Ra=ka,xa={DEFAULT:"default",OFF:"off",NATIVE:"native",CHROME:"chrome",NOT_ENABLED:"not_enabled",NOT_WHITELISTED:"not_whitelisted",NOT_PERMITTED:"not_permitted", NOT_SUPPORTED:"not_supported",NOT_SUCCEEDED:"not_succeeded"},Ea=new Ve;let Sa,Ca=xa.OFF,Ma=[],Ia=!1;const Ua={},Ga={},Za=Ns("downloads"),Ta=new rt(1),Ba=(V({threads:3}),V({threads:6})),Oa=async()=>{if(!Et.supported)return!1;const e=await qi(Yi.permDownloads,Qr.getMessage("Browser_API_Downloads"),Qr.getMessage("Click_here_to_allow_TM_to_start_downloads"),(e=>v.log("downs: permission to use downloads ->",e)));return Sa=e,e},ja=()=>ba({justification:"download a blob",reasons:[to.BLOBS] }),Da=async e=>new h((t=>{Et.supported?Et.search({id:e},(n=>{const r=n&&n[0];r?t(r):(v.warn("downs: unable to query download ID",e),t(void 0))})):t(void 0)})),Fa=(e,t)=>{Et.supported&&Et.cancel(e,(()=>{Da(e).then((e=>{e&&Pa(e)})),t&&t()}))},La=(e,t)=>{const n=y();if(!Et.supported)return n.reject("not supported"),Ea.emit("error",{id:t.download_id,error:"not_supported"}),n.promise();let r;Na();let{name:s,url:i,method:o,saveAs:a,data:c,headers:l,conflictAction:u,cookieStoreId:d,anonymous:A}=e ;const{download_id:p}=t;u&&!{uniquify:!0,prompt:!0,overwrite:!0}[u]&&(u="uniquify"),r={filename:s,url:i,method:o,saveAs:a,...u?{conflictAction:u}:{},...void 0!==c?{body:c}:{}},l&&(Array.isArray(l)?v.warn("downs: invalid type of headers property",l):r.headers=Object.entries(l).map((([e,t])=>({name:e,value:t}))));const h=Ga[p],f=Ga[p]={...h,type:"chrome",download_id:p,url:i,name:s};if(Et.download(r,((e,t)=>{if(void 0===e)return n.reject(t),void Ea.emit("error",{id:p,error:t||"unknown"}) ;f.browser_download_id=e;const r=Ua[p]={deferred:n};!0===f.cancel?Fa(e):(r.cancel=t=>Fa(e,t),r.interval=re((async()=>{const t=await Da(e);t&&Pa(t)}),1e3))})),ft.lastError){const e=ft.lastError.message;n.reject(e),Ea.emit("error",{id:p,error:e})}return n.promise()},Pa=async e=>{const{item:t,key:n}=(e=>{let t,n;return Object.keys(Ga).every((r=>{const s=Ga[r];return!s||s.browser_download_id!=e||(n=r,t=s,!1)})),{item:t,key:n}})(e.id);if(t&&n){ const{name:r,url:s,download_id:i}=t,{interval:o,deferred:a}=Ua[i]||{},c=()=>{o&&Y(o),delete Ga[n],delete Ua[n],a&&a.resolve()},{id:l,error:u,totalBytes:d,bytesReceived:A,state:p,endTime:h,estimatedEndTime:f}=e;if(u||"interrupted"==p)v.warn(`downs: download of ${r} (${s}) failed`,u),Ea.emit("error",{id:i,error:xa.NOT_SUCCEEDED,details:u}),c();else{const e=h||"complete"==p;let n=!1;if((void 0!==d&&t.total!==d||void 0!==A&&t.loaded!==A)&&(t.total=null!=d?d:t.total,t.loaded=null!=A?A:t.loaded,n=!0), e&&(c(),-1===t.total||-1===t.loaded)){const e=await Da(l);e&&void 0!==e.totalBytes&&void 0!==e.bytesReceived&&(t.total=e.totalBytes,t.loaded=e.bytesReceived,n=!0)}if(n&&Ea.emit("progress",{id:i,info:{loaded:Math.max(t.loaded,0),total:t.total,estimatedEndTime:h||f}}),e){v.log(`downs: download of ${r} (${s}) finished`);const{total:e,loaded:n}=t;Ea.emit("load",{id:i,info:{total:e,loaded:n,mode:"browser"}})}}}},Na=()=>{if(Sa&&!Ia&&Et.supported){const e=["state","totalBytes","fileSize"] ;Et.onChanged.addDynamicListener((t=>{let n=!1;const r={id:t.id};for(const s of e){const e=t[s],i=e&&"string"!=typeof e&&"current"in e?e.current:void 0;i&&(r[s]=i,n=!0)}n&&Pa(r)})),Ia=!0}},Va=e=>{Ca=e,Ca==xa.CHROME&&Oa()},za=e=>{Ma=De(e)},qa=e=>{for(const t of Ma)if(t&&t.length)try{let n;if("/"===t[0]){let e=t.replace(/^\//g,"").replace(/\/$/g,"");"$"!==e[e.length-1]&&(v.log(`downs: patching $ into ${e}`),e+="$"),n=new RegExp(e,"i")}else if("."===t[0]){const e=[Ue(t),"$"].join("") ;n=new RegExp(e,"i")}else v.warn(`downs: invalid file extension: "${t}" starts neither with "." nor with "/"`);if(n&&-1!==e.search(n))return v.log(`downs: ${t} matched @${e}`),!0}catch(e){v.warn(`downs: can't process ${t}`,e)}return!1},Ha={init:()=>{const e=()=>{Va(wn.values.downloads_mode),za(wn.values.downloads_extension_whitelist)};e(),wn.addChangeListener(["downloads_extension_whitelist","downloads_mode"],e),Ta.acquire().then((async()=>{ for(const{key:e,value:t}of await Za.list())"chrome"==t.type&&(Ga[e]=t,Ua[e]={cancel:t=>Fa(e,t),interval:re((async()=>{const t=await Da(e);t&&Pa(t)}),1e3)})})).always((()=>Ta.release()))},start:(e,t)=>{const n=t||{},r=Pe();let s,{from:{tfd:i,url:o},mode:a,...c}=e,{name:l}=c;if(v.log("downs: start",e),!n.internal){if(Ca==xa.OFF)return v.warn("downs: feature is not enabled"),F(1).then((()=>Ea.emit("error",{id:r,error:xa.NOT_ENABLED}))),r ;if(l&&!qa(l))return v.warn("downs:",`"${l}" is not whitelisted`),F(1).then((()=>Ea.emit("error",{id:r,error:xa.NOT_WHITELISTED}))),r;if(!Et.supported&&Ca==xa.CHROME)return v.warn("downs: this download mode is not supported"),F(1).then((()=>Ea.emit("error",{id:r,error:xa.NOT_SUPPORTED}))),r}const u=()=>{const e=Ga[r];if(e&&e.cancel)return Ea.emit("error",{id:r,error:"aborted"}),y.Breach("aborted")},d=l;let A;d&&(l=Le(d,!0),d!=l&&v.warn(`downs: changed file name from ${d} to ${l} for safety`)) ;const p=void 0!==a?"browser"===a:void 0;let h="native";const f=Ga[r]={type:"unknown",download_id:r,url:o,name:d,loaded:-1,total:-1};return(async()=>{if(i){if(s=Us.fromTransferableData(i),!s)return v.warn("downs: invalid transferable"),Ea.emit("error",{id:r,error:xa.NOT_SUPPORTED}),y.Breach("not_supported");if(o=s.tryObjectUrl||s.tryDataUri||o,o||(o=await s.toObjectUrl()),!o)return v.warn("downs: can't get URL from transferable"),Ea.emit("error",{id:r,error:xa.NOT_SUPPORTED}), y.Breach("not_supported");f.url=o}})().then((()=>Ta.acquire())).then((()=>Za.set(r,f).always((()=>Ta.release())))).then((()=>{if(Et.supported&&(void 0===p||p)&&(n.internal||Ca==xa.CHROME||Ca==xa.DEFAULT))return Oa().then((e=>A=e)).then(u);A=!1})).then((()=>{if(p&&!A)return h="browser",Ea.emit("error",{id:r,error:xa.NOT_SUPPORTED}),y.Breach("not_supported");if(s&&s.tryBlob)return{blob:s.tryBlob};if(o){const e=zn(o);if(e&&"data:"==e.protocol)return{blob:et(o)} ;if(!A||!n.internal&&Ca==xa.DEFAULT)return((e,t)=>{const{internal:n,download_id:r}=t;return Ba.add((()=>y((async({resolve:t,reject:s})=>{const{anonymous:i}=e,o=()=>{s(),Ea.emit("error",{id:r,error:"aborted"})},a=Ga[r];if(a&&a.cancel)o();else{const c={...a,type:"xhr",name:e.name,url:e.url,download_id:r},l=n=>{if(4!=n.readyState||200!=n.status&&0!=n.status||n.error){const e=n.error||n.statusText||"xhr_failed";s(e),Ea.emit("error",{id:r,error:e})}else{let i ;const o=go(n.responseHeaders),a=o["content-type"];if(!e.name){const e=o["content-disposition"];if(e){const t=e.match(/filename="(.+)"/);if(t){let e=t[1];try{e=$(e)}catch(e){v.warn("downs:",e)}const n=Le(e,!0);if(n){if(!qa(n)){const e=`"${n}" is not whitelisted`;return v.warn("downs:",e),s(e),void Ea.emit("error",{id:r,error:xa.NOT_WHITELISTED})}i=n}}}}const l=new Blob([n.response],{type:e.overrideMimeType||a||"binary/octet-stream"});-1!==c.total&&-1!==c.loaded||(c.total=c.loaded=l.size, Ea.emit("progress",{id:r,info:{loaded:c.loaded,total:c.total}})),t({name:i,blob:l})}},u=e.cookieStoreId;if(!i){let t;const n=await ya(e.url,{sender_domain:t,cookie_store_id:u});n&&(e.headers=e.headers||{},e.headers.cookie=n)}e.responseType="blob",e.method=e.method||"GET";const d=(n?Uo.internal:Uo.external)(e,{onload:l,onerror:e=>{s(),Ea.emit("error",{id:r,error:e.error||"failed",details:e.statusText})},onabort:o,ontimeout:()=>{s(),Ea.emit("error",{id:r,error:"timeout"})},onprogress:e=>{ e.lengthComputable&&(c.total=e.total,c.loaded=e.loaded,Ea.emit("progress",{id:r,info:{loaded:e.loaded,total:e.total}}))}});Ga[r]=c,Ua[r]={cancel:d?d.abort:()=>{}}}})).promise()))})({url:o,...c},{internal:n.internal,download_id:r})}})).then((e=>{const{name:t,blob:i}=e||{};if(i&&A){let e;return h="browser",y.Pledge().then((()=>s&&s.tryObjectUrl?s.tryObjectUrl:ja().then((async t=>{const n=await t.sendBinary({action:"objectURL",blob:i});return n.error||!n.url?(Ea.emit("error",{id:r, error:n.error||"unknown error"}),t.release(),y.Breach()):(e=async()=>{await t.send({action:"objectURL",url:o}),t.release()},n.url)})))).then((n=>{const{conflictAction:s,saveAs:i}=c;return La({url:n,conflictAction:s,saveAs:i,name:t||l},{download_id:r}).always((()=>{e&&e()}))}))}return i?no(i,ba).then((e=>ja().then((async n=>{try{const s=await n.send({action:"download",id:r,details:{name:t||l||"File.download",tfd:await e.toTransferableData()}});s.error?Ea.emit("error",{id:r,error:s.error }):(f.total=f.loaded=i.size,Ea.emit("load",{id:r,info:{loaded:f.loaded,total:f.total,mode:s.mode}}))}finally{n.release(),se((()=>{e.dispose()}),1e3)}})))):o&&A?(h="browser",La({url:o,...c,name:t||l},{download_id:r})):void(o&&!n.internal&&Ca==xa.CHROME?(v.warn("downs: download permission is missing"),Ea.emit("error",{id:r,error:xa.NOT_PERMITTED})):(v.warn("downs: download failed"),Ea.emit("error",{id:r,error:"failed"})))})).always((()=>{Ta.acquire().then((()=>(delete Ga[r],delete Ua[r], Za.delete(r)))).always((()=>{Ta.release(),Ea.emit("done",{id:r,info:{loaded:f.loaded,total:f.total,mode:h}})}))})),r},cancel:e=>{const t=Ga[e],n=Ua[e];return!!t&&(n&&n.cancel?n.cancel():t.cancel=!0,!0)},set_mode:Va,set_whitelist:za,is_whitelisted:qa,remove_permission:()=>Yi.remove(Yi.permDownloads),staticVars:xa},Qa=Ha,Wa={run:(e,t)=>{let n=1;const r=()=>{0==--n&&(t&&t(),C.runtime.reload?C.runtime.reload():location.reload())};if("config"==e){const e=nn.listValues();for(const t of e){ if(-1!=t.indexOf(I.PREFIX.SCRIPT)||-1!=t.indexOf(I.PREFIX.COND)||-1!=t.indexOf(I.PREFIX.STORE)||-1!=t.indexOf(I.PREFIX.META))return;n++,nn.deleteValue(t).always(r)}}else"factory"==e&&(n++,Qa.remove_permission().done(r),n++,nn.factoryReset().always(r),n++,(async()=>{const e=new Lt(`${on}.`);await e.clear()})().always(r));r()},reset:e=>{Wa.run(void 0,e)},factoryReset:e=>{Wa.run("factory",e)}},Xa=Wa,Ya=["md5","sha256","sha1","sha384","sha512"],Ja=(()=>{const e=e=>{const t=[],n=new DataView(e) ;for(let e=0;e{try{return e(Je(Xe(t)))}catch(e){return null}},n={md5:(e,t)=>y.Pledge($e(e,t)),sha256:(e,t)=>y.Pledge(Do(e,t))},r={};["SHA-1","SHA-384","SHA-512"].forEach((t=>{const n=t.toLowerCase().replace("-","");r[n]=()=>{const n=(n,r)=>{const s=y();return K.subtle.digest(t,Je(n,{encoding:r})).then((t=>{s.resolve(e(t))}),(()=>{s.reject()})),s.promise()};try{ return n("").then((e=>e&&e.substr(0,4).toLowerCase().match(/[0-9a-f]{4,4}/)?n:y.Breach()))}catch(e){return y.Breach()}}}));const s=e=>Object.keys(n).includes(e),i=e=>(...t)=>{if(!1!==o){const n=y();return o.push((()=>n.consume(e(...t)))),n.promise()}return e(...t)};let o=[];const a={init:()=>(v.get()>=60&&Object.keys(n).forEach((e=>v.log("sri:",e,"is supported"))),y.sidebyside(Object.keys(r).map((e=>r[e]().done((t=>{v.log("sri:",e,"is supported"),n[e]=t})).fail((()=>{ v.log("sri:",e,"is unsupported")}))))).always((()=>{if(!1===o)return;const e=o;o=!1,e.forEach((e=>e()))}))),isSupported:i((e=>y.Pledge(s(e)))),getHash:i(((e,n)=>{const r=y(),i="string"==typeof e?zn(e):e;if(i&&i.hash){let e;const o=i.hash.replace(/^#/,"").split(/,|;/g);for(let n=0;nt&&e&&s(e.type)?n[e.type](t,r).then((t=>t===e.value?y.Pledge(!0):y.Breach({type:e.type,value:t}))):y.Breach()))};return a})(),Ka=Ja;let $a;const ec=()=>{if(!$a)throw new Error("Offscreen document not available");return $a({justification:"XML parsing",reasons:[to.DOM_PARSER]})},tc=async e=>{{const t=await ec();try{return await t.send({action:"xmlToWebdavResults",doc:e})}finally{t.release()}} },nc=async e=>{{const t=await ec();try{return await t.send({action:"xmlToCursor",doc:e})}finally{t.release()}}};let rc;const sc=V({threads:1}),ic=(e,t)=>{const n=(e?e.split("/"):[]).concat(t?[t]:[]).join("/");return n?("/"==n.substr(0,1)?"":"/")+n:""};let oc=()=>({get:()=>y.Breach(),set:()=>y.Breach(),delete:()=>y.Breach(),clear:()=>y.Breach()});const ac=e=>{const t=(e.match(/[\dA-F]{2}/gi)||[]).map((e=>parseInt(e,16)));return new Uint8Array(t).buffer},cc=e=>{const t={type:e,request:e=>{ const t=()=>{const t=y(),n=e=>{v.log("rest service: request failed",e),t.reject(e)},r=Object.assign({},e),s="headers"===r.responseType;return s&&delete r.responseType,vo(r,{onload:e=>{if([200,201,204,207].includes(e.status)){let n;n=s?go(e.responseHeaders):e.response,t.resolve({result:n})}else n(e)},onerror:n,ontimeout:()=>n("timed out"),onprogress:e=>t.notify(e),onuploadprogress:e=>t.notify(e)},{internal:!0}),t.promise()};return e.no_queue?t():sc.add(t)},error:t=>{const n=t;let r ;if(void 0!==n.status){r=n.status.toString();try{r=r+" | "+n.responseText}catch(e){}}else r=t;Ur(e,"error","request: "+r)},wait:e=>(...t)=>e(...t).then((e=>e),(e=>(e=>y.Breach(e?e.responseText||e.statusText:void 0))(e))),changes:(()=>{let e;return{listen:()=>(e||(e=y(),t.watch&&t.watch.start()),e.promise()),notify:t=>{e.notify(t)},stop:()=>(t.watch&&t.watch.stop(),y.Pledge())}})()};return t},lc=e=>{const t=Object.assign({},e),n=t.type;if(void 0===n)throw new Error("Internal error");let r,s,i=[] ;const o=e=>{const t={client_id:u.config.client_id,redirect_uri:u.config.redirect_uri,state:s,scope:u.config.scope,refresh_token:e};return u.config.redirect_uri+"?"+Xn(t)},a=e=>{let t,n;if(e&&0===e.indexOf(u.config.redirect_uri)&&(n=zn(e))&&("string"!=typeof(r=n)&&(r=r.search?r.search.substring(1):r.hash?r.hash.substring(1):""),t=r.split("&").reduce(((e,t)=>{const n=t.split("=");return e[$(n[0])]=$(n[1]),e}),{}))&&(t.access_token||t.error)&&t.state===s)return{uid:t.uid, access_token:t.access_token,refresh_token:t.refresh_token,error:t.error};var r};let c;const l={};Object.defineProperty(l,"credentials",{get:()=>(c||(c=oc(e.type)),c),enumerable:!1});const u=Object.assign(l,e,{...t,config:{...t.config,auth_prefix:"Bearer"},request:e=>y((async({resolve:t,reject:n})=>{if(!e.no_auth){const t=(await u.credentials.get()).access_token;if(!t)return void n("Authentication failed");e.headers=e.headers||{},e.headers.Authorization=u.config.auth_prefix+" "+t}t() })).promise().then((()=>t.request(e))),oauth:(()=>{const e={run:()=>{if(r)return r;let e=y();const t=r=e.promise();s="!!"+n+"-"+Pe();const{redirect_uri:i,refresh_supported:c}=u.config,l=void 0,d=async(t,n)=>{const r=e;e=void 0,await u.credentials.set(n),null==r||r.resolve(),t&&t.close()},A=e=>y((({resolve:t})=>{vo({url:e,responseType:"json"},{ondone:e=>t(e)},{internal:!0})})).promise();return u.credentials.get().then((async e=>{const t=e.refresh_token;if(c&&t){let e,r=1e3,s=4 ;const i=[200,400,401,403,404,405,406,408,412],a=o(t);for(;!e;)e=await A(a),e&&i.includes(e.status)||!(--s>=0)||(await F(r),r=Math.min(3*r,36e5),e=void 0);if(200==e.status){const t=e.response;if(t){if(!t.error&&t.access_token){const{access_token:e,refresh_token:n,basic_auth:r,uid:s}=t;return void d(null,{access_token:e,refresh_token:n,basic_auth:r,uid:s})}Ur(n,"error","auth refresh token use: "+(t.error||"!access_token"))} }else Ur(n,"error",`auth refresh token use failed with status ${e.status}`)}})).then((()=>{if(!e)return;if(!c)return y.Pledge();const t=y(),r=rc({url:o(),filter:l});return r.promise.progress((t=>{let s;e&&(s=a(t.url))&&(s.error||!s.access_token?(Ur(n,"error","auth refresh: "+(s.error||"!access_token")),u.config.refresh_supported=!1):d(r,s))})).always(t.resolve),t.promise()})).then((()=>{if(!e)return;const t=y(),r=rc({url:u.config.request_uri+"?"+Xn({response_type:u.config.response_type, client_id:u.config.client_id,redirect_uri:u.config.redirect_uri,state:s,scope:u.config.scope}),filter:l});return r.promise.progress((t=>{let s;e&&(s=a(t.url))&&(s.error||!s.access_token?Ur(n,"error","auth: "+(s.error||"!access_token")):d(r,s))})).always(t.resolve),t.promise()})).done((()=>{r=void 0,e&&e.reject("auth_failed")})),t},revoke:()=>u.credentials.get().then((e=>{const r=e.access_token;return r?(s=s||"!!"+n+"-"+Pe(),t.request({method:"GET",retry_auth:!1,url:`${dc}/revoke?`+Xn({token:r, state:s})}).then((()=>u.oauth.reset()),(()=>u.oauth.reset()))):y.Breach()})),reset:()=>u.credentials.clear()};return e})(),wait:e=>t.wait(((...t)=>u.credentials.get().then((n=>{if(n.access_token)return e(...t);{const n=y();return i.push((()=>n.consume(e(...t)))),u.oauth.run().done((()=>{i.forEach((e=>e())),i=[]})).fail((e=>{n.reject(e)})),n.promise()}}))))});return u},uc=e=>{let t,n,r,s;const i=y();let o,a,c,l,u,d=null,A=null ;const p=Object.assign({},e),h=e=>p.wait(((...t)=>g.init().then((()=>e(...t))))),f=(e,t)=>{const n=t||{};n.set_current_list&&(o={});const r=g.request({method:"PROPFIND",url:e,headers:{"Content-Type":"text/xml; charset=UTF-8",Depth:void 0!==n.depth?n.depth:1}}).then((async e=>{const t=e.result;if(null==t)return;const r=await tc(t);if(void 0===r)return;const s=m(r);if(n.set_current_list){const e=await nc(t);e&&(a=e),s.forEach((e=>{o[e.id]=e}))}return s })).then((e=>void 0===e?y.Breach("not found"):e));return r},m=e=>e.map((e=>{const{id:s,...i}=e,o=s.replace(new RegExp("^("+[Ie(n+t)+"/?",Ie(r+t)+"/?"].join("|")+")"),"");let a;try{a=$(o)}catch(e){a=s}return{id:o,...i,name:a}})),g=Object.assign(e,{...e,config:{...e.config,watch_interval:36e5,root:void 0,path:void 0},request:e=>(e.fetch=!0,e.anonymous=!0,p.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[429,500].includes(n)?(e.backoff=2*(e.backoff||1e3), F(e.backoff).then((()=>g.request(e)))):404==n?y.Pledge(t):(g.error(t),y.Breach(t))}))),init:()=>{if(s)return s;t=ic(g.config.root,g.config.path),n=g.config.url||"","/"==n.slice(-1)&&(n=n.slice(0,-1));const e=zn(n);if(!e)return y.Breach("invalid url");r=e.pathname,"/"==r.slice(-1)&&(r=r.slice(0,-1));const o=y(),a=s=o.promise();return g.request({method:"OPTIONS",url:`${n}/`,responseType:"headers"}).done((e=>{const t=e.result;let n ;t&&(n=t["access-control-allow-methods"])&&n.includes("EDITOR")&&(u=!0)})).always((()=>{f(`${n}${t}/`,{depth:0}).done((()=>{o.resolve(),i.resolve()})).fail((()=>{const e=[];y.onebyone(t.split("/").filter((e=>e)).map((t=>{e.push(t);const r=e.join("/");return()=>g.request({method:"MKCOL",url:`${n}/${r}/`,headers:{"Content-Type":"text/xml; charset=UTF-8"}}).then((e=>e),(e=>{if(405==((null==e?void 0:e.status)||-1))return y.Pledge(e)}))}))).done((()=>{o.resolve(),i.resolve()})).fail((()=>{s=void 0, o.reject()}))}))})),a},list:h((e=>{const r=f(`${n}${t}/`,{set_current_list:!0}).then((t=>{const n={};return t.map((t=>{if(!e){if(n[t.id])return;n[t.id]=!0}return{name:t.name,id:t.id,size:t.size||0,etag:t.etag,modified:t.modifiedTime,precision:1e3,removed:t.removed}})).filter((e=>e))}));return r})),get:h((e=>{const r=e.id||e;return g.request({method:"GET",url:n+ic(t,r),headers:{"Content-Type":"text/xml; charset=UTF-8"},responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t]) }))})),put:h(((e,r,s)=>{const i=e.id||e;let o,a,c;const l={"Content-Type":"application/octet-stream"};let u=!1;return s&&s.lastModified&&(u=null===A,o=s.lastModified,c=new Date(s.lastModified).toISOString(),a=s.lastModified/1e3,(A||u)&&(l["X-OC-Mtime"]=a)),g.request({method:"PUT",url:n+ic(t,i),headers:l,data_type:"typified",data:{type:"raw",value:r},responseType:"headers"}).then((e=>{const r=e.result;if(r&&u){let e ;A=!("accepted"!=r["x-oc-mtime"]&&(!r.date||!(e=new Date(r.date).getTime())||e!=o&&e!=Math.floor(a)))}if(!A&&!d&&c){const e=()=>{v.warn("WebDAV: no way to set file modification date! This might cause redundant up and downloads."),d=!0};return g.request({method:"PROPPATCH",url:n+ic(t,i),headers:{"Content-Type":"text/xml; charset=UTF-8"}, data:['','',"","",`${c}`,"","",""].join("")}).then((async t=>{const n=t.result;if(null===n)return;const r=await(async e=>{{const t=await ec();try{return await t.send({action:"xmlToResponseCodes",doc:e})}finally{t.release()}}})(n);r&&403===r[0]&&e()}),(()=>(e(),y.Pledge())))}}))})),delete:h((e=>{const r=e.id||e;return g.request({method:"DELETE", url:n+ic(t,r),headers:{"Content-Type":"text/xml; charset=UTF-8"}})})),watch:{start:()=>{if(c)return;let e=100;const r=c=Pe();let s=null;const u=()=>{if(l=void 0,c)if(!1===s){const e=o;f(`${n}${t}/`,{set_current_list:!0}).then((()=>{e&&(Object.keys(e).forEach((t=>{const n=o[t],r=e[t];n?r.modifiedTime!=n.modifiedTime&&p.changes.notify({time:n.modifiedTime,name:n.name,id:n.id}):p.changes.notify({time:Date.now(),name:r.name,id:r.id,removed:!0})})),Object.keys(o).forEach((t=>{if(!e[t]){const e=o[t] ;p.changes.notify({time:e.modifiedTime,name:e.name,id:e.id})}})))})).fail((e=>{v.warn("WebDAV: file changes check failed",e)})).always((()=>{l=se(u,g.config.watch_interval)}))}else((e,t)=>{const n={"Content-Type":"text/xml; charset=UTF-8",Depth:1,Timeout:90};return t&&(n.Cursor=t),g.request({method:"SUBSCRIBE",url:e,headers:n,no_queue:!0}).then((async e=>{const t=e.result;if(null===t)return y.Pledge({changes:[],cursor:a});const n=await tc(t);return void 0!==n?{changes:m(n),cursor:await nc(t) }:void 0})).then((e=>void 0===e?y.Breach():e))})(`${n}${t}/`,a).then((t=>{s=!0;const n=t.changes;a=t.cursor,e=100,n.forEach((e=>{p.changes.notify({time:e.modifiedTime,name:e.name,id:e.id,removed:e.removed})}))}),(()=>{if(null!==s)return e*=2,F(e);s=!1})).always(u)},d=()=>!c||c!==r;i.promise().then((()=>{d()||h((()=>d()?y.Breach():(u(),y.Pledge())))()}))},stop:()=>{c=void 0,l&&(J(l),l=void 0)}},getRemoteUrl:e=>{if(u)return n+ic(t,e)+"?method=editor#bypass=true"},getRemoteDomains:()=>{var e ;return[((null===(e=zn(n))||void 0===e?void 0:e.origin)||"").replace(/^.*:\/\//,"")]}});return g},dc="https://accounts.tampermonkey.net/e/oauth2/v1",Ac={drive:()=>{let e;xe&&(e=parseInt(xe.getItem("gdrive_poll_interval")||""))||(e=18e5);const t=lc(cc("drive")),n=Object.assign({},t),r="appDataFolder";let s,i;const o=Object.assign(t,{...t,config:{...t.config,redirect_uri:`${dc}/auth`,refresh_supported:!0,request_uri:"https://accounts.google.com/o/oauth2/v2/auth", client_id:"408438522028-3cgn3t3jas3fak7isbnfod1q4h15g2fv.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/drive.appdata",response_type:"token",watch_interval:e},request:e=>n.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[403,429,500].includes(n)?(e.backoff=2*(e.backoff||1e3),F(e.backoff).then((()=>o.request(e)))):[400,401].includes(n)?(v.warn("Google Drive: authentication error",t),o.credentials.delete("access_token").then((()=>{ if(!e.retry_auth)return e.retry_auth=!0,o.oauth.run().fail((e=>o.error(e))).then((()=>o.request(e)))}))):404==n?y.Pledge(t):(o.error(t),y.Breach(t))})),list:n.wait((e=>{let t=[];const n=y(),s=e=>"https://www.googleapis.com/drive/v3/files?"+Xn({spaces:r,pageToken:e,orderBy:"modifiedTime desc",fields:"nextPageToken, files(id, size, name, modifiedTime, md5Checksum)",pageSize:500}),i=e=>{o.request({method:"GET",url:e,headers:{"Content-Type":"application/json"}}).then((e=>{ const r=e.result,o=r?JSON.parse(r):{files:[]};if(t=t.concat(o.files),o.nextPageToken)return i(s(o.nextPageToken));n.resolve(t)}))};return i(s()),n.promise().then((t=>{const n={};return t.map((t=>{if(!e){if(n[t.name])return;n[t.name]=!0}return{name:t.name,size:t.size||0,id:t.id,md5:t.md5Checksum,modified:new Date(t.modifiedTime).getTime()}})).filter((e=>e))}))})),get:n.wait((e=>{const t=e.id||e;return o.request({method:"GET",url:"https://www.googleapis.com/drive/v3/files/"+t+"?"+Xn({spaces:r, alt:"media"}),responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t])}))})),put:n.wait(((e,t,n)=>{const s=e,i=s.name||e,a=s.id,c=Pe();return y.Pledge().then((()=>{if(t)return nt(t)})).then((e=>{const t=n&&n.lastModified?new Date(n.lastModified).toISOString():void 0,s=[];return s.push("--"+c),s.push("Content-Type: application/json"),s.push(""),s.push(JSON.stringify({name:i,parents:a?void 0:[r],modifiedTime:t})),s.push("--"+c), e&&(s.push("Content-Type: application/octet-stream"),s.push("Content-Transfer-Encoding: base64"),s.push(""),s.push(We(e)),s.push("--"+c+"--")),s.push(""),o.request({method:a||!e?"PATCH":"POST",url:"https://www.googleapis.com/"+(e?"upload/":"")+"drive/v3/files"+(a?"/"+a:"")+"?"+Xn({uploadType:"multipart"}),headers:{"Content-Type":"multipart/related; boundary="+c},data:s.join("\r\n")})}))})),delete:n.wait((e=>{const t=e.id||e;return o.request({method:"DELETE", url:"https://www.googleapis.com/drive/v3/files/"+t+"?"+Xn({spaces:r}),headers:{"Content-Type":"application/json"}})})),revoke:()=>o.oauth.revoke(),compare:(e,t)=>{const n=y();let r;return(r=e.md5)&&r==$e(t,"utf-8")?n.resolve(!0):n.resolve(!1),n.promise()},watch:{start:()=>{if(s)return;let e;s=!0;const t=()=>{i=null,s&&o.request({method:"GET",url:"https://www.googleapis.com/drive/v3/changes/?"+Xn({pageToken:e,spaces:r,pageSize:1e3,includeRemoved:!0}),headers:{"Content-Type":"application/json"} }).then((t=>{const n=t.result;if(!s)return y.Breach();const r=n?JSON.parse(n):{};if(!(e=r.newStartPageToken))return v.warn("Google Drive: watch token error",n),o.watch.stop();r.nextPageToken&&v.warn("Google Drive: too much changes",n),(r.changes||[]).forEach((e=>{let t;const n=e.file;"file"===e.type&&n&&(t=Date.parse(e.time),isNaN(t)&&(t=Date.now()),o.changes.notify({id:n.id,time:t,name:n.name,removed:e.removed}))}))})).fail((e=>{v.warn("Google Drive: file changes check failed",e) })).always((()=>{i=se(t,o.config.watch_interval)}))};n.wait((()=>s?o.request({method:"GET",url:"https://www.googleapis.com/drive/v3/changes/startPageToken",headers:{"Content-Type":"application/json"}}).then((n=>{const r=n.result,s=r?JSON.parse(r):{};if(!(e=s.startPageToken))return v.warn("Google Drive: watch token error",r),o.watch.stop();t()})):y.Breach()))()},stop:()=>{s=!1,i&&(J(i),i=null)}},getRemoteUrl:void 0});return o},dropbox:e=>{const t=e.path||"";let n ;xe&&(n=parseInt(xe.getItem("dropbox_poll_interval")||""))||(n=18e5);const r=lc(cc("dropbox")),s=Object.assign({},r);let i,o,a,c,l=!0;const u=e=>{let n=[];const r=y(),s=e=>{d.request({method:"POST",url:"https://api.dropboxapi.com/2/files/list_folder"+(e?"/continue":""),headers:{"Content-Type":"application/json"},data:{path:e?void 0:ic(t),cursor:e}}).then((e=>{const t=e.result,i=t?JSON.parse(t):{entries:[]};if(n=n.concat(i.entries),i.has_more&&i.cursor)return s(i.cursor);r.resolve({list:n, cursor:i.cursor})})).fail(r.reject)};return l?(l=!1,d.put(".version",new Blob([pc])).then((()=>{s(e)})).fail(r.reject)):s(e),r.promise()},d=Object.assign(r,{...r,config:{...r.config,redirect_uri:`${dc}/auth`,request_uri:"https://www.dropbox.com/oauth2/authorize",client_id:"gq3auc9yym0e21y",response_type:"token",watch_interval:n?Number(n):0},request:e=>s.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[500,429].includes(n)?(e.backoff=2*(e.backoff||1e3), F(e.backoff).then((()=>d.request(e)))):[401].includes(n)?(v.warn("Dropbox: authentication error",t),d.credentials.delete("access_token").then((()=>{if(!e.retry_auth)return e.retry_auth=!0,d.oauth.run().fail((e=>d.error(e))).then((()=>d.request(e)))}))):(d.error(t),y.Breach(t))})),list:s.wait((e=>u().then((t=>{const n={};return o=t.cursor,t.list.map((t=>{if(!e){if(n[t.name])return;n[t.name]=!0}return{name:t.name,size:t.size,dropbox_hash:t.content_hash, modified:new Date(t.client_modified).getTime(),precision:1e3}})).filter((e=>e))})).always((()=>{i&&o&&(i(),i=null)})))),get:s.wait((e=>{const n=e.name||e;return d.request({method:"POST",url:"https://content.dropboxapi.com/2/files/download",headers:{"Dropbox-API-Arg":JSON.stringify({path:ic(t,n)})},responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t])}))})),put:s.wait(((e,n,r)=>{ const s=e.name||e,i=r&&r.lastModified?(new Date(r.lastModified).toISOString().match(/[^:]*:[^:]*:[^:.a-zA_Z]*/)||"")[0]+"Z":void 0;return d.request({method:"POST",url:"https://content.dropboxapi.com/2/files/upload",headers:{"Dropbox-API-Arg":JSON.stringify({path:ic(t,s),client_modified:i,mode:"overwrite"}),"Content-Type":"application/octet-stream"},data_type:"typified",data:{type:"raw",value:n}})})),delete:s.wait((e=>{const n=e.name||e;return d.request({method:"POST", url:"https://api.dropboxapi.com/2/files/delete",headers:{"Content-Type":"application/json"},data:{path:ic(t,n)}})})),revoke:()=>d.credentials.get().then((e=>e.access_token?s.request({method:"POST",url:"https://api.dropboxapi.com/2/auth/token/revoke"}).always((()=>d.oauth.reset())):y.Breach())),compare:(e,t)=>{const n=y(),r=4194304,s=Je(t,{encoding:"utf-8"}),i=[],o=s.byteLength;let a=1;const c=async()=>{if(0==--a){let t=new ArrayBuffer(0);i.forEach((e=>{e&&(t=((e,t)=>{ const n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer})(t,e))}));const r=await Ke(t),s=Do(r,"ASCII");n.resolve(s==e.dropbox_hash)}};for(let e=0,t=0;t{i.push(null),a++,Ke(s.slice(t,t+Math.min(r,o-t))).then((t=>{const n=Do(t,"ASCII");i[e]=ac(n),c()}),(()=>{v.warn("Dropbox: unable to calculate SHA-256 hashes"),n.reject()}))})(e);return c(),n.promise()},watch:{start:()=>{if(a)return;a=!0;let e=0 ;const t=()=>{if(c=null,e=0,a)return o?void d.request({method:"POST",url:"https://notify.dropboxapi.com/2/files/list_folder/longpoll",headers:{"Content-Type":"application/json"},no_auth:!0,no_queue:!0,data:{cursor:o,timeout:180}}).then((t=>{const n=t.result;if(!a)return y.Breach();const r=n?JSON.parse(n):{};return r.backoff&&(e=1e3*r.backoff),r.changes?F(6e4).then((()=>u(o))).then((e=>(o=e.cursor)?e.list:(v.warn("Dropbox: watch token error",n),d.watch.stop()))):null})).then((e=>{ e&&e.forEach((e=>{let t;const n=e[".tag"];["file","deleted"].includes(n)&&(t=Date.parse(e.server_modified),d.changes.notify({id:e.id,time:t,name:e.name,removed:"deleted"==n}))}))})).fail((e=>{v.warn("Dropbox: file changes check failed",e)})).always((()=>{c=se(t,e+d.config.watch_interval)})):(v.warn("Dropbox: watch token error",o),d.watch.stop())};s.wait((()=>a?(o?t():i=t,y.Pledge()):y.Breach()))()},stop:()=>{a=!1,c&&(J(c),c=null)}},getRemoteDomains:()=>["dropbox.com","dropboxapi.com"], getRemoteUrl:void 0});return d},onedrive:e=>{const t=e.path||"";let n,r;n=18e5;const s=lc(cc("onedrive")),i=Object.assign({},s);let o,a;const c=e=>{const n=y();let s=[];const i=o=>{l.request({method:"GET",url:o||"https://api.onedrive.com/v1.0/drive/special"+(t?"/approot:"+ic(t)+":/children":"/approot/children"),headers:{"Content-Type":"application/json"}}).then((t=>{const o=t.result,a=o?JSON.parse(o):{value:[]};if(s=s.concat(a.value.map((e=>{var t,n,r ;const s=(null===(t=null==e?void 0:e.fileSystemInfo)||void 0===t?void 0:t.lastModifiedDateTime)||0,i=(null===(r=null===(n=null==e?void 0:e.file)||void 0===n?void 0:n.hashes)||void 0===r?void 0:r.sha1Hash)||void 0;return{id:e.id,name:e.name,size:e.size,sha1:i,modified:new Date(s).getTime()}}))),a["@odata.nextLink"])return i(a["@odata.nextLink"]);e.set_current_list&&(r=s),n.resolve(s)})).fail((e=>n.reject(e)))};return i(),n.promise()},l=Object.assign(s,{...s,config:{...s.config, redirect_uri:`${dc}/auth`,refresh_supported:!0,request_uri:"https://login.live.com/oauth20_authorize.srf",client_id:"000000004C1A3122",response_type:"token",scope:"onedrive.appfolder",watch_interval:18e5},request:e=>i.request(e).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1;return!t||[429,500].includes(n)?(e.backoff=2*(e.backoff||1e3),F(e.backoff).then((()=>l.request(e)))):[401,403].includes(n)?(v.warn("OneDrive: authentication error",t),l.credentials.delete("access_token").then((()=>{ if(!e.retry_auth)return e.retry_auth=!0,l.oauth.run().fail((e=>l.error(e))).then((()=>l.request(e)))}))):404==n?y.Pledge(t):(l.error(t),y.Breach(t))})),list:i.wait((()=>c({set_current_list:!0}))),get:i.wait((e=>{const n=e.name||e;return l.request({method:"GET",url:"https://api.onedrive.com/v1.0/drive/special/approot:"+ic(t,ee(n))+":/content",responseType:"arraybuffer"}).then((e=>{const t=e.result;return new Blob([t])}))})),put:i.wait(((e,n,r)=>{ const s=e.name||e,i=ee(s.replace(/[#%<>:"|?*/\\]/g,"-"));return l.request({method:"PUT",url:"https://api.onedrive.com/v1.0/drive/special/approot:"+ic(t,i)+":/content",headers:{"Content-Type":"application/octet-stream"},data_type:"typified",data:{type:"raw",value:n}}).then((e=>{const t=r&&r.lastModified?new Date(r.lastModified).toISOString():void 0;if(!t)return e;const n=e.result,s=JSON.parse(n);return l.request({method:"PATCH",url:"https://api.onedrive.com/v1.0/drive/items/"+s.id,headers:{ "Content-Type":"application/json"},data:JSON.stringify({fileSystemInfo:{lastModifiedDateTime:t}})})}))})),delete:i.wait((e=>{const n=e.name||e;return l.request({method:"DELETE",url:"https://api.onedrive.com/v1.0/drive/special/approot:"+ic(t,ee(n))})})),revoke:()=>l.oauth.revoke(),watch:{start:()=>{if(o)return;o=!0;const e=()=>{if(a=null,!o)return;const t=r;c({set_current_list:!0}).then((()=>{if(!t)return;const e={},n={};r.forEach((t=>{e[t.id]=t})),t.forEach((e=>{n[e.id]=e})), Object.keys(n).forEach((t=>{const r=e[t],s=n[t];r?s.modified!=r.modified&&l.changes.notify({time:r.modified,name:r.name}):l.changes.notify({time:Date.now(),name:s.name,removed:!0})})),Object.keys(e).forEach((t=>{if(!n[t]){const n=e[t];l.changes.notify({time:n.modified,name:n.name})}}))})).fail((e=>{v.warn("OneDrive: file changes check failed",e)})).always((()=>{a=se(e,l.config.watch_interval)}))};i.wait((()=>o?(e(),y.Pledge()):y.Breach()))()},stop:()=>{o=!1,a&&(J(a),a=null)}}, getRemoteDomains:()=>["onedrive.live.com"],getRemoteUrl:void 0});return l},yandex:()=>{let e;e=18e5;const t=lc(cc("yandex")),n=uc(t),r=Object.assign({},n);let s;const i=Object.assign(n,{...t,...n,config:{...n.config,root:"/Programs/Tampermonkey",url:"https://webdav.yandex.ru",redirect_uri:`${dc}/auth`,refresh_supported:!0,request_uri:"https://oauth.yandex.com/authorize",client_id:"a591fcd2ccd248f0baa84222898065f4",response_type:"token",auth_prefix:"OAuth",watch_interval:18e5},init:()=>{ if(s)return s;const e=y();return s=e.promise(),i.request({method:"GET",url:"https://cloud-api.yandex.net/v1/disk/"}).done((e=>{const t=e.result,n=t?JSON.parse(t):{};n.total_space&&n.used_space&&(n.used_space+5e7>n.total_space?v.warn("Yandex: low disk space warning, only "+(n.total_space-n.used_space)+" bytes available"):v.log("Yandex: "+(n.total_space-n.used_space)+" bytes on disk available!"))})).always((()=>{e.consume(r.init())})),s},getRemoteDomains:()=>["disk.yandex.com"], getRemoteUrl:void 0,list:e=>r.list(e).then((e=>e.map((e=>(e.md5=e.etag,e))))),request:e=>(()=>{const t=e.headers=e.headers||{};if(t["X-Requested-With"]="XMLHttpRequest","PUT"==e.method&&fo(e.data)&&"raw"==e.data.type&&e.data.value){const n=y();return nt(e.data.value).then((e=>{const n=e||"";t.Etag=$e(n),t.Sha256=Do(n,"ASCII")})).always(n.resolve),n.promise()}return y.Pledge()})().then((()=>r.request(e))).then((e=>e),(t=>{const n=(null==t?void 0:t.status)||-1 ;return[401].includes(n)?(v.warn("Yandex: authentication error",t),i.credentials.delete("access_token").then((()=>{if(!e.retry_auth)return e.retry_auth=!0,i.oauth.run().fail((e=>i.error(e))).then((()=>r.request(e)))}))):t})),compare:(e,t)=>{const n=y();let r;return(r=e.md5)&&r==$e(t,"utf-8")?n.resolve(!0):n.resolve(!1),n.promise()},revoke:()=>i.oauth.revoke()});return i},webdav:e=>{let t;t=18e5;const n=e.url;if(n){const t=n.toLowerCase() ;t.startsWith("webdav")?e.url=n.replace(/^webdav/i,"http"):t.startsWith("http")||(e.url=`http://${n}`)}const r=uc((e=>{const t=Object.assign({},e);if(void 0===t.type)throw new Error("Internal error");const n=Object.assign(e,{...t,config:{...t.config},credentials:{get:()=>y.Pledge({basic_auth:n.config.basic_auth}),set:()=>y.Breach(),delete:e=>y((({resolve:t,reject:r})=>{"basic_auth"===e?(delete n.config[e],t()):r()})).promise(),clear:()=>y.Breach()},request:e=>y((async({resolve:t,reject:r})=>{ if(!e.no_auth){const t=(await n.credentials.get()).basic_auth;if(!t)return void r("Authentication failed");e.headers=e.headers||{},e.headers.Authorization="Basic "+t}t()})).promise().then((()=>t.request(e))).then((e=>e),(t=>{if(!e.no_auth){const e=(null==t?void 0:t.status)||-1;[401].includes(e)&&(v.warn("basic auth: authentication error",t),n.credentials.delete("basic_auth"))}return t})),wait:e=>t.wait(((...t)=>e(...t)))});return n})(cc("webdav")));return Object.assign(r,{...r,config:{ ...r.config,root:"Tampermonkey",watch_interval:18e5,...e}})}};let pc;const hc=Object.keys(Ac),fc=new Ve,mc={drive:"gd_config",dropbox:"db_config",onedrive:"od_config",yandex:"ya_config"},gc=()=>{const e=nn.getValue(I.STORAGE.UPDATE,{})||{};let{scripts:t,black:n}=e;return null==n&&(n=Object.assign({},{version:0,last:0})),null==t&&(t=0),{black:n,scripts:t}},vc=function(e){e&&nn.setValue(I.STORAGE.UPDATE,e)},wc=((e,t,n)=>{const r=new rt(1),s={},i={},o={},a={},c={} ;if(void 0===t)throw new Error("alarm: storage or setTimeout++ needs to be provided");const l=(e=>e&&"function"==typeof e.setTimeout)(t),u=l?t:void 0,d=l?void 0:t,A=n;let p=[];const f=async e=>{const t=e.name;if(console.debug(`alarm: onAlarm[${t}]`,e),t){await r.acquire(),console.debug(`alarm: onAlarm[${t}] mutex acquired`,a,c);const n=c[t],s=a[t];n&&s?(m(n.type,...n.args), void 0===e.periodInMinutes&&await v([t])):(n?console.warn(`alarm: onAlarm[${t}|${n.type}] - no alarm for alarm`):console.warn(`alarm: onAlarm[${t}] - no data for alarm`),await v([t])),console.debug(`alarm: onAlarm[${t}] mutex release`),p=p.filter((e=>e.name!==t)),r.release()}},m=(t,...n)=>{e((()=>{console.debug(`alarm: emit[*|${t}]`,n);const e=s[t];if(e)for(const t of e)if(!0===t(...n))return}))},g=(e,t)=>{const{clearTimeout:n,clearInterval:r}=t;let s=!1;const a=i[e];a&&(n(a),delete i[e],s=!0) ;const c=o[e];return c&&(r(c),delete o[e],s=!0),s},v=async e=>{let t=!1;return console.debug("alarm: internalClear",e),d&&A?await h.all(e.map((e=>(delete a[e],delete c[e],h.all([A.delete(e),d.clear(e).then((e=>t=e||t))]))))):u&&e.forEach((e=>{delete a[e],delete c[e],t=g(e,u)||t})),console.debug("alarm: internalClear done",e,a,c),t},w=(e,t)=>{let n=s[e];return n||(n=[],s[e]=n),n.push(t),()=>b(e,t)},b=(e,t)=>{const n=s[e];if(n){const e=n.indexOf(t);e>=0&&n.splice(e,1)}},_=async e=>{ const t=Array.isArray(e)?e:[e];if(console.debug("alarm: clear",t),d){await r.acquire();const e=await v(t);return r.release(),e}return v(t)};return d&&A&&(r.acquire().then((async()=>{const e=[],t=await A.list();for(const{key:e,value:n}of t)c[e]=n;const n=await d.getAll();p&&n.push(...p);for(const t of n){const n=t.name;c[n]?a[n]=t:(console.warn("alarm: no data for alarm "+n),e.push(n))}Object.keys(c).map((t=>a[t]?null:e.push(t))),e.length&&await v(e),console.debug("alarm: init done",a,c), r.release()})),d.onAlarm.addListener((e=>{p.push(e),f(e)}))),{onAlarm:f,on:w,once:(e,t)=>{const n=w(e,((...e)=>(n(),t.bind(void 0)(...e))));return n},off:b,schedule:async(e,t,...n)=>{const s=e,{when:l,delayInMinutes:p,periodInMinutes:f,keepExistent:w}=t;return await r.acquire().then((async()=>{const e=(Object.entries(c).find((([e,t])=>t.type===s))||[])[0];if(console.debug(`alarm: schedule[?|${s}]`,t,n,e),e&&w)return e;const r=e||Math.random().toString(36).substr(2,10);if(d&&A){ console.debug(`alarm: schedule[${r}|${s}] mutex acquired`),e&&await d.clear(r);const i=c[r]={type:s,args:n};await h.all([A.set(r,i),d.create(r,{when:l,delayInMinutes:p,periodInMinutes:f})]);const o=await d.get(r);o?a[r]=o:console.warn(`alarm: schedule[${r}|${s}] unable to create alarm`,t),console.debug(`alarm: schedule[${r}|${s}] mutex release`)}else if(u){const{setInterval:e,setTimeout:t,getCurrentTime:d}=u,A=d();let h;g(r,u);const w=f?60*f*1e3:void 0;if(h=l?l-A:p?60*p*1e3:w||0,w){ if(w<0)return console.warn(`alarm: schedule[${r}|${s}] - period ${f} is too small`),r;for(;h<0;)h+=w}if(h<0)return console.warn(`alarm: schedule[${r}|${s}] - when ${l} is too small`),r;i[r]=t((()=>{m(s,...n),delete i[s],w?o[r]=e((()=>m(s,...n)),w):v([r])}),h),c[r]={type:s,args:n},a[r]={name:r,scheduledTime:A+h,periodInMinutes:f}}return r})).always((()=>r.release()))},get:e=>a[e],list:()=>d?Object.keys(a):Object.keys(i).concat(Object.keys(o)),clear:_, clearAll:async()=>(console.debug("alarm: clearAll"),d?await _(Object.keys(a)):_(Object.keys(i).concat(Object.keys(o))))}})(_.ensureLate,Ot&&Ot.supported?Ot:{setInterval:re,setTimeout:se,clearInterval:Y,clearTimeout:J,getCurrentTime:()=>Date.now()},Ot&&Ot.supported?Ns("alarms"):void 0),bc="broadcast",_c="android_hint",yc=e=>{if("object"!=typeof e||null===e||!("text"in e))return!1;const t=Date.now(),{expires:n}=e;return!n||n>t},kc=an("global_hints","items"),Rc=e=>kc.set({[e]:Date.now() }),xc=async(e,t)=>{const n=Date.now();let{timeout:r,id:s,...i}=e;const o=e.key||s||(s=Math.random().toString(36).substr(2,9)),a=await kc.get();if(!t&&Object.entries(a).some((([e,t])=>e===o&&!yc(t))))return;const c=r?n+r:void 0,l={...i,id:s,expires:c};return await kc.set({[o]:l}),{...i,id:s,key:o}},Ec=e=>{const{expires:t,...n}=e;return{...n,timeout:t?Math.max(t-Date.now(),1):void 0}},Sc=async e=>{const t=(await kc.get())[e];return"number"==typeof t?null:t&&yc(t)?Ec(t):void 0 },Cc="https://blacklist.tampermonkey.net/get.php",Mc=(e,t)=>{let n=!1;if(t.length){if("/"==t.substr(0,1)){const r=Qo(t);if(!r)return;n=Wo(e,r)}else n=-1!=e.indexOf(t);return n&&v.log('black: entry "'+t+'" matched'),n}},Ic={SEVERITY_MAX:10,SEVERITY_MANUALLY_DEFINED:11,SEVERITY_FOISTED_SCRIPT:12,init:()=>{const e=y();wc.on("blu",(()=>{"server"===wn.values.script_blacklist_type&&Ic.checkUpdate()}));const t=()=>{wc.schedule("blu",{when:Date.now()+6e4,keepExistent:!0})};return t(), wn.addChangeListener("script_blacklist_type",t),e.resolve(),e.promise()},getWarningsFor:e=>{const t=[];return e&&Ze(wn.values.script_blacklist_server,(n=>{if(!n)return;const{rules:r,reasons:s,reason:i,exclude:o}=n;if(o&&o.includes(B.short_id))return;let a=!1;if(Ze(r,(t=>(a=a||!!Mc(e,t),1!=a))),a)if(s){const e=Qr.getBestLocale(Object.keys(s));t.push(s[e||"en"])}else i&&t.push(i)})),t},getEvilnessOf:e=>{if("off"===wn.values.script_blacklist_type)return 0;if(!e)return 0;let t=!1,n=0 ;return Ze(wn.values.require_blacklist,(n=>(t=t||!!Mc(e,n),1!=t))),t?n=Ic.SEVERITY_MANUALLY_DEFINED:"server"===wn.values.script_blacklist_type&&Ze(wn.values.script_blacklist_server,(r=>{if(!r)return;const{rules:s,severity:i,exclude:o}=r;return o&&o.includes(B.short_id)?void 0:(Ze(s,(n=>(t=t||!!Mc(e,n),1!=t))),t?(n=i,!1):void 0)})),Number(n)},checkUpdate:e=>{const t=y();let n,r=gc();if(e||Date.now()-r.black.last>864e5){const s=(e,t)=>{const n=y(),r={method:"GET",url:e,nocache:t,retries:Z.RETRIES, overrideMimeType:"text/plain; charset=x-user-defined"};return Uo.internal(r,{ondone:e=>n.resolve(e)}),n.promise()};s(Cc+"?version=get").then((t=>{if(4==t.readyState&&200==t.status){try{const e=JSON.parse(t.responseText);n=e.version}catch(e){v.warn("black: unable to parse version response! "+t.responseText)}if(v.info("black: local version: "+r.black.version+" remote: "+n),n>r.black.version||e)return s(Cc,!0)}})).then((e=>{if(e&&4==e.readyState&&200==e.status)try{const t=JSON.parse(e.responseText) ;t&&t.blacklist&&1==t.version&&(wn.values.script_blacklist_server=t.blacklist,(e=>{if(ci.all({domain:"status",key:bc,deleted:!0}),e&&e.description){let{name:t,name_i18n:n,description:r,description_i18n:s,expires:i,exclude:o,timeout:a,...c}=e;if(i){const e=Date.now();if(!(i>e))return;a=i-e}if(o&&o.includes(B.short_id))return;t=t||Qr.getMessage("Info"),a=a||864e5;const l={name:t,description:r,name_i18n:n||null,description_i18n:s||null,timeout:a,...c},u={key:bc,realm:"all", class:l.class||"information",title:Qr.getTranslation(l,"name"),text:Qr.getTranslation(l,"description"),timeout:a};xc(u),ci.all({domain:"status",...u})}else Rc(bc)})(t.broadcast)),v.info("black: updated blacklist to ",t)}catch(t){v.warn("black: blacklist update failed! ",e.responseText)}})).always((()=>{r=gc(),r.black.last=Date.now(),r.black.version=n||r.black.version,vc(r),t.resolve()}))}else t.resolve();return t.promise()}},Uc=Ic,Gc={content:"",error:void 0,forbidden:void 0,sri:void 0, determined:void 0,meta:void 0,name:void 0,blacklisted:void 0},Zc=(e,t)=>I.PREFIX.EXTERNAL+[e,t?$e(t):null].filter((e=>e)).join(":"),Tc={list:e=>{const t=new RegExp("^"+e);return nn.listValues().filter((e=>-1!=e.search(t)))},set:(e,t,n,r,s)=>{const i=Zc(e,t),{content:o,meta:a,name:c,forbidden:l,blacklisted:u,error:d,determined:A,sri:p}=n,h={base:(m=o,X(He(m))),meta:a,name:c,forbidden:l,blacklisted:u,error:d,determined:A,sri:p},f={ts:s||Date.now(),url:t,resource:h,modified:r};var m ;nn.setValue(i,f)},get:(e,t)=>{const n=Zc(e,t),r=nn.getValue(n);let s;if(r&&r.resource){const{resource:e,ts:t,url:n,modified:o}=r,{base:a,meta:c,name:l,forbidden:u,blacklisted:d,error:A,determined:p,sri:h}=e;s={ts:t,url:n,data:{content:(i=a,Qe(W(i))),meta:c,name:l,forbidden:u,blacklisted:d,error:A,determined:p,sri:h},modified:o}}var i;return s},clean:(e,t)=>{const n=Zc(e,t);nn.deleteValue(n)},cleanAll:(e,t)=>{let n;const r=Tc.list(Zc(e));if(t){const s={};Ze(t,(t=>{const n=Zc(e,t);s[n]=!0})), n=[],Ze(r,(e=>{s[e]||n.push(e)}))}else n=r;n.forEach((e=>{nn.deleteValue(e)}))}},Bc=je(9e3),Oc=(e,t,n,r)=>{const s=y(),{encoding:i,refresh:o}=r,a=!1;let c;return((e,t)=>{const n=y(),r=r=>{let s,i="";if(4!=r.readyState||200!=r.status&&0!=r.status||r.error){const e={...Gc,content:i,meta:s};n.reject(e)}else{let o,a;const c=go(r.responseHeaders)["content-type"];c&&c.match(/^\s*(image\/|text\/)([+-.a-zA-Z0-9]+)\s*$/)&&(o=c.trim()), o||((a=e.match(/.*\.(ico|jpg|jpeg)+($|\?|#).*/))?o="image/x-icon":(a=e.match(/.*\.(gif|png)+($|\?|#).*/))?o="image/"+a[1]:-1!=e.search(/.*\.(js)+($|\?|#).*/)?o="text/javascript":(a=e.match(/.*\.(css|html|xml)+($|\?|#).*/))?o="text/"+a[1]:(e=>{const t="background.js";let n=O.getURL(t);return n=n.replace(t,"")+"images/",e.length>=n.length&&n==e.substr(0,n.length)})(e)&&(o="image/x-icon")),s=o,i=Ye(r.response,t.encoding)||"";const l={...Gc,content:i,meta:s};n.resolve(l)}},s=({error:e})=>{n.reject({ ...Gc,error:e})},i=zn(e);if(i)if(["file:"].concat(T.INTERNAL_PAGE_PROTOCOLS).includes(i.protocol))if("file:"!=i.protocol||Ft()&&["externals","all"].includes(wn.values.script_file_access))St(e,(e=>{r({readyState:4,status:0,response:e,statusText:"",responseHeaders:""})}),(e=>{s({error:e})}));else{const t="Access to this or all local files is forbidden!";v.warn("externals:",t,"Loading the following @resource failed:",e,"-> more info:","https://www.tampermonkey.net/faq.php#Q204"),s({error:t})}else{ const n={method:"GET",url:e,retries:Z.RETRIES,...t.refresh?{revalidate:!0}:{nocache:!1},responseType:"arraybuffer"};n.timeout=wn.values.require_timeout,Uo.internal(n,{onload:e=>r(e),onerror:e=>s({error:e.responseText||e.statusText||"unknown error"}),ontimeout:()=>s({error:"timed out"})})}else s({error:"unable to parse url"});return n.promise()})(t,{encoding:i,refresh:o}).done((i=>{n&&(i.sri=n);const o=n=>{const r=zn(t) ;r&&r.protocol&&!["file:"].concat(T.INTERNAL_PAGE_PROTOCOLS).includes(r.protocol)&&Tc.set(e,t,n)};n&&["supported","given"].includes(wn.values.require_sri_mode)?Ka.check(n,i.content,r.encoding).done((()=>{c=i,o(c),s.resolve({sync:a,resource:c})})).fail((e=>{c={...Gc,forbidden:!0,sri:{mode:wn.values.require_sri_mode,type:n.type,value:"invalid"},determined:e},o(c),s.reject({sync:a,resource:c})})):(c=i,o(c),s.resolve({sync:a,resource:c}))})).fail((n=>{v.log("externals: get.failed",e,t,n),c={...Gc, error:n.error||"internal error"},s.reject({sync:a,resource:c})})),s.promise()},jc=e=>e.url||e.unsafe_url&&Vn(e.unsafe_url,e.abs_url)||"",Dc=(e,t,n)=>{const r=y(),s=zn(t),i=n.sync;let o,a;return t&&s?Uc.getEvilnessOf(t)>=wn.values.script_blacklist_severity?(o={...Gc,blacklisted:!0},r.reject({sync:i,resource:o})):Ka.getHash(s,"supported"==wn.values.require_sri_mode).done((c=>{if("enforce"!=wn.values.require_sri_mode||c)if("file:"!==s.protocol&&(a=Tc.get(e,t))){const s=Zc(e,t),l=Date.now() ;wn.values.external_update_interval>0&&l-a.ts>wn.values.external_update_interval&&(Bc.is(s)||(wn.values.external_update_interval>1&&Bc.add(s),a.modified?v.log("externals: resource is not updated due to user modifications",t,new Date(a.ts).toISOString(),new Date(l).toISOString()):(v.log("externals: resource needs update",t,new Date(a.ts).toISOString(),new Date(l).toISOString()),se((()=>{Oc(e,t,c,n)}),3e3)))),o=a.data,o.forbidden||o.blacklisted?r.reject({sync:i,resource:o}):r.resolve({sync:i, resource:o})}else r.consume(Oc(e,t,c,n));else o={...Gc,forbidden:!0,sri:{mode:wn.values.require_sri_mode,type:"unsupported",value:""}},r.reject({sync:i,resource:o})})):(o={...Gc,forbidden:!0},r.reject({sync:i,resource:o})),r.promise()},Fc={setElement:(e,t,n,r)=>{const{lastModified:s,...i}=n;return Tc.set(e,t,i,r,s)},getElement:(e,t)=>Tc.get(e,t),updateRequire:(e,t)=>Dc(e,t,{refresh:!0,sync:!1,encoding:"UTF-8"}),updateResource:(e,t)=>Dc(e,t,{refresh:!0,sync:!1}),cleanElement:(e,t)=>Tc.clean(e,t), dropAll:e=>(Tc.cleanAll(e),y.Pledge()),dropAllBut:(e,t)=>(Tc.cleanAll(e,t),y.Pledge()),loadResources:(e,t)=>{const n=y();return Fc.getResources(e,t).always((()=>{n.resolve()})),n.promise()},loadRequires:(e,t)=>{const n=y();return Fc.getRequires(e,t).always((()=>{n.resolve()})),n.promise()},getResources:(e,t)=>{const n=y(),r=[],s=[],i={sync:!0};return t.forEach((t=>{const n=jc(t),o=t.name;let a,c,l;const u=y();Dc(e,n,i).done((e=>{const t=e.resource;a=t.content,c=t.meta||"application" })).fail((e=>{if(e.resource){const{forbidden:n,sri:r,blacklisted:s,error:i}=e.resource;n?l=r?`can't load @resource '${t.name}' from URL '${t.unsafe_url}' due to a SRI error`:`can't load @resource '${t.name}' from forbidden URL '${t.unsafe_url}'`:s?l=`can't load @resource '${t.name}' from blacklisted URL '${t.unsafe_url}'`:i&&(l=`can't load @resource '${t.name}' from URL '${t.unsafe_url}': ${i}`)}l||(l=`can't load @resource '${t.name}' from URL '${t.unsafe_url}'`),v.warn("externals: "+l) })).always((e=>{i.sync=i.sync&&(!e||e.sync),r.push({name:o,url:n,error:l,content:a,meta:c}),u.resolve()})),s.push(u.promise())})),y.when(s).always((()=>{n.resolve({elements:r,sync:i.sync})})),n.promise()},getRequires:(e,t)=>{const n=[],r=y(),s=[],i={encoding:"UTF-8",sync:!0};return t.forEach(((t,r)=>{const o=jc(t);let a="";const c=y();Dc(e,o,i).done((e=>{a=e.resource.content||""})).fail((e=>{let n;if(e.resource){const{forbidden:r,sri:s,blacklisted:i,error:o}=e.resource ;r?n=s?`couldn't load @require from URL '${t.unsafe_url}' due to a SRI error`:`couldn't load @require from forbidden URL '${t.unsafe_url}'`:i?n=`couldn't load @require from blacklisted URL '${t.unsafe_url}'`:o&&(n=`couldn't load @require from URL '${t.unsafe_url}': ${o}`)}n||(n=`couldn't load @require from URL '${t.unsafe_url}'`),a=(e=>'console.warn("@require: " + decodeURIComponent("'+ee(e)+'"));')(n)+"\n",v.warn("externals: "+n)})).always((e=>{i.sync=i.sync&&(!e||e.sync),n[r]={textContent:a}, c.resolve()})),s.push(c.promise())})),y.when(s).always((()=>{r.resolve({elements:n.filter((e=>e)),sync:i.sync})})),r.promise()}},Lc=Fc;let Pc,Nc;const Vc={},zc=e=>e&&e.includes("*"),qc=()=>{const e=e=>{for(let t=0;t{for(;!Hc&&(t=e(n.id));)t.fn()}))};let Hc,Qc=[];const Wc=(e,t,n,r)=>{const s=((e,t)=>{const n=e=>e?e.map((e=>{let n=e;if(n.match(/^'?self'?$/)){const e=zn(t.url) ;n=(null==e?void 0:e.hostname)||null}else if("'none'"==n)n="none";else{if(["none","localhost","*"].includes(n))return n;if(Pn(n))return n;if(0===n.indexOf("."))return null;if(1===(n.match(/\./g)||[]).length&&Nn(n))return null}return n})).filter((e=>e)):[];return{connects:e.options.override.merge_connects&&"paranoid"!=wn.values.connect_mode?n(e.connects):[],userconnects:n(e.options.override.use_connects),blockers:n(e.options.override.use_blockers)}})(e,t),i=(e=>{const t=y() ;return Gl.isAllowed(e)?t.resolve({allowed:!0}):t.resolve({allowed:!1}),t.promise()})(n).then((r=>{if(!0!==r.allowed)return y.Breach("URL is blacklisted");let i,o;return(i=zn(n))&&i.origin&&(o=zn(t.url))&&o.origin&&i.origin===o.origin?y.Pledge({permitted:!0}):((e,t,n)=>{const r=y(),s=()=>{r.resolve({permitted:!0})},i=e=>{r.resolve({permitted:!1,reason:e})},o=()=>{r.resolve({unknown:!0})};let a,c;const l=e=>zc(e)?s:null,u=(e,t)=>{let n=null;const r=Pn(e);return t.every((({a:t,blocker:o})=>{ if(!t)return!0;for(const a of t)if(a&&(r||Pn(a)?a===e:-1!=e.search(new RegExp("(^|.+\\.)"+Ue(a)+"$"))))return n=o?i:s,!1;return!0})),n};return"off"==wn.values.connect_mode||n.startsWith("data:")||n.startsWith("blob:")?s():(a=zn(n))&&a.hostname?(c=u(a.hostname,[{a:Vc[e.uuid] }]))||(c=l(Vc[e.uuid]))?c():0===t.connects.length&&0===t.userconnects.length&&0===t.blockers.length?"casual"==wn.values.connect_mode?s():"strict"==wn.values.connect_mode?i("No @connects given, but strict mode enabled"):o():t.connects.includes("none")?i("None value found"):("casual"==wn.values.connect_mode&&!zc(t.blockers)&&(c=l(t.connects))||(c=l(t.userconnects))||(c=u(a.hostname,[{a:t.blockers,blocker:!0},{a:t.connects},{a:t.userconnects}])||o),c()):i("URL can not be parsed"),r.promise() })(e,s,n)})).then((i=>{var o;if(!1===i.permitted)return y.Breach("URL is not permitted"+(i.reason?": "+i.reason:""));if(!0===i.permitted)return y.Pledge();if(0===s.connects.length||zc(s.connects)){if(["ask","paranoid"].includes(wn.values.connect_mode)){if(zc(s.blockers))return y.Breach("URL was permanently blocked by the user");if(Hc){v.log('cor: queuing access permission check from "'+e.name+'" to',n,t);const s=y();return Qc.push({tabId:null===(o=null==t?void 0:t.tab)||void 0===o?void 0:o.id, fn:()=>{s.consume(Wc.apply(void 0,[e,t,n,r]))}}),s.promise()}return((e,t,n,r,s)=>{const i=y(),o=()=>{i.resolve({approved:!0})},a=()=>{i.resolve({forbidden:!0})};v.log('cor: "'+e.name+'" is asking for permission to access',r,t);const c=zn(r);if(c&&c.hostname){const i=(e=>{if(Pn(e))return;const t=e.split(".");if(t.length<3)return e;const n=Nn(t.slice(-2).join("."))?-3:-2;return t.slice(n).join(".")})(c.hostname),l=t.tab?t.tab.id:null;Hc=!0,Ho().then((o=>Gi.askForConnect({src_url:t.url, hostname:c.hostname,domain:i,all_domains:zc(n.connects),tabid:l,active:l===o.id,timeout:s,url:r,settings_url:ht.getURL("options.html")+"#nav="+e.uuid+"+settings",connect_url:"https://www.tampermonkey.net/documentation.php#_connect",script:{name:Qr.getTranslation(e,"name"),uuid:e.uuid,icon:e.icon64||e.icon||ks("unknown")}}))).done((({message:t,aborted:n})=>{let r;if(!t)return v.log("cor: unexpected response",t),void a();const s=t.whole_domain?i:c.hostname ;if(!s)return v.log("cor: internal error",t,i),void a();t.allow?t.once?(v.log('cor: allowing "'+e.name+'" to access',s,"once"),o()):t.temporary?(v.log('cor: allowing "'+e.name+'" to access',s,"temporarily"),void 0===Vc[e.uuid]&&(Vc[e.uuid]=[]),Vc[e.uuid].includes(s)||Vc[e.uuid].push(s),o()):(r=o,t.all_domains?(v.log('cor: allowing "'+e.name+'" to access all domains always'),e.options.override.use_connects.push("*")):(v.log('cor: allowing "'+e.name+'" to access',s,"always"), e.options.override.use_connects.push(s),r=o)):t.once||n?(v.log('cor: denying "'+e.name+'" to access',s,"once"),a()):(e.options.override.use_blockers||(e.options.override.use_blockers=[]),r=a,t.all_domains?(v.log('cor: denying "'+e.name+'" to access any domains (additional) domain'),e.options.override.use_blockers.push("*")):(v.log('cor: denying "'+e.name+'" to access',s,"always"),e.options.override.use_blockers.push(s))),r&&Pc(e.uuid,e,!1).always(r)})).fail(a).always((()=>{Hc=!1, Qc.length&&se(qc,1)}))}else a();return i.promise()})(e,t,s,n,r).then((e=>!0===e.approved?y.Pledge():y.Breach("Request was blocked by the user")))}return y.Breach()}return y.Breach("This domain is not a part of the @connect list")}));return i},Xc={getSessionConnects:e=>Vc[e]||[],setSessionConnects:(e,t)=>{Vc[e]=t||[]},purgeAppeals:e=>{Qc=Qc.filter((t=>t.tabId!==e))},exec:(e,t,n,r,s)=>{let i,o,a,c,l,u,d,A=e.url;const p=[],h=Math.max(Math.min(e.timeout||0,6e4),2e4),f=()=>{let e ;for(;!d&&(e=p.shift());)e()},m=(t,n)=>{const r='Refused to connect to "'+(n||e.url)+'": '+(t||"Blocked by @connect CORS check"),i=ho(r);["onerror","ondone"].forEach((e=>{const t=s[e];t&&t({response:i,exception:r})}))};if(n&&n.url&&n.tab&&e.url&&t&&(o=Nc(t))&&({script:a,cond:c}=o)&&a&&c&&!a.deleted)return Wc(a,n,e.url,h).done((()=>{if(u)return;const t={};for(const[e,r]of Object.entries(s)){if(!r)continue;const s=(e,...t)=>{if(l)return;if(d)return void p.push((()=>s(e,...t)));const o=e ;(o&&o.finalUrl&&A!==o.finalUrl?(d=!0,Wc(a,n,o.finalUrl,h).fail((()=>{u||l||(i&&i.abort(),l=!0,m("Request was redirected to a not whitelisted URL",o.finalUrl),v.warn("cor: request to",A,"was redirect to a not whitelisted URL",o.finalUrl))})).always((()=>{A=o.finalUrl,d=!1,p.length&&se(f,1)}))):y.Pledge()).always((()=>{l||r({response:o})}))};t[e]=s}i=Uo.external(e,t,r)})).fail((e=>{u||(m(e),v.warn("cor: access to",A,"was denied"))})).always((()=>{if(u){const e={response:ho("aborted"), exception:"Aborted by user"};s.onabort&&s.onabort(e),s.ondone&&s.ondone(e)}})),{abort:()=>{i?i.abort():u=!0}};m()}},Yc=Xc,Jc=e=>(e.sort(((e,t)=>e.position-t.position)),e),Kc=e=>{let t;void 0===e.ask&&(e.ask=!0),e.url||(e.url=""),""===e.force_url&&delete e.force_url;const n={errors:[],info:[],warnings:[],flags:{}},r=y(),s=Date.now(),i=e.save&&!e.ask&&wn.values.editor_easySave;let o;const a=us(e.src)||void 0;let c;if(a&&(a.name||(c=Qr.getMessage("Invalid_UserScript_name__Sry_"))), !a||c)return n.errors.push((c||Qr.getMessage("Invalid_UserScript__Sry_"))+"\n\n"),e.name&&n.errors.push(Qr.getMessage("Script_name_0name0",e.name)+"\n\n"),e.url&&n.errors.push(Qr.getMessage("Downloaded_from_0url0",e.url)),v.warn("scriptman: invalid userscript",n,a),y.Breach({messages:n});const{antifeatures:l,connects:u,name:d,namespace:A,textContent:p,version:h}=a ;let f,m,g,{downloadURL:w,enabled:b,excludes:_,fileURL:k,includes:R,lastModified:x,matches:E,options:S,sync:C,position:M,uuid:I,updateURL:U,system:G}=a;return y.Pledge().then((()=>{let n=e.uuid;if(e.replace&&!n&&(n=sa.getUidsByName(d,A)[0]),n){const e=sa.getByUid(n);e.cond&&e.script&&(t=e.script)}else if(I)n=I;else{if(!e.replace)return v.warn("scriptman: neither UUID, @uuid nor replace option set"),y.Breach();n=Pe()} return n&&""===n.replace(/[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/,"")?(I=n,y.Pledge(I)):(v.warn("scriptman: invalid UUID",n),y.Breach())})).then((()=>{if(!e.clean&&!e.defaultscript&&t&&t.system)return y.Breach()})).then((()=>{if(e.clean&&e.name&&e.name!=d||-1!=d.indexOf("\n"))return n.errors.push(Qr.getMessage("Invalid_UserScript_name__Sry_")),y.Breach()})).then((()=>{if(t){if(t.name!=d&&(n.flags.renamed=!0), e.internal||t.evilness!=Uc.SEVERITY_FOISTED_SCRIPT||(n.warnings.push(Qr.getMessage("This_is_a_possibly_foisted_script_and_a_modification_will_enable_it_")),n.flags.forceAsk=!0),t.lastModified&&void 0!==e.lastModTime&&t.lastModified!==e.lastModTime){let e=Qr.getMessage("some_secs");try{const n=Math.max(1,Math.floor((s-t.lastModified)/1e3));isNaN(n)||(e=n)}catch(e){}n.warnings.push(Qr.getMessage("CONFLICT__This_script_was_modified_0t0_seconds_ago_",e)),n.flags.forceAsk=!0} h==t.version&&(e.save?n.flags.modification=!0:n.flags.reset=!0),e.clean&&(n.flags.factory=!0),t.options.user_modified&&(n.flags.user_modified=!0),o=!e.internal}else n.flags.first_install=!0,o=!e.internal||e.save;R.length||E.length||i&&t||e.internal||n.warnings.push(Qr.getMessage("This_script_does_not_provide_any__include_information_")),l&&!e.internal&&Object.keys(l).forEach((e=>{const r=l[e];let s ;s=Qr.getMessage("ads"==e?"Antifeature_ads":"miner"==e?"Antifeature_miner":"tracking"==e?"Antifeature_tracking":"Antifeature_other");const o=r[Qr.getBestLocale(Object.keys(r))||"default"]||r.en||Qr.getMessage("Antifeature_no_details");let a,c;t&&t.antifeatures&&(c=t.antifeatures[e])&&(a=c[Qr.getBestLocale(Object.keys(c))||"default"]||c.en||Qr.getMessage("Antifeature_no_details")),i&&a&&o===a||n.warnings.push(Qr.getMessage("Antifeature__0name0__0description0",s,o))})),n.flags.sync=!!e.sync, n.flags.internal=e.internal,n.flags.ask=e.ask,n.flags.save=e.save,n.flags.whitewash=e.whitewash})).then((()=>{if(G=e.defaultscript,M=nl.determineLastPosition()+1,x=s,e.force_meta){let t;(t=e.force_meta.fileURL)&&(k=t),(t=e.force_meta.lastModified)&&(x=t)}if(t&&(t.system&&(G=!0),n.flags.factory&&(x=t.lastModified)),!n.flags.factory&&!n.flags.reset&&(e.force_url&&(U=null,w=e.force_url),t)){S.override=Be(t.options.override,{}),S.comment=t.options.comment, S.check_for_updates=t.options.check_for_updates;const r=t.options.override.orig_tags,s=r?S.tags.filter((e=>!r.includes(e))):S.tags;if(S.tags=t.options.tags.concat(s),p!=t.textContent){const r=t.options.user_modified;if(e.save&&!e.internal){S.user_modified=Date.now();const e=k||w;!wn.values.editor_easySave&&!r&&S.check_for_updates&&e&&"none"!=e&&n.warnings.push(Qr.getMessage("Modifying_a_script_will_disable_automatic_script_updates_")) }else!0!==e.replace&&!0!==e.internal&&!0!==e.clean&&!0!==e.whitewash&&r&&n.warnings.push(Qr.getMessage("The_script_was_modified_locally_on_0date0__Updating_it_will_overwrite_your_changes_",new Date(r).toLocaleString()))}}S.override.orig_includes=R,S.override.orig_excludes=_,S.override.orig_matches=E,S.override.orig_connects=u,S.override.orig_noframes=S.noframes,S.override.orig_run_at=S.run_at||"document-idle",S.override.orig_run_in=S.run_in||[],S.override.orig_tags=S.tags,S.noframes=null, S.run_at=null,S.run_in=null})).then((()=>{if(t&&(k=t.fileURL,t.deleted||(M=t.position),t.sync&&(C=t.sync),!n.flags.factory&&!n.flags.reset)){b=t.enabled,S.noframes=t.options.noframes,S.run_at=t.options.run_at,S.run_in=t.options.run_in;const{compatopts_for_requires:r,compat_wrappedjsobject:s,compat_metadata:o,compat_foreach:a,compat_powerful_this:c}=t.options;S={...S,compatopts_for_requires:r,compat_wrappedjsobject:s,compat_metadata:o,compat_foreach:a,compat_powerful_this:c}, e.save&&!e.force_url&&(w=t.downloadURL||w);const l=nl.determineSourceURL(t),d=nl.determineSourceURL({fileURL:k,downloadURL:w,updateURL:U}),A=l?Qn(l):l||Qr.getMessage("_not_set_"),p=d?Qn(d):d||Qr.getMessage("_not_set_");if(A==p||i||e.internal||n.warnings.push(Qr.getMessage("The_update_url_has_changed_from_0oldurl0_to__0newurl0",[A,p])),!e.save){const e=t.options.override.orig_includes||t.includes,r=t.options.override.orig_matches||t.matches,s=t.options.override.orig_excludes||t.excludes ;Fe(e,R,"notinfirst").length+Fe(r,E,"notinfirst").length+Fe(_,s,"notinfirst").length&&n.warnings.push(Qr.getMessage("At_least_one_of_the_include_match_or_exclude_statements_was_changed_")),Fe(t.connects||[],u||[],"notinfirst").length&&n.warnings.push(Qr.getMessage("At_least_one_new_connect_statement_was_added_"))}}})).then((()=>{if(t&&!n.flags.factory&&h==t.version){if(e.defaultscript)return y.Breach();if(e.noreinstall)return y.Breach()}})).then((()=>{ t?(n.flags.factory||n.flags.reset?(n.flags.reset?(n.heading=Qr.getMessage("You_are_about_to_reinstall_a_UserScript_"),n.flags.reinstall=!0):(n.heading=Qr.getMessage("You_are_about_to_install_a_UserScript_"),n.flags.install=!0),e.internal||n.warnings.splice(0,0,Qr.getMessage("All_script_settings_will_be_reset_"))):n.flags.modification?n.heading=Qr.getMessage("You_are_about_to_modify_a_UserScript_"):ls(h,t.version)==ls.eOLDER?(n.heading=Qr.getMessage("You_are_about_to_downgrade_a_UserScript"), n.flags.downgrade=!0,i||e.internal||n.warnings.splice(0,0,Qr.getMessage("The_downgraded_script_might_have_problems_to_read_its_stored_data_"))):(n.heading=Qr.getMessage("You_are_about_to_update_a_UserScript_"),n.flags.update=!0),n.info.push({label:Qr.getMessage("Installed_Version_"),value:Qr.getMessage("v0version0",t.version)})):(n.heading=Qr.getMessage("You_are_about_to_install_a_UserScript_"),i||e.internal||n.info.splice(0,0,Qr.getMessage("Malicious_scripts_can_violate_your_privacy_")), n.flags.install=!0),i||e.internal||Uc.getWarningsFor(nl.determineSourceURL({fileURL:k,downloadURL:w,updateURL:U})).forEach((e=>{n.warnings.splice(0,0,e)})), n.flags.whitewash?n.action=Qr.getMessage("Enable"):n.flags.install?n.action=Qr.getMessage("Install"):n.flags.reinstall?n.action=Qr.getMessage("Reinstall"):n.flags.modification?n.action=Qr.getMessage("Modify"):n.flags.downgrade?n.action=Qr.getMessage("Downgrade"):n.flags.update&&(n.flags.user_modified?n.action=Qr.getMessage("Overwrite"):n.action=Qr.getMessage("Update"))})).then((()=>{if(e.url&&(k=e.url),e.sync&&(C=e.sync),e.force_options&&Be(e.force_options,S,As().options,!0),e.force_settings){ const{enabled:t,position:n}=e.force_settings;void 0!==t&&(b=t),void 0!==n&&(M=n)}({options:S,includes:R,excludes:_,matches:E}=nl.mergeCludes({options:S,includes:R,excludes:_,matches:E}))})).then((()=>{const e=k?k.split("/").slice(0,-1).join("/")+"/":void 0;m=a.requires.map((({url:t})=>({unsafe_url:t,abs_url:e}))),g=a.resources.map((({name:t,url:n})=>({unsafe_url:n,abs_url:e,name:t})))})).then((async()=>{var t;const{compat_wrappedjsobject:r,compat_metadata:s,compat_foreach:i}=S ;(r||s||i)&&n.info.push({label:Qr.getMessage("Note"),value:Qr.getMessage("A_recheck_of_the_GreaseMonkey_FF_compatibility_options_may_be_required_in_order_to_run_this_script_")});let o,c,l={...a,downloadURL:w,enabled:b,excludes:_,fileURL:k,includes:R,lastModified:x,matches:E,options:S,sync:C,position:M,uuid:I,updateURL:U,system:G};if((o=nl.determineOrigin(l))&&(c=null===(t=fs[o.token])||void 0===t?void 0:t.convert)){const t=await c(l) ;if(t.info&&("includes added"===t.info?n.info.push(Qr.getMessage("Automatically_added_user_includes_for_compatibility_reasons_")):v.warn("scriptman: unknown script convert info",t.info)),t.warning){let r;"deleted by hoster"===t.warning&&(r=Qr.getMessage("This_script_was_deleted_by_the_hoster_")),r?e.internal?n.info.push(r):n.warnings.push(r):v.warn("scriptman: unknown script convert warning",t.warning)}l=t.script||l}return f=nl.getEvilness(l),{...l,uuid:I,textContent:p,evilness:f,requires:m, resources:g}})).done((async e=>{const{textContent:s,...i}=e;let a;if(t){const{textContent:e,...n}=t||{},r=await no(new Blob([e],{type:"text/javascript"}),ba);a={...n,tfd:await r.toTransferableData()}}const c=await no(new Blob([s],{type:"text/javascript"}),ba),l={script:{...i,tfd:await c.toTransferableData()},oldscript:a,messages:n,trigger_sync:!!o,short_info:[{label:Qr.getMessage("Author"),prop:"author"},{label:Qr.getMessage("Description"),prop:"description",i18n:!0},{ label:Qr.getMessage("Source"),prop:"fileURL"}],hints:[]};r.resolve(l)})).fail((()=>{r.reject({messages:n})})),r.promise()},$c=e=>{const t=y(),n=e.messages,r=e.script,s=n.warnings.length||n.flags.ask,i=e.trigger_sync,o=async()=>{const e=await new Us(r.tfd).toBlob(),s={...r,textContent:await new Response(e).text()};n.flags.modification||Lc.dropAll(s.uuid),t.notify();const o=nl.doModify(s.uuid,s,i)||{} ;return n.flags.save||!n.flags.install&&!n.flags.update||n.flags.factory||n.flags.reset||Ir(s.name,n.flags.install?"i":"u",s.fileURL||""),(n.flags.first_install||n.flags.factory)&&sa.setStorageByUid(s.uuid,{ts:Date.now(),data:{}}),o},a={uuid:r.uuid,lastModified:void 0,installed:!0,renamed:n.flags.renamed};return s?Gi.install(e).done((async({ok:e,aborted:n,message:r})=>{e&&await o(),t.resolve({installed:e,aborted:n,disable_update:"disable_update"in r?r.disable_update:void 0})})).fail((()=>{ t.reject()})):se((async()=>{await o(),t.resolve(a)}),1),t.promise()},el=(e,t)=>{const n=t||{},r=Object.values(e).map((t=>{let r,s,i;t.evilness&&(t.evilness==Uc.SEVERITY_FOISTED_SCRIPT?r=Qr.getMessage("The_origin_of_this_script_cant_be_determined_"):t.evilness>=Math.min(Uc.SEVERITY_MAX,wn.values.script_blacklist_severity)&&(s=Qr.getMessage("This_script_is_blacklisted_"))),t.evilness&&(i=Uc.getWarningsFor(rl.determineSourceURL(t)));const o=n.options_page,a={userscript:!0,foisted:r,blacklisted:s, warnings:i,icon:t.icon64||t.icon||void 0};if(o){const{textContent:r,requires:s,resources:i,...o}=t,c=(e,r)=>{const s=e.url||Vn(e.unsafe_url,e.abs_url),i=Lc.getElement(t.uuid,s);let o,a,c,l,u,d=0,A=null,p=null;return i&&i.data&&(i.data.content&&(u=i.data.content,d=u.length),p=i.data.sri,A=i.ts,o=i.modified,l=i.data.meta||"text/plain",c=r||/text\/.*|application\/(?:x-)?(?:java|ecma)script/.test(l),a=!0),{display_url:e.url||e.unsafe_url,abs_url:e.abs_url,unsafe_url:e.unsafe_url,url:s,data:{ length:d,content:n.externals?u:void 0},sri:p||void 0,ts:A,mimetype:l,editable:a,viewable:c,modified:o}},l=s.map((e=>c(e,!0))),u=i.map((e=>c(e))),d=rl.determineOrigin(t),A=rl.isContexter(t),p=Yc.getSessionConnects(t.uuid),h=sa.getStorageByUid(t.uuid),f=Object.keys(h.data).length,m=Sl(t),g=t.deleted,v=t.lastUpdated,w=t.downloadURL||t.fileURL||void 0,b=e.length;return{...o,...a,requires:l,resources:u,...n.referrer?{referrer:n.referrer,length:r.length}:{code:r},origin:d,contexter:A,temp_connects:p, ...n.storage?{storage:h}:{},storage_key_count:f,remote_url:m,deleted:g,lastUpdated:v,file_url:w,positionof:b}}{const e=rl.determineOrigin(t),r=n.active_urls||{},s=n.active_counts||{},i=n.all_time_active_counts||{};return{...a,name:t.name,name_i18n:t.name_i18n,uuid:t.uuid,nnew:!1,system:t.system,support:!!t.supportURL||e&&!!e.issue_url,abuse:void 0,active_urls:r[t.uuid],active_count:s[t.uuid],all_time_active_count:i[t.uuid],referrer:n.referrer,contexter:rl.isContexter(t),enabled:t.enabled, position:t.position,deleted:t.deleted,options:t.options}}}));return r},tl=je(1e3),nl={determineSourceURL:e=>{if(e)return[e.downloadURL,e.fileURL].filter((e=>{var t;if(!e||"file:"!==(null===(t=zn(e))||void 0===t?void 0:t.protocol))return e}))[0]||void 0},determineMetaURL:e=>{if(!e)return;let t;const n=nl.determineOrigin(e);return n&&n.meta_header?t=e.fileURL:!e.fileURL||n&&!n.meta_url||(t=e.fileURL.replace(".user.js",".meta.js"),e.fileURL==t&&(t=e.fileURL.replace(".tamper.js",".meta.js")), e.fileURL==t&&(t=null)),[e.updateURL,e.downloadURL,t].filter((e=>{var t;if(!e||"file:"!==(null===(t=zn(e))||void 0===t?void 0:t.protocol))return e}))[0]||void 0},mergeCludes:e=>{let t,n;const r=e.options.override;if(["includes","excludes","matches"].forEach((t=>{const n=`merge_${t}`,s=`orig_${t}`;e[t]=r[n]&&r[s]?r[s].slice():[]})),r.use_includes)for(t=0;t=0&&e.excludes.splice(n,1),e.includes.push(r.use_includes[t]) ;if(r.use_matches)for(t=0;t=0&&e.excludes.splice(n,1),e.matches.push(r.use_matches[t]);if(r.use_excludes)for(t=0;tKc(e).then($c),doRemove:(e,t)=>{const n=sa.getByUid(e);if(!n.script||!n.cond)return y.Breach("invalid script");const r=n.script;if(t)sa.removeByUid(e),sa.setStorageByUid(e,void 0),Lc.dropAll(e);else if(sa.softRemoveByUid(e).then((()=>{ wi.emit("scriptEvent",{type:"removed",name:r.name,script:r,sync:!0})})),"off"==wn.values.trash_mode)return nl.doRemove(e,!0);return y.Pledge()},restore:e=>{const t=sa.getByUid(e);if(!t.script||!t.cond)return y.Breach("invalid script");const n=t.script;return n.deleted?sa.restoreByUid(e).then((()=>{wi.emit("scriptEvent",{type:"added",name:n.name,script:n,sync:!0})})):y.Pledge()},doModify:(e,t,n)=>{void 0===n&&(n=!0);const r=!!nn.getValue(I.PREFIX.META+e) ;return sa.setByUid(e,t).then((()=>n?Lc.loadResources(e,t.resources).then((()=>Lc.loadRequires(e,t.requires))).then((()=>{const n=[].concat(t.resources).concat(t.requires).map((e=>Vn(e.unsafe_url,e.abs_url))).filter((e=>e));return Lc.dropAllBut(e,n)})):y.Pledge())).always((()=>{r?wi.emit("scriptEvent",{type:"changed",name:t.name,script:t,sync:n}):wi.emit("scriptEvent",{type:"added",name:t.name,script:t,sync:n})}))},exportToJson:(e,t)=>{const n=y();let r=nl.determineScriptsToRun({deleted:!1}) ;e&&(r=r.filter((t=>e[t.uuid])));const{storage:s,externals:i,global_settings:o}=t||{},a={scripts:el(r,{options_page:!0,storage:s,externals:i})};return o&&(a.global_settings=nn.getValue(I.STORAGE.CONFIG,{})),n.resolve(a),n.promise()},importFromJson:e=>{if(!e||!Array.isArray(e.scripts))return y.Breach("invalid json");const t={},n=[],r=[],s=[],i={},o={};for(const a of e.scripts)try{const e=y(),c=a.uuid||Pe();if("new-user-script"==c)continue;a.storage&&(i[c]=a.storage) ;for(const e of["resources","requires"]){const t=a[e];t&&t.length&&(o[c]=o[c]||{},o[c][e]=t)}const l=a.file_url||a.update_url;Kc({uuid:a.uuid,name:a.name,src:a.source,force_settings:{enabled:a.enabled,position:a.position},force_options:a.options,force_meta:{lastModified:a.lastModified},replace:!0,url:l,ask:!1}).done((n=>{const i=Pe();t[i]=n,a.storage&&a.storage.data&&Object.keys(a.storage.data).length&&r.push(i),o[c]&&s.push(i),e.resolve()})).fail((t=>{v.warn("import: Error @ script",a.name,t), e.resolve()})),n.push(e.promise())}catch(e){v.warn("import: Error while importing script",a.name,e)}const a=(()=>{const e=y();return y.when(n).always((()=>{e.resolve()})),e.promise()})().then((()=>Gi.import({scripts:t,storage_ids:r,externals_ids:s,global_settings:!!e.global_settings}))).then((({message:e,ok:n,aborted:r})=>{const s=y(),a=[],c=[];if(r)return y.Breach(Qr.getMessage("Aborted_by_user"));if(!e)return y.Breach("invalid response");if(n)for(let n,r=0;n=e.import_ids[r];r++)(()=>{const r=n ;if(t[r]){t[r].messages.warnings=[];const n=t[r].script.uuid,s=$c(t[r]).progress((()=>{if(!e.externals_ids.includes(r))return;const t=o[n];["resources","requires"].forEach((e=>{let r;t&&(r=t[e])&&r.length&&r.forEach((e=>{Lc.setElement(n,e.url,{content:e.content||"",meta:e.mimetype||"text/javascript"},e.modified)}))}))})).done((()=>{let t;e.storage_ids.includes(r)&&i[n]&&(t=sa.setStorageByUid(n,{data:i[n].data||{},ts:Date.now()}),c.push(t))}));a.push(s)}})();return y.when(a).always((()=>{ nl.reorderScripts(),y.when(c).always((()=>{s.resolve(e)}))})),s.promise()}),(e=>e.error)).then((t=>{if(e.global_settings&&t.global_settings){const t=nn.setValue(I.STORAGE.CONFIG,e.global_settings).then((()=>(a.done((()=>{se(Xa.reset,1)})),y.Pledge({global_settings:!0}))));return nn.setTemporary(!0),t}return y.Pledge({})}));return a},installFromUrl:(e,t,n)=>{const r=y(),s={messages:{info:[],errors:[Qr.getMessage("Unable_to_load_script_from_url_0url0",e)],warnings:[],flags:{}}};t=t||{} ;const i=n||{},o=["url",e,JSON.stringify(t)].join("_");if(tl.is(o))return v.debug("scriptman: de-bounced installFromUrl",e),y.Breach(s);tl.add(o);const a=zn(e);return a&&a.protocol.match(/(https?|file):/)?("file:"!=a.protocol||Ft()||v.warn("scriptman: Access to local files is forbidden! Loading the following script for installation may fail:",e,"-> more info:","https://www.tampermonkey.net/faq.php#Q204"),qo(e).then((n=>{const s={url:e,ask:!0,replace:!0,...t} ;r.consume(nl.installFromSource(n,s,i))})).fail((e=>{let t;e?(t=s,"file:"!=a.protocol||Ft()||t.messages.warnings.unshift(Qr.getMessage("Tampermonkey_has_no_file_access_permission_")),t.heading=Qr.getMessage("You_are_about_to_install_a_UserScript_"),i.silent_fail?r.reject(t):Gi.installError(t).always((e=>{r.reject(e)}))):r.reject()})),r.promise()):(v.warn("scriptman: can't install from ",e),y.Breach(s))},installFromSource:(e,t,n)=>{const r=y();t=t||{};const s=n||{},i={src:e,ask:!0,replace:!0,...t };return nl.doSave(i).done((e=>{r.resolve(!!e.installed)})).fail((e=>{e?(e.heading=Qr.getMessage("You_are_about_to_install_a_UserScript_"),s.silent_fail?r.reject(e):Gi.installError(e).always((()=>r.reject()))):r.reject()})),r.promise()},determineLastPosition:()=>{let e=0;return sa.getUidList().forEach((t=>{const n=sa.getByUid(t) ;n.script&&n.cond?n.script.position&&n.script.position!=Number.MAX_SAFE_INTEGER&&n.script.position>e&&(e=n.script.position):v.warn("scriptman: inconsistent script entry",t)})),e},getEvilness:e=>{let t=0;return e.fileURL&&(t=Uc.getEvilnessOf(e.fileURL))||e.downloadURL&&(t=Uc.getEvilnessOf(e.downloadURL))||e.updateURL&&(t=Uc.getEvilnessOf(e.updateURL))?(v.debug("scriptman: found blacklisted script",e),t):0},blackCheckAll:()=>{const e=sa.getUidList().map((e=>{ const t=sa.getByUid(e),{script:n,cond:r}=t;if(!n||!r)return;const s=nl.getEvilness(n);return s!==n.evilness?(n.evilness=s,nl.doModify(e,n,!1)):void 0})).filter((e=>e));return y.when(e).then((()=>{}))},reorderScripts:(e,t)=>{const n=t||0;let r=nl.determineScriptsToRun();const s=r.reduce(((e,t)=>(e[t.uuid]=t.position,e)),{});if(e)for(let t=0;t(e.deleted?e.position=Number.MAX_SAFE_INTEGER:e.position=i++,s[e.uuid]!==e.position?nl.doModify(e.uuid,e,!1):y.Pledge())));return y.when(o).then((()=>{}))},getUrlCondition:e=>{const t=nn.getValue(I.PREFIX.COND+e,null);if(!t)return;const{match:n,inc:r,exc:s}=t;let i;switch(wn.values.script_include_mode){case"off":i={match:n,exc:s};break;case"match":i={match:(n||[]).concat((r||[]).filter((e=>"/"!==e[0]))),exc:s};break;case"unsafe":case"default":i={match:n,inc:r,exc:s}}return i}, scriptWillRun:(e,t)=>{if(!t||!e)return;let n=$o.get(e);if(!n){const t=nl.getUrlCondition(e);if(!t)return;n=Xo(t,!0),$o.set(e,n)}return!!Jo(t,n,e)},determineScriptsToRun:e=>{const{enabled:t,warn:n,url:r,deleted:s}=e||{},i=[];return v.log("scriptman: determineScriptsToRun @"+r),sa.getUidList().forEach((e=>{let o=!0,a=0;const c=sa.getByUid(e);if(!(void 0!==t&&c.script&&c.script.enabled!==t||void 0!==s&&c.script&&!!c.script.deleted!==s)){if(r){const t=Date.now();o=!!nl.scriptWillRun(e,r), a=Date.now()-t}if(c.script&&c.cond){if(n&&a>1e3&&(v.warn("scriptman: checking "+c.script.name+"'s ("+e+") includes and excludes took "+a+"ms!"),ci.all({domain:"status",key:"slowdown",class:"warning",text:Qr.getMessage("Script_0name0_is_slowing_down_some_page_loads_",Qr.getTranslation(c.script,"name")),timeout:3e5})),!o)return;v.verbose("scriptman: determineScriptsToRun: found script ",c),i.push(c.script)}else v.warn("scriptman: inconsistent script entry",e,c)}})),Jc(i)}, isContexter:e=>!!e.options&&("context-menu"===e.options.run_at||null===e.options.run_at&&"context-menu"===e.options.override.orig_run_at),determineOrigin:e=>{const t=e.fileURL||e.downloadURL||e.updateURL;return t?ms(t):void 0},clean:e=>{const t=Date.now();sa.getUidList().forEach((n=>{const r=sa.getByUid(n);if(r.script&&r.cond){if(!r.script.deleted)return;{const e="on"===wn.values.trash_mode,s=Math.floor((r.script.deleted+wn.values.trash_cleanup_after-t)/1e3) ;if(e&&s>=0)return void v.log(`scriptman: script entry in trash ${n} will be cleaned in ${s}s`,r);v.log(`scriptman: script entry in trash ${n} will be cleaned now`,r)}}else v.warn(`scriptman: inconsistent script entry ${n} will be cleaned now`,r);e||nl.doRemove(n,!0)}))}},rl=nl,sl=rl,il=[],ol={},al=Ns("closeableTabs"),cl=new rt(1);cl.acquire().then((async()=>{const e=await al.list();await h.all(e.map((({key:e})=>{return(t=+e,new Promise((e=>{try{mt.get(t,(t=>{const n=ft.lastError;return e(t),n }))}catch(t){e(void 0),v.warn("getTab error",t)}}))).then((t=>{t?ol[+e]=!0:al.delete(e)}));var t})))})).always((()=>cl.release()));const ll=(xe?parseInt(xe.getItem("inactive_tab_done_timeout")||""):null)||1e3,ul=(e,...t)=>{_.late?bi.emit("active",e):se((()=>{ul(e,...t)}),100)},dl=(e,t,n)=>{if(!_.late)return void se((()=>{dl(e,t,n)}),100);const r=n.pendingUrl||n.url,s=Po({frameId:0},{topframe:!0}),{status:i,mutedInfo:o,audible:a}=t ;r?(("legacy"==wn.values.scriptUrlDetection||"manual"!=wn.values.scriptUrlDetection&&r.startsWith("file:"))&&Vo(r)&&sl.installFromUrl(r,{},{silent_fail:!0}),"loading"==i?bi.emit("loading",{tabId:e,sender:s,url:r,incognito:Fo(n)||!1,cookieStoreId:n.cookieStoreId}):"complete"==i&&bi.emit("complete",{tabId:e,sender:s,url:r})):v.warn("tu: no tab url set! ",n);const c={reason:"updated",status:i};o&&(c.muted=!!o.muted&&(o.extensionId?"extension":o.reason||"other")),"boolean"==typeof a&&(c.audible=a), il.forEach((e=>{e(c,n)}))},Al=e=>{if(bi.emit("remove",{tabId:e}),ol[e])return cl.acquire().then((async()=>{delete ol[e],await al.delete(e.toString())})).always((()=>cl.release()));il.forEach((t=>{t({reason:"removed"},{id:e})}))},pl=(e,t)=>{Al(t),_h.setIcon(e),_h.setBadge(e),il.forEach((t=>{t({reason:"replaced"},{id:e})}))},hl=e=>{if(!_.late)return void se((()=>{hl(e)}),100);const{url:t,tabId:n}=e,r=Po(e);if(r&&(bi.emit("commited",{tabId:n,sender:r,url:t}),Lo(r)&&il.forEach((e=>{e({ reason:"commited"},{url:t,id:n})})),n>=0)){const e=e=>{const t=y();return mt.get(e,(e=>{e?t.resolve(e):t.reject()})),t.promise()};e(n).then((e=>{vh(n,r,t,e)}))}},fl=e=>{const{tabId:t}=e,n=Po(e);n&&Lo(n)&&bi.emit("reset",{tabId:t,early:!0})},ml={init:()=>{mt.onUpdated.addListener(dl),mt.onRemoved.addListener(Al),mt.onReplaced.addListener(pl),mt.onActivated.addListener(ul),wt.supported&&(wt.onCommitted.addListener(hl),wt.onBeforeNavigate.addListener(fl,{url:[{schemes:["http","https"].concat([])}] }))},openAndWatch:function(e,t){let n,r;const{filter:s,url:i,active:o,index:a,parent:c,openerTabId:l,windowId:u,incognito:d}=e,A=(e,i)=>{(void 0!==n&&i.id===n||s&&i.url&&s.exec(i.url))&&(["updated","commited"].includes(e.reason)?t(i):"removed"==e.reason&&(r&&(J(r),r=void 0),ml.removeListener(A),t()))},p={url:i,active:o,index:a,parent:c,openerTabId:l,windowId:u,incognito:d};return mt.create(p,(s=>{s?(n=s.id,!1===e.active&&(r=se((()=>{r=void 0,mt.update(s.id,{active:!0},(()=>null))}),ll)), t(s)):v.warn("tab.create failed",e,s)})),ml.addListener(A),{cancel:()=>{ml.removeListener(A),void 0!==n&&mt.remove(n,(()=>{const e=ft.lastError;e?v.warn("tab.close",e.message):n=void 0}))}}},addListener:e=>{il.push(e)},removeListener:e=>{let t;il&&(t=il.indexOf(e))>-1&&il.splice(t,1)}},gl=ml;let vl=0,wl=[],bl=!1;const _l=(()=>{const e=e=>{const t=e.type,n=e.id,r=".meta.json",s=".user.js";let i,o;const a=e=>{let t;return y.Pledge().then((()=>{if(!o)return t=!0,c()})).then((()=>{ if(o&&void 0===o[e]&&!t)return c()})).then((()=>o?(o[e]=o[e]||void 0,o[e]):(v.warn("si: unable to list remote list!"),y.Breach())))},c=e=>i.list(e).then((e=>{o={};const t={},n={};let i,a;const c=Date.now();return e.map((e=>{const{name:l,modified:u}=e;if(!o)return;o[l]=e;const d=new RegExp(r+"$"),A=new RegExp(s+"$");if(u>c)v.log("si: ignore future list item",c,e);else if((i=!!l.match(d))||(a=!!l.match(A))){let r;if(i){r=l.replace(d,"");const n=u,{precision:s}=e;t[r]={uuid:r,options:{},url:void 0, precision:s,lastModified:n}}else a&&(r=l.replace(A,""),n[r]=!!e)}})),Object.keys(t).map((e=>{const r=t[e];return r&&(r.sourceAvailable=n[e]),r})).filter((e=>e))}));let l;const u={init:e=>{const o=l=Pe();return i=Ac[t]({...e,path:"sync"}),y.Pledge().then((()=>(i.changes.listen().progress((e=>{o===l&&((e,t)=>{if(t!=vl)return;const n=e.name;v.log("si: cloud file changed",n,e),(n.endsWith(r)||n.endsWith(s))&&wl.forEach((e=>{e(n)}))})(e,n)})),!0)))},disable:()=>{var e;return l=void 0, (null===(e=null==i?void 0:i.changes)||void 0===e?void 0:e.stop())||y.Pledge()},list:c,setSource:(e,t)=>{const n=e+s;return a(n).then((e=>{let r;return y.Pledge(!1).then((()=>{if(e&&i.compare)return i.compare(e,t)})).then((s=>s?(v.log("si: remote source data matches, skip upload of",n),y.Pledge()):(r=new Blob([t],{type:"text/plain"}),o&&delete o[n],i.put(e||n,r))))}))},getSource:(e,t)=>{const n=e+s;return a(n).then((r=>r?y.Pledge(!1).then((()=>{if(t&&i.compare)return i.compare(r,t) })).then((e=>e?(v.log("si: remote source data matches, skip download of",n),y.Pledge(t)):i.get(r).then((e=>nt(e,"utf-8"))).then((e=>e||(v.warn("si: remote source data is empty or broken, skip download of",n),y.Breach()))))):(v.warn("si: list cache does not contain this UUID",e),y.Breach())))},getMeta:e=>a(e+r).then((t=>t?i.get(t).then((e=>nt(e,"utf-8"))).then((n=>{let r;if(void 0!==n&&(r=(e=>{let t;try{t=JSON.parse(e)}catch(e){}if(t&&t.uuid)return t ;v.log("si: unable to parse extended info of "+void 0)})(n))&&(r.uuid=e)){let{options:n,url:s,precision:i,lastModified:o}=r;return o=t.modified||o||0,i=t.precision||i,n=n||{},{...r,uuid:e,url:s,options:n,precision:i,lastModified:o}}})):y.Breach())),setMeta:(e,t)=>{const n=new Blob([JSON.stringify(e)],{type:"text/plain"}),s=e.uuid+r;return a(s).then((e=>i.put(e||s,n,t)))},remove:e=>{const t=e.uuid+r;e.options.removed=Date.now();const n=new Blob([JSON.stringify(e)],{type:"text/plain"}) ;return i.put(t,n).then((()=>{const t=e.uuid+s;return a(t).then((e=>{if(e)return o&&delete o[t],i.delete(e)}))}))},reset:()=>i.list(!0).then((e=>e.filter((e=>{const t=new RegExp(r+"$"),n=new RegExp(s+"$");return e.name.match(t)||e.name.match(n)})))).then((e=>{const t=[];return e.forEach((e=>{t.push((()=>{const t=y();return i.delete(e).always((()=>{t.resolve()})),t.promise()})())})),y.when(t).always((()=>{o=void 0}))})).then((()=>{})),getRemoteUrl:function(e){ if(i.getRemoteUrl)return i.getRemoteUrl(e.uuid+s)},getRemoteDomains:function(){if(i.getRemoteDomains)return i.getRemoteDomains()}};return u},t=e({type:"drive",id:ea.eGDRIVE}),n=e({type:"dropbox",id:ea.eDROPBOX}),r=e({type:"onedrive",id:ea.eONEDRIVE}),s=e({type:"webdav",id:ea.eWEBDAV}),i=e({type:"yandex",id:ea.eYANDEX}),o=(()=>{let e,t=!1;const n=(t,n)=>{vl==ea.eCHROMESYNC&&"sync"==n&&y.Pledge().then((()=>{const r=new RegExp(e+"$");t&&Object.keys(t).forEach((e=>{const s=t[e],o=s.newValue ;if(v.log('si: storage key "%s" in namespace "%s" changed. Old value was "%s", new value is "%s".',e,n,s.oldValue,s.newValue),-1!=e.search(r))for(let t=0;t{const t=y();let n=[];return e?s().done((r=>{n=r.filter((t=>t.item.uuid==e)),t.resolve(n)})).fail((e=>{t.reject(e)})):t.resolve(n),t.promise()},s=()=>kl((()=>{const t=y(),n=new RegExp(e+"$");return xt.sync.get(null,(e=>{const r=[];e&&Object.entries(e).forEach((([e,t])=>{ if(-1==e.search(n))return;const s=i(t,e);s&&r.push({key:e,item:s})})),t.resolve(r)})),t.promise()})),i=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){}if(n&&(n.url||n.options))return n;v.log("si: unable to parse extended info of "+t)},o=e=>e.then((e=>{const t={};if((e=e.filter((e=>{if(!t[e.key])return t[e.key]=!0,!0}))).length>1){const t=y(),n=[],r=e.pop();return e.forEach((e=>{n.push(l(e.key))})),y.when(n).done((()=>{t.resolve(r)})),t.promise()}return y.Pledge(e[0])}));let a,c={};const l=e=>{ const t=y();return xt.sync.remove(e,(()=>{const e=ft.lastError;e?t.reject(e):t.resolve()})),t.promise()},u=()=>{const e=y();return xt.sync.set(c,(()=>{const t=ft.lastError;t?e.reject(t):(c={},e.resolve())})),e.promise()},d=()=>y.Pledge().then((()=>s())).then((t=>{const n=new RegExp(e+"$"),r=[];return t.forEach((e=>{const t=e.key,s=e.item,o=t.replace(n,"");let a;if(a=c[t]?i(c[t],t):s,!a)return;const l=a.options||{};r.push({uuid:l.removed?o:a.uuid,lastModified:l.removed||a.lastModified,url:a.url, options:l})})),y.Pledge(r)})),A={init:function(){let r=!0;if(!t)try{xt.onChanged.addListener(n),t=!0}catch(e){v.warn("si: error registering sync callback: "+e.message),r=!1}return e="@v2",y.Pledge(r)},disable:()=>y.Pledge(),list:d,setMeta:(t,n)=>{const s=y();return o(r(t.uuid)).done((r=>{let i;i=r?r.key:t.uuid+e;const{uuid:o,options:l,url:d}=t,A=(null==n?void 0:n.lastModified)||0,p={...(null==r?void 0:r.item)||{},url:d,options:l||{},uuid:o,lastModified:A};c[i]=JSON.stringify(p),a&&J(a), a=se(u,3e3),s.resolve()})),s.promise()},getMeta:e=>d().then((t=>{let n;return t.some((t=>{if(t.uuid==e)return n=t,!0})),n})),remove:t=>{const n=y();return o(r(t.uuid)).done((r=>{let s;s=r?r.key:t.uuid+e;const{url:i,options:o,uuid:l,lastModified:d}=t,A={...(null==r?void 0:r.item)||{},url:i,options:o||{},uuid:l,lastModified:d};A.options.removed=Date.now(),c[s]=JSON.stringify(A),a&&(J(a),a=void 0),a=se(u,3e3),n.resolve()})),n.promise()},reset:()=>kl((()=>{const e=y();return xt.sync.clear((()=>{ c={},e.resolve()})),e.promise()}))};return A})();return{[ea.eCHROMESYNC]:xt.sync.supported?o:void 0,[ea.eGDRIVE]:t,[ea.eDROPBOX]:n,[ea.eONEDRIVE]:r,[ea.eWEBDAV]:s,[ea.eYANDEX]:i}})();let yl;const kl=(e,t)=>{const n=y();let r=void 0!==t?t:3;const s=()=>{if(bl)se(s,500);else{bl=!0;try{e().always((()=>{bl=!1})).done((e=>n.resolve(e))).fail((()=>{--r>0?(v.log("si: some retries left, wait for 60000 ms"),se(s,6e4)):(v.warn("si: no retries left, skipping this sync request!"), n.reject("no retries left"))}))}catch(e){v.warn(e),bl=!1,n.reject(("string"==typeof e?e:e.message)||"internal error")}}};return s(),n.promise()},Rl={init:(e,t)=>(wl=[],vl=e,yl=_l[e],(null==yl?void 0:yl.init(t))||y.Breach()),disable:e=>{const t=_l[e];return t&&t.disable()||y.Breach()},addChangeListener:e=>{wl.push(e)},getRemoteUrl:e=>{if(yl&&yl.getRemoteUrl)return yl.getRemoteUrl(e)},getRemoteDomains:()=>{if(yl&&yl.getRemoteDomains)return yl.getRemoteDomains()},caps:(()=>{const e={} ;return Object.defineProperties(e,{specialMeta:{get:function(){return yl&&!!yl.getMeta},enumerable:!0},syncsSource:{get:function(){return yl&&!!yl.getSource},enumerable:!0}}),e})(),types:ea,list:()=>(null==yl?void 0:yl.list())||y.Pledge([]),setMeta:(e,t)=>(null==yl?void 0:yl.setMeta(e,t))||y.Pledge(),getMeta:e=>(null==yl?void 0:yl.getMeta(e))||y.Pledge(),setSource:(e,t)=>(null==yl?void 0:yl.setSource)?yl.setSource(e,t):y.Pledge(), getSource:(e,t)=>(null==yl?void 0:yl.getSource)?yl.getSource(e,t):y.Pledge(),reset:()=>(null==yl?void 0:yl.reset())||y.Pledge(),remove:e=>(null==yl?void 0:yl.remove(e))||y.Pledge()},xl=e=>{const{uuid:t,name:n,downloadURL:r,fileURL:s,lastModified:i,options:o}=e,a=r?r.split("#")[0]:void 0,c=s?s.split("#")[0]:void 0,l=[c,a].filter((e=>{const t=e?zn(e):void 0;if(!t||"file:"!==t.protocol)return e}))[0],{comment:u,user_modified:d}=o;return{uuid:t,name:n,options:{comment:u||void 0, user_modified:d||void 0},durl:a,furl:c,url:l,lastModified:i||e.lastUpdated}},El=Rl.getRemoteDomains,Sl=Rl.getRemoteUrl,Cl="PageFilter",Ml=[];let Il;const Ul={init:async()=>{{Il=Ns("pageFilter");const e=await Il.get("forbiddenDomains");e&&e.length>0&&Ul.forbid(e)}const e=()=>{$o.remove(Cl)};wn.addChangeListener("forbiddenPages",e),wn.addChangeListener("page_whitelist",e),wn.addChangeListener("page_filter_mode",e)},isAllowed:e=>{const t=Ul.conditions;return!t||Jo(e,t)},get conditions(){ let e=$o.get(Cl);if(!e){let t=!1,n=!1;const r=wn.values.forbiddenPages.concat((El()||[]).map((e=>`*://${e}/*`))).concat(Ml.map((e=>`*://${e}/*`))),s=r.length>0,i=wn.values.page_whitelist.length>0;switch(wn.values.page_filter_mode){case"black":n=s;break;case"off":break;case"white":t=i;break;default:t=i,n=s}e=Xo({inc:t?wn.values.page_whitelist:void 0,exc:n?r:void 0}),$o.set(Cl,e)}return e.rinc||e.rexc?e:void 0},forbid(e){for(const t of e)Ml.includes(t)||Ml.push(t) ;Il&&e.length>0&&Il.set("forbiddenDomains",Ml)}},Gl=Ul,Zl=z({timeout:600,check_interval:300,retimeout_on_get:!0});let Tl,Bl,Ol,jl,Dl,Fl;const Ll=e=>{const t=(e=>`${Tl}/api?`+Xn(Object.assign({l:Ol,q:e},rn(jl))))(e),n=Zl.get(t);if(n)return n;const r=y(),s=r.promise(),i=e=>{r.reject({error:e})};if(Fl&&Fl>Date.now())return i("rate limit or backoff"),s;if(!e.startsWith("http"))return i("unsupported url"),s;Fl=void 0;let o=1;const a=Dl({url:t,headers:{Accept:"application/json, */*"},fetch:!0, responseType:"json"},{onload:e=>{if(200==e.status){const{count:t,url:n}=e.response,s=`${Tl}${n}`;o=1,r.resolve({count:Number(t||0),url:s})}else if(429===e.status){const t=go(e.responseHeaders),n=Number(t["retry-after"]||15);o=1,n&&(Fl=Date.now()+1e3*n,i("rate limit"))}else o=Math.min(2*o,300),Fl=Date.now()+1e3*o,i(e.responseText||"unknown error")},onerror:e=>{i(e.responseText||e.statusText)},onabort:()=>{i("aborted")},ontimeout:()=>{i("timed out")}},{internal:!0}) ;return s.abort=()=>null==a?void 0:a.abort(),Zl.set(t,s),s},Pl=e=>((e,t)=>{let n,r="",s="";return"click"==jl?(r="?"+Xn(Object.assign({l:Ol},rn(jl))),s="#"+Xn(Object.assign({q:t})),n=`${e}/`+r+s):(r="?"+Xn(Object.assign({l:Ol,q:t},rn(jl))),n=`${e}/search?`+r+s),n})(Bl,e),Nl=()=>{const e="?"+Xn(Object.assign({l:Ol},rn(jl)));return`${Tl}/privacy?`+e},Vl={mkCompat:(e,t,n,r)=>(t&&((t.options.compat_wrappedjsobject||r)&&(e=Vl.unWrappedJsObjectify(e)), (t.options.compat_metadata||r)&&(e=Vl.unMetaDataify(e)),(t.options.compat_foreach||r)&&(e=Vl.unEachify(e))),n||(e=e.replace(/(['"])use strict(['"])/g,"$1use strict$2")),e),findPrototypes:e=>{if(e.includes(".toSource("))return!0;const t=["indexOf","lastIndexOf","filter","forEach","every","map","some","slice"];for(const n in t)if(e.includes(`Array.${t[n]}(`))return!0;return!1},unEachify:e=>{const t=(e=e.replace(/for each[ \t]*\(/gi,"for each(")).split("for each");for(let e=1;e{let t=e,n=e;const r="<>" ;let i=t.indexOf(r);for(;-1!=i;){const e=t.substr(0,i),o=e.lastIndexOf("\n");let a="";-1!=o&&(a=e.substr(o,e.length-o)),t=t.substr(i,t.length-i);const c=a.indexOf("/*"),l=a.indexOf("//");if(-1==c&&-1==l){const e=Me(t,r,s);let i=e;i=i.replace(/\\/g,"\\\\"),i=i.replace(/"/g,'\\"').replace(/\n/g,'\\n" + \n"'),i=i.replace(/^\n/g,"").replace(/\n$/g,""),i=i.replace(/\r/g,"");const o=r+e+s;n=n.replace(o,'(new CDATA("'+i+'"))')}t=t.substr(1,t.length-1),i=t.indexOf(r)}return n},unWrappedJsObjectify:e=>{ const t=e.split("\n");for(let e=0;e{const[n,r]=t;return r.forEach((t=>e[t]=[...e[t]||Hl,n])),e}),{}),Wl=Object.keys({GM:!0,unsafeWindow:!0,...Ql }).filter((e=>!e.includes("."))),Xl=new RegExp("[a-z0-9A-Z_$]\\s*(\\.\\s*|\\[\\s*[\"'`])("+Wl.join("\\b|")+"\\b)([\"'`]\\s*\\])?(\\s*)(?!=[^=])(\\S|$)"),Yl=2<<16,Jl=e=>(e.length>Yl?e.split("\n"):[e]).some((e=>!!Xl.test(e.length>Yl?e.substr(Yl):e))),Kl=e=>!!e&&void 0!==e.script,$l={},eu={bundle:e=>{let t,n=$l[e.uuid],r=!0;if(n)return n;let{includes:s,matches:i,requires:o,resources:a,excludes:c,connects:l,textContent:u,...d}=e;const A=JSON.parse(JSON.stringify(e.options));let p,h ;return A.run_at=A.run_at||e.options.override.orig_run_at||"document-idle",A.run_in=A.run_in||e.options.override.orig_run_in,d.options=A,n=Lc.getResources(d.uuid,e.resources).then((t=>(r&&!t.sync&&(v.log("ri: uncached @external detected -> fast script start disabled"),r=t.sync),p=t.elements,Lc.getRequires(d.uuid,e.requires)))).then((e=>{r&&!e.sync&&(v.log("ri: uncached @external detected -> fast script start disabled"),r=e.sync),h=e.elements;const t={resources:p,requires:h,...d} ;return null===A.compat_powerful_this&&(A.compat_powerful_this=Jl(u)||h.some((e=>Jl(e.textContent)))),((e,t,n)=>{const r=y(),s=[];n.forEach((t=>{let n=t.textContent||"";n=zl.mkCompat(n,e.options.compatopts_for_requires?e:void 0,"off"!=wn.values.runtime_strict_mode),s.push({textContent:n})}));const i=sa.getStorageByUid(e.uuid);let o=zl.mkCompat(t,e,"off"!=wn.values.runtime_strict_mode);if(wn.values.debug){const e=o.split("\n");let t,n=!1;for(let r=0;r{t=!0,delete $l[d.uuid]})),t||($l[d.uuid]=n),n}},tu=eu;let nu;const ru=()=>nu,su=new Ve,iu={};su.on("added",(e=>{iu[e.id]=e})),su.on("removed",(e=>{delete iu[e.id]}));let ou,au,cu=0;const lu={ts:0},uu={},du=V({threads:1}),Au={},pu={comment:!0,user_modified:!0},hu=!!ae.Tests,fu=(e,t)=>du.add((async()=>{if(!ou.caps.syncsSource){let t;if(!e.url||!(t=zn(e.url))||!t.protocol.match(/https?:/))return v.log("sync: skip export due to missing URL",e.name,e.url),!1} v.log("sync: export",e.name,e.url),wi.emit("syncProgressEvent",{type:"export",text:Qr.getMessage("Export_script_0name0_0uuid0",e.name,e.uuid)});try{return ou.setSource&&t&&(wi.emit("syncProgressEvent",{type:"export",text:Qr.getMessage("Export_script_source_of_0name0",e.name,e.uuid)}),await ou.setSource(e.uuid,t)),wi.emit("syncProgressEvent",{type:"export",text:Qr.getMessage("Export_script_meta_data_of_0name0",e.name,e.uuid)}),await ou.setMeta(e,{lastModified:e.lastModified}),!0}catch(e){return!1 }})),mu=()=>{const e=sa.getUidList().map((e=>{const t=sa.getByUid(e);if(t.script&&t.cond&&!t.script.deleted){const e=xl(t.script);return e.lastModified||hu?t.script.evilness&&t.script.evilness>=Math.min(Uc.SEVERITY_MAX,wn.values.script_blacklist_severity)?void v.warn("sync: ignore evil script",t.script):e:void v.warn("sync: script without updated/modified timestamps found",t.script)}})).filter((e=>e));return e},gu=(e,t,n)=>n?Math.floor(e/n)*n{ au&&(v.verbose("sync: remoteChangeCb()"),bu(500,!0))},wu=()=>{const e=y();let t=!1;return y.Pledge().then((()=>{if(wn.values.sync_type){if(wn.values.sync_enabled){let e={};return wn.values.sync_type==ea.eWEBDAV&&(e={url:wn.values.cloud_url||void 0,basic_auth:We(wn.values.cloud_user+":"+wn.values.cloud_pass)}),ou.init(wn.values.sync_type,e).done((e=>{t=e,e?ou.addChangeListener(vu):v.warn("sync: init failed!")})).fail((()=>{v.warn("sync: init failed!")}))}return ou.disable(wn.values.sync_type)} })).always((()=>{au=t,e.resolve(au)})),e.promise()},bu=(e,t)=>{const n=Date.now();e=e||500,t=lu.force||t,lu.to?(J(lu.to),lu.ts{(e=>{let t=[],n=[],r=0,s=0,i=!0,o=!1;const a=e=>{if(e)for(let t=0;t{if(void 0===au&&e)return yu() })).then((()=>au?cu>0?(e&&wi.once("syncFinished",(t=>{t&&bu(50,e)})),y.Breach()):(cu++,o=!0,v.verbose("sync: start syncing = "+cu),void ci.all({domain:"status",key:"sync_status",class:"information",title:Qr.getMessage("Script_Sync"),text:Qr.getMessage("Sync_is_running"),timeout:9e5})):y.Breach())).then((()=>(t=mu(),(wi.emit("syncProgressEvent",{type:"lookup",text:Qr.getMessage("Lookup_remote_script_list")}),ou.list()).done((e=>{n=e})).fail((()=>{v.warn("sync: unable to get remotelist!") }))))).then((()=>{const e=n.map((e=>{let n;const s=(e=>{if(e)for(let n=0;ny.Pledge().then((()=>ou.caps.specialMeta?(wi.emit("syncProgressEvent",{type:"lookup", text:Qr.getMessage("Lookup_remote_script_0uuid0",e.uuid)}),ou.getMeta(e.uuid)):y.Pledge(e))).then((e=>{if(!e)return;const{uuid:t,url:a}=e;if(s){if(e.options.removed)r++,wi.emit("syncProgressEvent",{type:"import",text:Qr.getMessage("Remove_local_script_0name0_0uuid0",s.name,s.uuid)}),v.log(`sync: remove local script ${t}`,a),sl.doRemove(s.uuid);else if(i)return c=o,l=e.lastModified, ((u=e.precision)?Math.floor(c/u)*u!=Math.floor(l/u)*u:c!=l)&&(e.lastModified&&v.warn("sync: list and meta data lastModified differ, this will cause extra traffic!","file ts:",new Date(o),"meta ts:",new Date(e.lastModified),e),e.lastModified=o),r++,v.log(`sync: update local script ${t}`,a),wi.emit("syncProgressEvent",{type:"import",text:Qr.getMessage("Update_local_script_0name0_0uuid0",s.name,s.uuid)}),y.Pledge().then((()=>{if(ou.caps.syncsSource&&ou.getSource){const n=y() ;return ou.getSource(t,void 0).then((e=>e?sl.doSave({uuid:t,src:e,ask:!1,internal:!0,save:!0}):y.Breach())).fail((()=>{v.warn(`sync: getting source of ${t} failed`,e)})).always((()=>n.resolve())),n.promise()}})).then((()=>{const{script:n}=sa.getByUid(s.uuid);if(!n)return v.warn(`sync: getting entry ${t} failed`,e),y.Breach();for(const[t,r]of Object.entries(pu))!0===r&&(n.options[t]=e.options[t]||null);return n.lastModified=e.lastModified,sl.doModify(n.uuid,n,!1)})) }else if(s||e.options.removed)!n&&e.options.removed&&(Au[t]=e);else{const n=y();if(!(a&&uu[a]||t&&uu[t]))return(e=>du.add((()=>{const{uuid:t,url:n,lastModified:r}=e;wi.emit("syncProgressEvent",{type:"import",text:Qr.getMessage("Import_remote_script_0uuid0",e.uuid)}),v.log("sync: import",t,n);const s={imported:wn.values.sync_type},i={};for(const[t,n]of Object.entries(pu))!0===n&&(i[t]=e.options[t]);const o={uuid:t,ask:!1,internal:!0,sync:s,force_meta:{lastModified:r,fileURL:n||void 0}, force_options:i},a={silent_fail:!0};return(ou.caps.syncsSource&&ou.getSource?ou.getSource(t).then((e=>e?sl.installFromSource(e,o,a):(v.warn("sync: import export due to missing source",t,n),y.Breach())),(()=>{v.warn("sync: import export due to missing source",t,n)})):n?sl.installFromUrl(n,o,a):(v.log("sync: skip import due to missing URL and source",t),y.Breach())).done((()=>{Ko.removeAll()}))})))(e).done((n=>{n?r++:(v.warn("sync: unable to import",e),a&&(uu[a]=!0),uu[t]=!0)})).fail((()=>{ v.warn("sync: unable to load",e),a&&(uu[a]=!0),uu[t]=!0})).always((()=>n.resolve())),n.promise();v.warn("sync: skip previously failed import",e)}var c,l,u}))})).filter((e=>e));return y.onebyone(e)})).then((()=>(r&&(sl.reorderScripts(),ci.all({domain:"status",key:"sync",class:"information",title:Qr.getMessage("Script_Sync"),text:Qr.getMessage("0count0_changes_imported",r),timeout:1e4})),t=mu(),y.Pledge()))).then((()=>{const e=[];for(let n=0;n{const e=t[n];let r,i ;if(!ou.caps.syncsSource&&!e.url)return y.Pledge();const o=a(e.uuid);var c,l,u;if(o?o.lastModified&&(c=e.lastModified,l=o.lastModified,!((u=o.precision)?Math.floor(c/u)*u>Math.floor(l/u)*u:c>l))||(r=!0,v.log("sync: exportable change detected!",e.name,"remote ts:",new Date(o.lastModified),"local ts:",new Date(e.lastModified),e)):v.log("sync: export because remotely missing!",e.name,"local ts:",new Date(e.lastModified),e),!o||r||ou.caps.syncsSource&&!o.sourceAvailable){if(ou.caps.syncsSource){ const t=sa.getByUid(e.uuid);t.script&&t.cond&&(i=t.script.textContent)}return fu(e,i).then((e=>{e&&s++}))}return y.Pledge()})());return y.when(e)})).then((()=>{i=!0})).fail((()=>{i=!1})).always((()=>{if(v.log("sync: finished"),o&&0==--cu){let e=Qr.getMessage(i?"Sync_finished":"Sync_failed");if(ci.all({domain:"status",key:"sync_status",class:"information",title:Qr.getMessage("Script_Sync"),text:e,timeout:15e3}),s){const t=Qr.getMessage("0count0_changes_exported",s);ci.all({domain:"status", key:"sync",class:"information",title:Qr.getMessage("Script_Sync"),text:t,timeout:5e3}),e=`${e}\n${t}`}wi.emit("syncProgressEvent",{type:"finished",success:i,text:e}),wi.emit("syncFinished",i)}}))})(lu.force),lu.to=lu.force=void 0}),e)};let _u=!0;const yu=()=>y.Pledge().then((()=>{if(_u)return _u=!1,wu()}));let ku;const Ru={get enabled(){return au},SYNCED:pu,init:async()=>{wc.on("sync",(()=>{yu().always((()=>{au&&Ru.sync()}))})),wc.schedule("sync",{delayInMinutes:1,periodInMinutes:10, keepExistent:!0}),ou=(e=>(((e,t,n)=>{rc=e=>{let t=y();const n=gl.openAndWatch({url:e.url,filter:e.filter?new RegExp(e.filter):void 0,active:!1},(e=>{e?t&&t.notify(e):t&&(t.resolve(),t=void 0)}));return{promise:t.promise(),close:function(){n.cancel()}}},pc=n,oc=e=>an("cloud",e,mc)})(0,0,e),Rl))(ht.manifest.version),wn.addChangeListener(["sync_enabled","sync_type","cloud_url","cloud_user","cloud_pass"],((e,t,n)=>{"sync_type"==e&&t&&t!==n&&ou.disable(t),ku||(ku=se((()=>{ku=void 0,wu()}),3e3))})), wi.on("scriptEvent",(({type:e,name:t,script:n,sync:r})=>{if(!au||!r)return;v.verbose(`sync: script ${e} event for ${t} (sync: ${r})`);const s=xl(n);switch(e){case"added":fu(s,n.textContent);break;case"changed":wc.schedule("sync",{periodInMinutes:10,delayInMinutes:1});break;case"removed":(e=>{du.add((()=>(wi.emit("syncProgressEvent",{type:"export",text:Qr.getMessage("Remove_remote_script_0name0_0uuid0",e.name,e.uuid)}),v.log("sync: remove",e.name,e.url),ou.remove(e))))})(s)}}))},sync:bu, reset:()=>y.Pledge().then((()=>{if(void 0===au)return yu()})).then((()=>au?ou.reset():y.Breach()))};ae.sycl=Ru;const xu=Ru,Eu=new Ve,Su={},Cu=(e,{name:t,title:n,accessKey:r,uuid:s})=>$e(`${e}-${s}-${t}-${n}-${r}`),Mu=e=>{let t;const{uuid:n,...r}=e,s=sa.getByUid(n);return t=s.script&&s.cond?Qr.getTranslation(s.script,"name"):Qr.getMessage("This_script_was_deleted"),{uuid:n,scriptName:t,...r}},Iu=e=>{const t=Object.values(Su).sort(((e,t)=>e.createdAt-t.createdAt)),n={};for(const r of t){ const{tabId:t,groupId:s}=r;n[s]||void 0!==e&&t!==e||(n[s]=Mu(r))}return Object.values(n)},Uu=e=>{var t;const{tabId:n,name:r,title:s,uuid:i,accessKey:o,autoClose:a,menuId:c,exec:l}=e,u=(null===(t=Su[c])||void 0===t?void 0:t.createdAt)||Date.now();Su[c]={tabId:n,createdAt:u,name:r,title:s,uuid:i,accessKey:o,autoClose:a,menuId:c,groupId:Cu(n,e),exec:l}},Gu=async(e,t)=>{let{frameId:n,url:r,tab:s}=t;const i=sa.getByUid(e);if(!i||!i.script)return void console.log("ctxm: unable to find script "+e) ;if(!s)return void console.log("ctxm: no tab found",t);const o=i.script;if(o.deleted)return;const a=await tu.bundle(o),c=y(),l={};let u;void 0!==n?n=l.frameId=n:r?r=Qn(r):u=!0;const d={method:"executeScript",url:r,frameId:n,topframe:u,info:Up({contexters:[],runners:[a]},r,s)};return mt.sendMessage(s.id,d,l,c.resolve),c.promise()},Zu=e=>Iu(e),Tu=(e,t,n)=>{const r=Object.values(Su).filter((t=>t.groupId==e));for(const s of r)s.exec?(Gu(s.uuid,t),delete Su[s.menuId],Eu.emit("run",{menuId:s.menuId, target:t})):n?Eu.emit("run",{menuId:s.menuId,event:n,target:t}):console.warn(`mc: invalid event arg for ${e}`);r.length||console.warn(`mc: unable to find menu command group ${e}`)},Bu="root",Ou=["http://*/*","https://*/*","file://*/*"];let ju,Du,Fu,Lu={},Pu={};const Nu=(e,t)=>{const n=e.id;if(Lu[n]){const t=e;delete t.id,qu.update(n,t)}else qu.create(e);Pu[n]=!0,se(t,1)},Vu=()=>{const e=y();return qu.removeAll((()=>{ju=void 0,Lu={},e.resolve()})),e.promise()},zu=(e,t)=>y.Pledge().then((()=>{ const n=y();return Nu({id:e,parentId:Bu,contexts:["all"],title:`🛠️ ${t}`,type:"normal",documentUrlPatterns:Ou},(()=>n.resolve())),n.promise()}));let qu;const Hu=e=>{if(!_.late)return _.registerLateCallback((()=>{Hu(e)})),!0;let{groupId:t,frameId:n,tab:r,url:s}=e;Tu(t,{url:s,tab:r,frameId:n},{keyCode:void 0,button:0,shiftKey:!1,metaKey:!1,altKey:!1,ctrlKey:!1})},Qu=({commands:e})=>{if(Du){Fu&&Fu.deferred.reject();const t=y();return Fu={commands:e,deferred:t},t.promise()}if(!e.length)return Vu() ;const t=Object.keys(Lu);return Pu={},Du=y.Pledge().then((()=>ju||(()=>{const e=y();return Vu().then((()=>{const t=ju=qu.create({id:Bu,contexts:["all"],title:"Tampermonkey",type:"normal",documentUrlPatterns:Ou},(()=>{e.resolve(t)}))})),e.promise()})())).then((async()=>{if(e.length)for(const t of e)t.exec||await zu(t.uuid,t.scriptName)})).then((()=>(e=>{const t=[];for(const n of e){const e=y();if(n.exec){if(!wn.values.context_menu_scripts)continue;Nu({id:n.groupId,contexts:["all"],parentId:Bu, title:`▶ ${n.scriptName}`,type:"normal",documentUrlPatterns:Ou},(()=>e.resolve()))}else{if(!wn.values.context_menu_commands)continue;let t;try{const e=new RegExp("^"+Ue(n.scriptName)+"[ -:+/]*");t=n.name.replace(e,"")}catch(e){v.warn(e)}const r={id:n.groupId,contexts:["all"],parentId:n.uuid,title:`🔧 ${t||n.name}`,type:"normal",documentUrlPatterns:Ou};Nu(r,(()=>e.resolve()))}t.push(e.promise())}return y.when(t).then((()=>{}))})(e))).always((()=>{const e=Fe(Object.keys(Pu),t,"notinfirst") ;e.length&&Wu(e),Lu=Pu;const n=Fu;Du=Fu=void 0,n&&Qu(n).then(n.deferred.resolve)})),Du},Wu=e=>{if(!qu)return y.Pledge();const t=y();return e.forEach((e=>{qu.remove(e,(()=>{const e=ft.lastError;e&&v.warn(e.message),t.resolve()}))})),t.promise()},Xu={init:()=>!0===Gt.supported?(qu=Gt,qu.onClicked.addListener(((e,t)=>{v.debug(e,t),t&&e.menuItemId&&e.parentMenuItemId&&Hu&&Hu({groupId:e.menuItemId,tab:t,frameId:e.frameId||0,url:e.frameUrl||e.pageUrl})})),Eu.on("run",(e=>{const t=e.target.tab.id ;Xu.update(t)})),bi.on("active",(({tabId:e,windowId:t})=>{wn.values.context_menu_enabled&&mt.getSelected(t,(t=>{t&&t.id==e&&t.url&&Xu.update(e)}))})),bi.on("complete",(({tabId:e})=>{wn.values.context_menu_enabled&&mt.getSelected(null,(t=>{t&&t.id==e&&Xu.update(e)}))})),Vu()):y.Pledge(),clear:()=>Qu({commands:[]}),update:e=>{if(!qu)return y.Pledge();let t=[];return wn.values.context_menu_commands&&(t=Zu(e)),Qu({commands:t})}},Yu=Xu,Ju=an("scripts","update");ki.on("triggered",(async e=>{ const t=(await Ju.get(e))[e];t?sl.doSave({url:t.url,uuid:e,replace:!e,src:t.code,ask:!wn.values.notification_silentScriptUpdate}).done((t=>{if(Ju.delete(e),ki.emit("result",e,t&&t.installed||!1),t&&t.disable_update){const t=sa.getByUid(e,!0).script;t&&(t.options.check_for_updates=!1,sl.doModify(e,t,!1))}})):v.warn(`Triggered update for script ${e} not found!`)})),ki.on("rejected",(e=>{Ju.delete(e)})),wi.on("scriptEvent",(({type:e,script:t})=>{"removed"===e&&Ju.delete(t.uuid)})) ;const Ku=async()=>Object.keys(await Ju.get()),$u=e=>ed(!0,e),ed=(e,t)=>{let n,r;return y.Pledge().then((()=>{const e=()=>{r=void 0;const e=Qr.getMessage("Script_Update"),t=Qr.getMessage("Waiting_for_sync_to_finish")+"...";r=ti(e,t,Rs("tampermonkey"),{timeout:6e4})};if(xu.enabled){const r=y();return wi.once("syncFinished",(()=>r.resolve())),xu.sync(50,!1),t||(n=se(e,500)),r.promise()}})).then((()=>{const s=y();n&&(J(n),n=void 0),r&&r.cancel(),((e,t)=>{let n,r=0,s=0 ;const i=Qr.getMessage("Script_Update"),o=Qr.getMessage("Check_for_userscripts_updates")+"...";!e&&t&&ti(i,o,Rs("tampermonkey"),{timeout:1e4}),ci.all({domain:"status",key:"script_update",class:"information",text:o,timeout:1e4});const a=(e?[e]:sa.getUidList()).map((i=>{let o,a;return Ju.get(i).then((n=>{const c=n[i];if(c&&Date.now()-c.ts=Math.min(Uc.SEVERITY_MAX,wn.values.script_blacklist_severity))return y.Breach();let p,h ;return(p=sl.determineOrigin(o))&&(h=fs[p.token])&&!h.updates(a)?y.Breach():(r++,v.info("update: check for script updates @",i),y.Pledge())})).then((()=>{const e=sl.determineMetaURL(o);if(!e)return y.Pledge(void 0);if("none"==e)return v.debug("update: ignore non-updatable script",o.name),y.Breach();const t=y(),n={method:"GET",retries:Z.RETRIES,timeout:6e4,revalidate:!0,headers:{Accept:"text/x-userscript-meta, */*"},url:e};return Uo.internal(n,{ondone:n=>{let r;var s ;4==n.readyState&&200==n.status&&n.responseText?(s=n.responseText,r=as(s)):v.warn("update: unable to find meta data @ "+e+" req.status = "+n.status),t.resolve(r)}}),t.promise()})).then((e=>e&&e.version&&o.version&&ls(e.version,o.version)!=ls.eNEWER?(v.verbose("update: version of script "+o.name+" has NOT changed."),y.Breach()):(v.verbose("update: version of script "+o.name+" has changed or doesn't exist -> running version check!"),y.Pledge()))).then((()=>{let e;if(a&&(e=zn(a))){ if(e.protocol.match(/(https?|file):/))return qo(a).fail((()=>{v.warn("update: failed",o.name,a)}));v.warn("update: can't download URL",o.name,a)}else v.warn("update: can't parse URL",o.name,a)})).then((e=>{if(e&&((e,t)=>{const n=us(t);if(!n||!n.name||void 0===n.version)return ls.eERROR;let r;if(r=sa.getMetaByUid(e)){if(r.system)return;return n.version==r.version?ls.eEQUAL:ls(n.version,r.version)}return ls.eNEWER})(o.uuid,e)==ls.eNEWER){s++;const t={uuid:i,name:Qr.getTranslation(o,"name"),url:a, code:e,ts:Date.now()};return y.Pledge(t)}return y.Breach()})).then((async t=>{let r;if(Ju.set({[i]:t}),ki.emit("scheduled",i),wn.values.scriptUpdateAutomaticInstall)e&&(r=h.race([new h((t=>ki.once("result",((e,r)=>{n=r?1:0,t(r)}),e))),new h((e=>se((()=>e(!1)),6e4)))])),se((()=>ki.emit("triggered",i)),1);else{ const e=Qr.getMessage("There_is_an_update_for_0name0_avaiable_",t.name)+"\n"+Qr.getMessage("Click_here_to_install_it_"),n=Qr.getMessage("Just_another_service_provided_by_your_friendly_script_updater_")+":";ti(n,e,Rs("tampermonkey"),{timeout:wn.values.scriptUpdateHideNotificationAfter},(e=>{!0===e.clicked?ki.emit("triggered",i):!1===e.clicked&&ki.emit("rejected",i)}))}r&&await r}))}));return r&&ci.all({domain:"status",key:"script_update",class:"information",title:i,text:o,timeout:1e4}), y.sidebyside(a).then((()=>(a.length&&0==s&&(v.debug("No update found"),!e&&t&&ti("Narf!",Qr.getMessage("No_update_found__sry_"),Rs("tampermonkey"),{timeout:1e4}),ci.all({domain:"status",key:"script_update",class:"information",text:Qr.getMessage("No_update_found__sry_"),timeout:1e4})),{found:s,installed:n})))})(t,e).done((e=>{s.resolve(e)})).fail((()=>{s.resolve({found:0,installed:void 0})}));const i=gc();return i.scripts=Date.now(),vc(i),s.promise()}))},td=()=>{wc.on("suc",(()=>{ if(wn.values.scriptUpdateCheckPeriod<=0)return;const e=gc();Date.now()-e.scripts{const e=y();return Bt(15,(t=>{"active"==t?e.reject():(()=>{let t;gt.supported?gt.getAll({},(n=>{n.forEach((e=>{"fullscreen"===e.state&&(t=!0)})),t?e.reject():e.resolve()})):e.resolve()})()})),e.promise()})).done((()=>{ed()}))})),wc.schedule("suc",{periodInMinutes:60,keepExistent:!0}),Ku().then((e=>{for(const t of e){ const{script:e,cond:n}=sa.getByUid(t);e&&n||(v.warn(`update: script ${t} not found! Removing update...`),Ju.delete(t))}}))};ae.trup={check:$u,init:td};const nd={},rd=(e,t)=>{const n=nd[e]=nd[e]||{};return n[t]=n[t]||{}},sd=e=>{const t={};for(const n of Object.keys(nd).map(Number))t[n]=nd[n][e];return t},id=12096e5,od=["contributed","later","hide"];let ad;const cd={init:()=>{let e;ad=nn.getValue(I.STORAGE.BEGGING);const t=Date.now() ;ad?(e=parseInt(nn.getValue(I.STORAGE.LAST_START,"0")))&&t-e>id&&(ad.later={type:"after_pause",ts:t},cd.save()):(ad={first_run:{type:"from_init",ts:t}},cd.save())},save:()=>{ad&&nn.setValue(I.STORAGE.BEGGING,ad)},needed:()=>{const e=Date.now(),t=!ad.first_run||ad.first_run.ts+id{Tr("clicked",e,t+n)},dialog:{shown:e=>{const t=Date.now();ad.dialog={ts:t,extra:e},cd.save(), Tr("dialog")}},button:(()=>{const e={};for(const t of od)e[t]=(e,n)=>{const r=Date.now();ad[t]={ts:r,type:e,extra:n},cd.save(),Tr("button",t)};return e})()},ld=cd,ud={create:(e,t)=>{const n=e||"",r=t||{},s=e=>y.onebyone(e).fail((()=>{v.warn("tree: wait failed!")})).then((e=>e.filter((e=>e)).reduce(((e,t)=>e.concat(t)),[]))),i=(e,t)=>{const n=e.replace(/\.$/,"").split(".");let s=c;for(;n.length;){const i=n.shift();if(void 0===i)throw Error("invalid path segment");const o=s[i] ;if(!o)return v.warn("tree: unable to find",e,r),()=>y.Pledge([]);if("function"==typeof o)return()=>o(r,!t);s=o,n.length||n.unshift("root")}return v.warn("tree: unable to find",e,r),()=>y.Pledge([])},o={root:e=>{const t=y();return mt.getSelected(null,(n=>{n&&n.id>=0?r.tab=n:e&&e.tabId&&(r.tab={id:e.tabId,index:-1,url:"",windowId:-1});const o=s([i("actions.general"),i("actions.scripts"),i("actions.commands"),i("actions.tags")]);t.consume(o)})),t.promise()},general:async()=>{ const e=r.tab,t=e?e.url:null,n=t&&t.length>4&&""==t.substr(0,4).replace(/file|http/,"")?t:"",s=[],i={name:"enabled",id:"enabled",sub_menu_item:!0,pos:"top",items:[],tabId:null==e?void 0:e.id};let o;i.items.push({name:Qr.getMessage("Enabled"),display:wn.values.enabled?void 0:"greyed",title:wn.values.enabled?Qr.getMessage("Enabled"):Qr.getMessage("Disabled"),id:"enabled",button:!0,reload:!0,enabler:!0}),s.push(i),!t||!Vo(t,!0)||(o=Vo(t))&&"manual"!=wn.values.scriptUrlDetection||i.items.push({ name:Qr.getMessage(o?"Install_this_script":"Try_to_install_as_script"),image:"script_download",id:"installFromUrl",data:{url:t},button:!0,reload:!0});const a={name:"about",id:"about",sub_menu_item:!0,pos:"bottom",items:[]};a.items.push({name:Qr.getMessage("Dashboard"),image:"utilities",url:ht.getURL("options.html")+"#"+["url="+We(n),"nav=dashboard"].join("&"),url_alt:(null==e?void 0:e.url)?ht.getURL("options.html")+"#"+["filter="+ee(e.url),"url="+We(n),"nav=dashboard"].join("&"):void 0,newtab:!0 });const c="version="+ht.manifest.version+"&ext="+ft.short_id,l=[{name:" "+Qr.getMessage("Help"),url:"https://www.tampermonkey.net/faq.php?"+c,newtab:!0},{name:" "+Qr.getMessage("Changelog"),url:"https://www.tampermonkey.net/changelog.php?"+c,newtab:!0},{social:!0,newtab:!0}];return null===await Sc(_c)&&l.push({button:!0,id:"reset_persistent_hint",image:"mobile",reload:!0,data:{key:_c},title:Qr.getMessage("Tampermonkey_is_available_on_mobile_platforms")}),a.items.push({image:"about",id:"about", urls:l}),s.push(a),s},scripts:{root:async e=>{const t=r.tab,n=t?t.url:null,s=[],i=n?zn(n):null,o=i&&["http:","https:","file:"].includes(i.protocol)?Qn(i):"",a={name:"scripts",id:"scripts",sub_menu_item:!0,pos:"center",items:[]},c={},l={},u={},d={},A={},p=i?T.INTERNAL_PAGE_PROTOCOLS.includes(i.protocol):null,h=await Ku();let f,m;if(t){const e=ch(t,r.sender);Object.keys(e).forEach((t=>{const n=e[t];d[t]=n,A[t]="z"+n.name.toLowerCase()+n.position}));const n=ah(t);Object.keys(n).forEach((e=>{ const t=n[e];c[e]=t.urls,l[e]=t.count,u[e]=t.all_time;let r=d[e];if(!r){const t=sa.getByUid(e);t.script&&t.cond&&!t.script.deleted?d[e]=r=t.script:d[e]=r={...As(),uuid:e,name:Qr.getMessage("This_script_was_deleted"),enabled:!0,deleted:Date.now(),textContent:"",resources:[],requires:[]}}A[e]="a"+r.name.toLowerCase()+r.position})),f=Ah(t.id)} m="position"==wn.values.action_menu_scripts_sort?(e,t)=>e.position-t.position:"name"==wn.values.action_menu_scripts_sort?(e,t)=>e.name.toLowerCase()t.name.toLowerCase()?1:0:"enabled"==wn.values.action_menu_scripts_sort?(e,t)=>1e4*(e.enabled?0:1)+e.position-(1e4*(t.enabled?0:1)+t.position):(e,t)=>A[e.uuid].localeCompare(A[t.uuid]);const g=Object.values(d).sort(m);let v=el(g,{active_urls:c,active_counts:l,all_time_active_counts:u});const w=t?(e=>{ const t={},n=null==e||null==e?Iu():Zu(e);for(const e of n){const{name:n,title:r,uuid:s,accessKey:i,autoClose:o,groupId:a,exec:c}=e,l={name:n,title:r,uuid:s,id:a,accessKey:i,autoClose:!1!==o,image:c?"ctx_exec":"menu_cmd",menucmd:!0};(t[e.uuid]=t[e.uuid]||[]).push(l)}return t})(t.id):{};let b;if(wn.values.action_menu_scripts_hide_disabled&&(v=v.filter((e=>e.enabled||l[e.uuid]))),v.forEach((e=>{const t=w[e.uuid];t&&(e.menu_cmds=t),e.updatable=h.includes(e.uuid)})), !wn.values.action_menu_scripts_hide_disabled&&Math.min(wn.values.action_menu_columns,(e?e.available_columns:null)||99)>2?(b={name:"scripts_right",id:"scripts_right",sub_menu_item:!0,pos:"right",items:[]},v.forEach((e=>{e.enabled||l[e.uuid]?a.items.push(e):b.items.push(e)})),s.push(a),b.items.length&&s.push(b)):(b=a,a.items=a.items.concat(v),s.push(a)),wn.values.enabled){const e=!!v.length,t=!f&&n&&!Gl.isAllowed(n);p?e||a.items.push({name:Qr.getMessage("Tampermonkey_has_no_access_to_this_page"), image:"no_script",class:"disabled"}):(t&&a.items.unshift({name:Qr.getMessage("Partially_restricted_by_settings"),image:"critical",class:"disabled",title:Qr.getMessage("Some_URLs_are_restricted_by_a_setting_")}),e||f||t?e||a.items.push({name:Qr.getMessage("No_script_is_running"),image:"no_script",class:"disabled"}):a.items.push({name:Qr.getMessage("Tampermonkey_has_no_access_to_this_page"),image:"no_script",class:"disabled"}))}const _=Qr.getLocale();if(wn.values.enabled){let e;v.length?(e={ name:"scripts_new",id:"scripts_new",sub_menu_item:!0,pos:"center",items:[]},s.push(e)):e=a;const t=!!wn.values.userscript_search_url,n=wn.values.userscript_search_mode;t&&o&&"click"==n?e.items.push({name:Qr.getMessage("Search_for_userscripts_for_this_tab"),image:"script_search",data:{url:o},id:"script_search",button:!0}):t&&o&&["action_menu","badge"].includes(n)?e.items.push({name:Qr.getMessage("Searching_for_userscripts_for_this_tab"),image:"script_search",data:{url:o},id:"script_search", class:"disabled",partial:!0,referrer:"actions.script_search"}):e.items.push({name:Qr.getMessage("Get_new_scripts___"),image:"script_search",url:"https://www.tampermonkey.net/scripts.php"+(_?"?locale="+_:""),newtab:!0}),e.items.push({name:Qr.getMessage("Add_new_script___"),image:"script_add",url:ht.getURL("options.html")+"#nav=new-user-script"+(p?"":"&url="+We(o)),newtab:!0})}return y.Pledge(s)}},script_search:{root:async e=>{let t;const n=null==e?void 0:e.url;let r,s;return t=n?await Ll(n):{ count:0},t.error||!t.url?(r=Qr.getMessage("Search_for_userscripts_for_this_tab"),s={url:n}):(r=t.count?Qr.getMessage("Found_0count0_available_scripts",t.count):Qr.getMessage("No_available_scripts"),s={result_url:t.url}),[{name:r,data:s,button:!0,image:"script_search",id:"script_search"}]}},commands:()=>{const e=[],t={name:"commands",id:"commands",sub_menu_item:!0,pos:"left",items:[]},n={name:Qr.getMessage("Utilities"),id:"commands",sub_menu_item:!0,more_menu:!0,pos:"left",items:[]} ;if(n.items.push({name:Qr.getMessage("Check_for_userscripts_updates"),id:"run_script_updates",button:!0,image:"update"}),wn.values.configMode>=80&&n.items.push({name:Qr.getMessage("Report_a_bug"),image:"bug",url:"https://www.tampermonkey.net/bug",newtab:!0}),wn.values.configMode>=50){let e,t,s,i;["black","black+white"].includes(wn.values.page_filter_mode)&&(e=r.tab)&&(t=e.url)&&(s=zn(t))&&!T.INTERNAL_PAGE_PROTOCOLS.includes(s.protocol)&&(i=s.hostname)&&Gl.isAllowed(t)&&n.items.push({ name:Qr.getMessage("Blacklist_0domain0",i),image:"no",button:!0,id:"blacklist_page",data:{domain:i}})}return t.items.push({name:Qr.getMessage("Please_consider_a_contribution"),image:"contrib",button:!0,id:"contrib"}),t.items.push(n),e.push(t),y.Pledge(e)},tags:()=>{const e=r.tab;if(!e||!wn.values.tags_enabled)return y.Pledge([]);const t={},n={},s=ch(e,r.sender);Object.keys(s).forEach((e=>{n[e]=!0}));const i=ah(e);Object.keys(i).forEach((e=>{n[e]=!0}));const o=wn.values.tags ;for(const e of Object.keys(n)){const n=sa.getByUid(e);if(n.script&&n.cond&&!n.script.deleted)for(const e of n.script.options.tags)o[e]&&(t[e]||(t[e]=[]),t[e].push(n.script.enabled))}const a=Object.keys(t).sort(((e,n)=>t[e].length-t[n].length));if(!a.length)return y.Pledge([]);const c={name:Qr.getMessage("Tags"),id:"tags",sub_menu_item:!0,more_menu:!0,pos:"left",items:[]};for(const e of a){const n=t[e].length,r={id:"tag_"+e,tag:e,data:{x:t[e].filter((e=>e)).length,of:n}};c.items.push(r)} return y.Pledge([c])}},a={root:()=>s([i("options.general"),i("options.scripts"),i("options.settings"),i("options.trash")]),general:function(){return y.Pledge([])},scripts:{root:(e,t)=>{const n=y(),r={name:Qr.getMessage("Installed_userscripts"),main_menu_item:!0,id:"dashboard",items:[]};return((null==e?void 0:e.complete)||!t?s(["options.scripts.userscripts","options.scripts.new"].map((e=>i(e)))):(r.referrer="options.scripts",r.partial=!0,s([i("options.scripts.new")]))).done((e=>{r.items=e, n.resolve([r])})).fail(n.reject),n.promise()},new:()=>{const e=[];return e.push({id:"new-script",name:Qr.getMessage("New_userscript"),image:"script_add",title:Qr.getMessage("Add_new_script___"),icon:ks("unknown"),nnew:!0,uuid:"new-user-script",position:-1,positionof:1e3,enabled:!0,userscript:!0}),y.Pledge(e)},userscripts:{root:async(e,t)=>{const n=(null==e?void 0:e.complete)||!t?void 0:"options.scripts.userscripts",r=sl.determineScriptsToRun({deleted:!1}),s=el(r,{options_page:!0,referrer:n }),i=s.length,o=Qr.getLocale(),a=await Ku();return s.forEach((e=>{"uuid"in e&&(e.updatable=a.includes(e.uuid))})),s.push({id:"no-script-installed",name:Qr.getMessage("No_script_is_installed"),image:"info",class:"disabled",visible:!i}),s.push({id:"get-some-scripts",name:Qr.getMessage("Get_some_scripts___"),image:"edit_add",url:"https://www.tampermonkey.net/scripts.php"+(o?"?locale="+o:""),newtab:!0,visible:!i}),s},matches:e=>{const{filter:t,uuid:n}=e||{};let r;if(!t||!t.code)return y.Pledge([]) ;const s=/\/(.*)\/(.*)/.exec(t.code);if(!s)return y.Pledge([]);const i=new RegExp(s[1],s[2]);if(n){const e=sa.getByUid(n);e.script&&e.cond&&(r=[e.script])}else r=sl.determineScriptsToRun({deleted:!1});if(r){const e=r.map((e=>-1!=e.textContent.search(i)?e.uuid:null)).filter((e=>e));return y.Pledge(e)}return y.Pledge([])},source:e=>{if(!(null==e?void 0:e.uuid))return y.Pledge([]);const t=sa.getByUid(e.uuid);if(t.script&&t.cond){let e ;return e=wn.values.showFixedSrc?zl.mkCompat(t.script.textContent,t.script,"off"!=wn.values.runtime_strict_mode):t.script.textContent,y.Pledge([e])}return v.warn("tree: unable to process ",t),y.Breach()},storage:e=>{if(!(null==e?void 0:e.uuid))return y.Pledge([]);const t=sa.getStorageByUid(e.uuid);return y.Pledge([t?t.data:{}])},external:e=>{const{uuid:t,url:n}=e||{};if(!t)return y.Pledge([]);const r=sa.getByUid(t);if(r.script&&r.cond){let e ;return[...r.script.requires,...r.script.resources].some((r=>{const s=r.url||Vn(r.unsafe_url,r.abs_url);if(!s||s!=n)return;const i=Lc.getElement(t,s);return i&&i.data&&i.data.content?(e=i.data.content,!0):void 0})),y.Pledge([e])}return v.warn("tree: unable to process ",r),y.Breach()}}},trash:(()=>{const e=()=>"off"===wn.values.trash_mode?[]:sl.determineScriptsToRun({deleted:!0});return{root:(t,n)=>{const r=y(),o=Qr.getMessage("Trash_bin"),a={name:o,image:"trash",title:o,main_menu_item:!0, hidden:!e().length,id:"trash",items:[]};return(()=>{if((null==t?void 0:t.complete)||!n){const e=s(["options.trash.userscripts"].map((e=>i(e))));return e}return a.referrer="options.trash",a.partial=!0,y.Pledge([])})().done((e=>{a.items=e,r.resolve([a])})).fail((()=>r.reject())),r.promise()},userscripts:{root:(t,n)=>{const r=(null==t?void 0:t.complete)||!n?void 0:"options.trash.userscripts",s=el(e(),{options_page:!0,referrer:r});return y.Pledge(s)}}}})(),settings:(e,t)=>{const n=y(),r={ name:Qr.getMessage("Settings"),main_menu_item:!0,id:"settings",selected_default:!0,items:[]};return((null==e?void 0:e.complete)||!t?(async()=>{const e=ae.Tests,t={id:"general",name:Qr.getMessage("General"),sub_menu_item:!0,items:[]};t.items.push({name:Qr.getMessage("Config_Mode"),id:"configMode",level:0,option:!0,select:[{name:Qr.getMessage("Novice"),value:0},{name:Qr.getMessage("Beginner"),value:50},{name:Qr.getMessage("Advanced"),value:100}],value:wn.values.configMode, desc:Qr.getMessage("Changes_the_number_of_visible_config_options")}),t.items.push({name:Qr.getMessage("Language"),id:"i18n",level:0,option:!0,reload:!0,warning:Qr.getMessage("A_reload_is_required"),select:[{name:"Browser Default",value:null},...Qr.supported],value:wn.values.i18n,validation:{image:"info",opacity:.9,msg:Qr.getMessage("Your_language_is_not_supported__Click_here_to_get_intructions_how_to_translate_TM_"),url:"https://www.tampermonkey.net/faq.php#Q500"}}),t.items.push({ name:Qr.getMessage("Auto_reload_on_script_enabled"),level:20,id:"autoReload",option:!0,checkbox:!0,enabled:wn.values.autoReload,desc:Qr.getMessage("Auto_reload_on_script_enabled_desc")}),t.items.push({name:Qr.getMessage("Anonymous_statistics"),level:0,id:"statistics_enabled",option:!0,checkbox:!0,enabled:!!wn.values.statistics_enabled,validation:{image:"info",opacity:.9,msg:Qr.getMessage("Allow_Tampermonkey_to_collect_anonymous_statistics"), url:"https://www.tampermonkey.net/privacy.php#extension"}}),t.items.push({name:Qr.getMessage("Debug_scripts"),level:100,id:"debug",option:!0,checkbox:!0,enabled:wn.values.debug,desc:""}),t.items.push({name:Qr.getMessage("Show_fixed_source"),level:100,id:"showFixedSrc",option:!0,checkbox:!0,enabled:wn.values.showFixedSrc,desc:""}),(["heif"].includes(B.short_id)||wn.values.background_control)&&t.items.push({name:"Allow userscripts to control the background context",id:"background_control", level:wn.values.background_control?0:50,option:!0,checkbox:!0,enabled:wn.values.background_control,validation:{image:"critical",msg:"Don't use this option unless you know what you are doing!"}}),t.items.push({name:Qr.getMessage("LogLevel"),id:"logLevel",level:0,option:!0,select:[{name:Qr.getMessage("Debug"),value:80},{name:Qr.getMessage("Info"),value:60},{name:Qr.getMessage("Warning"),value:30},{name:Qr.getMessage("Error"),value:0}],value:wn.values.logLevel,desc:""}),t.items.push({ name:Qr.getMessage("Trash_Mode"),id:"trash_mode",level:50,option:!0,select:[{name:Qr.getMessage("Enabled"),value:"on"},{name:Qr.getMessage("Disabled"),value:"off"},{name:Qr.getMessage("Clean_after_session"),value:"session"}],value:wn.values.trash_mode, desc:Qr.getMessage("Controls_how_deleted_scripts_are_handled__0enabled0_moves_scripts_to_a_virtual_trash__0disabled0_permanently_deletes_scripts__0cleanAfterSession0_automatically_deletes_all_on_session_end_",Qr.getMessage("Enabled"),Qr.getMessage("Disabled"),Qr.getMessage("Clean_after_session"))});const n={id:"script_sync",name:Qr.getMessage("Script_Sync"),sub_menu_item:!0,level:50,need_save:!0,items:[]};n.items.push({name:Qr.getMessage("Enable_Script_Sync"),id:"sync_enabled",enabler:!0, level:50,option:!0,checkbox:!0,enabled:wn.values.sync_enabled,desc:Qr.getMessage("Synchronize_your_scripts_across_browsers_and_operation_systems")});const r=(()=>{const e=[],t={reset_sync:!0,cloud_url:!1,cloud_user:!1,cloud_pass:!1};return xt.sync.supported&&e.push({name:Qr.getMessage("Browser_Sync"),value:ea.eCHROMESYNC,enable:t}),e.push({name:Qr.getMessage("Google_Drive"),value:ea.eGDRIVE,enable:t}),e.push({name:Qr.getMessage("Dropbox"),value:ea.eDROPBOX,enable:t}),e.push({ name:Qr.getMessage("OneDrive"),value:ea.eONEDRIVE,enable:t}),e.push({name:Qr.getMessage("Yandex_Disk"),value:ea.eYANDEX,enable:t}),e.push({name:Qr.getMessage("WebDAV"),value:ea.eWEBDAV,enable:{reset_sync:!0,cloud_url:!0,cloud_user:!0,cloud_pass:!0}}),e})();n.items.push({name:Qr.getMessage("Sync_Type"),id:"sync_type",enabler:!0,level:50,option:!0,select:r,value:wn.values.sync_type}),n.items.push({name:Qr.getMessage("URL"),id:"cloud_url",enabledBy:"sync_type",level:50,option:!0,text:!0,width:2, value:wn.values.cloud_url}),n.items.push({name:Qr.getMessage("Login"),id:"cloud_user",enabledBy:"sync_type",level:50,option:!0,text:!0,width:2,value:wn.values.cloud_user}),n.items.push({name:Qr.getMessage("Password"),id:"cloud_pass",enabledBy:"sync_type",level:50,option:!0,text:!0,password:!0,width:2,value:wn.values.cloud_pass}),n.items.push({name:Qr.getMessage("Sync_Now"),id:"run_sync",enabledBy:"sync_enabled",needsSave:!0,level:50,button:!0}),n.items.push({name:Qr.getMessage("Sync_Reset"), id:"reset_sync",enabledBy:"sync_enabled",needsSave:!0,level:80,button:!0,reload:!0,warning:Qr.getMessage("This_will_remove_all_remote_data_from_sync_Ok_")}),n.items.push({name:Qr.getMessage("Recent_Sync_Log"),status:!0,event:"syncProgressEvent",id:"sync_status"});const s={id:"appearance",name:Qr.getMessage("Appearance"),sub_menu_item:!0,need_save:!0,items:[],warning:Qr.getMessage("A_reload_is_required"),reload:!0};s.items.push({name:Qr.getMessage("Layout"),id:"layout",level:0,option:!0, select:vs.map((e=>{const{name:t,theme:n,layout:r}=e;return{name:t,value:n?[r,n].join("#"):r}})),value:wn.values.layout,desc:""}),s.items.push({name:Qr.getMessage("Custom_CSS"),id:"layout_user_css",level:100,option:!0,input:!0,value:wn.values.layout_user_css,desc:Qr.getMessage("You_can_add_your_custom_CSS_rules_here_")}),s.items.push({name:Qr.getMessage("Update_Notification"),id:"notification_showUpdate",level:50,option:!0,select:[{name:Qr.getMessage("Disabled"),value:"off"},{ name:Qr.getMessage("Show_notification"),value:"notification"},{name:Qr.getMessage("Open_changelog"),value:"changelog"}],value:wn.values.notification_showUpdate,validation:"off"==wn.values.notification_showUpdate?{image:"critical",msg:Qr.getMessage("Are_you_sure_that_you_don_t_want_to_be_notified_of_updates_")}:void 0}),s.items.push({name:Qr.getMessage("Favicon_Service"),id:"favicon_service",level:50,option:!0,select:[{name:Qr.getMessage("Google"),value:"google"},{ name:Qr.getMessage("DuckDuckGo"),value:"duckduckgo"},{name:Qr.getMessage("Native"),value:"native",warning:Qr.getMessage("Warning_unsafe_site_warnings_might_appear_")}],value:wn.values.favicon_service});const i={id:"tags",name:Qr.getMessage("Tags"),sub_menu_item:!0,level:0,items:[],reload:!0};i.items.push({name:Qr.getMessage("Enable_Tags"),id:"tags_enabled",level:0,option:!0,checkbox:!0,enabled:wn.values.tags_enabled,desc:""}),wn.values.tags_enabled&&i.items.push({ name:Qr.getMessage("System_Tags"),id:"tags",level:0,option:!0,input:!0,tags:!0,value:wn.values.tags,desc:""});const o={id:"action_menu",name:Qr.getMessage("Action_Menu"),sub_menu_item:!0,need_save:!0,items:[],level:50};o.items.push({name:Qr.getMessage("Hide_disabled_scripts"),id:"action_menu_scripts_hide_disabled",level:100,option:!0,checkbox:!0,enabled:wn.values.action_menu_scripts_hide_disabled,desc:""}),o.items.push({name:Qr.getMessage("Columns"),id:"action_menu_columns",level:50,option:!0, select:[{name:Qr.getMessage("1"),value:1},{name:Qr.getMessage("2"),value:2},{name:Qr.getMessage("3"),value:3}],value:wn.values.action_menu_columns}),o.items.push({name:Qr.getMessage("Script_order"),id:"action_menu_scripts_sort",level:50,option:!0,select:[{name:Qr.getMessage("Auto"),value:"auto"},{name:Qr.getMessage("Position_"),value:"position"},{name:Qr.getMessage("Name"),value:"name"},{name:Qr.getMessage("Enabled"),value:"enabled"}],value:wn.values.action_menu_scripts_sort}),o.items.push({ name:Qr.getMessage("Icon_badge_info"),id:"appearance_badges",level:50,option:!0,select:[{name:Qr.getMessage("Disabled"),value:"off"},{name:Qr.getMessage("No_text"),value:"active"},{name:Qr.getMessage("Alltime_running_instances"),value:"alltime"},{name:Qr.getMessage("Running_scripts"),value:"running"},{name:Qr.getMessage("Unique_running_scripts"),value:"running_unique"}],value:wn.values.appearance_badges}),o.items.push({name:Qr.getMessage("Icon_badge_color"),id:"appearance_badge_color",option:!0, level:100,color:!0,value:wn.values.appearance_badge_color});const a={id:"context_menu",name:Qr.getMessage("Context_Menu"),sub_menu_item:!0,items:[],level:50};let c;a.items.push({name:Qr.getMessage("Enable_context_menu"),id:"context_menu_enabled",level:50,option:!0,checkbox:!0,enabled:wn.values.context_menu_enabled,desc:""}),a.items.push({name:Qr.getMessage("Scripts_activated_by_context_menu"),id:"context_menu_scripts",level:50,option:!0,checkbox:!0,enabled:wn.values.context_menu_scripts,desc:"" }),a.items.push({name:Qr.getMessage("Script_menu_commands"),id:"context_menu_commands",level:50,option:!0,checkbox:!0,enabled:wn.values.context_menu_commands,desc:""}),wn.values.userscript_search_url&&(c={id:"userscript_search",name:Qr.getMessage("Userscript_Search"),sub_menu_item:!0,level:0,items:[],reload:!0},c.items.push({name:Qr.getMessage("Userscript_search_integration_mode"),id:"userscript_search_mode",level:0,option:!0,select:[{name:Qr.getMessage("Disabled"),value:"off"},{ name:Qr.getMessage("On_Click"),value:"click"},{name:Qr.getMessage("On_Action_Menu"),value:"action_menu"},{name:Qr.getMessage("Add_to_icon_badge_text"),value:"badge"}],value:wn.values.userscript_search_mode,validation:{image:"info",opacity:.9, msg:Qr.getMessage("In_order_to_search_for_userscripts__0on_action_menu0__and__0icon_badge_number0__automatically_transfer_the_tab_s_url_to_the_search_website__0on_click0_opens_the_search_page_on_click_Please_click_at_this_icon_to_open_the_privacy_policy_",Qr.getMessage("Add_to_icon_badge_text"),Qr.getMessage("On_Action_Menu"),Qr.getMessage("On_Click")),url:Nl()}}));const l={id:"editor",name:Qr.getMessage("Editor"),sub_menu_item:!0,level:20,need_save:!0,items:[], warning:Qr.getMessage("A_reload_is_required"),reload:!0};l.items.push({name:Qr.getMessage("Enable_Editor"),id:"editor_enabled",level:100,option:!0,checkbox:!0,enabled:wn.values.editor_enabled,desc:""}),l.items.push({name:Qr.getMessage("Theme"),id:"editor_theme",level:50,option:!0,select:Object.keys(ws).map((e=>({name:ws[e]||e,value:e}))),value:wn.values.editor_theme}),l.items.push({name:Qr.getMessage("Font_Size"),id:"editor_fontSize",level:50,option:!0,select:[{name:"50%",value:50},{name:"70%", value:70},{name:"80%",value:80},{name:"90%",value:90},{name:"100%",value:100},{name:"110%",value:110},{name:"120%",value:120},{name:"150%",value:150}],value:wn.values.editor_fontSize}),l.items.push({name:Qr.getMessage("Key_Mapping"),id:"editor_keyMap",level:50,option:!0,select:[{name:Qr.getMessage("Windows"),value:"windows"},{name:Qr.getMessage("VSCode"),value:"vscode"},{name:Qr.getMessage("Sublime"),value:"sublime"},{name:Qr.getMessage("Emacs"),value:"emacs"},{name:Qr.getMessage("Vim"), value:"vim"}],value:wn.values.editor_keyMap}),l.items.push({name:Qr.getMessage("Indentation_Width"),id:"editor_indentUnit",level:50,option:!0,select:[{name:Qr.getMessage("1"),value:1},{name:Qr.getMessage("2"),value:2},{name:Qr.getMessage("3"),value:3},{name:Qr.getMessage("4"),value:4},{name:Qr.getMessage("5"),value:5},{name:Qr.getMessage("6"),value:6},{name:Qr.getMessage("7"),value:7},{name:Qr.getMessage("8"),value:8},{name:Qr.getMessage("9"),value:9},{name:Qr.getMessage("10"),value:10},{ name:Qr.getMessage("11"),value:11}],value:wn.values.editor_indentUnit,desc:""}),l.items.push({name:Qr.getMessage("Tab_Size"),id:"editor_tabSize",level:50,option:!0,select:[{name:Qr.getMessage("1"),value:1},{name:Qr.getMessage("2"),value:2},{name:Qr.getMessage("3"),value:3},{name:Qr.getMessage("4"),value:4},{name:Qr.getMessage("5"),value:5},{name:Qr.getMessage("6"),value:6},{name:Qr.getMessage("7"),value:7},{name:Qr.getMessage("8"),value:8},{name:Qr.getMessage("9"),value:9},{ name:Qr.getMessage("10"),value:10},{name:Qr.getMessage("11"),value:11}],value:wn.values.editor_tabSize,desc:""}),l.items.push({name:Qr.getMessage("Indent_with"),id:"editor_indentWithTabs",level:50,option:!0,select:[{name:Qr.getMessage("Tabs"),value:"tabs"},{name:Qr.getMessage("Spaces"),value:"spaces"}],value:wn.values.editor_indentWithTabs,desc:""}),l.items.push({name:Qr.getMessage("TabMode"),id:"editor_tabMode",level:50,option:!0,select:[{name:Qr.getMessage("Classic"),value:"classic"},{ name:Qr.getMessage("Smart"),value:"smart"},{name:Qr.getMessage("Indent"),value:"indent"}],value:wn.values.editor_tabMode,desc:""}),l.items.push({name:Qr.getMessage("Highlight_selection_matches"),id:"editor_highlightSelectionMatches",level:50,option:!0,select:[{name:Qr.getMessage("Cursor"),value:"cursor"},{name:Qr.getMessage("On"),value:"on"},{name:Qr.getMessage("Off"),value:"off"}],value:wn.values.editor_highlightSelectionMatches,desc:""}),l.items.push({name:Qr.getMessage("Line_break"), id:"editor_lineWrapping",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_lineWrapping,desc:""}),l.items.push({name:Qr.getMessage("Reindent_on_typing"),id:"editor_electricChars",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_electricChars,desc:""}),l.items.push({name:Qr.getMessage("Enable_autoSave"),id:"editor_autoSave",level:20,option:!0,checkbox:!0,enabled:wn.values.editor_autoSave,desc:""}),l.items.push({name:Qr.getMessage("Enable_easySave"),id:"editor_easySave",level:20, option:!0,checkbox:!0,enabled:wn.values.editor_easySave,desc:""}),l.items.push({name:Qr.getMessage("Highlight_trailing_whitespace"),id:"editor_highlightTrailingWhitespace",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_highlightTrailingWhitespace,desc:""}),l.items.push({name:Qr.getMessage("Trim_trailing_whitespace_from_modified_lines"),id:"editor_trimTrailingSpacesFromModifiedLines",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_trimTrailingSpacesFromModifiedLines,desc:""}), l.items.push({name:Qr.getMessage("Auto_syntax_check_on_typing"),id:"editor_autoLint",level:50,option:!0,checkbox:!0,enabled:wn.values.editor_autoLint,desc:Qr.getMessage("Enable_this_option_to_automatically_check_the_code_on_typing_")}),l.items.push({name:Qr.getMessage("Auto_syntax_check_max_length"),id:"editor_autoLintMaxLen",level:50,option:!0,text:!0,value:wn.values.editor_autoLintMaxLen,desc:Qr.getMessage("Check_only_scripts_up_to_this_size_automatically_")}),l.items.push({ name:Qr.getMessage("Custom_Linter_Config"),id:"editor_linter_config",level:100,option:!0,input:!0,json:!0,value:wn.values.editor_linter_config,validation:{image:"info",opacity:.9,msg:Qr.getMessage("You_can_add_your_custom_linter_config_here_"),url:"https://eslint.org/docs/user-guide/configuring"}});const u={id:"script_update",name:Qr.getMessage("Script_Update"),sub_menu_item:!0,level:0,items:[]};u.items.push({name:Qr.getMessage("Check_interval"),id:"scriptUpdateCheckPeriod",level:0,option:!0, select:[{name:Qr.getMessage("Never"),value:0},{name:Qr.getMessage("Every_6_Hours"),value:216e5},{name:Qr.getMessage("Every_12_Hour"),value:432e5},{name:Qr.getMessage("Every_Day"),value:864e5},{name:Qr.getMessage("Every_Week"),value:6048e5}],value:wn.values.scriptUpdateCheckPeriod,desc:""}),u.items.push({name:Qr.getMessage("Automatic_installation"),id:"scriptUpdateAutomaticInstall",level:0,option:!0,checkbox:!0,enabled:wn.values.scriptUpdateAutomaticInstall,desc:""}),u.items.push({ name:Qr.getMessage("Dont_ask_me_for_simple_script_updates"),id:"notification_silentScriptUpdate",level:80,option:!0,checkbox:!0,enabled:wn.values.notification_silentScriptUpdate,desc:""}),u.items.push({name:Qr.getMessage("Check_disabled_scripts"),id:"scriptUpdateCheckDisabled",level:0,option:!0,checkbox:!0,enabled:wn.values.scriptUpdateCheckDisabled,desc:""}),u.items.push({name:Qr.getMessage("Hide_notification_after"),id:"scriptUpdateHideNotificationAfter",level:50,option:!0,select:[{ name:Qr.getMessage("Never"),value:0},{name:Qr.getMessage("15_Seconds"),value:15e3},{name:Qr.getMessage("30_Seconds"),value:3e4},{name:Qr.getMessage("1_Minute"),value:6e4},{name:Qr.getMessage("5_Minutes"),value:3e5},{name:Qr.getMessage("1_Hour"),value:36e5}],value:wn.values.scriptUpdateHideNotificationAfter,desc:""});const d={id:"externals",name:Qr.getMessage("Externals"),desc:Qr.getMessage("require_and_resource"),sub_menu_item:!0,level:0,items:[]};d.items.push({ name:Qr.getMessage("Update_interval"),id:"external_update_interval",level:0,option:!0,select:[{name:Qr.getMessage("Always"),value:1},{name:Qr.getMessage("Every_Day"),value:864e5},{name:Qr.getMessage("Every_Week"),value:6048e5},{name:Qr.getMessage("Every_Month"),value:2592e6},{name:Qr.getMessage("Never"),value:0}],value:wn.values.external_update_interval,desc:""});const A={id:"security",name:Qr.getMessage("Security"),sub_menu_item:!0,need_save:!0,level:50,items:[]};A.items.push({ name:Qr.getMessage("Content_Script_API"),id:"runtime_content_mode",level:80,option:!0,select:"content"!=wn.values.runtime_content_mode?[{name:Qr.getMessage("UserScripts_API"),value:"userscripts"},{name:Qr.getMessage("UserScripts_API_Dynamic"),value:"userscripts-dynamic"}]:[{name:Qr.getMessage("Content_Script"),value:"content"},{name:Qr.getMessage("UserScripts_API"),value:"userscripts"},{name:Qr.getMessage("UserScripts_API_Dynamic"),value:"userscripts-dynamic"}], value:wn.values.runtime_content_mode}),A.items.push({name:Qr.getMessage("Sandbox_Mode"),id:"sandbox_mode",level:80,option:!0,select:[{name:Qr.getMessage("Default"),value:"default"},{name:Qr.getMessage("All"),value:"raw+"},{name:Qr.getMessage("Force_Raw"),value:"raw"},...["js","-js","js+"].includes(wn.values.sandbox_mode)?[{name:Qr.getMessage("Force_JavaScript"),value:"js"},{name:Qr.getMessage("Raw_and_JavaScript"),value:"-js"},{name:Qr.getMessage("JavaScript_and_DOM"),value:"js+"}]:[],{ name:Qr.getMessage("Force_DOM"),value:"dom"}],value:wn.values.sandbox_mode,desc:Qr.getMessage("Configures_which_sandbox_values_are_valid"),validation:["dom","js+","raw+"].includes(wn.values.sandbox_mode)?{image:"critical",msg:Qr.getMessage("DOM_mode_is_unsecure__Scripts_can_install_new_scripts_")}:void 0});{const e=[{name:Qr.getMessage("Auto"),value:"auto"},{name:Qr.getMessage("Remove__possibly_unsecure_"),value:"remove"},..."yes"==wn.values.webrequest_fixCSP?[{name:Qr.getMessage("Yes"), value:"yes"}]:[],{name:Qr.getMessage("No"),value:"no"}];A.items.push({name:Qr.getMessage("Add_TM_to_CSP"),id:"webrequest_fixCSP",level:80,option:!0,select:e,value:wn.values.webrequest_fixCSP,desc:Qr.getMessage("Tampermonkey_might_not_be_able_to_provide_access_to_the_unsafe_context_when_this_is_disabled")}),A.items.push({name:Qr.getMessage("Allow_headers_to_be_modified_by_scripts"),id:"webrequest_modHeaders",level:80,option:!0,reload:!0,select:[{name:Qr.getMessage("Yes"),value:"yes"},{ name:Qr.getMessage("Auto"),value:"auto"},{name:Qr.getMessage("No"),value:"no"}],value:wn.values.webrequest_modHeaders,warning:Qr.getMessage("Tampermonkey_needs_to_be_restarted_to_make_this_change_apply_Do_you_want_to_continue_"),desc:""})}A.items.push({name:Qr.getMessage("Allow_scripts_to_run_scripts_in"),id:"runtime_run_in",level:80,option:!0,array:!0,select:[{name:Qr.getMessage("All_tabs"),value:[]},{name:Qr.getMessage("Normal_tabs"),value:["normal-tabs"], warning:Qr.getMessage("Tampermonkey_won_t_inject_into_other_tab_types_anymore_")},{name:Qr.getMessage("Incognito_tabs"),value:["incognito-tabs"],warning:Qr.getMessage("Tampermonkey_won_t_inject_into_other_tab_types_anymore_")}],value:wn.values.runtime_run_in}),A.items.push({name:Qr.getMessage("Script_local_files_access"),id:"script_file_access",level:80,option:!0,select:[{name:Qr.getMessage("All_local_files"),value:"all"},{name:Qr.getMessage("require_and_resource"),value:"externals"},{ name:Qr.getMessage("Disabled"),value:"off"}],value:wn.values.script_file_access}),A.items.push({name:Qr.getMessage("Script_cookies_access"),id:"script_cookie_access",level:80,option:!0,select:[{name:Qr.getMessage("All"),value:"all"},{name:Qr.getMessage("All_but_HttpOnly"),value:"!httponly"},{name:Qr.getMessage("Disabled"),value:"off"}],value:wn.values.script_cookie_access}),A.items.push({name:Qr.getMessage("Allow_communication_with_cooperate_pages"),id:"external_connect",level:80,option:!0, reload:!0,select:[{name:Qr.getMessage("Tampermonkey_and_script_version"),value:"all"},{name:Qr.getMessage("Tampermonkey_version"),value:"version"},{name:Qr.getMessage("Disabled"),value:"off"}],value:wn.values.external_connect,desc:Qr.getMessage("This_option_allows_the_Tampermonkey_homepage_and_some_script_hosting_pages_to_determine_the_Tampermonkey_version_and_whether_a_script_is_installed_")}),A.items.push({name:Qr.getMessage("Subresource_Integrity"),id:"require_sri_mode",level:80,option:!0, select:[{name:Qr.getMessage("Disabled"),value:"ignore"},{name:Qr.getMessage("Validate_if_supported"),value:"supported"},{name:Qr.getMessage("Validate_if_given"),value:"given"},{name:Qr.getMessage("Enforce"),value:"enforce"}],value:wn.values.require_sri_mode,desc:Qr.getMessage("Script_authors_can_secure_external_resources_by_adding_a_SRI_hash_to_the_URL_")});let p=[];(wn.values.configMode>=80||["off","casual"].includes(wn.values.connect_mode))&&(p=p.concat([{name:Qr.getMessage("Disabled"), value:"off"},{name:Qr.getMessage("Casual"),value:"casual"}])),p=p.concat([{name:Qr.getMessage("Ask_if_unknown"),value:"ask"},{name:Qr.getMessage("Strict"),value:"strict"},{name:Qr.getMessage("Always_ask"),value:"paranoid"}]),A.items.push({name:Qr.getMessage("Script_Include_Mode"),id:"script_include_mode",level:50,option:!0,select:[{name:Qr.getMessage("Disabled"),value:"off"},{name:Qr.getMessage("Treat_like__match"),value:"match"},{name:Qr.getMessage("Unsafe"),value:"unsafe"},{ name:Qr.getMessage("Default"),value:"default"}],value:wn.values.script_include_mode,desc:Qr.getMessage("Using__include_is_potentially_unsafe_and_may_be_obsolete_soon___0off0_disables__include_completely__0match0__is_safe__but_may_not_compatible_the_script_developers_intention__0unsafe0__mostly_keeps_the_legacy_behavior_0default0__means__0used_default0",Qr.getMessage("Disabled"),Qr.getMessage("Treat_like__match"),Qr.getMessage("Unsafe"),Qr.getMessage("Default"),Qr.getMessage("Unsafe"))}), A.items.push({name:Qr.getMessage("connect_mode"),id:"connect_mode",level:50,option:!0,select:p,value:wn.values.connect_mode,desc:""}),ht.inIncognitoContext||A.items.push({name:Qr.getMessage("Store_data_in_incognito_mode"),id:"incognito_mode",level:50,option:!0,select:[{name:Qr.getMessage("Temporary"),value:"temporary"},{name:Qr.getMessage("Permanent"),value:"permanent"}],value:wn.values.incognito_mode,validation:"temporary"==wn.values.incognito_mode?void 0:{image:"critical", msg:"Permanent mode is still a BETA feature!"}}),A.items.push({name:Qr.getMessage("Page_Filter_Mode"),id:"page_filter_mode",level:50,option:!0,select:[{name:Qr.getMessage("Disabled"),value:"off"},{name:Qr.getMessage("Blacklist"),value:"black"},{name:Qr.getMessage("Whitelist"),value:"white"},{name:Qr.getMessage("Both"),value:"black+white"}],value:wn.values.page_filter_mode,desc:""}),A.items.push({name:Qr.getMessage("Whitelisted_Pages"),id:"page_whitelist",level:50,option:!0,input:!0,array:!0, value:wn.values.page_whitelist,desc:""}),A.items.push({name:Qr.getMessage("Blacklisted_Pages"),id:"forbiddenPages",level:50,option:!0,input:!0,array:!0,value:wn.values.forbiddenPages,desc:""});const h={id:"runtime_host_permissions",name:Qr.getMessage("Runtime_Host_Permissions"),sub_menu_item:!0,level:50,items:[]},f=Object.keys(await Hi.get());h.items.push({name:Qr.getMessage("Requested_Host_Permissions"),id:"missing_host_permissions",level:50,option:!0,permission:!0,array:!0,value:f,desc:""}) ;const m={id:"blackcheck",name:Qr.getMessage("BlackCheck"),sub_menu_item:!0,need_save:!0,level:50,items:[]};let g;m.items.push({name:Qr.getMessage("Script_Blacklist_Source"),id:"script_blacklist_type",level:50,option:!0,select:[{name:Qr.getMessage("Disabled"),value:"off"},{name:Qr.getMessage("Server_And_Manual"),value:"server"},{name:Qr.getMessage("Only_Manual"),value:"only_manual"}],value:wn.values.script_blacklist_type}),m.items.push({name:Qr.getMessage("Blacklist_Severity"), id:"script_blacklist_severity",level:50,option:!0,select:[{name:Qr.getMessage("severity_1"),value:1},{name:Qr.getMessage("severity_2"),value:2},{name:Qr.getMessage("severity_3"),value:3},{name:Qr.getMessage("severity_4"),value:4},{name:Qr.getMessage("severity_5"),value:5},{name:Qr.getMessage("severity_6"),value:6},{name:Qr.getMessage("severity_7"),value:7},{name:Qr.getMessage("severity_8"),value:8},{name:Qr.getMessage("severity_9"),value:9},{name:Qr.getMessage("severity_10"), value:Uc.SEVERITY_MAX}],value:wn.values.script_blacklist_severity}),m.items.push({name:Qr.getMessage("Manual_Script_Blacklist"),id:"require_blacklist",level:50,option:!0,input:!0,array:!0,value:wn.values.require_blacklist,desc:""});{const e=["exe","sh","crx","com","bat","scr"].map((e=>"name."+e)).some((e=>Qa.is_whitelisted(e)));g={id:"downloads",name:Qr.getMessage("Downloads")+" BETA",sub_menu_item:!0,need_save:!0,level:50,items:[]},g.items.push({name:Qr.getMessage("Download_Mode"), id:"downloads_mode",level:50,option:!0,select:[{name:Qr.getMessage("Default"),value:Qa.staticVars.DEFAULT},{name:Qr.getMessage("Disabled"),value:Qa.staticVars.OFF},{name:Qr.getMessage("Native"),value:Qa.staticVars.NATIVE},{name:Qr.getMessage("Browser_API"),value:Et.supported?Qa.staticVars.CHROME:null}].filter((e=>e.value)),value:wn.values.downloads_mode,desc:Qr.getMessage("The_Browser_API_mode_requires_a_special_permission_")}),g.items.push({name:Qr.getMessage("Whitelisted_File_Extensions"), id:"downloads_extension_whitelist",level:50,option:!0,input:!0,array:!0,value:wn.values.downloads_extension_whitelist,desc:Qr.getMessage("Only_files_with_these_extensions_can_be_saved_to_the_harddisk_Be_careful_to_not_allow_file_extensions_that_represent_executables_at_your_operating_system_"),validation:e?{image:"critical",msg:Qr.getMessage("Your_whitelist_seems_to_include_executable_files_This_means_your_userscripts_may_download_malware_or_spyware_to_your_harddisk_")}:void 0})}const v={ id:"experimental",name:Qr.getMessage("Experimental"),sub_menu_item:!0,level:80,items:[]};v.items.push({name:Qr.getMessage("strict_mode"),id:"runtime_strict_mode",level:80,option:!0,select:[{name:Qr.getMessage("Default"),value:"byscript"},{name:Qr.getMessage("Always"),value:"on"},{name:Qr.getMessage("Disabled"),value:"off"}],value:wn.values.runtime_strict_mode}),v.items.push({name:Qr.getMessage("top_level_await"),id:"runtime_top_level_await",level:80,option:!0,select:[{ name:Qr.getMessage("Default"),value:"default"},{name:Qr.getMessage("Enabled"),value:"on"},{name:Qr.getMessage("Disabled"),value:"off"}],value:wn.values.runtime_top_level_await}),vt.filterResponseData&&v.items.push({name:Qr.getMessage("Add_Tampermonkey_to_the_site_s_content_csp"),id:"webrequest_fixContentCSP",level:80,option:!0,select:[{name:Qr.getMessage("Yes"),value:"yes"},{name:Qr.getMessage("No"),value:"no"}],value:wn.values.webrequest_fixContentCSP, warning:"Warning: enabling this option is may break pages!"});const w={id:"userscripts",name:Qr.getMessage("Userscripts"),sub_menu_item:!0,need_save:!0,level:80,items:[]};w.items.push({name:Qr.getMessage("Script_URL_detection"),id:"scriptUrlDetection",level:80,option:!0,select:[{name:Qr.getMessage("Auto"),value:"auto"},{name:Qr.getMessage("Legacy"),value:"legacy"},{name:Qr.getMessage("Disabled"),value:"manual"}],value:wn.values.scriptUrlDetection}),w.items.push({ name:Qr.getMessage("New_script_template_"),id:"script_templates",level:80,option:!0,input:!0,array:!0,named:!0,value:wn.values.script_templates});const b={id:"reset",name:Qr.getMessage("Reset_Section"),sub_menu_item:!0,level:50,items:[]};return b.items.push({name:Qr.getMessage("Restart_Tampermonkey"),id:"reset_simple",level:50,button:!0,reload:!0,warning:Qr.getMessage("This_will_restart_Tampermonkey_Ok_")}),b.items.push({name:Qr.getMessage("Factory_Reset"),id:"reset_factory",level:80,button:!0, reload:!0,warning:Qr.getMessage("This_will_remove_all_scripts_and_reset_all_settings_Ok_")}),e&&b.items.push({name:"Install Tests",id:"install_tests",level:80,button:!0,reload:!1,ignore:!0,warning:"This will install a lot of test scripts!"}),[t,s,i,o,a,c,u,d,n,l,A,h,m,g,w,v,b].filter((e=>e))})():(r.referrer="options.settings",y.Pledge([]))).done((e=>{r.items=e,n.resolve([r])})).fail(n.reject),n.promise()}},c={actions:o,options:a};return v.debug("tree: loading",n,r),i(n,!0)()}, level:e=>e.replace(/\.$/,"").split(".").length},dd=ud,Ad={};let pd;const hd=({tabId:e,frameId:t,url:n})=>{const r=Ad[e];r&&r.forEach((r=>{r({tabId:e,frameId:t,url:n})}))},fd={addListener:(e,t)=>{Ad[e]=Ad[e]||[],Ad[e].push(t),!pd&&Object.keys(Ad).length&&(wt.supported&&wt.onUrlUpdated&&wt.onUrlUpdated.addDynamicListener(hd),pd=!0)},removeListener:(e,t)=>{let n;const r=Ad[e];r&&(n=r.indexOf(t))>-1&&r.splice(n,1),0===r.length&&fd.removeListeners(e)},removeListeners:e=>{delete Ad[e]}},md=fd ;var gd=e(462),vd=e.n(gd);const wd=e=>{if(!e||"object"!=typeof e)return!1;if("string"!=typeof e.url)return!1;if("content"in e&&"string"!=typeof e.content)return!1;if("sri"in e){const t=e.sri;if(null===t||"object"!=typeof t)return!1;if("mode"in t&&("string"!=typeof t.mode||!["ignore","supported","given","enforce"].includes(t.mode)))return!1}return!(!("ts"in e)||"number"!=typeof e.ts&&null!==e.ts||"mimetype"in e&&"string"!=typeof e.mimetype||"modified"in e&&"boolean"!=typeof e.modified)},bd=(()=>{ let e,t,n=!1;const r=()=>{const e=y();return t=e,e};return{write:()=>{const t=y();return n=!1,e=new(vd()),t.resolve(e),t.promise()},open:s=>{const i=r();return n=!0,vd().loadAsync(s).then((t=>{e=t,i.resolve(e)}),(e=>{t&&t.reject(e),i.reject(e)})),i.promise()},entries:()=>{const t=r(),n=e.files,s=Object.keys(n).map((e=>{const t=n[e];if(t&&!t.dir)return{filename:t.name}})).filter((e=>e));return t.resolve(s),t.promise()},get:t=>{const n=r(),s=e.file(t.filename) ;return s?s.async("arraybuffer").then((e=>{n.resolve(e)})):n.resolve(),n.promise()},put:(t,n,s)=>{const i=r();try{e.file(t,n,{date:s?new Date(s):void 0}),i.resolve()}catch(e){i.reject(e)}return i.promise()},end:()=>{const t=r();return n?t.reject():e.generateAsync({type:"blob",compression:"DEFLATE",comment:"Created by Tampermonkey"}).then((e=>t.resolve(e)),(e=>t.reject(e))),t.promise()}} })(),_d=":",yd="/",kd="-",Rd="-error-",xd="default-src",Ed="script-src",Sd="style-src",Cd="frame-src",Md="report-uri",Id="frame-ancestors",Ud="reflected-xss",Gd="upgrade-insecure-requests",Zd="child-src",Td="block-all-mixed-content",Bd="sandbox",Od="worker-src",jd="navigate-to",Dd="script-src-elem",Fd="script-src-attr",Ld="style-src-elem",Pd="style-src-attr",Nd=["sha256","sha384","sha512"],Vd=[Rd,xd,Ed,"object-src",Sd,"img-src","media-src",Cd,"font-src","connect-src",Md,Id,Ud,"base-uri","form-action","manifest-src",Gd,Zd,Td,Bd,Od,jd,Dd,Fd,Ld,Pd],zd="'self'",qd="'unsafe-inline'",Hd="'unsafe-eval'",Qd="'unsafe-hashes'",Wd="'none'",Xd="'nonce-",Yd="'report-sample'",Jd="'strict-dynamic'",Kd="'unsafe-allow-redirects'",$d="'wasm-unsafe-eval'",eA="'sha-",tA=[zd,qd,Hd,Qd,Wd,Xd,Yd,Jd,Kd,$d,eA],nA=-1,rA=e=>"http"===e?80:"https"===e?443:nA ;class sA{constructor(e){this.mDirective=e,this.mSrcs=[]}permits(e,t,n,r,s,i){if(!this.equals(e)&&!this.isDefaultDirective())return console.warn(`cspd::permits, aUri: ${Hn(n)}, aDirective: ${e}, this: ${this.toString()}`),!1;if(t)if(e===Ld){if(u(t,this.mSrcs))return!0}else if(e===Dd||e===Od){if(u(t,this.mSrcs))return!0;const e=[];let n=!1;for(let t=0;tn.allows(e,t)))}toString(){let e="";return e+=this.mDirective+" ", e+=this.mSrcs.map((e=>e.toString())).join(" "),e}addSrcs(e){this.mSrcs=[...e]}getSrcs(){return[...this.mSrcs]}isDefaultDirective(){return this.mDirective===xd}equals(e){return this.mDirective===e}getReportURIs(){return this.mDirective!=Md?(console.warn("cspd::getReportURIs: not a report-uri directive!",this.mDirective),[]):this.mSrcs.map((e=>e.toString()))}getDirName(){return this.mDirective}allowsAllInlineBehavior(e){let t=!1;for(const n of this.mSrcs){if(n.isNonce()||n.isHash())return!1 ;if((e===Dd||e===Fd)&&n.isKeyword(Jd))return!1;n.isKeyword(qd)&&(t=!0)}return t}}class iA extends sA{constructor(e,t){super(e),this.mStringSrc=t}allows(e,t){return!1}permits(e,t,n,r,s,i){return!1}equals(e){return this.mStringSrc[0]===e}toString(){return this.mStringSrc.join(" ")}}class oA extends sA{constructor(e){super(e)}permits(e,t,n,r,s,i){return!1}allows(e,t){return!1}toString(){return Gd}addSrcs(e){throw new Error("upgrade-insecure-requests does not hold any srcs")}getDirName(){return Gd}} class aA extends sA{constructor(e){super(e),this.mRestrictWorkers=!1,this.mRestrictScriptElem=!1,this.mRestrictScriptAttr=!1,this.mDirective=e}setRestrictWorkers(){this.mRestrictWorkers=!0}setRestrictScriptElem(){this.mRestrictScriptElem=!0}setRestrictScriptAttr(){this.mRestrictScriptAttr=!0}equals(e){return e===Od?this.mRestrictWorkers:e===Dd?this.mRestrictScriptElem:e===Fd?this.mRestrictScriptAttr:this.mDirective===e}}class cA{permits(e,t,n,r){return!1}allows(e,t){return!1}isReportSample(){ return!1}isKeyword(e){return!1}isHash(){return!1}isNonce(){return!1}}class lA extends cA{constructor(e){if(super(),this.mKeyword=e,e===zd)throw new Error("'self' should have been replaced in the parser")}allows(e,t){return this.mKeyword===e}toString(){return i(this.mKeyword)}isReportSample(){return this.mKeyword==Yd}isKeyword(e){return this.mKeyword==e}}class uA extends cA{constructor(e){super(),this.mPath="",this.mHost=e.toLowerCase(),this.mGeneratedFromSelfKeyword=!1,this.mIsUniqueOrigin=!1, this.mWithinFrameAncstorsDir=!1}permits(e,t,n,r){if(this.mIsUniqueOrigin)return!1;if(!A(this.mScheme,e,n,r,this.mGeneratedFromSelfKeyword))return!1;const i=s(e.hostname);if("*"==this.mHost){if("blob"===e.scheme||"data"===e.scheme||"filesystem"===e.scheme)return!1;if(!this.mScheme)return!0}else if("*"==this.mHost[0]){if("."!=this.mHost[1])throw new Error("Second character needs to be '.' whenever host starts with '*'");const e=this.mHost.substr(1);if(!i.endsWith(e))return!1 }else if(this.mHost!=i)return!1;if(!function(e,t,n){if("*"===t)return!0;let r=n.port;if(!r){if(!e)return!1;const t=rA(e);return t==nA||0==t}if(r===nA&&!t)return!0;if(r===nA){const e=n.scheme;r=rA(e)}const s=r.toString();if(t===s)return!0;let i=t;if(!i){if(!e)throw new Error("need a scheme to query default port");i=rA(e).toString()}return i===s||"80"===i&&"443"===s}(this.mScheme,this.mPort,e))return!1;if(!t&&this.mPath){const t=e.pathname;if(this.mWithinFrameAncstorsDir)return!0;const n=s(t) ;if("/"==this.mPath.substr(-1)){if(!n.startsWith(this.mPath))return!1}else if(this.mPath!=n)return!1}return!0}toString(){let e="";return this.mGeneratedFromSelfKeyword?zd:"*"!==this.mHost||this.mScheme||this.mPort?(e+=this.mScheme,e+="://",e+=this.mHost,this.mPort&&(e+=":"+this.mPort),e+=i(this.mPath),e):this.mHost}setScheme(e){this.mScheme=e.toLowerCase()}setPort(e){this.mPort=`${e}`}appendPath(e){this.mPath+=e}setGeneratedFromSelfKeyword(){this.mGeneratedFromSelfKeyword=!0}setIsUniqueOrigin(){ this.mIsUniqueOrigin=!0}setWithinFrameAncestorsDir(e){this.mWithinFrameAncstorsDir=e}getScheme(){return this.mScheme}getHost(){return this.mHost}getPort(){return`${this.mPort||nA}`}getPath(){return this.mPath}}class dA extends cA{constructor(e){super(),this.mNonce=e}allows(e,t){return e===Xd&&this.mNonce===t}toString(){return`${Xd}${this.mNonce}'`}getNonce(){return this.mNonce}isNonce(){return!0}}class AA extends cA{constructor(e,t){super(),this.mAlgorithm=e.toLowerCase(), this.mHash=t.replace(/-/g,"+").replace(/_/g,"/")}allows(e,t){return!1}toString(){return`'${this.mAlgorithm}-${this.mHash}'`}getAlgorithm(){return this.mAlgorithm}getHash(){return this.mHash}isHash(){return!0}}class pA extends cA{constructor(e){super(),this.mScheme=e.toLowerCase()}permits(e,t,n,r){if(""===this.mScheme)throw new Error("scheme cannot be the empty string");return A(this.mScheme,e,n,r,!1)}toString(){return`${this.mScheme}:`}getScheme(){return this.mScheme}}class hA extends cA{ constructor(e){super(),this.mReportURI=e}toString(){return i(Hn(this.mReportURI))}}class fA{constructor(){this.mDeliveredViaMetaTag=!1,this.mUpgradeInsecDir=null,this.mDirectives=[],this.mReportOnly=!1}setDeliveredViaMetaTagFlag(e){this.mDeliveredViaMetaTag=e}getDeliveredViaMetaTagFlag(){return this.mDeliveredViaMetaTag}matchingOrDefaultDirective(e){let t=null ;for(let n=0;ne.toString())).join("; ")}hasDirective(e,t){for(const n of this.mDirectives)if(t){if(n.getDirName()===e)return!0}else if(n.equals(e))return!0;return!1}addDirective(e){this.mDirectives.push(e)}getDirectives(){return this.mDirectives}setReportOnlyFlag(e){this.mReportOnly=e}getReportOnlyFlag(){ return this.mReportOnly}getDirectiveAsString(e){for(const t of this.mDirectives)if(!t.equals(Rd)&&t.equals(e))return t.toString();return""}getNumDirectives(){return this.mDirectives.length}getReportURIs(){for(const e of this.mDirectives)if(e.equals(Md))return e.getReportURIs();return[]}allowsAllInlineBehavior(e){const t=this.matchingOrDefaultDirective(e);return!t||t.allowsAllInlineBehavior(e)}addNonce(e){let t=null,n=null,r=null;for(let e=0;e!e.allows(Wd)));this.mDirectives[i].addSrcs([s,...e])}else{const e=new sA(Ed);e.addSrcs([s]),this.mDirectives.push(e)}}getNonces(){const e=[];for(const t of this.mDirectives){const n=t.getSrcs();for(const t of n)t.isNonce()&&e.push(t.getNonce())}return e}getAllowsEval(){ return!(!this.allows(Ed,Hd)&&!this.getReportOnlyFlag())}getAllowsInline(e,t,n,r,s,i,o,a,c){if(![Dd,Fd,Ld,Pd].includes(e))return console.warn("csppo: can only allow inline for (script/style)-src-(attr/elem)"),!0;let l="";if(this.allowsAllInlineBehavior(e))return!0;if(this.allows(e,Xd,n))return!0;""===l&&s&&(l=s.innerText),""===l&&(l=o);const u=this.allows(e,Qd);if((!t||u)&&this.allows(e,eA,l))return!0;let d=!1;return[Dd,Fd].includes(e)&&this.allows(e,Jd)&&(d=!r),!(!d&&!this.getReportOnlyFlag())}} class mA{constructor(e,t,n){this.mCurCharPos=0,this.mEndCharPos=0,this.mCurValue="",this.mValue="",this.mHasHashOrNonce=!1,this.mHasAnyUnsafeEval=!1,this.mStrictDynamic=!1,this.mUnsafeInlineKeywordSrc=void 0,this.mWorkerSrc=void 0,this.mScriptSrc=void 0,this.mParsingFrameAncestorsDir=!1,this.mTokens=e,this.mCurDir=[],this.mCurToken="",this.mSelfURI=t,this.mPolicy=void 0,this.mDeliveredViaMetaTag=n}get mCurChar(){return this.mValue[this.mCurCharPos]}atEnd(){ return this.mCurCharPos>=this.mEndCharPos}accept(e){return!this.atEnd()&&("string"==typeof e?this.mCurChar===e:e(this.mCurChar))&&this.advance()}peek(e){return!this.atEnd()&&("string"==typeof e?this.mCurChar===e:e(this.mCurChar))}advance(){return!this.atEnd()&&(this.mCurValue+=this.mCurChar,this.mCurCharPos++,!0)}resetCurValue(){this.mCurValue=""}resetCurChar(e){this.mValue=e,this.mCurCharPos=0,this.mEndCharPos=e.length,this.resetCurValue()}atEndOfPath(){ return this.atEnd()||this.peek("?")||this.peek("#")}atValidUnreservedChar(){return this.peek(o)||this.peek(a)||this.peek(kd)||this.peek(".")||this.peek("_")||this.peek("~")}schemeChar(){return!this.atEnd()&&(this.accept(o)||this.accept(a)||this.accept("+")||this.accept(kd)||this.accept("."))}directiveName(){const e=function(e){const t=e.toLowerCase();for(let e=1;e512)return!1}return n=s(this.mCurValue),e.appendPath(n),this.resetCurValue(),!0}path(e){return this.resetCurValue(),this.accept(yd)?this.atEndOfPath()?(e.appendPath("/"), !0):this.peek(yd)?(console.warn("Couldn't parse invalid source:",this.mCurToken),!1):this.subPath(e):(console.warn("Couldn't parse invalid source:",this.mCurToken),!1)}subHost(){let e=0;for(;!this.atEndOfPath()&&!this.peek(_d)&&!this.peek(yd);){for(e++;this.hostChar();)e++;if(this.accept(".")&&!this.hostChar())return!1;if(e>512)return!1}return!0}host(){if(this.accept("*")){if(this.atEnd()||this.peek(":"))return new uA(this.mCurValue) ;if(!this.accept("."))return console.warn("cspp: couldntParseInvalidHost",this.mCurToken),null}if(!this.hostChar())return console.warn("cspp: couldntParseInvalidHost",this.mCurToken),null;if(!this.subHost())return console.warn("cspp: couldntParseInvalidHost",this.mCurToken),null;if(function(e){const t=e.toLowerCase();for(const e of tA){const n=e.toLowerCase();if(t===n.substring(1,n.length-1))return!0}return!1}(this.mCurValue)){const e=this.mCurValue.toLowerCase() ;console.warn("cspp: hostNameMightBeKeyword",this.mCurToken,e)}return new uA(this.mCurValue)}keywordSource(){return r(this.mCurToken,zd)?function(e){const t=e.hostname,n=new uA(t);n.setGeneratedFromSelfKeyword();const r=e.scheme;if(n.setScheme(r),""===t)return n.setIsUniqueOrigin(),n;const s=e.port||nA;return s>0&&n.setPort(s),n }(this.mSelfURI):r(this.mCurToken,Yd)?new lA(this.mCurToken):r(this.mCurToken,Jd)?this.mCurDir[0]!==Ed&&this.mCurDir[0]!==Dd&&this.mCurDir[0]!==Fd&&this.mCurDir[0]!==xd?(console.warn("cspp: ignoringStrictDynamic",this.mCurToken),null):(this.mStrictDynamic=!0,new lA(this.mCurToken)):r(this.mCurToken,qd)?this.mUnsafeInlineKeywordSrc?(console.warn("cspp: ignoringDuplicateSrc",this.mCurToken),null):(this.mUnsafeInlineKeywordSrc=new lA(this.mCurToken), this.mUnsafeInlineKeywordSrc):r(this.mCurToken,Hd)||mA.sSecurityCspWasmUnsafeEvalEnabled&&r(this.mCurToken,$d)?(this.mHasAnyUnsafeEval=!0,new lA(this.mCurToken)):mA.sSecurityCspUnsafeHashesEnabled&&r(this.mCurToken,Qd)?new lA(this.mCurToken):r(this.mCurToken,Kd)?d(this.mCurDir[0],jd)?new lA(this.mCurToken):(console.warn("cspp: IgnoringSourceWithinDirective",this.mCurToken),null):null}nonceSource(){if(!this.mCurToken.startsWith("'nonce-")||"'"!==this.mCurToken[this.mCurToken.length-1])return null ;const e=this.mCurToken.substring(1,this.mCurToken.length-1),t=e.indexOf("-");return t<0?null:l(e.substring(t+1))?(this.mHasHashOrNonce=!0,new dA(e.substring(t+1))):null}hashSource(){if("'"!==this.mCurToken[0]||"'"!==this.mCurToken[this.mCurToken.length-1])return null;const e=this.mCurToken.substring(1,this.mCurToken.length-1),t=e.indexOf("-");if(t<0)return null;if(!l(e.substring(t+1)))return null;const n=e.substring(0,t).toLowerCase(),r=e.substring(t+1) ;for(const e of Nd)if(n===e)return this.mHasHashOrNonce=!0,new AA(n,r);return null}hostSource(){const e=this.host();if(!e)return null;if(this.peek(":")){if(!this.port())return null;e.setPort(this.mCurValue)}return this.atEndOfPath()||this.path(e)?e:null}schemeSource(){if(!this.accept(o))return null;for(;this.schemeChar(););const e=this.mCurValue;return this.accept(_d)?this.peek(a)||this.peek("*")?null:new pA(e):null}sourceExpression(){const e=this.keywordSource();if(e)return e ;const t=this.nonceSource();if(t)return t;const n=this.hashSource();if(n)return n;if("*"===this.mCurToken)return new uA("*");this.resetCurChar(this.mCurToken);let r="";const s=this.schemeSource();if(s){if(this.atEnd())return s;if(r=s.toString(),r=r.replace(":",""),!this.accept(yd)||!this.accept(yd))return console.warn("cspp: failedToParseUnrecognizedSource",this.mCurToken),null}this.resetCurValue(),r||(this.resetCurChar(this.mCurToken),r=this.mSelfURI.scheme);const i=this.hostSource() ;return i?(i.setScheme(r),i.setWithinFrameAncestorsDir(this.mParsingFrameAncestorsDir),i):null}sourceList(){let e=!1;const t=[];for(let n=1;n1&&console.warn("cspp: ignoreSrcForDirective - block-all-mixed-content",e.getDirName(),this.mCurDir));if(e.equals(Gd))return void(this.mCurDir.length>1&&console.warn("cspp: ignoreSrcForDirective - upgrade-insecure-requests",e.getDirName(),this.mCurDir));if(d(this.mCurDir[0],Bd))return;this.mHasHashOrNonce=!1,this.mStrictDynamic=!1,this.mHasAnyUnsafeEval=!1,this.mUnsafeInlineKeywordSrc=void 0;const t=this.directiveValue();if(0==t.length){ const e=new lA(Wd);t.push(e)}if(this.mStrictDynamic&&!e.equals(xd)){for(const e of t){const t=e.toString();e.isKeyword(Jd)||e.isKeyword(Hd)||e.isKeyword($d)||e.isKeyword(Qd)||e.isNonce()||e.isHash()||console.warn("cspp: ignoringScriptSrcForStrictDynamic",t)}this.mHasHashOrNonce||console.warn("cspp: strictDynamicButNoHashOrNonce",this.mCurDir)} this.mHasHashOrNonce&&this.mUnsafeInlineKeywordSrc&&(e.isDefaultDirective()||e.equals(Ed)||e.equals(Dd)||e.equals(Fd)||e.equals(Sd)||e.equals(Ld)||e.equals(Pd))&&console.warn("cspp: ignoringSrcWithinNonceOrHashDirective - 'unsafe-inline'",this.mCurDir),this.mHasAnyUnsafeEval&&(e.equals(Dd)||e.equals(Fd))&&console.warn("cspp: ignoringUnsafeEval",this.mCurDir),e.addSrcs(t)}policy(){this.mPolicy=new fA;for(let e=0;e"],runAt:"document_start",allFrames:!0};let vA;const wA=(()=>{const e=new rt(1);let t=!1,n=!1;return{acquire:()=>(t||(t=!0,yi.emit("schedule")),e.acquire().done((()=>{n||(n=!0,yi.emit("start"))}))),release:()=>{e.release(), e.count>0&&(yi.emit("complete"),t=!1,n=!1)}}})();let bA,_A=!1,yA=!1,kA=[];const RA=({type:e,name:t,script:n})=>{v.verbose(`dc: script ${e} event for ${t} (uuid: ${n.uuid})`),EA(n.uuid,!0)},xA=({uuid:e,tabId:t})=>{v.verbose(`dc: storage changed event for uuid: ${e} from tabId: ${t}`),EA(e,!1)},EA=(e,t)=>{bA&&J(bA),kA.includes(e)||kA.push(e),bA=se((()=>{IA({renew:kA}),kA=[]}),t?100:0)},SA="|",CA="userscript-api";let MA;const IA=async e=>{ const{force:t,renew:n}=e||{},r="userscripts"==wn.values.runtime_content_mode,s="userscripts-dynamic"==wn.values.runtime_content_mode;await wA.acquire(),v.verbose("dc: userScriptsLock acquired");try{if(r||s){if(!vA.available()){const e="https://www.tampermonkey.net/faq#Q209";ci.all({domain:"developerMode",key:"developer_mode",class:"information",title:Qr.getMessage("Developer_Mode"),text:Qr.getMessage("Please_enable_the_allow_userscripts_extension_setting_"),info_url:e,timeout:864e5}) ;const t=()=>{const e="userscripts"==wn.values.runtime_content_mode,r="userscripts-dynamic"==wn.values.runtime_content_mode;e||r?vA.available()?(ci.all({domain:"developerMode",key:"developer_mode",deleted:!0}),wc.clear(n),IA()):se(t,3e3):ci.all({domain:"developerMode",key:"developer_mode",deleted:!0})};wc.on("devMode",t);const n=await wc.schedule("devMode",{periodInMinutes:1,keepExistent:!0});se(t,3e3);const r=kt;return void(!MA&&r.supported&&(MA=async(t,n,s)=>{const i=s.url ;if("complete"===n.status&&i){const n=Sp.externally_connectable_reg;"off"!=wn.values.external_connect&&n.rinc&&n.rinc.length&&n.rinc.some((e=>e.test(i)))&&r.executeScript({target:{tabId:t,frameIds:[0]},injectImmediately:!0,world:"MAIN",func:(e,t,n,r)=>{const s=window,i=s.console,o=s.external||{};if(o.Tampermonkey)return;const a={getVersion:n=>{n({id:e,version:t,errors:["devmode"]})},openOptions:()=>{i.warn(n,r)},isInstalled:(e,t,s)=>{let o;i.warn(n,r),"function"==typeof t?s=t:o=t||void 0,s&&s({ name:e,namespace:o,installed:void 0})}};Object.defineProperty(o,"Tampermonkey",{configurable:!0,value:a})},args:[B.short_id,ht.manifest.version,"Please enable developer mode to make this API fully functional.",e]})}},mt.onUpdated.addDynamicListener(MA)))}if(MA&&(mt.onUpdated.removeListener(MA),MA=void 0),!_A){const{dom:e}=Cp(wn.values.sandbox_mode),t=e?"script-src 'self' 'unsafe-inline' 'unsafe-eval' *":"script-src 'self' 'unsafe-inline' *";await vA.configureWorld({csp:t,messaging:!0}),_A=!0} const e=ht.inIncognitoContext,r=`wwywq+${E()}`,i=(e,t)=>`2${SA}${CA}${SA}${e}${SA}${r}${SA}${t||h}`,o=e=>{const[,t,n,s]=e.split(SA);if(t===CA&&s===r)return n},{js:a,runAt:c,matches:l,allFrames:u}=gA,d=[],A=[];let p=(await vA.getScripts()).map((e=>e.id));const h=Math.random().toString(36).substring(2),f=`1${SA}tm-info${SA}${r}`,m=`1${SA}page${SA}${r}`,g=`3${SA}content${SA}${r}${SA}${s?"d":"r"}`;let w,b=`${g}${SA}${h}`;const _={};if(p.map((e=>{const t=o(e);t?_[t]=e:e.startsWith(g)&&(w=e)})), v.verbose("dc: getScripts - registered_ids: ",p),!wn.values.enabled)return await vA.unregister({ids:p}),yA&&(wi.off("scriptEvent",RA),wi.off("scriptStorage",xA),yA=!1),void v.verbose("dc: disabled - unregister all scripts",p);if(t)await vA.unregister({ids:p}),p=[],v.verbose("dc: force - registered_ids: ",p);else if(p.length&&!p.includes(m))v.debug("dc: scripts were modified, re-registering all scripts"),await vA.unregister({ids:p}),p=[], v.verbose("dc: PAGE_ID missing - registered_ids: ",p);else if(n&&n.length){if(!s)throw new Error("renew is only supported in userscripts-dynamic mode");const e=n.map((e=>_[e])).filter((e=>!!e));e.length&&(w&&e.push(w),A.push(...e),p=p.filter((t=>!e.includes(t))),v.verbose("dc: renew && renew.length - registered_ids: ",p," to_unregister_late_ids: ",e))}else w&&(v.verbose("dc: keep current content script: ",w),b=w);if(s){yA||(yA=!0,wi.on("scriptEvent",RA),wi.on("scriptStorage",xA));const t=Up({ runners:[],contexters:[]},"*",{incognito:e}),r="("+(e=>{const t=window;Object.defineProperty(t,"tm_info",{configurable:!0,get:()=>{delete t.tm_info;const n=t.tm_scripts||{},r={},s={};for(const{entry:e,sandbox:t}of Object.values(n))if(e.script){let n=r[t];n||(n=r[t]=[]),n.push(e)}else{let n=s[t];n||(n=s[t]=[]),n.push(e)}for(const e of Object.keys(r))r[e]=(r[e]||[]).sort(((e,t)=>e.script.position-t.script.position));return e.scripts=r,e.contexters=s,e}}) }).toString()+`)(${JSON.stringify(t)});\n`+`//# sourceURL=${ht.getURL("userscript-api-init")}\n`,s={allFrames:u,id:f,js:[{code:r}],matches:l,runAt:c,world:"USER_SCRIPT"};d.push({id:f,fn:async()=>(await vA.register([s]),!0)});const{rinc:o,rexc:a}=Gl.conditions||{},A=e?"incognito-tabs":"normal-tabs";await Promise.all(sl.determineScriptsToRun({deleted:!1,enabled:!0}).map((async e=>{const t=!(!0===e.options.noframes||null===e.options.noframes&&!0===e.options.override.orig_noframes);let r=null ;if((r=wn.values.runtime_run_in)&&r.length&&!r.includes(A)||(r=e.options.run_in||e.options.override.orig_run_in)&&r.length&&!r.includes(A))return;const s=sl.getUrlCondition(e.uuid);if(!s)return void v.warn(`dc: unable to get URL conditions for "${e.name}" (${e.uuid})`);let c,l,u,p;const h=[];let{rinc:f,rexc:m}=Xo(s,!0);if(o&&(f=(f||[]).concat(o)),a&&(m=(m||[]).concat(a)),s.inc&&["unsafe","default"].includes(wn.values.script_include_mode)&&s.inc.some((e=>e.startsWith("/")))?(c=[""], u=s.exc&&s.exc.length?s.exc.filter((e=>!e.startsWith("/"))):void 0,p={warn:!0,inc:null==f?void 0:f.map((e=>Yo(e))),exc:null==m?void 0:m.map((e=>Yo(e)))},h.push(`dc: "${e.name}" (${e.uuid}) is injected ahead of time into every tab due to the use of a RegExp include. The RegExp is then evaluated on each tab.`)):(c=s.match&&s.match.length?s.match.map((e=>(e=>{const{scheme:t,host:n,path:r}=Mn(e),s=[],i=`${n}${r}`;return"http*"===t?(s.push(`http${Cn}${i}`), s.push(`https${Cn}${i}`)):s.push(`${t}${Cn}${i}`),s})(e))).flat():s.inc&&s.inc.length?["http://willneverexist.tmnk.net/"]:void 0,l=s.inc?s.inc.map((e=>{if(-1!==e.indexOf(".tld")){const t=En(e);if(t){let{protocol:n,host:r,path:s}=t;r.endsWith(".tld")&&(r=r.replace(/\.tld$/,".*"),e=`${n}${r}${s||""}`)}else e=e.replace(/\.tld/,".*")}return e.endsWith("*")||(e+="*"),e})):void 0,u=s.exc&&s.exc.length?s.exc.filter((e=>!e.startsWith("/"))):void 0,p={warn:!1,inc:null==f?void 0:f.map((e=>Yo(e))), exc:null==m?void 0:m.map((e=>Yo(e)))}),!c||!c.length)return void v.warn(`dc: unable to get URL matches for "${e.name}" (${e.uuid})`);const{name:g,uuid:w,evilness:b}=e;if(b&&b>=Math.min(Uc.SEVERITY_MAX,wn.values.script_blacklist_severity))return;const y=(n&&n.includes(w)?void 0:_[w])||i(w);d.push({id:y,script:!0,fn:async()=>{const n=[],r=[];sl.isContexter(e)?r.push(e):n.push(await tu.bundle(e));const s={runners:n,contexters:r},{scripts:i,contexters:o}=Ip(s),a="("+((e,t,n,r)=>{ const s=window,i=s.tm_scripts=s.tm_scripts||{},o=e=>!!e.script;for(const a of[e,t]){const e=Object.entries(a);for(const[t,a]of e)if(a)for(const e of a)if(o(e)){const{uuid:o,name:a,position:c}=e.script;if(n){const e=s.location.href.split("#")[0],{inc:t,exc:i,warn:o}=n;if(t&&!t.some((t=>""===e.replace(new RegExp(t.source,t.flags),"")))||i&&i.some((t=>""===e.replace(new RegExp(t.source,t.flags),"")))){ o&&r>=30&&s.console.warn(`"${a}" uses a RegExp include and is injected ahead of time into every tab`,t,i);continue}}i[o]={entry:e,sandbox:t,position:c}}else i[e.uuid]={entry:e,sandbox:t,position:-1}}}).toString()+`)(${JSON.stringify(i)}, ${JSON.stringify(o)}, ${p?JSON.stringify(p):"undefined"}, ${wn.values.logLevel});\n`+`//# sourceURL=${ht.getURL(y)}\n`,d={allFrames:t,id:y,js:[{code:a}],matches:c,includeGlobs:l,excludeGlobs:u,runAt:"document_start",world:"USER_SCRIPT"} ;if(h.length)for(const e of h)v.warn(e);try{return await vA.register([d]),!0}catch(d){return v.error(`dc: can't register "${g}" (${w})`,d),!1}}})})))}else yA&&(wi.off("scriptEvent",RA),wi.off("scriptStorage",xA),yA=!1);const[y,k]=a;let R;if(s){const e=ht.getURL(k.file),t=await oe(e).then((e=>e.text()));R={allFrames:u,id:b,js:[{code:`window.tm_scripts=window.tm_scripts||null;${t}\n//# sourceURL=${e}\n`}],matches:l,runAt:c,world:"USER_SCRIPT"}}else R={allFrames:u,id:b,js:[k],matches:l,runAt:c, world:"USER_SCRIPT"};d.push({id:b,fn:async()=>(await vA.register([R]),!0)});const x={allFrames:u,id:m,js:[y],matches:l,runAt:c,world:"USER_SCRIPT"};d.push({id:m,fn:async()=>(await vA.register([x]),!0)});const S=d.map((e=>e.id)),C=p.filter((e=>!S.includes(e)));v.verbose("dc: to_unregister_ids: ",C),C.length&&await vA.unregister({ids:C}),v.verbose("dc: to_register: ",S);for(const{id:e,fn:t}of d)if(!p.includes(e)){v.verbose("dc: register id:",e);try{await t()}catch(t){ v.error(`dc: can't register ${e}`,t)}}v.verbose("dc: to_unregister_late: ",A),A.length&&await vA.unregister({ids:A})}}finally{v.verbose("dc: userScriptsLock release"),wA.release()}},UA=async()=>{if(yt.supported){vA=yt;try{await IA()}catch(e){v.error("dc: userscripts API init failed",e)}wn.addChangeListener(["enabled","runtime_content_mode"],(()=>IA())),wn.addChangeListener(["sandbox_mode"],(()=>{_A=!1,IA({force:!0})})), wn.addChangeListener(["runtime_run_in","external_connect","script_include_mode","forbiddenPages","page_whitelist","page_filter_mode"],(()=>{"userscripts-dynamic"===wn.values.runtime_content_mode&&IA({force:!0})}))}},GA=[],ZA=["http://*/*","https://*/*","ftp://*/*","file:///*",...U?["ws://*/*","wss://*/*"]:[]],TA={},BA={},OA=(("TM_"+Pe().substr(0,5)).toLowerCase(), vt.extraHeaderNeeded),jA=(e,t)=>!(t.types&&!t.types.includes(e.type)||"tabId"in t&&e.tabId!==t.tabId||"windowId"in t&&e.windowId!==t.windowId||"incognito"in t&&"incognito"in e&&e.incognito!==t.incognito),DA=[],FA=[],LA=[],PA=[],NA=e=>{const{tabId:t,type:n,url:r}=e;if(_.late){if(LA.length)for(const{f:t,l:n}of LA)jA(e,t)&&n(e);if("main_frame"==n){if(e.documentId)return;if(bi.emit("reset",{tabId:t,early:!0}), t>0&&"POST"!=e.method&&("legacy"==wn.values.scriptUrlDetection||"manual"!=wn.values.scriptUrlDetection&&r.startsWith("file:"))&&Vo(r))return v.verbose("webRequest: user script detected @ "+r+" -> open install page"),void sl.installFromUrl(r,{},{silent_fail:!0}).fail((e=>{v.info("webRequest: user script detected @ "+r+" was invalid",e?e.messages:""),mt.update(t,{url:r+"#bypass=true"},(()=>{}))}))}else{let s,i;const o=Po(e);if(!o)return void v.error("webRequest: unable to determine tab sender",e) ;if("sub_frame"==n&&(hh(t,o)&&bi.emit("unload",{tabId:t,sender:o,url:r}),bi.emit("request",{tabId:t,sender:o,url:r,incognito:e.incognito||!1,cookieStoreId:e.cookieStoreId})),(s=ph(t,o))&&(i=((e,t)=>{let n={};const r=e.url;return Object.keys(t).forEach((e=>{const s=t[e];Object.entries(s.rules).some((([e,t])=>{let i,o,a;if(!(i=t.selector)||!(o=t.action))return;const c=s.id+"/"+e;if((a=$o.get(c))||(a=Xo({inc:i.include,match:i.match,exc:i.exclude}),$o.set(c,a)),Jo(r,a)){ if(o.cancel)return v.log("webRequest: request was canceled by script "+s.uuid,r,t,s),s.callback&&s.callback({type:"cancel",details:{rule:t,url:r}}),n={cancel:!0},!0;if(o.redirect){const{url:e,from:i,to:a}=o.redirect;let c,l;if(e)c=e;else if(i&&a&&(l=r.match(i))){l.shift();let e=a;l.concat(["","",""]).forEach(((t,n)=>{e=e.replace("$"+(n+1),t||"")})),c=e}const u=e=>{v.warn("webRequest: error while request redirect by script "+s.uuid,r,t,s),s.callback&&s.callback({type:"redirect",message:"error", details:{description:e,rule:t,url:r,redirect_url:c}})};if(!c)return void u("unable to determine the redirect URL");c=Qn(c),Gl.isAllowed(c)?sl.scriptWillRun(s.uuid,c)?(v.log("webRequest: request was redirected by script "+s.uuid,r,c,t,s),s.callback&&s.callback({type:"redirect",details:{rule:t,url:r,redirect_url:c}}),n.redirectUrl=c):u("the redirect URL needs to be included by the scripts @include or @match tag"):u("the redirect URL is filtered by the security settings")}}}))})),n})(e,s)))return i }}else _.registerLateCallback((()=>{NA(e)}))},VA=e=>{let t,n=!0;if(y.Pledge().then((()=>{if(!_.late){const e=y();return _.registerLateCallback((()=>e.resolve())),e.promise()}})).then((()=>{if(e.responseHeaders,FA.length)for(const{f:t,l:n}of FA)jA(e,t)&&n(e);"xmlhttprequest"==e.type&&(t=null)})).then((()=>{if(void 0!==t)return;let n,r=e.responseHeaders||[];if(wn.values.webrequest_fixCSP,r.some((e=>{if(!e.name)return;const t=e.name.toLowerCase();return n=n||"location"==t,e.value,n})), n)return v.verbose("webRequest: redirect found, skip script determination",e),void(t=null);const{tabId:s,url:i}=e,o=Po(e);let a;return o?(a="xmlhttprequest"==e.type?Mp(o,i,e):mh(s,o,i,e),y.Pledge().then((()=>{})).then((()=>{})).then((()=>nh(e.tabId,o,{},i))).then((()=>{t=null}))):(v.error("webRequest: unable to determine tab sender",e),void(t=null))})),n=!1,void 0!==t)return t||void 0},zA=e=>{const{type:t,tabId:n,url:r,cookieStoreId:s,requestId:i}=e;if(_.late){ if(DA.length)for(const{f:t,l:n}of DA)jA(e,t)&&n(e);if("xmlhttprequest"==t)delete BA[i],delete TA[i];else{const t=Po(e);if(!t)return void v.warn("webRequest: unable to determine tab sender",e);bi.emit("response",{tabId:n,sender:t,url:r,cookieStoreId:s,incognito:Fo(e)||!1})}}else _.registerLateCallback((()=>{zA(e)}))},qA=e=>{const{type:t,tabId:n,requestId:r}=e;if(PA.length)for(const{f:t,l:n}of PA)jA(e,t)&&n(e);if("xmlhttprequest"==t)delete BA[r],delete TA[r];else if("main_frame"==t){const t=Po({ frameId:0},{topframe:!0});bi.emit("error",{tabId:n,sender:t,url:e.url})}else v.warn("webRequest: unexpected request type",e)},HA=e=>{try{e&&(vt.onBeforeRequest.addListener(NA,{urls:ZA,types:["main_frame","sub_frame","script","xmlhttprequest",...U?["websocket"]:[]]},[...GA]),vt.onHeadersReceived.addListener(VA,{urls:ZA,types:["main_frame","sub_frame","xmlhttprequest"]},[...GA,"responseHeaders",...OA?["extraHeaders"]:[]]),vt.onResponseStarted.addListener(zA,{urls:ZA, types:["main_frame","sub_frame","xmlhttprequest"]},[]),vt.onErrorOccurred.addListener(qA,{urls:ZA,types:["main_frame","xmlhttprequest"]})),vt.handlerBehaviorChanged()}catch(e){v.warn("webRequest: error initializings",e.message)}},QA="https://www.tampermonkey.net/script_installation.php",WA=(e,t)=>{const n=zn(e);if(!n||!n.hash)return;const r=n.hash.substr(5),s=async()=>{if(r.startsWith(QA))return;const e=await np([t]);Promise.race([new Promise((e=>{bi.once("complete",(()=>e()),{tabId:t}) })),F(3e4)]).then((()=>e())),mt.update(t,{url:r},(()=>{B.lastError}))};Vo(r)?(v.verbose("events.commited: user script detected @ "+r+" -> open install page"),sl.installFromUrl(r,{},{silent_fail:!0}).fail((e=>{v.info("events.commited: user script detected @ "+r+" was invalid",e?e.messages:""),s()})).done((()=>{kt.supported&&kt.executeScript({func:()=>history.length>1?history.back():window.close(),target:{tabId:t,frameIds:[0]},injectImmediately:!0,world:"ISOLATED"})}))):s()},XA=new rt(1);let YA,JA ;const KA=async(e,t)=>await JA.updateSessionRules({addRules:e,removeRuleIds:t});let $A;const ep=e=>{const t=[],[n,r]=e?[4,{excludedTabIds:e}]:[3,{}],s={type:"redirect",redirect:{regexSubstitution:QA+"#url=\\0"}};Object.values(fs).map((e=>{for(const i of e.regexps){const o={id:YA++,priority:n,condition:{...r,requestDomains:e.domains,requestMethods:["get"],regexFilter:"^"+i+"(?:$|\\?|\\#)",resourceTypes:["main_frame"]},action:s};t.push(o)}}));const i={id:YA++,priority:n,condition:{...r, excludedRequestDomains:["tampermonkey.net",...($A||($A=Object.values(fs).reduce(((e,t)=>e.concat(t.domains)),[])),$A)],requestMethods:["get"],regexFilter:"^(?:https?|ftp)://[^\\#\\?]+/[^\\#\\?]+\\.(?:user|tamper)\\.js[^/]*$",resourceTypes:["main_frame"]},action:s};return t.push(i),t},tp=async e=>{const t=await JA.getSessionRules();let n,r;e&&(n=t.reduce(((e,t)=>Math.max(e,t.id)),1)+1);const s=[],i=[],o=[];return t.forEach((e=>{ 1===e.priority?r=e:2===e.priority?s.push(e):3===e.priority?i.push(e):4===e.priority&&o.push(e)})),{max_id:n,all:t,csp:r,install_general:i,install_excludes:o}},np=async e=>{await XA.acquire();const t=async e=>{try{const{install_general:t,install_excludes:n}=await tp(!1),r=[...t,...n].map((e=>e.id)),s=ep(e);await KA(s,r)}catch(e){v.error("dNr:",e)}};let n;await t(e);const r=async()=>{void 0!==n&&(J(n),n=void 0,await t(),XA.release())};return n=se(r,3e4),r},rp={},sp=new rt(1);let ip=!1 ;const op=async()=>{await sp.acquire();const e=Math.random().toString(36).substr(2);let t;rp[e]=new Promise((e=>{t=e})),sp.release();const n=()=>{t&&(t(),delete rp[e],t=void 0)};return se(n,6e4),{done:n}},ap=["connect","delete","get","head","options","patch","post","put"];let cp=!1;const lp=async(e,t,n,r,s)=>{let i;const o=new Promise((e=>i=e)),a=t.toLowerCase(),c=(l=a,ap.includes(l)?l:"other");var l;let u;const d=s&&!r;await sp.acquire(),d?(ip=!0, await Promise.all(Object.values(rp))):(u=`${c}-${e}`,await(async e=>{for(;;){const t=rp[e];if(!t)break;await t}})(u),rp[u]=o,sp.release());const A=zn(e),p=YA++;if(n&&"direct"!==n.type&&jt&&jt.supported&&!cp){const e=await qi(Yi.permProxy,Qr.getMessage("Proxy_Permission"),Qr.getMessage("Click_here_to_allow_TM_to_make_use_of_a_proxy"),(e=>v.log("netRequest: permission to use proxy ->",e)));cp=e}if(s){const t=Object.entries(s).map((([e,t])=>({header:e,operation:null===t?"remove":"set", ...null===t?{}:{value:`${t}`}})));if(t.length){const n={urlFilter:d?"*":A?Hn(A,{noprotocol:!0}):e.replace(/^[^:]*:\/\//,""),initiatorDomains:[le],requestMethods:[c],resourceTypes:["xmlhttprequest"]},r={id:p,priority:2,condition:n,action:{type:"modifyHeaders",requestHeaders:t}};try{await JA.updateSessionRules({addRules:[r]})}catch(e){v.error("dNr:",e)}}}let h,f,m,g,w,b;const _=async()=>{if(b)return await b;if(m&&(e=>{const t=FA.findIndex((t=>t.l==e));-1!=t&&FA.splice(t,1)})(m),f&&(e=>{ const t=DA.findIndex((t=>t.l==e));-1!=t&&DA.splice(t,1)})(f),g&&(e=>{const t=LA.findIndex((t=>t.l==e));-1!=t&&LA.splice(t,1)})(g),w&&jt.supported&&jt.onRequest.removeListener(w),s){s=void 0;try{b=JA.updateSessionRules({removeRuleIds:[p]}),await b}catch(e){v.error("dNr:",e)}}ip&&(ip=!1,sp.release()),u&&delete rp[u]};if(A&&A.protocol.startsWith("http")){const t=A?Hn(A):e;let s,i;const o=[];let c,l;h=new Promise((e=>{c=t=>{e(t),c=void 0}}));const u=e=>{const{tabId:t}=e;if(i&&l!==i){l=i ;const n=Po(e);n?wi.emit("onRequestRedirect",{tabId:t,sender:n,url:i}):v.warn("netRequest: unable to determine tab sender",e)}};g=e=>{var n;if(void 0!==s)return;const r=e.initiator||e.originUrl&&(null===(n=zn(e.originUrl))||void 0===n?void 0:n.origin);c&&r==ce&&Wn(e.url)===t&&e.method.toLowerCase()==a&&(s=e.requestId)};const d=e=>{let t=e.responseHeaders||[],n=401===e.statusCode;t=t.map(((t,r)=>{const{name:s,value:a}=t;if(s){const t=s.toLowerCase();if(t.startsWith(bo))return ;if("set-cookie"==t)o.push({name:`${bo}-${r+0}`,value:a});else if("location"==t){if(n=!0,a){const t=Vn(a,{base:e.url,enforce_path:!0});t&&(i=t)}i&&u(e)}}return t})).filter((e=>!!e)),!n&&i&&t.push({name:wo,value:i}),(!n||r)&&(c(o.concat(t)),_())};m=e=>{var n;c&&(e.initiator||e.originUrl&&(null===(n=zn(e.originUrl))||void 0===n?void 0:n.origin))==ce&&(void 0===s?Wn(e.url)===t&&e.method.toLowerCase()==a:e.requestId===s)&&(s=e.requestId,d(e))},f=e=>{var n ;(e.initiator||e.originUrl&&(null===(n=zn(e.originUrl))||void 0===n?void 0:n.origin))==ce&&(void 0===s?Wn(e.url)===t&&e.method.toLowerCase()==a:e.requestId===s)&&(s=e.requestId,c&&d(e),_())},y=g,k={urls:ZA,types:["xmlhttprequest"]},LA.push({f:k,l:y}),((e,t)=>{FA.push({f:t,l:e})})(m,{urls:ZA,types:["xmlhttprequest"]}),((e,t)=>{DA.push({f:t,l:e})})(f,{urls:ZA,types:["xmlhttprequest"]}),n&&jt.supported&&(w=e=>{var r ;return(e.initiator||e.originUrl&&(null===(r=zn(e.originUrl))||void 0===r?void 0:r.origin))==ce&&(void 0===s?Wn(e.url)===t&&e.method.toLowerCase()==a:e.requestId===s)?(s=e.requestId,[n,null]):{type:"direct"}},jt.onRequest.addListener(w,{urls:ZA,types:["xmlhttprequest"]})),await F(1)}var y,k;const R=async()=>{if(!i)return;const e=i;i=void 0,await _(),e()};return se(R,6e4),{done:R,responseHeaders:h}},up=async()=>{const e=await Oi();await XA.acquire();try{const t=void 0===YA ;let{max_id:n,all:r,csp:s,install_general:i,install_excludes:o}=await tp(t);void 0!==n&&(YA=n);const a=[],c=[];e&&(a.push(...r),s=void 0,i=[],o=[]),"remove"===wn.values.webrequest_fixCSP?s||c.push({id:YA++,priority:1,condition:{resourceTypes:["main_frame","sub_frame"]},action:{type:"modifyHeaders",responseHeaders:[{header:"x-content-security-policy",operation:"remove"},{header:"content-security-policy",operation:"remove"}]}}):s&&a.push(s), "auto"==wn.values.scriptUrlDetection?i.length||o.length||c.push(...ep()):(i&&a.push(...i),o&&a.push(...o)),await KA(c,a.map((e=>e.id)))}catch(e){v.error("dNr:",e)}finally{XA.release()}},dp=async()=>{Rt.supported&&(JA=Rt,wn.addChangeListener(["webrequest_fixCSP"],up),wn.addChangeListener(["scriptUrlDetection"],up),await up())},Ap=async()=>{var e;if(!S()){if(null===await Sc(_c))return ;const t=ru(),n=(null==t?void 0:t.platform)||"unknown",r=null===(e=null==t?void 0:t.brands)||void 0===e?void 0:e.find((e=>e.brand.includes("Edge"))),s="macOS"===n;if(r&&s)return;const i=r?"edge":s?"safari":"tampermonkey",o="https://www.tampermonkey.net/qr/"+i[0],a=Qr.getMessage("Scan_the_QR_code_to_use_Tampermonkey_on_your_phone_or_tablet_"),c={key:_c,realm:"actions",class:"notice",title:Qr.getMessage("Tampermonkey_is_available_on_mobile_platforms"),text:a,info_url:o,buttons:[{ text:Qr.getMessage("Learn_more"),url:"https://www.tampermonkey.net/faq#Q406"}],qr:{text:o,img:i,size:66,oversample:4,csize:14,bsize:4,pixelPrecise:!0}};xc(c),ci.actionPage({domain:"status",...c})}},pp=Pe(),hp=e=>"extpage"in e,fp=(()=>{const e={allow:{script:"window.close"},exec:(e,t,n)=>{const r=t&&t.tab?t.tab.id:null;r?mt.query({windowType:"normal"},(e=>{if(e.length<=1){const e="refused to close last tab!";v.warn("mh:",e),n({error:e})}else mt.remove(r,(()=>{const e=ft.lastError;n({ error:e?e.message:void 0})}))})):n({error:"internal error"})}},t={allow:{extpage:!0},exec:(e,t,n)=>{(!hp(t)||"options"!=t.extpage&&"options"!=e.origin?Ho():y.Pledge(t.tab)).then((t=>{let r,s,i;if(e.uuid&&(r=sa.getByUid(e.uuid))&&r.script&&r.cond){let n;s=sl.determineOrigin(r.script),"hoster"==e.to&&s?i=s:(n=r.script.supportURL||(null==s?void 0:s.issue_url)||(null==s?void 0:s.url))&&(i={issue_url:n}),i&&(Ir(r.script.name,"m"),mt.create({url:i.abuse_url||i.issue_url,active:!0,parent:t},(()=>{})))} n({})}))}},n={allow:{extpage:!0},exec:(e,t,n)=>{if("dialog"==e.action)ld.dialog.shown(e.extra);else if("clicked"==e.action){let t,n;e.extra&&(t=e.extra.amount,n=e.extra.currency),ld.clicked(e.type,t||"?",n||"?")}else if(ld.button[e.action]){const t=ld.button[e.action];t&&t(e.type,e.extra)}else v.warn("mh: Warning: unknown request ",e);n({})}},r={allow:{extpage:!0},exec:async(e,t,n)=>{const r=hp(t)&&("options"==t.extpage||"options"==e.origin),s=()=>n({});switch(e.name){case"reset_simple": Xa.reset(s);break;case"reset_factory":Xa.factoryReset(s);break;case"reset_sync":xu.reset().always(s);break;case"run_sync":wi.once("syncFinished",(()=>s())),xu.sync(1,!0);break;case"install_tests":{const e="chrome",t=ae.Tests.framework.prepare(sl,sa,e,E(),"mv3",s);t&&v.error(t);break}case"enabled":{const{name:t}=e;wn.setValue(t,!wn.values[t]).always(s);break}case"installFromUrl":{const{data:{url:t,source:i,transferable:o}}=e;let a;if(o){const e=Us.fromTransferableData(o) ;if(!e)throw new Error("Invalid Transferable");const n=await e.toBlob();if(!n)throw new Error("Invalid Transferable");const r=await nt(n,"utf-8")||"";a=sl.installFromSource(r,{url:t})}else a=i?sl.installFromSource(i,{url:t}):sl.installFromUrl(t);a.done((()=>{r?dd.create("options.scripts").done((e=>{const t={success:!0,items:e,options:wn.snapshot};n(t)})):s()})).fail((()=>s()));break}case"externals_delete":{const{safe_url:t,scriptuid:r}=e;Lc.cleanElement(r,t), dd.create("options.scripts").done((e=>{n({items:e,options:wn.snapshot})})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}));break}case"externals_update":{const{safe_url:t,scriptuid:r}=e,s=sa.getByUid(r);if(!s.script||!s.cond)return void n({error:"script deleted",options:wn.snapshot});const{requires:i,resources:o}=s.script;let a,c,l=!1;i.some((e=>{if(jc(e)===t)return a=e,!0})),a?l=!0:o.some((e=>{if(jc(e)===t)return a=e,!0})),a?(Lc.cleanElement(r,t), c=l?Lc.updateRequire(r,t):Lc.updateResource(r,t),c.then((()=>dd.create("options.scripts"))).done((e=>{n({items:e,options:wn.snapshot})})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}))):n({error:"not found",options:wn.snapshot});break}case"focus_tab":{const{tabid:t}=e;fp.focusTab.exec({},{tab:{id:t,url:"",index:-1,windowId:-1},url:"",frameId:0,id:ht.manifest.id},s);break}case"apply_script_update":{ const{uuid:t}=e,r=h.race([new h((e=>ki.once("result",((n,r)=>t===n&&e(r)),t))),new h((e=>se((()=>e(!1)),6e4)))]);ki.emit("triggered",t);const s=await r?1:0;n({uuid:t,installed:s});break}case"run_script_updates":{const{scriptuid:t}=e;t?$u(t).done((e=>{n({uuid:t,...e})})).fail((()=>{n({uuid:t})})):($u(),s());break}case"blacklist_page":{const{data:t}=e,n=t.domain;if(!n)throw new Error("Blacklisted domain is missing!");const r="/"+In(`*://*.${n}/*`,!0)+"/" ;wn.setValue("forbiddenPages",wn.values.forbiddenPages.concat([r])).always(s);break}case"permissions":{const{data:t}=e,{origins:r,reset:s}=t;if(s||r){let e,t=[];if(s){const n=await Hi.get();t=Object.keys(n),e=!0}else t=r,e=!r.length||await Yi.askOrigin(r,Qr.getMessage("Cross_Origin_Request_Permission"),Qr.getMessage("Click_here_to_allow_TM_to_access_the_following_hosts_0hostlist0",r.join("\n")));e&&t.length&&await Hi.delete(t),dd.create("options.settings").done((t=>{const r={success:e,items:t, options:wn.snapshot};n(r)}))}else n({});break}case"script_search":{const{data:t}=e,{url:n,result_url:r}=t;if(n){const e={url:Pl(n),active:!0};mt.create(e,s)}else{if(!r)throw new Error("Search URL is missing!");{const e={url:r,active:!0};mt.create(e,s)}}break}case"toggle_tagged_scripts":{const{data:t}=e,{tag:r,toggle:i}=t,o=sa.getUidList().map((e=>sa.getByUid(e))).filter((e=>!!(e&&e.script&&e.cond&&e.script.options.tags.includes(r))));y.onebyone(o.map((({script:e})=>()=>{ if(e.enabled!=i)return e.enabled=i,sl.doModify(e.uuid,e,!0)}))).done((()=>{dd.create("actions").done((e=>{const t={items:e,options:wn.snapshot};n(t)})).fail((()=>{const e={items:[],options:wn.snapshot};n(e)}))})).fail((()=>s()));break}case"reset_persistent_hint":{const{data:{key:t}}=e;await(e=>kc.delete(e))(t),await Ap(),s();break}case"contrib":{const e={url:ht.getURL("options.html")+"#contribute",active:!0};mt.create(e,s);break}case"enable_stats":wn.setValue("statistics_enabled",!0).always(s) ;break;case"disable_stats":wn.setValue("statistics_enabled",!1).always(s);break;default:v.warn("mh: Warning: unknown button "+name),s()}}},s={allow:{extpage:!0},exec:async(e,t,n)=>{const{action:r,realm:s,key:i,config:o}=e,a=an(s,i,"cloud"==s?mc:void 0);if("get"==r)n({config:await a.get()});else{if("set"!=r)throw new Error("Invalid action");if(o){if(await a.set(o),"cloud"==s){const e=a,t=await e.get();c=i,hc.includes(c)?fc.emit("credentials",{type:i,credentials:t }):v.warn("mh+miscConfig[cloud]: invalid key")}}else await a.clear()}var c;n({})}},i=async(e,t)=>{if("userscripts-dynamic"==wn.values.runtime_content_mode){const e=new h((e=>{yi.once("complete",(()=>{e()}))}));await h.race([F(5e3),e])}if(e&&wn.values.autoReload){const e=await new h((e=>mt.getSelected(null,(t=>e(t)))));e&&e.id>=0&&(mt.sendMessage(e.id,{method:"reload"},{frameId:0}),await h.race([F(500),new h((t=>{bi.once("complete",(()=>{t()}),{tabId:e.id})}))]))}dd.create("actions").done((e=>{ const n={items:e,i18n:wn.values.i18n,options:{enabled:wn.values.enabled}};t(n)})).fail((()=>{const e={items:[],i18n:wn.values.i18n,options:{enabled:wn.values.enabled}};t(e)}))},o={allow:{extpage:!0},exec:(e,t,n)=>{for(const t of e.uuids)sl.doRemove(t,!0);sl.reorderScripts(),y.onebyone([()=>dd.create("options.scripts"),()=>dd.create("options.trash")]).then((e=>e.filter((e=>e)).reduce(((e,t)=>e.concat(t)),[]))).done((e=>{const t={items:e,options:wn.snapshot};n(t)})).fail((e=>{n({ error:e||"unknown error",options:wn.snapshot})}))}},a={allow:{extpage:!0},exec:(e,t,n)=>{const r=void 0===e.reload||!!e.reload,s=hp(t)&&("options"==t.extpage||"options"==e.origin),o=(t,o)=>{s?o?n({error:o,options:wn.snapshot}):r?y.onebyone([()=>dd.create("options.scripts"),()=>dd.create("options.trash")]).then((e=>e.filter((e=>e)).reduce(((e,t)=>e.concat(t)),[]))).done((e=>{const r={...t,items:e,options:wn.snapshot};n(r)})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot}) })):n({}):i(e.uuid,n)};if(e.clean){const t=e.uuid;if(!t)return void n({error:"uuid missing",options:wn.snapshot});v.debug("mh: clean userscript "+t);const r=sa.getByUid(t),s=e=>{dd.create("options.scripts").done((r=>{const s={cleaned:e.installed,items:r,options:wn.snapshot};n(s),e.installed&&wi.emit("scriptStorage",{uuid:t,storage:sa.getStorageByUid(t).data})})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}))};r.script&&r.cond?sl.doSave({name:e.name,uuid:t, src:r.script.textContent,clean:!0,ask:!1,internal:!0,save:!0}).always((e=>{s(e||{installed:!1})})):(v.error(Qr.getMessage("fatal_error")+" ("+t+")!!!"),s({installed:!1}))}else if(e.code){let t=e.uuid;if(!t)return void n({error:"uuid missing",options:wn.snapshot});let s=e=>n(e);r&&(s=e=>{sl.reorderScripts(),o(e)}),e.new_script&&(t=Pe()),sl.doSave({name:e.name,uuid:t,force_url:e.force_url,src:e.code,ask:!wn.values.editor_easySave,lastModTime:e.lastModTime,save:!0}).always((e=>{s(e||{installed:!1}) }))}else if(e.auto_save)o({});else{const t=e.uuids||(e.uuid?[e.uuid]:[]);let n;for(const r of t){const t=sa.getByUid(r);t.script&&t.cond?t.script.system?n=n||"system script":e.restore?sl.restore(r):sl.doRemove(r,!1):(v.error(Qr.getMessage("fatal_error")+" ("+r+")!!!"),n=n||"uuid missing")}sl.reorderScripts(),o({},n)}}},c={allow:{extpage:!0,script:"values"},exec:(e,t,n)=>{if(t.tab){if(e.uuid){const{uuid:t,id:n,value:r,key:s,removed:i,ts:o}=e;sa.setStorageByUidAndNotify(t,o,n,s,r,i)} }else v.warn("storage: unable to save storage due to empty tabID!");n({})}},l={allow:{extpage:!0},exec:(e,t,n)=>{Gi.onMessage(e.data).always((e=>{const t=wn.values.i18n,r=wn.snapshot;n({i18n:t,options:r,message:e})}))}},u={allow:{script:[]},exec:async(e,t,n)=>{let r,s;try{{const t=s=await ba({justification:"revoke a Object URL",reasons:[to.BLOBS]});await Promise.all(e.urls.map((e=>t.send({action:"objectURL",url:e}))))}}catch(e){return r=e.message||e,void n({error:r})}finally{s&&s.release()}n({ success:!0})}},d={allow:{script:"cookie"},exec:(e,t,n)=>{var r;const s=["expirationDate","domain","httpOnly","secure","path","sameSite","partitionKey","value"],i=[...s,"url"],o=[...s,"name","session","hostOnly"],a=e.location||t.url||void 0;let{url:c,partitionKey:l,name:u}=e.details;c=c?Vn(c,a)||c:a;const d=t.tab?t.tab.cookieStoreId:void 0;let A;if(Ra.fpi&&a&&(A=null===(r=zn(a))||void 0===r?void 0:r.domain),"off"===wn.values.script_cookie_access)n({data:{error:"not supported"} });else if(c)if(Gl.isAllowed(Qn(c)))if(sl.scriptWillRun(e.uuid,c))if("list"==e.action){const t=e.details,r={url:c};t.domain&&(r.domain=t.domain),u&&(r.name=u),t.path&&(r.path=t.path),A&&(r.firstPartyDomain=null),void 0!==l&&(r.partitionKey=l),void 0!==d&&(r.storeId=d),Ra.getAll(r).done((e=>{let t=e.map((e=>{const t=o.reduce(((t,n)=>({...t,...n in e?{[n]:e[n]}:{}})),{});return t}));"!httponly"===wn.values.script_cookie_access&&(t=t.filter((e=>!e.httpOnly))),n({data:{cookies:t}})})) }else if("delete"==e.action){if(!u)return void n({data:{error:"missing name"}});const e={url:c,name:u};A&&(e.firstPartyDomain=A),void 0!==l&&(e.partitionKey=l),void 0!==d&&(e.storeId=d),Ra.remove(e).done((()=>{n({data:{success:!0}})})).fail((e=>{n({data:{error:e}})}))}else if("set"==e.action){let{name:t,value:r,...s}=e.details;t=String(void 0===t?"":t),r=String(void 0===r?"":r);const o={name:t,value:r};void 0!==A&&(o.firstPartyDomain=A),void 0!==d&&(o.storeId=d),i.forEach((e=>{const t=s[e] ;void 0!==t&&(o[e]=t)})),o.url=o.url||c,Ra.set(o).done((()=>n({data:{success:!0}}))).fail((e=>n({data:{error:e}})))}else n({data:{error:"unknown action"}});else n({data:{error:"the URL needs to be included by the scripts @include or @match tag"}});else n({data:{error:"the URL is filtered by the security settings"}});else n({data:{error:"invalid URL"}})}};return{ping:{allow:{insecure:!0},exec:(e,t,n)=>{n({pong:!0,instanceID:pp,config:{layout:wn.values.layout}})}},newTab:{allow:{extpage:!0}, exec:(e,t,n)=>{(!hp(t)||"options"!=t.extpage&&"options"!=e.origin?Ho():y.Pledge(t.tab)).then((r=>{mt.create({url:e.url,parent:r},(r=>{if(!r)return void v.warn("mh: unable to create tab",t,e);const s={tabId:r.id};n(s)}))}))}},tabs:{allow:{script:"tabs"},exec:(e,t,n)=>{"get"==e.action?t.tab&&e.uuid?n({data:rd(t.tab.id,e.uuid)}):(v.warn("mh: unable to process request",t,e),n({data:null})):"list"==e.action?e.uuid?n({data:sd(e.uuid)}):(v.warn("mh: unable to process request",t,e),n({data:null })):"set"==e.action?(t.tab&&e.uuid?((e,t,n)=>{const r=nd[e]=nd[e]||{},s={};n&&(Object.assign(s,n),r[t]=s)})(t.tab.id,e.uuid,e.tab):v.warn("mh: unable to process request",t,e),n({})):n({error:"unknown action"})}},focusTab:{allow:{script:"window.focus"},exec:(e,t,n)=>{const r=t&&t.tab;if(!r)return void n({error:"internal error"});const{id:s,windowId:i}=r;s?mt.update(s,{active:!0},(()=>{const e=ft.lastError;if(e)return n({error:e.message});const t=gt;i&&t.supported?t.get(i,{},(e=>{if(!e)return n({ error:"window closed"});const r="minimized"===e.state?"normal":void 0;t.update(i,{focused:!0,state:r},(()=>{const e=ft.lastError;n({error:e?e.message:void 0})}))})):n({})})):n({error:"internal error"})}},closeTab:e,navigateTab:{allow:{script:[]},exec:(e,t,n)=>{const r=t&&t.tab?t.tab.id:null;if(r){let{url:t,location:s}=e;t=Vn(t||"",s)||t,mt.update(r,{url:t},(()=>{const e=ft.lastError;n({error:e?e.message:void 0})}))}else n({error:"internal error"})}},setOption:{allow:{extpage:!0},exec:(e,t,n)=>{ const r=hp(t)&&("options"==t.extpage||"options"==e.origin);wn.setValue(e.name,e.value).always((()=>{r?dd.create("options.settings").done((e=>{const t={items:e,options:wn.snapshot};n(t)})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})})):n({})}))}},reportAnIssue:t,begEvent:n,buttonPress:r,imageUrlToTransferable:{allow:{extpage:!0},exec:async(e,t,n)=>{const{url:r,fallback:s}=e;let i;r&&(i=await Bs(r,s)),n({transferable:i?await i.toTransferableData():void 0})}},loadTree:{allow:{ extpage:!0},exec:(e,t,n)=>{dd.create(e.referrer,{complete:e.complete,url:e.url,uuid:e.uuid,filter:e.filter,tabId:e.tabId,sender:t}).done((t=>{const r={items:t},s=1==dd.level(e.referrer)?{i18n:wn.values.i18n,options:wn.snapshot,xhr:oo,begging:ld.needed()}:{},i=Object.assign(r,s);n(i)})).fail((e=>{n({error:e||"unknown error",options:wn.snapshot})}))}},miscConfig:s,modifyScriptOptions:{allow:{extpage:!0},exec:(e,t,n)=>{if(!e.uuid)return void n({}) ;const r=hp(t)&&("options"==t.extpage||"options"==e.origin);let s=null==e.reload||1==e.reload,o=!1;const a=sa.getByUid(e.uuid,!0),c=()=>{s?(void 0!==e.position&&sl.reorderScripts(e.uuid,e.position),r?fp.loadTree.exec({referrer:"options.scripts"},t,n):i(e.uuid,n)):n({})};if(a.script&&a.cond)if(e.whitewash&&a.script.evilness==Uc.SEVERITY_FOISTED_SCRIPT)s=!0,a.script&&a.cond?sl.doSave({uuid:e.uuid,src:a.script.textContent,force_settings:{enabled:!0},whitewash:!0,save:!0 }).always(c):(v.error(Qr.getMessage("fatal_error")+" ("+e.uuid+")!!!"),c());else{let t=!1;const r=As(),s=["includes","excludes","matches"],i=["connects","blockers"],l=a.script.options;Object.keys(r.options).forEach((t=>{const n=e[t];void 0!==n&&(l[t]=n,o=o||!0===xu.SYNCED[t])}));const u=l.override;Object.keys(r.options.override).forEach((n=>{if(-1==n.indexOf("merge_"))return;const r=e[n];void 0!==r&&(u[n]=r,t=!0)})),s.forEach((n=>{const r=e[n];void 0!==r&&(t=!0,u["use_"+n]=r)})),i.forEach((t=>{ const n=e[t];void 0!==n&&(u["use_"+t]=n)})),void 0!==e.tags&&(l.tags=e.tags),e.add_excludes&&(l.override.use_excludes=l.override.use_excludes.concat(e.add_excludes),t=!0),t&&(a.script=sl.mergeCludes(a.script)),e.temp_connects&&Yc.setSessionConnects(a.script.uuid,e.temp_connects),void 0!==e.enabled&&(a.script.enabled=e.enabled),o&&(a.script.lastModified=Date.now()),void 0!==e.file_url&&(a.script.downloadURL=e.file_url),sl.doModify(a.script.uuid,a.script,o).done(c).fail((()=>{n({})}))}else n({})} },purgeScripts:o,saveScript:a,saveExternal:{allow:{extpage:!0},exec:(e,t,n)=>{Lc.setElement(e.uuid,e.url,{content:e.code||"",meta:e.mimetype||"text/javascript"},!0),dd.create("options.scripts").done((e=>{const t={success:!0,items:e,options:wn.snapshot};n(t)})).fail((e=>{const t={error:e||"unknown error",options:wn.snapshot};n(t)}))}},saveStorageKey:c,download:{allow:{extpage:!0},exec:(e,t,n)=>{bp.download.exec({postMessage:e=>{(e.error||e.load)&&n(e)},onMessage:()=>null,onDisconnect:()=>null, disconnect:()=>null},e,t)}},askCom:l,execMenuCmd:{allow:{extpage:!0},exec:async(e,t,n)=>{try{const t=await Ho();if(!t.url)throw new Error("no url");const r={frameId:0,tab:t,url:t.url};Tu(e.id,r,e.event),n({})}catch(t){v.error(`unable to execute menu command ${e.id} due to empty tab!`)}}},prepare:{allow:{script:[]},exec:(e,t,n)=>{const r=t.tab;if(r){const s=Po(t,e);if(!s)return v.error("mh: unknown frameId",t,e);lh(r.id,t);const{url:i}=e,o=Qn(i);if(e.cleanup){let t=e.scripts ;"userscripts-dynamic"==wn.values.runtime_content_mode&&(t||(v.warn("mh: missing scripts for cleanup",e),t={}),nh(r.id,s,t,o)),fh(r.id,s,o),_h.setIcon(r.id),_h.setBadge(r.id),n({})}else gh(r.id,s,o,r,(t=>{const s=t?Up(t,e.url,r):{fast:!0};n(s),_h.setIcon(r.id),_h.setBadge(r.id)}))}else n({})}},contextmenu:{allow:{script:[]},exec:(e,t,n)=>{const{tab:r}=t;r&&wn.values.context_menu_enabled&&Yu.update(r.id),n({})}},clipboard:{allow:{script:"setClipboard",extpage:!0},exec:(e,t,n)=>{ Mt&&Mt.supported?Mt.set({mimetype:e.mimetype,content:e.content},(()=>{n({success:!0})})):n({error:"unsupported"})}},determineScriptsToRun:{allow:{extpage:!0},exec:(e,t,n)=>{n({scripts:sl.determineScriptsToRun({url:e.url,deleted:!1}).map((e=>e.uuid))})}},externalMessage:{allow:{insecure:!0},exec:(e,t,n)=>wp(e.request,t,n)},cookie:d,audio:{allow:{script:"audio"},exec:(e,t,n)=>{const r=t.tab;if(r)if("setMute"==e.action){const t=e.details;if(!t||"object"!=typeof t)return void n({data:{ error:"wrong arguments"}});mt.update(r.id,{muted:t.isMuted},(()=>{n({data:{success:!0}})}))}else"getState"==e.action&&mt.get(r.id,(e=>{if(!e)return void n({data:{error:"no tab"}});const t=e.mutedInfo,r=t?!!t.muted&&(t.extensionId?"extension":t.reason||"other"):void 0,s=e.audible;n({data:{muted:r,audible:s}})}))}},revoke:u}})(),mp=e=>{const t=ft.id,n=!T.HAS_SENDER_ID&&e.tab||e.id===t;let r ;const s=T.INTERNAL_PAGE_PROTOCOLS[0],i=s?s+"//":null,o=ft.getInternalPageRegexp(),a=e.url?e.url:e.tab?e.tab.url:null,c=e.origin?e.origin.toLowerCase():void 0;let l=n&&(!a||!!i&&0==a.indexOf(i))&&(!c||c===ce);if(l||!i){if(a){const e=a.match(o);e&&2==e.length&&(r=e[1])}else r="*";!i&&r&&(l=!0)}return{id_valid:n,url:a,page:r,extpage:l}},gp=(e,t)=>{const{uuid:n}=e;if(void 0===t)return!1;const r=De(t);if(0===r.length)return!0;if(!n)return!1;const s=r.map((e=>{const t=ql[e];if(t)return[...t] })).filter((e=>void 0!==e));return((e,t)=>{const n=De(t),{script:r,cond:s}=sa.getByUid(e);if(r&&s&&r.grant.length){const{grant:e}=r;return n.some((t=>e.includes(t)))}return!1})(n,[].concat(...s))},vp=(e,t,n)=>{if(!_.late)return _.registerLateCallback((()=>{vp(e,t,n)})),!0;v.verbose("mh: request ",e," sender: ",t);const r=fp[e.method];if(!r)return v.warn("mh: unknown method "+e.method),!1;if(!r.allow||!r.exec)return v.warn("mh: invalid implementation of "+e.method),!1 ;const s=mp(t),i=s.extpage,o=s.page,a=s.id_valid;v.verbose("mh: request page:",o,"extpage:",i),i?t.extpage=o:delete e.origin;const c="options"==o,l=a&&!i;let u=!0;if("background"==o||r.allow.insecure||r.allow.extpage&&i||r.allow.options&&c||l&&gp(e,r.allow.script)){const s=r.exec(e,t,(e=>{if(u=!1,n(e),ft.lastError)return ft.lastError.message}));return!1!==u&&!1!==s||void 0}return!1===e.topframe&&(i||c)||v.warn("mh: this context doesn't have the permission to call \""+e.method+'"',s),!1 },wp=(e,t,n)=>{let r,s;if("off"!=wn.values.external_connect&&(r=t.url)&&Gl.isAllowed(r)){for(const[t,n]of Object.entries(yp)){const i=Xo({match:[t]});if(i&&Jo(r,i)&&(n.includes("*")||n.includes(e.method))){s=!0;break}}if(s)if("getVersion"==e.method)n({version:ht.manifest.version,id:ft.short_id});else if("openOptions"==e.method){const r=t.tab;if(!r)return void v.warn("emh: unable to openOptions due to empty tabID!");let s=e.params||"";s&&!s.startsWith("#")&&(s=`#${s}`),mt.update(r.id,{ url:ht.getURL("options.html")+s,active:!0},(()=>n({})))}else if("all"!=wn.values.external_connect)v.warn("mh: calling external method "+e.method+" is not permitted to "+r+" by the user");else if("isInstalled"==e.method){let t,r,s,i,o=!1;const a=e.script.name,c=e.script.namespace||void 0;(r=sa.getUidsByName(a,c)[0])&&(t=sa.getByUid(r))&&t.script&&!t.script.deleted&&(o=!0,i=t.script.enabled,s=t.script.version),n({name:a,namespace:c,installed:o,enabled:i,version:s}) }else v.warn("emh: unknown external method "+e.method);else v.warn("mh: calling external method "+e.method+" is not permitted to "+r)}},bp=(()=>{const e={allow:{extpage:!0},exec:async(e,t,n)=>{let r,s,i=[];const o=hp(n),a=o&&("options"==n.extpage||"options"==t.origin),c=o&&("ask"==n.extpage||"ask"==t.origin);if(ht.inIncognitoContext&&"temporary"==wn.values.incognito_mode&&i.push({domain:"incognito",id:"incognito",image:"critical", text:Qr.getMessage("All_modifications_are_only_kept_a_few_moments_Reconfigure_the_0name0_option_to_save_them_permanently_",Qr.getMessage("Store_data_in_incognito_mode"))}),!c){let t;gs.forEach((e=>{i.push({domain:"status",image:"critical",class:"warning",text:e.text,title:e.description,info_url:e.url})})),a?(t=oi.on("options",(t=>{if(!("options"in t))return void v.warn("mh: wrong notifyUiEvent options",t);const n=t.options;e.postMessage({hints:[n]})})), (r=ci.optionsStatus())&&r.length?i=i.concat(r):(s=vi.updateAvailable())&&i.push({domain:"extensionUpdate",id:"extensionupdate",image:"info",class:"information",text:Qr.getMessage("0name0_0version0_is_available__Please_re_start_your_browser_to_update_",ht.manifest.name,s)})):(t=oi.on("actions",(t=>{const n="method"in t?{refresh:!0}:{hints:[t.options]};e.postMessage(n)})),i=i.concat(ci.actionStatus())),e.onDisconnect((()=>t()))}e.onMessage((e=>{if(e.clear)for(const t of e.clear){ const{key:e,id:n,domain:r}=t,s=e||n;ci.all({domain:r,key:s,deleted:!0}),Rc(s)}})),e.postMessage({hints:i})}},t={allow:{script:"xmlHttpRequest"},exec:(e,t,n)=>{const{disconnect:r,postMessage:s,onMessage:i,onDisconnect:o}=e;let a=!1;const{details:c}=t;let{url:l,tfd:u,...d}=c;const{anonymous:A,cookiePartition:p}=d,h=d.redirect||"follow",f=n.tab?n.tab.cookieStoreId:void 0,m=p&&p.topLevelSite?p:void 0,g=!A&&(!!m||false);g&&(d.anonymous=!0,d.redirect&&"follow"!==d.redirect||(d.redirect="manual")) ;const w=async(e,t)=>{const r=(t||go(e.responseHeaders||""))["set-cookie"];if(r&&l)return await(async(e,t)=>{await Promise.all(e.toString().split(",").map((async e=>{var r;const s=(e=>{const t=e.split(";").filter((e=>"string"==typeof e&&!!e.trim())),n=t.shift();if(!n)return;const r=n.split("="),s=r.shift(),i=r.join("=");if(!s)return;const o={name:s,value:i};return t.forEach((function(e){var t;const n=e.split("="),r=null===(t=n.shift())||void 0===t?void 0:t.trimLeft().toLowerCase(),s=n.join("=") ;if(r)if("expires"===r){const e=new Date($(s));isNaN(e.getTime())||(o.expires=e)}else"max-age"===r?o.maxAge=parseInt(s,10):"secure"===r?o.secure=!0:"partitioned"===r?o.partitioned=!0:"httponly"===r?o.httpOnly=!0:"samesite"===r?o.sameSite=s:o[r]=s})),o})(e);if(!s)return;const{expires:i,httpOnly:o,name:a,path:c,sameSite:l,secure:u,partitioned:d,value:A}=s;let p=(l?(e=>{switch(e.toLowerCase()){case"lax":return"lax";case"strict":return"strict";case"none":return"no_restriction";default: return"unspecified"}})(l):void 0)||"unspecified";const h={expirationDate:i?i.getTime():void 0,httpOnly:o,name:a,path:c,sameSite:p,secure:u,url:t,value:A};if(d)if(void 0!==m)h.partitionKey=m;else{let e;if(n.origin?e=n.origin.toLowerCase():n.url&&(e=null===(r=zn(n.url))||void 0===r?void 0:r.origin),!e)return void v.warn("mh: no origin for partitioned cookie");h.partitionKey={topLevelSite:e}}void 0!==f&&(h.storeId=f);try{await Ra.set(h)}catch(e){v.log("mh: failed to set/overwrite cookie",e)}}))) })(r,e.finalUrl||l),!0};let b;d.partialSize=d.partialSize||Z.PARTIAL_SIZE;const _=new rt(1),y=[()=>{r()}],k=Object.assign({},...Object.keys(t.callbacks).map((e=>{const n=t.callbacks[e]||"onload"===e,r="ondone"===e,i=g&&"onreadystatechange"===e,o=g&&"onredirect"===e;if(n||r||o||i)return{[e]:async t=>{await _.acquire();const a=(t=t||{}).response;try{if(b&&await b(t,e))return;if((o||i&&2===a.readyState&&!ro.includes(a.status))&&await w(a),n||r){const n={data:a||{},exception:t.exception,[e]:!0};s(n) }r&&y.forEach((e=>e(t)))}finally{_.release()}}}})));let R;const x=t.location||n.url||void 0;l&&(l=Vn(l,x)||l);const E=d.responseType;void 0!==E&&so.includes(E)&&"document"!==E||delete d.responseType,"no"!=wn.values.webrequest_modHeaders&&(d.headers=d.headers||{},T.SENDS_ORIGIN&&!Object.keys(d.headers).map((e=>e.toLowerCase())).includes("origin")&&(d.headers.origin=null));const S=d.cookie,C=async(e,t)=>(t||g)&&e?await ya(e,{anonymous:A,cookie:t,sender_domain:undefined,cookie_store_id:f, cookie_partition:m}):void 0;C(l,S).then((e=>{delete d.cookie,e&&(d.headers=d.headers||{},d.headers.cookie=e)})).then((async()=>{var e;if(a){const e={response:ho("aborted"),exception:"aborted"};return k.onabort&&k.onabort(e),void k.ondone(e)}let r;if(l&&(r=null===(e=zn(l))||void 0===e?void 0:e.protocol)&&["file:"].concat(T.INTERNAL_PAGE_PROTOCOLS).includes(r)){const e=e=>{const t='Refused to connect to "'+l+'": '+e,n=ho(t);["onerror","ondone"].forEach((e=>{const r=k[e];r&&r({response:n, exception:t})}))};if("file:"==r){let n,r;if(Ft()&&("all"==wn.values.script_file_access?n=!0:"externals"!=wn.values.script_file_access||(r=sa.getByUid(t.uuid))&&r.script&&r.cond&&[...r.script.resources,...r.script.requires].map((e=>Vn(e.unsafe_url,e.abs_url))).includes(l)&&(n=!0)),!n)return e("Access to this local file is forbidden!")}St(l,(e=>{const t=Ye(e),n=k.onpartial;if(n){const e=Ne(t||"",Z.PARTIAL_SIZE);e.forEach(((t,r)=>{n({response:{partial:t,index:r,length:e.length}})}))}const r={ readyState:4,responseHeaders:"",status:0,statusText:""};["onload","ondone"].forEach((e=>{const t=k[e];t&&t({response:r})}))}),e)}else{if(u){const e=Us.fromTransferableData(u);e&&(y.push((()=>e.dispose())),l=e.tryObjectUrl||e.tryDataUri||l,l||(l=await e.toObjectUrl()))}if(!l)throw new Error("neither url nor tfd set!");const e={foreign_context:false,no_blob:t.no_blob};if(R=Yc.exec({...d,url:l},t.uuid,n||{},e,k),g){let r,s=!1;b=async({response:i},o)=>{if(a)return!1;if("onredirect"===o)return!1 ;if("onreadystatechange"===o&&i&&2==i.readyState&&ro.includes(i.status)){s=!0;const e=i.responseHeaders,t=go(e),{location:n}=t;return"follow"==h&&(r=n),await w(i,t),"follow"==h}if("ondone"==o&&r){const s=r;if(r=void 0,"follow"===h){l=Vn(s,{base:l,enforce_path:!0})||s;const r=await C(l,S);return r&&(d.headers=d.headers||{},d.headers.cookie=r),R=Yc.exec({...d,url:l},t.uuid,n||{},e,k),!0}return!1}return!("follow"!==h||!r&&(!s||!["onloadstart"].includes(o)))}}}}));const M=()=>{a||(R?R.abort():a=!0)} ;i((e=>{e.cancel&&M()})),o(M)}},n={allow:{script:"download"},exec:(e,t,n)=>{const{disconnect:r,postMessage:s,onMessage:i,onDisconnect:o}=e;let a,c=e;if("details"in t){const e=t.details;if(e.from.url){const r=t.location||n.url||void 0;e.from.url=Vn(e.from.url,r)||e.from.url}a=Qa.start(e,{internal:!!hp(n)})}else a=t.id;const l=e=>{c&&s({id:a,load:!0,data:e.info})},u=e=>{c&&s({id:a,progress:!0,data:e.info})},d=e=>{c&&s({id:a,error:!0,data:e})},A=e=>{c&&s({id:a,timeout:!0,data:e})},p=()=>{c&&r(), c=null,Ea.off("load",l),Ea.off("progress",u),Ea.off("error",d),Ea.off("timeout",A),Ea.off("done",p)};Ea.on("load",l,{id:a}),Ea.on("progress",u,{id:a}),Ea.on("error",d,{id:a}),Ea.on("timeout",A,{id:a}),Ea.on("done",p,{id:a}),i((e=>{e.cancel&&Qa.cancel(a)})),o((()=>{c=null}))}},r={allow:{script:"values"},exec:(e,t,n)=>{const{postMessage:r,onMessage:s,onDisconnect:i}=e;if(n.tab){v.verbose("storage: "+t.uuid+" "+t.id);const o=e=>{if(e.id===t.id)return;const{storage:n,ts:s,removed:i}=e;r({storage:n, ts:s,removed:i})},a=({tabId:e})=>{wi.has("scriptStorage",o)||v.warn("storage: no scriptStorage listener found for tab "+e+" "+t.uuid+" "+t.id),wi.off("scriptStorage",o)};bi.once("remove",a,{tabId:n.tab.id}),wi.on("scriptStorage",o,{uuid:t.uuid}),s((t=>{"saveStorageKey"===t.method?fp.saveStorageKey.exec(t,n,(t=>e&&r(t))):v.warn("storage: unknown message",t)})),i((()=>{v.verbose("storage disconnectHandler "+t.uuid+" "+t.id),wi.off("scriptStorage",o),bi.off("remove",a)})) }else v.verbose("storage: unable to load storage due to empty tabID!",t),r({error:"missing tab id"})}},s={allow:{script:"openInTab"},exec:(e,t,n)=>{const{postMessage:r,onMessage:s,onDisconnect:i}=e;let o,a=e;const c=["active"];let l=null;const u=[];let d;const A=e=>{e.tabId===l&&(bi.off("remove",A),a&&r({closed:!0}))};y((({resolve:e,reject:r})=>{if("details"in t){const s={url:t.details.url};if(o=t.details.options){for(const e of c)void 0!==o[e]&&(s[e]=o[e]);if(o.incognito)s.incognito=!0;else{ const e=n.tab;if(!e)return v.warn("mh: unknown tab ID",n);o.insert&&(s.index=e.index+1),o.setParent?s.parent=e:s.parent={windowId:e.windowId}}}mt.create(s,(async t=>{t?(l=t.id,await(e=>cl.acquire().then((async()=>{ol[e]||(ol[e]=!0,await al.set(e.toString(),!0))})).always((()=>cl.release())))(l)):v.warn("openInTab: cannot control new tab (maybe incognito)"),e()})),ft.lastError&&r()}else(e=>cl.acquire().then((()=>!!ol[e])).always((()=>cl.release())))(t.tabId).then((n=>{n&&(l=t.tabId,e())})) })).promise().then((()=>{a&&(null===l?r({success:!1}):(d=!1,bi.on("remove",A),u.push((()=>bi.off("remove",A))),r({success:!0,tabId:l})))})),s((e=>{if(null===l||d)return;const{close:t,focus:n,name:s}=e;if(n)mt.update(l,{active:!0},(()=>{const e=ft.lastError;e&&v.warn("tab.focus",e.message)}));else if(t)mt.remove(l,(()=>{const e=ft.lastError;e?v.warn("tab.close",e.message):d=!0}));else if(void 0!==s){const e=5;let t=0;const n=()=>{if(null===l)return;const i=l,o=({tabId:o})=>{if(o!==i)return;a() ;const c={method:"setForeignAttr",attr:"name",value:s};mt.sendMessage(i,c,{frameId:0},(i=>{i?r({name:s}):t++{bi.off("complete",o),bi.off("commited",o)};u.push(a)};n()}})),i((()=>{u.forEach((e=>e())),a=null}))}},i={allow:{script:"menuCommand"},exec:(e,t,n)=>{const{postMessage:r,onDisconnect:s,onMessage:i}=e;if(n.tab){v.verbose("registerMenuCommand: add "+t.menuId) ;const{name:e,uuid:o,accessKey:a,autoClose:c,menuId:l,title:u}=t,d=n.tab.id,A=e=>{r({method:"run",menuId:l,event:e.event})};Eu.on("run",A,{menuId:l}),Uu({tabId:d,name:e,title:u,uuid:o,accessKey:a,autoClose:c,menuId:l,exec:!1}),i((e=>{if("registerMenuCommand"!==e.method)throw new Error("Unexpected message");const{name:t,uuid:n,accessKey:r,autoClose:s,menuId:i,title:o}=e;Uu({tabId:d,name:t,title:o,uuid:n,accessKey:r,autoClose:s,menuId:i,exec:!1}),ci.updateActionPage()})),s((()=>{ v.verbose(`registerMenuCommand: unreg ${l}`),(e=>{delete Su[e]})(l),ci.updateActionPage(),Eu.off("run",A)})),ci.updateActionPage(),mt.getSelected(null,(e=>{e&&e.id==d&&Yu.update(d)}))}else v.warn("Unable to register menu cmd due to empty tabID!")}},o={allow:{script:"notification",extpage:!0},exec:(e,t,n)=>{const{postMessage:r,onMessage:s,onDisconnect:i}=e;if("canceled"in t)return void v.warn("notification: unexpected request",t);const o=t.image?t.image:Rs("tampermonkey");let a,c=!1 ;const{highlight:l,title:u,text:d,timeout:A,silent:p,url:h,tag:f,id:m}=t,g=e=>{c||(c=!0,mt.getSelected(null,(t=>mt.create({url:e,parent:t}))))};let w,b;s((e=>{b&&a&&"canceled"in e&&!e.canceled&&g(a)})),i((()=>{!w||h||f||w(),w=void 0})),(()=>{const e=y();var t,r;return l&&n.tab?(t=n.tab.id,r=()=>e.resolve(),mt.highlight({tabs:t},r)):e.resolve(),e.promise()})().then((()=>{const e=y();return d?(a=h,w=ti(u,d,o,{timeout:A,silent:p,notificationId:m},(t=>e.resolve(t.clicked))).cancel):e.resolve(), e.promise()})).always((e=>{b=e;const t=r({clicked:b,notificationId:m});b&&t&&a&&g(a)}))}},a={allow:{extpage:!0},exec:async(e,t)=>{const{postMessage:n,onDisconnect:r}=e;let s=e;const i=void 0===t.reload||!!t.reload;let o,a,c,{data:l,json:u,code:d,url:A,tfd:p}=t;if(A)try{s&&n({progress:Qr.getMessage("Loading")}),c=await zo(A)}catch(e){return void n({error:Qr.getMessage("Unable_to_load_script_from_url_0url0",A)})}if(p){let e,t ;if(!(e=Us.fromTransferableData(p))||!(t=await e.toBlob()))return void n({error:Qr.getMessage("Unable_to_parse_this_")});c=await t.arrayBuffer()}if(l||c){if(c){s&&n({progress:Qr.getMessage("Decoding")});try{l=await Ke(c)}catch(e){}}if(l)try{a=await function(e){const t=y();let n;return y.Pledge().then((()=>bd.open(e))).then((()=>bd.entries())).then((async e=>{const r={},s={},i=2*e.length,o={};await Promise.all(e.map((async e=>{const n=await bd.get(e) ;let r=e.filename.match(/((.*)\.(storage\.json)|(.*)\.(options\.json)|(.*)\.(global\.json)|(.*)\.(user\.js)|(.*)\.user\.js-[0-9a-f]+-.*\.(resources\.json)|(.*)\.user\.js-[0-9a-f]+-.*\.(requires\.json))$/);if(r&&(r=r.slice(1).filter((e=>e))),!n||!r||r.length<3)return void(s[e.filename]=n);const a=r[1],c=r[2];o[e.filename]={filename:e.filename,name:a,type:c,ab:n},t.notify("Zip: "+Math.floor(Object.keys(o).length/i*100)+"%")})));const a=async({name:e,filename:t,type:s,ab:i})=>{const o=await Ke(i,{ encoding:"UTF-8"});if("global.json"==s)n=JSON.parse(o);else{const n=r[e]||{resources:{},requires:{}};r[e]=n,"user.js"==s?n.source=o:"options.json"==s?n.options=JSON.parse(o):"resources.json"==s?n.resources[t]={name:t,data:JSON.parse(o)}:"requires.json"==s?n.requires[t]={name:t,data:JSON.parse(o)}:"storage.json"==s&&(n.storage=JSON.parse(o))}};for(const e of Object.values(o).filter((e=>e&&["requires.json","resources.json"].includes(e.type))))try{ const n=e.filename.substr(0,e.filename.length-(e.type.length+1)),r=o[n];r&&(s[n]=r.ab,delete o[n]),await a(e),delete o[e.filename],t.notify("Zip: "+Math.floor((i-Object.keys(o).length)/i*100)+"%")}catch(e){v.log("porter: read zip failed",e)}for(const e of Object.values(o))try{await a(e),delete o[e.filename],t.notify("Zip: "+Math.floor((i-Object.keys(o).length)/i*100)+"%")}catch(e){v.log("porter: read zip failed",e)}const c=[];for(const[e,t]of Object.entries(r)){ const{options:n,source:r,storage:i}=t;if(!r){v.warn(`porter: invalid script ${e}`);continue}const o={requires:[],resources:[]};["resources","requires"].forEach((e=>{for(const n of Object.values(t[e])){const t=n.name.replace("."+e+".json",""),r=s[t];r&&o[e].push({meta:n.data,source:Ye(r,{encoding:"resources"==e?void 0:"UTF-8"})||void 0})}}));const a={...o,...n,source:r,storage:i};c.push(a)}return{scripts:c,global_settings:n}})).done((e=>{t.resolve(e)})).fail((()=>{t.reject()})),t.promise() }(l).progress((e=>{s&&n({progress:e})}))}catch(e){}if(!a){if(c)try{u=await Ke(c,{encoding:"UTF-8"})}catch(e){}u=l}}if(u&&!d&&!a)try{a=await function(e){const t=y(),n=(e,r)=>{if(e.trim()){let s=null;try{s=JSON.parse(e);const n=e=>{if(e&&e.length)return e.map((e=>({meta:e.meta,source:e.source?Qe(Xe(e.source)):e.source})))},r=s.scripts.map((e=>({meta:{uuid:e.uuid,name:e.name,file_url:e.file_url},settings:{enabled:e.enabled,position:e.position},options:e.options,storage:e.storage, source:Qe(Xe(e.source)),resources:n(e.resources)||[],requires:n(e.requires)||[]})));return t.resolve({scripts:r,global_settings:s.settings})}catch(t){if(!r){const t="",r="";if(-1!=e.indexOf(t)){const s=e.indexOf(t),i=e.lastIndexOf(r);if(-1!=s&&-1!=i)return e=e.substr(s+t.length,i-(s+t.length)),n(e,!0)}}}}t.reject()};return n(e),t.promise()}(u)}catch(e){try{d=Qe(u)}catch(e){d=u}}if(a){const e={scripts:Object.values(a.scripts).map((e=>(e=>{const t=e.meta||{},n=e.settings||{},r=e=>({ url:e.meta.url,sri:e.meta.sri,ts:e.meta.ts||null,mimetype:e.meta.mimetype,modified:e.meta.modified,content:e.source});return{source:e.source,name:t.name,uuid:t.uuid,file_url:t.file_url,options:e.options,storage:e.storage||{ts:0,data:{}},lastModified:t.modified,enabled:n.enabled,position:n.position,resources:e.resources?e.resources.map(r):[],requires:e.requires?e.requires.map(r):[]}})(e))),global_settings:a.global_settings};o=sl.importFromJson(e).then((e=>({reload:!!e.global_settings,success:!0 }))).fail((()=>{n({error:Qr.getMessage("Unable_to_parse_this_")})}))}else{if(!d)return void n({error:Qr.getMessage("Unable_to_parse_this_")});o=sl.installFromSource(d,{force_url:A},{silent_fail:!0}).fail((e=>{var t;const r=((null===(t=null==e?void 0:e.messages)||void 0===t?void 0:t.errors)||[])[0]||Qr.getMessage("Unable_to_parse_this_");n({error:r})})).then((e=>({installed:e?1:0,success:!0})))}o.done((e=>{i&&!e.reload?dd.create("options.scripts").done((t=>{const r={...e,items:t};n(r) })).fail((e=>{n({error:e||Qr.getMessage("An_error_occured_during_import_")})})):n(e)})),r((()=>{s=null}))}};return{keepAlive:{allow:{script:[],extpage:!0},exec:(e,t,n)=>{hp(n)?(su.emit("added",n),e.onDisconnect((()=>{su.emit("removed",n),ft.lastError}))):e.onMessage((()=>{}))}},tabInfo:{allow:{script:[]},exec:(e,t,n)=>{const r=n.tab;if(!r)return void v.warn("mh: unknown tab ID",n);if(r.id<0)return;const s=r.id;if(Lo(n)){const{info:r}=t;e.onDisconnect((()=>{i(),ft.lastError})), bi.once("reset",(()=>{i()}),{tabId:s});const i=_i.on("set",(({info:t})=>{v.verbose("mh: tabInfo got info",t,n),e.postMessage({info:t})}),{tabId:s});if(r){for(const e of Object.values(r.map))Lo(e.sender)||(e.active=!1);_i.emit("got",{tabId:s,info:r})}else _i.emit("get",{tabId:s})}else{const r=Po(n);if(!r)return void v.error("mh: unknown frameId",n,t);const{url:i}=t;if(!i)return void v.warn("mh: missing URL for tabInfo");bi.emit("frameStart",{tabId:s,sender:r,url:i}),e.onDisconnect((()=>{ v.verbose("mh: unload check url: "+i),bi.emit("frameStop",{tabId:s,sender:r,url:i}),ft.lastError}))}}},hints:e,xhr:t,xhrLocking:{allow:{extpage:!0},exec:async(e,t)=>{const{url:n}=t,{done:r}=await op();e.postMessage({ack:!0}),e.onDisconnect((()=>{r(),ft.lastError}))}},download:n,webRequest:{allow:{script:"webRequest"},exec:(e,t,n)=>{const r=n.tab;if(!r)return v.warn("mh: unknown tab ID",n);const{postMessage:s}=e;if(r.id,!Po(n))return v.error("mh: unknown frameId",n,t);s({type:"error", message:"currently not supported in MV3",details:{}})}},addStorageListener:r,exportToJson:{allow:{extpage:!0},exec:(e,t)=>{const{postMessage:n}=e;sl.exportToJson(t.ids,t.options).done((e=>{const t=JSON.stringify(e);Ne(t,Z.PARTIAL_SIZE).forEach((e=>n({partial:e}))),n({done:!0})})).fail((e=>{n({error:e||"serialization error"})}))}},openInTab:s,notification:o,registerMenuCommand:i,registerCtxer:{allow:{script:[]},exec:(e,t,n)=>{var r;const{postMessage:s,onDisconnect:i}=e;if(n.tab){ const{uuid:e,contextId:o}=t,a=null===(r=n.tab)||void 0===r?void 0:r.id;if(a){const t=`ctxer-${e}-${o}`;Uu({tabId:a,name:Qr.getMessage("Execute_now"),uuid:e,autoClose:!0,menuId:t,exec:!0});const n=()=>{s({done:!0})};Eu.once("run",n,{menuId:t}),i((()=>{Eu.off("run",n)})),mt.getSelected(null,(e=>{e&&e.id==a&&Yu.update(a)}))}else v.warn(`unable to register ctxer ${e} due to empty tabID!`)}else v.warn("Unable to register context menu script due to empty tabID!")}},observeUrlChanges:{allow:{ script:"window.onurlchange"},exec:(e,t,n)=>{const{postMessage:r,onDisconnect:s}=e,{tab:i,frameId:o}=n;if(!i)return v.warn("mh: unknown tab ID",n);const a=i.id,c=e=>{e.tabId==a&&e.frameId==o&&r({url:e.url})};md.addListener(a,c),s((()=>{md.removeListener(a,c)}))}},observeAudioStateChanges:{allow:{script:"audio"},exec:(e,t,n)=>{const{postMessage:r,onDisconnect:s}=e,{tab:i}=n;if(!i)return v.warn("mh: unknown tab ID",n);const o=i.id,a=(e,t)=>{t.id==o&&("muted"in e&&r({muted:e.muted}), "audible"in e&&r({audible:t.audible}))};gl.addListener(a),s((()=>{gl.removeListener(a)}))}},tabWatch:{allow:{extpage:!0},exec:(e,t,n)=>{const{disconnect:r,postMessage:s,onDisconnect:i}=e,{active:o,url:a,filter:c}=t,l=n.tab,u=gl.openAndWatch({url:a,active:o,filter:c?new RegExp(c):void 0,index:((null==l?void 0:l.index)||0)+1,parent:l},(e=>{e?s({tab:e}):(d(),r())})),d=()=>{u.cancel()};i(d)}},syncInfo:{allow:{extpage:!0},exec:e=>{const{postMessage:t,onDisconnect:n}=e,r=e=>t({info:e}) ;wi.on("syncProgressEvent",r),n((()=>{wi.off("syncProgressEvent",r)}))}},importEx:a,backgroundControl:{allow:{script:[]},exec:async(e,t)=>{const{postMessage:n}=e;let r;wn.values.background_control?"restart"in t&&t.restart?(await F(45e3),r="still there"):r="unsupported action":r="not supported",n({error:r})}}}})(),_p=(()=>{const e=(e,t)=>{const{messageId:n,refreshId:r,method:s}=t;if(n||r){const t={messageId:n,refreshId:r,ack:!0,method:s};try{e.postMessage(t)}catch(n){ v.debug("mh: Error sending port ("+e.name+") message ACK",t,n)}return!!r}};return t=>{let n;const r=s=>{_.ensureLate((()=>{if(n)n(s);else if(void 0!==s.method){const i=((t,n)=>{const r=t.sender;v.verbose("mh: connect.method "+n.method+" contextId "+n.id+" tabId: "+(r.tab?r.tab.id:"unknown!!!"));const s=bp[n.method];if(!s)return v.warn("mh:"+Qr.getMessage("Unknown_method_0name0",n.method)),!1;if(!s.allow||!s.exec)return v.warn("mh: invalid implementation of "+n.method),!1 ;const i=mp(r),o=i.extpage,a=i.page,c="options"==a,l=i.id_valid&&!o;if("background"==a||s.allow.insecure||o&&s.allow.extpage||c&&s.allow.options||l&&gp(n,s.allow.script)){let i;return e(t,n),s.exec({postMessage:e=>{try{t.postMessage(e)}catch(n){return v.debug("mh: Error sending port ("+t.name+") message",e,n),n.message||n}},disconnect:()=>t.disconnect(),onMessage:n=>{if(!1===i)throw Error("port message listener registration must be done synchronously");i=r=>{e(t,r)||n(r,t)}}, onDisconnect:e=>t.onDisconnect.addListener(e)},n,{...r,...a?{extpage:a}:{}}),i=i||!1,i}return!1===n.topframe&&(o||c)||v.warn("mh: this context doesn't have the permission to call \""+n.method+'"'),!1})(t,s);i?n=i:t.onMessage.removeListener(r)}else v.warn("mh: invalid request",s)}))};t.onMessage.addListener(r)}})(),yp={"*://*.tampermonkey.net/*":["getVersion","openOptions"],"*://*.greasyfork.org/*":["*"],"*://*.sleazyfork.org/*":["*"],"*://*.openuserjs.org/*":["*"],"*://*.userstyles.org/*":["*"], "*://*.userscript.zone/*":["*"]},kp=(()=>{const e={exec:async(e,t,n,r)=>{if(!e)throw Error("invalid port");const s="options.scripts.userscripts",{action:i,messageId:o}=t,a=(e,t,n)=>r({messageId:e,error:{number:t,message:n}});try{if("options"==i){const e=t.activeUrls;e&&e.length&&Gl.forbid(e),r({messageId:o,allow:["options","list","get","patch"]})}else if("list"==i){const e=(await dd.create(s)).filter((e=>e.userscript)),t={messageId:o,list:e.map((e=>{ const{uuid:t,namespace:n,name:r,requires:s,storage_key_count:i}=e,o=`${ee(t)}`;return{namespace:n||"",name:r,path:`${o}/source`,requires:s.filter((e=>e.url)).map((e=>`${o}/external/${ee(e.url)}`)),storage:i?`${o}/storage`:void 0}}))};r(t)}else if("get"==i){const{path:e,ifNotModifiedSince:n,ifModifiedSince:i}=t,[c,l,u]=e.split("/").map((e=>$(e)));if(!["source","storage","external"].includes(l))return a(o,404,"Not found");const d=i||n;try{let e,t ;if("storage"===l)e=sa.getStorageByUid(c).ts;else if("source"===l){const{script:t,cond:n}=sa.getByUid(c);if(!t||!n)return a(o,404,"Not found");e=t.lastModified}else if(u){const t=Lc.getElement(c,u);t&&(e=t.ts)}if(!d||!e||e>d){const e=(await dd.create(`${s}.${l}`,{uuid:c,url:u}))[0];if(void 0===e)return a(o,404,"Not found");if("string"==typeof e)t=e;else{const n={};Object.keys(e).forEach((t=>{n[t]=Pt(e[t])})),t=(e=>{const t=`__undefined__${Pe()}` ;return JSON.stringify(e,((e,n)=>void 0===n?t:n),void 0).replace(new RegExp(`"${t}"`,"g"),"undefined")})(n)}}r({messageId:o,value:t,lastModified:e})}catch(e){return a(o,404,"Not found")}}else if("patch"===i){const{path:e,value:n,lastModified:s}=t,[i,c,l]=e.split("/").map((e=>$(e)));if(!i||"string"!=typeof n)return a(o,400,"Bad Request");const{script:u,cond:d}=sa.getByUid(i);if(!u||!d)return a(o,404,"Not found");if("source"==c){if(void 0!==l)return a(o,400,"Bad Request");sl.doSave({name:u.name, uuid:i,src:n,ask:!wn.values.editor_easySave,external:!0,save:!0,...s?{force_meta:{lastModified:s}}:{}}).done((()=>{r({messageId:o})})).fail((()=>{a(o,400,"Bad Request")}))}else if("storage"==c){if(void 0!==l)return a(o,400,"Bad Request");const e=s||Date.now();try{const t=sa.getStorageByUid(i).data,r=Object.entries(JSON.parse(n)).reduce(((e,[t,n])=>(e[t]=Nt(n),e)),{});((t,n)=>{const r=Object.keys(n),s=Object.keys(t);r.concat(s).filter(((e,t,n)=>n.lastIndexOf(e)===t)).forEach((o=>{ r.includes(o)?s.includes(o)?n[o]!==t[o]&&((t,n,r)=>{sa.setStorageByUidAndNotify(i,e,void 0,t,r)})(o,t[o],n[o]):((t,n)=>{sa.setStorageByUidAndNotify(i,e,void 0,t,n)})(o,n[o]):(t=>{sa.setStorageByUidAndNotify(i,e,void 0,t,void 0,!0)})(o,t[o])}))})(t,r)}catch(e){return a(o,400,"Bad Request")}r({messageId:o})}else{if("external"!=c)return a(o,404,"Not found");{const e=Lc.getElement(i,l);if(!e)return a(o,404,"Not found");const t=e.data.meta||"text/javascript";await Lc.setElement(i,l,{content:n,meta:t, lastModified:s},!0),r({messageId:o})}}}else{if("put"===i||"delete"==i)return a(o,405,"Method Not Allowed");v.warn(`emh: unknown action ${i}`),e.disconnect()}}catch(e){return a(o,500,"Internal error")}}};return{userscripts:e}})(),Rp=["editor-firefox@tampermonkey.net","afknhifbpphifnhohilgdbjclplncbij","lieodnapokbjkkdkhdljlllmgkmdokcm"],xp=e=>{_.late?e.onMessage.addListener((t=>{void 0!==t.method&&((e,t)=>{const{sender:n}=e,{id:r}=n;if(!Rp.includes(r))return void e.disconnect() ;v.verbose("emh: connect.method "+t.method+" contextId "+t.id+" tabId: "+(n.tab?n.tab.id:"unknown!!!"),t);const s=kp[t.method]||{},{exec:i}=s;if(!i)return v.warn("emh: unknown method "+t.method),!1;const o=i(e,t,n,(t=>{try{e.postMessage(t)}catch(n){v.debug(`emh: error sending message to port[${e.name}]`,t,n)}}));"function"==typeof o&&e.onDisconnect.addListener(o),v.verbose("emh: connect.method "+t.method+" end!")})(e,t)})):_.registerLateCallback((()=>{_p(e)}))};let Ep;const Sp={init:()=>{ ht.onMessage.addListener(vp),ht.onConnect.addListener(_p),ht.onConnectExternal.addListener(xp)},get externally_connectable_reg(){return Ep||(Ep=Xo({match:Object.keys(yp)})),Ep},externally_connectable:yp},Cp=e=>{let t,n,r;switch(e){case"raw+":r=t=n=!0;break;case"default":case"-js":r=t=!0,n=!1;break;case"js+":t=n=!0,r=!1;break;case"js":t=!0,r=n=!1;break;case"dom":n=!0,t=r=!1;break;case"raw":r=!0,n=t=!1}return{js:t,dom:n,raw:r}},Mp=(e,t,n,r)=>{ const s=Fo(n),i=e.id+"#"+(s?"i":"n")+(r?"a":"e")+"#"+t,o=Ko.get(i);let a=o?JSON.parse(o):void 0;if(!a){const o=[],c=[],l=[],u=[],d={};if(t){const i=sl.determineScriptsToRun({url:t,warn:false,enabled:!r||void 0,deleted:!1});for(const t of i){if(v.verbose("check "+t.name+" for enabled:"+t.enabled),void 0!==s){const e=s?"incognito-tabs":"normal-tabs";let r,i=null ;if((i=wn.values.runtime_run_in)&&i.length&&!i.includes(e)||(i=t.options.run_in||t.options.override.orig_run_in)&&i.length&&!(i.includes(e)||n.cookieStoreId&&(r=j.getIdFromStoreId(n.cookieStoreId))&&i.includes(`container-id-${r}`)))continue}(Lo(e)||!0!==t.options.noframes&&(null!==t.options.noframes||!0!==t.options.override.orig_noframes))&&(t.evilness&&t.evilness>=Math.min(Uc.SEVERITY_MAX,wn.values.script_blacklist_severity)?l.push(t):t.enabled?(d[t.uuid]=t.name, sl.isContexter(t)?u.push(t):o.push(t)):c.push(t))}}a={contexters:u,runners:o,disabled:c,evilness:l,script_map:d},t&&Ko.set(i,JSON.stringify(a))}return a},Ip=e=>{const{runners:t,contexters:n}=e,{js:r,dom:s,raw:i}=Cp(wn.values.sandbox_mode),o=e=>{const t=[],n=[],r=[];return e.forEach((e=>{let t,o;Kl(e)?(t=e.script.options.sandbox,o=e.script.name):(t=e.options.sandbox,o=e.name) ;const a="raw"===t||null===t,c="JavaScript"===t,l="DOM"===t,u=()=>v.info(`content: script "${o}" wants to be executed inside a ${t||"raw"}-level sandbox, but this mode is currently disabled at the security settings`);l&&s?r.push(e):((c||l)&&u(),i?n.push(e):(a&&u(),s?r.push(e):v.warn(`content: script "${o}" can't be executed`)))})),{dom:r.length?r:void 0,raw:n.length?n:void 0,js:t.length?t:void 0}};return{scripts:o(t||[]),contexters:o((n||[]).map((e=>(e=>{ const{uuid:t,options:n,name:r,name_i18n:s,description:i,description_i18n:o}=e;return{uuid:t,options:n,name:r,name_i18n:s,description:i,description_i18n:o}})(e))))}},Up=(e,t,n)=>{const{scripts:r,contexters:s}=Ip(e),i=[{m:"native",t:[Qa.staticVars.DEFAULT,Qa.staticVars.NATIVE]},{m:"disabled",t:[Qa.staticVars.OFF]},{m:"browser",t:[Qa.staticVars.CHROME]}].filter((e=>{if(e.t.includes(wn.values.downloads_mode))return!0})).map((e=>e.m))[0]||"disabled",o=ru(),a=Sp.externally_connectable_reg;return{ scripts:r,contexters:s,external_connect:"off"!=wn.values.external_connect&&a.rinc&&a.rinc.length?a.rinc.map((e=>Yo(e))):void 0,nonce:e.nonce,originalURL:t,injectMode:wn.values.runtime_inject_mode,contentMode:wn.values.runtime_content_mode,inIncognitoContext:Fo(n)||!1,isFirstPartyIsolation:Ra.fpi,sharedBlobs:!1,sharedObjectUrls:!0,container:n.cookieStoreId?j.getIdFromStoreId(n.cookieStoreId):void 0,userAgent:o,downloadMode:i,relaxedCsp:wn.values.webrequest_fixCSP, sandboxMode:wn.values.sandbox_mode,enforce_strict_mode:"on"==wn.values.runtime_strict_mode,top_level_await:["default","on"].includes(wn.values.runtime_top_level_await),measure_scripts:wn.values.debug,logLevel:wn.values.logLevel,version:ht.manifest.version}};let Gp=1;const Zp=Gp++,Tp=Gp++,Bp=Gp++,Op=Gp++,jp=Gp++,Dp=Gp++,Fp=Gp++,Lp=Gp++,Pp=Gp++,Np=Gp++,Vp=(Ns("execInfo"),{}),zp=z({retimeout_on_get:!0,timeout:300,check_interval:120}),qp={},Hp=(e,t)=>{ (t||["running_unique","running"].includes(wn.values.appearance_badges))&&(_h.setIcon(e),_h.setBadge(e))},Qp=e=>{const t=Vp[e];t&&_i.emit("set",{tabId:e,info:t})},Wp=e=>{const t=`${e}`;delete qp[e],delete Vp[e],zp.remove(t)},Xp=e=>{const t=Vp[e];if(t)return t;{const t={map:{},scripts:{},searched:{}};return Vp[e]=t,t}},Yp=(e,t,n,r)=>$p(e,t,n,r),Jp=(e,t)=>$p(e,void 0,void 0,void 0,void 0,t),Kp=(e,t,n)=>$p(e,t,void 0,void 0,void 0,void 0,!1,n),$p=(e,t,n,r,s,i,o,a)=>{const c=Xp(e) ;if(void 0!==s&&n)c.searched[n]=s;else if(void 0!==i)c.allowed=i;else if(t){const e=t.id;let s=c.map[e];if(void 0===s){if(!1===o)return;s=c.map[e]={active:!0,sender:t,scripts:[],urls:[]}}if(r)s.scripts.push(r.uuid),c.scripts[r.uuid]=r.name;else if(s.active=!!o,a){const t=Math.random().toString(36).substr(2,10),n=`${e}_${Date.now()}_${t}`;c.map[n]=s,delete c.map[e]}n&&!s.urls.includes(n)&&s.urls.push(n)}else v.warn("setExecInfo: sender missing");Qp(e)},eh=(e,t)=>{const n=`${e}`,r=zp.get(n) ;if(r)return r;if(!t){const e={scripts:{},objurl:{},running:0,disabled:0};return zp.set(n,e),e}},th=(e,t,n)=>{let r=qp[e];if(r||n||(r={frames:{},requests:{}},qp[e]=r),r){const e=t.id,n=r.frames;n[e]||(n[e]={sender:t,state:Zp})}return r},nh=function(e,t,n,r){const s=Object.entries(n);if(s.length)for(const[n,i]of s)Yp(e,t,r,{uuid:n,name:i});else $p(e,t,r)},rh=function(e,t,n,r){let s;const i=Fo(r)?"incognito-tabs":"normal-tabs",o=wn.values.runtime_run_in ;return o.length&&!o.includes(i)||!Gl.isAllowed(n)?(v.log("This URL is filtered by the security settings:",n,"-> Do nothing!"),Jp(e,!1),s={contexters:[],runners:[],disabled:[],evilness:[],script_map:{}}):s=Mp(t,n,r),s.runners.forEach((n=>{n.webRequest&&n.webRequest.length&&uh(e,t,n.uuid,n.webRequest)})),s},sh=(e,t)=>{wn.values.userscript_search_url&&"badge"==wn.values.userscript_search_mode&&void 0===Xp(t).searched[e]&&Ll(e).then((n=>{((e,t,n)=>{$p(e,void 0,t,void 0,n)})(t,e,n.count), _h.setBadge(t)}))};let ih,oh;const ah=e=>{const t=Xp(e.id),{scripts:n,map:r}=t,s={};for(const e of Object.keys(n)){let t=[],n=0,i=[];Object.values(r).forEach((({active:r,scripts:s,urls:o})=>{i=i.concat(o),r&&(t=t.concat(s.filter((t=>t==e)))),n+=s.filter((t=>t==e)).length}));const o=Ce(t).length;s[e]={count:o,all_time:n,urls:i}}return s},ch=(e,t)=>{const n={},r=Vp[e.id];let s;if(r)s=r.map;else{if(!t)return n;$p(e.id,t,e.url),s=Xp(e.id).map} for(const{sender:t,urls:r}of Object.values(s))for(const s of r){if(v.verbose(`Found at info[${e.id}] -> ${s}`),!Gl.isAllowed(s))continue;const{runners:r,contexters:i,disabled:o,evilness:a}=Mp(t,s,e,!0);[r,i,o,a].forEach((e=>{e.forEach((e=>{n[e.uuid]=e}))}))}return n},lh=(e,t)=>{Lo(t)&&void 0===Ah(e)&&Jp(e,!0)},uh=(e,t,n,r,s)=>{const i=t.frameId;if(void 0===i)return;const o=[];r.forEach((e=>{const t="string"==typeof e.selector?{include:[e.selector] }:e.selector,n=["include","match","exclude"].reduce(((e,n)=>{const r=t[n];return r&&(e[n]="string"==typeof r?[r]:r),e}),{}),r=e.action;let s;if("string"==typeof r)s="cancel"===r?{cancel:!0}:{};else{const{cancel:e,redirect:t}=r;s="string"==typeof t?{redirect:{url:t}}:{cancel:e,redirect:t}}o.push({selector:n,action:s})})),((e,n,r,s)=>{const o=th(e,t);(o.requests[i]||(o.requests[i]={}))[r]=s})(e,0,n,{id:n+"@"+e+":"+t.id+"#"+Date.now(),rules:o,uuid:n,callback:s})},dh=(e,t)=>{ const n=Xp(e),{map:r,searched:s}=n;let i=0,o=0,a=0,c=[];for(const{active:e,scripts:n,urls:l}of Object.values(r)){for(const e of l){const t=s[e];void 0!==t&&(a=t)}i+=n.length,e&&(o+=n.length,t&&(c=c.concat(n)))}return{active:o,executed:i,searched:a,unique:c.length?Ce(c).length:0}},Ah=e=>Xp(e).allowed,ph=(e,t)=>{var n;const r=t.frameId;if(void 0!==r)return null===(n=qp[e])||void 0===n?void 0:n.requests[r]},hh=(e,t)=>{const n=qp[e],r=t.id;return!!(null==n?void 0:n.frames[r])},fh=(e,t,n)=>{ if(th(e,t,!0)){if(n){const t=Qn(n),r=eh(e,!0);r&&delete r.scripts[t]}const r=((e,t)=>{const n=eh(e),r=n.objurl[t.id];return void 0!==r&&delete n.objurl[t.id],r})(e,t);r&&URL.revokeObjectURL(r)}};bi.on("active",(({tabId:e,windowId:t})=>{ih=t,oh=e,mt.getSelected(t,(t=>{t&&t.id==e&&t.url&&sh(t.url,e)}))})),bi.on("reset",(({tabId:e})=>{let t;if(t=qp[e])for(const{sender:n}of Object.values(t.frames))fh(e,n);Wp(e)}));const mh=(e,t,n,r)=>{if(!wn.values.enabled)return ;const s=t.id,i=th(e,t).frames[s],o=i.state||Zp,a=Qn(n);let c;const l=eh(e);return c=l.scripts[a],o{if(!wn.values.enabled)return;const i=th(e,t),o=t.id,a=i.frames[o];(a.state||Zp){ if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return;const r=th(e,t),s=t.id,i=r.frames[s];(i.state||Zp)>=Tp||(i.state=Tp)})),bi.on("request",(({tabId:e,sender:t,url:n})=>{if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return;const r=th(e,t),s=t.id,i=r.frames[s];(i.state||Zp)>=Bp||(i.state=Bp)})),bi.on("loading",(({tabId:e,sender:t,url:n,incognito:r,cookieStoreId:s})=>{ if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return;const i=th(e,t),o=t.id,a=i.frames[o],{incognito:c,cookieStoreId:l}=a.incognitoInfo||{};a.incognitoInfo={incognito:c||r,cookieStoreId:l||s},(a.state||Zp)>=Dp||(a.state=Dp)}));const gh=(e,t,n,r,s)=>{if(!wn.values.enabled)return;const i=th(e,t),o=t.id,a=i.frames[o],c=Qn(n),l=eh(e);let u=l.scripts[c];if(!u&&(v.log("tv: lazy init @ events.prepare("+e+", "+o+", "+n+")"),u=l.scripts[c]=rh(e,t,c,r), !u))return void v.warn("tv: no script run info for tab "+e+" @ "+c);const d=a.state;a.state=Fp,d!=Fp&&nh(e,t,u.script_map,c);const{contexters:A,nonce:p}=u,h=s?r=>{fh(e,t,n);const i=r||A.length?{runners:r,contexters:A,nonce:p}:void 0;s(i)}:void 0,f=function(e,t,n,r,s){const i=[];for(const e of r)i.push(tu.bundle(e));let o;return y.when(i).then((e=>e.filter((e=>{const t=Kl(e);return t&&v.log("run script "+e.script.name+" @ "+n),t})))).always((e=>{s?s(e):o=e})),o}(0,0,c,u.runners,h) ;return f||A.length?{runners:f,contexters:A,nonce:p}:u.runners.length||A.length?{count:u.runners.length||A.length,nonce:p}:void 0},vh=(e,t,n,r,s)=>{const i=y.Pledge();if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return i;const o=th(e,t),a=t.id,c=o.frames[a];if((c.state||Zp)>=Lp)return i;const l=y();return s&&(gh(e,t,n,r,(s=>{if(!s)return l.resolve();const i=Up(s,n,r);((e,t,n)=>{const{js:r}=gA,s=t.frameId,i=y();if(void 0===s)return v.error("dc: no frameId set!"), i.resolve(),i.promise();if(kt.supported){const t=y();n?kt.executeScript({target:{tabId:e,frameIds:[s]},injectImmediately:!0,world:"ISOLATED",func:e=>{window.tm_info=e},args:[n]}).then((()=>t.resolve())):t.resolve();const o=y();return kt.executeScript({target:{tabId:e,frameIds:[s]},injectImmediately:!0,world:"ISOLATED",files:r.map((e=>e.file))}).then((()=>o.resolve())),y.when([t.promise(),o.promise()]).then((()=>i.resolve()))}{let t;if(n){ const e=JSON.stringify(n),r=String.fromCharCode(8232),s=String.fromCharCode(8233);t=-1!==e.search(r)||-1!==e.search(s)?`window.tm_info=JSON.parse(atob("${We(e)}"));`:`window.tm_info=${e};`}const o=y();return t?mt.executeScript(e,{frameId:s,code:t,runAt:"document_start"},(()=>o.resolve())):o.resolve(),y.when([o.promise(),...r.map((t=>{const n=y();return mt.executeScript(e,{frameId:s,file:t.file,runAt:"document_start"},(()=>n.resolve())),n.promise()}))]).then((()=>i.resolve()))} })(e,t,i).then((()=>l.resolve()))})),c.state=Lp),l.promise()};bi.on("complete",(({tabId:e,sender:t,url:n})=>{if(!wn.values.enabled||!["https:","http:","file:"].some((e=>n.startsWith(e))))return;const r=th(e,t),s=t.id,i=r.frames[s];i.state,i.state=Pp,Lo(t)&&(oh==e&&sh(n,e),"auto"==wn.values.scriptUrlDetection&&n.startsWith(QA)&&WA(n,e))})),bi.on("unload",(({tabId:e,sender:t})=>{fh(e,t);const n=th(e,t),r=t.id;n.frames[r].state=Np,Kp(e,t,!0),Hp(e),delete n.frames[r]})), bi.on("remove",(({tabId:e})=>{const t=qp[e];t&&Object.values(t.frames).forEach((t=>{fh(e,t.sender)})),Wp(e)})),bi.on("error",(({tabId:e,sender:t,url:n})=>{Lo(t)&&"auto"==wn.values.scriptUrlDetection&&n.startsWith(QA)&&WA(n,e)})),bi.on("frameStart",(({tabId:e,sender:t})=>{((e,t)=>{$p(e,t,void 0,void 0,void 0,void 0,!0)})(e,t),Hp(e)})),bi.on("frameStop",(({tabId:e,sender:t})=>{Kp(e,t),Hp(e)}));const wh=()=>{ft.lastError&&ft.lastError},bh={init:()=>{if(!_t.supported)return;bh.setIcon() ;let e=wn.values.appearance_badge_color||"#ee3131";"#"===e[0]||e.startsWith("rgb")||(e="#"+e),_t.setBadgeBackgroundColor({color:e}),e=wn.values.appearance_badge_text_color||"#ffffff","#"===e[0]||e.startsWith("rgb")||(e="#"+e),_t.setBadgeTextColor({color:e})},setIcon:(e,t)=>{if(!_t.supported||void 0!==e&&e<0)return;let n,r,s;if(t)s=!0;else if(void 0!==e){const t=Ah(e);void 0!==t&&(s=t)}s?n=wn.values.enabled&&void 0!==e?"":"_grey":(n="_forbidden", r=Qr.getMessage("Some_URLs_are_restricted_by_your_browser_or_a_setting_")),v.debug("badge: set icon "+n);const i={path:ht.getURL("images/icon"+n+".png")},o={title:r||ht.manifest.name};void 0!==e&&(i.tabId=e,o.tabId=e);try{_t.setIcon(i,wh),_t.setTitle(o)}catch(e){v.warn("bg: ERROR while setIcon! "+e.message)}},setBadge:(e,t)=>{if(!_t.supported||e<0)return;let n=0 ;t||"off"==wn.values.appearance_badges?n=0:"active"==wn.values.appearance_badges?e&&(n=dh(e).executed?" ":null):"alltime"==wn.values.appearance_badges?e&&(n=dh(e).executed||0):"running"==wn.values.appearance_badges?e&&(n=dh(e).active||0):"running_unique"==wn.values.appearance_badges&&e&&(n=dh(e,!0).unique||0);let r=n?`${n}`:"";if(wn.values.userscript_search_url&&"badge"==wn.values.userscript_search_mode){const t=dh(e).searched||0;if(t>0){let e="" ;null==n||"string"==typeof n?r=`${t}`:(e=n>999?"":n>99||`${r}+${t}`.length>4?"+":`${t}`,r=`${r}+${e}`)}}v.debug("badge: set "+r),_t.setBadgeText({text:r,tabId:e})}},_h=bh,yh=e=>(()=>{const t=y();return"activate"==e?(_t.supported&&_t.openPopup(),t.resolve()):"toggle-enable"==e?(wn.values.enabled=!wn.values.enabled,t.resolve()):mt.getSelected(null,(n=>{if(!n)return void t.reject();let r;if("open-dashboard"==e)r=ht.getURL("options.html")+"#nav=dashboard";else{const t=n.url ;t?"open-dashboard-with-running-scripts"==e?r=ht.getURL("options.html")+"#nav=dashboard&filter="+ee(t):"open-new-script"==e&&(r=ht.getURL("options.html")+"#url="+We(t)+"&nav=new-user-script"):console.warn("cl: no URL in tab",n)}t.resolve(r?{url:r,active:!0,parent:n}:void 0)})),t.promise()})().then((e=>{e&&mt.create(e)})),kh=e=>!!e&&!("scripts"in e&&(!Array.isArray(e.scripts)||e.scripts.some((e=>{ return"object"!=typeof e||e.file_url&&"string"!=typeof e.file_url||"string"!=typeof e.source||e.options&&"object"!=typeof e.options||e.storage&&("object"!=typeof e.storage||!("object"==typeof(t=e.storage)&&null!==t&&"number"==typeof t.ts&&"object"==typeof t.data&&null!==t.data))||e.resources&&(!Array.isArray(e.resources)||e.resources.some((e=>!wd(e))))||e.requires&&(!Array.isArray(e.requires)||e.requires.some((e=>!wd(e))));var t })))||"global_settings"in e&&"object"!=typeof e.global_settings),Rh=an("managed","consumed");self.setTimeout=N;const xh=new Date;ae.down=Qa,ae.dast=nn,v.debug("Starting background fred @"+pp);const Eh=()=>{const e="temporary"==wn.values.incognito_mode&&ht.inIncognitoContext;nn.setTemporary(e),e&&(wn.values.sync_enabled=!1,wn.values.scriptUpdateCheckPeriod=0,wn.values.sync_type=0,wn.values.statistics_enabled=!1)},Sh=ae.init=async()=>{Qr.init(),_.init(),HA(!0),gl.init(),Sp.init(),It&&function(e){ if(!pt)throw new Error("commands.onCommand listener can only be registered during startup in non-persistent background pages!");C.commands.onCommand.addListener(e)}(yh),ft.setUninstallURL(`https://www.tampermonkey.net/uninstall.php?ext=${ft.short_id}`),(e=>{Wr=e})(zl),_t.supported&&(_t.setIcon({path:ht.getURL("images/icon_grey.png")}),_t.setPopup({popup:"action.html"}),_t.setTitle({title:"Tampermonkey"})),ft.onUpdateAvailable.addListener(vi.onUpdateAvailable),ft.onInstalled.addListener((e=>{ v.log("bg: onInstalled",e);const t=e.reason||"unknown";_.ensureLate((()=>{"install"==t?(G.SECURE||sa.getUidList().forEach((e=>{const t=sa.getByUid(e);t.script&&t.cond&&t.script.evilness!=Uc.SEVERITY_FOISTED_SCRIPT&&(v.warn("content security: found unfamiliar script",t.script.name),t.script.evilness=Uc.SEVERITY_FOISTED_SCRIPT,sl.doModify(e,t.script,!1))})),vi.onInstalled()):"update"==t&&(e.previousVersion,vi.onUpdated(e.previousVersion))}))})),Yu.init();const e=ht.manifest.version;((e,t)=>{ Sr=`${(null==t?void 0:t.version)||""} `;const n=B.short_id;gr=(mr[n]||mr[Jn])(),Ae("error",(e=>{const{message:t,filename:n,lineno:r,colno:s,error:i}=e;((e,t,n,r,s)=>{let i="";if(s)try{i=s.stack||""}catch(e){}Zr(e.toString(),Sr+"bg@"+O.urls.prepareForReport(t||""),[n+":"+r,i].join(";"))})(t,n,r,s,i)}));const r=e=>{let t="";try{t=e.stack}catch(e){} Zr("CSP violation of "+e.effectiveDirective,Sr+"bg@"+O.urls.prepareForReport(e.documentURI),[e.sourceFile," -> ",e.lineNumber+":"+e.columnNumber,t].join(";"))};we?we.addEventListener("securitypolicyviolation",(e=>r(e))):Ae("securitypolicyviolation",(e=>r(e))),(null==t?void 0:t.started)&&(lr=Date.now()-t.started.getTime())})(0,{version:e,started:xh}),v.log("bg: listeners registered!");{let t,n=!1;const r=new Promise((e=>{t=e}));let s=10;const i=()=>{if(C&&C.storage&&C.storage.local)n=!0,t();else{ const t=`chrome.storage.local is not available on startup, wait ${s} ms`;v.error(t),Zr(t,e+"bg@"+ht.urls.prepareForReport(ne.href||"")),se((()=>i()),s),s=Math.min(1e3,2*s)}};i(),n||await r}const t=await Oi();v.debug("bg: init tab handling"),await(async()=>{_i.on("got",(({tabId:e,info:t})=>{t&&(Vp[e]=((e,t)=>{if(!e)return t;const{map:n,scripts:r,searched:s}=e,{map:i,scripts:o,searched:a}=t,c={map:{...n},scripts:{...r,...o},searched:{...s,...a}} ;for(const[e,{active:t,sender:r,scripts:s,urls:o}]of Object.entries(i)){const i=n[e];i?(i.active=t,i.urls=Ce(i.urls.concat(o)),i.scripts=Ce(i.scripts.concat(s))):c.map[e]={active:t,sender:r,scripts:s,urls:o}}return c})(Vp[e],t),Hp(e,!0))})),_i.on("get",(({tabId:e})=>Qp(e)))})(),await(()=>{const e=y(),t="0.0.0.0";let n,r;const s=ht.manifest.version;let i,o;const a=e=>`!extdb.${e}`;let c=a;return ia.init().then((()=>{let e=ia.getValue(c(oa),!0);void 0===e&&(e=ia.getValue(oa,!0), void 0===e?e="3.5":c=e=>e),i=o=e,r=ia.getValue(c(ca),!0)||ia.getValue(ua,!0)||(xe?xe.getItem(ua):null)||t,n=ls(s,r)==ls.eNEWER})).then((()=>{if("localStorage"===G.DEFAULT||!xe)return y.Pledge(!1);const e=y(),t=ia.getValue(c(ca));let n=!1;return xe.getItem(c(ua))&&!t&&(ia.listValues().length?v.error("storage: unable to find version information"):n=!0),e.resolve(n),e.promise()})).then((e=>{if(!n&&e){ const e=["Tampermonkey detected inconsistencies that indicate that your browser wiped the extension database!","You can continue to use Tampermonkey normally, but your settings and scripts might be lost. Click here to get more information.","https://www.tampermonkey.net/faq.php#Q207"];v.error(e.join("\n")),((e,t,n)=>{gs.push({text:e,description:t,url:n})})(...e)}})).always((()=>{let c=0;const l=()=>{if(c{c++,l()},n=d[c].schema;d[c].cond(n)?d[c].fn().done((()=>{ n&&(v.info("Converted database from",o,"to",n),o=n),t()})).fail((()=>{e.reject()})):t()}},u=()=>{v.error("Incognito mode detected. Database conversion can only be done in non-incognito mode! Stopping now..."),((e,t,n)=>{const r={title:e.join("\n\n")},s=t?"_"+t:"",i=ht.getURL("images/icon"+s+".png");v.warn(e.join("\n")),_t.supported&&(_t.setIcon({path:i}),_t.setTitle(r)),n||ht.onMessage.addDynamicListener(((t,n,r)=>{const s={name:"1",id:"1",sub_menu_item:!0,pos:"left",items:[]};s.items.push({ name:e[0],image:"info"}),e.length>1&&s.items.push({name:e[1]}),r({items:[s],options:{enabled:!1}})}))})(["Tampermonkey needs to convert its database but this can't be done in incogonito mode!","Please open a non-incognito mode window and/or restart your browser."],"paused")},d=[{cond:()=>n&&ls("3.6.3650",o)==ls.eNEWER&&ls("3.5.3650",r)==ls.eNEWER,fn:async()=>{if(ht.inIncognitoContext)throw u(),new Error("can't migrate in incognito mode!");{o="3.6.3650";const e=[];[{o:"TM_config",n:aa},{ o:"TM_update_check",n:la},{o:"TM_version"},{o:"TM_unload_ts"}].forEach((t=>{if(t.n){const n=ia.getValue(t.o);void 0!==n&&e.push(ia.setValue(t.n,n))}e.push(ia.deleteValue(t.o))}));let t=new RegExp("@re$");const n=[];ia.listValues().forEach((e=>{if(-1==e.search(t))return;const r=e.replace(t,"");n.push(r)})),n.forEach((t=>{const n=ia.getValue(t+"@st"),r=ia.getValue(t),s=ia.getValue(t+"@re"),i=ia.getValue(t+"@source"),o=sa.getUidByName(t)||Pe();e.push(ia.deleteValue(t+"@st")), e.push(ia.deleteValue(t)),e.push(ia.deleteValue(t+"@re")),e.push(ia.deleteValue(t+"@source")),r&&s&&i?(e.push(ia.setValue(da+o,t)),e.push(ia.setValue(Aa+o,s)),e.push(ia.setValue(pa+o,n)),e.push(ia.setValue(ha+o,i)),e.push(ia.setValue(fa+o,r))):v.error("invalid script entry",{source:i,meta:r,cond:s})})),t=new RegExp("@st$"),ia.listValues().forEach((n=>{-1!=n.search(t)&&e.push(ia.deleteValue(n))})),await y.heal(e).done((()=>{v.info("Converted database from",r,"to",o)}))}}},{schema:"3.7.0", cond:e=>ls(e,o)==ls.eNEWER,fn:async()=>{if(ht.inIncognitoContext)throw u(),new Error("can't migrate in incognito mode!");{const e=[];ia.listValues().forEach((t=>{if(!t.startsWith(fa))return;const n=ia.getValue(t);if(n&&n.options&&n.options.override&&!n.options.override.orig_run_at){n.options.override.orig_run_at=n.options.run_at||"document-idle",n.options.run_at=null;const r={...n};e.push(ia.setValue(t,r))}})),await y.heal(e)}}},{schema:"5465",cond:e=>ls(e,o)==ls.eNEWER,fn:async()=>{ if(ht.inIncognitoContext)throw u(),new Error("can't migrate in incognito mode!");{const e=ia.getValue(aa,!0);e&&1==e.sync_version&&(e.sync_enabled=!1,await y.heal(ia.setValue(aa,e,!0)))}}},{schema:"6226",cond:e=>ls(e,o)==ls.eNEWER,fn:async()=>{if(ht.inIncognitoContext)throw u(),new Error("can't migrate in incognito mode!");{const e=[oa,"#storage",aa,"#session",ca,"#laststart",la,"#begging"],t=[da,Aa,pa,ha,"@ext#",fa],n="#misc_config",r=["TM_version","@state#"],s=[];let i=[] ;for(const o of ia.listValues()){const c=ia.getValue(o,!0);if(i.length>50&&(await y.heal(i),i=[]),void 0===c)v.error(`Unable to migrate key ${o} because it's empty!`);else if(o.startsWith(n)){const e=o.slice(n.length);i.push(ia.setValue(`!misc.${e}`,c,!0))}else r.some((e=>o.startsWith(e)))?(v.info(`Dropping key ${o} because it's not needed anymore!`),i.push(ia.deleteValue(o))):e.includes(o)||t.some((e=>o.startsWith(e)))?i.push(ia.setValue(a(o),c,!0).fail((()=>{ v.error(`Unable to migrate key ${o}! A backup is available at the database root.`)})).then((()=>ia.deleteValue(o).fail((()=>v.error(`Unable to delete migrated key ${o}!`)))))):s.includes(o)||v.error(`Unable to migrate unknown or already migrated key ${o}!`)}await y.heal(i)}}},{cond:()=>n||ls(o,i)==ls.eNEWER,fn:()=>y.heal([ia.setValue(a(ca),s,!0),ia.setValue(a(oa),o,!0)])},{cond:()=>n,fn:()=>(v.info("First run of version "+s+"!"),vi.scheduleNotification(r,r==t),y.Pledge())},{cond:()=>!0, fn:async()=>{const t=y();return e.resolve(),await null,t.resolve(),t.promise()}}];l()})),e.promise()})();const n=await(async()=>await(async()=>{const e=await(async()=>{const e=await(async()=>{let e;if(!xt.managed.supported)return e;for(let t=5;!e&&t>0;--t)5!==t&&console.warn(`Managed storage is slow or not responding! Retrying (attempt ${5-t})...`),await Promise.race([new Promise((e=>se((()=>e(!1)),200))),new Promise((t=>{xt.managed.get(["jsonImport"],(n=>{e=n,t(!0)}))}))]);return e})();return{ ...e}})();if(!e||!e.jsonImport)return;const t=e.jsonImport;if(!t.length)return;const n=await Rh.get(),r=t.filter((e=>"string"==typeof e.hash&&!n[e.hash]));let s;const i=[];for(const e of r){const{hash:t,url:n,haltOnError:r,installAsSystemScripts:o}=e,a=e=>{if(r)throw new Error(e);console.error(`provisioning[${t.substr(0,8)}]: ${e}`)};console.info(`provisioning[${t.substr(0,8)}]: start downloading from ${n}`);const[c,l]=t.split(":");if("1"!==c){a("Invalid provisioning jsonImport hash version") ;continue}let u;try{u=(await new Promise(((e,t)=>{Uo.internal({method:"GET",url:n,responseType:"json",timeout:6e5},{onload:t=>e(t),onerror:e=>t(e),ontimeout:()=>t("timeout")})}))).response}catch(e){}if(!u){a(`Failed to load provisioning jsonImport from ${n}`);continue}if(!kh(u)){a(`Invalid provisioning jsonImport from ${n}`);continue}const d=await No(u);if(d!==l){a(`Hash mismatch for provisioning jsonImport from ${n}: expected 1:${l} !== calculated 1:${d}`);continue}let A=!1 ;const{version:p,scripts:h,settings:f}=u;if("1"===p){if(h)for(const e of h)i.push((async()=>{const n=Pe(),{file_url:r,source:s,storage:i,options:c,resources:l,requires:u}=e,d=Qe(Xe(s));let p;try{p=await sl.doSave({uuid:n,url:r,src:d,ask:!1,force_options:c,force_settings:"enabled"in e||"position"in e?{enabled:e.enabled,position:e.position}:void 0,defaultscript:!1!==o,replace:!0,internal:!0})}catch(e){}if(p&&p.installed){ if(console.info(`provisioning[${t.substr(0,8)}]: installed jsonImport script ${e.name}([uuid: ${n}])`),[l,u].forEach((e=>{e&&e.forEach((e=>Lc.setElement(n,e.url,{content:e.content||"",meta:e.mimetype||"text/javascript"},e.modified)))})),i)try{await sa.setStorageByUid(n,{data:i.data||{},ts:i.ts||Date.now()})}catch(t){return void a(`Failed to set storage for jsonImport script from ${e.file_url}`)}A=!0}else a(`Failed to install jsonImport script from ${e.file_url}`)}));f&&(s||(s={}),s={...s,...f}, console.info(`provisioning[${t.substr(0,8)}]: imported global settings`)),i.push((async()=>{A?(Gr("installed",t.substr(0,8)),await Rh.set({[e.hash]:Date.now()}),console.info(`provisioning[${t.substr(0,8)}]: successfully applied`)):console.warn(`provisioning[${t.substr(0,8)}]: failed to apply`)}))}else a(`Invalid provisioning jsonImport version from ${n}: expected 1 !== retrieved ${p}`)}if(s){const e=new ze("");await e.set(I.STORAGE.CONFIG,s),Xt=e, console.info("provisioning[*]: global settings set")}return i.length?async()=>{for(const e of i)await e()}:void 0})())();v.debug("bg: init storage handling"),await nn.init(),await y.Pledge(),v.debug("bg: init config"),await wn.init(),n&&await n(),ae.cfgo=wn,Eh(),(e=>{if(v.set(wn.values.logLevel),Qr.setLocale(wn.values.i18n),wn.values.userscript_search_url){const e=()=>{(({url:e,mode:t})=>{Dl=Uo.internal,"string"==typeof e?Tl=Bl=e:(Tl=(e=>{const t=e.api||e.www ;return`${e.protocol}//${t?t+".":""}${e.domain}`})(e),Bl=(e=>{const t=e.www;return`${e.protocol}//${t?t+".":""}${e.domain}`})(e)),jl=t,Ol=Qr.getLocale()||Qr.getUiLocale()})({url:["dhdg","gcal","fire","iikm","mfdh","fcmf"].includes(ft.short_id)?sn:wn.values.userscript_search_url,mode:wn.values.userscript_search_mode})};wn.addChangeListener("userscript_search_mode",e),e()}var t,n,r,s,i,o;t=sl.doModify,n=sa.getByUid,Pc=t,Nc=n,oo={prefix:void 0,mozAnon:!1},void 0!==(r=Wi)&&(lo=r), void 0!==(s=op)&&(co=s),void 0!==(i=lp)&&(ao=i),void 0!==(o=ba)&&(io=o),Uo.init(),_.ensureLate((()=>{e&&(cr=e);const t=wn.values.statistics_enabled;null===t?ci.all({key:"stats",domain:"stats",class:"information",title:Qr.getMessage("Anonymous_statistics"),text:Qr.getMessage("Please_enable_anonymous_statistics_and_help_to_improve_this_extension_"),info_url:"https://www.tampermonkey.net/privacy.php",timeout:864e5,buttons:[{text:Qr.getMessage("Enable"),id:"enable_stats"},{text:Qr.getMessage("No"), id:"disable_stats"}]}):Cr(!!t)})),bi.on("reset",(({tabId:e,early:t})=>{(e=>{const t=Object.values(Su).filter((t=>t.tabId==e));for(const e of t)delete Su[e.menuId]})(e),t||_h.setIcon(e)}));const a=(e,t)=>{e>=0&&mt.get(e,(n=>{!ft.lastError&&n&&(_h.setIcon(e,t),_h.setBadge(e,t))}))};bi.on("commited",(({tabId:e,sender:t})=>{Lo(t)&&a(e,!0)})),bi.on("complete",(({tabId:e})=>a(e))),bi.on("reset",(({tabId:e})=>Yc.purgeAppeals(e))),bi.on("remove",(({tabId:e})=>{Yc.purgeAppeals(e),(e=>{delete nd[e]})(e) })),xu.init(),Gl.init(),Uc.init(),sa.init(),Qa.init(),Ka.init(),HA(),ld.init(),td(),$a=ba})(!0===t),wn.addChangeListener("logLevel",(()=>{v.set(wn.values.logLevel)})),wn.addChangeListener("i18n",(()=>{Qr.setLocale(wn.values.i18n)})),wn.addChangeListener("incognito_mode",(()=>{Eh()})),wn.addChangeListener("statistics_enabled",(()=>{Cr(!!wn.values.statistics_enabled)})),wn.addChangeListener("context_menu_enabled",(()=>{wn.values.context_menu_enabled||Yu.clear()})), wn.addChangeListener(["require_blacklist","script_blacklist_server","script_blacklist_type"],sl.blackCheckAll),wn.addChangeListener("webrequest_modHeaders",((e,t,n,r)=>{null==r||r.done((()=>se(Xa.reset,1)))})),wn.addChangeListener(["appearance_badge_color","appearance_badge_text_color"],_h.init),wn.addChangeListener("script_include_mode",(()=>$o.removeAll())),_h.init(),v.debug("bg: init user agent infos"),await(async()=>{let e,t,n;try{ const r=navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues?await navigator.userAgentData.getHighEntropyValues(["fullVersionList"]):void 0;r&&(e=r.fullVersionList,t=r.mobile,n=r.platform)}catch(e){}if(!e){const r=navigator&&navigator.userAgentData;r&&(e=r.brands,t=r.mobile,n=r.platform)}const{arch:r,os:s}=await new Promise((e=>B.getPlatformInfo((t=>e(t||{}))))),{name:i,version:o}=await new Promise((e=>B.getBrowserInfo((t=>e(t||{})))));return nu={brands:e||[{brand:i||"", version:o||""}],mobile:void 0===t?S():t,platform:(s?{mac:"macOS",win:"Windows",android:"Android",cros:"Chrome OS",linux:"Linux",openbsd:"Open/FreeBSD",fuchsia:"Fuchsia"}[s]:void 0)||n,...r?{arm64:{bitness:"64",architecture:"arm"},mips64:{bitness:"64",architecture:"mips"},"x86-32":{bitness:"32",architecture:"x86"},"x86-64":{bitness:"64",architecture:"x86"}}[r]:{architecture:r}},nu})(),v.debug("bg: init script injection handling"),await Promise.race([(async()=>{await Promise.all([UA(),dp()]) })(),(async()=>{await F(1e4),_.late||v.warn("bg: initialization of script injection handling took too long, continue anyway")})()]),sl.clean(),await y.Pledge(),v.log(`bg: ready! [sessionStart=${t}]`),_.setReady(),(async()=>{await(async()=>{const e=await kc.get();for(const t of Object.values(e))if("number"!=typeof t&&t.expires&&t.expires{const e=await kc.get();return Object.values(e).filter(yc).map((e=>Ec(e)))})() ;for(const t of e){const e={domain:"status",...t};"actions"==t.realm?ci.actionPage(e):"options"==t.realm?ci.optionsPage(e):ci.all(e)}})()},Ch=Sh;{try{importScripts("/test.js")}catch(e){console.error(e)}const e=globalThis,{skipWaiting:t,clients:n}=e;try{e.oninstall=()=>t(),e.onactivate=()=>n.claim()}catch(e){console.error(e)}}Ch()})()})();