mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
3 lines
58 KiB
JavaScript
3 lines
58 KiB
JavaScript
|
|
var Kt={},Pt={};Pt.byteLength=oe,Pt.toByteArray=se,Pt.fromByteArray=he;for(var ht=[],rt=[],ne=typeof Uint8Array<"u"?Uint8Array:Array,Gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vt=0,re=Gt.length;vt<re;++vt)ht[vt]=Gt[vt],rt[Gt.charCodeAt(vt)]=vt;rt[45]=62,rt[95]=63;function Zt(E){var m=E.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var O=E.indexOf("=");O===-1&&(O=m);var A=O===m?0:4-O%4;return[O,A]}function oe(E){var m=Zt(E),O=m[0],A=m[1];return(O+A)*3/4-A}function ie(E,m,O){return(m+O)*3/4-O}function se(E){var m,O=Zt(E),A=O[0],U=O[1],B=new ne(ie(E,A,U)),v=0,S=U>0?A-4:A,_;for(_=0;_<S;_+=4)m=rt[E.charCodeAt(_)]<<18|rt[E.charCodeAt(_+1)]<<12|rt[E.charCodeAt(_+2)]<<6|rt[E.charCodeAt(_+3)],B[v++]=m>>16&255,B[v++]=m>>8&255,B[v++]=m&255;return U===2&&(m=rt[E.charCodeAt(_)]<<2|rt[E.charCodeAt(_+1)]>>4,B[v++]=m&255),U===1&&(m=rt[E.charCodeAt(_)]<<10|rt[E.charCodeAt(_+1)]<<4|rt[E.charCodeAt(_+2)]>>2,B[v++]=m>>8&255,B[v++]=m&255),B}function fe(E){return ht[E>>18&63]+ht[E>>12&63]+ht[E>>6&63]+ht[E&63]}function ue(E,m,O){for(var A,U=[],B=m;B<O;B+=3)A=(E[B]<<16&16711680)+(E[B+1]<<8&65280)+(E[B+2]&255),U.push(fe(A));return U.join("")}function he(E){for(var m,O=E.length,A=O%3,U=[],B=16383,v=0,S=O-A;v<S;v+=B)U.push(ue(E,v,v+B>S?S:v+B));return A===1?(m=E[O-1],U.push(ht[m>>2]+ht[m<<4&63]+"==")):A===2&&(m=(E[O-2]<<8)+E[O-1],U.push(ht[m>>10]+ht[m>>4&63]+ht[m<<2&63]+"=")),U.join("")}var Wt={};Wt.read=function(E,m,O,A,U){var B,v,S=U*8-A-1,_=(1<<S)-1,C=_>>1,a=-7,q=O?U-1:0,et=O?-1:1,K=E[m+q];for(q+=et,B=K&(1<<-a)-1,K>>=-a,a+=S;a>0;B=B*256+E[m+q],q+=et,a-=8);for(v=B&(1<<-a)-1,B>>=-a,a+=A;a>0;v=v*256+E[m+q],q+=et,a-=8);if(B===0)B=1-C;else{if(B===_)return v?NaN:(K?-1:1)*(1/0);v=v+Math.pow(2,A),B=B-C}return(K?-1:1)*v*Math.pow(2,B-A)},Wt.write=function(E,m,O,A,U,B){var v,S,_,C=B*8-U-1,a=(1<<C)-1,q=a>>1,et=U===23?Math.pow(2,-24)-Math.pow(2,-77):0,K=A?0:B-1,ot=A?1:-1,wt=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(S=isNaN(m)?1:0,v=a):(v=Math.floor(Math.log(m)/Math.LN2),m*(_=Math.pow(2,-v))<1&&(v--,_*=2),v+q>=1?m+=et/_:m+=et*Math.pow(2,1-q),m*_>=2&&(v++,_/=2),v+q>=a?(S=0,v=a):v+q>=1?(S=(m*_-1)*Math.pow(2,U),v=v+q):(S=m*Math.pow(2,q-1)*Math.pow(2,U),v=0));U>=8;E[O+K]=S&255,K+=ot,S/=256,U-=8);for(v=v<<U|S,C+=U;C>0;E[O+K]=v&255,K+=ot,v/=256,C-=8);E[O+K-ot]|=wt*128};(function(E){const m=Pt,O=Wt,A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;E.Buffer=a,E.SlowBuffer=L,E.INSPECT_MAX_BYTES=50;const U=2147483647;E.kMaxLength=U;const{Uint8Array:B,ArrayBuffer:v,SharedArrayBuffer:S}=globalThis;a.TYPED_ARRAY_SUPPORT=_(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function _(){try{const t=new B(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,B.prototype),Object.setPrototypeOf(t,n),t.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function C(t){if(t>U)throw new RangeError('The value "'+t+'" is invalid for option "size"');const n=new B(t);return Object.setPrototypeOf(n,a.prototype),n}function a(t,n,o){if(typeof t=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ot(t)}return q(t,n,o)}a.poolSize=8192;function q(t,n,o){if(typeof t=="string")return wt(t,n);if(v.isView(t))return g(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(nt(t,v)||t&&nt(t.buffer,v)||typeof S<"u"&&(nt(t,S)||t&&nt(t.buffer,S)))return y(t,n,o);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const s=t.va
|
||
|
|
//# sourceMappingURL=string_decoder-BO00msnV.chunk.mjs.map
|