Buckets:

download
raw
1.81 kB
import{r as u,d as c,p as b,c as _,a as p,e as g,h as o,f as v,m as k,s as y,b as w,g as A,E,i as F,j as M,k as x,l as m}from"./D7Ar9kO9.js";class T{anchor;#t=new Map;#s=new Map;#e=new Map;#a=new Set;#i=!0;constructor(t,s=!0){this.anchor=t,this.#i=s}#r=t=>{if(this.#t.has(t)){var s=this.#t.get(t),e=this.#s.get(s);if(e)u(e),this.#a.delete(s);else{var i=this.#e.get(s);i&&(u(i.effect),this.#s.set(s,i.effect),this.#e.delete(s),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),e=i.effect)}for(const[r,f]of this.#t){if(this.#t.delete(r),r===t)break;const a=this.#e.get(f);a&&(c(a.effect),this.#e.delete(f))}for(const[r,f]of this.#s){if(r===s||this.#a.has(r))continue;const a=()=>{if(Array.from(this.#t.values()).includes(r)){var h=document.createDocumentFragment();k(f,h),h.append(_()),this.#e.set(r,{effect:f,fragment:h})}else c(f);this.#a.delete(r),this.#s.delete(r)};this.#i||!e?(this.#a.add(r),b(f,a,!1)):a()}}};#f=t=>{this.#t.delete(t);const s=Array.from(this.#t.values());for(const[e,i]of this.#e)s.includes(e)||(c(i.effect),this.#e.delete(e))};ensure(t,s){var e=g,i=y();if(s&&!this.#s.has(t)&&!this.#e.has(t))if(i){var r=document.createDocumentFragment(),f=_();r.append(f),this.#e.set(t,{effect:p(()=>s(f)),fragment:r})}else this.#s.set(t,p(()=>s(this.anchor)));if(this.#t.set(e,t),i){for(const[a,n]of this.#s)a===t?e.unskip_effect(n):e.skip_effect(n);for(const[a,n]of this.#e)a===t?e.unskip_effect(n.effect):e.skip_effect(n.effect);e.oncommit(this.#r),e.ondiscard(this.#f)}else o&&(this.anchor=v),this.#r(e)}}function C(d,t,s=!1){var e;o&&(e=v,A());var i=new T(d),r=s?E:0;function f(a,n){if(o){var h=F(e);if(a!==parseInt(h.substring(1))){var l=M();x(l),i.anchor=l,m(!1),i.ensure(a,n),m(!0);return}}i.ensure(a,n)}w(()=>{var a=!1;t((n,h=0)=>{a=!0,f(h,n)}),a||f(-1,null)},r)}export{T as B,C as i};

Xet Storage Details

Size:
1.81 kB
·
Xet hash:
70610f234b3f06869255276c4ee49829b96ae7e48815c747a2595d4c5c8d30ae

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.