PageSourceSearch

https://trailence.org/chunk-Dd35OA8o.js

js trailence.org collected 2026-09-24 15:12:06 UTC 2,978 bytes, 1 lines download raw bytes

1import{a as E$1}from"./chunk-s0wiiGIr.js";import{t as _}from"./chunk-B7GYYPiL.js";import{Qn as ne,et as Oe}from"./chunk-hDFLhPjY.js";import{ln as ks}from"./chunk-DvgwK5vQ.js";import{c as Ft}from"./main-N5A2UYE4.js";var E=(()=>{class c{constructor(n){this.platform=n}openFileDialog(n){this.tryOpenFileWithBrowserMethod(n)||this.tryWithHiddenInputFile(n)}tryOpenFileWithBrowserMethod(n){if(!this.platform.is(`desktop`)&&!this.platform.is(`mobileweb`)||typeof globalThis.showOpenFilePicker!=`function`||globalThis.navigator.webdriver)return!1;let e={};for(let t of n.types)e[t.mime]=t.extensions.map(i=>`.`+i);try{return globalThis.showOpenFilePicker({types:[{description:n.description,accept:e}],multiple:n.multiple}).then(t=>n.onstartreading(t.length).then(i=>{let o=[],a=[],s=r=>{let l=p=>{a.push(p),r===t.length-1?setTimeout(()=>n.ondone(i,o,a),0):setTimeout(()=>s(r+1),0)};t[r].getFile().then(p=>{p.arrayBuffer().then(b=>{n.onfileread(r,t.length,i,t[r].name,b).then(g=>{o.push(g),r===t.length-1?setTimeout(()=>n.ondone(i,o,a),0):setTimeout(()=>s(r+1),0)}).catch(l)}).catch(l)}).catch(l)};setTimeout(()=>s(0),0)})).catch(t=>{t instanceof DOMException?_.info(`Open file dialog: `,t):n.ondone(void 0,[],[t])}),!0}catch(t){return!1}}tryWithHiddenInputFile(n){let e=document.createElement(`INPUT`);if(e.type=`file`,e.multiple=n.multiple,e.accept=[...n.types.map(t=>t.mime),...n.types.flatMap(t=>t.extensions.map(i=>`.`+i))].join(`,`),e.style.position=`fixed`,e.style.top=`-10000px`,e.style.left=`-10000px`,e.addEventListener(`change`,()=>{e.files&&e.files.length>0&&n.onstartreading(e.files.length).then(t=>{let i=[],o=[],a=s=>{let r=l=>{e.remove(),o.push(l),s===e.files.length-1?setTimeout(()=>n.ondone(t,i,o),0):setTimeout(()=>a(s+1),0)};e.files[s].arrayBuffer().then(l=>{n.onfileread(s,e.files.length,t,e.files[s].name,l).then(p=>{i.push(p),s===e.files.length-1?setTimeout(()=>{n.ondone(t,i,o),e.remove()},0):setTimeout(()=>a(s+1),0)}).catch(r)}).catch(r)};setTimeout(()=>a(0),0)}).catch(t=>{e.remove(),n.ondone(void 0,[],[t])})}),document.documentElement.appendChild(e),!globalThis.navigator.webdriver){let t=new MouseEvent(`click`);e.dispatchEvent(t)}return!0}saveBinaryData(n,e){return e.toBlob().then(t=>{let i=globalThis.URL.createObjectURL(t),o=document.createElement(`a`);return document.documentElement.appendChild(o),o.setAttribute(`style`,`display: none`),o.href=i,o.download=n,o.click(),globalThis.URL.revokeObjectURL(i),o.remove(),!0})}saveZip(n,e){return this.internalSaveZip(n,e)}internalSaveZip(n,e){return E$1(this,null,function*(){let i=new(yield import(`./chunk-BmUtJ75A.js`)).default,o;for(;(o=yield e())!==null;){let s=o.data.toRaw();i.file(o.filename,s,{base64:typeof s==`string`,binary:!0})}let a=yield i.generateAsync({type:`blob`,compression:`DEFLATE`});return yield this.saveBinaryData(n,new Ft(a))})}static{this.ɵfac=function(e){return new(e||c)(Oe(ks))}}static{this.ɵprov=ne({token:c,factory:c.ɵfac,providedIn:`root`})}}return c})();export{E as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.