Rules-For-Quantumult-X/Scripts/AdBlock/Other/Youtube.min.js

3 lines
42 KiB
JavaScript
Raw Normal View History

// Author Maasea Build: 2023/12/14 22:12:09
(()=>{(function(i){function e(){}function t(){}var r=String.fromCharCode,n={}.toString,s=n.call(i.SharedArrayBuffer),o=n(),a=i.Uint8Array,f=a||Array,l=a?ArrayBuffer:f,h=l.isView||function(b){return b&&"length"in b},y=n.call(l.prototype);l=t.prototype;var p=i.TextEncoder,c=new(a?Uint16Array:f)(32);e.prototype.decode=function(b){if(!h(b)){var A=n.call(b);if(A!==y&&A!==s&&A!==o)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");b=a?new f(b):b||[]}for(var N=A="",d=0,I=b.length|0,G=I-32|0,B,x,E=0,J=0,V,U=0,D=-1;d<I;){for(B=d<=G?32:I-d|0;U<B;d=d+1|0,U=U+1|0){switch(x=b[d]&255,x>>4){case 15:if(V=b[d=d+1|0]&255,V>>6!==2||247<x){d=d-1|0;break}E=(x&7)<<6|V&63,J=5,x=256;case 14:V=b[d=d+1|0]&255,E<<=6,E|=(x&15)<<6|V&63,J=V>>6===2?J+4|0:24,x=x+256&768;case 13:case 12:V=b[d=d+1|0]&255,E<<=6,E|=(x&31)<<6|V&63,J=J+7|0,d<I&&V>>6===2&&E>>J&&1114112>E?(x=E,E=E-65536|0,0<=E&&(D=(E>>10)+55296|0,x=(E&1023)+56320|0,31>U?(c[U]=D,U=U+1|0,D=-1):(V=D,D=x,x=V))):(x>>=8,d=d-x-1|0,x=65533),E=J=0,B=d<=G?32:I-d|0;default:c[U]=x;continue;case 11:case 10:case 9:case 8:}c[U]=65533}if(N+=r(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[15],c[16],c[17],c[18],c[19],c[20],c[21],c[22],c[23],c[24],c[25],c[26],c[27],c[28],c[29],c[30],c[31]),32>U&&(N=N.slice(0,U-32|0)),d<I){if(c[0]=D,U=~D>>>31,D=-1,N.length<A.length)continue}else D!==-1&&(N+=r(D));A+=N,N=""}return A},l.encode=function(b){b=b===void 0?"":""+b;var A=b.length|0,N=new f((A<<1)+8|0),d,I=0,G=!a;for(d=0;d<A;d=d+1|0,I=I+1|0){var B=b.charCodeAt(d)|0;if(127>=B)N[I]=B;else{if(2047>=B)N[I]=192|B>>6;else{e:{if(55296<=B)if(56319>=B){var x=b.charCodeAt(d=d+1|0)|0;if(56320<=x&&57343>=x){if(B=(B<<10)+x-56613888|0,65535<B){N[I]=240|B>>18,N[I=I+1|0]=128|B>>12&63,N[I=I+1|0]=128|B>>6&63,N[I=I+1|0]=128|B&63;continue}break e}B=65533}else 57343>=B&&(B=65533);!G&&d<<1<I&&d<<1<(I-7|0)&&(G=!0,x=new f(3*A),x.set(N),N=x)}N[I]=224|B>>12,N[I=I+1|0]=128|B>>6&63}N[I=I+1|0]=128|B&63}}return a?N.subarray(0,I):N.slice(0,I)},p||(i.TextDecoder=e,i.TextEncoder=t)})(globalThis);function Z(i){let e=typeof i;if(e=="object"){if(Array.isArray(i))return"array";if(i===null)return"null"}return e}function Be(i){return i!==null&&typeof i=="object"&&!Array.isArray(i)}var L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),z=[];for(let i=0;i<L.length;i++)z[L[i].charCodeAt(0)]=i;z["-".charCodeAt(0)]=L.indexOf("+");z["_".charCodeAt(0)]=L.indexOf("/");function Oe(i){let e=i.length*3/4;i[i.length-2]=="="?e-=2:i[i.length-1]=="="&&(e-=1);let t=new Uint8Array(e),r=0,n=0,s,o=0;for(let a=0;a<i.length;a++){if(s=z[i.charCodeAt(a)],s===void 0)switch(i[a]){case"=":n=0;case`
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(n){case 0:o=s,n=1;break;case 1:t[r++]=o<<2|(s&48)>>4,o=s,n=2;break;case 2:t[r++]=(o&15)<<4|(s&60)>>2,o=s,n=3;break;case 3:t[r++]=(o&3)<<6|s,n=0;break}}if(n==1)throw Error("invalid base64 string.");return t.subarray(0,r)}function Fe(i){let e="",t=0,r,n=0;for(let s=0;s<i.length;s++)switch(r=i[s],t){case 0:e+=L[r>>2],n=(r&3)<<4,t=1;break;case 1:e+=L[n|r>>4],n=(r&15)<<2,t=2;break;case 2:e+=L[n|r>>6],e+=L[r&63],t=0;break}return t&&(e+=L[n],e+="=",t==1&&(e+="=")),e}var O;(function(i){i.symbol=Symbol.for("protobuf-ts/unknown"),i.onRead=(t,r,n,s,o)=>{(e(r)?r[i.symbol]:r[i.symbol]=[]).push({no:n,wireType:s,data:o})},i.onWrite=(t,r,n)=>{for(let{no:s,wireType:o,data:a}of i.list(r))n.tag(s,o).raw(a)},i.list=(t,r)=>{if(e(t)){let n=t[i.symbol];return r?n.filter(s=>s.no==r):n}return[]},i.last=(t,r)=>i.list(t,r).slice(-1)[0];let e=t=>t&&Array.isArray(t[i.symbol])})(O||(O={}));var g;(function(i){i[i.Varint=0]="Varint",i[i.Bit64=1]="Bit64",i[i.LengthDelimited=2]="LengthDelimited",i[i.StartGroup=3]="StartGroup",i[i.EndGroup=4]="EndGroup",i[i.Bit32=5]="Bit32"})(g||(g={}));function Ee(){let i=0,e=0;for(let r=0;r<28;r+=7){let n=this.buf[this.pos++];if(i|=(n&127)<<r,!(n&128))return this.assertBounds(),[i,e]}let t=this.buf[this.pos++];if(i|=(t&15)<<28,e=(t&112)>>4,!(t&128))return this.assertBounds(),[i,e];for(let r=3;r<=31;r+=7){let n=this.buf[this.pos++];if(e|=(n&127)<<r,!(n&128))return this.assertBounds(),[i,e]}throw new Error("invalid varint")}function H(i,e,t){for(let s=0;s<28;s=s+7){let o=i>>>s,a=!(!(o>>>7)&&e==0),f=(a?o|128:o)&255;if(t.push(f),!a)return}let r=i>>>28&15|(e&7)<<4,n=!!(e>>3);if(t.push((n?r|128:r)&255),!!n){for(let s=3;s<31;s=s+7){let o=e>>>s,a=!!(o>>>7),f=(a?o|128:o)&255;if(t.push(f),!a)return}t.push(e>>>31&1)}}var Q=(1<<16)*(1<<16);function de(i){let e=i[0]=="-";e&&(i=i.slice(1));let t=1e6,r=0,n=0;function s(o,a){let f=Number(i.slice(o,a));n*=t,r=r*t+f,r>=Q&&(n=n+(r/Q|0),r=r%Q)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[e,r,n]}function ee(i,e){if(e<=2097151)return""+(Q*e+(i>>>0));let t=i&16777215,r=(i>>>24|e<<8)>>>0&16777215,n=e>>16&65535,s=t+r*6777216+n*6710656,o=r+n*8147497,a=n*2,f=1e7;s>=f&&(o+=Math.floor(s/f),s%=f),o>=f&&(a+=Math.floor(o/f),o%=f);function l(h,y){let p=h?String(h):"";return y?"0000000".slice(p.length)+p:p}return l(a,0)+l(o,a)+l(s,1)}function me(i,e){if(i>=0){for(;i>127;)e.push(i&127|128),i=i>>>7;e.push(i)}else{for(let t=0;t<9;t++)e.push(i&127|128),i=i>>7;e.push(1)}}function Re(){let i=this.buf[this.pos++],e=i&127;if(!(i&128))return this.assertBounds(),e;if(i=this.buf[this.pos++],e|=(i&127)<<7,!(i&128))return this.assertBounds(),e;if(i=this.buf[this.pos++],e|=(i&127)<<14,!(i&128))return this.assertBounds(),e;if(i=this.buf[this.pos++],e|=(i&127)<<21,!(i&128))return this.assertBounds(),e;i=this.buf[this.pos++],e|=(i&15)<<28;for(let t=5;i&128&&t<10;t++)i=this.buf[this.pos++];if(i&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}function _e(){let i=new DataView(new ArrayBuffer(8));return globalThis.BigInt!==void 0&&typeof i.getBigInt64=="function"&&typeof i.getBigUint64=="function"&&typeof i.setBigInt64=="function"&&typeof i.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:i}:void 0}var k=_e();function Ae(i){if(!i)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var Se=/^-?[0-9]+$/,te=(1<<16)*(1<<16),re=class{constructor(e,t){this.lo=e|0,this.hi=t|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*te+(this.lo>>>0);if(!Number.isSafeInteger(e))throw new Error("cannot convert to safe number");return e}},T=class extends re{static from(e){if(k)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=k.C(e);case"number":if(e===0)return this.ZERO;e=k.C(e);case"bigint":if(!e)return this.ZERO;if(e<k.UMIN)throw new Error("signed value for ulong");if(e>k.UMAX)thro