From f8842e2501e13ae364c9767baf5fde8e18a493fb Mon Sep 17 00:00:00 2001 From: NaHCO3-code Date: Tue, 20 Feb 2024 22:23:51 +0800 Subject: [PATCH] build --- docs/assets/index-Br3bDsLj.css | 1 + docs/assets/index-DILBI_Na.js | 1 + docs/index.html | 60 ++++++++++++++++++++++++++++++++++ docs/vite.svg | 1 + 4 files changed, 63 insertions(+) create mode 100644 docs/assets/index-Br3bDsLj.css create mode 100644 docs/assets/index-DILBI_Na.js create mode 100644 docs/index.html create mode 100644 docs/vite.svg diff --git a/docs/assets/index-Br3bDsLj.css b/docs/assets/index-Br3bDsLj.css new file mode 100644 index 0000000..6cf856e --- /dev/null +++ b/docs/assets/index-Br3bDsLj.css @@ -0,0 +1 @@ +:root{--main-color: #336699}.menu>*{margin:3px}form *{margin-top:3px;margin-bottom:3px}.menu{border:1px solid var(--main-color);border-radius:5px;padding:5px;margin:10px}#readHashForm{display:flex;align-items:center}#postTextForm{display:flex;flex-direction:column;align-items:flex-start}#postTextForm textarea{width:50%;height:20vh}.hidden{display:none}.flex-column{display:flex;flex-direction:column;align-items:flex-start}.flex-row{display:flex;flex-direction:row;align-items:flex-start} diff --git a/docs/assets/index-DILBI_Na.js b/docs/assets/index-DILBI_Na.js new file mode 100644 index 0000000..e0f9935 --- /dev/null +++ b/docs/assets/index-DILBI_Na.js @@ -0,0 +1 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const p of n.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function a(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(i){if(i.ep)return;i.ep=!0;const n=a(i);fetch(i.href,n)}})();const f={".aac":"audio/aac",".abw":"application/x-abiword",".apng":"image/apng",".arc":"application/x-freearc",".avif":"image/avif",".avi":"video/x-msvideo",".azw":"application/vnd.amazon.ebook",".bin":"application/octet-stream",".bmp":"image/bmp",".bz":"application/x-bzip",".bz2":"application/x-bzip2",".cda":"application/x-cdf",".csh":"application/x-csh",".css":"text/css",".csv":"text/csv",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".eot":"application/vnd.ms-fontobject",".epub":"application/epub+zip",".gz":"application/gzip",".gif":"image/gif",".htm":"text/html",".ico":"image/vnd.microsoft.icon",".ics":"text/calendar",".jar":"application/java-archive",".jpeg":"image/jpeg",".jpg":"image/jpg",".js":"text/javascript",".json":"application/json",".jsonld":"application/ld+json",".mid":"audio/midi",".mjs":"text/javascript",".mp3":"audio/mpeg",".mp4":"video/mp4",".mpeg":"video/mpeg",".mpkg":"application/vnd.apple.installer+xml",".odp":"application/vnd.oasis.opendocument.presentation",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odt":"application/vnd.oasis.opendocument.text",".oga":"audio/ogg",".ogv":"video/ogg",".ogx":"application/ogg",".opus":"audio/opus",".otf":"font/otf",".png":"image/png",".pdf":"application/pdf",".php":"application/x-httpd-php",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".rar":"application/vnd.rar",".rtf":"application/rtf",".sh":"application/x-sh",".svg":"image/svg+xml",".tar":"application/x-tar",".tif":"image/tiff",".ts":"video/mp2t",".ttf":"font/ttf",".txt":"text/plain",".vsd":"application/vnd.visio",".wav":"audio/wav",".weba":"audio/webm",".webm":"video/webm",".webp":"image/webp",".woff":"font/woff",".woff2":"font/woff2",".xhtml":"application/xhtml+xml",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xml":"RFC 7303",".xul":"application/vnd.mozilla.xul+xml",".zip":"application/zip",".3gp":"video/3gpp",".3g2":"video/3gpp2",".7z":"application/x-7z-compressed"},u={"audio/aac":".aac","application/x-abiword":".abw","image/apng":".apng","application/x-freearc":".arc","image/avif":".avif","video/x-msvideo":".avi","application/vnd.amazon.ebook":".azw","application/octet-stream":".bin","image/bmp":".bmp","application/x-bzip":".bz","application/x-bzip2":".bz2","application/x-cdf":".cda","application/x-csh":".csh","text/css":".css","text/csv":".csv","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx","application/vnd.ms-fontobject":".eot","application/epub+zip":".epub","application/gzip":".gz","image/gif":".gif","text/html":".htm","image/vnd.microsoft.icon":".ico","text/calendar":".ics","application/java-archive":".jar","image/jpeg":".jpeg","text/javascript":".mjs","application/json":".json","application/ld+json":".jsonld","audio/midi":".mid","audio/mpeg":".mp3","video/mp4":".mp4","video/mpeg":".mpeg","application/vnd.apple.installer+xml":".mpkg","application/vnd.oasis.opendocument.presentation":".odp","application/vnd.oasis.opendocument.spreadsheet":".ods","application/vnd.oasis.opendocument.text":".odt","audio/ogg":".oga","video/ogg":".ogv","application/ogg":".ogx","audio/opus":".opus","font/otf":".otf","image/png":".png","application/pdf":".pdf","application/x-httpd-php":".php","application/vnd.ms-powerpoint":".ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":".pptx","application/vnd.rar":".rar","application/rtf":".rtf","application/x-sh":".sh","image/svg+xml":".svg","application/x-tar":".tar","image/tiff":".tif","video/mp2t":".ts","font/ttf":".ttf","text/plain":".txt","application/vnd.visio":".vsd","audio/wav":".wav","audio/webm":".weba","video/webm":".webm","image/webp":".webp","font/woff":".woff","font/woff2":".woff2","application/xhtml+xml":".xhtml","application/vnd.ms-excel":".xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":".xlsx","RFC 7303":".xml","application/vnd.mozilla.xul+xml":".xul","application/zip":".zip","video/3gpp":".3gp","video/3gpp2":".3g2","application/x-7z-compressed":".7z"};async function*g(e){let{done:t,value:a}=await e.read();for(;!t;)yield a,{done:t,value:a}=await e.read()}function v(e){return u[e]??""}function x(e){return f[e]??"application/octet-stream"}async function w(e,t,a,o){const i=await fetch(e,o);if(!i.ok||i.body===null)throw new Error(await i.text());let n=[];for await(let c of g(i.body.getReader()))c!==void 0&&(a(c),n.push(c));const p=i.headers.get("Content-Type")??"application/octet-stream",l=t(e.toString(),p);return new File(n,l,{type:p})}async function h(e,t=()=>{}){return w(`//static.dao3.fun/block/${e}`,(a,o)=>`${e}${v(o)}`,t,{mode:"cors"})}async function d(e,t){return await(await fetch("//static.dao3.fun/block/",{method:"POST",headers:{"Content-Type":t},body:e,mode:"cors"})).json()}async function y(e){return d(e,"text/plain")}async function b(e,t){const a=x("."+e.name.split(".").at(-1)),o=new FileReader;return new Promise((i,n)=>{o.addEventListener("load",async function(){const p=o.result;i(await d(p,a))}),o.addEventListener("error",async function(p){n(p)}),o.addEventListener("progress",t),o.readAsArrayBuffer(e)})}(async function(){let e=document.getElementById("readHash"),t=document.querySelector(".read .tip"),a=document.querySelector(".read .preview .frame"),o=document.getElementById("readHashForm");if(!e||!t||!a||!o)return;let i=null,n=null;o==null||o.addEventListener("submit",async c=>{c.preventDefault();let r=0;t.innerText="正在启动传输……";try{let s=await h(e.value,m=>{r+=m.length,t.innerText=`已接收${r}字节……`});t.innerText=`传输完毕!大小:${s.size}字节,文件类型:${s.type}`,i=s.name,n=URL.createObjectURL(s),a.src=n}catch(s){t.innerText=`传输失败!${s}`}});let p=document.getElementById("open");p==null||p.addEventListener("click",()=>{open(`//static.dao3.fun/block/${e.value}`,"_blank")});let l=document.getElementById("download");l==null||l.addEventListener("click",async()=>{(!n||!i)&&o.submit();let c=document.createElement("a");c.href=n??"",c.download=i??"",c.click()})})();(async function(){let e=document.getElementById("postText"),t=document.querySelector(".postText .tip"),a=document.getElementById("postTextForm");!e||!t||!a||a==null||a.addEventListener("submit",async o=>{o.preventDefault(),t.innerText="正在启动传输……";let i=await y(e.value);t.innerText=`传输成功!${JSON.stringify(i)}`})})();(async function(){let e=document.getElementById("postFile"),t=document.querySelector(".postFile .tip"),a=document.getElementById("postFileForm");!e||!t||!a||a==null||a.addEventListener("submit",async o=>{o.preventDefault(),t.innerText="传输中……";try{if(!e.files||e.files.length==0)throw new Error("未选择文件");const i=e.files;for(const n of i){const p=n.size,l=await b(n,c=>{t.innerText=`[${((p-c.loaded)/p*100).toFixed(0)}%] 共${p}字节,已传输${c.loaded}字节`});t.innerText=`传输成功!${JSON.stringify(l)}`}}catch(i){t.innerText=`错误:${i}`}})})();(async function(){document.querySelectorAll(".preview").forEach(t=>{let a=t.querySelector(".change-preview-vis"),o=t.querySelector(".frame");if(!a||!o)throw new Error("是谁偷偷动了我的DOM?");a==null||a.addEventListener("click",()=>{o.classList.contains("hidden")?o.classList.remove("hidden"):o.classList.add("hidden")})})})(); diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..6af0f88 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,60 @@ + + + + + + + Box3 Static Tool + + + + +

Box3 Static Tool

+ + +
+

上传文本

+
+

输入文本:

+ + +
+

+
+ + + + diff --git a/docs/vite.svg b/docs/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/docs/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file