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