import{i as R,h as I,v as y,E as B,w as L,x as m,y as D,z as A,e as M,A as N,B as x,C as P,D as Y,F as w,G as C,H as F,I as z,J as G,S as U,L as $,K as q,g as H,P as J,M as K,N as Z,O as j}from"./cmir96ab.js";import{B as p}from"./BzW65lvF.js";let g=!1;function Q(e){var a=g;try{return g=!1,[e(),g]}finally{g=a}}function X(e,a,u=!1){var s;I&&(s=M,y());var i=new p(e),h=u?B:0;function f(n,_){if(I){var t=L(s);if(n!==parseInt(t.substring(1))){var c=m();D(c),i.anchor=c,A(!1),i.ensure(n,_),A(!0);return}}i.ensure(n,_)}R(()=>{var n=!1;a((_,t=0)=>{n=!0,f(t,_)}),n||f(-1,null)},h)}function k(e,a,u,s){var i=(u&j)!==0,h=(u&Z)!==0,f=s,n=!0,_=()=>(n&&(n=!1,f=h?H(s):s),f);let t;if(i){var c=U in e||$ in e;t=N(e,a)?.set??(c&&a in e?r=>e[a]=r:void 0)}var d,b=!1;i?[d,b]=Q(()=>e[a]):d=e[a],d===void 0&&s!==void 0&&(d=_(),t&&(x(),t(d)));var v;if(v=()=>{var r=e[a];return r===void 0?_():(n=!0,r)},(u&J)===0)return v;if(t){var T=e.$$legacy;return(function(r,o){return arguments.length>0?((!o||T||b)&&t(o?v():r),r):v()})}var S=!1,l=((u&K)!==0?G:q)(()=>(S=!1,v()));i&&P(l);var O=F;return(function(r,o){if(arguments.length>0){const E=o?P(l):i?Y(r):r;return w(l,E),S=!0,f!==void 0&&(f=E),r}return C&&S||(O.f&z)!==0?l.v:P(l)})}export{X as i,k as p};
