@zip.js/zip.js 2.8.43 → 2.8.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -37
- package/deno.json +21 -1
- package/dist/zip-core-external.js +194 -159
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +194 -131
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +246 -167
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +244 -139
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +267 -1761
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +269 -1735
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +268 -1734
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +196 -133
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +196 -133
- package/dist/zip-native.min.js +1 -1
- package/dist/zip-web-worker-native.js +1 -1
- package/dist/zip-web-worker.js +1 -1
- package/dist/zip.js +195 -132
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +31 -2
- package/index-native.cjs +269 -1735
- package/index-native.min.js +1 -1
- package/index.cjs +268 -1734
- package/index.d.cts +129 -8
- package/index.d.ts +129 -8
- package/index.min.js +1 -1
- package/lib/core/codec-pool.js +6 -2
- package/lib/core/codec-worker.js +2 -2
- package/lib/core/constants.js +4 -0
- package/lib/core/options.js +6 -0
- package/lib/core/streams/aes-crypto-stream.js +18 -21
- package/lib/core/streams/codec-stream.js +6 -2
- package/lib/core/streams/common-crypto.js +2 -0
- package/lib/core/streams/zip-entry-stream.js +16 -17
- package/lib/core/util/mime-type-data.js +3 -0
- package/lib/core/util/mime-type.js +23 -1596
- package/lib/core/web-worker-base.js +2 -2
- package/lib/core/web-worker-inline-native.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/web-worker-wasm.js +4 -8
- package/lib/core/zip-entry.js +11 -1
- package/lib/core/zip-fs.js +62 -5
- package/lib/core/zip-reader.js +80 -43
- package/lib/core/zip-writer.js +68 -45
- package/lib/zip-core-external.js +2 -0
- package/lib/zip-core-reader.js +2 -0
- package/lib/zip-fs-core-external.js +2 -0
- package/lib/zip-fs-external.js +2 -0
- package/lib/zip-mime-types.js +2 -0
- package/package.json +9 -3
- package/worker-message-property-names.js +1 -1
package/dist/zip-fs.js
CHANGED
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
const EXTRAFIELD_TYPE_USDZ = 0x1986;
|
|
72
72
|
const EXTRAFIELD_TYPE_INFOZIP = 0x7875;
|
|
73
73
|
const EXTRAFIELD_TYPE_UNIX = 0x7855;
|
|
74
|
+
const EXTRAFIELD_TYPE_UNIX_TYPE1 = 0x5855;
|
|
75
|
+
const EXTRAFIELD_TYPE_PKWARE_UNIX = 0x000d;
|
|
74
76
|
|
|
75
77
|
const BITFLAG_ENCRYPTED = 0b1;
|
|
76
78
|
const BITFLAG_LEVEL = 0b0110;
|
|
@@ -224,7 +226,7 @@
|
|
|
224
226
|
Object.assign(config, DEFAULT_CONFIGURATION);
|
|
225
227
|
}
|
|
226
228
|
|
|
227
|
-
function t$1(t){const e='(t=>{"function"==typeof define&&define.amd?define(t):t()})(function(){"use strict";const{Array:t,Object:e,Number:n,Math:s,Error:r,Uint8Array:o,Uint16Array:c,Uint32Array:i,Int32Array:a,Map:f,DataView:l,Promise:w,TextEncoder:u,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:g,DecompressionStream:S}=self,v=void 0,b="undefined",z="function",k=new o,C=[[],[],[],[],[],[],[],[]];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)e=1&e?e>>>1^3988292384:e>>>1;C[0][t]=e}for(let t=0;256>t;t++)for(let e=1;8>e;e++){const n=C[e-1][t];C[e][t]=n>>>8^C[0][255&n]}const[A,I,x,M,P,B,D,R]=C;class U{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let s=0;if(n>=8&&t.buffer){const r=new l(t.buffer,t.byteOffset,n),o=n-8;for(;o>=s;s+=8){const t=e^r.getInt32(s,!0),n=r.getInt32(s+4,!0);e=R[255&t]^D[t>>>8&255]^B[t>>>16&255]^P[t>>>24&255]^M[255&n]^x[n>>>8&255]^I[n>>>16&255]^A[n>>>24&255]}}for(;n>s;s++)e=e>>>8^A[255&(e^t[s])];this.o=e}get(){return~this.o}}class W extends d{constructor(){let t;const e=new U;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new o(4);new l(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function _(t,e){const n=new o(t.length+e.length);return n.set(t),n.set(e,t.length),n}function T(t){return new l(t.buffer,t.byteOffset,t.byteLength)}const V={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=V.l(n);return 32===s?t.concat(e):V.h(e,s,0|n,t.slice(0,t.length-1))},m(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+V.l(n)},S(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=V.v(e,t[n-1]&2147483648>>e-1,1)),t},v:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,l:t=>s.round(t/1099511627776)||32,h(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r<t.length;r++)s.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,o=V.l(r);return s.push(V.v(e+o&31,e+o>32?n:s.pop(),1)),s}},K={bytes:{C(t){const e=V.m(t)/8,n=new o(e);let s;for(let r=0;e>r;r++)3&r||(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},A(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3&~n||(e.push(s),s=0);return 3&n&&e.push(V.v(8*(3&n),s)),e}}},E=class{constructor(t){const e=this;e.blockSize=512,e.I=[1732584193,4023233417,2562383102,271733878,3285377520],e.M=[1518500249,1859775393,2400959708,3395469782],t?(e.P=t.P.slice(0),e.B=t.B.slice(0),e.D=t.D):e.reset()}reset(){const t=this;return t.P=t.I.slice(0),t.B=[],t.D=0,t}update(t){const e=this;"string"==typeof t&&(t=K.R.A(t));const n=e.B=V.concat(e.B,t),s=e.D,o=e.D=s+V.m(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const c=new i(n);let a=0;for(let t=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o>=t;t+=e.blockSize)e.U(c.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),e}W(){const t=this;let e=t.B;const n=t.P;e=V.concat(e,[V.v(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.D/4294967296)),e.push(0|t.D);e.length;)t.U(e.splice(0,16));return t.reset(),n}_(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}T(t,e){return e<<t|e>>>32-t}U(e){const n=this,r=n.P,o=t(80);for(let t=0;16>t;t++)o[t]=e[t];let c=r[0],i=r[1],a=r[2],f=r[3],l=r[4];for(let t=0;79>=t;t++){16>t||(o[t]=n.T(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n.T(5,c)+n._(t,i,a,f)+l+o[t]+n.M[s.floor(t/20)]|0;l=f,f=a,a=n.T(30,i),i=c,c=e}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+f|0,r[4]=r[4]+l|0}},F={importKey:t=>new F.V(K.bytes.A(t)),K(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const o=1+(s>>5)<<2;let c,i,a,f,w;const u=new ArrayBuffer(o),h=new l(u);let p=0;const d=V;for(e=K.bytes.A(e),w=1;(o||1)>p;w++){for(c=i=t.encrypt(d.concat(e,[w])),a=1;n>a;a++)for(i=t.encrypt(i),f=0;f<i.length;f++)c[f]^=i[f];for(a=0;(o||1)>p&&a<c.length;a++)h.setInt32(p,c[a]),p+=4}return u.slice(0,s/8)},V:class{constructor(t){const e=this,n=e.F=E,s=[[],[]];e.L=[new n,new n];const r=e.L[0].blockSize/32;t.length>r&&(t=(new n).update(t).W());for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e.L[0].update(s[0]),e.L[1].update(s[1]),e.O=new n(e.L[0])}reset(){const t=this;t.O=new t.F(t.L[0]),t.j=!1}update(t){this.j=!0,this.O.update(t)}digest(){const t=this,e=t.O.W(),n=new t.F(t.L[1]).update(e).W();return t.reset(),n}encrypt(t){if(this.j)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},L=typeof h!=b&&typeof h.getRandomValues==z,O="Invalid password",j="Invalid signature",H="zipjs-abort-check-password";function Z(t){if(L)return h.getRandomValues(t);throw new r("Crypto API not supported")}const N=16,q={name:"PBKDF2"},G=e.assign({hash:{name:"HMAC"}},q),J=e.assign({iterations:1e3,hash:{name:"SHA-1"}},q),Q=["deriveBits"],X=[8,12,16],Y=[16,24,32],$=10,tt=[0,0,0,0],et=typeof h!=b,nt=et&&h.subtle,st=et&&typeof nt!=b,rt=K.bytes,ot=class{constructor(t){const e=this;e.H=[[[],[],[],[],[]],[[],[],[],[],[]]],e.H[0][0][0]||e.Z();const n=e.H[0][4],s=e.H[1],o=t.length;let c,i,a,f=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(e.M=[i=t.slice(0),a=[]],c=o;4*o+28>c;c++){let t=i[c-1];(c%o===0||8===o&&c%o===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],c%o===0&&(t=t<<8^t>>>24^f<<24,f=f<<1^283*(f>>7))),i[c]=i[c-o]^t}for(let t=0;c;t++,c--){const e=i[3&t?c:c-4];a[t]=4>=c||4>t?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this.N(t,0)}decrypt(t){return this.N(t,1)}Z(){const t=this.H[0],e=this.H[1],n=t[4],s=e[4],r=[],o=[];let c,i,a,f;for(let t=0;256>t;t++)o[(r[t]=t<<1^283*(t>>7))^t]=t;for(let l=c=0;!n[l];l^=i||1,c=o[c]||1){let o=c^c<<1^c<<2^c<<3^c<<4;o=o>>8^255&o^99,n[l]=o,s[o]=l,f=r[a=r[i=r[l]]];let w=16843009*f^65537*a^257*i^16843008*l,u=257*r[o]^16843008*o;for(let n=0;4>n;n++)t[n][l]=u=u<<24^u>>>8,e[n][o]=w=w<<24^w>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}N(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.M[e],s=n.length/4-2,o=[0,0,0,0],c=this.H[e],i=c[0],a=c[1],f=c[2],l=c[3],w=c[4];let u,h,p,d=t[0]^n[0],y=t[e?3:1]^n[1],m=t[2]^n[2],g=t[e?1:3]^n[3],S=4;for(let t=0;s>t;t++)u=i[d>>>24]^a[y>>16&255]^f[m>>8&255]^l[255&g]^n[S],h=i[y>>>24]^a[m>>16&255]^f[g>>8&255]^l[255&d]^n[S+1],p=i[m>>>24]^a[g>>16&255]^f[d>>8&255]^l[255&y]^n[S+2],g=i[g>>>24]^a[d>>16&255]^f[y>>8&255]^l[255&m]^n[S+3],S+=4,d=u,y=h,m=p;for(let t=0;4>t;t++)o[e?3&-t:t]=w[d>>>24]<<24^w[y>>16&255]<<16^w[m>>8&255]<<8^w[255&g]^n[S++],u=d,d=y,y=m,m=g,g=u;return o}},ct=class{constructor(t,e){this.G=t,this.J=e,this.X=e}reset(){this.X=this.J}update(t){return this.Y(this.G,t,this.X)}$(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}return t}et(t){0===(t[0]=this.$(t[0]))&&(t[1]=this.$(t[1]))}Y(t,e,n){let s;if(!(s=e.length))return[];const r=V.m(e);for(let r=0;s>r;r+=4){this.et(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return V.S(e,r)}},it=F.V;let at=et&&st&&typeof nt.importKey==z,ft=et&&st&&typeof nt.deriveBits==z;class lt extends d{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:s}){super({start(){ut(this,t,e,n)},async transform(t,e){const n=this,{password:c,strength:i,nt:a,ready:f}=n;c?(await(async(t,e,n,s)=>{const o=await pt(t,e,n,yt(s,0,X[e])),c=yt(s,X[e]);if(o[0]!=c[0]||o[1]!=c[1])throw new r(O)})(n,i,c,yt(t,0,X[i]+2)),t=yt(t,X[i]+2),s?e.error(new r(H)):a()):await f;const l=new o(t.length-$-(t.length-$)%N);e.enqueue(ht(n,t,l,0,$,!0))},async flush(t){const{st:e,ot:n,pending:s,ready:o}=this;if(n&&e){await o;const c=yt(s,0,s.length-$),i=yt(s,s.length-$);let a=k;if(c.length){const t=gt(rt,c);n.update(t);const s=e.update(t);a=mt(rt,s)}const f=yt(mt(rt,n.digest()),0,$);let l=s.length<$?1:0;for(let t=0;$>t;t++)l|=f[t]^i[t];if(l)throw new r(j);t.enqueue(a)}}})}}class wt extends d{constructor({password:t,rawPassword:e,encryptionStrength:n}){let s;super({start(){ut(this,t,e,n)},async transform(t,e){const n=this,{password:s,strength:r,nt:c,ready:i}=n;let a=k;s?(a=await(async(t,e,n)=>{const s=Z(new o(X[e]));return _(s,await pt(t,e,n,s))})(n,r,s),c()):await i;const f=new o(a.length+t.length-t.length%N);f.set(a,0),e.enqueue(ht(n,t,f,a.length,0))},async flush(t){const{st:e,ot:n,pending:r,ready:o}=this;if(n&&e){await o;let c=k;if(r.length){const t=e.update(gt(rt,r));n.update(t),c=mt(rt,t)}s.signature=mt(rt,n.digest()).slice(0,$),t.enqueue(_(c,s.signature))}}}),s=this}}function ut(t,n,s,r){e.assign(t,{ready:new w(e=>t.nt=e),password:dt(n,s),strength:r-1,pending:k})}function ht(t,e,n,s,r,c){const{st:i,ot:a,pending:f}=t;f.length&&(e=_(f,e));const l=e.length-r;let w;for(n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new o(e)).set(n,0)}return t})(n,s+(l-l%N)),w=0;l-N>=w;w+=N){const t=gt(rt,yt(e,w,w+N));c&&a.update(t);const r=i.update(t);c||a.update(r),n.set(mt(rt,r),w+s)}return t.pending=yt(e,w),n}async function pt(n,s,r,c){n.password=null;const i=await(async(t,e,n,s,r)=>{if(!at)return F.importKey(e);try{return await nt.importKey("raw",e,n,!1,r)}catch{return at=!1,F.importKey(e)}})(0,r,G,0,Q),a=await(async(t,e,n)=>{if(!ft)return F.K(e,t.salt,J.iterations,n);try{return await nt.deriveBits(t,e,n)}catch{return ft=!1,F.K(e,t.salt,J.iterations,n)}})(e.assign({salt:c},J),i,8*(2*Y[s]+2)),f=new o(a),l=gt(rt,yt(f,0,Y[s])),w=gt(rt,yt(f,Y[s],2*Y[s])),u=yt(f,2*Y[s]);return e.assign(n,{keys:{key:l,ct:w,passwordVerification:u},st:new ct(new ot(l),t.from(tt)),ot:new it(w)}),u}function dt(t,e){return e===v?(t=>{if(typeof u==b){const e=new o((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new u).encode(t)})(t):e}function yt(t,e,n){return t.subarray(e,n)}function mt(t,e){return t.C(e)}function gt(t,e){return t.A(e)}class St extends d{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){bt(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=zt(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new r(O);t=t.subarray(12)}s?e.error(new r(H)):e.enqueue(zt(n,t))}})}}class vt extends d{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){bt(this,t,e,n)},transform(t,e){const n=this;let s,r;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=Z(new o(12));e[11]=n.passwordVerification,s=new o(t.length+e.length),s.set(kt(n,e),0),r=12}else s=new o(t.length),r=0;s.set(kt(n,t),r),e.enqueue(s)}})}}function bt(t,n,s,r){e.assign(t,{password:n,rawPassword:s,passwordVerification:r}),((t,n,s)=>{const r=[305419896,591751049,878082192];if(e.assign(t,{keys:r,it:new U(r[0]),ft:new U(r[2])}),s)for(let e=0;e<s.length;e++)Ct(t,s[e]);else for(let e=0;e<n.length;e++)Ct(t,n.charCodeAt(e))})(t,n,s)}function zt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=At(t)^e[s],Ct(t,n[s]);return n}function kt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=At(t)^e[s],Ct(t,e[s]);return n}function Ct(t,e){let[,n]=t.keys;t.it.append([e]);const r=~t.it.get();n=xt(s.imul(xt(n+It(r)),134775813)+1),t.ft.append([n>>>24]);const o=~t.ft.get();t.keys=[r,n,o]}function At(t){const e=2|t.keys[2];return It(s.imul(e,1^e)>>>8)}function It(t){return 255&t}function xt(t){return 4294967295&t}const Mt=new f;function Pt(t){return Mt.get(t)}const Bt="Invalid uncompressed size",Dt="deflate-raw",Rt="gzip",Ut=[31,139,8];class Wt extends d{constructor(t,{chunkSize:e,CompressionStreamZlib:n,CompressionStream:s}){super({});const{compressed:r,encrypted:o,useCompressionStream:c,zipCrypto:i,signed:a,level:f,deflate64:w,format:u,compressionMethod:h}=t,p=this;let d,y,m,g=super.readable;const S=u&&Pt(u),v=a&&r&&!w&&!S&&(!o||i)&&!(!c||!s);if(o&&!i||!a||v||(d=new W,g=Lt(g,d)),r)if(S)g=Ot(g,Et(S.CompressionStream,u,{level:f,chunkSize:e,compressionMethod:h}));else if(v)m=new _t,g=Ot(g,new s(Rt)),g=Lt(g,m);else try{g=Ft(g,c,{level:f,chunkSize:e},s,n)}catch(t){let e;try{e=new s(Rt)}catch{throw t}g=Ot(g,e),g=Lt(g,new _t)}o&&(i?g=Lt(g,new vt(t)):(y=new wt(t),g=Lt(g,y))),Kt(p,g,()=>{let t;o&&!i&&(t=y.signature),o&&!i||!a||(t=v?m.signature:new l(d.value.buffer).getUint32(0)),p.signature=t})}}class _t extends d{constructor(){let t,e=10,n=new o(0);super({transform(t,r){if(e){const n=s.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(8>=o)return void(n=_(n,t));const c=o-8,i=s.min(c,n.length);r.enqueue(_(n.subarray(0,i),t.subarray(0,c-i))),n=_(n.subarray(i),t.subarray(c-i))},flush(){const e=T(n);t.signature=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Tt extends d{constructor(t,{chunkSize:e,DecompressionStreamZlib:n,DecompressionStream:s}){super({});const{zipCrypto:c,encrypted:i,signed:a,signature:f,compressed:u,useCompressionStream:h,deflate64:p,format:m,compressionMethod:g,rawBitFlag:S,outputSize:b}=t;let z,k,C=super.readable;if(i&&(c?C=Lt(C,new St(t)):(k=new lt(t),C=Lt(C,k))),u){const t=m&&Pt(m);if(t)C=Ot(C,Et(t.DecompressionStream,m,{chunkSize:e,compressionMethod:g,rawBitFlag:S,uncompressedSize:b}));else try{C=Ft(C,h,{chunkSize:e,deflate64:p},s,n)}catch(t){if(p||b===v)throw t;let e;try{e=new s(Rt)}catch{throw t}C=((t,e,n)=>{const s=new U;let c,i,a,f=0,l=!1;const u=new w((t,e)=>{i=t,a=e});u.catch(()=>{}),n||i();const h=new d({start(t){const e=new o(10);e.set(Ut),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){l=!0,y();try{await u}finally{m()}const e=new o(8),r=T(e);r.setUint32(0,s.get(),!0),r.setUint32(4,n,!0),t.enqueue(e)},cancel(t){a(t)}}),p=new d({transform(t,e){s.append(t),f+=t.length,n>f?l&&y():i(),e.enqueue(t)},cancel(t){a(t)}});return t=Lt(t,h),Lt(t=Ot(t,e),p);function y(){m(),c=setTimeout(()=>a(new r(Bt)),5e3)}function m(){clearTimeout(c)}})(C,e,b)}C=(t=>{const e=t.getReader();return new y({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new r("Invalid compressed data");throw e.cause=t,e}const{value:s,done:o}=n;o?t.close():t.enqueue(s)},cancel:t=>e.cancel(t)})})(C)}i&&!c||!a||(z=new W,C=Lt(C,z)),Kt(this,C,()=>{if((!i||c)&&a){const t=new l(z.value.buffer);if(f!=t.getUint32(0,!1))throw new r(j)}})}}const Vt=new f;function Kt(t,n,s){n=Lt(n,new d({flush:s})),e.defineProperty(t,"readable",{get:()=>n})}function Et(t,e,n){if(!t)throw new r("Compression method not supported");return new t(e,n)}function Ft(t,e,n,s,r){const o=e&&s?s:r||s,c=n.deflate64?"deflate64-raw":Dt;let i;try{i=new o(c,n)}catch(t){if(!e||!r||o==r)throw t;i=new r(c,n)}return Ot(t,i)}function Lt(t,e){return(t=>{if(t instanceof y)return t;const e=t.getReader();return new y({async pull(t){const{value:n,done:s}=await e.read();s?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})})(t).pipeThrough(e)}function Ot(t,e){const n=e.writable.getWriter(),s=t.getReader();return(async()=>{try{for(;;){await n.ready;const t=await s.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await(async(t,e)=>{try{await t.abort(e)}catch{}})(n,t),await(async(t,e)=>{try{await t.cancel(e)}catch{}})(s,t)}})(),e.readable}const jt="data",Ht="close",Zt="deflate";class Nt extends d{constructor(t,n){super({});const s=this,{codecType:o}=t;let c;o.startsWith(Zt)?c=Wt:o.startsWith("inflate")&&(c=Tt),s.outputSize=0;let i=0;const a=new c(t,n),f=super.readable,l=new d({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){e.assign(s,{inputSize:i})}}),w=new d({transform(e,n){if(e&&e.length&&(n.enqueue(e),s.outputSize+=e.length,t.outputSize!==v&&s.outputSize>t.outputSize))throw new r(Bt)},flush(){const{signature:t}=a;e.assign(s,{signature:t,inputSize:i})}});e.defineProperty(s,"readable",{get:()=>f.pipeThrough(l).pipeThrough(a).pipeThrough(w)})}}class qt extends d{constructor(t){const e=[];let s=0;function r(){const n=new o(t);let r=0;for(;t>r;){const s=e[0],o=t-r;s.length>o?(n.set(s.subarray(0,o),r),e[0]=s.subarray(o),r+=o):(n.set(s,r),r+=s.length,e.shift())}return s-=t,n}n.isFinite(t)&&t>=1||(t=65536),super({transform(n,o){for(e.push(n),s+=n.length;s>t;)o.enqueue(r())},flush(t){s&&t.enqueue(((t,e)=>{const n=new o(e);let s=0;for(const e of t)n.set(e,s),s+=e.length;return n})(e,s))}})}}let Gt=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(Gt=navigator.hardwareConcurrency)}catch{}const Jt=new f,Qt=new f;let Xt,Yt,$t,te,ee,ne,se=0;async function re(t){let e,o;try{const{options:c,config:i}=t;if(c.format&&await(async(t,e)=>{!Mt.has(t)&&e&&((t,e)=>{const{CompressionStream:n,DecompressionStream:s}=e;if(typeof n!=z&&typeof s!=z)throw new r("Invalid codec module");Mt.set(t,{CompressionStream:n,DecompressionStream:s})})(t,await(import(e)))})(c.format,c.codecURI),i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream,c.compressed&&!c.format)if(c.useCompressionStream){if(!((t,e)=>{if(!t)return!1;let n=Vt.get(t);n||(n=new f,Vt.set(t,n));let s=n.get(e);if(s===v){try{new t(e),s=!0}catch{s=!1}n.set(e,s)}return s})(c.codecType.startsWith(Zt)?i.CompressionStream:i.DecompressionStream,Dt))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{c.useCompressionStream=!0}const a={highWaterMark:1},l=t.readable||new y({async pull(t){const e=new w(t=>Jt.set(se,t));oe({type:"pull",messageId:se}),se=(se+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await e;t.enqueue(s),r&&t.close()}},a);o=t.writable||new m({async write(t){let e;const s=new w(t=>e=t);Qt.set(se,e),oe({type:jt,value:t,messageId:se}),se=(se+1)%n.MAX_SAFE_INTEGER,await s}},a),e=new Nt(c,i),Xt=new AbortController;const{signal:u}=Xt;await l.pipeThrough(e).pipeThrough(new qt((t=>s.max(t.chunkSize,64))(i))).pipeTo(o,{signal:u,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{signature:h,inputSize:p,outputSize:d}=e;oe({type:Ht,result:{signature:h,inputSize:p,outputSize:d}})}catch(t){if(t.outputSize=e?e.outputSize:0,o&&!o.locked)try{await o.getWriter().close()}catch{}ce(t)}}function oe(t){const{value:e}=t;if(e)if(e.length)try{t.value=(n=e,n.byteOffset||n.byteLength!=n.buffer.byteLength?new o(n):n).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var n}function ce(t=new r("Unknown error")){const{message:e,stack:n,code:s,name:o,outputSize:c,cause:i}=t,a={message:e,stack:n,code:s,name:o,outputSize:c};i&&(a.cause={name:i.name,message:i.message}),p({error:a})}function ie(t,e,n={}){if(!Yt){const t=new r("WASM module not loaded");throw t.cause=ne,t}const c="number"==typeof n.level?n.level:-1,i="number"==typeof n.outBuffer?n.outBuffer:65536,a="number"==typeof n.inBufferSize?n.inBufferSize:65536;return new d({start(){try{let n;if(this.lt=$t(i),this.in=$t(a),this.inBufferSize=a,!this.lt||!this.in)throw new r("allocation failed");if(this.wt=new o(i),t?(this.ut=Yt.deflate_process,this.ht=Yt.deflate_last_consumed,this.yt=Yt.deflate_end,this.gt=Yt.deflate_new(),n="gzip"===e?Yt.deflate_init_gzip(this.gt,c):"deflate-raw"===e?Yt.deflate_init_raw(this.gt,c):Yt.deflate_init(this.gt,c)):"deflate64-raw"===e?(this.ut=Yt.inflate9_process,this.ht=Yt.inflate9_last_consumed,this.yt=Yt.inflate9_end,this.gt=Yt.inflate9_new(),n=Yt.inflate9_init_raw(this.gt)):(this.ut=Yt.inflate_process,this.ht=Yt.inflate_last_consumed,this.yt=Yt.inflate_end,this.gt=Yt.inflate_new(),n="deflate-raw"===e?Yt.inflate_init_raw(this.gt):"gzip"===e?Yt.inflate_init_gzip(this.gt):Yt.inflate_init(this.gt)),0!==n)throw new r("init failed:"+n)}catch(t){throw f(this),t}},transform(e,n){try{const c=e,a=new o(ee.buffer),f=this.ut,l=this.ht,w=this.lt,u=this.wt;let h=0;for(;h<c.length;){const e=s.min(c.length-h,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&te&&(te(this.in),this.in=0),this.in=$t(e),this.inBufferSize=e,!this.in))throw new r("allocation failed");a.set(c.subarray(h,h+e),this.in);const o=f(this.gt,this.in,e,w,i,0),p=16777215&o;if(p&&(u.set(a.subarray(w,w+p),0),n.enqueue(u.slice(0,p))),!t){const t=o>>24&255,e=128&t?t-256:t;if(0>e)throw new r("process error:"+e)}const d=l(this.gt);if(0===d)break;h+=d}}catch(t){f(this),n.error(t)}},flush(e){try{const n=new o(ee.buffer),s=this.ut,c=this.lt,a=this.wt;for(;;){const o=s(this.gt,0,0,c,i,4),f=16777215&o,l=o>>24&255;if(!t){const t=128&l?l-256:l;if(0>t)throw new r("process error:"+t)}if(f&&(a.set(n.subarray(c,c+f),0),e.enqueue(a.slice(0,f))),1===l||0===f)break}}catch(t){e.error(t)}finally{const t=f(this);0!==t&&e.error(new r("end error:"+t))}},cancel(){f(this)}});function f(t){let e=0;return t.gt&&t.yt&&(e=t.yt(t.gt)),t.gt=0,t.in&&te&&te(t.in),t.in=0,t.lt&&te&&te(t.lt),t.lt=0,e}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if("start"==e&&re(t),e==jt){const t=Jt.get(n);Jt.delete(n),t({value:s||new o,done:r})}if("ack"==e){const t=Qt.get(n);Qt.delete(n),t()}e==Ht&&Xt.abort()}catch(t){ce(t)}}),p({type:"ready"});class ae{constructor(t="deflate",e){return ie(!0,t,e)}}class fe{constructor(t="deflate",e){return ie(!1,t,e)}}ae.St=!0,fe.St=!0;let le=!1;self.initModule=async t=>{try{const e=await(async(t,{baseURI:e})=>{if(!le)try{await(async(t,e)=>{let n,s;try{try{s=new URL(t,e)}catch{}const r=await fetch(s);n=await r.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;n=(t=>{const e=t.split(",")[1],n=atob(e),s=n.length,r=new o(s);for(let t=0;s>t;++t)r[t]=n.charCodeAt(t);return r.buffer})(t)}(t=>{if(Yt=t,({malloc:$t,free:te,memory:ee}=Yt),"function"!=typeof $t||"function"!=typeof te||!ee)throw Yt=$t=te=ee=null,new r("Invalid WASM module")})((await WebAssembly.instantiate(n)).instance.exports)})(t,e),le=!0}catch(t){throw(t=>{ne=t})(t),t}})(t.wasmURI,t);return t.CompressionStreamZlib=ae,t.DecompressionStreamZlib=fe,e}catch{}}});\n';t({workerURI:t=>{const n="text/javascript";if(t){const t=new Blob([e],{type:n});return URL.createObjectURL(t)}return "data:"+n+","+encodeURIComponent(e)}});}
|
|
229
|
+
function t$1(t){const e='(t=>{"function"==typeof define&&define.amd?define(t):t()})(function(){"use strict";const{Array:t,Object:e,Number:n,Math:s,Error:r,Uint8Array:o,Uint16Array:c,Uint32Array:i,Int32Array:a,Map:f,DataView:l,Promise:w,TextEncoder:u,crypto:h,postMessage:p,TransformStream:d,ReadableStream:y,WritableStream:m,CompressionStream:g,DecompressionStream:S}=self,v=void 0,b="undefined",k="function",z=new o,C=[[],[],[],[],[],[],[],[]];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)e=1&e?e>>>1^3988292384:e>>>1;C[0][t]=e}for(let t=0;256>t;t++)for(let e=1;8>e;e++){const n=C[e-1][t];C[e][t]=n>>>8^C[0][255&n]}const[A,I,x,M,P,B,D,R]=C;class U{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let s=0;if(n>=8&&t.buffer){const r=new l(t.buffer,t.byteOffset,n),o=n-8;for(;o>=s;s+=8){const t=e^r.getInt32(s,!0),n=r.getInt32(s+4,!0);e=R[255&t]^D[t>>>8&255]^B[t>>>16&255]^P[t>>>24&255]^M[255&n]^x[n>>>8&255]^I[n>>>16&255]^A[n>>>24&255]}}for(;n>s;s++)e=e>>>8^A[255&(e^t[s])];this.o=e}get(){return~this.o}}class W extends d{constructor(){let t;const e=new U;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new o(4);new l(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function _(t,e){const n=new o(t.length+e.length);return n.set(t),n.set(e,t.length),n}function T(t){return new l(t.buffer,t.byteOffset,t.byteLength)}const V={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],s=V.l(n);return 32===s?t.concat(e):V.h(e,s,0|n,t.slice(0,t.length-1))},m(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+V.l(n)},S(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=V.v(e,t[n-1]&2147483648>>e-1,1)),t},v:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,l:t=>s.round(t/1099511627776)||32,h(t,e,n,s){for(void 0===s&&(s=[]);e>=32;e-=32)s.push(n),n=0;if(0===e)return s.concat(t);for(let r=0;r<t.length;r++)s.push(n|t[r]>>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,o=V.l(r);return s.push(V.v(e+o&31,e+o>32?n:s.pop(),1)),s}},K={bytes:{C(t){const e=V.m(t)/8,n=new o(e);let s;for(let r=0;e>r;r++)3&r||(s=t[r/4]),n[r]=s>>>24,s<<=8;return n},A(t){const e=[];let n,s=0;for(n=0;n<t.length;n++)s=s<<8|t[n],3&~n||(e.push(s),s=0);return 3&n&&e.push(V.v(8*(3&n),s)),e}}},E=class{constructor(t){const e=this;e.blockSize=512,e.I=[1732584193,4023233417,2562383102,271733878,3285377520],e.M=[1518500249,1859775393,2400959708,3395469782],t?(e.P=t.P.slice(0),e.B=t.B.slice(0),e.D=t.D):e.reset()}reset(){const t=this;return t.P=t.I.slice(0),t.B=[],t.D=0,t}update(t){const e=this;"string"==typeof t&&(t=K.R.A(t));const n=e.B=V.concat(e.B,t),s=e.D,o=e.D=s+V.m(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const c=new i(n);let a=0;for(let t=e.blockSize+s-(e.blockSize+s&e.blockSize-1);o>=t;t+=e.blockSize)e.U(c.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),e}W(){const t=this;let e=t.B;const n=t.P;e=V.concat(e,[V.v(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t.D/4294967296)),e.push(0|t.D);e.length;)t.U(e.splice(0,16));return t.reset(),n}_(t,e,n,s){return t>19?t>39?t>59?t>79?void 0:e^n^s:e&n|e&s|n&s:e^n^s:e&n|~e&s}T(t,e){return e<<t|e>>>32-t}U(e){const n=this,r=n.P,o=t(80);for(let t=0;16>t;t++)o[t]=e[t];let c=r[0],i=r[1],a=r[2],f=r[3],l=r[4];for(let t=0;79>=t;t++){16>t||(o[t]=n.T(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=n.T(5,c)+n._(t,i,a,f)+l+o[t]+n.M[s.floor(t/20)]|0;l=f,f=a,a=n.T(30,i),i=c,c=e}r[0]=r[0]+c|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+f|0,r[4]=r[4]+l|0}},F={importKey:t=>new F.V(K.bytes.A(t)),K(t,e,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const o=1+(s>>5)<<2;let c,i,a,f,w;const u=new ArrayBuffer(o),h=new l(u);let p=0;const d=V;for(e=K.bytes.A(e),w=1;(o||1)>p;w++){for(c=i=t.encrypt(d.concat(e,[w])),a=1;n>a;a++)for(i=t.encrypt(i),f=0;f<i.length;f++)c[f]^=i[f];for(a=0;(o||1)>p&&a<c.length;a++)h.setInt32(p,c[a]),p+=4}return u.slice(0,s/8)},V:class{constructor(t){const e=this,n=e.F=E,s=[[],[]];e.L=[new n,new n];const r=e.L[0].blockSize/32;t.length>r&&(t=(new n).update(t).W());for(let e=0;r>e;e++)s[0][e]=909522486^t[e],s[1][e]=1549556828^t[e];e.L[0].update(s[0]),e.L[1].update(s[1]),e.O=new n(e.L[0])}reset(){const t=this;t.O=new t.F(t.L[0]),t.j=!1}update(t){this.j=!0,this.O.update(t)}digest(){const t=this,e=t.O.W(),n=new t.F(t.L[1]).update(e).W();return t.reset(),n}encrypt(t){if(this.j)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},L=typeof h!=b&&typeof h.getRandomValues==k,O="Invalid password",j="Invalid signature",H=j,Z="zipjs-abort-check-password";function N(t){if(L)return h.getRandomValues(t);throw new r("Crypto API not supported")}const q=16,G={name:"PBKDF2"},J=e.assign({hash:{name:"HMAC"}},G),Q=e.assign({iterations:1e3,hash:{name:"SHA-1"}},G),X=["deriveBits"],Y=[8,12,16],$=[16,24,32],tt=10,et=[0,0,0,0],nt=typeof h!=b,st=nt&&h.subtle,rt=nt&&typeof st!=b,ot=K.bytes,ct=class{constructor(t){const e=this;e.H=[[[],[],[],[],[]],[[],[],[],[],[]]],e.H[0][0][0]||e.Z();const n=e.H[0][4],s=e.H[1],o=t.length;let c,i,a,f=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(e.M=[i=t.slice(0),a=[]],c=o;4*o+28>c;c++){let t=i[c-1];(c%o===0||8===o&&c%o===4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],c%o===0&&(t=t<<8^t>>>24^f<<24,f=f<<1^283*(f>>7))),i[c]=i[c-o]^t}for(let t=0;c;t++,c--){const e=i[3&t?c:c-4];a[t]=4>=c||4>t?e:s[0][n[e>>>24]]^s[1][n[e>>16&255]]^s[2][n[e>>8&255]]^s[3][n[255&e]]}}encrypt(t){return this.N(t,0)}decrypt(t){return this.N(t,1)}Z(){const t=this.H[0],e=this.H[1],n=t[4],s=e[4],r=[],o=[];let c,i,a,f;for(let t=0;256>t;t++)o[(r[t]=t<<1^283*(t>>7))^t]=t;for(let l=c=0;!n[l];l^=i||1,c=o[c]||1){let o=c^c<<1^c<<2^c<<3^c<<4;o=o>>8^255&o^99,n[l]=o,s[o]=l,f=r[a=r[i=r[l]]];let w=16843009*f^65537*a^257*i^16843008*l,u=257*r[o]^16843008*o;for(let n=0;4>n;n++)t[n][l]=u=u<<24^u>>>8,e[n][o]=w=w<<24^w>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}N(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.M[e],s=n.length/4-2,o=[0,0,0,0],c=this.H[e],i=c[0],a=c[1],f=c[2],l=c[3],w=c[4];let u,h,p,d=t[0]^n[0],y=t[e?3:1]^n[1],m=t[2]^n[2],g=t[e?1:3]^n[3],S=4;for(let t=0;s>t;t++)u=i[d>>>24]^a[y>>16&255]^f[m>>8&255]^l[255&g]^n[S],h=i[y>>>24]^a[m>>16&255]^f[g>>8&255]^l[255&d]^n[S+1],p=i[m>>>24]^a[g>>16&255]^f[d>>8&255]^l[255&y]^n[S+2],g=i[g>>>24]^a[d>>16&255]^f[y>>8&255]^l[255&m]^n[S+3],S+=4,d=u,y=h,m=p;for(let t=0;4>t;t++)o[e?3&-t:t]=w[d>>>24]<<24^w[y>>16&255]<<16^w[m>>8&255]<<8^w[255&g]^n[S++],u=d,d=y,y=m,m=g,g=u;return o}},it=class{constructor(t,e){this.G=t,this.J=e,this.X=e}reset(){this.X=this.J}update(t){return this.Y(this.G,t,this.X)}$(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,n=t>>8&255,s=255&t;255===e?(e=0,255===n?(n=0,255===s?s=0:++s):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=s}return t}et(t){0===(t[0]=this.$(t[0]))&&(t[1]=this.$(t[1]))}Y(t,e,n){let s;if(!(s=e.length))return[];const r=V.m(e);for(let r=0;s>r;r+=4){this.et(n);const s=t.encrypt(n);e[r]^=s[0],e[r+1]^=s[1],e[r+2]^=s[2],e[r+3]^=s[3]}return V.S(e,r)}},at=F.V;let ft=nt&&rt&&typeof st.importKey==k,lt=nt&&rt&&typeof st.deriveBits==k;class wt extends d{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:s,checkAuthenticationCode:c=!0}){super({start(){ht(this,t,e,n)},async transform(t,e){const n=this,{password:c,strength:i,nt:a,ready:f}=n;c?(await(async(t,e,n,s)=>{const o=await dt(t,e,n,mt(s,0,Y[e])),c=mt(s,Y[e]);if(o[0]!=c[0]||o[1]!=c[1])throw new r(O)})(n,i,c,mt(t,0,Y[i]+2)),t=mt(t,Y[i]+2),s?e.error(new r(Z)):a()):await f;const l=new o(t.length-tt-(t.length-tt)%q);e.enqueue(pt(n,t,l,0,tt,!0))},async flush(t){const{st:e,ot:n,pending:s,ready:o}=this;if(n&&e){await o;const i=mt(s,0,s.length-tt),a=mt(s,s.length-tt);let f=z;if(i.length){const t=St(ot,i);n.update(t);const s=e.update(t);f=gt(ot,s)}const l=mt(gt(ot,n.digest()),0,tt);let w=s.length<tt?1:0;for(let t=0;tt>t;t++)w|=l[t]^a[t];if(w&&c)throw new r(H);t.enqueue(f)}}})}}class ut extends d{constructor({password:t,rawPassword:e,encryptionStrength:n}){super({start(){ht(this,t,e,n)},async transform(t,e){const n=this,{password:s,strength:r,nt:c,ready:i}=n;let a=z;s?(a=await(async(t,e,n)=>{const s=N(new o(Y[e]));return _(s,await dt(t,e,n,s))})(n,r,s),c()):await i;const f=new o(a.length+t.length-t.length%q);f.set(a,0),e.enqueue(pt(n,t,f,a.length,0))},async flush(t){const{st:e,ot:n,pending:s,ready:r}=this;if(n&&e){await r;let o=z;if(s.length){const t=e.update(St(ot,s));n.update(t),o=gt(ot,t)}const c=gt(ot,n.digest()).slice(0,tt);t.enqueue(_(o,c))}}})}}function ht(t,n,s,r){e.assign(t,{ready:new w(e=>t.nt=e),password:yt(n,s),strength:r-1,pending:z})}function pt(t,e,n,s,r,c){const{st:i,ot:a,pending:f}=t;f.length&&(e=_(f,e));const l=e.length-r;let w;for(n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new o(e)).set(n,0)}return t})(n,s+(l-l%q)),w=0;l-q>=w;w+=q){const t=St(ot,mt(e,w,w+q));c&&a.update(t);const r=i.update(t);c||a.update(r),n.set(gt(ot,r),w+s)}return t.pending=mt(e,w),n}async function dt(n,s,r,c){n.password=null;const i=await(async(t,e,n,s,r)=>{if(!ft)return F.importKey(e);try{return await st.importKey("raw",e,n,!1,r)}catch{return ft=!1,F.importKey(e)}})(0,r,J,0,X),a=await(async(t,e,n)=>{if(!lt)return F.K(e,t.salt,Q.iterations,n);try{return await st.deriveBits(t,e,n)}catch{return lt=!1,F.K(e,t.salt,Q.iterations,n)}})(e.assign({salt:c},Q),i,8*(2*$[s]+2)),f=new o(a),l=St(ot,mt(f,0,$[s])),w=St(ot,mt(f,$[s],2*$[s])),u=mt(f,2*$[s]);return e.assign(n,{keys:{key:l,ct:w,passwordVerification:u},st:new it(new ct(l),t.from(et)),ot:new at(w)}),u}function yt(t,e){return e===v?(t=>{if(typeof u==b){const e=new o((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new u).encode(t)})(t):e}function mt(t,e,n){return t.subarray(e,n)}function gt(t,e){return t.C(e)}function St(t,e){return t.A(e)}class vt extends d{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){kt(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=zt(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new r(O);t=t.subarray(12)}s?e.error(new r(Z)):e.enqueue(zt(n,t))}})}}class bt extends d{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){kt(this,t,e,n)},transform(t,e){const n=this;let s,r;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=N(new o(12));e[11]=n.passwordVerification,s=new o(t.length+e.length),s.set(Ct(n,e),0),r=12}else s=new o(t.length),r=0;s.set(Ct(n,t),r),e.enqueue(s)}})}}function kt(t,n,s,r){e.assign(t,{password:n,rawPassword:s,passwordVerification:r}),((t,n,s)=>{const r=[305419896,591751049,878082192];if(e.assign(t,{keys:r,it:new U(r[0]),ft:new U(r[2])}),s)for(let e=0;e<s.length;e++)At(t,s[e]);else for(let e=0;e<n.length;e++)At(t,n.charCodeAt(e))})(t,n,s)}function zt(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=It(t)^e[s],At(t,n[s]);return n}function Ct(t,e){const n=new o(e.length);for(let s=0;s<e.length;s++)n[s]=It(t)^e[s],At(t,e[s]);return n}function At(t,e){let[,n]=t.keys;t.it.append([e]);const r=~t.it.get();n=Mt(s.imul(Mt(n+xt(r)),134775813)+1),t.ft.append([n>>>24]);const o=~t.ft.get();t.keys=[r,n,o]}function It(t){const e=2|t.keys[2];return xt(s.imul(e,1^e)>>>8)}function xt(t){return 255&t}function Mt(t){return 4294967295&t}const Pt=new f;function Bt(t){return Pt.get(t)}const Dt="Invalid uncompressed size",Rt=j,Ut="deflate-raw",Wt="gzip",_t=[31,139,8];class Tt extends d{constructor(t,{chunkSize:e,CompressionStreamZlib:n,CompressionStream:s}){super({});const{compressed:r,encrypted:o,useCompressionStream:c,zipCrypto:i,computeCrc32:a,level:f,deflate64:w,format:u,compressionMethod:h}=t,p=this;let d,y,m,g=super.readable;const S=u&&Bt(u),v=a&&r&&!w&&!S&&(!o||i)&&!(!c||!s);if(o&&!i||!a||v||(d=new W,g=jt(g,d)),r)if(S)g=Ht(g,Lt(S.CompressionStream,u,{level:f,chunkSize:e,compressionMethod:h}));else if(v)m=new Vt,g=Ht(g,new s(Wt)),g=jt(g,m);else try{g=Ot(g,c,{level:f,chunkSize:e},s,n)}catch(t){let e;try{e=new s(Wt)}catch{throw t}g=Ht(g,e),g=jt(g,new Vt)}o&&(i?g=jt(g,new bt(t)):(y=new ut(t),g=jt(g,y))),Ft(p,g,()=>{o&&!i||!a||(p.crc32=v?m.crc32:new l(d.value.buffer).getUint32(0))})}}class Vt extends d{constructor(){let t,e=10,n=new o(0);super({transform(t,r){if(e){const n=s.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(8>=o)return void(n=_(n,t));const c=o-8,i=s.min(c,n.length);r.enqueue(_(n.subarray(0,i),t.subarray(0,c-i))),n=_(n.subarray(i),t.subarray(c-i))},flush(){const e=T(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Kt extends d{constructor(t,{chunkSize:e,DecompressionStreamZlib:n,DecompressionStream:s}){super({});const{zipCrypto:c,encrypted:i,checkCrc32:a,crc32:f,compressed:u,useCompressionStream:h,deflate64:p,format:m,compressionMethod:g,rawBitFlag:S,outputSize:b}=t;let k,z,C=super.readable;if(i&&(c?C=jt(C,new vt(t)):(z=new wt(t),C=jt(C,z))),u){const t=m&&Bt(m);if(t)C=Ht(C,Lt(t.DecompressionStream,m,{chunkSize:e,compressionMethod:g,rawBitFlag:S,uncompressedSize:b}));else try{C=Ot(C,h,{chunkSize:e,deflate64:p},s,n)}catch(t){if(p||b===v)throw t;let e;try{e=new s(Wt)}catch{throw t}C=((t,e,n)=>{const s=new U;let c,i,a,f=0,l=!1;const u=new w((t,e)=>{i=t,a=e});u.catch(()=>{}),n||i();const h=new d({start(t){const e=new o(10);e.set(_t),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){l=!0,y();try{await u}finally{m()}const e=new o(8),r=T(e);r.setUint32(0,s.get(),!0),r.setUint32(4,n,!0),t.enqueue(e)},cancel(t){a(t)}}),p=new d({transform(t,e){s.append(t),f+=t.length,n>f?l&&y():i(),e.enqueue(t)},cancel(t){a(t)}});return t=jt(t,h),jt(t=Ht(t,e),p);function y(){m(),c=setTimeout(()=>a(new r(Dt)),5e3)}function m(){clearTimeout(c)}})(C,e,b)}C=(t=>{const e=t.getReader();return new y({async pull(t){let n;try{n=await e.read()}catch(t){if(t&&t.message)throw t;const e=new r("Invalid compressed data");throw e.cause=t,e}const{value:s,done:o}=n;o?t.close():t.enqueue(s)},cancel:t=>e.cancel(t)})})(C)}a&&(k=new W,C=jt(C,k)),Ft(this,C,()=>{if(a){const t=new l(k.value.buffer);if(f!=t.getUint32(0,!1))throw new r(Rt)}})}}const Et=new f;function Ft(t,n,s){n=jt(n,new d({flush:s})),e.defineProperty(t,"readable",{get:()=>n})}function Lt(t,e,n){if(!t)throw new r("Compression method not supported");return new t(e,n)}function Ot(t,e,n,s,r){const o=e&&s?s:r||s,c=n.deflate64?"deflate64-raw":Ut;let i;try{i=new o(c,n)}catch(t){if(!e||!r||o==r)throw t;i=new r(c,n)}return Ht(t,i)}function jt(t,e){return(t=>{if(t instanceof y)return t;const e=t.getReader();return new y({async pull(t){const{value:n,done:s}=await e.read();s?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})})(t).pipeThrough(e)}function Ht(t,e){const n=e.writable.getWriter(),s=t.getReader();return(async()=>{try{for(;;){await n.ready;const t=await s.read();if(t.done){await n.close();break}await n.write(t.value)}}catch(t){await(async(t,e)=>{try{await t.abort(e)}catch{}})(n,t),await(async(t,e)=>{try{await t.cancel(e)}catch{}})(s,t)}})(),e.readable}const Zt="data",Nt="close",qt="deflate";class Gt extends d{constructor(t,n){super({});const s=this,{codecType:o}=t;let c;o.startsWith(qt)?c=Tt:o.startsWith("inflate")&&(c=Kt),s.outputSize=0;let i=0;const a=new c(t,n),f=super.readable,l=new d({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){e.assign(s,{inputSize:i})}}),w=new d({transform(e,n){if(e&&e.length&&(n.enqueue(e),s.outputSize+=e.length,t.outputSize!==v&&s.outputSize>t.outputSize))throw new r(Dt)},flush(){const{crc32:t}=a;e.assign(s,{crc32:t,inputSize:i})}});e.defineProperty(s,"readable",{get:()=>f.pipeThrough(l).pipeThrough(a).pipeThrough(w)})}}class Jt extends d{constructor(t){const e=[];let s=0;function r(){const n=new o(t);let r=0;for(;t>r;){const s=e[0],o=t-r;s.length>o?(n.set(s.subarray(0,o),r),e[0]=s.subarray(o),r+=o):(n.set(s,r),r+=s.length,e.shift())}return s-=t,n}n.isFinite(t)&&t>=1||(t=65536),super({transform(n,o){for(e.push(n),s+=n.length;s>t;)o.enqueue(r())},flush(t){s&&t.enqueue(((t,e)=>{const n=new o(e);let s=0;for(const e of t)n.set(e,s),s+=e.length;return n})(e,s))}})}}let Qt=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(Qt=navigator.hardwareConcurrency)}catch{}const Xt=new f,Yt=new f;let $t,te,ee,ne,se,re,oe=0;async function ce(t){let e,o;try{const{options:c,config:i}=t;if(c.format&&await(async(t,e)=>{!Pt.has(t)&&e&&((t,e)=>{const{CompressionStream:n,DecompressionStream:s}=e;if(typeof n!=k&&typeof s!=k)throw new r("Invalid codec module");Pt.set(t,{CompressionStream:n,DecompressionStream:s})})(t,await(import(e)))})(c.format,c.codecURI),i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream,c.compressed&&!c.format)if(c.useCompressionStream){if(!((t,e)=>{if(!t)return!1;let n=Et.get(t);n||(n=new f,Et.set(t,n));let s=n.get(e);if(s===v){try{new t(e),s=!0}catch{s=!1}n.set(e,s)}return s})(c.codecType.startsWith(qt)?i.CompressionStream:i.DecompressionStream,Ut))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{c.useCompressionStream=!0}const a={highWaterMark:1},l=t.readable||new y({async pull(t){const e=new w(t=>Xt.set(oe,t));ie({type:"pull",messageId:oe}),oe=(oe+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await e;t.enqueue(s),r&&t.close()}},a);o=t.writable||new m({async write(t){let e;const s=new w(t=>e=t);Yt.set(oe,e),ie({type:Zt,value:t,messageId:oe}),oe=(oe+1)%n.MAX_SAFE_INTEGER,await s}},a),e=new Gt(c,i),$t=new AbortController;const{signal:u}=$t;await l.pipeThrough(e).pipeThrough(new Jt((t=>s.max(t.chunkSize,64))(i))).pipeTo(o,{signal:u,preventClose:!0,preventAbort:!0}),await o.getWriter().close();const{crc32:h,inputSize:p,outputSize:d}=e;ie({type:Nt,result:{crc32:h,inputSize:p,outputSize:d}})}catch(t){if(t.outputSize=e?e.outputSize:0,o&&!o.locked)try{await o.getWriter().close()}catch{}ae(t)}}function ie(t){const{value:e}=t;if(e)if(e.length)try{t.value=(n=e,n.byteOffset||n.byteLength!=n.buffer.byteLength?new o(n):n).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var n}function ae(t=new r("Unknown error")){const{message:e,stack:n,code:s,name:o,outputSize:c,cause:i}=t,a={message:e,stack:n,code:s,name:o,outputSize:c};i&&(a.cause={name:i.name,message:i.message}),p({error:a})}function fe(t,e,n={}){if(!te){const t=new r("WASM module not loaded");throw t.cause=re,t}const c="number"==typeof n.level?n.level:-1,i="number"==typeof n.outBuffer?n.outBuffer:65536,a="number"==typeof n.inBufferSize?n.inBufferSize:65536;return new d({start(){try{let n;if(this.lt=ee(i),this.in=ee(a),this.inBufferSize=a,!this.lt||!this.in)throw new r("allocation failed");if(this.wt=new o(i),t?(this.ut=te.deflate_process,this.ht=te.deflate_last_consumed,this.yt=te.deflate_end,this.gt=te.deflate_new(),n="gzip"===e?te.deflate_init_gzip(this.gt,c):"deflate-raw"===e?te.deflate_init_raw(this.gt,c):te.deflate_init(this.gt,c)):"deflate64-raw"===e?(this.ut=te.inflate9_process,this.ht=te.inflate9_last_consumed,this.yt=te.inflate9_end,this.gt=te.inflate9_new(),n=te.inflate9_init_raw(this.gt)):(this.ut=te.inflate_process,this.ht=te.inflate_last_consumed,this.yt=te.inflate_end,this.gt=te.inflate_new(),n="deflate-raw"===e?te.inflate_init_raw(this.gt):"gzip"===e?te.inflate_init_gzip(this.gt):te.inflate_init(this.gt)),0!==n)throw new r("init failed:"+n)}catch(t){throw f(this),t}},transform(e,n){try{const c=e,a=new o(se.buffer),f=this.ut,l=this.ht,w=this.lt,u=this.wt;let h=0;for(;h<c.length;){const e=s.min(c.length-h,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&ne&&(ne(this.in),this.in=0),this.in=ee(e),this.inBufferSize=e,!this.in))throw new r("allocation failed");a.set(c.subarray(h,h+e),this.in);const o=f(this.gt,this.in,e,w,i,0),p=16777215&o;if(p&&(u.set(a.subarray(w,w+p),0),n.enqueue(u.slice(0,p))),!t){const t=o>>24&255,e=128&t?t-256:t;if(0>e)throw new r("process error:"+e)}const d=l(this.gt);if(0===d)break;h+=d}}catch(t){f(this),n.error(t)}},flush(e){try{const n=new o(se.buffer),s=this.ut,c=this.lt,a=this.wt;for(;;){const o=s(this.gt,0,0,c,i,4),f=16777215&o,l=o>>24&255;if(!t){const t=128&l?l-256:l;if(0>t)throw new r("process error:"+t)}if(f&&(a.set(n.subarray(c,c+f),0),e.enqueue(a.slice(0,f))),1===l||0===f)break}}catch(t){e.error(t)}finally{const t=f(this);0!==t&&e.error(new r("end error:"+t))}},cancel(){f(this)}});function f(t){let e=0;return t.gt&&t.yt&&(e=t.yt(t.gt)),t.gt=0,t.in&&ne&&ne(t.in),t.in=0,t.lt&&ne&&ne(t.lt),t.lt=0,e}}addEventListener("message",({data:t})=>{const{type:e,messageId:n,value:s,done:r}=t;try{if("start"==e&&ce(t),e==Zt){const t=Xt.get(n);Xt.delete(n),t({value:s||new o,done:r})}if("ack"==e){const t=Yt.get(n);Yt.delete(n),t()}e==Nt&&$t.abort()}catch(t){ae(t)}}),p({type:"ready"});class le{constructor(t="deflate",e){return fe(!0,t,e)}}class we{constructor(t="deflate",e){return fe(!1,t,e)}}le.St=!0,we.St=!0;let ue=!1;self.initModule=async t=>{const e=await(async(t,{baseURI:e})=>{if(!ue)try{await(async(t,e)=>{let n,s;try{try{s=new URL(t,e)}catch{}const r=await fetch(s);n=await r.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;n=(t=>{const e=t.split(",")[1],n=atob(e),s=n.length,r=new o(s);for(let t=0;s>t;++t)r[t]=n.charCodeAt(t);return r.buffer})(t)}(t=>{if(te=t,({malloc:ee,free:ne,memory:se}=te),"function"!=typeof ee||"function"!=typeof ne||!se)throw te=ee=ne=se=null,new r("Invalid WASM module")})((await WebAssembly.instantiate(n)).instance.exports)})(t,e),ue=!0}catch(t){throw(t=>{re=t})(t),t}})(t.wasmURI,t);return t.CompressionStreamZlib=le,t.DecompressionStreamZlib=we,e}});\n';t({workerURI:t=>{const n="text/javascript";if(t){const t=new Blob([e],{type:n});return URL.createObjectURL(t)}return "data:"+n+","+encodeURIComponent(e)}});}
|
|
228
230
|
|
|
229
231
|
/*
|
|
230
232
|
Copyright (c) 2025 Gildas Lormeau. All rights reserved.
|
|
@@ -1371,6 +1373,7 @@
|
|
|
1371
1373
|
|
|
1372
1374
|
const ERR_INVALID_PASSWORD = "Invalid password";
|
|
1373
1375
|
const ERR_INVALID_SIGNATURE = "Invalid signature";
|
|
1376
|
+
const ERR_INVALID_AUTHENTICATION_CODE = ERR_INVALID_SIGNATURE;
|
|
1374
1377
|
const ERR_ABORT_CHECK_PASSWORD = "zipjs-abort-check-password";
|
|
1375
1378
|
const ERR_UNSUPPORTED_CRYPTO_API = "Crypto API not supported";
|
|
1376
1379
|
|
|
@@ -1421,7 +1424,7 @@
|
|
|
1421
1424
|
const DERIVED_BITS_USAGE = ["deriveBits"];
|
|
1422
1425
|
const SALT_LENGTH = [8, 12, 16];
|
|
1423
1426
|
const KEY_LENGTH = [16, 24, 32];
|
|
1424
|
-
const
|
|
1427
|
+
const AUTHENTICATION_CODE_LENGTH = 10;
|
|
1425
1428
|
const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];
|
|
1426
1429
|
// deno-lint-ignore valid-typeof
|
|
1427
1430
|
const CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;
|
|
@@ -1437,7 +1440,7 @@
|
|
|
1437
1440
|
|
|
1438
1441
|
class AESDecryptionStream extends TransformStream {
|
|
1439
1442
|
|
|
1440
|
-
constructor({ password, rawPassword, encryptionStrength, checkPasswordOnly }) {
|
|
1443
|
+
constructor({ password, rawPassword, encryptionStrength, checkPasswordOnly, checkAuthenticationCode = true }) {
|
|
1441
1444
|
super({
|
|
1442
1445
|
start() {
|
|
1443
1446
|
initAesCrypto(this, password, rawPassword, encryptionStrength);
|
|
@@ -1461,8 +1464,8 @@
|
|
|
1461
1464
|
} else {
|
|
1462
1465
|
await ready;
|
|
1463
1466
|
}
|
|
1464
|
-
const output = new Uint8Array(chunk.length -
|
|
1465
|
-
controller.enqueue(append(aesCrypto, chunk, output, 0,
|
|
1467
|
+
const output = new Uint8Array(chunk.length - AUTHENTICATION_CODE_LENGTH - ((chunk.length - AUTHENTICATION_CODE_LENGTH) % BLOCK_LENGTH));
|
|
1468
|
+
controller.enqueue(append(aesCrypto, chunk, output, 0, AUTHENTICATION_CODE_LENGTH, true));
|
|
1466
1469
|
},
|
|
1467
1470
|
async flush(controller) {
|
|
1468
1471
|
const {
|
|
@@ -1473,8 +1476,8 @@
|
|
|
1473
1476
|
} = this;
|
|
1474
1477
|
if (hmac && ctr) {
|
|
1475
1478
|
await ready;
|
|
1476
|
-
const chunkToDecrypt = subarray(pending, 0, pending.length -
|
|
1477
|
-
const
|
|
1479
|
+
const chunkToDecrypt = subarray(pending, 0, pending.length - AUTHENTICATION_CODE_LENGTH);
|
|
1480
|
+
const originalAuthenticationCode = subarray(pending, pending.length - AUTHENTICATION_CODE_LENGTH);
|
|
1478
1481
|
let decryptedChunkArray = EMPTY_UINT8_ARRAY;
|
|
1479
1482
|
if (chunkToDecrypt.length) {
|
|
1480
1483
|
const encryptedChunk = toBits(codecBytes, chunkToDecrypt);
|
|
@@ -1482,13 +1485,13 @@
|
|
|
1482
1485
|
const decryptedChunk = ctr.update(encryptedChunk);
|
|
1483
1486
|
decryptedChunkArray = fromBits(codecBytes, decryptedChunk);
|
|
1484
1487
|
}
|
|
1485
|
-
const
|
|
1486
|
-
let
|
|
1487
|
-
for (let
|
|
1488
|
-
|
|
1488
|
+
const authenticationCode = subarray(fromBits(codecBytes, hmac.digest()), 0, AUTHENTICATION_CODE_LENGTH);
|
|
1489
|
+
let invalidAuthenticationCode = pending.length < AUTHENTICATION_CODE_LENGTH ? 1 : 0;
|
|
1490
|
+
for (let indexByte = 0; indexByte < AUTHENTICATION_CODE_LENGTH; indexByte++) {
|
|
1491
|
+
invalidAuthenticationCode |= authenticationCode[indexByte] ^ originalAuthenticationCode[indexByte];
|
|
1489
1492
|
}
|
|
1490
|
-
if (
|
|
1491
|
-
throw new Error(
|
|
1493
|
+
if (invalidAuthenticationCode && checkAuthenticationCode) {
|
|
1494
|
+
throw new Error(ERR_INVALID_AUTHENTICATION_CODE);
|
|
1492
1495
|
}
|
|
1493
1496
|
controller.enqueue(decryptedChunkArray);
|
|
1494
1497
|
}
|
|
@@ -1500,8 +1503,6 @@
|
|
|
1500
1503
|
class AESEncryptionStream extends TransformStream {
|
|
1501
1504
|
|
|
1502
1505
|
constructor({ password, rawPassword, encryptionStrength }) {
|
|
1503
|
-
// deno-lint-ignore prefer-const
|
|
1504
|
-
let stream;
|
|
1505
1506
|
super({
|
|
1506
1507
|
start() {
|
|
1507
1508
|
initAesCrypto(this, password, rawPassword, encryptionStrength);
|
|
@@ -1540,12 +1541,11 @@
|
|
|
1540
1541
|
hmac.update(encryptedChunk);
|
|
1541
1542
|
encryptedChunkArray = fromBits(codecBytes, encryptedChunk);
|
|
1542
1543
|
}
|
|
1543
|
-
|
|
1544
|
-
controller.enqueue(concat(encryptedChunkArray,
|
|
1544
|
+
const authenticationCode = fromBits(codecBytes, hmac.digest()).slice(0, AUTHENTICATION_CODE_LENGTH);
|
|
1545
|
+
controller.enqueue(concat(encryptedChunkArray, authenticationCode));
|
|
1545
1546
|
}
|
|
1546
1547
|
}
|
|
1547
1548
|
});
|
|
1548
|
-
stream = this;
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
1551
|
|
|
@@ -1558,7 +1558,7 @@
|
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
1560
|
|
|
1561
|
-
function append(aesCrypto, input, output, paddingStart, paddingEnd,
|
|
1561
|
+
function append(aesCrypto, input, output, paddingStart, paddingEnd, verifyAuthenticationCode) {
|
|
1562
1562
|
const {
|
|
1563
1563
|
ctr,
|
|
1564
1564
|
hmac,
|
|
@@ -1572,11 +1572,11 @@
|
|
|
1572
1572
|
let offset;
|
|
1573
1573
|
for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {
|
|
1574
1574
|
const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));
|
|
1575
|
-
if (
|
|
1575
|
+
if (verifyAuthenticationCode) {
|
|
1576
1576
|
hmac.update(inputChunk);
|
|
1577
1577
|
}
|
|
1578
1578
|
const outputChunk = ctr.update(inputChunk);
|
|
1579
|
-
if (!
|
|
1579
|
+
if (!verifyAuthenticationCode) {
|
|
1580
1580
|
hmac.update(outputChunk);
|
|
1581
1581
|
}
|
|
1582
1582
|
output.set(fromBits(codecBytes, outputChunk), offset + paddingStart);
|
|
@@ -1926,6 +1926,7 @@
|
|
|
1926
1926
|
|
|
1927
1927
|
const ERR_INVALID_UNCOMPRESSED_SIZE = "Invalid uncompressed size";
|
|
1928
1928
|
const ERR_INVALID_COMPRESSED_DATA = "Invalid compressed data";
|
|
1929
|
+
const ERR_INVALID_CRC32 = ERR_INVALID_SIGNATURE;
|
|
1929
1930
|
const ERR_UNSUPPORTED_COMPRESSION$2 = "Compression method not supported";
|
|
1930
1931
|
const FORMAT_DEFLATE_RAW = "deflate-raw";
|
|
1931
1932
|
const FORMAT_DEFLATE64_RAW = "deflate64-raw";
|
|
@@ -1939,14 +1940,14 @@
|
|
|
1939
1940
|
|
|
1940
1941
|
constructor(options, { chunkSize, CompressionStreamZlib, CompressionStream }) {
|
|
1941
1942
|
super({});
|
|
1942
|
-
const { compressed, encrypted, useCompressionStream, zipCrypto,
|
|
1943
|
+
const { compressed, encrypted, useCompressionStream, zipCrypto, computeCrc32, level, deflate64, format, compressionMethod } = options;
|
|
1943
1944
|
const stream = this;
|
|
1944
1945
|
let crc32Stream, encryptionStream, gzipCrc32Stream;
|
|
1945
1946
|
let readable = super.readable;
|
|
1946
1947
|
const codecStreams = format && getCodecStreams(format);
|
|
1947
|
-
const useGzipCrc32 =
|
|
1948
|
+
const useGzipCrc32 = computeCrc32 && compressed && !deflate64 && !codecStreams && (!encrypted || zipCrypto) &&
|
|
1948
1949
|
Boolean(useCompressionStream && CompressionStream);
|
|
1949
|
-
if ((!encrypted || zipCrypto) &&
|
|
1950
|
+
if ((!encrypted || zipCrypto) && computeCrc32 && !useGzipCrc32) {
|
|
1950
1951
|
crc32Stream = new Crc32Stream();
|
|
1951
1952
|
readable = pipeThrough(readable, crc32Stream);
|
|
1952
1953
|
}
|
|
@@ -1981,14 +1982,9 @@
|
|
|
1981
1982
|
}
|
|
1982
1983
|
}
|
|
1983
1984
|
setReadable(stream, readable, () => {
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
signature = encryptionStream.signature;
|
|
1985
|
+
if ((!encrypted || zipCrypto) && computeCrc32) {
|
|
1986
|
+
stream.crc32 = useGzipCrc32 ? gzipCrc32Stream.crc32 : new DataView(crc32Stream.value.buffer).getUint32(0);
|
|
1987
1987
|
}
|
|
1988
|
-
if ((!encrypted || zipCrypto) && signed) {
|
|
1989
|
-
signature = useGzipCrc32 ? gzipCrc32Stream.signature : new DataView(crc32Stream.value.buffer).getUint32(0);
|
|
1990
|
-
}
|
|
1991
|
-
stream.signature = signature;
|
|
1992
1988
|
});
|
|
1993
1989
|
}
|
|
1994
1990
|
}
|
|
@@ -2026,7 +2022,7 @@
|
|
|
2026
2022
|
},
|
|
2027
2023
|
flush() {
|
|
2028
2024
|
const dataView = getDataView(trailerCandidate);
|
|
2029
|
-
stream.
|
|
2025
|
+
stream.crc32 = dataView.getUint32(0, true);
|
|
2030
2026
|
stream.uncompressedSize = dataView.getUint32(4, true);
|
|
2031
2027
|
}
|
|
2032
2028
|
});
|
|
@@ -2108,7 +2104,7 @@
|
|
|
2108
2104
|
|
|
2109
2105
|
constructor(options, { chunkSize, DecompressionStreamZlib, DecompressionStream }) {
|
|
2110
2106
|
super({});
|
|
2111
|
-
const { zipCrypto, encrypted,
|
|
2107
|
+
const { zipCrypto, encrypted, checkCrc32, crc32, compressed, useCompressionStream, deflate64, format, compressionMethod, rawBitFlag, outputSize } = options;
|
|
2112
2108
|
let crc32Stream, decryptionStream;
|
|
2113
2109
|
let readable = super.readable;
|
|
2114
2110
|
if (encrypted) {
|
|
@@ -2141,15 +2137,15 @@
|
|
|
2141
2137
|
}
|
|
2142
2138
|
readable = mapInflateStreamError(readable);
|
|
2143
2139
|
}
|
|
2144
|
-
if (
|
|
2140
|
+
if (checkCrc32) {
|
|
2145
2141
|
crc32Stream = new Crc32Stream();
|
|
2146
2142
|
readable = pipeThrough(readable, crc32Stream);
|
|
2147
2143
|
}
|
|
2148
2144
|
setReadable(this, readable, () => {
|
|
2149
|
-
if (
|
|
2150
|
-
const
|
|
2151
|
-
if (
|
|
2152
|
-
throw new Error(
|
|
2145
|
+
if (checkCrc32) {
|
|
2146
|
+
const computedCrc32View = new DataView(crc32Stream.value.buffer);
|
|
2147
|
+
if (crc32 != computedCrc32View.getUint32(0, false)) {
|
|
2148
|
+
throw new Error(ERR_INVALID_CRC32);
|
|
2153
2149
|
}
|
|
2154
2150
|
}
|
|
2155
2151
|
});
|
|
@@ -2373,9 +2369,9 @@
|
|
|
2373
2369
|
}
|
|
2374
2370
|
},
|
|
2375
2371
|
flush() {
|
|
2376
|
-
const {
|
|
2372
|
+
const { crc32 } = stream;
|
|
2377
2373
|
Object.assign(codec, {
|
|
2378
|
-
|
|
2374
|
+
crc32,
|
|
2379
2375
|
inputSize
|
|
2380
2376
|
});
|
|
2381
2377
|
}
|
|
@@ -2678,12 +2674,12 @@
|
|
|
2678
2674
|
.pipeThrough(new ChunkStream(getChunkSize(config)))
|
|
2679
2675
|
.pipeTo(writable, { preventClose: true, preventAbort: true });
|
|
2680
2676
|
const {
|
|
2681
|
-
|
|
2677
|
+
crc32,
|
|
2682
2678
|
inputSize,
|
|
2683
2679
|
outputSize
|
|
2684
2680
|
} = codecStream;
|
|
2685
2681
|
return {
|
|
2686
|
-
|
|
2682
|
+
crc32,
|
|
2687
2683
|
inputSize,
|
|
2688
2684
|
outputSize
|
|
2689
2685
|
};
|
|
@@ -3044,7 +3040,7 @@
|
|
|
3044
3040
|
|
|
3045
3041
|
async function runWorker(stream, workerOptions) {
|
|
3046
3042
|
const { options, config } = workerOptions;
|
|
3047
|
-
const { transferStreams, useWebWorkers, useCompressionStream, compressed,
|
|
3043
|
+
const { transferStreams, useWebWorkers, useCompressionStream, compressed, checkCrc32, computeCrc32, encrypted, format, codecURI } = options;
|
|
3048
3044
|
const { workerURI, maxWorkers } = config;
|
|
3049
3045
|
if (format) {
|
|
3050
3046
|
if (codecURI) {
|
|
@@ -3053,7 +3049,7 @@
|
|
|
3053
3049
|
await ensureCodecStreams(format, options.codecURI);
|
|
3054
3050
|
}
|
|
3055
3051
|
workerOptions.transferStreams = transferStreams || (transferStreams === UNDEFINED_VALUE && config.transferStreams);
|
|
3056
|
-
const streamCopy = !compressed && !
|
|
3052
|
+
const streamCopy = !compressed && !checkCrc32 && !computeCrc32 && !encrypted;
|
|
3057
3053
|
const workerSupported = format === UNDEFINED_VALUE || Boolean(options.codecURI);
|
|
3058
3054
|
workerOptions.useWebWorkers = !streamCopy && workerSupported && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));
|
|
3059
3055
|
workerOptions.workerURI = workerOptions.useWebWorkers && workerURI ? workerURI : UNDEFINED_VALUE;
|
|
@@ -4277,9 +4273,12 @@
|
|
|
4277
4273
|
const PROPERTY_NAME_EXECUTABLE = "executable";
|
|
4278
4274
|
const PROPERTY_NAME_COMPRESSION_METHOD = "compressionMethod";
|
|
4279
4275
|
const PROPERTY_NAME_SIGNATURE = "signature";
|
|
4276
|
+
const PROPERTY_NAME_CRC32 = "crc32";
|
|
4280
4277
|
const PROPERTY_NAME_EXTRA_FIELD = "extraField";
|
|
4281
4278
|
const PROPERTY_NAME_EXTRA_FIELD_INFOZIP = "extraFieldInfoZip";
|
|
4282
4279
|
const PROPERTY_NAME_EXTRA_FIELD_UNIX = "extraFieldUnix";
|
|
4280
|
+
const PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1 = "extraFieldUnixType1";
|
|
4281
|
+
const PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX = "extraFieldPkwareUnix";
|
|
4283
4282
|
const PROPERTY_NAME_UID = "uid";
|
|
4284
4283
|
const PROPERTY_NAME_GID = "gid";
|
|
4285
4284
|
const PROPERTY_NAME_UNIX_MODE = "unixMode";
|
|
@@ -4296,6 +4295,7 @@
|
|
|
4296
4295
|
const PROPERTY_NAME_EXTRA_FIELD_AES = "extraFieldAES";
|
|
4297
4296
|
const PROPERTY_NAME_EXTRA_FIELD_NTFS = "extraFieldNTFS";
|
|
4298
4297
|
const PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP = "extraFieldExtendedTimestamp";
|
|
4298
|
+
const PROPERTY_NAME_EXTRA_FIELD_USDZ = "extraFieldUSDZ";
|
|
4299
4299
|
|
|
4300
4300
|
const PROPERTY_NAMES = [
|
|
4301
4301
|
PROPERTY_NAME_FILENAME,
|
|
@@ -4307,6 +4307,7 @@
|
|
|
4307
4307
|
PROPERTY_NAME_COMMENT,
|
|
4308
4308
|
PROPERTY_NAME_RAW_COMMENT,
|
|
4309
4309
|
PROPERTY_NAME_LAST_ACCESS_DATE,
|
|
4310
|
+
PROPERTY_NAME_RAW_LAST_ACCESS_DATE,
|
|
4310
4311
|
PROPERTY_NAME_CREATION_DATE,
|
|
4311
4312
|
PROPERTY_NAME_RAW_CREATION_DATE,
|
|
4312
4313
|
PROPERTY_NAME_OFFSET,
|
|
@@ -4325,9 +4326,12 @@
|
|
|
4325
4326
|
PROPERTY_NAME_EXECUTABLE,
|
|
4326
4327
|
PROPERTY_NAME_COMPRESSION_METHOD,
|
|
4327
4328
|
PROPERTY_NAME_SIGNATURE,
|
|
4329
|
+
PROPERTY_NAME_CRC32,
|
|
4328
4330
|
PROPERTY_NAME_EXTRA_FIELD,
|
|
4329
4331
|
PROPERTY_NAME_EXTRA_FIELD_UNIX,
|
|
4330
4332
|
PROPERTY_NAME_EXTRA_FIELD_INFOZIP,
|
|
4333
|
+
PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1,
|
|
4334
|
+
PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX,
|
|
4331
4335
|
PROPERTY_NAME_UID,
|
|
4332
4336
|
PROPERTY_NAME_GID,
|
|
4333
4337
|
PROPERTY_NAME_UNIX_MODE,
|
|
@@ -4343,7 +4347,8 @@
|
|
|
4343
4347
|
PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT,
|
|
4344
4348
|
PROPERTY_NAME_EXTRA_FIELD_AES,
|
|
4345
4349
|
PROPERTY_NAME_EXTRA_FIELD_NTFS,
|
|
4346
|
-
PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP
|
|
4350
|
+
PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP,
|
|
4351
|
+
PROPERTY_NAME_EXTRA_FIELD_USDZ
|
|
4347
4352
|
];
|
|
4348
4353
|
|
|
4349
4354
|
class Entry {
|
|
@@ -4396,6 +4401,8 @@
|
|
|
4396
4401
|
const OPTION_CHECK_OVERLAPPING_ENTRY = "checkOverlappingEntry";
|
|
4397
4402
|
const OPTION_CHECK_AMBIGUITY = "checkAmbiguity";
|
|
4398
4403
|
const OPTION_CHECK_SIGNATURE = "checkSignature";
|
|
4404
|
+
const OPTION_CHECK_CRC32 = "checkCrc32";
|
|
4405
|
+
const OPTION_CHECK_AUTHENTICATION_CODE = "checkAuthenticationCode";
|
|
4399
4406
|
const OPTION_USE_WEB_WORKERS = "useWebWorkers";
|
|
4400
4407
|
const OPTION_USE_COMPRESSION_STREAM = "useCompressionStream";
|
|
4401
4408
|
const OPTION_TRANSFER_STREAMS = "transferStreams";
|
|
@@ -4415,6 +4422,7 @@
|
|
|
4415
4422
|
const OPTION_OFFSET = "offset";
|
|
4416
4423
|
const OPTION_USDZ = "usdz";
|
|
4417
4424
|
const OPTION_UNIX_EXTRA_FIELD_TYPE = "unixExtraFieldType";
|
|
4425
|
+
const OPTION_LOCAL_EXTRA_FIELD = "localExtraField";
|
|
4418
4426
|
const OPTION_STRICTNESS = "strictness";
|
|
4419
4427
|
const OPTION_MAX_APPENDED_DATA_SIZE = "maxAppendedDataSize";
|
|
4420
4428
|
const STRICTNESS_STRICT = "strict";
|
|
@@ -4467,6 +4475,7 @@
|
|
|
4467
4475
|
const PROPERTY_NAME_UTF8_SUFFIX = "UTF8";
|
|
4468
4476
|
const CHARSET_CP437 = "cp437";
|
|
4469
4477
|
const BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_LANG_ENCODING_FLAG;
|
|
4478
|
+
const VENDOR_VERSION_AE_1$1 = 1;
|
|
4470
4479
|
const ZIP64_PROPERTIES = [
|
|
4471
4480
|
[PROPERTY_NAME_UNCOMPRESSED_SIZE, MAX_32_BITS],
|
|
4472
4481
|
[PROPERTY_NAME_COMPRESSED_SIZE, MAX_32_BITS],
|
|
@@ -4859,7 +4868,7 @@
|
|
|
4859
4868
|
config,
|
|
4860
4869
|
bitFlag,
|
|
4861
4870
|
rawBitFlag,
|
|
4862
|
-
|
|
4871
|
+
crc32,
|
|
4863
4872
|
rawLastModDate,
|
|
4864
4873
|
uncompressedSize,
|
|
4865
4874
|
compressedSize
|
|
@@ -4946,6 +4955,11 @@
|
|
|
4946
4955
|
if (deflate64) {
|
|
4947
4956
|
useCompressionStream = false;
|
|
4948
4957
|
}
|
|
4958
|
+
const checkCrc32Option = getOptionValue$1(zipEntry, options, OPTION_CHECK_CRC32);
|
|
4959
|
+
const checkCrc32 = (checkCrc32Option === UNDEFINED_VALUE ?
|
|
4960
|
+
getOptionValue$1(zipEntry, options, OPTION_CHECK_SIGNATURE) :
|
|
4961
|
+
checkCrc32Option) && !passThrough &&
|
|
4962
|
+
(!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1$1));
|
|
4949
4963
|
const workerOptions = {
|
|
4950
4964
|
options: {
|
|
4951
4965
|
codecType: CODEC_INFLATE,
|
|
@@ -4953,10 +4967,11 @@
|
|
|
4953
4967
|
rawPassword,
|
|
4954
4968
|
zipCrypto,
|
|
4955
4969
|
encryptionStrength: extraFieldAES && extraFieldAES.strength,
|
|
4956
|
-
|
|
4957
|
-
|
|
4970
|
+
checkCrc32,
|
|
4971
|
+
checkAuthenticationCode: getOptionValue$1(zipEntry, options, OPTION_CHECK_AUTHENTICATION_CODE),
|
|
4972
|
+
passwordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((crc32 >>> 24) & MAX_8_BITS)),
|
|
4958
4973
|
outputSize: passThrough ? compressedSize : uncompressedSize,
|
|
4959
|
-
|
|
4974
|
+
crc32,
|
|
4960
4975
|
compressed: compressionMethod != 0 && !passThrough,
|
|
4961
4976
|
encrypted,
|
|
4962
4977
|
useWebWorkers: getOptionValue$1(zipEntry, options, OPTION_USE_WEB_WORKERS),
|
|
@@ -4978,7 +4993,7 @@
|
|
|
4978
4993
|
fileEntry,
|
|
4979
4994
|
index,
|
|
4980
4995
|
offset: localHeaderOffset,
|
|
4981
|
-
|
|
4996
|
+
crc32,
|
|
4982
4997
|
compressedSize,
|
|
4983
4998
|
uncompressedSize,
|
|
4984
4999
|
dataOffset,
|
|
@@ -5069,6 +5084,7 @@
|
|
|
5069
5084
|
const compressionMethod = getUint16(dataView, offset + 4);
|
|
5070
5085
|
Object.assign(directory, {
|
|
5071
5086
|
signature: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),
|
|
5087
|
+
crc32: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),
|
|
5072
5088
|
compressedSize: getUint32(dataView, offset + HEADER_OFFSET_COMPRESSED_SIZE),
|
|
5073
5089
|
uncompressedSize: getUint32(dataView, offset + HEADER_OFFSET_UNCOMPRESSED_SIZE)
|
|
5074
5090
|
});
|
|
@@ -5094,6 +5110,16 @@
|
|
|
5094
5110
|
} else {
|
|
5095
5111
|
directory.compressionMethod = compressionMethod;
|
|
5096
5112
|
}
|
|
5113
|
+
const extraFieldPkwareUnix = extraField.get(EXTRAFIELD_TYPE_PKWARE_UNIX);
|
|
5114
|
+
if (extraFieldPkwareUnix) {
|
|
5115
|
+
readExtraFieldUnixDates(extraFieldPkwareUnix, directory);
|
|
5116
|
+
directory.extraFieldPkwareUnix = extraFieldPkwareUnix;
|
|
5117
|
+
}
|
|
5118
|
+
const extraFieldUnixType1 = extraField.get(EXTRAFIELD_TYPE_UNIX_TYPE1);
|
|
5119
|
+
if (extraFieldUnixType1) {
|
|
5120
|
+
readExtraFieldUnixDates(extraFieldUnixType1, directory);
|
|
5121
|
+
directory.extraFieldUnixType1 = extraFieldUnixType1;
|
|
5122
|
+
}
|
|
5097
5123
|
const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);
|
|
5098
5124
|
if (extraFieldNTFS) {
|
|
5099
5125
|
readExtraFieldNTFS(extraFieldNTFS, directory);
|
|
@@ -5143,15 +5169,15 @@
|
|
|
5143
5169
|
return;
|
|
5144
5170
|
}
|
|
5145
5171
|
const extraFieldView = getDataView(extraFieldUnicode.data);
|
|
5146
|
-
const
|
|
5147
|
-
|
|
5148
|
-
const
|
|
5149
|
-
|
|
5150
|
-
const
|
|
5172
|
+
const computedCrc32 = new Crc32();
|
|
5173
|
+
computedCrc32.append(fileEntry[rawPropertyName]);
|
|
5174
|
+
const computedCrc32View = getDataView(new Uint8Array(4));
|
|
5175
|
+
computedCrc32View.setUint32(0, computedCrc32.get(), true);
|
|
5176
|
+
const nameCrc32 = getUint32(extraFieldView, 1);
|
|
5151
5177
|
Object.assign(extraFieldUnicode, {
|
|
5152
5178
|
version: getUint8(extraFieldView, 0),
|
|
5153
5179
|
[propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),
|
|
5154
|
-
valid: !fileEntry.bitFlag.languageEncodingFlag &&
|
|
5180
|
+
valid: !fileEntry.bitFlag.languageEncodingFlag && nameCrc32 == getUint32(computedCrc32View, 0)
|
|
5155
5181
|
});
|
|
5156
5182
|
if (extraFieldUnicode.valid) {
|
|
5157
5183
|
directory[propertyName] = extraFieldUnicode[propertyName];
|
|
@@ -5170,6 +5196,9 @@
|
|
|
5170
5196
|
compressionMethod: getUint16(extraFieldView, 5)
|
|
5171
5197
|
});
|
|
5172
5198
|
directory.compressionMethod = extraFieldAES.compressionMethod;
|
|
5199
|
+
if (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1$1) {
|
|
5200
|
+
directory.crc32 = UNDEFINED_VALUE;
|
|
5201
|
+
}
|
|
5173
5202
|
}
|
|
5174
5203
|
|
|
5175
5204
|
function readExtraFieldNTFS(extraFieldNTFS, directory) {
|
|
@@ -5188,27 +5217,39 @@
|
|
|
5188
5217
|
} catch {
|
|
5189
5218
|
// ignored
|
|
5190
5219
|
}
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5220
|
+
if (tag1Data && tag1Data.length == 24) {
|
|
5221
|
+
const tag1View = getDataView(tag1Data);
|
|
5222
|
+
const rawLastModDate = tag1View.getBigUint64(0, true);
|
|
5223
|
+
const rawLastAccessDate = tag1View.getBigUint64(8, true);
|
|
5224
|
+
const rawCreationDate = tag1View.getBigUint64(16, true);
|
|
5225
|
+
Object.assign(extraFieldNTFS, {
|
|
5226
|
+
rawLastModDate,
|
|
5227
|
+
rawLastAccessDate,
|
|
5228
|
+
rawCreationDate
|
|
5229
|
+
});
|
|
5230
|
+
const lastModDate = getDateNTFS(rawLastModDate);
|
|
5231
|
+
const lastAccessDate = getDateNTFS(rawLastAccessDate);
|
|
5232
|
+
const creationDate = getDateNTFS(rawCreationDate);
|
|
5233
|
+
const extraFieldData = { lastModDate, lastAccessDate, creationDate };
|
|
5234
|
+
Object.assign(extraFieldNTFS, extraFieldData);
|
|
5235
|
+
Object.assign(directory, extraFieldData);
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
|
|
5239
|
+
function readExtraFieldUnixDates(extraField, directory) {
|
|
5240
|
+
if (extraField.data.length < 8) {
|
|
5241
|
+
return;
|
|
5211
5242
|
}
|
|
5243
|
+
const extraFieldView = getDataView(extraField.data);
|
|
5244
|
+
const lastAccessDate = new Date(getUint32(extraFieldView, 0) * 1000);
|
|
5245
|
+
const lastModDate = new Date(getUint32(extraFieldView, 4) * 1000);
|
|
5246
|
+
const extraFieldData = { lastAccessDate, lastModDate };
|
|
5247
|
+
if (extraField.data.length >= 12) {
|
|
5248
|
+
extraFieldData.uid = getUint16(extraFieldView, 8);
|
|
5249
|
+
extraFieldData.gid = getUint16(extraFieldView, 10);
|
|
5250
|
+
}
|
|
5251
|
+
Object.assign(extraField, extraFieldData);
|
|
5252
|
+
Object.assign(directory, extraFieldData);
|
|
5212
5253
|
}
|
|
5213
5254
|
|
|
5214
5255
|
function readExtraFieldUnix(extraField, directory, isInfoZip) {
|
|
@@ -5289,7 +5330,7 @@
|
|
|
5289
5330
|
fileEntry,
|
|
5290
5331
|
index,
|
|
5291
5332
|
offset,
|
|
5292
|
-
|
|
5333
|
+
crc32,
|
|
5293
5334
|
compressedSize,
|
|
5294
5335
|
uncompressedSize,
|
|
5295
5336
|
dataOffset,
|
|
@@ -5310,7 +5351,7 @@
|
|
|
5310
5351
|
const dataDescriptorSignature = dataDescriptorArray.length == dataDescriptorLength + DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH &&
|
|
5311
5352
|
getUint32(getDataView(dataDescriptorArray), 0) == DATA_DESCRIPTOR_RECORD_SIGNATURE;
|
|
5312
5353
|
if (dataDescriptorSignature) {
|
|
5313
|
-
const
|
|
5354
|
+
const readCrc32 = getUint32(getDataView(dataDescriptorArray), 4);
|
|
5314
5355
|
let readCompressedSize;
|
|
5315
5356
|
let readUncompressedSize;
|
|
5316
5357
|
if (extraFieldZip64) {
|
|
@@ -5320,8 +5361,8 @@
|
|
|
5320
5361
|
readCompressedSize = getUint32(getDataView(dataDescriptorArray), 8);
|
|
5321
5362
|
readUncompressedSize = getUint32(getDataView(dataDescriptorArray), 12);
|
|
5322
5363
|
}
|
|
5323
|
-
const
|
|
5324
|
-
if (
|
|
5364
|
+
const matchCrc32 = (fileEntry.encrypted && !fileEntry.zipCrypto) || readCrc32 == crc32;
|
|
5365
|
+
if (matchCrc32 &&
|
|
5325
5366
|
readCompressedSize == compressedSize &&
|
|
5326
5367
|
readUncompressedSize == uncompressedSize) {
|
|
5327
5368
|
dataDescriptorLength += DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;
|
|
@@ -5490,11 +5531,11 @@
|
|
|
5490
5531
|
throwAmbiguousArchive("mismatched local file header (compression method)");
|
|
5491
5532
|
}
|
|
5492
5533
|
if (!localDirectory.bitFlag.dataDescriptor &&
|
|
5493
|
-
(localDirectory.
|
|
5494
|
-
(localDirectory.
|
|
5534
|
+
(localDirectory.crc32 || localDirectory.compressedSize || localDirectory.uncompressedSize) &&
|
|
5535
|
+
(localDirectory.crc32 != zipEntry.crc32 ||
|
|
5495
5536
|
localDirectory.compressedSize != zipEntry.compressedSize ||
|
|
5496
5537
|
localDirectory.uncompressedSize != zipEntry.uncompressedSize)) {
|
|
5497
|
-
throwAmbiguousArchive("mismatched local file header (
|
|
5538
|
+
throwAmbiguousArchive("mismatched local file header (crc32 or sizes)");
|
|
5498
5539
|
}
|
|
5499
5540
|
}
|
|
5500
5541
|
|
|
@@ -5510,11 +5551,7 @@
|
|
|
5510
5551
|
|
|
5511
5552
|
function getDate(timeRaw) {
|
|
5512
5553
|
const date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & MAX_16_BITS;
|
|
5513
|
-
|
|
5514
|
-
return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);
|
|
5515
|
-
} catch {
|
|
5516
|
-
// ignored
|
|
5517
|
-
}
|
|
5554
|
+
return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);
|
|
5518
5555
|
}
|
|
5519
5556
|
|
|
5520
5557
|
function getDateNTFS(timeRaw) {
|
|
@@ -5547,7 +5584,9 @@
|
|
|
5547
5584
|
ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND: ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,
|
|
5548
5585
|
ERR_EOCDR_NOT_FOUND: ERR_EOCDR_NOT_FOUND,
|
|
5549
5586
|
ERR_EXTRAFIELD_ZIP64_NOT_FOUND: ERR_EXTRAFIELD_ZIP64_NOT_FOUND,
|
|
5587
|
+
ERR_INVALID_AUTHENTICATION_CODE: ERR_INVALID_AUTHENTICATION_CODE,
|
|
5550
5588
|
ERR_INVALID_COMPRESSED_DATA: ERR_INVALID_COMPRESSED_DATA,
|
|
5589
|
+
ERR_INVALID_CRC32: ERR_INVALID_CRC32,
|
|
5551
5590
|
ERR_INVALID_PASSWORD: ERR_INVALID_PASSWORD,
|
|
5552
5591
|
ERR_INVALID_SIGNATURE: ERR_INVALID_SIGNATURE,
|
|
5553
5592
|
ERR_INVALID_UNCOMPRESSED_SIZE: ERR_INVALID_UNCOMPRESSED_SIZE,
|
|
@@ -5601,6 +5640,8 @@
|
|
|
5601
5640
|
const ERR_UNSUPPORTED_COMPRESSION = "Compression method not supported";
|
|
5602
5641
|
const MIN_UNIX_TIME = -2147483648;
|
|
5603
5642
|
const MAX_UNIX_TIME = 2147483647;
|
|
5643
|
+
const MIN_NTFS_TIME = BigInt(0);
|
|
5644
|
+
const MAX_NTFS_TIME = BigInt("0x7fffffffffffffff");
|
|
5604
5645
|
const ERR_UNSUPPORTED_FORMAT = "Zip64 is not supported (set the 'zip64' option to 'true')";
|
|
5605
5646
|
const ERR_UNDEFINED_UNCOMPRESSED_SIZE = "Undefined uncompressed size";
|
|
5606
5647
|
const ERR_UNDEFINED_READER = "Undefined reader";
|
|
@@ -5614,7 +5655,9 @@
|
|
|
5614
5655
|
const ERR_INVALID_MSDOS_DATA = "Invalid msdosAttributes (must be an object with boolean flags)";
|
|
5615
5656
|
|
|
5616
5657
|
const EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);
|
|
5617
|
-
const
|
|
5658
|
+
const EXTRAFIELD_OFFSET_AES_VENDOR_VERSION = 4;
|
|
5659
|
+
const VENDOR_VERSION_AE_1 = 1;
|
|
5660
|
+
const INFOZIP_EXTRA_FIELD_TYPE$1 = "infozip";
|
|
5618
5661
|
const UNIX_EXTRA_FIELD_TYPE = "unix";
|
|
5619
5662
|
|
|
5620
5663
|
let workers = 0;
|
|
@@ -5708,9 +5751,9 @@
|
|
|
5708
5751
|
zip64UncompressedSize,
|
|
5709
5752
|
extraFieldLength
|
|
5710
5753
|
});
|
|
5711
|
-
const {
|
|
5712
|
-
if (
|
|
5713
|
-
setUint32(headerView, HEADER_OFFSET_SIGNATURE,
|
|
5754
|
+
const { crc32 } = entry;
|
|
5755
|
+
if (crc32 !== UNDEFINED_VALUE) {
|
|
5756
|
+
setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
|
|
5714
5757
|
}
|
|
5715
5758
|
Object.assign(entry, {
|
|
5716
5759
|
zip64UncompressedSize,
|
|
@@ -5895,6 +5938,7 @@
|
|
|
5895
5938
|
internalFileAttribute: metadataInfo.resolvedOptions.internalFileAttributes,
|
|
5896
5939
|
externalFileAttribute: attributesInfo.resolvedOptions.externalFileAttributes,
|
|
5897
5940
|
signature: options[PROPERTY_NAME_SIGNATURE],
|
|
5941
|
+
crc32: options.crc32 === UNDEFINED_VALUE ? options[PROPERTY_NAME_SIGNATURE] : options.crc32,
|
|
5898
5942
|
offset: zipWriter.offset - diskOffset,
|
|
5899
5943
|
diskNumberStart: diskNumber
|
|
5900
5944
|
});
|
|
@@ -5931,7 +5975,7 @@
|
|
|
5931
5975
|
if (unixMode !== UNDEFINED_VALUE && (unixMode < 0 || unixMode > MAX_16_BITS)) {
|
|
5932
5976
|
throw new Error(ERR_INVALID_UNIX_MODE);
|
|
5933
5977
|
}
|
|
5934
|
-
if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
|
|
5978
|
+
if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE$1 && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
|
|
5935
5979
|
throw new Error(ERR_INVALID_UNIX_EXTRA_FIELD_TYPE);
|
|
5936
5980
|
}
|
|
5937
5981
|
if (unixExtraFieldType === UNIX_EXTRA_FIELD_TYPE &&
|
|
@@ -5939,7 +5983,7 @@
|
|
|
5939
5983
|
throw new Error(ERR_INVALID_UNIX_ID_SIZE);
|
|
5940
5984
|
}
|
|
5941
5985
|
if (unixExtraFieldType === UNDEFINED_VALUE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
5942
|
-
unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE;
|
|
5986
|
+
unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE$1;
|
|
5943
5987
|
}
|
|
5944
5988
|
let msdosAttributesRaw = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW);
|
|
5945
5989
|
let msdosAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES);
|
|
@@ -6111,27 +6155,8 @@
|
|
|
6111
6155
|
if (!zipCrypto && (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) && !(encryptionStrength >= 1 && encryptionStrength <= 3)) {
|
|
6112
6156
|
throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH);
|
|
6113
6157
|
}
|
|
6114
|
-
|
|
6115
|
-
const
|
|
6116
|
-
if (extraField) {
|
|
6117
|
-
let extraFieldSize = 0;
|
|
6118
|
-
let offset = 0;
|
|
6119
|
-
extraField.forEach(data => extraFieldSize += 4 + getLength(data));
|
|
6120
|
-
rawExtraField = new Uint8Array(extraFieldSize);
|
|
6121
|
-
const rawExtraFieldView = getDataView(rawExtraField);
|
|
6122
|
-
extraField.forEach((data, type) => {
|
|
6123
|
-
if (type > MAX_16_BITS) {
|
|
6124
|
-
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
|
|
6125
|
-
}
|
|
6126
|
-
if (getLength(data) > MAX_16_BITS) {
|
|
6127
|
-
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6128
|
-
}
|
|
6129
|
-
setUint16(rawExtraFieldView, offset, type);
|
|
6130
|
-
setUint16(rawExtraFieldView, offset + 2, getLength(data));
|
|
6131
|
-
arraySet(rawExtraField, data, offset + 4);
|
|
6132
|
-
offset += 4 + getLength(data);
|
|
6133
|
-
});
|
|
6134
|
-
}
|
|
6158
|
+
const rawExtraField = serializeExtraField(options[PROPERTY_NAME_EXTRA_FIELD]);
|
|
6159
|
+
const rawLocalExtraField = serializeExtraField(options[OPTION_LOCAL_EXTRA_FIELD]);
|
|
6135
6160
|
return {
|
|
6136
6161
|
comment,
|
|
6137
6162
|
resolvedOptions: {
|
|
@@ -6165,11 +6190,36 @@
|
|
|
6165
6190
|
useCompressionStream,
|
|
6166
6191
|
dataDescriptor,
|
|
6167
6192
|
zip64,
|
|
6168
|
-
rawExtraField
|
|
6193
|
+
rawExtraField,
|
|
6194
|
+
rawLocalExtraField
|
|
6169
6195
|
}
|
|
6170
6196
|
};
|
|
6171
6197
|
}
|
|
6172
6198
|
|
|
6199
|
+
function serializeExtraField(extraField) {
|
|
6200
|
+
if (!extraField) {
|
|
6201
|
+
return EMPTY_UINT8_ARRAY;
|
|
6202
|
+
}
|
|
6203
|
+
let extraFieldSize = 0;
|
|
6204
|
+
let offset = 0;
|
|
6205
|
+
extraField.forEach(data => extraFieldSize += 4 + getLength(data));
|
|
6206
|
+
const rawExtraField = new Uint8Array(extraFieldSize);
|
|
6207
|
+
const rawExtraFieldView = getDataView(rawExtraField);
|
|
6208
|
+
extraField.forEach((data, type) => {
|
|
6209
|
+
if (type > MAX_16_BITS) {
|
|
6210
|
+
throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
|
|
6211
|
+
}
|
|
6212
|
+
if (getLength(data) > MAX_16_BITS) {
|
|
6213
|
+
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6214
|
+
}
|
|
6215
|
+
setUint16(rawExtraFieldView, offset, type);
|
|
6216
|
+
setUint16(rawExtraFieldView, offset + 2, getLength(data));
|
|
6217
|
+
arraySet(rawExtraField, data, offset + 4);
|
|
6218
|
+
offset += 4 + getLength(data);
|
|
6219
|
+
});
|
|
6220
|
+
return rawExtraField;
|
|
6221
|
+
}
|
|
6222
|
+
|
|
6173
6223
|
async function resolveSizes(zipWriter, reader, { resolvedOptions: metadata }, options) {
|
|
6174
6224
|
const { passThrough, zipCrypto, password, rawPassword, encryptionStrength } = metadata;
|
|
6175
6225
|
let { dataDescriptor, zip64, level, compressionMethod } = metadata;
|
|
@@ -6494,7 +6544,7 @@
|
|
|
6494
6544
|
msdosAttributes
|
|
6495
6545
|
};
|
|
6496
6546
|
let {
|
|
6497
|
-
|
|
6547
|
+
crc32,
|
|
6498
6548
|
uncompressedSize
|
|
6499
6549
|
} = options;
|
|
6500
6550
|
let compressedSize = 0;
|
|
@@ -6514,7 +6564,7 @@
|
|
|
6514
6564
|
encryptionStrength,
|
|
6515
6565
|
zipCrypto: encrypted && zipCrypto,
|
|
6516
6566
|
passwordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & MAX_8_BITS,
|
|
6517
|
-
|
|
6567
|
+
computeCrc32: !passThrough,
|
|
6518
6568
|
compressed: compressed && !passThrough,
|
|
6519
6569
|
encrypted: encrypted && !passThrough,
|
|
6520
6570
|
useWebWorkers,
|
|
@@ -6533,7 +6583,9 @@
|
|
|
6533
6583
|
writer.size += compressedSize;
|
|
6534
6584
|
if (!passThrough) {
|
|
6535
6585
|
uncompressedSize = result.inputSize;
|
|
6536
|
-
|
|
6586
|
+
if (!encrypted || zipCrypto) {
|
|
6587
|
+
crc32 = result.crc32;
|
|
6588
|
+
}
|
|
6537
6589
|
}
|
|
6538
6590
|
if ((!zip64CompressedSize && compressedSize >= MAX_32_BITS) ||
|
|
6539
6591
|
(!zip64UncompressedSize && uncompressedSize >= MAX_32_BITS)) {
|
|
@@ -6548,7 +6600,7 @@
|
|
|
6548
6600
|
|
|
6549
6601
|
}
|
|
6550
6602
|
setEntryInfo({
|
|
6551
|
-
|
|
6603
|
+
crc32,
|
|
6552
6604
|
compressedSize,
|
|
6553
6605
|
uncompressedSize,
|
|
6554
6606
|
headerInfo,
|
|
@@ -6571,7 +6623,8 @@
|
|
|
6571
6623
|
version,
|
|
6572
6624
|
headerArray,
|
|
6573
6625
|
headerView,
|
|
6574
|
-
signature,
|
|
6626
|
+
signature: crc32,
|
|
6627
|
+
crc32: encrypted && !zipCrypto && !passThrough ? UNDEFINED_VALUE : crc32,
|
|
6575
6628
|
extraFieldExtendedTimestampFlag,
|
|
6576
6629
|
zip64UncompressedSize,
|
|
6577
6630
|
zip64CompressedSize
|
|
@@ -6592,6 +6645,7 @@
|
|
|
6592
6645
|
dataDescriptor,
|
|
6593
6646
|
directory,
|
|
6594
6647
|
rawExtraField,
|
|
6648
|
+
rawLocalExtraField,
|
|
6595
6649
|
encryptionStrength,
|
|
6596
6650
|
extendedTimestamp,
|
|
6597
6651
|
ntfsTimestamp,
|
|
@@ -6599,7 +6653,8 @@
|
|
|
6599
6653
|
encrypted,
|
|
6600
6654
|
zip64UncompressedSize,
|
|
6601
6655
|
zip64CompressedSize,
|
|
6602
|
-
uncompressedSize
|
|
6656
|
+
uncompressedSize,
|
|
6657
|
+
crc32
|
|
6603
6658
|
} = options;
|
|
6604
6659
|
let { version, compressionMethod } = options;
|
|
6605
6660
|
const compressed = !directory && (compressionMethod === UNDEFINED_VALUE
|
|
@@ -6672,8 +6727,8 @@
|
|
|
6672
6727
|
extraFieldNTFS.uint16(EXTRAFIELD_TYPE_NTFS_TAG1);
|
|
6673
6728
|
extraFieldNTFS.uint16(24);
|
|
6674
6729
|
extraFieldNTFS.uint64(lastModTimeNTFS);
|
|
6675
|
-
extraFieldNTFS.uint64(getTimeNTFS(lastAccessDate)
|
|
6676
|
-
extraFieldNTFS.uint64(getTimeNTFS(creationDate)
|
|
6730
|
+
extraFieldNTFS.uint64(lastAccessDate ? getTimeNTFS(lastAccessDate) : lastModTimeNTFS);
|
|
6731
|
+
extraFieldNTFS.uint64(creationDate ? getTimeNTFS(creationDate) : lastModTimeNTFS);
|
|
6677
6732
|
rawExtraFieldNTFS = extraFieldNTFS.array;
|
|
6678
6733
|
} catch {
|
|
6679
6734
|
rawExtraFieldNTFS = EMPTY_UINT8_ARRAY;
|
|
@@ -6687,7 +6742,7 @@
|
|
|
6687
6742
|
let rawExtraFieldUnix;
|
|
6688
6743
|
try {
|
|
6689
6744
|
const { uid, gid, unixExtraFieldType } = options;
|
|
6690
|
-
if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
6745
|
+
if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE$1 && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
|
|
6691
6746
|
const uidBytes = packUnixId(uid);
|
|
6692
6747
|
const gidBytes = packUnixId(gid);
|
|
6693
6748
|
const payloadLength = 3 + uidBytes.length + gidBytes.length;
|
|
@@ -6725,15 +6780,18 @@
|
|
|
6725
6780
|
}
|
|
6726
6781
|
if (encrypted && !zipCrypto) {
|
|
6727
6782
|
version = version > VERSION_AES ? version : VERSION_AES;
|
|
6783
|
+
if (passThrough && crc32 !== UNDEFINED_VALUE) {
|
|
6784
|
+
rawExtraFieldAES[EXTRAFIELD_OFFSET_AES_VENDOR_VERSION] = VENDOR_VERSION_AE_1;
|
|
6785
|
+
}
|
|
6728
6786
|
rawExtraFieldAES[9] = compressionMethod;
|
|
6729
6787
|
compressionMethod = COMPRESSION_METHOD_AES;
|
|
6730
6788
|
}
|
|
6731
6789
|
const localExtraFieldZip64Length = writeLocalExtraFieldZip64 ? getLength(rawLocalExtraFieldZip64) : 0;
|
|
6732
|
-
const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField);
|
|
6790
|
+
const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawLocalExtraField);
|
|
6733
6791
|
if (extraFieldLength > MAX_16_BITS) {
|
|
6734
6792
|
throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
|
|
6735
6793
|
}
|
|
6736
|
-
const dosLastModDate = new Date(Math.ceil(lastModDate.getTime() /
|
|
6794
|
+
const dosLastModDate = new Date(Math.ceil(Math.floor(lastModDate.getTime() / 1000) / 2) * 2000);
|
|
6737
6795
|
const {
|
|
6738
6796
|
headerArray,
|
|
6739
6797
|
headerView,
|
|
@@ -6763,6 +6821,7 @@
|
|
|
6763
6821
|
localHeader.bytes(rawExtraFieldNTFS);
|
|
6764
6822
|
localHeader.bytes(rawExtraFieldUnix);
|
|
6765
6823
|
localHeader.bytes(rawExtraField);
|
|
6824
|
+
localHeader.bytes(rawLocalExtraField);
|
|
6766
6825
|
if (dataDescriptor) {
|
|
6767
6826
|
if (!zip64CompressedSize) {
|
|
6768
6827
|
setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);
|
|
@@ -6881,7 +6940,7 @@
|
|
|
6881
6940
|
}
|
|
6882
6941
|
|
|
6883
6942
|
function setEntryInfo({
|
|
6884
|
-
|
|
6943
|
+
crc32,
|
|
6885
6944
|
compressedSize,
|
|
6886
6945
|
uncompressedSize,
|
|
6887
6946
|
headerInfo,
|
|
@@ -6889,6 +6948,7 @@
|
|
|
6889
6948
|
}, {
|
|
6890
6949
|
zip64,
|
|
6891
6950
|
zipCrypto,
|
|
6951
|
+
passThrough,
|
|
6892
6952
|
dataDescriptor
|
|
6893
6953
|
}) {
|
|
6894
6954
|
const {
|
|
@@ -6899,10 +6959,10 @@
|
|
|
6899
6959
|
dataDescriptorView,
|
|
6900
6960
|
dataDescriptorOffset
|
|
6901
6961
|
} = dataDescriptorInfo;
|
|
6902
|
-
if ((!encrypted || zipCrypto) &&
|
|
6903
|
-
setUint32(headerView, HEADER_OFFSET_SIGNATURE,
|
|
6962
|
+
if ((!encrypted || zipCrypto || passThrough) && crc32 !== UNDEFINED_VALUE) {
|
|
6963
|
+
setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
|
|
6904
6964
|
if (dataDescriptor) {
|
|
6905
|
-
setUint32(dataDescriptorView, dataDescriptorOffset,
|
|
6965
|
+
setUint32(dataDescriptorView, dataDescriptorOffset, crc32);
|
|
6906
6966
|
}
|
|
6907
6967
|
}
|
|
6908
6968
|
if (zip64) {
|
|
@@ -6925,15 +6985,15 @@
|
|
|
6925
6985
|
encrypted,
|
|
6926
6986
|
zip64,
|
|
6927
6987
|
localExtraFieldZip64Length,
|
|
6928
|
-
|
|
6988
|
+
crc32,
|
|
6929
6989
|
compressedSize,
|
|
6930
6990
|
uncompressedSize,
|
|
6931
6991
|
zip64UncompressedSize,
|
|
6932
6992
|
zip64CompressedSize
|
|
6933
|
-
}, localHeaderView, { dataDescriptor }) {
|
|
6993
|
+
}, localHeaderView, { dataDescriptor, passThrough }) {
|
|
6934
6994
|
if (!dataDescriptor) {
|
|
6935
|
-
if (!encrypted) {
|
|
6936
|
-
setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET,
|
|
6995
|
+
if (!encrypted || (passThrough && crc32 !== UNDEFINED_VALUE)) {
|
|
6996
|
+
setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET, crc32);
|
|
6937
6997
|
}
|
|
6938
6998
|
if (!zip64CompressedSize) {
|
|
6939
6999
|
setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, compressedSize);
|
|
@@ -7242,7 +7302,8 @@
|
|
|
7242
7302
|
|
|
7243
7303
|
function getTimeNTFS(date) {
|
|
7244
7304
|
if (date) {
|
|
7245
|
-
|
|
7305
|
+
const timeNTFS = ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));
|
|
7306
|
+
return timeNTFS < MIN_NTFS_TIME ? MIN_NTFS_TIME : timeNTFS > MAX_NTFS_TIME ? MAX_NTFS_TIME : timeNTFS;
|
|
7246
7307
|
}
|
|
7247
7308
|
}
|
|
7248
7309
|
|
|
@@ -8266,6 +8327,20 @@
|
|
|
8266
8327
|
|
|
8267
8328
|
const ERR_ENTRY_EXISTS = "Entry filename already exists";
|
|
8268
8329
|
const ERR_READABLE_CONSUMED = "Readable stream already consumed";
|
|
8330
|
+
const INFOZIP_EXTRA_FIELD_TYPE = "infozip";
|
|
8331
|
+
const INTERPRETED_EXTRA_FIELD_TYPES = new Set([
|
|
8332
|
+
EXTRAFIELD_TYPE_ZIP64,
|
|
8333
|
+
EXTRAFIELD_TYPE_AES,
|
|
8334
|
+
EXTRAFIELD_TYPE_NTFS,
|
|
8335
|
+
EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,
|
|
8336
|
+
EXTRAFIELD_TYPE_UNICODE_PATH,
|
|
8337
|
+
EXTRAFIELD_TYPE_UNICODE_COMMENT,
|
|
8338
|
+
EXTRAFIELD_TYPE_USDZ,
|
|
8339
|
+
EXTRAFIELD_TYPE_INFOZIP,
|
|
8340
|
+
EXTRAFIELD_TYPE_UNIX,
|
|
8341
|
+
EXTRAFIELD_TYPE_UNIX_TYPE1,
|
|
8342
|
+
EXTRAFIELD_TYPE_PKWARE_UNIX
|
|
8343
|
+
]);
|
|
8269
8344
|
|
|
8270
8345
|
class ZipEntry {
|
|
8271
8346
|
|
|
@@ -9003,6 +9078,20 @@
|
|
|
9003
9078
|
}
|
|
9004
9079
|
}
|
|
9005
9080
|
|
|
9081
|
+
function getUserExtraField(extraField) {
|
|
9082
|
+
if (extraField) {
|
|
9083
|
+
const userExtraField = new Map();
|
|
9084
|
+
extraField.forEach((field, type) => {
|
|
9085
|
+
if (!INTERPRETED_EXTRA_FIELD_TYPES.has(type)) {
|
|
9086
|
+
userExtraField.set(type, field.data);
|
|
9087
|
+
}
|
|
9088
|
+
});
|
|
9089
|
+
if (userExtraField.size) {
|
|
9090
|
+
return userExtraField;
|
|
9091
|
+
}
|
|
9092
|
+
}
|
|
9093
|
+
}
|
|
9094
|
+
|
|
9006
9095
|
async function exportZip(zipWriter, entry, totalSize, options, readers) {
|
|
9007
9096
|
const selectedEntry = entry;
|
|
9008
9097
|
const entryOffsets = new Map();
|
|
@@ -9040,9 +9129,13 @@
|
|
|
9040
9129
|
uncompressedSize,
|
|
9041
9130
|
encrypted,
|
|
9042
9131
|
zipCrypto,
|
|
9043
|
-
|
|
9132
|
+
crc32,
|
|
9044
9133
|
compressionMethod,
|
|
9045
|
-
extraFieldAES
|
|
9134
|
+
extraFieldAES,
|
|
9135
|
+
internalFileAttributes,
|
|
9136
|
+
extraField,
|
|
9137
|
+
uid,
|
|
9138
|
+
gid
|
|
9046
9139
|
} = child.data;
|
|
9047
9140
|
zipEntryOptions = {
|
|
9048
9141
|
externalFileAttributes,
|
|
@@ -9050,8 +9143,20 @@
|
|
|
9050
9143
|
comment,
|
|
9051
9144
|
lastModDate,
|
|
9052
9145
|
creationDate,
|
|
9053
|
-
lastAccessDate
|
|
9146
|
+
lastAccessDate,
|
|
9147
|
+
internalFileAttributes
|
|
9054
9148
|
};
|
|
9149
|
+
const userExtraField = getUserExtraField(extraField);
|
|
9150
|
+
if (userExtraField) {
|
|
9151
|
+
zipEntryOptions.extraField = userExtraField;
|
|
9152
|
+
}
|
|
9153
|
+
if (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE) {
|
|
9154
|
+
Object.assign(zipEntryOptions, {
|
|
9155
|
+
uid,
|
|
9156
|
+
gid,
|
|
9157
|
+
unixExtraFieldType: options.unixExtraFieldType || INFOZIP_EXTRA_FIELD_TYPE
|
|
9158
|
+
});
|
|
9159
|
+
}
|
|
9055
9160
|
if (child.passThrough) {
|
|
9056
9161
|
let level, encryptionStrength;
|
|
9057
9162
|
if (compressionMethod === 0) {
|
|
@@ -9064,7 +9169,7 @@
|
|
|
9064
9169
|
passThrough: true,
|
|
9065
9170
|
encrypted,
|
|
9066
9171
|
zipCrypto,
|
|
9067
|
-
|
|
9172
|
+
crc32,
|
|
9068
9173
|
uncompressedSize,
|
|
9069
9174
|
level,
|
|
9070
9175
|
encryptionStrength,
|
|
@@ -9251,6 +9356,8 @@
|
|
|
9251
9356
|
}
|
|
9252
9357
|
}
|
|
9253
9358
|
|
|
9359
|
+
const encodedMimeTypes = "application:0andrew-inset ez,2nodex anx,1pplixware aw,1tom!,4cat!,4serv! atomsrv,5vc!,0bbolin lin,0ccxml!,1dmi-capability cdmia,6ontainer cdmic,5domain cdmid,5object cdmio,5queue cdmiq,1u-seeme cu,0davmount!,1ocbook! dbk,1sptype tsp,2sc+der,4! xdssc,0ecmascript es ecma,1mma!,1nvoy evy,1pub+zip,1xi,0font-tdpfr pfr,1ractals fif,1uturesplash spl,0gml!,1px!,1xf,1zip gz tgz,0hta,1yperstudio stk,0inkml! ink inkml,2ternet-property-stream acx,1pfix,0java-archive jar,5serialized-object ser,5vm class,1sonml+json,0lost! lostxml,0m3g,1ac-binhex40 hqx,2ds!,2rc mrc,4xml! mrcx,2thematica nb ma mb,4ml! mathml mml,1box,1ediaservercontrol! mscml,2talink!,84! meta4,3s!,1ods!,1p21 m21 mp21,24 mp4s,1saccess mdb,2word doc dot wiz,1xf,0oda,1ebps-package! opf,1gg ogx,1lescript axs,1mdoc!,1nenote onetoc onetoc2 onetmp onepkg,1xps,0patch-ops-error! xer,1df,1gp-encrypted pgp,4keys key,4signature asc sig,1ics-rules prf,1kcs10 p10,47-mime p7m p7c,6signature p7s,48 p8,2ix-attr-cert ac,5crl crl,5pkipath pkipath,4cmp pki,1ls!,1ostscript ps ai eps epsi epsf eps2 eps3,1rs.cww cww,1skc! pskcxml,0rar,1df!,1eginfo! rif,2lax-ng-compact-syntax rnc,2source-lists! rl,e-diff! rld,1ls-services! rs,1pki-ghostbusters gbr,5manifest mft,5roa roa,1sd!,2s!,1tf,0sbml!,1cvp-cv-request scq,asponse scs,5vp-request spq,asponse spp,1dp,1et-payment-initiation setpay,4registration-initiation setreg,1hf!,1mil! smi smil,1parql-query rq,7results! srx,1rgs gram,4! grxml,2u!,1sdl!,2ml!,0tei! tei teicorpus,1hraud! tfi,1imestamped-data tsd,0vnd.3gpp.pic-bw-large plb,gsmall psb,gvar pvb,82.tcap tcap,5m.post-it-notes pwn,4accpac.simply.aso aso,iimp imp,6ucobol acu,9rp atc acutc,5dobe.air-application-installer-package+zip air,aformscentral.fcdt fcdt,bxp fxp fxpl,axdp! xdp,bfdf xfdf,5head.space ahead,5irzip.filesecure.azf azf,os azs,5mazon.ebook azw,6ericandynamics.acc acc,6iga.ami ami,5ndroid.package-archive apk,6ser-web-certificate-issue-initiation cii,efunds-transfer-initiation fti,6tix.game-component atx,5pple.installer! mpkg,ampegurl m3u8,5ristanetworks.swi swi,5straea-software.iota iota,5udiograph aep,4blueice.multipass mpm,5mi bmi,5usinessobjects rep,4chemdraw! cdxml,6ipnuts.karaoke-mmd mmd,5inderella cdy,5laymore cla,6oanto.rp9 rp9,7nk.c4group c4g c4d c4f c4p c4u,6uetrust.cartomobile-config c11amc,w-pkg c11amz,5ommonspace csp,6ntact.cmsg cdbcmsg,6smocaller cmc,5rick.clicker clkx,h.keyboard clkk,ipalette clkp,itemplate clkt,iwordbank clkw,7ticaltools.wbs! wbs,5tc-posml pml,5ups-ppd ppd,6rl.car car,9pcurl pcurl,4dart dart,6ta-vision.rdz rdz,5ebian.binary-package deb udeb,6ce.data uvf uvvf uvd uvvd,9ttml! uvt uvvt,9unspecified uvx uvvx,9zip uvz uvvz,6novo.fcselayout-link fe_launch,5na dna,5olby.mlp mlp,5pgraph dpg,5reamfactory dfac,5s-keypoint kpxx,5vb.ait ait,8service svc,5ynageo geo,4ecowin.chart mag,5nliven nml,5pson.esf esf,amsf msf,aquickanime qam,asalt slt,bsf ssf,5szigno3! es3 et3,5zpix-album ez2,apackage ez3,4fdf fdf,6sn.mseed mseed,9seed seed dataless,5lographit gph,6uxtime.clip ftc,5ramemaker fm frame maker book,6ogans.fnc fnc,cltf ltf,5sc.weblaunch fsc,5ujitsu.oasys oas,h2 oa2,h3 oa3,hgp fg5,hprs bh2,8xerox.ddd ddd,focuworks xdw,n.binder xbd,6zzysheet fzs,4genomatix.tuxedo txd,6ogebra.file ggb,dtool ggt,7metry-explorer gex gre,7next gxt,7plan g2w,7space g3w,5mx gmx,5oogle-earth.kml! kml,jz kmz,5rafeq gqf gqs,6oove-account gac,bhelp ghf,bidentity-message gim,cnjector grv,btool-message gtm,gtemplate tpl,bvcard vcg,4hal! hal,6ndheld-entertainment! zmm,5bci hbci,5he.lesson-player les,5p-hpgl hpgl,9id hpid,9s hps,7jlyt jlt,7pcl pcl,axl pclxl,5ydrostatix.sof-data sfd-hdstx,5zn-3d-crossword x3d,4ibm.minipay mpy,9odcap afp listafp list3820,8rights-management irm,8secure-container sc,5ccprofile icc icm,5gloader igl,5mmervision-ivp ivp,iu ivu,5nsors.igm igm,6tercon.formnet xpw xpx,9geo i2g,7u.qbo qbo,afx qfx,5punplugged.rcprofile rcprofile,5repository.package! irp,5s-xpr xpr,6ac.fcs fcs,4jam jam,5cp.javame.midlet-rms rms,5isp jisp,5oost.joda-archive joda,4kahootz ktz ktr,5de.karbon karbon,9chart chrt,9formula kfo,9ivio flw,9ontour kon,9presenter kpr kpt,9spread ksp,9word kwd kwt,5enameaapp htke,5idspiration kia,6nar kne knp,5oan skp skd skt skm,6dak-descriptor sse,4las.las! lasxml,5lamagraphics.life-balance.desktop lbd,vexchange! lbe,5otus-1-2-3 123,aapproach apr,afreelance pre,anotes nsf,aorganizer org,ascreencam scm,awordpro lwp,4macports.portpkg portpkg,5cd mcd,5edcalcdata mc1,7iastation.cdkey cdkey,5fer mwf,6mp mfm,5icrografx.flo flo,figx igx,6f mif,5obius.daf daf,cis dis,bmbk mbk,cqy mqy,csl msl,bplc plc,btxf txf,6phun.application mpn,bcertificate mpc,6zilla.xul! xul,5s-artgalry cil,7cab-compressed cab,7excel xls xlb xlt xlm xla xlc xlw,c.addin.macroenabled.12 xlam,dsheet.binary.macroenabled.12 xlsb,jmacroenabled.12 xlsm,dtemplate.macroenabled.12 xltm,7fontobject eot,7htmlhelp chm,7ims ims,7lrm lrm,7officetheme thmx,8utlook msg,7pki.seccat cat,ctl stl,acertstore sst,8owerpoint ppt pps pot ppa pwz,h.addin.macroenabled.12 ppam,ipresentation.macroenabled.12 pptm,islide.macroenabled.12 sldm,nshow.macroenabled.12 ppsm,itemplate.macroenabled.12 potm,8roject mpp mpt,7word.document.macroenabled.12 docm,ctemplate.macroenabled.12 dotm,aks wps wks wcm wdb,8pl wpl,7xpsdocument xps,6eq mseq,5usician mus,6vee.style msty,5ynfc taglet,4neurolanguage.nlu nlu,5itf ntf nitf,5oblenet-directory nnd,dsealer nns,dweb nnw,6kia.n-gage.data ngdat,hsymbian.install n-gage,aradio-preset rpst,ms rpss,6vadigm.edm edm,fx edx,ext ext,4oasis.opendocument.chart odc,s-template otc,ndatabase odb,nformula odf,u-template odft,ngraphics odg,v-template otg,nimage odi,s-template oti,npresentation odp,z-template otp,nspreadsheet ods,y-template ots,ntext odt,r-master odm otm,stemplate ott,sweb oth,5lpc-sugar xo,5ma.dd2! dd2,5penofficeorg.extension oxt,8xmlformats-officedocument.presentationml.presentation pptx,zresentationml.slide sldx,zresentationml.slideshow ppsx,zresentationml.template potx,yspreadsheetml.sheet xlsx,zpreadsheetml.template xltx,ywordprocessingml.document docx,zordprocessingml.template dotx,5sgeo.mapguide.package mgp,7i.dp dp,9subsystem esa,4palm pdb pqa oprc,6waafile paw,5g.format str,7osasli ei6,5icsel efif,5mi.widget wg,5ocketlearn plf,6werbuilder6 pbd,5reviewsystems.box box,6oteus.magazine mgz,5ublishare-delta-tree qps,5vi.ptid1 ptid,4quark.quarkxpress qxd qxt qwd qwt qxl qxb,4realvnc.bed bed,6cordare.musicxml mxl,m! musicxml,5ig.cryptonote cryptonote,5n-realmedia rm,g-vbr rmvb,5oute66.link66! link66,4sailingtracker.track st,5eemail see,6ma sema,7d semd,7f semf,5hana.informed.formdata ifm,ntemplate itp,jinterchange iif,jpackage ipk,5imtech-mindmapper twd twds,5maf mmf,7rt.teacher teacher,5olent.sdkm! sdkm sdkd,5potfire.dxp dxp,dsfs sfs,5qlite3 db sqlite sqlite3 db-wal sqlite-wal db-shm sqlite-shm,5tardivision.calc sdc,ihart sds,hdraw sda,himpress sdd,hmath sdf smf,hwriter sdw vor,n-global sgl,6epmania.package smzip,estepchart sm,5un.xml.calc sxc,g.template stc,cdraw sxd,g.template std,cimpress sxi,j.template sti,cmath sxm,cwriter sxw,i.global sxg,jtemplate stw,6s-calendar sus susp,5vd svd,5ymbian.install sis sisx,6ncml! xsm,a.dm+wbxml bdm,d! xdm,4tao.intent-module-archive tao,5cpdump.pcap pcap cap dmp,5mobile-livetv tmo,5rid.tpt tpt,7scape.mxs mxs,6ueapp tra,4ufdl ufd ufdl,5iq.theme utz,5majin umj,5nity unityweb,5oml! uoml,4vcx vcx,5isio vsd vst vss vsw vsdx vssx vstx vssm vstm,9nary vis,5sf vsf,4wap.sic sic,9lc slc,8wbxml wbxml,9mlc wmlc,bscriptc wmlsc,5ebturbo wtb,5olfram.player nbp,6rdperfect wpd,f5.1 wp5,5qd wqd,5t.stf stf,4xara xar,5fdl xfdl,4yamaha.hv-dic hvd,escript hvs,evoice hvp,bopenscoreformat osf,q.osfpvg! osfpvg,bsmaf-audio saf,gphrase spf,5ellowriver-custom-menu cmp,4zul zir zirz,5zazz.deck! zaz,1oicexml! vxml,0widget wgt,2nhlp hlp,1sdl!,2policy!,0x-123 wk,27z-compressed 7z,2abiword abw,3ce-compressed ace,3pple-diskimage dmg,3uthorware-bin aab x32 u32 vox,dmap aam,dseg aas,2bcpio bcpio,3ittorrent torrent,3lorb blb blorb,3zip bz,62 bz2 boz,2cbr cbr cba cbt cb7,4z cbz,3df cdf cda,4link vcd,3fs-compressed cfs,3hat chat,4ess-pgn pgn,3ompress z,4nference nsc,3pio cpio,3sh csh,2dgc-compressed dgc,3irector dir dxr cst cct cxt w3d fgd swa,3ms dms,3oom wad,3tbncx! ncx,5ook! dtb,5resource! res,3vi dvi,2eva eva,2font-bdf bdf,7ghostscript gsf,7linux-psf psf,7pcf pcf,7snf snf,7ttf ttf ttc,8ype1 pfa pfb pfm afm,3reearc arc,6mind mm,2gca-compressed gca,3lulx ulx,3numeric gnumeric,3o-sgf sgf,3ramps-xml gramps,5phing-calculator gcf,3tar gtar taz,2hdf hdf,3ttpd-eruby rhtml,8php phtml pht php,b-source phps,b3 php3,c-preprocessed php3p,b4 php4,b5 php5,2ica ica,3nfo info,4stall-instructions install,4ternet-signup ins isp,3phone iii,3so9660-image iso,2java-jnlp-file jnlp,3mol jmz,2killustrator kil,3rita kra krz,2latex latex,3yx lyx,3zh-compressed lzh lha,4x lzx,2maker frm fb fbdoc,3ie mie,3obipocket-ebook prc mobi,3s-application application,5installer msi,5shortcut lnk,5wmd wmd,5xbap xbap,4binder obd,4cardfile crd,5lip clp,4dos-program com exe bat dll,4mediaview mvb m13 m14,6tafile wmf wmz emf emz,5oney mny,4publisher pub,4schedule scd,4terminal trm,4write wri,2netcdf nc,3s-proxy-autoconfig pac dat,3wc nwc,3zb nzb,2object o,3z-application oza,2perfmon pma pmc pmr pmw,5l pm pl,3kcs12 p12 pfx,67-certificates p7b spc,creqresp p7r,3ython-code pyc pyo,2qgis qgs shp shx,3uicktimeplayer qtl,2redhat-package-manager rpm rpa,4search-info-systems ris,3uby rb,2sh sh,4ar shar,4ockwave-flash swf swfl,3ilverlight scr,d-app xap,3ql sql,3tuffit sit,9x sitx,3ubrip srt,3v4cpio sv4cpio,6rc sv4crc,2t3vm-image t3,3ar tar,3ex-gf gf,6pk pk,6tfm tfm,5info texinfo texi,3gif obj,3rash ~ % bak old sik,2ustar ustar,2wais-source src,3ingz wz,2x509-ca-cert crt der cer,3cf xcf,3fig fig,3liff! xlf,3pinstall xpi,3z xz,2zmachine z1 z2 z3 z4 z5 z6 z7 z8,1aml!,1cap-diff! xdf,1enc!,1html! xhtml xht,1ml xml xsl xsd xpdl,3-dtd dtd,1op!,1proc! xpl,1slt!,2pf!,1v! mxml xhvml xvml xvm,0yaml yaml yml,2ng,1in!,1nd.ms-pkipko pko,0zip;audio:0aac,1dpcm adp,1iff aiff aif aff,1mr,3-wb awb,1nnodex axa,0basic au snd,0flac,0midi mid midi kar rmi,1p4 mp4a,2eg mpga mpega mp3 m4a mp2a m2a m3a,4url m3u,0ogg oga ogg spx,1pus,0prs.sid sid,0s3m,1ilk sil,0vnd.dece.audio uva uvva,5igital-winds eol,5ra dra,5ts dts,7.hd dtshd,4lucent.voice lvp,4ms-playready.media.pya pya,4nuera.ecelp4800 ecelp4800,f7470 ecelp7470,f9600 ecelp9600,4rip rip,0wav,1ebm weba,0x-aiff aifc,2caf caf,2gsm gsm,2matroska mka,3s-wax wax,6ma wma,2pn-realaudio ram,e-plugin rmp,2realaudio ra,2sd2 sd2,1m;chemical:0x-alchemy alc,2cache cac cache,7-csf csf,5tvs-binary cbin cascii ctab,3dx cdx,3hem3d c3d,3if cif,3mdf cmdf,4l cml,3ompass cpa,3rossfire bsd,3sml csml csm,3tx ctx,3xf cxf cef,2embl-dl-nucleotide emb embl,2gamess-input inp gam gamin,4ussian-checkpoint fch fchk,cube cub,binput gau gjc gjf,blog gal,3cg8-sequence gcg,3enbank gen,2hin hin,2isostar istr ist,2jcamp-dx jdx dx,2kinemage kin,2macmolecule mcm,5romodel-input mmod,3dl-molfile mol,6rdfile rd,7xnfile rxn,6sdfile sd,6tgf tgf,3mcif mcif,3ol2 mol2,5conn-Z b,4pac-graph gpt,8input mop mopcrt zmt,8out moo,2ncbi-asn1 asn,b-ascii prt ent,cbinary val,2rosdal ros,2swissprot sw,2vamas-iso14976 vms,3md vmd,2xtel xtel,3yz xyz;font:0otf,0woff,42;image:0avif avif avifs,0bmp,0cgm,1is-cod cod,0g3fax g3,1if,0heic heif heic,0ief,0jpeg jpeg jpg jpe jfif jfif-tbnl jif,0ktx,0pcx,1jpeg pjpg,1ng,1rs.btif btif,0sgi,1vg! svg svgz,0tiff tiff tif,0vnd.adobe.photoshop psd,4dece.graphic uvi uvvi uvg uvvg,5jvu djvu djv,5wg dwg,5xf dxf,4fastbidsheet fbs,5px fpx,5st fst,5ujixerox.edmics-mmr mmr,lrlc rlc,4ms-modi mdi,7photo wdp,4net-fpx npx,4wap.wbmp wbmp,4xiff xif,0webp,0x-3ds 3ds,2adobe-dng dng,2canon-cr2 cr2,aw crw,3mu-raster ras,4x cmx,3oreldraw cdr,bpattern pat,btemplate cdt,7photopaint cpt,2epson-erf erf,2freehand fh fhc fh4 fh5 fh7,3uji-raf raf,2icns icns,4on ico,2jg art,3ng jng,2kodak-dcr dcr,8k25 k25,9dc kdc,2minolta-mrw mrw,2nikon-nef nef,2olympus-orf orf,2panasonic-raw raw rw2 rwl,3entax-pef pef ptx,3ict pic pct,3ortable-anymap pnm,bbitmap pbm,bgraymap pgm,bpixmap ppm,2rgb rgb,2sigma-x3f x3f,3ony-arw arw,7sr2 sr2,9f srf,2tga tga,2xbitmap xbm,3pixmap xpm,3windowdump xwd;message:0rfc822 eml mime mht mhtml nws;model:0iges igs iges,0mesh msh mesh silo,0vnd.collada! dae,4dwf dwf,4gdl gdl,5tw gtw,4mts mts,4usdz+zip usdz,4vtu vtu,1rml wrl vrml,0x3d+binary x3db x3dbz,4vrml x3dv x3dvz,3! x3dz;text:0cache-manifest manifest appcache,2lendar ics icz ifb,1ss,2v,0h323 323,1tml html htm shtml stm,0iuls uls,0javascript js,1son,0markdown md markdown mdown markdn,0n3,0plain txt text brf conf def list log in bas diff ksh,1rs.lines.tag dsc,0richtext rtx,0scriptlet sct wsc,1gml sgml sgm,0tab-separated-values tsv,1exmacs tm,1roff t tr roff man me ms,1urtle ttl,0uri-list uri uris urls,0vcard,1nd.curl curl,8.dcurl dcurl,9mcurl mcurl,9scurl scurl,4dvb.subtitle sub,4fly fly,5mi.flexstor flx,4graphviz gv,4in3d.3dml 3dml,9spot spot,4sun.j2me.app-descriptor jad,4wap.si si,9l sl,8wml wml,bscript wmls,0webviewhtml htt,0x-asm s asm,2bibtex bib,3oo boo,2c c h dic,3++hdr h++ hpp hxx hh,5src c++ cpp cxx cc,3omponent htc,2diff patch,3src d,2fortran f for f77 f90,2haskell hs,2java java,2literate-haskell lhs,2moc moc,2nfo nfo,2opml opml,2pascal p pas pp inc,3cs-gcd gcd,3ython py,2scala scala,3etext etx,3fv sfv,2tcl tcl tk,3ex tex ltx sty cls,2uuencode uu,2vcalendar vcs,5rd vcf;video:03gpp 3gp,42 3g2,0annodex axv,0dl,1v dif dv,0fli,0gl,0h261,33,34,0jpeg jpgv,2m jpm jpgm,0mj2 mj2 mjp2,1p2t ts,24 mp4 mp4v mpg4,2eg mpeg mpg mpe m1v m2v mp2 mpa mpv2,0ogg ogv,0quicktime qt mov,0vnd.dece.hd uvh uvvh,9mobile uvm uvvm,9pd uvp uvvp,9sd uvs uvvs,9video uvv uvvv,5vb.file dvb,4fvt fvt,4mpegurl mxu m4u,5s-playready.media.pyv pyv,4uvvu.mp4 uvu uvvu,4vivo viv,0webm,0x-f4v f4v,3lv flv,2la-asf lsf lsx,2m4v m4v,3atroska mpv mkv mk3d mks,3ng mng,3s-asf asf asx asr,5vob vob,5wm wm,7v wmv,7x wmx,6vx wvx,4video avi,2sgi-movie movie,3mv smv;x-conference:0x-cooltalk ice;x-world:0x-vrml vrm flr wrz xaf xof";
|
|
9360
|
+
|
|
9254
9361
|
/*
|
|
9255
9362
|
Copyright (c) 2022 Gildas Lormeau. All rights reserved.
|
|
9256
9363
|
|
|
@@ -9280,1589 +9387,6 @@
|
|
|
9280
9387
|
*/
|
|
9281
9388
|
|
|
9282
9389
|
|
|
9283
|
-
const table = {
|
|
9284
|
-
"application": {
|
|
9285
|
-
"andrew-inset": "ez",
|
|
9286
|
-
"annodex": "anx",
|
|
9287
|
-
"atom+xml": "atom",
|
|
9288
|
-
"atomcat+xml": "atomcat",
|
|
9289
|
-
"atomserv+xml": "atomsrv",
|
|
9290
|
-
"bbolin": "lin",
|
|
9291
|
-
"cu-seeme": "cu",
|
|
9292
|
-
"davmount+xml": "davmount",
|
|
9293
|
-
"dsptype": "tsp",
|
|
9294
|
-
"ecmascript": [
|
|
9295
|
-
"es",
|
|
9296
|
-
"ecma"
|
|
9297
|
-
],
|
|
9298
|
-
"futuresplash": "spl",
|
|
9299
|
-
"hta": "hta",
|
|
9300
|
-
"java-archive": "jar",
|
|
9301
|
-
"java-serialized-object": "ser",
|
|
9302
|
-
"java-vm": "class",
|
|
9303
|
-
"m3g": "m3g",
|
|
9304
|
-
"mac-binhex40": "hqx",
|
|
9305
|
-
"mathematica": [
|
|
9306
|
-
"nb",
|
|
9307
|
-
"ma",
|
|
9308
|
-
"mb"
|
|
9309
|
-
],
|
|
9310
|
-
"msaccess": "mdb",
|
|
9311
|
-
"msword": [
|
|
9312
|
-
"doc",
|
|
9313
|
-
"dot",
|
|
9314
|
-
"wiz"
|
|
9315
|
-
],
|
|
9316
|
-
"mxf": "mxf",
|
|
9317
|
-
"oda": "oda",
|
|
9318
|
-
"ogg": "ogx",
|
|
9319
|
-
"pdf": "pdf",
|
|
9320
|
-
"pgp-keys": "key",
|
|
9321
|
-
"pgp-signature": [
|
|
9322
|
-
"asc",
|
|
9323
|
-
"sig"
|
|
9324
|
-
],
|
|
9325
|
-
"pics-rules": "prf",
|
|
9326
|
-
"postscript": [
|
|
9327
|
-
"ps",
|
|
9328
|
-
"ai",
|
|
9329
|
-
"eps",
|
|
9330
|
-
"epsi",
|
|
9331
|
-
"epsf",
|
|
9332
|
-
"eps2",
|
|
9333
|
-
"eps3"
|
|
9334
|
-
],
|
|
9335
|
-
"rar": "rar",
|
|
9336
|
-
"rdf+xml": "rdf",
|
|
9337
|
-
"rss+xml": "rss",
|
|
9338
|
-
"rtf": "rtf",
|
|
9339
|
-
"xhtml+xml": [
|
|
9340
|
-
"xhtml",
|
|
9341
|
-
"xht"
|
|
9342
|
-
],
|
|
9343
|
-
"xml": [
|
|
9344
|
-
"xml",
|
|
9345
|
-
"xsl",
|
|
9346
|
-
"xsd",
|
|
9347
|
-
"xpdl"
|
|
9348
|
-
],
|
|
9349
|
-
"xspf+xml": "xspf",
|
|
9350
|
-
"zip": "zip",
|
|
9351
|
-
"vnd.android.package-archive": "apk",
|
|
9352
|
-
"vnd.cinderella": "cdy",
|
|
9353
|
-
"vnd.google-earth.kml+xml": "kml",
|
|
9354
|
-
"vnd.google-earth.kmz": "kmz",
|
|
9355
|
-
"vnd.mozilla.xul+xml": "xul",
|
|
9356
|
-
"vnd.ms-excel": [
|
|
9357
|
-
"xls",
|
|
9358
|
-
"xlb",
|
|
9359
|
-
"xlt",
|
|
9360
|
-
"xlm",
|
|
9361
|
-
"xla",
|
|
9362
|
-
"xlc",
|
|
9363
|
-
"xlw"
|
|
9364
|
-
],
|
|
9365
|
-
"vnd.ms-pki.seccat": "cat",
|
|
9366
|
-
"vnd.ms-pki.stl": "stl",
|
|
9367
|
-
"vnd.ms-powerpoint": [
|
|
9368
|
-
"ppt",
|
|
9369
|
-
"pps",
|
|
9370
|
-
"pot",
|
|
9371
|
-
"ppa",
|
|
9372
|
-
"pwz"
|
|
9373
|
-
],
|
|
9374
|
-
"vnd.oasis.opendocument.chart": "odc",
|
|
9375
|
-
"vnd.oasis.opendocument.database": "odb",
|
|
9376
|
-
"vnd.oasis.opendocument.formula": "odf",
|
|
9377
|
-
"vnd.oasis.opendocument.graphics": "odg",
|
|
9378
|
-
"vnd.oasis.opendocument.graphics-template": "otg",
|
|
9379
|
-
"vnd.oasis.opendocument.image": "odi",
|
|
9380
|
-
"vnd.oasis.opendocument.presentation": "odp",
|
|
9381
|
-
"vnd.oasis.opendocument.presentation-template": "otp",
|
|
9382
|
-
"vnd.oasis.opendocument.spreadsheet": "ods",
|
|
9383
|
-
"vnd.oasis.opendocument.spreadsheet-template": "ots",
|
|
9384
|
-
"vnd.oasis.opendocument.text": "odt",
|
|
9385
|
-
"vnd.oasis.opendocument.text-master": [
|
|
9386
|
-
"odm",
|
|
9387
|
-
"otm"
|
|
9388
|
-
],
|
|
9389
|
-
"vnd.oasis.opendocument.text-template": "ott",
|
|
9390
|
-
"vnd.oasis.opendocument.text-web": "oth",
|
|
9391
|
-
"vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
|
|
9392
|
-
"vnd.openxmlformats-officedocument.spreadsheetml.template": "xltx",
|
|
9393
|
-
"vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
|
|
9394
|
-
"vnd.openxmlformats-officedocument.presentationml.slideshow": "ppsx",
|
|
9395
|
-
"vnd.openxmlformats-officedocument.presentationml.template": "potx",
|
|
9396
|
-
"vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
|
|
9397
|
-
"vnd.openxmlformats-officedocument.wordprocessingml.template": "dotx",
|
|
9398
|
-
"vnd.smaf": "mmf",
|
|
9399
|
-
"vnd.stardivision.calc": "sdc",
|
|
9400
|
-
"vnd.stardivision.chart": "sds",
|
|
9401
|
-
"vnd.stardivision.draw": "sda",
|
|
9402
|
-
"vnd.stardivision.impress": "sdd",
|
|
9403
|
-
"vnd.stardivision.math": [
|
|
9404
|
-
"sdf",
|
|
9405
|
-
"smf"
|
|
9406
|
-
],
|
|
9407
|
-
"vnd.stardivision.writer": [
|
|
9408
|
-
"sdw",
|
|
9409
|
-
"vor"
|
|
9410
|
-
],
|
|
9411
|
-
"vnd.stardivision.writer-global": "sgl",
|
|
9412
|
-
"vnd.sun.xml.calc": "sxc",
|
|
9413
|
-
"vnd.sun.xml.calc.template": "stc",
|
|
9414
|
-
"vnd.sun.xml.draw": "sxd",
|
|
9415
|
-
"vnd.sun.xml.draw.template": "std",
|
|
9416
|
-
"vnd.sun.xml.impress": "sxi",
|
|
9417
|
-
"vnd.sun.xml.impress.template": "sti",
|
|
9418
|
-
"vnd.sun.xml.math": "sxm",
|
|
9419
|
-
"vnd.sun.xml.writer": "sxw",
|
|
9420
|
-
"vnd.sun.xml.writer.global": "sxg",
|
|
9421
|
-
"vnd.sun.xml.writer.template": "stw",
|
|
9422
|
-
"vnd.symbian.install": [
|
|
9423
|
-
"sis",
|
|
9424
|
-
"sisx"
|
|
9425
|
-
],
|
|
9426
|
-
"vnd.visio": [
|
|
9427
|
-
"vsd",
|
|
9428
|
-
"vst",
|
|
9429
|
-
"vss",
|
|
9430
|
-
"vsw",
|
|
9431
|
-
"vsdx",
|
|
9432
|
-
"vssx",
|
|
9433
|
-
"vstx",
|
|
9434
|
-
"vssm",
|
|
9435
|
-
"vstm"
|
|
9436
|
-
],
|
|
9437
|
-
"vnd.wap.wbxml": "wbxml",
|
|
9438
|
-
"vnd.wap.wmlc": "wmlc",
|
|
9439
|
-
"vnd.wap.wmlscriptc": "wmlsc",
|
|
9440
|
-
"vnd.wordperfect": "wpd",
|
|
9441
|
-
"vnd.wordperfect5.1": "wp5",
|
|
9442
|
-
"x-123": "wk",
|
|
9443
|
-
"x-7z-compressed": "7z",
|
|
9444
|
-
"x-abiword": "abw",
|
|
9445
|
-
"x-apple-diskimage": "dmg",
|
|
9446
|
-
"x-bcpio": "bcpio",
|
|
9447
|
-
"x-bittorrent": "torrent",
|
|
9448
|
-
"x-cbr": [
|
|
9449
|
-
"cbr",
|
|
9450
|
-
"cba",
|
|
9451
|
-
"cbt",
|
|
9452
|
-
"cb7"
|
|
9453
|
-
],
|
|
9454
|
-
"x-cbz": "cbz",
|
|
9455
|
-
"x-cdf": [
|
|
9456
|
-
"cdf",
|
|
9457
|
-
"cda"
|
|
9458
|
-
],
|
|
9459
|
-
"x-cdlink": "vcd",
|
|
9460
|
-
"x-chess-pgn": "pgn",
|
|
9461
|
-
"x-cpio": "cpio",
|
|
9462
|
-
"x-csh": "csh",
|
|
9463
|
-
"x-director": [
|
|
9464
|
-
"dir",
|
|
9465
|
-
"dxr",
|
|
9466
|
-
"cst",
|
|
9467
|
-
"cct",
|
|
9468
|
-
"cxt",
|
|
9469
|
-
"w3d",
|
|
9470
|
-
"fgd",
|
|
9471
|
-
"swa"
|
|
9472
|
-
],
|
|
9473
|
-
"x-dms": "dms",
|
|
9474
|
-
"x-doom": "wad",
|
|
9475
|
-
"x-dvi": "dvi",
|
|
9476
|
-
"x-httpd-eruby": "rhtml",
|
|
9477
|
-
"x-freemind": "mm",
|
|
9478
|
-
"x-gnumeric": "gnumeric",
|
|
9479
|
-
"x-go-sgf": "sgf",
|
|
9480
|
-
"x-graphing-calculator": "gcf",
|
|
9481
|
-
"x-gtar": [
|
|
9482
|
-
"gtar",
|
|
9483
|
-
"taz"
|
|
9484
|
-
],
|
|
9485
|
-
"x-hdf": "hdf",
|
|
9486
|
-
"x-httpd-php": [
|
|
9487
|
-
"phtml",
|
|
9488
|
-
"pht",
|
|
9489
|
-
"php"
|
|
9490
|
-
],
|
|
9491
|
-
"x-httpd-php-source": "phps",
|
|
9492
|
-
"x-httpd-php3": "php3",
|
|
9493
|
-
"x-httpd-php3-preprocessed": "php3p",
|
|
9494
|
-
"x-httpd-php4": "php4",
|
|
9495
|
-
"x-httpd-php5": "php5",
|
|
9496
|
-
"x-ica": "ica",
|
|
9497
|
-
"x-info": "info",
|
|
9498
|
-
"x-internet-signup": [
|
|
9499
|
-
"ins",
|
|
9500
|
-
"isp"
|
|
9501
|
-
],
|
|
9502
|
-
"x-iphone": "iii",
|
|
9503
|
-
"x-iso9660-image": "iso",
|
|
9504
|
-
"x-java-jnlp-file": "jnlp",
|
|
9505
|
-
"x-jmol": "jmz",
|
|
9506
|
-
"x-killustrator": "kil",
|
|
9507
|
-
"x-latex": "latex",
|
|
9508
|
-
"x-lyx": "lyx",
|
|
9509
|
-
"x-lzx": "lzx",
|
|
9510
|
-
"x-maker": [
|
|
9511
|
-
"frm",
|
|
9512
|
-
"fb",
|
|
9513
|
-
"fbdoc"
|
|
9514
|
-
],
|
|
9515
|
-
"x-ms-wmd": "wmd",
|
|
9516
|
-
"x-msdos-program": [
|
|
9517
|
-
"com",
|
|
9518
|
-
"exe",
|
|
9519
|
-
"bat",
|
|
9520
|
-
"dll"
|
|
9521
|
-
],
|
|
9522
|
-
"x-netcdf": [
|
|
9523
|
-
"nc"
|
|
9524
|
-
],
|
|
9525
|
-
"x-ns-proxy-autoconfig": [
|
|
9526
|
-
"pac",
|
|
9527
|
-
"dat"
|
|
9528
|
-
],
|
|
9529
|
-
"x-nwc": "nwc",
|
|
9530
|
-
"x-object": "o",
|
|
9531
|
-
"x-oz-application": "oza",
|
|
9532
|
-
"x-pkcs7-certreqresp": "p7r",
|
|
9533
|
-
"x-python-code": [
|
|
9534
|
-
"pyc",
|
|
9535
|
-
"pyo"
|
|
9536
|
-
],
|
|
9537
|
-
"x-qgis": [
|
|
9538
|
-
"qgs",
|
|
9539
|
-
"shp",
|
|
9540
|
-
"shx"
|
|
9541
|
-
],
|
|
9542
|
-
"x-quicktimeplayer": "qtl",
|
|
9543
|
-
"x-redhat-package-manager": [
|
|
9544
|
-
"rpm",
|
|
9545
|
-
"rpa"
|
|
9546
|
-
],
|
|
9547
|
-
"x-ruby": "rb",
|
|
9548
|
-
"x-sh": "sh",
|
|
9549
|
-
"x-shar": "shar",
|
|
9550
|
-
"x-shockwave-flash": [
|
|
9551
|
-
"swf",
|
|
9552
|
-
"swfl"
|
|
9553
|
-
],
|
|
9554
|
-
"x-silverlight": "scr",
|
|
9555
|
-
"x-stuffit": "sit",
|
|
9556
|
-
"x-sv4cpio": "sv4cpio",
|
|
9557
|
-
"x-sv4crc": "sv4crc",
|
|
9558
|
-
"x-tar": "tar",
|
|
9559
|
-
"x-tex-gf": "gf",
|
|
9560
|
-
"x-tex-pk": "pk",
|
|
9561
|
-
"x-texinfo": [
|
|
9562
|
-
"texinfo",
|
|
9563
|
-
"texi"
|
|
9564
|
-
],
|
|
9565
|
-
"x-trash": [
|
|
9566
|
-
"~",
|
|
9567
|
-
"%",
|
|
9568
|
-
"bak",
|
|
9569
|
-
"old",
|
|
9570
|
-
"sik"
|
|
9571
|
-
],
|
|
9572
|
-
"x-ustar": "ustar",
|
|
9573
|
-
"x-wais-source": "src",
|
|
9574
|
-
"x-wingz": "wz",
|
|
9575
|
-
"x-x509-ca-cert": [
|
|
9576
|
-
"crt",
|
|
9577
|
-
"der",
|
|
9578
|
-
"cer"
|
|
9579
|
-
],
|
|
9580
|
-
"x-xcf": "xcf",
|
|
9581
|
-
"x-xfig": "fig",
|
|
9582
|
-
"x-xpinstall": "xpi",
|
|
9583
|
-
"applixware": "aw",
|
|
9584
|
-
"atomsvc+xml": "atomsvc",
|
|
9585
|
-
"ccxml+xml": "ccxml",
|
|
9586
|
-
"cdmi-capability": "cdmia",
|
|
9587
|
-
"cdmi-container": "cdmic",
|
|
9588
|
-
"cdmi-domain": "cdmid",
|
|
9589
|
-
"cdmi-object": "cdmio",
|
|
9590
|
-
"cdmi-queue": "cdmiq",
|
|
9591
|
-
"docbook+xml": "dbk",
|
|
9592
|
-
"dssc+der": "dssc",
|
|
9593
|
-
"dssc+xml": "xdssc",
|
|
9594
|
-
"emma+xml": "emma",
|
|
9595
|
-
"epub+zip": "epub",
|
|
9596
|
-
"exi": "exi",
|
|
9597
|
-
"font-tdpfr": "pfr",
|
|
9598
|
-
"gml+xml": "gml",
|
|
9599
|
-
"gpx+xml": "gpx",
|
|
9600
|
-
"gxf": "gxf",
|
|
9601
|
-
"hyperstudio": "stk",
|
|
9602
|
-
"inkml+xml": [
|
|
9603
|
-
"ink",
|
|
9604
|
-
"inkml"
|
|
9605
|
-
],
|
|
9606
|
-
"ipfix": "ipfix",
|
|
9607
|
-
"jsonml+json": "jsonml",
|
|
9608
|
-
"lost+xml": "lostxml",
|
|
9609
|
-
"mads+xml": "mads",
|
|
9610
|
-
"marc": "mrc",
|
|
9611
|
-
"marcxml+xml": "mrcx",
|
|
9612
|
-
"mathml+xml": [
|
|
9613
|
-
"mathml",
|
|
9614
|
-
"mml"
|
|
9615
|
-
],
|
|
9616
|
-
"mbox": "mbox",
|
|
9617
|
-
"mediaservercontrol+xml": "mscml",
|
|
9618
|
-
"metalink+xml": "metalink",
|
|
9619
|
-
"metalink4+xml": "meta4",
|
|
9620
|
-
"mets+xml": "mets",
|
|
9621
|
-
"mods+xml": "mods",
|
|
9622
|
-
"mp21": [
|
|
9623
|
-
"m21",
|
|
9624
|
-
"mp21"
|
|
9625
|
-
],
|
|
9626
|
-
"mp4": "mp4s",
|
|
9627
|
-
"oebps-package+xml": "opf",
|
|
9628
|
-
"omdoc+xml": "omdoc",
|
|
9629
|
-
"onenote": [
|
|
9630
|
-
"onetoc",
|
|
9631
|
-
"onetoc2",
|
|
9632
|
-
"onetmp",
|
|
9633
|
-
"onepkg"
|
|
9634
|
-
],
|
|
9635
|
-
"oxps": "oxps",
|
|
9636
|
-
"patch-ops-error+xml": "xer",
|
|
9637
|
-
"pgp-encrypted": "pgp",
|
|
9638
|
-
"pkcs10": "p10",
|
|
9639
|
-
"pkcs7-mime": [
|
|
9640
|
-
"p7m",
|
|
9641
|
-
"p7c"
|
|
9642
|
-
],
|
|
9643
|
-
"pkcs7-signature": "p7s",
|
|
9644
|
-
"pkcs8": "p8",
|
|
9645
|
-
"pkix-attr-cert": "ac",
|
|
9646
|
-
"pkix-crl": "crl",
|
|
9647
|
-
"pkix-pkipath": "pkipath",
|
|
9648
|
-
"pkixcmp": "pki",
|
|
9649
|
-
"pls+xml": "pls",
|
|
9650
|
-
"prs.cww": "cww",
|
|
9651
|
-
"pskc+xml": "pskcxml",
|
|
9652
|
-
"reginfo+xml": "rif",
|
|
9653
|
-
"relax-ng-compact-syntax": "rnc",
|
|
9654
|
-
"resource-lists+xml": "rl",
|
|
9655
|
-
"resource-lists-diff+xml": "rld",
|
|
9656
|
-
"rls-services+xml": "rs",
|
|
9657
|
-
"rpki-ghostbusters": "gbr",
|
|
9658
|
-
"rpki-manifest": "mft",
|
|
9659
|
-
"rpki-roa": "roa",
|
|
9660
|
-
"rsd+xml": "rsd",
|
|
9661
|
-
"sbml+xml": "sbml",
|
|
9662
|
-
"scvp-cv-request": "scq",
|
|
9663
|
-
"scvp-cv-response": "scs",
|
|
9664
|
-
"scvp-vp-request": "spq",
|
|
9665
|
-
"scvp-vp-response": "spp",
|
|
9666
|
-
"sdp": "sdp",
|
|
9667
|
-
"set-payment-initiation": "setpay",
|
|
9668
|
-
"set-registration-initiation": "setreg",
|
|
9669
|
-
"shf+xml": "shf",
|
|
9670
|
-
"sparql-query": "rq",
|
|
9671
|
-
"sparql-results+xml": "srx",
|
|
9672
|
-
"srgs": "gram",
|
|
9673
|
-
"srgs+xml": "grxml",
|
|
9674
|
-
"sru+xml": "sru",
|
|
9675
|
-
"ssdl+xml": "ssdl",
|
|
9676
|
-
"ssml+xml": "ssml",
|
|
9677
|
-
"tei+xml": [
|
|
9678
|
-
"tei",
|
|
9679
|
-
"teicorpus"
|
|
9680
|
-
],
|
|
9681
|
-
"thraud+xml": "tfi",
|
|
9682
|
-
"timestamped-data": "tsd",
|
|
9683
|
-
"vnd.3gpp.pic-bw-large": "plb",
|
|
9684
|
-
"vnd.3gpp.pic-bw-small": "psb",
|
|
9685
|
-
"vnd.3gpp.pic-bw-var": "pvb",
|
|
9686
|
-
"vnd.3gpp2.tcap": "tcap",
|
|
9687
|
-
"vnd.3m.post-it-notes": "pwn",
|
|
9688
|
-
"vnd.accpac.simply.aso": "aso",
|
|
9689
|
-
"vnd.accpac.simply.imp": "imp",
|
|
9690
|
-
"vnd.acucobol": "acu",
|
|
9691
|
-
"vnd.acucorp": [
|
|
9692
|
-
"atc",
|
|
9693
|
-
"acutc"
|
|
9694
|
-
],
|
|
9695
|
-
"vnd.adobe.air-application-installer-package+zip": "air",
|
|
9696
|
-
"vnd.adobe.formscentral.fcdt": "fcdt",
|
|
9697
|
-
"vnd.adobe.fxp": [
|
|
9698
|
-
"fxp",
|
|
9699
|
-
"fxpl"
|
|
9700
|
-
],
|
|
9701
|
-
"vnd.adobe.xdp+xml": "xdp",
|
|
9702
|
-
"vnd.adobe.xfdf": "xfdf",
|
|
9703
|
-
"vnd.ahead.space": "ahead",
|
|
9704
|
-
"vnd.airzip.filesecure.azf": "azf",
|
|
9705
|
-
"vnd.airzip.filesecure.azs": "azs",
|
|
9706
|
-
"vnd.amazon.ebook": "azw",
|
|
9707
|
-
"vnd.americandynamics.acc": "acc",
|
|
9708
|
-
"vnd.amiga.ami": "ami",
|
|
9709
|
-
"vnd.anser-web-certificate-issue-initiation": "cii",
|
|
9710
|
-
"vnd.anser-web-funds-transfer-initiation": "fti",
|
|
9711
|
-
"vnd.antix.game-component": "atx",
|
|
9712
|
-
"vnd.apple.installer+xml": "mpkg",
|
|
9713
|
-
"vnd.apple.mpegurl": "m3u8",
|
|
9714
|
-
"vnd.aristanetworks.swi": "swi",
|
|
9715
|
-
"vnd.astraea-software.iota": "iota",
|
|
9716
|
-
"vnd.audiograph": "aep",
|
|
9717
|
-
"vnd.blueice.multipass": "mpm",
|
|
9718
|
-
"vnd.bmi": "bmi",
|
|
9719
|
-
"vnd.businessobjects": "rep",
|
|
9720
|
-
"vnd.chemdraw+xml": "cdxml",
|
|
9721
|
-
"vnd.chipnuts.karaoke-mmd": "mmd",
|
|
9722
|
-
"vnd.claymore": "cla",
|
|
9723
|
-
"vnd.cloanto.rp9": "rp9",
|
|
9724
|
-
"vnd.clonk.c4group": [
|
|
9725
|
-
"c4g",
|
|
9726
|
-
"c4d",
|
|
9727
|
-
"c4f",
|
|
9728
|
-
"c4p",
|
|
9729
|
-
"c4u"
|
|
9730
|
-
],
|
|
9731
|
-
"vnd.cluetrust.cartomobile-config": "c11amc",
|
|
9732
|
-
"vnd.cluetrust.cartomobile-config-pkg": "c11amz",
|
|
9733
|
-
"vnd.commonspace": "csp",
|
|
9734
|
-
"vnd.contact.cmsg": "cdbcmsg",
|
|
9735
|
-
"vnd.cosmocaller": "cmc",
|
|
9736
|
-
"vnd.crick.clicker": "clkx",
|
|
9737
|
-
"vnd.crick.clicker.keyboard": "clkk",
|
|
9738
|
-
"vnd.crick.clicker.palette": "clkp",
|
|
9739
|
-
"vnd.crick.clicker.template": "clkt",
|
|
9740
|
-
"vnd.crick.clicker.wordbank": "clkw",
|
|
9741
|
-
"vnd.criticaltools.wbs+xml": "wbs",
|
|
9742
|
-
"vnd.ctc-posml": "pml",
|
|
9743
|
-
"vnd.cups-ppd": "ppd",
|
|
9744
|
-
"vnd.curl.car": "car",
|
|
9745
|
-
"vnd.curl.pcurl": "pcurl",
|
|
9746
|
-
"vnd.dart": "dart",
|
|
9747
|
-
"vnd.data-vision.rdz": "rdz",
|
|
9748
|
-
"vnd.dece.data": [
|
|
9749
|
-
"uvf",
|
|
9750
|
-
"uvvf",
|
|
9751
|
-
"uvd",
|
|
9752
|
-
"uvvd"
|
|
9753
|
-
],
|
|
9754
|
-
"vnd.dece.ttml+xml": [
|
|
9755
|
-
"uvt",
|
|
9756
|
-
"uvvt"
|
|
9757
|
-
],
|
|
9758
|
-
"vnd.dece.unspecified": [
|
|
9759
|
-
"uvx",
|
|
9760
|
-
"uvvx"
|
|
9761
|
-
],
|
|
9762
|
-
"vnd.dece.zip": [
|
|
9763
|
-
"uvz",
|
|
9764
|
-
"uvvz"
|
|
9765
|
-
],
|
|
9766
|
-
"vnd.denovo.fcselayout-link": "fe_launch",
|
|
9767
|
-
"vnd.dna": "dna",
|
|
9768
|
-
"vnd.dolby.mlp": "mlp",
|
|
9769
|
-
"vnd.dpgraph": "dpg",
|
|
9770
|
-
"vnd.dreamfactory": "dfac",
|
|
9771
|
-
"vnd.ds-keypoint": "kpxx",
|
|
9772
|
-
"vnd.dvb.ait": "ait",
|
|
9773
|
-
"vnd.dvb.service": "svc",
|
|
9774
|
-
"vnd.dynageo": "geo",
|
|
9775
|
-
"vnd.ecowin.chart": "mag",
|
|
9776
|
-
"vnd.enliven": "nml",
|
|
9777
|
-
"vnd.epson.esf": "esf",
|
|
9778
|
-
"vnd.epson.msf": "msf",
|
|
9779
|
-
"vnd.epson.quickanime": "qam",
|
|
9780
|
-
"vnd.epson.salt": "slt",
|
|
9781
|
-
"vnd.epson.ssf": "ssf",
|
|
9782
|
-
"vnd.eszigno3+xml": [
|
|
9783
|
-
"es3",
|
|
9784
|
-
"et3"
|
|
9785
|
-
],
|
|
9786
|
-
"vnd.ezpix-album": "ez2",
|
|
9787
|
-
"vnd.ezpix-package": "ez3",
|
|
9788
|
-
"vnd.fdf": "fdf",
|
|
9789
|
-
"vnd.fdsn.mseed": "mseed",
|
|
9790
|
-
"vnd.fdsn.seed": [
|
|
9791
|
-
"seed",
|
|
9792
|
-
"dataless"
|
|
9793
|
-
],
|
|
9794
|
-
"vnd.flographit": "gph",
|
|
9795
|
-
"vnd.fluxtime.clip": "ftc",
|
|
9796
|
-
"vnd.framemaker": [
|
|
9797
|
-
"fm",
|
|
9798
|
-
"frame",
|
|
9799
|
-
"maker",
|
|
9800
|
-
"book"
|
|
9801
|
-
],
|
|
9802
|
-
"vnd.frogans.fnc": "fnc",
|
|
9803
|
-
"vnd.frogans.ltf": "ltf",
|
|
9804
|
-
"vnd.fsc.weblaunch": "fsc",
|
|
9805
|
-
"vnd.fujitsu.oasys": "oas",
|
|
9806
|
-
"vnd.fujitsu.oasys2": "oa2",
|
|
9807
|
-
"vnd.fujitsu.oasys3": "oa3",
|
|
9808
|
-
"vnd.fujitsu.oasysgp": "fg5",
|
|
9809
|
-
"vnd.fujitsu.oasysprs": "bh2",
|
|
9810
|
-
"vnd.fujixerox.ddd": "ddd",
|
|
9811
|
-
"vnd.fujixerox.docuworks": "xdw",
|
|
9812
|
-
"vnd.fujixerox.docuworks.binder": "xbd",
|
|
9813
|
-
"vnd.fuzzysheet": "fzs",
|
|
9814
|
-
"vnd.genomatix.tuxedo": "txd",
|
|
9815
|
-
"vnd.geogebra.file": "ggb",
|
|
9816
|
-
"vnd.geogebra.tool": "ggt",
|
|
9817
|
-
"vnd.geometry-explorer": [
|
|
9818
|
-
"gex",
|
|
9819
|
-
"gre"
|
|
9820
|
-
],
|
|
9821
|
-
"vnd.geonext": "gxt",
|
|
9822
|
-
"vnd.geoplan": "g2w",
|
|
9823
|
-
"vnd.geospace": "g3w",
|
|
9824
|
-
"vnd.gmx": "gmx",
|
|
9825
|
-
"vnd.grafeq": [
|
|
9826
|
-
"gqf",
|
|
9827
|
-
"gqs"
|
|
9828
|
-
],
|
|
9829
|
-
"vnd.groove-account": "gac",
|
|
9830
|
-
"vnd.groove-help": "ghf",
|
|
9831
|
-
"vnd.groove-identity-message": "gim",
|
|
9832
|
-
"vnd.groove-injector": "grv",
|
|
9833
|
-
"vnd.groove-tool-message": "gtm",
|
|
9834
|
-
"vnd.groove-tool-template": "tpl",
|
|
9835
|
-
"vnd.groove-vcard": "vcg",
|
|
9836
|
-
"vnd.hal+xml": "hal",
|
|
9837
|
-
"vnd.handheld-entertainment+xml": "zmm",
|
|
9838
|
-
"vnd.hbci": "hbci",
|
|
9839
|
-
"vnd.hhe.lesson-player": "les",
|
|
9840
|
-
"vnd.hp-hpgl": "hpgl",
|
|
9841
|
-
"vnd.hp-hpid": "hpid",
|
|
9842
|
-
"vnd.hp-hps": "hps",
|
|
9843
|
-
"vnd.hp-jlyt": "jlt",
|
|
9844
|
-
"vnd.hp-pcl": "pcl",
|
|
9845
|
-
"vnd.hp-pclxl": "pclxl",
|
|
9846
|
-
"vnd.hydrostatix.sof-data": "sfd-hdstx",
|
|
9847
|
-
"vnd.ibm.minipay": "mpy",
|
|
9848
|
-
"vnd.ibm.modcap": [
|
|
9849
|
-
"afp",
|
|
9850
|
-
"listafp",
|
|
9851
|
-
"list3820"
|
|
9852
|
-
],
|
|
9853
|
-
"vnd.ibm.rights-management": "irm",
|
|
9854
|
-
"vnd.ibm.secure-container": "sc",
|
|
9855
|
-
"vnd.iccprofile": [
|
|
9856
|
-
"icc",
|
|
9857
|
-
"icm"
|
|
9858
|
-
],
|
|
9859
|
-
"vnd.igloader": "igl",
|
|
9860
|
-
"vnd.immervision-ivp": "ivp",
|
|
9861
|
-
"vnd.immervision-ivu": "ivu",
|
|
9862
|
-
"vnd.insors.igm": "igm",
|
|
9863
|
-
"vnd.intercon.formnet": [
|
|
9864
|
-
"xpw",
|
|
9865
|
-
"xpx"
|
|
9866
|
-
],
|
|
9867
|
-
"vnd.intergeo": "i2g",
|
|
9868
|
-
"vnd.intu.qbo": "qbo",
|
|
9869
|
-
"vnd.intu.qfx": "qfx",
|
|
9870
|
-
"vnd.ipunplugged.rcprofile": "rcprofile",
|
|
9871
|
-
"vnd.irepository.package+xml": "irp",
|
|
9872
|
-
"vnd.is-xpr": "xpr",
|
|
9873
|
-
"vnd.isac.fcs": "fcs",
|
|
9874
|
-
"vnd.jam": "jam",
|
|
9875
|
-
"vnd.jcp.javame.midlet-rms": "rms",
|
|
9876
|
-
"vnd.jisp": "jisp",
|
|
9877
|
-
"vnd.joost.joda-archive": "joda",
|
|
9878
|
-
"vnd.kahootz": [
|
|
9879
|
-
"ktz",
|
|
9880
|
-
"ktr"
|
|
9881
|
-
],
|
|
9882
|
-
"vnd.kde.karbon": "karbon",
|
|
9883
|
-
"vnd.kde.kchart": "chrt",
|
|
9884
|
-
"vnd.kde.kformula": "kfo",
|
|
9885
|
-
"vnd.kde.kivio": "flw",
|
|
9886
|
-
"vnd.kde.kontour": "kon",
|
|
9887
|
-
"vnd.kde.kpresenter": [
|
|
9888
|
-
"kpr",
|
|
9889
|
-
"kpt"
|
|
9890
|
-
],
|
|
9891
|
-
"vnd.kde.kspread": "ksp",
|
|
9892
|
-
"vnd.kde.kword": [
|
|
9893
|
-
"kwd",
|
|
9894
|
-
"kwt"
|
|
9895
|
-
],
|
|
9896
|
-
"vnd.kenameaapp": "htke",
|
|
9897
|
-
"vnd.kidspiration": "kia",
|
|
9898
|
-
"vnd.kinar": [
|
|
9899
|
-
"kne",
|
|
9900
|
-
"knp"
|
|
9901
|
-
],
|
|
9902
|
-
"vnd.koan": [
|
|
9903
|
-
"skp",
|
|
9904
|
-
"skd",
|
|
9905
|
-
"skt",
|
|
9906
|
-
"skm"
|
|
9907
|
-
],
|
|
9908
|
-
"vnd.kodak-descriptor": "sse",
|
|
9909
|
-
"vnd.las.las+xml": "lasxml",
|
|
9910
|
-
"vnd.llamagraphics.life-balance.desktop": "lbd",
|
|
9911
|
-
"vnd.llamagraphics.life-balance.exchange+xml": "lbe",
|
|
9912
|
-
"vnd.lotus-1-2-3": "123",
|
|
9913
|
-
"vnd.lotus-approach": "apr",
|
|
9914
|
-
"vnd.lotus-freelance": "pre",
|
|
9915
|
-
"vnd.lotus-notes": "nsf",
|
|
9916
|
-
"vnd.lotus-organizer": "org",
|
|
9917
|
-
"vnd.lotus-screencam": "scm",
|
|
9918
|
-
"vnd.lotus-wordpro": "lwp",
|
|
9919
|
-
"vnd.macports.portpkg": "portpkg",
|
|
9920
|
-
"vnd.mcd": "mcd",
|
|
9921
|
-
"vnd.medcalcdata": "mc1",
|
|
9922
|
-
"vnd.mediastation.cdkey": "cdkey",
|
|
9923
|
-
"vnd.mfer": "mwf",
|
|
9924
|
-
"vnd.mfmp": "mfm",
|
|
9925
|
-
"vnd.micrografx.flo": "flo",
|
|
9926
|
-
"vnd.micrografx.igx": "igx",
|
|
9927
|
-
"vnd.mif": "mif",
|
|
9928
|
-
"vnd.mobius.daf": "daf",
|
|
9929
|
-
"vnd.mobius.dis": "dis",
|
|
9930
|
-
"vnd.mobius.mbk": "mbk",
|
|
9931
|
-
"vnd.mobius.mqy": "mqy",
|
|
9932
|
-
"vnd.mobius.msl": "msl",
|
|
9933
|
-
"vnd.mobius.plc": "plc",
|
|
9934
|
-
"vnd.mobius.txf": "txf",
|
|
9935
|
-
"vnd.mophun.application": "mpn",
|
|
9936
|
-
"vnd.mophun.certificate": "mpc",
|
|
9937
|
-
"vnd.ms-artgalry": "cil",
|
|
9938
|
-
"vnd.ms-cab-compressed": "cab",
|
|
9939
|
-
"vnd.ms-excel.addin.macroenabled.12": "xlam",
|
|
9940
|
-
"vnd.ms-excel.sheet.binary.macroenabled.12": "xlsb",
|
|
9941
|
-
"vnd.ms-excel.sheet.macroenabled.12": "xlsm",
|
|
9942
|
-
"vnd.ms-excel.template.macroenabled.12": "xltm",
|
|
9943
|
-
"vnd.ms-fontobject": "eot",
|
|
9944
|
-
"vnd.ms-htmlhelp": "chm",
|
|
9945
|
-
"vnd.ms-ims": "ims",
|
|
9946
|
-
"vnd.ms-lrm": "lrm",
|
|
9947
|
-
"vnd.ms-officetheme": "thmx",
|
|
9948
|
-
"vnd.ms-powerpoint.addin.macroenabled.12": "ppam",
|
|
9949
|
-
"vnd.ms-powerpoint.presentation.macroenabled.12": "pptm",
|
|
9950
|
-
"vnd.ms-powerpoint.slide.macroenabled.12": "sldm",
|
|
9951
|
-
"vnd.ms-powerpoint.slideshow.macroenabled.12": "ppsm",
|
|
9952
|
-
"vnd.ms-powerpoint.template.macroenabled.12": "potm",
|
|
9953
|
-
"vnd.ms-project": [
|
|
9954
|
-
"mpp",
|
|
9955
|
-
"mpt"
|
|
9956
|
-
],
|
|
9957
|
-
"vnd.ms-word.document.macroenabled.12": "docm",
|
|
9958
|
-
"vnd.ms-word.template.macroenabled.12": "dotm",
|
|
9959
|
-
"vnd.ms-works": [
|
|
9960
|
-
"wps",
|
|
9961
|
-
"wks",
|
|
9962
|
-
"wcm",
|
|
9963
|
-
"wdb"
|
|
9964
|
-
],
|
|
9965
|
-
"vnd.ms-wpl": "wpl",
|
|
9966
|
-
"vnd.ms-xpsdocument": "xps",
|
|
9967
|
-
"vnd.mseq": "mseq",
|
|
9968
|
-
"vnd.musician": "mus",
|
|
9969
|
-
"vnd.muvee.style": "msty",
|
|
9970
|
-
"vnd.mynfc": "taglet",
|
|
9971
|
-
"vnd.neurolanguage.nlu": "nlu",
|
|
9972
|
-
"vnd.nitf": [
|
|
9973
|
-
"ntf",
|
|
9974
|
-
"nitf"
|
|
9975
|
-
],
|
|
9976
|
-
"vnd.noblenet-directory": "nnd",
|
|
9977
|
-
"vnd.noblenet-sealer": "nns",
|
|
9978
|
-
"vnd.noblenet-web": "nnw",
|
|
9979
|
-
"vnd.nokia.n-gage.data": "ngdat",
|
|
9980
|
-
"vnd.nokia.n-gage.symbian.install": "n-gage",
|
|
9981
|
-
"vnd.nokia.radio-preset": "rpst",
|
|
9982
|
-
"vnd.nokia.radio-presets": "rpss",
|
|
9983
|
-
"vnd.novadigm.edm": "edm",
|
|
9984
|
-
"vnd.novadigm.edx": "edx",
|
|
9985
|
-
"vnd.novadigm.ext": "ext",
|
|
9986
|
-
"vnd.oasis.opendocument.chart-template": "otc",
|
|
9987
|
-
"vnd.oasis.opendocument.formula-template": "odft",
|
|
9988
|
-
"vnd.oasis.opendocument.image-template": "oti",
|
|
9989
|
-
"vnd.olpc-sugar": "xo",
|
|
9990
|
-
"vnd.oma.dd2+xml": "dd2",
|
|
9991
|
-
"vnd.openofficeorg.extension": "oxt",
|
|
9992
|
-
"vnd.openxmlformats-officedocument.presentationml.slide": "sldx",
|
|
9993
|
-
"vnd.osgeo.mapguide.package": "mgp",
|
|
9994
|
-
"vnd.osgi.dp": "dp",
|
|
9995
|
-
"vnd.osgi.subsystem": "esa",
|
|
9996
|
-
"vnd.palm": [
|
|
9997
|
-
"pdb",
|
|
9998
|
-
"pqa",
|
|
9999
|
-
"oprc"
|
|
10000
|
-
],
|
|
10001
|
-
"vnd.pawaafile": "paw",
|
|
10002
|
-
"vnd.pg.format": "str",
|
|
10003
|
-
"vnd.pg.osasli": "ei6",
|
|
10004
|
-
"vnd.picsel": "efif",
|
|
10005
|
-
"vnd.pmi.widget": "wg",
|
|
10006
|
-
"vnd.pocketlearn": "plf",
|
|
10007
|
-
"vnd.powerbuilder6": "pbd",
|
|
10008
|
-
"vnd.previewsystems.box": "box",
|
|
10009
|
-
"vnd.proteus.magazine": "mgz",
|
|
10010
|
-
"vnd.publishare-delta-tree": "qps",
|
|
10011
|
-
"vnd.pvi.ptid1": "ptid",
|
|
10012
|
-
"vnd.quark.quarkxpress": [
|
|
10013
|
-
"qxd",
|
|
10014
|
-
"qxt",
|
|
10015
|
-
"qwd",
|
|
10016
|
-
"qwt",
|
|
10017
|
-
"qxl",
|
|
10018
|
-
"qxb"
|
|
10019
|
-
],
|
|
10020
|
-
"vnd.realvnc.bed": "bed",
|
|
10021
|
-
"vnd.recordare.musicxml": "mxl",
|
|
10022
|
-
"vnd.recordare.musicxml+xml": "musicxml",
|
|
10023
|
-
"vnd.rig.cryptonote": "cryptonote",
|
|
10024
|
-
"vnd.rn-realmedia": "rm",
|
|
10025
|
-
"vnd.rn-realmedia-vbr": "rmvb",
|
|
10026
|
-
"vnd.route66.link66+xml": "link66",
|
|
10027
|
-
"vnd.sailingtracker.track": "st",
|
|
10028
|
-
"vnd.seemail": "see",
|
|
10029
|
-
"vnd.sema": "sema",
|
|
10030
|
-
"vnd.semd": "semd",
|
|
10031
|
-
"vnd.semf": "semf",
|
|
10032
|
-
"vnd.shana.informed.formdata": "ifm",
|
|
10033
|
-
"vnd.shana.informed.formtemplate": "itp",
|
|
10034
|
-
"vnd.shana.informed.interchange": "iif",
|
|
10035
|
-
"vnd.shana.informed.package": "ipk",
|
|
10036
|
-
"vnd.simtech-mindmapper": [
|
|
10037
|
-
"twd",
|
|
10038
|
-
"twds"
|
|
10039
|
-
],
|
|
10040
|
-
"vnd.smart.teacher": "teacher",
|
|
10041
|
-
"vnd.solent.sdkm+xml": [
|
|
10042
|
-
"sdkm",
|
|
10043
|
-
"sdkd"
|
|
10044
|
-
],
|
|
10045
|
-
"vnd.spotfire.dxp": "dxp",
|
|
10046
|
-
"vnd.spotfire.sfs": "sfs",
|
|
10047
|
-
"vnd.stepmania.package": "smzip",
|
|
10048
|
-
"vnd.stepmania.stepchart": "sm",
|
|
10049
|
-
"vnd.sus-calendar": [
|
|
10050
|
-
"sus",
|
|
10051
|
-
"susp"
|
|
10052
|
-
],
|
|
10053
|
-
"vnd.svd": "svd",
|
|
10054
|
-
"vnd.syncml+xml": "xsm",
|
|
10055
|
-
"vnd.syncml.dm+wbxml": "bdm",
|
|
10056
|
-
"vnd.syncml.dm+xml": "xdm",
|
|
10057
|
-
"vnd.tao.intent-module-archive": "tao",
|
|
10058
|
-
"vnd.tcpdump.pcap": [
|
|
10059
|
-
"pcap",
|
|
10060
|
-
"cap",
|
|
10061
|
-
"dmp"
|
|
10062
|
-
],
|
|
10063
|
-
"vnd.tmobile-livetv": "tmo",
|
|
10064
|
-
"vnd.trid.tpt": "tpt",
|
|
10065
|
-
"vnd.triscape.mxs": "mxs",
|
|
10066
|
-
"vnd.trueapp": "tra",
|
|
10067
|
-
"vnd.ufdl": [
|
|
10068
|
-
"ufd",
|
|
10069
|
-
"ufdl"
|
|
10070
|
-
],
|
|
10071
|
-
"vnd.uiq.theme": "utz",
|
|
10072
|
-
"vnd.umajin": "umj",
|
|
10073
|
-
"vnd.unity": "unityweb",
|
|
10074
|
-
"vnd.uoml+xml": "uoml",
|
|
10075
|
-
"vnd.vcx": "vcx",
|
|
10076
|
-
"vnd.visionary": "vis",
|
|
10077
|
-
"vnd.vsf": "vsf",
|
|
10078
|
-
"vnd.webturbo": "wtb",
|
|
10079
|
-
"vnd.wolfram.player": "nbp",
|
|
10080
|
-
"vnd.wqd": "wqd",
|
|
10081
|
-
"vnd.wt.stf": "stf",
|
|
10082
|
-
"vnd.xara": "xar",
|
|
10083
|
-
"vnd.xfdl": "xfdl",
|
|
10084
|
-
"vnd.yamaha.hv-dic": "hvd",
|
|
10085
|
-
"vnd.yamaha.hv-script": "hvs",
|
|
10086
|
-
"vnd.yamaha.hv-voice": "hvp",
|
|
10087
|
-
"vnd.yamaha.openscoreformat": "osf",
|
|
10088
|
-
"vnd.yamaha.openscoreformat.osfpvg+xml": "osfpvg",
|
|
10089
|
-
"vnd.yamaha.smaf-audio": "saf",
|
|
10090
|
-
"vnd.yamaha.smaf-phrase": "spf",
|
|
10091
|
-
"vnd.yellowriver-custom-menu": "cmp",
|
|
10092
|
-
"vnd.zul": [
|
|
10093
|
-
"zir",
|
|
10094
|
-
"zirz"
|
|
10095
|
-
],
|
|
10096
|
-
"vnd.zzazz.deck+xml": "zaz",
|
|
10097
|
-
"voicexml+xml": "vxml",
|
|
10098
|
-
"widget": "wgt",
|
|
10099
|
-
"winhlp": "hlp",
|
|
10100
|
-
"wsdl+xml": "wsdl",
|
|
10101
|
-
"wspolicy+xml": "wspolicy",
|
|
10102
|
-
"x-ace-compressed": "ace",
|
|
10103
|
-
"x-authorware-bin": [
|
|
10104
|
-
"aab",
|
|
10105
|
-
"x32",
|
|
10106
|
-
"u32",
|
|
10107
|
-
"vox"
|
|
10108
|
-
],
|
|
10109
|
-
"x-authorware-map": "aam",
|
|
10110
|
-
"x-authorware-seg": "aas",
|
|
10111
|
-
"x-blorb": [
|
|
10112
|
-
"blb",
|
|
10113
|
-
"blorb"
|
|
10114
|
-
],
|
|
10115
|
-
"x-bzip": "bz",
|
|
10116
|
-
"x-bzip2": [
|
|
10117
|
-
"bz2",
|
|
10118
|
-
"boz"
|
|
10119
|
-
],
|
|
10120
|
-
"x-cfs-compressed": "cfs",
|
|
10121
|
-
"x-chat": "chat",
|
|
10122
|
-
"x-conference": "nsc",
|
|
10123
|
-
"x-dgc-compressed": "dgc",
|
|
10124
|
-
"x-dtbncx+xml": "ncx",
|
|
10125
|
-
"x-dtbook+xml": "dtb",
|
|
10126
|
-
"x-dtbresource+xml": "res",
|
|
10127
|
-
"x-eva": "eva",
|
|
10128
|
-
"x-font-bdf": "bdf",
|
|
10129
|
-
"x-font-ghostscript": "gsf",
|
|
10130
|
-
"x-font-linux-psf": "psf",
|
|
10131
|
-
"x-font-pcf": "pcf",
|
|
10132
|
-
"x-font-snf": "snf",
|
|
10133
|
-
"x-font-ttf": [
|
|
10134
|
-
"ttf",
|
|
10135
|
-
"ttc"
|
|
10136
|
-
],
|
|
10137
|
-
"x-font-type1": [
|
|
10138
|
-
"pfa",
|
|
10139
|
-
"pfb",
|
|
10140
|
-
"pfm",
|
|
10141
|
-
"afm"
|
|
10142
|
-
],
|
|
10143
|
-
"x-freearc": "arc",
|
|
10144
|
-
"x-gca-compressed": "gca",
|
|
10145
|
-
"x-glulx": "ulx",
|
|
10146
|
-
"x-gramps-xml": "gramps",
|
|
10147
|
-
"x-install-instructions": "install",
|
|
10148
|
-
"x-lzh-compressed": [
|
|
10149
|
-
"lzh",
|
|
10150
|
-
"lha"
|
|
10151
|
-
],
|
|
10152
|
-
"x-mie": "mie",
|
|
10153
|
-
"x-mobipocket-ebook": [
|
|
10154
|
-
"prc",
|
|
10155
|
-
"mobi"
|
|
10156
|
-
],
|
|
10157
|
-
"x-ms-application": "application",
|
|
10158
|
-
"x-ms-shortcut": "lnk",
|
|
10159
|
-
"x-ms-xbap": "xbap",
|
|
10160
|
-
"x-msbinder": "obd",
|
|
10161
|
-
"x-mscardfile": "crd",
|
|
10162
|
-
"x-msclip": "clp",
|
|
10163
|
-
"x-ms-installer": "msi",
|
|
10164
|
-
"x-msmediaview": [
|
|
10165
|
-
"mvb",
|
|
10166
|
-
"m13",
|
|
10167
|
-
"m14"
|
|
10168
|
-
],
|
|
10169
|
-
"x-msmetafile": [
|
|
10170
|
-
"wmf",
|
|
10171
|
-
"wmz",
|
|
10172
|
-
"emf",
|
|
10173
|
-
"emz"
|
|
10174
|
-
],
|
|
10175
|
-
"x-msmoney": "mny",
|
|
10176
|
-
"x-mspublisher": "pub",
|
|
10177
|
-
"x-msschedule": "scd",
|
|
10178
|
-
"x-msterminal": "trm",
|
|
10179
|
-
"x-mswrite": "wri",
|
|
10180
|
-
"x-nzb": "nzb",
|
|
10181
|
-
"x-pkcs12": [
|
|
10182
|
-
"p12",
|
|
10183
|
-
"pfx"
|
|
10184
|
-
],
|
|
10185
|
-
"x-pkcs7-certificates": [
|
|
10186
|
-
"p7b",
|
|
10187
|
-
"spc"
|
|
10188
|
-
],
|
|
10189
|
-
"x-research-info-systems": "ris",
|
|
10190
|
-
"x-silverlight-app": "xap",
|
|
10191
|
-
"x-sql": "sql",
|
|
10192
|
-
"x-stuffitx": "sitx",
|
|
10193
|
-
"x-subrip": "srt",
|
|
10194
|
-
"x-t3vm-image": "t3",
|
|
10195
|
-
"x-tex-tfm": "tfm",
|
|
10196
|
-
"x-tgif": "obj",
|
|
10197
|
-
"x-xliff+xml": "xlf",
|
|
10198
|
-
"x-xz": "xz",
|
|
10199
|
-
"x-zmachine": [
|
|
10200
|
-
"z1",
|
|
10201
|
-
"z2",
|
|
10202
|
-
"z3",
|
|
10203
|
-
"z4",
|
|
10204
|
-
"z5",
|
|
10205
|
-
"z6",
|
|
10206
|
-
"z7",
|
|
10207
|
-
"z8"
|
|
10208
|
-
],
|
|
10209
|
-
"xaml+xml": "xaml",
|
|
10210
|
-
"xcap-diff+xml": "xdf",
|
|
10211
|
-
"xenc+xml": "xenc",
|
|
10212
|
-
"xml-dtd": "dtd",
|
|
10213
|
-
"xop+xml": "xop",
|
|
10214
|
-
"xproc+xml": "xpl",
|
|
10215
|
-
"xslt+xml": "xslt",
|
|
10216
|
-
"xv+xml": [
|
|
10217
|
-
"mxml",
|
|
10218
|
-
"xhvml",
|
|
10219
|
-
"xvml",
|
|
10220
|
-
"xvm"
|
|
10221
|
-
],
|
|
10222
|
-
"yang": "yang",
|
|
10223
|
-
"yin+xml": "yin",
|
|
10224
|
-
"envoy": "evy",
|
|
10225
|
-
"fractals": "fif",
|
|
10226
|
-
"internet-property-stream": "acx",
|
|
10227
|
-
"olescript": "axs",
|
|
10228
|
-
"vnd.ms-outlook": "msg",
|
|
10229
|
-
"vnd.ms-pkicertstore": "sst",
|
|
10230
|
-
"x-compress": "z",
|
|
10231
|
-
"x-perfmon": [
|
|
10232
|
-
"pma",
|
|
10233
|
-
"pmc",
|
|
10234
|
-
"pmr",
|
|
10235
|
-
"pmw"
|
|
10236
|
-
],
|
|
10237
|
-
"ynd.ms-pkipko": "pko",
|
|
10238
|
-
"gzip": [
|
|
10239
|
-
"gz",
|
|
10240
|
-
"tgz"
|
|
10241
|
-
],
|
|
10242
|
-
"smil+xml": [
|
|
10243
|
-
"smi",
|
|
10244
|
-
"smil"
|
|
10245
|
-
],
|
|
10246
|
-
"vnd.debian.binary-package": [
|
|
10247
|
-
"deb",
|
|
10248
|
-
"udeb"
|
|
10249
|
-
],
|
|
10250
|
-
"vnd.hzn-3d-crossword": "x3d",
|
|
10251
|
-
"vnd.sqlite3": [
|
|
10252
|
-
"db",
|
|
10253
|
-
"sqlite",
|
|
10254
|
-
"sqlite3",
|
|
10255
|
-
"db-wal",
|
|
10256
|
-
"sqlite-wal",
|
|
10257
|
-
"db-shm",
|
|
10258
|
-
"sqlite-shm"
|
|
10259
|
-
],
|
|
10260
|
-
"vnd.wap.sic": "sic",
|
|
10261
|
-
"vnd.wap.slc": "slc",
|
|
10262
|
-
"x-krita": [
|
|
10263
|
-
"kra",
|
|
10264
|
-
"krz"
|
|
10265
|
-
],
|
|
10266
|
-
"x-perl": [
|
|
10267
|
-
"pm",
|
|
10268
|
-
"pl"
|
|
10269
|
-
],
|
|
10270
|
-
"yaml": [
|
|
10271
|
-
"yaml",
|
|
10272
|
-
"yml"
|
|
10273
|
-
]
|
|
10274
|
-
},
|
|
10275
|
-
"audio": {
|
|
10276
|
-
"amr": "amr",
|
|
10277
|
-
"amr-wb": "awb",
|
|
10278
|
-
"annodex": "axa",
|
|
10279
|
-
"basic": [
|
|
10280
|
-
"au",
|
|
10281
|
-
"snd"
|
|
10282
|
-
],
|
|
10283
|
-
"flac": "flac",
|
|
10284
|
-
"midi": [
|
|
10285
|
-
"mid",
|
|
10286
|
-
"midi",
|
|
10287
|
-
"kar",
|
|
10288
|
-
"rmi"
|
|
10289
|
-
],
|
|
10290
|
-
"mpeg": [
|
|
10291
|
-
"mpga",
|
|
10292
|
-
"mpega",
|
|
10293
|
-
"mp3",
|
|
10294
|
-
"m4a",
|
|
10295
|
-
"mp2a",
|
|
10296
|
-
"m2a",
|
|
10297
|
-
"m3a"
|
|
10298
|
-
],
|
|
10299
|
-
"mpegurl": "m3u",
|
|
10300
|
-
"ogg": [
|
|
10301
|
-
"oga",
|
|
10302
|
-
"ogg",
|
|
10303
|
-
"spx"
|
|
10304
|
-
],
|
|
10305
|
-
"prs.sid": "sid",
|
|
10306
|
-
"x-aiff": "aifc",
|
|
10307
|
-
"x-gsm": "gsm",
|
|
10308
|
-
"x-ms-wma": "wma",
|
|
10309
|
-
"x-ms-wax": "wax",
|
|
10310
|
-
"x-pn-realaudio": "ram",
|
|
10311
|
-
"x-realaudio": "ra",
|
|
10312
|
-
"x-sd2": "sd2",
|
|
10313
|
-
"adpcm": "adp",
|
|
10314
|
-
"mp4": "mp4a",
|
|
10315
|
-
"s3m": "s3m",
|
|
10316
|
-
"silk": "sil",
|
|
10317
|
-
"vnd.dece.audio": [
|
|
10318
|
-
"uva",
|
|
10319
|
-
"uvva"
|
|
10320
|
-
],
|
|
10321
|
-
"vnd.digital-winds": "eol",
|
|
10322
|
-
"vnd.dra": "dra",
|
|
10323
|
-
"vnd.dts": "dts",
|
|
10324
|
-
"vnd.dts.hd": "dtshd",
|
|
10325
|
-
"vnd.lucent.voice": "lvp",
|
|
10326
|
-
"vnd.ms-playready.media.pya": "pya",
|
|
10327
|
-
"vnd.nuera.ecelp4800": "ecelp4800",
|
|
10328
|
-
"vnd.nuera.ecelp7470": "ecelp7470",
|
|
10329
|
-
"vnd.nuera.ecelp9600": "ecelp9600",
|
|
10330
|
-
"vnd.rip": "rip",
|
|
10331
|
-
"webm": "weba",
|
|
10332
|
-
"x-caf": "caf",
|
|
10333
|
-
"x-matroska": "mka",
|
|
10334
|
-
"x-pn-realaudio-plugin": "rmp",
|
|
10335
|
-
"xm": "xm",
|
|
10336
|
-
"aac": "aac",
|
|
10337
|
-
"aiff": [
|
|
10338
|
-
"aiff",
|
|
10339
|
-
"aif",
|
|
10340
|
-
"aff"
|
|
10341
|
-
],
|
|
10342
|
-
"opus": "opus",
|
|
10343
|
-
"wav": "wav"
|
|
10344
|
-
},
|
|
10345
|
-
"chemical": {
|
|
10346
|
-
"x-alchemy": "alc",
|
|
10347
|
-
"x-cache": [
|
|
10348
|
-
"cac",
|
|
10349
|
-
"cache"
|
|
10350
|
-
],
|
|
10351
|
-
"x-cache-csf": "csf",
|
|
10352
|
-
"x-cactvs-binary": [
|
|
10353
|
-
"cbin",
|
|
10354
|
-
"cascii",
|
|
10355
|
-
"ctab"
|
|
10356
|
-
],
|
|
10357
|
-
"x-cdx": "cdx",
|
|
10358
|
-
"x-chem3d": "c3d",
|
|
10359
|
-
"x-cif": "cif",
|
|
10360
|
-
"x-cmdf": "cmdf",
|
|
10361
|
-
"x-cml": "cml",
|
|
10362
|
-
"x-compass": "cpa",
|
|
10363
|
-
"x-crossfire": "bsd",
|
|
10364
|
-
"x-csml": [
|
|
10365
|
-
"csml",
|
|
10366
|
-
"csm"
|
|
10367
|
-
],
|
|
10368
|
-
"x-ctx": "ctx",
|
|
10369
|
-
"x-cxf": [
|
|
10370
|
-
"cxf",
|
|
10371
|
-
"cef"
|
|
10372
|
-
],
|
|
10373
|
-
"x-embl-dl-nucleotide": [
|
|
10374
|
-
"emb",
|
|
10375
|
-
"embl"
|
|
10376
|
-
],
|
|
10377
|
-
"x-gamess-input": [
|
|
10378
|
-
"inp",
|
|
10379
|
-
"gam",
|
|
10380
|
-
"gamin"
|
|
10381
|
-
],
|
|
10382
|
-
"x-gaussian-checkpoint": [
|
|
10383
|
-
"fch",
|
|
10384
|
-
"fchk"
|
|
10385
|
-
],
|
|
10386
|
-
"x-gaussian-cube": "cub",
|
|
10387
|
-
"x-gaussian-input": [
|
|
10388
|
-
"gau",
|
|
10389
|
-
"gjc",
|
|
10390
|
-
"gjf"
|
|
10391
|
-
],
|
|
10392
|
-
"x-gaussian-log": "gal",
|
|
10393
|
-
"x-gcg8-sequence": "gcg",
|
|
10394
|
-
"x-genbank": "gen",
|
|
10395
|
-
"x-hin": "hin",
|
|
10396
|
-
"x-isostar": [
|
|
10397
|
-
"istr",
|
|
10398
|
-
"ist"
|
|
10399
|
-
],
|
|
10400
|
-
"x-jcamp-dx": [
|
|
10401
|
-
"jdx",
|
|
10402
|
-
"dx"
|
|
10403
|
-
],
|
|
10404
|
-
"x-kinemage": "kin",
|
|
10405
|
-
"x-macmolecule": "mcm",
|
|
10406
|
-
"x-macromodel-input": "mmod",
|
|
10407
|
-
"x-mdl-molfile": "mol",
|
|
10408
|
-
"x-mdl-rdfile": "rd",
|
|
10409
|
-
"x-mdl-rxnfile": "rxn",
|
|
10410
|
-
"x-mdl-sdfile": "sd",
|
|
10411
|
-
"x-mdl-tgf": "tgf",
|
|
10412
|
-
"x-mmcif": "mcif",
|
|
10413
|
-
"x-mol2": "mol2",
|
|
10414
|
-
"x-molconn-Z": "b",
|
|
10415
|
-
"x-mopac-graph": "gpt",
|
|
10416
|
-
"x-mopac-input": [
|
|
10417
|
-
"mop",
|
|
10418
|
-
"mopcrt",
|
|
10419
|
-
"zmt"
|
|
10420
|
-
],
|
|
10421
|
-
"x-mopac-out": "moo",
|
|
10422
|
-
"x-ncbi-asn1": "asn",
|
|
10423
|
-
"x-ncbi-asn1-ascii": [
|
|
10424
|
-
"prt",
|
|
10425
|
-
"ent"
|
|
10426
|
-
],
|
|
10427
|
-
"x-ncbi-asn1-binary": "val",
|
|
10428
|
-
"x-rosdal": "ros",
|
|
10429
|
-
"x-swissprot": "sw",
|
|
10430
|
-
"x-vamas-iso14976": "vms",
|
|
10431
|
-
"x-vmd": "vmd",
|
|
10432
|
-
"x-xtel": "xtel",
|
|
10433
|
-
"x-xyz": "xyz"
|
|
10434
|
-
},
|
|
10435
|
-
"font": {
|
|
10436
|
-
"otf": "otf",
|
|
10437
|
-
"woff": "woff",
|
|
10438
|
-
"woff2": "woff2"
|
|
10439
|
-
},
|
|
10440
|
-
"image": {
|
|
10441
|
-
"gif": "gif",
|
|
10442
|
-
"ief": "ief",
|
|
10443
|
-
"jpeg": [
|
|
10444
|
-
"jpeg",
|
|
10445
|
-
"jpg",
|
|
10446
|
-
"jpe",
|
|
10447
|
-
"jfif",
|
|
10448
|
-
"jfif-tbnl",
|
|
10449
|
-
"jif"
|
|
10450
|
-
],
|
|
10451
|
-
"pcx": "pcx",
|
|
10452
|
-
"png": "png",
|
|
10453
|
-
"svg+xml": [
|
|
10454
|
-
"svg",
|
|
10455
|
-
"svgz"
|
|
10456
|
-
],
|
|
10457
|
-
"tiff": [
|
|
10458
|
-
"tiff",
|
|
10459
|
-
"tif"
|
|
10460
|
-
],
|
|
10461
|
-
"vnd.djvu": [
|
|
10462
|
-
"djvu",
|
|
10463
|
-
"djv"
|
|
10464
|
-
],
|
|
10465
|
-
"vnd.wap.wbmp": "wbmp",
|
|
10466
|
-
"x-canon-cr2": "cr2",
|
|
10467
|
-
"x-canon-crw": "crw",
|
|
10468
|
-
"x-cmu-raster": "ras",
|
|
10469
|
-
"x-coreldraw": "cdr",
|
|
10470
|
-
"x-coreldrawpattern": "pat",
|
|
10471
|
-
"x-coreldrawtemplate": "cdt",
|
|
10472
|
-
"x-corelphotopaint": "cpt",
|
|
10473
|
-
"x-epson-erf": "erf",
|
|
10474
|
-
"x-icon": "ico",
|
|
10475
|
-
"x-jg": "art",
|
|
10476
|
-
"x-jng": "jng",
|
|
10477
|
-
"x-nikon-nef": "nef",
|
|
10478
|
-
"x-olympus-orf": "orf",
|
|
10479
|
-
"x-portable-anymap": "pnm",
|
|
10480
|
-
"x-portable-bitmap": "pbm",
|
|
10481
|
-
"x-portable-graymap": "pgm",
|
|
10482
|
-
"x-portable-pixmap": "ppm",
|
|
10483
|
-
"x-rgb": "rgb",
|
|
10484
|
-
"x-xbitmap": "xbm",
|
|
10485
|
-
"x-xpixmap": "xpm",
|
|
10486
|
-
"x-xwindowdump": "xwd",
|
|
10487
|
-
"bmp": "bmp",
|
|
10488
|
-
"cgm": "cgm",
|
|
10489
|
-
"g3fax": "g3",
|
|
10490
|
-
"ktx": "ktx",
|
|
10491
|
-
"prs.btif": "btif",
|
|
10492
|
-
"sgi": "sgi",
|
|
10493
|
-
"vnd.dece.graphic": [
|
|
10494
|
-
"uvi",
|
|
10495
|
-
"uvvi",
|
|
10496
|
-
"uvg",
|
|
10497
|
-
"uvvg"
|
|
10498
|
-
],
|
|
10499
|
-
"vnd.dwg": "dwg",
|
|
10500
|
-
"vnd.dxf": "dxf",
|
|
10501
|
-
"vnd.fastbidsheet": "fbs",
|
|
10502
|
-
"vnd.fpx": "fpx",
|
|
10503
|
-
"vnd.fst": "fst",
|
|
10504
|
-
"vnd.fujixerox.edmics-mmr": "mmr",
|
|
10505
|
-
"vnd.fujixerox.edmics-rlc": "rlc",
|
|
10506
|
-
"vnd.ms-modi": "mdi",
|
|
10507
|
-
"vnd.ms-photo": "wdp",
|
|
10508
|
-
"vnd.net-fpx": "npx",
|
|
10509
|
-
"vnd.xiff": "xif",
|
|
10510
|
-
"webp": "webp",
|
|
10511
|
-
"x-3ds": "3ds",
|
|
10512
|
-
"x-cmx": "cmx",
|
|
10513
|
-
"x-freehand": [
|
|
10514
|
-
"fh",
|
|
10515
|
-
"fhc",
|
|
10516
|
-
"fh4",
|
|
10517
|
-
"fh5",
|
|
10518
|
-
"fh7"
|
|
10519
|
-
],
|
|
10520
|
-
"x-pict": [
|
|
10521
|
-
"pic",
|
|
10522
|
-
"pct"
|
|
10523
|
-
],
|
|
10524
|
-
"x-tga": "tga",
|
|
10525
|
-
"cis-cod": "cod",
|
|
10526
|
-
"avif": [
|
|
10527
|
-
"avif",
|
|
10528
|
-
"avifs"
|
|
10529
|
-
],
|
|
10530
|
-
"heic": [
|
|
10531
|
-
"heif",
|
|
10532
|
-
"heic"
|
|
10533
|
-
],
|
|
10534
|
-
"pjpeg": [
|
|
10535
|
-
"pjpg"
|
|
10536
|
-
],
|
|
10537
|
-
"vnd.adobe.photoshop": "psd",
|
|
10538
|
-
"x-adobe-dng": "dng",
|
|
10539
|
-
"x-fuji-raf": "raf",
|
|
10540
|
-
"x-icns": "icns",
|
|
10541
|
-
"x-kodak-dcr": "dcr",
|
|
10542
|
-
"x-kodak-k25": "k25",
|
|
10543
|
-
"x-kodak-kdc": "kdc",
|
|
10544
|
-
"x-minolta-mrw": "mrw",
|
|
10545
|
-
"x-panasonic-raw": [
|
|
10546
|
-
"raw",
|
|
10547
|
-
"rw2",
|
|
10548
|
-
"rwl"
|
|
10549
|
-
],
|
|
10550
|
-
"x-pentax-pef": [
|
|
10551
|
-
"pef",
|
|
10552
|
-
"ptx"
|
|
10553
|
-
],
|
|
10554
|
-
"x-sigma-x3f": "x3f",
|
|
10555
|
-
"x-sony-arw": "arw",
|
|
10556
|
-
"x-sony-sr2": "sr2",
|
|
10557
|
-
"x-sony-srf": "srf"
|
|
10558
|
-
},
|
|
10559
|
-
"message": {
|
|
10560
|
-
"rfc822": [
|
|
10561
|
-
"eml",
|
|
10562
|
-
"mime",
|
|
10563
|
-
"mht",
|
|
10564
|
-
"mhtml",
|
|
10565
|
-
"nws"
|
|
10566
|
-
]
|
|
10567
|
-
},
|
|
10568
|
-
"model": {
|
|
10569
|
-
"iges": [
|
|
10570
|
-
"igs",
|
|
10571
|
-
"iges"
|
|
10572
|
-
],
|
|
10573
|
-
"mesh": [
|
|
10574
|
-
"msh",
|
|
10575
|
-
"mesh",
|
|
10576
|
-
"silo"
|
|
10577
|
-
],
|
|
10578
|
-
"vrml": [
|
|
10579
|
-
"wrl",
|
|
10580
|
-
"vrml"
|
|
10581
|
-
],
|
|
10582
|
-
"x3d+vrml": [
|
|
10583
|
-
"x3dv",
|
|
10584
|
-
"x3dvz"
|
|
10585
|
-
],
|
|
10586
|
-
"x3d+xml": "x3dz",
|
|
10587
|
-
"x3d+binary": [
|
|
10588
|
-
"x3db",
|
|
10589
|
-
"x3dbz"
|
|
10590
|
-
],
|
|
10591
|
-
"vnd.collada+xml": "dae",
|
|
10592
|
-
"vnd.dwf": "dwf",
|
|
10593
|
-
"vnd.gdl": "gdl",
|
|
10594
|
-
"vnd.gtw": "gtw",
|
|
10595
|
-
"vnd.mts": "mts",
|
|
10596
|
-
"vnd.usdz+zip": "usdz",
|
|
10597
|
-
"vnd.vtu": "vtu"
|
|
10598
|
-
},
|
|
10599
|
-
"text": {
|
|
10600
|
-
"cache-manifest": [
|
|
10601
|
-
"manifest",
|
|
10602
|
-
"appcache"
|
|
10603
|
-
],
|
|
10604
|
-
"calendar": [
|
|
10605
|
-
"ics",
|
|
10606
|
-
"icz",
|
|
10607
|
-
"ifb"
|
|
10608
|
-
],
|
|
10609
|
-
"css": "css",
|
|
10610
|
-
"csv": "csv",
|
|
10611
|
-
"h323": "323",
|
|
10612
|
-
"html": [
|
|
10613
|
-
"html",
|
|
10614
|
-
"htm",
|
|
10615
|
-
"shtml",
|
|
10616
|
-
"stm"
|
|
10617
|
-
],
|
|
10618
|
-
"iuls": "uls",
|
|
10619
|
-
"plain": [
|
|
10620
|
-
"txt",
|
|
10621
|
-
"text",
|
|
10622
|
-
"brf",
|
|
10623
|
-
"conf",
|
|
10624
|
-
"def",
|
|
10625
|
-
"list",
|
|
10626
|
-
"log",
|
|
10627
|
-
"in",
|
|
10628
|
-
"bas",
|
|
10629
|
-
"diff",
|
|
10630
|
-
"ksh"
|
|
10631
|
-
],
|
|
10632
|
-
"richtext": "rtx",
|
|
10633
|
-
"scriptlet": [
|
|
10634
|
-
"sct",
|
|
10635
|
-
"wsc"
|
|
10636
|
-
],
|
|
10637
|
-
"texmacs": "tm",
|
|
10638
|
-
"tab-separated-values": "tsv",
|
|
10639
|
-
"vnd.sun.j2me.app-descriptor": "jad",
|
|
10640
|
-
"vnd.wap.wml": "wml",
|
|
10641
|
-
"vnd.wap.wmlscript": "wmls",
|
|
10642
|
-
"x-bibtex": "bib",
|
|
10643
|
-
"x-boo": "boo",
|
|
10644
|
-
"x-c++hdr": [
|
|
10645
|
-
"h++",
|
|
10646
|
-
"hpp",
|
|
10647
|
-
"hxx",
|
|
10648
|
-
"hh"
|
|
10649
|
-
],
|
|
10650
|
-
"x-c++src": [
|
|
10651
|
-
"c++",
|
|
10652
|
-
"cpp",
|
|
10653
|
-
"cxx",
|
|
10654
|
-
"cc"
|
|
10655
|
-
],
|
|
10656
|
-
"x-component": "htc",
|
|
10657
|
-
"x-dsrc": "d",
|
|
10658
|
-
"x-diff": "patch",
|
|
10659
|
-
"x-haskell": "hs",
|
|
10660
|
-
"x-java": "java",
|
|
10661
|
-
"x-literate-haskell": "lhs",
|
|
10662
|
-
"x-moc": "moc",
|
|
10663
|
-
"x-pascal": [
|
|
10664
|
-
"p",
|
|
10665
|
-
"pas",
|
|
10666
|
-
"pp",
|
|
10667
|
-
"inc"
|
|
10668
|
-
],
|
|
10669
|
-
"x-pcs-gcd": "gcd",
|
|
10670
|
-
"x-python": "py",
|
|
10671
|
-
"x-scala": "scala",
|
|
10672
|
-
"x-setext": "etx",
|
|
10673
|
-
"x-tcl": [
|
|
10674
|
-
"tcl",
|
|
10675
|
-
"tk"
|
|
10676
|
-
],
|
|
10677
|
-
"x-tex": [
|
|
10678
|
-
"tex",
|
|
10679
|
-
"ltx",
|
|
10680
|
-
"sty",
|
|
10681
|
-
"cls"
|
|
10682
|
-
],
|
|
10683
|
-
"x-vcalendar": "vcs",
|
|
10684
|
-
"x-vcard": "vcf",
|
|
10685
|
-
"n3": "n3",
|
|
10686
|
-
"prs.lines.tag": "dsc",
|
|
10687
|
-
"sgml": [
|
|
10688
|
-
"sgml",
|
|
10689
|
-
"sgm"
|
|
10690
|
-
],
|
|
10691
|
-
"troff": [
|
|
10692
|
-
"t",
|
|
10693
|
-
"tr",
|
|
10694
|
-
"roff",
|
|
10695
|
-
"man",
|
|
10696
|
-
"me",
|
|
10697
|
-
"ms"
|
|
10698
|
-
],
|
|
10699
|
-
"turtle": "ttl",
|
|
10700
|
-
"uri-list": [
|
|
10701
|
-
"uri",
|
|
10702
|
-
"uris",
|
|
10703
|
-
"urls"
|
|
10704
|
-
],
|
|
10705
|
-
"vcard": "vcard",
|
|
10706
|
-
"vnd.curl": "curl",
|
|
10707
|
-
"vnd.curl.dcurl": "dcurl",
|
|
10708
|
-
"vnd.curl.scurl": "scurl",
|
|
10709
|
-
"vnd.curl.mcurl": "mcurl",
|
|
10710
|
-
"vnd.dvb.subtitle": "sub",
|
|
10711
|
-
"vnd.fly": "fly",
|
|
10712
|
-
"vnd.fmi.flexstor": "flx",
|
|
10713
|
-
"vnd.graphviz": "gv",
|
|
10714
|
-
"vnd.in3d.3dml": "3dml",
|
|
10715
|
-
"vnd.in3d.spot": "spot",
|
|
10716
|
-
"x-asm": [
|
|
10717
|
-
"s",
|
|
10718
|
-
"asm"
|
|
10719
|
-
],
|
|
10720
|
-
"x-c": [
|
|
10721
|
-
"c",
|
|
10722
|
-
"h",
|
|
10723
|
-
"dic"
|
|
10724
|
-
],
|
|
10725
|
-
"x-fortran": [
|
|
10726
|
-
"f",
|
|
10727
|
-
"for",
|
|
10728
|
-
"f77",
|
|
10729
|
-
"f90"
|
|
10730
|
-
],
|
|
10731
|
-
"x-opml": "opml",
|
|
10732
|
-
"x-nfo": "nfo",
|
|
10733
|
-
"x-sfv": "sfv",
|
|
10734
|
-
"x-uuencode": "uu",
|
|
10735
|
-
"webviewhtml": "htt",
|
|
10736
|
-
"javascript": "js",
|
|
10737
|
-
"json": "json",
|
|
10738
|
-
"markdown": [
|
|
10739
|
-
"md",
|
|
10740
|
-
"markdown",
|
|
10741
|
-
"mdown",
|
|
10742
|
-
"markdn"
|
|
10743
|
-
],
|
|
10744
|
-
"vnd.wap.si": "si",
|
|
10745
|
-
"vnd.wap.sl": "sl"
|
|
10746
|
-
},
|
|
10747
|
-
"video": {
|
|
10748
|
-
"3gpp": "3gp",
|
|
10749
|
-
"annodex": "axv",
|
|
10750
|
-
"dl": "dl",
|
|
10751
|
-
"dv": [
|
|
10752
|
-
"dif",
|
|
10753
|
-
"dv"
|
|
10754
|
-
],
|
|
10755
|
-
"fli": "fli",
|
|
10756
|
-
"gl": "gl",
|
|
10757
|
-
"mpeg": [
|
|
10758
|
-
"mpeg",
|
|
10759
|
-
"mpg",
|
|
10760
|
-
"mpe",
|
|
10761
|
-
"m1v",
|
|
10762
|
-
"m2v",
|
|
10763
|
-
"mp2",
|
|
10764
|
-
"mpa",
|
|
10765
|
-
"mpv2"
|
|
10766
|
-
],
|
|
10767
|
-
"mp4": [
|
|
10768
|
-
"mp4",
|
|
10769
|
-
"mp4v",
|
|
10770
|
-
"mpg4"
|
|
10771
|
-
],
|
|
10772
|
-
"quicktime": [
|
|
10773
|
-
"qt",
|
|
10774
|
-
"mov"
|
|
10775
|
-
],
|
|
10776
|
-
"ogg": "ogv",
|
|
10777
|
-
"vnd.mpegurl": [
|
|
10778
|
-
"mxu",
|
|
10779
|
-
"m4u"
|
|
10780
|
-
],
|
|
10781
|
-
"x-flv": "flv",
|
|
10782
|
-
"x-la-asf": [
|
|
10783
|
-
"lsf",
|
|
10784
|
-
"lsx"
|
|
10785
|
-
],
|
|
10786
|
-
"x-mng": "mng",
|
|
10787
|
-
"x-ms-asf": [
|
|
10788
|
-
"asf",
|
|
10789
|
-
"asx",
|
|
10790
|
-
"asr"
|
|
10791
|
-
],
|
|
10792
|
-
"x-ms-wm": "wm",
|
|
10793
|
-
"x-ms-wmv": "wmv",
|
|
10794
|
-
"x-ms-wmx": "wmx",
|
|
10795
|
-
"x-ms-wvx": "wvx",
|
|
10796
|
-
"x-msvideo": "avi",
|
|
10797
|
-
"x-sgi-movie": "movie",
|
|
10798
|
-
"x-matroska": [
|
|
10799
|
-
"mpv",
|
|
10800
|
-
"mkv",
|
|
10801
|
-
"mk3d",
|
|
10802
|
-
"mks"
|
|
10803
|
-
],
|
|
10804
|
-
"3gpp2": "3g2",
|
|
10805
|
-
"h261": "h261",
|
|
10806
|
-
"h263": "h263",
|
|
10807
|
-
"h264": "h264",
|
|
10808
|
-
"jpeg": "jpgv",
|
|
10809
|
-
"jpm": [
|
|
10810
|
-
"jpm",
|
|
10811
|
-
"jpgm"
|
|
10812
|
-
],
|
|
10813
|
-
"mj2": [
|
|
10814
|
-
"mj2",
|
|
10815
|
-
"mjp2"
|
|
10816
|
-
],
|
|
10817
|
-
"vnd.dece.hd": [
|
|
10818
|
-
"uvh",
|
|
10819
|
-
"uvvh"
|
|
10820
|
-
],
|
|
10821
|
-
"vnd.dece.mobile": [
|
|
10822
|
-
"uvm",
|
|
10823
|
-
"uvvm"
|
|
10824
|
-
],
|
|
10825
|
-
"vnd.dece.pd": [
|
|
10826
|
-
"uvp",
|
|
10827
|
-
"uvvp"
|
|
10828
|
-
],
|
|
10829
|
-
"vnd.dece.sd": [
|
|
10830
|
-
"uvs",
|
|
10831
|
-
"uvvs"
|
|
10832
|
-
],
|
|
10833
|
-
"vnd.dece.video": [
|
|
10834
|
-
"uvv",
|
|
10835
|
-
"uvvv"
|
|
10836
|
-
],
|
|
10837
|
-
"vnd.dvb.file": "dvb",
|
|
10838
|
-
"vnd.fvt": "fvt",
|
|
10839
|
-
"vnd.ms-playready.media.pyv": "pyv",
|
|
10840
|
-
"vnd.uvvu.mp4": [
|
|
10841
|
-
"uvu",
|
|
10842
|
-
"uvvu"
|
|
10843
|
-
],
|
|
10844
|
-
"vnd.vivo": "viv",
|
|
10845
|
-
"webm": "webm",
|
|
10846
|
-
"x-f4v": "f4v",
|
|
10847
|
-
"x-m4v": "m4v",
|
|
10848
|
-
"x-ms-vob": "vob",
|
|
10849
|
-
"x-smv": "smv",
|
|
10850
|
-
"mp2t": "ts"
|
|
10851
|
-
},
|
|
10852
|
-
"x-conference": {
|
|
10853
|
-
"x-cooltalk": "ice"
|
|
10854
|
-
},
|
|
10855
|
-
"x-world": {
|
|
10856
|
-
"x-vrml": [
|
|
10857
|
-
"vrm",
|
|
10858
|
-
"flr",
|
|
10859
|
-
"wrz",
|
|
10860
|
-
"xaf",
|
|
10861
|
-
"xof"
|
|
10862
|
-
]
|
|
10863
|
-
}
|
|
10864
|
-
};
|
|
10865
|
-
|
|
10866
9390
|
let mimeTypes;
|
|
10867
9391
|
|
|
10868
9392
|
function getMimeType(filename) {
|
|
@@ -10871,17 +9395,25 @@
|
|
|
10871
9395
|
|
|
10872
9396
|
function getMimeTypes() {
|
|
10873
9397
|
if (!mimeTypes) {
|
|
10874
|
-
mimeTypes =
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
9398
|
+
mimeTypes = decodeMimeTypes(encodedMimeTypes);
|
|
9399
|
+
}
|
|
9400
|
+
return mimeTypes;
|
|
9401
|
+
}
|
|
9402
|
+
|
|
9403
|
+
function decodeMimeTypes(data) {
|
|
9404
|
+
const mimeTypes = Object.create(null);
|
|
9405
|
+
for (const block of data.split(";")) {
|
|
9406
|
+
const colonIndex = block.indexOf(":");
|
|
9407
|
+
const type = block.slice(0, colonIndex);
|
|
9408
|
+
let previousSubtype = "";
|
|
9409
|
+
for (const entry of block.slice(colonIndex + 1).split(",")) {
|
|
9410
|
+
const tokens = entry.split(" ");
|
|
9411
|
+
const subtype = previousSubtype.slice(0, Number.parseInt(tokens[0][0], 36)) + tokens[0].slice(1);
|
|
9412
|
+
previousSubtype = subtype;
|
|
9413
|
+
const expandedSubtype = subtype.replace(/!/g, "+xml");
|
|
9414
|
+
const extensions = tokens.length > 1 ? tokens.slice(1) : [expandedSubtype.split("+")[0]];
|
|
9415
|
+
for (const extension of extensions) {
|
|
9416
|
+
mimeTypes[extension] = type + "/" + expandedSubtype;
|
|
10885
9417
|
}
|
|
10886
9418
|
}
|
|
10887
9419
|
}
|
|
@@ -10934,10 +9466,12 @@
|
|
|
10934
9466
|
exports.ERR_EXTRAFIELD_ZIP64_NOT_FOUND = ERR_EXTRAFIELD_ZIP64_NOT_FOUND;
|
|
10935
9467
|
exports.ERR_HTTP_RANGE = ERR_HTTP_RANGE;
|
|
10936
9468
|
exports.ERR_HTTP_RESOURCE_CHANGED = ERR_HTTP_RESOURCE_CHANGED;
|
|
9469
|
+
exports.ERR_INVALID_AUTHENTICATION_CODE = ERR_INVALID_AUTHENTICATION_CODE;
|
|
10937
9470
|
exports.ERR_INVALID_CODEC_DEFINITION = ERR_INVALID_CODEC_DEFINITION;
|
|
10938
9471
|
exports.ERR_INVALID_CODEC_MODULE = ERR_INVALID_CODEC_MODULE;
|
|
10939
9472
|
exports.ERR_INVALID_COMMENT = ERR_INVALID_COMMENT;
|
|
10940
9473
|
exports.ERR_INVALID_COMPRESSED_DATA = ERR_INVALID_COMPRESSED_DATA;
|
|
9474
|
+
exports.ERR_INVALID_CRC32 = ERR_INVALID_CRC32;
|
|
10941
9475
|
exports.ERR_INVALID_ENCRYPTION_STRENGTH = ERR_INVALID_ENCRYPTION_STRENGTH;
|
|
10942
9476
|
exports.ERR_INVALID_ENTRY_COMMENT = ERR_INVALID_ENTRY_COMMENT;
|
|
10943
9477
|
exports.ERR_INVALID_ENTRY_NAME = ERR_INVALID_ENTRY_NAME;
|