import{u as ee,o as ae,O as z,l as b,h as w,m as re,b as ne,g as X,P as ie,Q as fe,R as B,v as D,i as R,S as le,x as F,q as G,w as se,T as M,U as J,V as ue,d as P,W as k,X as Q,Y as y,Z as te,_ as W,a0 as ve,a1 as de,a2 as _e,a3 as oe,a4 as ce,y as he,a5 as Ee,j as pe}from"./DNoLdQ8h.js";function me(l,e){return e}function Te(l,e,a,u){for(var v=[],_=e.length,t=0;t<_;t++)_e(e[t].e,v,!0);var o=_>0&&v.length===0&&a!==null;if(o){var T=a.parentNode;oe(T),T.append(a),u.clear(),m(l,e[0].prev,e[_-1].next)}ce(v,()=>{for(var h=0;h<_;h++){var d=e[h];o||(u.delete(d.k),m(l,d.prev,d.next)),he(d.e,!o)}})}function we(l,e,a,u,v,_=null){var t=l,o={flags:e,items:new Map,first:null},T=(e&z)!==0;if(T){var h=l;t=w?b(re(h)):h.appendChild(ee())}w&&ne();var d=null,C=!1,i=ie(()=>{var s=a();return ve(s)?s:s==null?[]:J(s)});ae(()=>{var s=X(i),r=s.length;if(C&&r===0)return;C=r===0;let x=!1;if(w){var E=t.data===fe;E!==(r===0)&&(t=B(),b(t),D(!1),x=!0)}if(w){for(var p=null,A,c=0;c<r;c++){if(R.nodeType===8&&R.data===le){t=R,x=!0,D(!1);break}var n=s[c],f=u(n,c);A=K(R,o,p,null,n,f,c,v,e,a),o.items.set(f,A),p=A}r>0&&b(B())}w||Ae(s,o,t,v,e,u,a),_!==null&&(r===0?d?F(d):d=G(()=>_(t)):d!==null&&se(d,()=>{d=null})),x&&D(!0),X(i)}),w&&(t=R)}function Ae(l,e,a,u,v,_,t){var L,q,V,Y;var o=(v&de)!==0,T=(v&(k|y))!==0,h=l.length,d=e.items,C=e.first,i=C,s,r=null,x,E=[],p=[],A,c,n,f;if(o)for(f=0;f<h;f+=1)A=l[f],c=_(A,f),n=d.get(c),n!==void 0&&((L=n.a)==null||L.measure(),(x??(x=new Set)).add(n));for(f=0;f<h;f+=1){if(A=l[f],c=_(A,f),n=d.get(c),n===void 0){var $=i?i.e.nodes_start:a;r=K($,e,r,r===null?e.first:r.next,A,c,f,u,v,t),d.set(c,r),E=[],p=[],i=r.next;continue}if(T&&xe(n,A,f,v),(n.e.f&M)!==0&&(F(n.e),o&&((q=n.a)==null||q.unfix(),(x??(x=new Set)).delete(n))),n!==i){if(s!==void 0&&s.has(n)){if(E.length<p.length){var S=p[0],I;r=S.prev;var O=E[0],g=E[E.length-1];for(I=0;I<E.length;I+=1)Z(E[I],S,a);for(I=0;I<p.length;I+=1)s.delete(p[I]);m(e,O.prev,g.next),m(e,r,O),m(e,g,S),i=S,r=g,f-=1,E=[],p=[]}else s.delete(n),Z(n,i,a),m(e,n.prev,n.next),m(e,n,r===null?e.first:r.next),m(e,r,n),r=n;continue}for(E=[],p=[];i!==null&&i.k!==c;)(i.e.f&M)===0&&(s??(s=new Set)).add(i),p.push(i),i=i.next;if(i===null)continue;n=i}E.push(n),r=n,i=n.next}if(i!==null||s!==void 0){for(var N=s===void 0?[]:J(s);i!==null;)(i.e.f&M)===0&&N.push(i),i=i.next;var H=N.length;if(H>0){var j=(v&z)!==0&&h===0?a:null;if(o){for(f=0;f<H;f+=1)(V=N[f].a)==null||V.measure();for(f=0;f<H;f+=1)(Y=N[f].a)==null||Y.fix()}Te(e,N,j,d)}}o&&ue(()=>{var U;if(x!==void 0)for(n of x)(U=n.a)==null||U.apply()}),P.first=e.first&&e.first.e,P.last=r&&r.e}function xe(l,e,a,u){(u&k)!==0&&Q(l.v,e),(u&y)!==0?Q(l.i,a):l.i=a}function K(l,e,a,u,v,_,t,o,T,h){var d=(T&k)!==0,C=(T&Ee)===0,i=d?C?te(v):W(v):v,s=(T&y)===0?t:W(t),r={i:s,v:i,k:_,a:null,e:null,prev:a,next:u};try{return r.e=G(()=>o(l,i,s,h),w),r.e.prev=a&&a.e,r.e.next=u&&u.e,a===null?e.first=r:(a.next=r,a.e.next=r.e),u!==null&&(u.prev=r,u.e.prev=r.e),r}finally{}}function Z(l,e,a){for(var u=l.next?l.next.e.nodes_start:a,v=e?e.e.nodes_start:a,_=l.e.nodes_start;_!==u;){var t=pe(_);v.before(_),_=t}}function m(l,e,a){e===null?l.first=a:(e.next=a,e.e.next=a&&a.e),a!==null&&(a.prev=e,a.e.prev=e&&e.e)}export{we as e,me as i};
