test
parent
c3f2279983
commit
b54b4efada
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[102],{102:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>r});const r=async(e={})=>(e.recursive=e.recursive||!1,new Promise(((n,t)=>{const r=document.createElement("input");r.type="file",r.webkitdirectory=!0;const i=()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerdown",i),window.removeEventListener("keydown",i),t(new DOMException("The user aborted a request.","AbortError"))};window.addEventListener("pointermove",i),window.addEventListener("pointerdown",i),window.addEventListener("keydown",i),r.addEventListener("change",(()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerdown",i),window.removeEventListener("keydown",i);let t=Array.from(r.files);e.recursive||(t=t.filter((e=>2===e.webkitRelativePath.split("/").length))),n(t)})),r.click()})))}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[112],{112:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});const i=async e=>{const s=await e.getFile();return s.handle=e,s},n=async(e={})=>{const s={};e.mimeTypes?e.mimeTypes.map((t=>{s[t]=e.extensions||[]})):s["*/*"]=e.extensions||[];const t=await window.showOpenFilePicker({types:[{description:e.description||"",accept:s}],multiple:e.multiple||!1}),n=await Promise.all(t.map(i));return e.multiple?n:n[0]}}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[146],{146:(e,t,c)=>{"use strict";c.r(t),c.d(t,{default:()=>n});const n=async(e,t={})=>{const c=document.createElement("a");c.download=t.fileName||"Untitled",c.href=URL.createObjectURL(e),c.addEventListener("click",(()=>{setTimeout((()=>URL.revokeObjectURL(c.href)),3e4)})),c.click()}}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[229],{229:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});const s=async(e,t={},i=null)=>{t.fileName=t.fileName||"Untitled",i=i||await window.chooseFileSystemEntries({type:"save-file",accepts:[{description:t.description||"",mimeTypes:[e.type],extensions:t.extensions||[""]}]});const s=await i.createWritable();return await s.write(e),await s.close(),i}}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[583],{583:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const s=async(e,t,r=e.name)=>{const i=[],a=[];for await(const n of e.getEntries()){const e=`${r}/${n.name}`;n.isFile?a.push(n.getFile().then((t=>Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>e})))):n.isDirectory&&t&&i.push(s(n,t,e))}return[...(await Promise.all(i)).flat(),...await Promise.all(a)]},i=async(e={})=>{e.recursive=e.recursive||!1;const t=await window.chooseFileSystemEntries({type:"open-directory"});return s(t,e.recursive)}}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[6],{6:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});const a=async(e,t,r=e.name)=>{const i=[],s=[];for await(const n of e.values()){const e=`${r}/${n.name}`;"file"===n.kind?s.push(n.getFile().then((t=>Object.defineProperty(t,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>e})))):"directory"===n.kind&&t&&i.push(a(n,t,e))}return[...(await Promise.all(i)).flat(),...await Promise.all(s)]},i=async(e={})=>{e.recursive=e.recursive||!1;const t=await window.showDirectoryPicker();return a(t,e.recursive)}}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[635],{635:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});const a=async(e,t={},i=null,a=!1)=>{t.fileName=t.fileName||"Untitled",console.log(t.fileName,"ddddddddddd");const s={};if(t.mimeTypes?(t.mimeTypes.push(e.type),t.mimeTypes.map((e=>{s[e]=t.extensions||[]}))):s[e.type]=t.extensions||[],i)try{await i.getFile()}catch(e){if(i=null,a)throw e}const d=i||await window.showSaveFilePicker({suggestedName:t.fileName,types:[{description:t.description||"",accept:s}]}),l=await d.createWritable();return await l.write(e),await l.close(),d}}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[751],{751:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>o});const o=async(e={})=>new Promise(((n,t)=>{const o=document.createElement("input");o.type="file";const i=[...e.mimeTypes?e.mimeTypes:[],e.extensions?e.extensions:[]].join();o.multiple=e.multiple||!1,o.accept=i||"";const r=()=>{window.removeEventListener("pointermove",r),window.removeEventListener("pointerdown",r),window.removeEventListener("keydown",r),t(new DOMException("The user aborted a request.","AbortError"))};window.addEventListener("pointermove",r),window.addEventListener("pointerdown",r),window.addEventListener("keydown",r),o.addEventListener("change",(()=>{window.removeEventListener("pointermove",r),window.removeEventListener("pointerdown",r),window.removeEventListener("keydown",r),n(o.multiple?o.files:o.files[0])})),o.click()}))}}]);
|
|
@ -0,0 +1 @@
|
|||
(self.webpackChunk=self.webpackChunk||[]).push([[799],{799:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});const i=async e=>{const s=await e.getFile();return s.handle=e,s},n=async(e={})=>{const s=await window.chooseFileSystemEntries({accepts:[{description:e.description||"",mimeTypes:e.mimeTypes||["*/*"],extensions:e.extensions||[""]}],multiple:e.multiple||!1});return e.multiple?Promise.all(s.map(i)):i(s)}}}]);
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue