three.cad/605.bundle.js

1 line
872 B
JavaScript
Raw Normal View History

2021-04-23 05:56:48 +00:00
(self.webpackChunk=self.webpackChunk||[]).push([[605],{605:(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()})))}}]);