From c56248d013a520502a9fc6e881b35aaa883af735 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Mar 2026 03:19:07 +0000 Subject: [PATCH] build: web --- dist/web/assets/index-BGlJv24G.js | 4 ---- dist/web/assets/index-zwqTa6_J.js | 4 ++++ dist/web/index.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 dist/web/assets/index-BGlJv24G.js create mode 100644 dist/web/assets/index-zwqTa6_J.js diff --git a/dist/web/assets/index-BGlJv24G.js b/dist/web/assets/index-BGlJv24G.js deleted file mode 100644 index 8b67113..0000000 --- a/dist/web/assets/index-BGlJv24G.js +++ /dev/null @@ -1,4 +0,0 @@ -(function(){const k=document.createElement("link").relList;if(k&&k.supports&&k.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))b(f);new MutationObserver(f=>{for(const u of f)if(u.type==="childList")for(const a of u.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&b(a)}).observe(document,{childList:!0,subtree:!0});function U(f){const u={};return f.integrity&&(u.integrity=f.integrity),f.referrerPolicy&&(u.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?u.credentials="include":f.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function b(f){if(f.ep)return;f.ep=!0;const u=U(f);fetch(f.href,u)}})();(function(){function E(k,U,b){function f(d,y){if(!U[d]){if(!k[d]){var s=typeof require=="function"&&require;if(!y&&s)return s(d,!0);if(u)return u(d,!0);var r=new Error("Cannot find module '"+d+"'");throw r.code="MODULE_NOT_FOUND",r}var o=U[d]={exports:{}};k[d][0].call(o.exports,function(m){var g=k[d][1][m];return f(g||m)},o,o.exports,E,k,U,b)}return U[d].exports}for(var u=typeof require=="function"&&require,a=0;a{const g=f.blake2bHex(m,null,8),w=[parseInt(g.slice(0,4),16),parseInt(g.slice(4,8),16),parseInt(g.slice(8,12),16),parseInt(g.slice(12,16),16)];return u.encodeNumberArray(Array.from(r,I=>b.encrypt(I.codePointAt(0),w)),o)},PLAIN:(r,o)=>u.encodeString(r,o)},YES:{SPECK32_64ECB:(r,o,m)=>{const g=f.blake2bHex(m,null,8),w=[parseInt(g.slice(0,4),16),parseInt(g.slice(4,8),16),parseInt(g.slice(8,12),16),parseInt(g.slice(12,16),16)];return u.decodeToNumberArray(r,o).map(I=>{try{return String.fromCodePoint(b.decrypt(I,w))}catch{return""}}).join("")},PLAIN:(r,o)=>u.decodeToString(r,o)}}},{blakejs:4,"generic-speck":6,zwus:7}],2:[function(E,k,U){const b=E("./util");function f(e,l,n){const p=e[l]+e[n];let h=e[l+1]+e[n+1];p>=4294967296&&h++,e[l]=p,e[l+1]=h}function u(e,l,n,p){let h=e[l]+n;n<0&&(h+=4294967296);let A=e[l+1]+p;h>=4294967296&&A++,e[l]=h,e[l+1]=A}function a(e,l){return e[l]^e[l+1]<<8^e[l+2]<<16^e[l+3]<<24}function d(e,l,n,p,h,A){const T=m[h],O=m[h+1],C=m[A],R=m[A+1];f(o,e,l),u(o,e,T,O);let x=o[p]^o[e],B=o[p+1]^o[e+1];o[p]=B,o[p+1]=x,f(o,n,p),x=o[l]^o[n],B=o[l+1]^o[n+1],o[l]=x>>>24^B<<8,o[l+1]=B>>>24^x<<8,f(o,e,l),u(o,e,C,R),x=o[p]^o[e],B=o[p+1]^o[e+1],o[p]=x>>>16^B<<16,o[p+1]=B>>>16^x<<16,f(o,n,p),x=o[l]^o[n],B=o[l+1]^o[n+1],o[l]=B>>>31^x<<1,o[l+1]=x>>>31^B<<1}const y=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],r=new Uint8Array(s.map(function(e){return e*2})),o=new Uint32Array(32),m=new Uint32Array(32);function g(e,l){let n=0;for(n=0;n<16;n++)o[n]=e.h[n],o[n+16]=y[n];for(o[24]=o[24]^e.t,o[25]=o[25]^e.t/4294967296,l&&(o[28]=~o[28],o[29]=~o[29]),n=0;n<32;n++)m[n]=a(e.b,4*n);for(n=0;n<12;n++)d(0,8,16,24,r[n*16+0],r[n*16+1]),d(2,10,18,26,r[n*16+2],r[n*16+3]),d(4,12,20,28,r[n*16+4],r[n*16+5]),d(6,14,22,30,r[n*16+6],r[n*16+7]),d(0,10,20,30,r[n*16+8],r[n*16+9]),d(2,12,22,24,r[n*16+10],r[n*16+11]),d(4,14,16,26,r[n*16+12],r[n*16+13]),d(6,8,18,28,r[n*16+14],r[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^o[n]^o[n+16]}const w=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function I(e,l,n,p){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(l&&l.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(p&&p.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const h={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};w.fill(0),w[0]=e,l&&(w[1]=l.length),w[2]=1,w[3]=1,n&&w.set(n,32),p&&w.set(p,48);for(let A=0;A<16;A++)h.h[A]=y[A]^a(w,A*4);return l&&(S(h,l),h.c=128),h}function S(e,l){for(let n=0;n>2]>>8*(n&3);return l}function i(e,l,n,p,h){n=n||64,e=b.normalizeInput(e),p&&(p=b.normalizeInput(p)),h&&(h=b.normalizeInput(h));const A=I(n,l,p,h);return S(A,e),c(A)}function t(e,l,n,p,h){const A=i(e,l,n,p,h);return b.toHex(A)}k.exports={blake2b:i,blake2bHex:t,blake2bInit:I,blake2bUpdate:S,blake2bFinal:c}},{"./util":5}],3:[function(E,k,U){const b=E("./util");function f(c,i){return c[i]^c[i+1]<<8^c[i+2]<<16^c[i+3]<<24}function u(c,i,t,e,l,n){s[c]=s[c]+s[i]+l,s[e]=a(s[e]^s[c],16),s[t]=s[t]+s[e],s[i]=a(s[i]^s[t],12),s[c]=s[c]+s[i]+n,s[e]=a(s[e]^s[c],8),s[t]=s[t]+s[e],s[i]=a(s[i]^s[t],7)}function a(c,i){return c>>>i^c<<32-i}const d=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),s=new Uint32Array(16),r=new Uint32Array(16);function o(c,i){let t=0;for(t=0;t<8;t++)s[t]=c.h[t],s[t+8]=d[t];for(s[12]^=c.t,s[13]^=c.t/4294967296,i&&(s[14]=~s[14]),t=0;t<16;t++)r[t]=f(c.b,4*t);for(t=0;t<10;t++)u(0,4,8,12,r[y[t*16+0]],r[y[t*16+1]]),u(1,5,9,13,r[y[t*16+2]],r[y[t*16+3]]),u(2,6,10,14,r[y[t*16+4]],r[y[t*16+5]]),u(3,7,11,15,r[y[t*16+6]],r[y[t*16+7]]),u(0,5,10,15,r[y[t*16+8]],r[y[t*16+9]]),u(1,6,11,12,r[y[t*16+10]],r[y[t*16+11]]),u(2,7,8,13,r[y[t*16+12]],r[y[t*16+13]]),u(3,4,9,14,r[y[t*16+14]],r[y[t*16+15]]);for(t=0;t<8;t++)c.h[t]^=s[t]^s[t+8]}function m(c,i){if(!(c>0&&c<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=i?i.length:0;if(i&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(d),b:new Uint8Array(64),c:0,t:0,outlen:c};return e.h[0]^=16842752^t<<8^c,t>0&&(g(e,i),e.c=64),e}function g(c,i){for(let t=0;t>2]>>8*(t&3)&255;return i}function I(c,i,t){t=t||32,c=b.normalizeInput(c);const e=m(t,i);return g(e,c),w(e)}function S(c,i,t){const e=I(c,i,t);return b.toHex(e)}k.exports={blake2s:I,blake2sHex:S,blake2sInit:m,blake2sUpdate:g,blake2sFinal:w}},{"./util":5}],4:[function(E,k,U){const b=E("./blake2b"),f=E("./blake2s");k.exports={blake2b:b.blake2b,blake2bHex:b.blake2bHex,blake2bInit:b.blake2bInit,blake2bUpdate:b.blake2bUpdate,blake2bFinal:b.blake2bFinal,blake2s:f.blake2s,blake2sHex:f.blake2sHex,blake2sInit:f.blake2sInit,blake2sUpdate:f.blake2sUpdate,blake2sFinal:f.blake2sFinal}},{"./blake2b":2,"./blake2s":3}],5:[function(E,k,U){const b="Input must be an string, Buffer or Uint8Array";function f(s){let r;if(s instanceof Uint8Array)r=s;else if(typeof s=="string")r=new TextEncoder().encode(s);else throw new Error(b);return r}function u(s){return Array.prototype.map.call(s,function(r){return(r<16?"0":"")+r.toString(16)}).join("")}function a(s){return(4294967296+s).toString(16).substring(1)}function d(s,r,o){let m=` -`+s+" = ";for(let g=0;gi>>t|i<i<>u-t,g=(i,t,e)=>(i=o(i,d),i=i+t&r,i^=e,t=m(t,y),t^=i,[i,t]),w=(i,t,e)=>(t^=i,t=o(t,y),i^=e,i=i-t&r,i=m(i,d),[i,t]);function I(i,t){let e=i[0],l=i[1],n=t[0],p=t.slice(1);[l,e]=g(l,e,n);for(let h=0;h{const l=i([t/s|0,t&r],e);return l[0]*s+l[1]}}return{encrypt:c(I),decrypt:c(S),encryptRaw:I,decryptRaw:S}}k.exports=b},{}],7:[function(E,k,U){const b={3:{unifier:"­",0:"᠎",1:"​",2:"‍"},6:{unifier:"‌",0:"‍",1:"‏",2:"­",3:"⁠",4:"​",5:"‎"},8:{unifier:"‌",0:"‍",1:"‏",2:"­",3:"⁠",4:"​",5:"‎",6:"᠎",7:"\uFEFF"},encodeString:(f,u=3)=>Array.from(f,a=>a.codePointAt(0).toString(u).split("").map(d=>b[u][d]).join("")).join(b[u].unifier),encodeNumberArray:(f,u=3)=>f.map(a=>a.toString(u).split("").map(d=>b[u][d]).join("")).join(b[u].unifier),decodeToString:(f,u=3)=>f.split(b[u].unifier).map(a=>String.fromCodePoint(parseInt(Array.from(a).map(d=>Object.keys(b[u]).find(y=>b[u][y]===d)).join(""),u))).join(""),decodeToNumberArray:(f,u=3)=>f.split(b[u].unifier).map(a=>parseInt(Array.from(a).map(d=>Object.keys(b[u]).find(y=>b[u][y]===d)).join(""),u))};k.exports=b},{}]},{},[1]); diff --git a/dist/web/assets/index-zwqTa6_J.js b/dist/web/assets/index-zwqTa6_J.js new file mode 100644 index 0000000..45d6fc4 --- /dev/null +++ b/dist/web/assets/index-zwqTa6_J.js @@ -0,0 +1,4 @@ +(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))p(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const i of d.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&p(i)}).observe(document,{childList:!0,subtree:!0});function b(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function p(f){if(f.ep)return;f.ep=!0;const d=b(f);fetch(f.href,d)}})();const I={3:{unifier:"­",0:"᠎",1:"​",2:"‍"},6:{unifier:"‌",0:"‍",1:"‏",2:"­",3:"⁠",4:"​",5:"‎"},8:{unifier:"‌",0:"‍",1:"‏",2:"­",3:"⁠",4:"​",5:"‎",6:"᠎",7:"\uFEFF"},encodeString:(a,r=3)=>Array.from(a,b=>b.codePointAt(0).toString(r).split("").map(p=>I[r][p]).join("")).join(I[r].unifier),encodeNumberArray:(a,r=3)=>a.map(b=>b.toString(r).split("").map(p=>I[r][p]).join("")).join(I[r].unifier),decodeToString:(a,r=3)=>a.split(I[r].unifier).map(b=>String.fromCodePoint(parseInt(Array.from(b).map(p=>Object.keys(I[r]).find(f=>I[r][f]===p)).join(""),r))).join(""),decodeToNumberArray:(a,r=3)=>a.split(I[r].unifier).map(b=>parseInt(Array.from(b).map(p=>Object.keys(I[r]).find(f=>I[r][f]===p)).join(""),r))};function Y(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var C,_;function x(){if(_)return C;_=1;const a="Input must be an string, Buffer or Uint8Array";function r(i){let s;if(i instanceof Uint8Array)s=i;else if(typeof i=="string")s=new TextEncoder().encode(i);else throw new Error(a);return s}function b(i){return Array.prototype.map.call(i,function(s){return(s<16?"0":"")+s.toString(16)}).join("")}function p(i){return(4294967296+i).toString(16).substring(1)}function f(i,s,u){let g=` +`+i+" = ";for(let k=0;k=4294967296&&m++,e[c]=h,e[c+1]=m}function b(e,c,n,h){let m=e[c]+n;n<0&&(m+=4294967296);let y=e[c+1]+h;m>=4294967296&&y++,e[c]=m,e[c+1]=y}function p(e,c){return e[c]^e[c+1]<<8^e[c+2]<<16^e[c+3]<<24}function f(e,c,n,h,m,y){const q=g[m],G=g[m+1],K=g[y],z=g[y+1];r(u,e,c),b(u,e,q,G);let S=u[h]^u[e],U=u[h+1]^u[e+1];u[h]=U,u[h+1]=S,r(u,n,h),S=u[c]^u[n],U=u[c+1]^u[n+1],u[c]=S>>>24^U<<8,u[c+1]=U>>>24^S<<8,r(u,e,c),b(u,e,K,z),S=u[h]^u[e],U=u[h+1]^u[e+1],u[h]=S>>>16^U<<16,u[h+1]=U>>>16^S<<16,r(u,n,h),S=u[c]^u[n],U=u[c+1]^u[n+1],u[c]=U>>>31^S<<1,u[c+1]=S>>>31^U<<1}const d=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),i=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],s=new Uint8Array(i.map(function(e){return e*2})),u=new Uint32Array(32),g=new Uint32Array(32);function k(e,c){let n=0;for(n=0;n<16;n++)u[n]=e.h[n],u[n+16]=d[n];for(u[24]=u[24]^e.t,u[25]=u[25]^e.t/4294967296,c&&(u[28]=~u[28],u[29]=~u[29]),n=0;n<32;n++)g[n]=p(e.b,4*n);for(n=0;n<12;n++)f(0,8,16,24,s[n*16+0],s[n*16+1]),f(2,10,18,26,s[n*16+2],s[n*16+3]),f(4,12,20,28,s[n*16+4],s[n*16+5]),f(6,14,22,30,s[n*16+6],s[n*16+7]),f(0,10,20,30,s[n*16+8],s[n*16+9]),f(2,12,22,24,s[n*16+10],s[n*16+11]),f(4,14,16,26,s[n*16+12],s[n*16+13]),f(6,8,18,28,s[n*16+14],s[n*16+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^u[n]^u[n+16]}const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function w(e,c,n,h){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(c&&c.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&n.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(h&&h.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const m={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};A.fill(0),A[0]=e,c&&(A[1]=c.length),A[2]=1,A[3]=1,n&&A.set(n,32),h&&A.set(h,48);for(let y=0;y<16;y++)m.h[y]=d[y]^p(A,y*4);return c&&(E(m,c),m.c=128),m}function E(e,c){for(let n=0;n>2]>>8*(n&3);return c}function o(e,c,n,h,m){n=n||64,e=a.normalizeInput(e),h&&(h=a.normalizeInput(h)),m&&(m=a.normalizeInput(m));const y=w(n,c,h,m);return E(y,e),l(y)}function t(e,c,n,h,m){const y=o(e,c,n,h,m);return a.toHex(y)}return T={blake2b:o,blake2bHex:t,blake2bInit:w,blake2bUpdate:E,blake2bFinal:l},T}var O,N;function X(){if(N)return O;N=1;const a=x();function r(l,o){return l[o]^l[o+1]<<8^l[o+2]<<16^l[o+3]<<24}function b(l,o,t,e,c,n){i[l]=i[l]+i[o]+c,i[e]=p(i[e]^i[l],16),i[t]=i[t]+i[e],i[o]=p(i[o]^i[t],12),i[l]=i[l]+i[o]+n,i[e]=p(i[e]^i[l],8),i[t]=i[t]+i[e],i[o]=p(i[o]^i[t],7)}function p(l,o){return l>>>o^l<<32-o}const f=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),d=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),i=new Uint32Array(16),s=new Uint32Array(16);function u(l,o){let t=0;for(t=0;t<8;t++)i[t]=l.h[t],i[t+8]=f[t];for(i[12]^=l.t,i[13]^=l.t/4294967296,o&&(i[14]=~i[14]),t=0;t<16;t++)s[t]=r(l.b,4*t);for(t=0;t<10;t++)b(0,4,8,12,s[d[t*16+0]],s[d[t*16+1]]),b(1,5,9,13,s[d[t*16+2]],s[d[t*16+3]]),b(2,6,10,14,s[d[t*16+4]],s[d[t*16+5]]),b(3,7,11,15,s[d[t*16+6]],s[d[t*16+7]]),b(0,5,10,15,s[d[t*16+8]],s[d[t*16+9]]),b(1,6,11,12,s[d[t*16+10]],s[d[t*16+11]]),b(2,7,8,13,s[d[t*16+12]],s[d[t*16+13]]),b(3,4,9,14,s[d[t*16+14]],s[d[t*16+15]]);for(t=0;t<8;t++)l.h[t]^=i[t]^i[t+8]}function g(l,o){if(!(l>0&&l<=32))throw new Error("Incorrect output length, should be in [1, 32]");const t=o?o.length:0;if(o&&!(t>0&&t<=32))throw new Error("Incorrect key length, should be in [1, 32]");const e={h:new Uint32Array(f),b:new Uint8Array(64),c:0,t:0,outlen:l};return e.h[0]^=16842752^t<<8^l,t>0&&(k(e,o),e.c=64),e}function k(l,o){for(let t=0;t>2]>>8*(t&3)&255;return o}function w(l,o,t){t=t||32,l=a.normalizeInput(l);const e=g(t,o);return k(e,l),A(e)}function E(l,o,t){const e=w(l,o,t);return a.toHex(e)}return O={blake2s:w,blake2sHex:E,blake2sInit:g,blake2sUpdate:k,blake2sFinal:A},O}var j,v;function J(){if(v)return j;v=1;const a=V(),r=X();return j={blake2b:a.blake2b,blake2bHex:a.blake2bHex,blake2bInit:a.blake2bInit,blake2bUpdate:a.blake2bUpdate,blake2bFinal:a.blake2bFinal,blake2s:r.blake2s,blake2sHex:r.blake2sHex,blake2sInit:r.blake2sInit,blake2sUpdate:r.blake2sUpdate,blake2sFinal:r.blake2sFinal},j}var Q=J(),P,H;function W(){if(H)return P;H=1;function a(r={}){const b=r.bits||16,p=r.rounds||22,f=r.rightRotations||7,d=r.leftRotations||2,i=2**b,s=i-1,u=(o,t)=>o>>t|o<o<>b-t,k=(o,t,e)=>(o=u(o,f),o=o+t&s,o^=e,t=g(t,d),t^=o,[o,t]),A=(o,t,e)=>(t^=o,t=u(t,d),o^=e,o=o-t&s,o=g(o,f),[o,t]);function w(o,t){let e=o[0],c=o[1],n=t[0],h=t.slice(1);[c,e]=k(c,e,n);for(let m=0;m{const c=o([t/i|0,t&s],e);return c[0]*i+c[1]}}return{encrypt:l(w),decrypt:l(E),encryptRaw:w,decryptRaw:E}}return P=a,P}var Z=W();const $=Y(Z),F=$(),B=document.getElementById("textarea"),ee=document.getElementById("encoder"),te=document.getElementById("cipher");document.getElementById("encodeButton").addEventListener("click",M);document.getElementById("decodeButton").addEventListener("click",M);function R(a){const r=Q.blake2bHex(a,null,8);return[parseInt(r.slice(0,4),16),parseInt(r.slice(4,8),16),parseInt(r.slice(8,12),16),parseInt(r.slice(12,16),16)]}function L(a){return F.encrypt(0,a)&65535}function ne(a,r){const b=L(r);return Array.from(a,(p,f)=>{const d=b<<16|f&65535,i=F.encrypt(d,r);return p.codePointAt(0)^i})}function re(a,r){const b=L(r);return a.map((p,f)=>{const d=b<<16|f&65535,i=F.encrypt(d,r);try{return String.fromCodePoint(p^i)}catch{return""}}).join("")}function oe(){return te.value}function M(a){if(B.value===""){B.value="The text box is empty.";return}const r=a.target.id==="encodeButton"?"NO":"YES",b=oe(),p=ee.value.split("-")[1],f=b!=="PLAIN",d=f&&prompt("enter password.");if(!(f&&!d)){try{B.value=ie[r][b](B.value,p,d)}catch(i){console.log(i)}r==="NO"&&(B.select(),document.execCommand("copy"),B.value=`Copied to your clipboard. + A copy has been placed between these brackets [`+B.value+"]")}}const ie={NO:{PLAIN:(a,r)=>I.encodeString(a,r),SPECK32_64CTR:(a,r,b)=>I.encodeNumberArray(ne(a,R(b)),r),"SPECK32_64ECB (insecure)":(a,r,b)=>{const p=R(b);return I.encodeNumberArray(Array.from(a,f=>F.encrypt(f.codePointAt(0),p)),r)}},YES:{PLAIN:(a,r)=>I.decodeToString(a,r),SPECK32_64CTR:(a,r,b)=>re(I.decodeToNumberArray(a,r),R(b)),"SPECK32_64ECB (insecure)":(a,r,b)=>{const p=R(b);return I.decodeToNumberArray(a,r).map(f=>{try{return String.fromCodePoint(F.decrypt(f,p))}catch{return""}}).join("")}}}; diff --git a/dist/web/index.html b/dist/web/index.html index 4daffd9..4b1e686 100644 --- a/dist/web/index.html +++ b/dist/web/index.html @@ -3,7 +3,7 @@ - +