-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathemscripten-fs-file-explorer-ui.iife.js
More file actions
250 lines (250 loc) · 54.9 KB
/
emscripten-fs-file-explorer-ui.iife.js
File metadata and controls
250 lines (250 loc) · 54.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
var mountEmscriptenFileExplorer=function(){"use strict";var Je=Array.isArray,Jr=Array.prototype.indexOf,pt=Array.from,Qr=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,$r=Object.getOwnPropertyDescriptors,en=Object.prototype,tn=Array.prototype,Ht=Object.getPrototypeOf,Ut=Object.isExtensible;function De(e){return typeof e=="function"}const j=()=>{};function qt(e){for(var t=0;t<e.length;t++)e[t]()}function rn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const r=[];for(const n of e)if(r.push(n),r.length===t)break;return r}const B=2,bt=4,Qe=8,wt=16,ae=32,xe=64,yt=128,W=256,$e=512,Y=1024,ce=2048,be=4096,ie=8192,et=16384,Bt=32768,Ie=65536,Wt=1<<17,nn=1<<18,Yt=1<<19,mt=1<<20,zt=1<<21,ve=Symbol("$state"),Gt=Symbol("legacy props"),ln=Symbol(""),Kt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Zt(e){return e===this.v}function an(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function on(e,t){return e!==t}function Xt(e){return!an(e,this.v)}function un(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function fn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function cn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function vn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function dn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function _n(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function hn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let ma=!1;const gn=1,pn=2,bn=16,wn=1,yn=4,mn=8,En=16,Sn=1,xn=2,D=Symbol(),Fn="http://www.w3.org/1999/xhtml",kn="http://www.w3.org/2000/svg",Nn="@attach";function An(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let $=null;function Jt(e){$=e}function C(e,t=!1,r){$={p:$,c:null,e:null,s:e,x:null,l:null}}function M(e){var t=$,r=t.e;if(r!==null){t.e=null;for(var n of r)fr(n)}return $=t.p,{}}function Qt(){return!0}function oe(e){if(typeof e!="object"||e===null||ve in e)return e;const t=Ht(e);if(t!==en&&t!==tn)return e;var r=new Map,n=Je(e),l=H(0),a=Ee,i=u=>{if(Ee===a)return u();var o=k,v=Ee;he(null),mr(a);var c=u();return he(o),mr(v),c};return n&&r.set("length",H(e.length)),new Proxy(e,{defineProperty(u,o,v){(!("value"in v)||v.configurable===!1||v.enumerable===!1||v.writable===!1)&&dn();var c=r.get(o);return c===void 0?c=i(()=>{var s=H(v.value);return r.set(o,s),s}):T(c,v.value,!0),!0},deleteProperty(u,o){var v=r.get(o);if(v===void 0){if(o in u){const f=i(()=>H(D));r.set(o,f),St(l)}}else{if(n&&typeof o=="string"){var c=r.get("length"),s=Number(o);Number.isInteger(s)&&s<c.v&&T(c,s)}T(v,D),St(l)}return!0},get(u,o,v){if(o===ve)return e;var c=r.get(o),s=o in u;if(c===void 0&&(!s||fe(u,o)?.writable)&&(c=i(()=>{var d=oe(s?u[o]:D),h=H(d);return h}),r.set(o,c)),c!==void 0){var f=m(c);return f===D?void 0:f}return Reflect.get(u,o,v)},getOwnPropertyDescriptor(u,o){var v=Reflect.getOwnPropertyDescriptor(u,o);if(v&&"value"in v){var c=r.get(o);c&&(v.value=m(c))}else if(v===void 0){var s=r.get(o),f=s?.v;if(s!==void 0&&f!==D)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return v},has(u,o){if(o===ve)return!0;var v=r.get(o),c=v!==void 0&&v.v!==D||Reflect.has(u,o);if(v!==void 0||x!==null&&(!c||fe(u,o)?.writable)){v===void 0&&(v=i(()=>{var f=c?oe(u[o]):D,d=H(f);return d}),r.set(o,v));var s=m(v);if(s===D)return!1}return c},set(u,o,v,c){var s=r.get(o),f=o in u;if(n&&o==="length")for(var d=v;d<s.v;d+=1){var h=r.get(d+"");h!==void 0?T(h,D):d in u&&(h=i(()=>H(D)),r.set(d+"",h))}if(s===void 0)(!f||fe(u,o)?.writable)&&(s=i(()=>H(void 0)),T(s,oe(v)),r.set(o,s));else{f=s.v!==D;var p=i(()=>oe(v));T(s,p)}var g=Reflect.getOwnPropertyDescriptor(u,o);if(g?.set&&g.set.call(c,v),!f){if(n&&typeof o=="string"){var b=r.get("length"),_=Number(o);Number.isInteger(_)&&_>=b.v&&T(b,_+1)}St(l)}return!0},ownKeys(u){m(l);var o=Reflect.ownKeys(u).filter(s=>{var f=r.get(s);return f===void 0||f.v!==D});for(var[v,c]of r)c.v!==D&&!(v in u)&&o.push(v);return o},setPrototypeOf(){_n()}})}function $t(e){try{if(e!==null&&typeof e=="object"&&ve in e)return e[ve]}catch{}return e}function Tn(e,t){return Object.is($t(e),$t(t))}function Le(e){var t=B|ce,r=k!==null&&(k.f&B)!==0?k:null;return x===null||r!==null&&(r.f&W)!==0?t|=W:x.f|=Yt,{ctx:$,deps:null,effects:null,equals:Zt,f:t,fn:e,reactions:null,rv:0,v:D,wv:0,parent:r??x,ac:null}}function Re(e){const t=Le(e);return yr(t),t}function er(e){const t=Le(e);return t.equals=Xt,t}function tr(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)z(t[r])}}function Pn(e){for(var t=e.parent;t!==null;){if((t.f&B)===0)return t;t=t.parent}return null}function Et(e){var t,r=x;Ne(Pn(e));try{tr(e),t=xr(e)}finally{Ne(r)}return t}function rr(e){var t=Et(e);if(e.equals(t)||(e.v=t,e.wv=Er()),!_e){var r=(ge||(e.f&W)!==0)&&e.deps!==null?be:Y;ne(e,r)}}const we=new Map;function tt(e,t){var r={f:0,v:e,reactions:null,equals:Zt,rv:0,wv:0};return r}function H(e,t){const r=tt(e);return yr(r),r}function Cn(e,t=!1,r=!0){const n=tt(e);return t||(n.equals=Xt),n}function T(e,t,r=!1){k!==null&&(!re||(k.f&Wt)!==0)&&Qt()&&(k.f&(B|wt|Wt))!==0&&!ue?.includes(e)&&hn();let n=r?oe(t):t;return nr(e,n)}function nr(e,t){if(!e.equals(t)){var r=e.v;_e?we.set(e,t):we.set(e,r),e.v=t,(e.f&B)!==0&&((e.f&ce)!==0&&Et(e),ne(e,(e.f&W)===0?Y:be)),e.wv=Er(),lr(e,ce),x!==null&&(x.f&Y)!==0&&(x.f&(ae|xe))===0&&(X===null?Yn([e]):X.push(e))}return t}function St(e){T(e,e.v+1)}function lr(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,l=0;l<n;l++){var a=r[l],i=a.f;(i&ce)===0&&(ne(a,t),(i&(Y|W))!==0&&((i&B)!==0?lr(a,be):st(a)))}}function Mn(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let On=!1;var ar,ir,or,ur;function Dn(){if(ar===void 0){ar=window,ir=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;or=fe(t,"firstChild").get,ur=fe(t,"nextSibling").get,Ut(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Ut(r)&&(r.__t=void 0)}}function rt(e=""){return document.createTextNode(e)}function Fe(e){return or.call(e)}function nt(e){return ur.call(e)}function E(e,t){return Fe(e)}function O(e,t){{var r=Fe(e);return r instanceof Comment&&r.data===""?nt(r):r}}function P(e,t=1,r=!1){let n=e;for(;t--;)n=nt(n);return n}function In(e){e.textContent=""}function Ln(e){x===null&&k===null&&fn(),k!==null&&(k.f&W)!==0&&x===null&&sn(),_e&&un()}function Rn(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ye(e,t,r,n=!0){var l=x,a={ctx:$,deps:null,nodes_start:null,nodes_end:null,f:e|ce,first:null,fn:t,last:null,next:null,parent:l,b:l&&l.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Nt(a),a.f|=Bt}catch(o){throw z(a),o}else t!==null&&st(a);var i=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(Yt|yt))===0;if(!i&&n&&(l!==null&&Rn(a,l),k!==null&&(k.f&B)!==0)){var u=k;(u.effects??=[]).push(a)}return a}function sr(e){const t=ye(Qe,null,!1);return ne(t,Y),t.teardown=e,t}function Vn(e){if(Ln(),!k&&x&&(x.f&ae)!==0){var t=$;(t.e??=[]).push(e)}else return fr(e)}function fr(e){return ye(bt|zt,e,!1)}function jn(e){const t=ye(xe,e,!0);return(r={})=>new Promise(n=>{r.outro?ke(t,()=>{z(t),n(void 0)}):(z(t),n(void 0))})}function xt(e){return ye(bt,e,!1)}function cr(e){return ye(Qe,e,!0)}function lt(e,t=[],r=Le){const n=t.map(r);return de(()=>e(...n.map(m)))}function de(e,t=0){var r=ye(Qe|wt|t,e,!0);return r}function te(e,t=!0){return ye(Qe|ae,e,!0,t)}function vr(e){var t=e.teardown;if(t!==null){const r=_e,n=k;wr(!0),he(null);try{t.call(null)}finally{wr(r),he(n)}}}function dr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){r.ac?.abort(Kt);var n=r.next;(r.f&xe)!==0?r.parent=null:z(r,t),r=n}}function Hn(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&ae)===0&&z(t),t=r}}function z(e,t=!0){var r=!1;(t||(e.f&nn)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(Un(e.nodes_start,e.nodes_end),r=!0),dr(e,t&&!r),ut(e,0),ne(e,et);var n=e.transitions;if(n!==null)for(const a of n)a.stop();vr(e);var l=e.parent;l!==null&&l.first!==null&&_r(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Un(e,t){for(;e!==null;){var r=e===t?null:nt(e);e.remove(),e=r}}function _r(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function ke(e,t){var r=[];Ft(e,r,!0),hr(r,()=>{z(e),t&&t()})}function hr(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var l of e)l.out(n)}else t()}function Ft(e,t,r){if((e.f&ie)===0){if(e.f^=ie,e.transitions!==null)for(const i of e.transitions)(i.is_global||r)&&t.push(i);for(var n=e.first;n!==null;){var l=n.next,a=(n.f&Ie)!==0||(n.f&ae)!==0;Ft(n,t,a?r:!1),n=l}}}function Ve(e){gr(e,!0)}function gr(e,t){if((e.f&ie)!==0){e.f^=ie;for(var r=e.first;r!==null;){var n=r.next,l=(r.f&Ie)!==0||(r.f&ae)!==0;gr(r,l?t:!1),r=n}if(e.transitions!==null)for(const a of e.transitions)(a.is_global||t)&&a.in()}}let je=[],kt=[];function pr(){var e=je;je=[],qt(e)}function qn(){var e=kt;kt=[],qt(e)}function at(e){je.length===0&&queueMicrotask(pr),je.push(e)}function Bn(){je.length>0&&pr(),kt.length>0&&qn()}function Wn(e){var t=x;if((t.f&Bt)===0){if((t.f&yt)===0)throw e;t.fn(e)}else br(e,t)}function br(e,t){for(;t!==null;){if((t.f&yt)!==0)try{t.b.error(e);return}catch{}t=t.parent}throw e}let He=!1,Ue=null,me=!1,_e=!1;function wr(e){_e=e}let qe=[],Ea=[],k=null,re=!1;function he(e){k=e}let x=null;function Ne(e){x=e}let ue=null;function yr(e){k!==null&&k.f&mt&&(ue===null?ue=[e]:ue.push(e))}let L=null,G=0,X=null;function Yn(e){X=e}let it=1,Be=0,Ee=Be;function mr(e){Ee=e}let ge=!1;function Er(){return++it}function ot(e){var t=e.f;if((t&ce)!==0)return!0;if((t&be)!==0){var r=e.deps,n=(t&W)!==0;if(r!==null){var l,a,i=(t&$e)!==0,u=n&&x!==null&&!ge,o=r.length;if(i||u){var v=e,c=v.parent;for(l=0;l<o;l++)a=r[l],(i||!a?.reactions?.includes(v))&&(a.reactions??=[]).push(v);i&&(v.f^=$e),u&&c!==null&&(c.f&W)===0&&(v.f^=W)}for(l=0;l<o;l++)if(a=r[l],ot(a)&&rr(a),a.wv>e.wv)return!0}(!n||x!==null&&!ge)&&ne(e,Y)}return!1}function Sr(e,t,r=!0){var n=e.reactions;if(n!==null&&!ue?.includes(e))for(var l=0;l<n.length;l++){var a=n[l];(a.f&B)!==0?Sr(a,t,!1):t===a&&(r?ne(a,ce):(a.f&Y)!==0&&ne(a,be),st(a))}}function xr(e){var t=L,r=G,n=X,l=k,a=ge,i=ue,u=$,o=re,v=Ee,c=e.f;L=null,G=0,X=null,ge=(c&W)!==0&&(re||!me||k===null),k=(c&(ae|xe))===0?e:null,ue=null,Jt(e.ctx),re=!1,Ee=++Be,e.f|=mt,e.ac!==null&&(e.ac.abort(Kt),e.ac=null);try{var s=(0,e.fn)(),f=e.deps;if(L!==null){var d;if(ut(e,G),f!==null&&G>0)for(f.length=G+L.length,d=0;d<L.length;d++)f[G+d]=L[d];else e.deps=f=L;if(!ge||(c&B)!==0&&e.reactions!==null)for(d=G;d<f.length;d++)(f[d].reactions??=[]).push(e)}else f!==null&&G<f.length&&(ut(e,G),f.length=G);if(Qt()&&X!==null&&!re&&f!==null&&(e.f&(B|be|ce))===0)for(d=0;d<X.length;d++)Sr(X[d],e);return l!==null&&l!==e&&(Be++,X!==null&&(n===null?n=X:n.push(...X))),s}catch(h){Wn(h)}finally{L=t,G=r,X=n,k=l,ge=a,ue=i,Jt(u),re=o,Ee=v,e.f^=mt}}function zn(e,t){let r=t.reactions;if(r!==null){var n=Jr.call(r,e);if(n!==-1){var l=r.length-1;l===0?r=t.reactions=null:(r[n]=r[l],r.pop())}}r===null&&(t.f&B)!==0&&(L===null||!L.includes(t))&&(ne(t,be),(t.f&(W|$e))===0&&(t.f^=$e),tr(t),ut(t,0))}function ut(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)zn(e,r[n])}function Nt(e){var t=e.f;if((t&et)===0){ne(e,Y);var r=x,n=me;x=e,me=!0;try{(t&wt)!==0?Hn(e):dr(e),vr(e);var l=xr(e);e.teardown=typeof l=="function"?l:null,e.wv=it;var a}finally{me=n,x=r}}}function Gn(){try{cn()}catch(e){if(Ue!==null)br(e,Ue);else throw e}}function Fr(){var e=me;try{var t=0;for(me=!0;qe.length>0;){t++>1e3&&Gn();var r=qe,n=r.length;qe=[];for(var l=0;l<n;l++){var a=Zn(r[l]);Kn(a)}we.clear()}}finally{He=!1,me=e,Ue=null}}function Kn(e){var t=e.length;if(t!==0){for(var r=0;r<t;r++){var n=e[r];if((n.f&(et|ie))===0&&ot(n)){var l=it;if(Nt(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null?_r(n):n.fn=null),it>l&&(n.f&zt)!==0)break}}for(;r<t;r+=1)st(e[r])}}function st(e){He||(He=!0,queueMicrotask(Fr));for(var t=Ue=e;t.parent!==null;){t=t.parent;var r=t.f;if((r&(xe|ae))!==0){if((r&Y)===0)return;t.f^=Y}}qe.push(t)}function Zn(e){for(var t=[],r=e;r!==null;){var n=r.f,l=(n&(ae|xe))!==0,a=l&&(n&Y)!==0;if(!a&&(n&ie)===0){(n&bt)!==0?t.push(r):l?r.f^=Y:ot(r)&&Nt(r);var i=r.first;if(i!==null){r=i;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}return t}function Xn(e){for(var t;;){if(Bn(),qe.length===0)return He=!1,Ue=null,t;He=!0,Fr()}}async function Jn(){await Promise.resolve(),Xn()}function m(e){var t=e.f,r=(t&B)!==0;if(k!==null&&!re){if(!ue?.includes(e)){var n=k.deps;e.rv<Be&&(e.rv=Be,L===null&&n!==null&&n[G]===e?G++:L===null?L=[e]:(!ge||!L.includes(e))&&L.push(e))}}else if(r&&e.deps===null&&e.effects===null){var l=e,a=l.parent;a!==null&&(a.f&W)===0&&(l.f^=W)}if(r&&!_e&&(l=e,ot(l)&&rr(l)),_e){if(we.has(e))return we.get(e);if(r){l=e;var i=l.v;return((l.f&Y)!==0||kr(l))&&(i=Et(l)),we.set(l,i),i}}return e.v}function kr(e){if(e.v===D)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(we.has(t)||(t.f&B)!==0&&kr(t))return!0;return!1}function ft(e){var t=re;try{return re=!0,e()}finally{re=t}}const Qn=-7169;function ne(e,t){e.f=e.f&Qn|t}function $n(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const el=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function tl(e){return el.includes(e)}const rl={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function nl(e){return e=e.toLowerCase(),rl[e]??e}const ll=["touchstart","touchmove"];function al(e){return ll.includes(e)}function il(e,t){if(t){const r=document.body;e.autofocus=!0,at(()=>{document.activeElement===r&&e.focus()})}}let Nr=!1;function ol(){Nr||(Nr=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ar(e){var t=k,r=x;he(null),Ne(null);try{return e()}finally{he(t),Ne(r)}}function ul(e,t,r,n=r){e.addEventListener(t,()=>Ar(r));const l=e.__on_r;l?e.__on_r=()=>{l(),n(!0)}:e.__on_r=()=>n(!0),ol()}const Tr=new Set,At=new Set;function Pr(e,t,r,n={}){function l(a){if(n.capture||We.call(t,a),!a.cancelBubble)return Ar(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?at(()=>{t.addEventListener(e,l,n)}):t.addEventListener(e,l,n),l}function sl(e,t,r,n,l){var a={capture:n,passive:l},i=Pr(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&sr(()=>{t.removeEventListener(e,i,a)})}function ct(e){for(var t=0;t<e.length;t++)Tr.add(e[t]);for(var r of At)r(e)}function We(e){var t=this,r=t.ownerDocument,n=e.type,l=e.composedPath?.()||[],a=l[0]||e.target,i=0,u=e.__root;if(u){var o=l.indexOf(u);if(o!==-1&&(t===document||t===window)){e.__root=t;return}var v=l.indexOf(t);if(v===-1)return;o<=v&&(i=o)}if(a=l[i]||e.target,a!==t){Qr(e,"currentTarget",{configurable:!0,get(){return a||r}});var c=k,s=x;he(null),Ne(null);try{for(var f,d=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var p=a["__"+n];if(p!=null&&(!a.disabled||e.target===a))if(Je(p)){var[g,...b]=p;g.apply(a,[e,...b])}else p.call(a,e)}catch(_){f?d.push(_):f=_}if(e.cancelBubble||h===t||h===null)break;a=h}if(f){for(let _ of d)queueMicrotask(()=>{throw _});throw f}}finally{e.__root=t,delete e.currentTarget,he(c),Ne(s)}}}function Cr(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Ae(e,t){var r=x;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function le(e,t){var r=(t&Sn)!==0,n=(t&xn)!==0,l,a=!e.startsWith("<!>");return()=>{l===void 0&&(l=Cr(a?e:"<!>"+e),r||(l=Fe(l)));var i=n||ir?document.importNode(l,!0):l.cloneNode(!0);if(r){var u=Fe(i),o=i.lastChild;Ae(u,o)}else Ae(i,i);return i}}function fl(e,t,r="svg"){var n=!e.startsWith("<!>"),l=`<${r}>${n?e:"<!>"+e}</${r}>`,a;return()=>{if(!a){var i=Cr(l),u=Fe(i);a=Fe(u)}var o=a.cloneNode(!0);return Ae(o,o),o}}function cl(e,t){return fl(e,t,"svg")}function Mr(e=""){{var t=rt(e+"");return Ae(t,t),t}}function R(){var e=document.createDocumentFragment(),t=document.createComment(""),r=rt();return e.append(t,r),Ae(t,r),e}function S(e,t){e!==null&&e.before(t)}function vt(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function vl(e,t){return dl(e,t)}const Te=new Map;function dl(e,{target:t,anchor:r,props:n={},events:l,context:a,intro:i=!0}){Dn();var u=new Set,o=s=>{for(var f=0;f<s.length;f++){var d=s[f];if(!u.has(d)){u.add(d);var h=al(d);t.addEventListener(d,We,{passive:h});var p=Te.get(d);p===void 0?(document.addEventListener(d,We,{passive:h}),Te.set(d,1)):Te.set(d,p+1)}}};o(pt(Tr)),At.add(o);var v=void 0,c=jn(()=>{var s=r??t.appendChild(rt());return te(()=>{if(a){C({});var f=$;f.c=a}l&&(n.$$events=l),v=e(s,n)||{},a&&M()}),()=>{for(var f of u){t.removeEventListener(f,We);var d=Te.get(f);--d===0?(document.removeEventListener(f,We),Te.delete(f)):Te.set(f,d)}At.delete(o),s!==r&&s.parentNode?.removeChild(s)}});return _l.set(v,c),v}let _l=new WeakMap;function se(e,t,[r,n]=[0,0]){var l=e,a=null,i=null,u=D,o=r>0?Ie:0,v=!1;const c=(f,d=!0)=>{v=!0,s(d,f)},s=(f,d)=>{u!==(u=f)&&(u?(a?Ve(a):d&&(a=te(()=>d(l))),i&&ke(i,()=>{i=null})):(i?Ve(i):d&&(i=te(()=>d(l,[r+1,n]))),a&&ke(a,()=>{a=null})))};de(()=>{v=!1,t(c),v||s(null,null)},o)}function hl(e,t,r){var n=e,l=D,a,i=on;de(()=>{i(l,l=t())&&(a&&ke(a),a=te(()=>r(n)))})}function Or(e,t){return t}function gl(e,t,r,n){for(var l=[],a=t.length,i=0;i<a;i++)Ft(t[i].e,l,!0);var u=a>0&&l.length===0&&r!==null;if(u){var o=r.parentNode;In(o),o.append(r),n.clear(),pe(e,t[0].prev,t[a-1].next)}hr(l,()=>{for(var v=0;v<a;v++){var c=t[v];u||(n.delete(c.k),pe(e,c.prev,c.next)),z(c.e,!u)}})}function Dr(e,t,r,n,l,a=null){var i=e,u={flags:t,items:new Map,first:null},o=null,v=!1,c=er(()=>{var s=r();return Je(s)?s:s==null?[]:pt(s)});de(()=>{var s=m(c),f=s.length;v&&f===0||(v=f===0,pl(s,u,i,l,t,n,r),a!==null&&(f===0?o?Ve(o):o=te(()=>a(i)):o!==null&&ke(o,()=>{o=null})),m(c))})}function pl(e,t,r,n,l,a,i){var u=e.length,o=t.items,v=t.first,c=v,s,f=null,d=[],h=[],p,g,b,_;for(_=0;_<u;_+=1){if(p=e[_],g=a(p,_),b=o.get(g),b===void 0){var y=c?c.e.nodes_start:r;f=wl(y,t,f,f===null?t.first:f.next,p,g,_,n,l,i),o.set(g,f),d=[],h=[],c=f.next;continue}if(bl(b,p,_),(b.e.f&ie)!==0&&Ve(b.e),b!==c){if(s!==void 0&&s.has(b)){if(d.length<h.length){var F=h[0],w;f=F.prev;var N=d[0],V=d[d.length-1];for(w=0;w<d.length;w+=1)Ir(d[w],F,r);for(w=0;w<h.length;w+=1)s.delete(h[w]);pe(t,N.prev,V.next),pe(t,f,N),pe(t,V,F),c=F,f=V,_-=1,d=[],h=[]}else s.delete(b),Ir(b,c,r),pe(t,b.prev,b.next),pe(t,b,f===null?t.first:f.next),pe(t,f,b),f=b;continue}for(d=[],h=[];c!==null&&c.k!==g;)(c.e.f&ie)===0&&(s??=new Set).add(c),h.push(c),c=c.next;if(c===null)continue;b=c}d.push(b),f=b,c=b.next}if(c!==null||s!==void 0){for(var U=s===void 0?[]:pt(s);c!==null;)(c.e.f&ie)===0&&U.push(c),c=c.next;var Se=U.length;if(Se>0){var Xe=null;gl(t,U,Xe,o)}}x.first=t.first&&t.first.e,x.last=f&&f.e}function bl(e,t,r,n){nr(e.v,t),e.i=r}function wl(e,t,r,n,l,a,i,u,o,v){var c=(o&gn)!==0,s=(o&bn)===0,f=c?s?Cn(l,!1,!1):tt(l):l,d=(o&pn)===0?i:tt(i),h={i:d,v:f,k:a,a:null,e:null,prev:r,next:n};try{return h.e=te(()=>u(e,f,d,v),On),h.e.prev=r&&r.e,h.e.next=n&&n.e,r===null?t.first=h:(r.next=h,r.e.next=h.e),n!==null&&(n.prev=h,n.e.prev=h.e),h}finally{}}function Ir(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,l=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==n;){var i=nt(a);l.before(a),a=i}}function pe(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}function K(e,t,...r){var n=e,l=j,a;de(()=>{l!==(l=t())&&(a&&(z(a),a=null),a=te(()=>l(n,...r)))},Ie)}function yl(e,t,r,n,l,a){var i,u,o=null,v=e,c;de(()=>{const s=t()||null;var f=kn;s!==i&&(c&&(s===null?ke(c,()=>{c=null,u=null}):s===u?Ve(c):z(c)),s&&s!==u&&(c=te(()=>{if(o=document.createElementNS(f,s),Ae(o,o),n){var d=o.appendChild(rt());n(o,d)}x.nodes_end=o,v.before(o)})),i=s,i&&(u=i))},Ie)}function Ye(e,t){at(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const l=document.createElement("style");l.id=t.hash,l.textContent=t.code,n.appendChild(l)}})}function ml(e,t){var r=void 0,n;de(()=>{r!==(r=t())&&(n&&(z(n),n=null),r&&(n=te(()=>{xt(()=>r(e))})))})}function Lr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=Lr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function El(){for(var e,t,r=0,n="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=Lr(e))&&(n&&(n+=" "),n+=t);return n}function Sl(e){return typeof e=="object"?El(e):e??""}const Rr=[...`
\r\f \v\uFEFF`];function xl(e,t,r){var n=e==null?"":""+e;if(r){for(var l in r)if(r[l])n=n?n+" "+l:l;else if(n.length)for(var a=l.length,i=0;(i=n.indexOf(l,i))>=0;){var u=i+a;(i===0||Rr.includes(n[i-1]))&&(u===n.length||Rr.includes(n[u]))?n=(i===0?"":n.substring(0,i))+n.substring(u+1):i=u}}return n===""?null:n}function Vr(e,t=!1){var r=t?" !important;":";",n="";for(var l in e){var a=e[l];a!=null&&a!==""&&(n+=" "+l+": "+a+r)}return n}function Tt(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Fl(e,t){if(t){var r="",n,l;if(Array.isArray(t)?(n=t[0],l=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,i=0,u=!1,o=[];n&&o.push(...Object.keys(n).map(Tt)),l&&o.push(...Object.keys(l).map(Tt));var v=0,c=-1;const p=e.length;for(var s=0;s<p;s++){var f=e[s];if(u?f==="/"&&e[s-1]==="*"&&(u=!1):a?a===f&&(a=!1):f==="/"&&e[s+1]==="*"?u=!0:f==='"'||f==="'"?a=f:f==="("?i++:f===")"&&i--,!u&&a===!1&&i===0){if(f===":"&&c===-1)c=s;else if(f===";"||s===p-1){if(c!==-1){var d=Tt(e.substring(v,c).trim());if(!o.includes(d)){f!==";"&&s++;var h=e.substring(v,s).trim();r+=" "+h+";"}}v=s+1,c=-1}}}}return n&&(r+=Vr(n)),l&&(r+=Vr(l,!0)),r=r.trim(),r===""?null:r}return e==null?null:String(e)}function kl(e,t,r,n,l,a){var i=e.__className;if(i!==r||i===void 0){var u=xl(r,n,a);u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u),e.__className=r}else if(a&&l!==a)for(var o in a){var v=!!a[o];(l==null||v!==!!l[o])&&e.classList.toggle(o,v)}return a}function Pt(e,t={},r,n){for(var l in r){var a=r[l];t[l]!==a&&(r[l]==null?e.style.removeProperty(l):e.style.setProperty(l,a,n))}}function Nl(e,t,r,n){var l=e.__style;if(l!==t){var a=Fl(t,n);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=t}else n&&(Array.isArray(n)?(Pt(e,r?.[0],n[0]),Pt(e,r?.[1],n[1],"important")):Pt(e,r,n));return n}function Ct(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Je(t))return Mn();for(var n of e.options)n.selected=t.includes(jr(n));return}for(n of e.options){var l=jr(n);if(Tn(l,t)){n.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Al(e){var t=new MutationObserver(()=>{Ct(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),sr(()=>{t.disconnect()})}function jr(e){return"__value"in e?e.__value:e.value}const ze=Symbol("class"),Ge=Symbol("style"),Hr=Symbol("is custom element"),Ur=Symbol("is html");function Tl(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function qr(e,t,r,n){var l=Wr(e);l[t]!==(l[t]=r)&&(t==="loading"&&(e[ln]=r),r==null?e.removeAttribute(t):typeof r!="string"&&zr(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Pl(e,t,r,n,l=!1){var a=Wr(e),i=a[Hr],u=!a[Ur],o=t||{},v=e.tagName==="OPTION";for(var c in t)c in r||(r[c]=null);r.class?r.class=Sl(r.class):r[ze]&&(r.class=null),r[Ge]&&(r.style??=null);var s=zr(e);for(const _ in r){let y=r[_];if(v&&_==="value"&&y==null){e.value=e.__value="",o[_]=y;continue}if(_==="class"){var f=e.namespaceURI==="http://www.w3.org/1999/xhtml";kl(e,f,y,n,t?.[ze],r[ze]),o[_]=y,o[ze]=r[ze];continue}if(_==="style"){Nl(e,y,t?.[Ge],r[Ge]),o[_]=y,o[Ge]=r[Ge];continue}var d=o[_];if(!(y===d&&!(y===void 0&&e.hasAttribute(_)))){o[_]=y;var h=_[0]+_[1];if(h!=="$$")if(h==="on"){const F={},w="$$"+_;let N=_.slice(2);var p=tl(N);if($n(N)&&(N=N.slice(0,-7),F.capture=!0),!p&&d){if(y!=null)continue;e.removeEventListener(N,o[w],F),o[w]=null}if(y!=null)if(p)e[`__${N}`]=y,ct([N]);else{let V=function(U){o[_].call(this,U)};o[w]=Pr(N,e,V,F)}else p&&(e[`__${N}`]=void 0)}else if(_==="style")qr(e,_,y);else if(_==="autofocus")il(e,!!y);else if(!i&&(_==="__value"||_==="value"&&y!=null))e.value=e.__value=y;else if(_==="selected"&&v)Tl(e,y);else{var g=_;u||(g=nl(g));var b=g==="defaultValue"||g==="defaultChecked";if(y==null&&!i&&!b)if(a[_]=null,g==="value"||g==="checked"){let F=e;const w=t===void 0;if(g==="value"){let N=F.defaultValue;F.removeAttribute(g),F.defaultValue=N,F.value=F.__value=w?N:null}else{let N=F.defaultChecked;F.removeAttribute(g),F.defaultChecked=N,F.checked=w?N:!1}}else e.removeAttribute(_);else b||s.includes(g)&&(i||typeof y!="string")?e[g]=y:typeof y!="function"&&qr(e,g,y)}}}return o}function Br(e,t,r=[],n,l=!1,a=Le){const i=r.map(a);var u=void 0,o={},v=e.nodeName==="SELECT",c=!1;if(de(()=>{var f=t(...i.map(m)),d=Pl(e,u,f,n,l);c&&v&&"value"in f&&Ct(e,f.value);for(let p of Object.getOwnPropertySymbols(o))f[p]||z(o[p]);for(let p of Object.getOwnPropertySymbols(f)){var h=f[p];p.description===Nn&&(!u||h!==u[p])&&(o[p]&&z(o[p]),o[p]=te(()=>ml(e,()=>h))),d[p]=h}u=d}),v){var s=e;xt(()=>{Ct(s,u.value,!0),Al(s)})}c=!0}function Wr(e){return e.__attributes??={[Hr]:e.nodeName.includes("-"),[Ur]:e.namespaceURI===Fn}}var Yr=new Map;function zr(e){var t=Yr.get(e.nodeName);if(t)return t;Yr.set(e.nodeName,t=[]);for(var r,n=e,l=Element.prototype;l!==n;){r=$r(n);for(var a in r)r[a].set&&t.push(a);n=Ht(n)}return t}function Mt(e,t,r=t){ul(e,"input",n=>{var l=n?e.defaultValue:e.value;if(l=Ot(e)?Dt(l):l,r(l),l!==(l=t())){var a=e.selectionStart,i=e.selectionEnd;e.value=l??"",i!==null&&(e.selectionStart=a,e.selectionEnd=Math.min(i,e.value.length))}}),ft(t)==null&&e.value&&r(Ot(e)?Dt(e.value):e.value),cr(()=>{var n=t();Ot(e)&&n===Dt(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function Ot(e){var t=e.type;return t==="number"||t==="range"}function Dt(e){return e===""?null:+e}function Gr(e,t){return e===t||e?.[ve]===t}function dt(e={},t,r,n){return xt(()=>{var l,a;return cr(()=>{l=a,a=[],ft(()=>{e!==r(...a)&&(t(e,...a),l&&Gr(r(...l),e)&&t(null,...l))})}),()=>{at(()=>{a&&Gr(r(...a),e)&&t(null,...a)})}}),e}let _t=!1;function Cl(e){var t=_t;try{return _t=!1,[e(),_t]}finally{_t=t}}const Ml={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function Z(e,t,r){return new Proxy({props:e,exclude:t},Ml)}const Ol={get(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(De(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n)return n[t]}},set(e,t,r){let n=e.props.length;for(;n--;){let l=e.props[n];De(l)&&(l=l());const a=fe(l,t);if(a&&a.set)return a.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let n=e.props[r];if(De(n)&&(n=n()),typeof n=="object"&&n!==null&&t in n){const l=fe(n,t);return l&&!l.configurable&&(l.configurable=!0),l}}},has(e,t){if(t===ve||t===Gt)return!1;for(let r of e.props)if(De(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(De(r)&&(r=r()),!!r){for(const n in r)t.includes(n)||t.push(n);for(const n of Object.getOwnPropertySymbols(r))t.includes(n)||t.push(n)}return t}};function J(...e){return new Proxy({props:e},Ol)}function Pe(e,t,r,n){var l=(r&mn)!==0,a=(r&En)!==0,i=n,u=!0,o=()=>(u&&(u=!1,i=a?ft(n):n),i),v;if(l){var c=ve in e||Gt in e;v=fe(e,t)?.set??(c&&t in e?_=>e[t]=_:void 0)}var s,f=!1;l?[s,f]=Cl(()=>e[t]):s=e[t],s===void 0&&n!==void 0&&(s=o(),v&&(vn(),v(s)));var d;if(d=()=>{var _=e[t];return _===void 0?o():(u=!0,_)},(r&yn)===0)return d;if(v){var h=e.$$legacy;return function(_,y){return arguments.length>0?((!y||h||f)&&v(y?d():_),_):d()}}var p=!1,g=((r&wn)!==0?Le:er)(()=>(p=!1,d()));l&&m(g);var b=x;return function(_,y){if(arguments.length>0){const F=y?m(g):l?oe(_):_;return T(g,F),p=!0,i!==void 0&&(i=F),_}return _e&&p||(b.f&et)!==0?g.v:m(g)}}function Dl(e){$===null&&An(),Vn(()=>{const t=ft(e);if(typeof t=="function")return t})}const Il="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Il);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/const Ll={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var Rl=cl("<svg><!><!></svg>");function Q(e,t){C(t,!0);const r=Pe(t,"color",3,"currentColor"),n=Pe(t,"size",3,24),l=Pe(t,"strokeWidth",3,2),a=Pe(t,"absoluteStrokeWidth",3,!1),i=Pe(t,"iconNode",19,()=>[]),u=Z(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var o=Rl();Br(o,s=>({...Ll,...u,width:n(),height:n(),stroke:r(),"stroke-width":s,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>a()?Number(l())*24/Number(n()):l()]);var v=E(o);Dr(v,17,i,Or,(s,f)=>{var d=Re(()=>rn(m(f),2));let h=()=>m(d)[0],p=()=>m(d)[1];var g=R(),b=O(g);yl(b,h,!0,(_,y)=>{Br(_,()=>({...p()}))}),S(s,g)});var c=P(v);K(c,()=>t.children??j),S(e,o),M()}function Kr(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]];Q(e,J({name:"arrow-left"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Vl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 6 9 17l-5-5"}]];Q(e,J({name:"check"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function jl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];Q(e,J({name:"download"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Hl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"12",cy:"5",r:"1"}],["circle",{cx:"12",cy:"19",r:"1"}]];Q(e,J({name:"ellipsis-vertical"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Ul(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"m10 18 3-3-3-3"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M4 11V4a2 2 0 0 1 2-2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7"}]];Q(e,J({name:"file-symlink"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function ql(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];Q(e,J({name:"file-up"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Bl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}]];Q(e,J({name:"file"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Wl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M12 10v6"}],["path",{d:"M9 13h6"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]];Q(e,J({name:"folder-plus"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Yl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]];Q(e,J({name:"folder"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function zl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]];Q(e,J({name:"save"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Gl(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}]];Q(e,J({name:"trash"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}function Zr(e,t){C(t,!0);/**
* @license @lucide/svelte v0.525.0 - ISC
*
* ISC License
*
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/let r=Z(t,["$$slots","$$events","$$legacy"]);const n=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Q(e,J({name:"x"},()=>r,{get iconNode(){return n},children:(l,a)=>{var i=R(),u=O(i);K(u,()=>t.children??j),S(l,i)},$$slots:{default:!0}})),M()}async function Kl(e,t,r){const n=t+r.name,l=new Uint8Array(await r.arrayBuffer());e.writeFile(n,l,{flags:"w+"})}async function Xr(e,t,r){await Promise.all(r.map(async n=>{await Kl(e,t,n)}))}function Ke(e){return new Promise((t,r)=>{e.syncfs(!1,n=>{n&&r(n),t()})})}let I=oe({path:void 0}),Ze=oe({path:null});var Zl=(e,t,r)=>{T(t,!0),Jn().then(()=>m(r).focus())},Xl=(e,t,r)=>{T(t,!1),T(r,null)},Jl=le('<div class="error svelte-154ab8g"> </div>'),Ql=le('<form class="new-folder svelte-154ab8g"><input type="text" placeholder="Folder name" required/> <button type="submit" aria-label="Create folder" title="Create folder"><!></button> <button type="button" aria-label="Cancel" title="Cancel"><!></button></form> <div role="alert"><!></div>',1),$l=le('<section role="toolbar" class="toolbar svelte-154ab8g"><button aria-label="Go back" title="Go back"><!></button> <button aria-label="Import files" title="Import files"><!></button> <button aria-label="New folder" title="New folder"><!></button> <input type="text" disabled aria-label="Current directory" title="Current directory" class="svelte-154ab8g"/></section> <!> <hr/>',1);const ea={hash:"svelte-154ab8g",code:".toolbar.svelte-154ab8g {display:flex;gap:5px;margin-bottom:5px;}.toolbar.svelte-154ab8g input:where(.svelte-154ab8g) {flex-grow:1;}.new-folder.svelte-154ab8g {display:flex;gap:5px;}.error.svelte-154ab8g {color:red;}"};function ta(e,t){C(t,!0),Ye(e,ea);let r=H(void 0),n=H(!1),l=H(""),a=Re(()=>m(l).trim()!==""),i=H(null);function u(){I.path=t.dirParent,t.FS.chdir(I.path)}function o(){const w=document.createElement("input");w.type="file",w.hidden=!0,w.multiple=!0,w.onchange=async()=>{const N=Array.from(w.files);if(N.length){let V=I.path;V.endsWith("/")||(V+="/");try{await Xr(t.FS,V,N),await Ke(t.FS),I.path=void 0,I.path=t.FS.cwd()}catch(U){console.log(U)}}w.remove()},document.body.append(w),w.click()}async function v(){try{t.FS.mkdir(m(l));try{await Ke(t.FS)}catch(w){console.log(w)}I.path=void 0,I.path=t.FS.cwd(),T(i,null),T(l,""),T(n,!1)}catch(w){T(i,w,!0)}}var c=$l(),s=O(c),f=E(s);f.__click=u;var d=E(f);Kr(d,{});var h=P(f,2);h.__click=o;var p=E(h);ql(p,{});var g=P(h,2);g.__click=[Zl,n,r];var b=E(g);Wl(b,{});var _=P(g,2),y=P(s,2);{var F=w=>{var N=Ql(),V=O(N),U=E(V);dt(U,ee=>T(r,ee),()=>m(r));var Se=P(U,2),Xe=E(Se);Vl(Xe,{});var Ce=P(Se,2);Ce.__click=[Xl,n,i];var ht=E(Ce);Zr(ht,{});var It=P(V,2),Lt=E(It);{var Rt=ee=>{var gt=R(),A=O(gt);hl(A,()=>m(i),q=>{var Me=Jl(),Vt=E(Me);lt(()=>vt(Vt,m(i))),S(q,Me)}),S(ee,gt)};se(Lt,ee=>{m(i)&&ee(Rt)})}lt(()=>Se.disabled=!m(a)),sl("submit",V,ee=>{ee.preventDefault(),v()}),Mt(U,()=>m(l),ee=>T(l,ee)),S(w,N)};se(y,w=>{m(n)&&w(F)})}Mt(_,()=>I.path,w=>I.path=w),S(e,c),M()}ct(["click"]);var ra=le('<button aria-label="More" class="svelte-166l1ha"><!></button>'),na=le('<dialog class="actions svelte-166l1ha"><div class="container svelte-166l1ha"><div class="header svelte-166l1ha"><b> </b> <button aria-label="Close" class="svelte-166l1ha"><!></button></div> <div class="buttons svelte-166l1ha"><button class="svelte-166l1ha"><!> Download</button> <button class="svelte-166l1ha"><!> Delete</button></div></div></dialog> <dialog class="delete-dialog svelte-166l1ha"><div> </div> <br/> <div style="display: flex; justify-content: space-between;"><button class="svelte-166l1ha">Cancel</button> <button class="svelte-166l1ha">Delete</button></div></dialog> <div class="container svelte-166l1ha"><button class="svelte-166l1ha"><!> </button> <!></div>',1);const la={hash:"svelte-166l1ha",code:`.container.svelte-166l1ha {display:grid;grid-template-columns:1fr auto;gap:5px;}button.svelte-166l1ha {display:inline-flex;gap:5px;align-items:center;height:30px;}dialog.svelte-166l1ha {min-width:300px;min-height:300px;max-width:500px;padding:5px;border:2px solid;border-radius:5px;}.actions.svelte-166l1ha .container:where(.svelte-166l1ha),
.actions.svelte-166l1ha .buttons:where(.svelte-166l1ha) {display:flex;flex-direction:column;gap:5px;}.actions.svelte-166l1ha .header:where(.svelte-166l1ha) {display:flex;gap:5px;justify-content:space-between;align-items:center;}.actions.svelte-166l1ha .buttons:where(.svelte-166l1ha) button:where(.svelte-166l1ha) {width:100%;}.delete-dialog.svelte-166l1ha button:where(.svelte-166l1ha) {width:40%;text-align:center;display:inline-block;}`};function aa(e,t){C(t,!0),Ye(e,la);let r,n;function l(){if(t.FS.isDir(t.entry.mode)){const A=t.FS.getPath(t.entry);I.path=A,t.FS.chdir(A)}if(t.FS.isFile(t.entry.mode)){const A=t.FS.getPath(t.entry);Ze.path=A}}function a(){const A=new Blob([t.FS.readFile(t.FS.getPath(t.entry),{encoding:"binary"})]),q=document.createElement("a");q.href=URL.createObjectURL(A),q.download=t.entry.name,document.body.appendChild(q),q.click(),setTimeout(()=>{URL.revokeObjectURL(q.href),document.body.removeChild(q)},1e3)}async function i(){try{t.FS.unlink(t.FS.getPath(t.entry))}catch(A){console.log(A)}await Ke(t.FS),I.path=void 0,I.path=t.FS.cwd(),n.close()}var u=na(),o=O(u),v=E(o),c=E(v),s=E(c),f=E(s),d=P(s,2);d.__click=()=>r.close();var h=E(d);Zr(h,{});var p=P(c,2),g=E(p);g.__click=a;var b=E(g);jl(b,{});var _=P(g,2);_.__click=()=>{r.close(),n.showModal()};var y=E(_);Gl(y,{}),dt(o,A=>r=A,()=>r);var F=P(o,2),w=E(F),N=E(w),V=P(w,4),U=E(V);U.__click=()=>n.close();var Se=P(U,2);Se.__click=i,dt(F,A=>n=A,()=>n);var Xe=P(F,2),Ce=E(Xe);Ce.__click=l;var ht=E(Ce);{var It=A=>{Yl(A,{"aria-label":"Directory"})},Lt=(A,q)=>{{var Me=Oe=>{Bl(Oe,{"aria-label":"File"})},Vt=(Oe,ba)=>{{var wa=jt=>{Ul(jt,{"aria-label":"Symlink"})};se(Oe,jt=>{t.FS.isLink(t.entry.mode)&&jt(wa)},ba)}};se(A,Oe=>{t.FS.isFile(t.entry.mode)?Oe(Me):Oe(Vt,!1)},q)}};se(ht,A=>{t.FS.isDir(t.entry.mode)?A(It):A(Lt,!1)})}var Rt=P(ht),ee=P(Ce,2);{var gt=A=>{var q=ra();q.__click=()=>r.showModal();var Me=E(q);Hl(Me,{}),S(A,q)};se(ee,A=>{t.FS.isFile(t.entry.mode)&&A(gt)})}lt(()=>{vt(f,t.entry.name),vt(N,`Are you sure you want to delete "${t.entry.name??""}" ?`),vt(Rt,` ${t.entry.name??""}`)}),S(e,u),M()}ct(["click"]);var ia=le('<div class="empty-info svelte-wc6a2d"><div>This folder is empty</div></div>'),oa=le('<section class="folder-content svelte-wc6a2d" aria-label="Folder content"><!></section>');const ua={hash:"svelte-wc6a2d",code:".folder-content.svelte-wc6a2d {height:100%;display:flex;flex-direction:column;row-gap:5px;}.empty-info.svelte-wc6a2d {height:100%;color:gray;display:flex;justify-content:center;align-items:center;}"};function sa(e,t){C(t,!0),Ye(e,ua);let r;Dl(()=>{["dragenter","dragover","dragleave","drop"].forEach(v=>{r.addEventListener(v,o,!1)});function o(v){v.preventDefault(),v.stopPropagation()}r.addEventListener("drop",n)});async function n(o){if(!o.dataTransfer)return;const v=Array.from(o.dataTransfer.files);if(!v.length)return;let c=I.path;c.endsWith("/")||(c+="/");try{await Xr(t.FS,c,v),await Ke(t.FS),I.path=void 0,I.path=t.FS.cwd()}catch(s){console.log(s)}}var l=oa(),a=E(l);{var i=o=>{var v=R(),c=O(v);Dr(c,17,()=>t.dirContent,Or,(s,f)=>{aa(s,{get FS(){return t.FS},get entry(){return m(f)}})}),S(o,v)},u=o=>{var v=ia();S(o,v)};se(a,o=>{t.dirContent.length>0?o(i):o(u,!1)})}dt(l,o=>r=o,()=>r),S(e,l),M()}var fa=le('<div class="container svelte-6nx075"><section role="toolbar"><button title="Close" aria-label="Close" class="svelte-6nx075"><!></button> <button class="svelte-6nx075"><!> <!></button></section> <textarea aria-label="File contents" class="svelte-6nx075"></textarea></div>');const ca={hash:"svelte-6nx075",code:'textarea.svelte-6nx075 {flex:1;resize:none;font-family:"Courier New", Courier, monospace;padding:10px;}button.svelte-6nx075 {display:inline-flex;align-items:center;gap:5px;}.container.svelte-6nx075 {display:flex;flex-direction:column;height:100%;gap:5px;}'};function va(e,t){C(t,!0),Ye(e,ca);let r=H(oe(t.FS.readFile(Ze.path,{encoding:"utf8"}))),n=H(!1);async function l(){T(n,!0),t.FS.writeFile(Ze.path,m(r));try{await Ke(t.FS)}catch(g){console.log(g)}finally{T(n,!1)}}function a(){Ze.path=null}var i=fa(),u=E(i),o=E(u);o.__click=a;var v=E(o);Kr(v,{});var c=P(o,2);c.__click=l;var s=E(c);zl(s,{});var f=P(s,2);{var d=g=>{var b=Mr("Saving...");S(g,b)},h=g=>{var b=Mr("Save");S(g,b)};se(f,g=>{m(n)?g(d):g(h,!1)})}var p=P(u,2);lt(()=>c.disabled=m(n)),Mt(p,()=>m(r),g=>T(r,g)),S(e,i),M()}ct(["click"]);var da=le("<!> <!>",1),_a=le('<div class="container svelte-16i5dfx"><!></div>');const ha={hash:"svelte-16i5dfx",code:".container.svelte-16i5dfx {padding:5px;height:calc(100% - 10px);}"};function ga(e,t){C(t,!0),Ye(e,ha);let n=Pe(t,"options",19,()=>({}))().initialDir||t.FS.cwd();try{t.FS.chdir(n)}catch{console.log("Invalid `initialDir` value, using default value."),n=t.FS.cwd()}finally{I.path=n}let l=Re(()=>t.FS.analyzePath(I.path)),a=Re(()=>m(l).parentPath),i=Re(()=>{const s=m(l).object.contents;return s?Object.values(s):[]});var u=_a(),o=E(u);{var v=s=>{va(s,{get FS(){return t.FS}})},c=s=>{var f=da(),d=O(f);ta(d,{get FS(){return t.FS},get dirParent(){return m(a)}});var h=P(d,2);sa(h,{get FS(){return t.FS},get dirContent(){return m(i)}}),S(s,f)};se(o,s=>{Ze.path!==null?s(v):s(c,!1)})}S(e,u),M()}function pa(e,t,r){vl(ga,{target:e,props:{FS:t,options:r}})}return pa}();