Files
open-kimi-ppt-skill/editor/neo-ppt/assets/pptdExportSignature-legacy-Dm26KY_f.js
T

1 line
8.3 KiB
JavaScript

System.register(["./const-legacy-Bw9iWaro.js","./preload-helper-legacy-CKCAnWGV.js","./common-utils-legacy-BUVwbO7W.js","./index-legacy-Ce-qKpT_.js"],function(t,e){var n,i,s,r,c,o,f,a,h,d,b,u,x,l,p,y,g,w,E,A;function m(t,e=!1){return e?{h:Number(t&s),l:Number(t>>r&s)}:{h:0|Number(t>>r&s),l:0|Number(t&s)}}function v(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name&&"BYTES_PER_ELEMENT"in t&&1===t.BYTES_PER_ELEMENT}function L(t,e,n=""){if(v(t)&&(void 0===e||t.length===e))return t;void 0!==e&&function(t,e=""){if("number"!=typeof t)throw new TypeError(f(e)+"expected number, got "+typeof t);if(!Number.isSafeInteger(t)||t<0)throw new RangeError(f(e)+"expected integer >= 0, got "+t)}(e,"length");const i=v(t),s=void 0!==e?` of length ${e}`:"",r=i?`length=${t.length}`:"type="+typeof t,c=f(n)+"expected Uint8Array"+s+", got "+r;if(!i)throw new TypeError(c);throw new RangeError(c)}function U(t,e=!0){if(t.destroyed)throw new Error("hash was destroyed");if(e&&t.finished)throw new Error("digest() was already called")}function T(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function j(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function B(t,e){return t<<32-e|t>>>e}function O(t,e={}){if("function"!=typeof t)throw new TypeError('"hashCons" expected function, got type='+typeof t);e=function(t,e,n="opts"){return a(t,"defaults"),void 0!==e&&a(e,n),Object.assign(t,e)}({},e,"info");const n=(e,n)=>t(n).update(e).digest(),i=t(void 0);return n.outputLen=i.outputLen,n.blockLen=i.blockLen,n.canXOF=i.canXOF,n.create=e=>t(e),Object.assign(n,e),Object.freeze(n)}function C(t,e,n){return t&e^~t&n}function H(t,e,n){return t&e^t&n^e&n}return t("n",async function(t){const e=function(t){if(L(t),h)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=d[t[n]];return e}(E((new TextEncoder).encode(t)));let n;try{n=await (Promise.resolve({ok:true,json:async()=>({signature:"offline-bypass",algorithm:"Ed25519"})})),"Content-Type":"application/json"},body:JSON.stringify({data:e})})}catch(r){throw new A("pptx 导出签名失败: 网络错误",{cause:r})}if(!n.ok)throw new A(`pptx 导出签名失败: HTTP ${n.status}`);const s=await n.json();if(!s.signature)throw new A("pptx 导出签名失败: 响应缺少 signature");return s.signature}),{setters:[function(t){},function(t){t.t},function(t){n=t.o},function(t){i=t.s}],execute:function(){s=BigInt(2**32-1),r=BigInt(32),c=t=>t/2**32|0,o=t=>t>>>0,f=t=>t?`"${t}" `:"",a=(t,e)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw new TypeError(("object"===e?"":`"${e}" `)+"expected object, got type="+typeof t)},new Uint8Array(new Uint32Array([287454020]).buffer)[0],h="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,d=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),b=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])}),u=class{constructor(t,e,i,s){n(this,"blockLen",void 0),n(this,"outputLen",void 0),n(this,"canXOF",!1),n(this,"padOffset",void 0),n(this,"isLE",void 0),n(this,"buffer",void 0),n(this,"view",void 0),n(this,"finished",!1),n(this,"length",0),n(this,"pos",0),n(this,"destroyed",!1),this.blockLen=t,this.outputLen=e,this.padOffset=i,this.isLE=s,this.buffer=new Uint8Array(t),this.view=j(this.buffer)}update(t){U(this),L(t);const{view:e,buffer:n,blockLen:i}=this,s=t.length;let r=!1;for(let c=0;c<s;){const o=Math.min(i-this.pos,s-c);if(o===i){const e=j(t);for(;i<=s-c;c+=i)this.process(e,c);r=!0;continue}n.set(0===c&&o===s?t:t.subarray(c,c+o),this.pos),this.pos+=o,c+=o,this.pos===i&&(this.process(e,0),this.pos=0,r=!0)}return this.length+=t.length,r&&this.roundClean(),this}digestInto(t){U(this),function(t,e){L(t,void 0,"output");const n=e.outputLen;if(!(t.length>=n))throw new RangeError('"output" expected length >= '+n)}(t,this),this.finished=!0;const{buffer:e,view:n,blockLen:i,isLE:s}=this;let{pos:r}=this;e[r++]=128,e.fill(0,r),this.padOffset>i-r&&(this.process(n,0),e.fill(0)),function(t,e,n,i){const s=c(n),r=o(n);t.setUint32(e,i?r:s,i),t.setUint32(e+4,i?s:r,i)}(n,i-8,8*this.length,s),this.process(n,0),this.roundClean();const f=t===e?n:j(t),a=this.outputLen,h=a/4,d=this.get();if(a%4||h>d.length)throw new Error("invalid outputLen");for(let c=0;c<h;c++)f.setUint32(4*c,d[c],s)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const n=t.slice(0,e);return this.destroy(),n}_cloneIntoMeta(t){const{buffer:e,length:n,finished:i,destroyed:s,pos:r}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=r,r&&t.buffer.set(e),t}clone(){return this._cloneInto()}},x=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),l=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),p=new Uint32Array(64),y=class extends u{constructor(t,e){super(64,t,8,!1),n(this,"A",0),n(this,"B",0),n(this,"C",0),n(this,"D",0),n(this,"E",0),n(this,"F",0),n(this,"G",0),n(this,"H",0),this.A=0|e[0],this.B=0|e[1],this.C=0|e[2],this.D=0|e[3],this.E=0|e[4],this.F=0|e[5],this.G=0|e[6],this.H=0|e[7]}get(){const{A:t,B:e,C:n,D:i,E:s,F:r,G:c,H:o}=this;return[t,e,n,i,s,r,c,o]}set(t,e,n,i,s,r,c,o){this.A=0|t,this.B=0|e,this.C=0|n,this.D=0|i,this.E=0|s,this.F=0|r,this.G=0|c,this.H=0|o}_cloneInto(t){return(t||(t=new this.constructor)).set(...this.get()),this._cloneIntoMeta(t)}process(t,e){for(let h=0;h<16;h++,e+=4)p[h]=t.getUint32(e,!1);for(let h=16;h<64;h++){const t=p[h-15],e=p[h-2],n=B(t,7)^B(t,18)^t>>>3;p[h]=(B(e,17)^B(e,19)^e>>>10)+p[h-7]+n+p[h-16]|0}let{A:n,B:i,C:s,D:r,E:c,F:o,G:f,H:a}=this;for(let h=0;h<64;h++){const t=a+(B(c,6)^B(c,11)^B(c,25))+C(c,o,f)+l[h]+p[h]|0,e=(B(n,2)^B(n,13)^B(n,22))+H(n,i,s)|0;a=f,f=o,o=c,c=r+t|0,r=s,s=i,i=n,n=t+e|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,r=r+this.D|0,c=c+this.E|0,o=o+this.F|0,f=f+this.G|0,a=a+this.H|0,this.set(n,i,s,r,c,o,f,a)}roundClean(){T(p)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),T(this.buffer)}},g=class extends y{constructor(){super(32,x)}},(w=function(t,e=!1){const n=t.length;let i=new Uint32Array(n),s=new Uint32Array(n);for(let r=0;r<n;r++){const{h:n,l:c}=m(t[r],e);[i[r],s[r]]=[n,c]}return[i,s]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))))[0],w[1],E=O(()=>new g,b(1)),t("t",A=class extends Error{})}}});