import{L as N,h as x,M as B,$ as K,aj as z,O as H,Y as G,W as J,a8 as T,ak as Q,H as V,i as M,J as W,ab as R,t as A,al as Z,D as S,l as b,am as X,an as Y,ao as k,K as g,F as ee,ap as I,Q as m,aq as $,ar as _,as as U,at as E,au as re,o as ne,av as se,aw as ie,ax as ue,ay as te,az as ae,aA as fe,aB as le,aC as oe,aD as ce,aE as pe}from"./Dv3HkdC9.js";import{B as j}from"./DrRuuZ2w.js";import{s as de,g as _e}from"./BZ7Yv_l3.js";function Oe(e,r,s=!1){x&&B();var n=new j(e),i=s?K:0;function u(f,a){if(x){const h=z(e)===H;if(f===h){var l=G();J(l),n.anchor=l,T(!1),n.ensure(f,a),T(!0);return}}n.ensure(f,a)}N(()=>{var f=!1;r((a,l=!0)=>{f=!0,u(l,a)}),f||u(!1,null)},i)}function Re(e,r,s){x&&B();var n=new j(e);N(()=>{var i=r()??null;n.ensure(i,i&&(u=>s(u,i)))},K)}function L(e,r){return e===r||e?.[R]===r}function ge(e={},r,s,n){return Q(()=>{var i,u;return V(()=>{i=u,u=[],M(()=>{e!==s(...u)&&(r(e,...u),i&&L(s(...i),e)&&r(null,...i))})}),()=>{W(()=>{u&&L(s(...u),e)&&r(null,...u)})}}),e}let v=!1,O=Symbol();function ye(e,r,s){const n=s[r]??={store:null,source:Z(void 0),unsubscribe:A};if(S&&(n.source.label=r),n.store!==e&&!(O in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=A;else{var i=!0;n.unsubscribe=de(e,u=>{i?n.source.v=u:Y(n.source,u)}),i=!1}return e&&O in s?_e(e):b(n.source)}function De(e,r){return e.set(r),r}function Te(){const e={};function r(){X(()=>{for(var s in e)e[s].unsubscribe();k(e,O,{enumerable:!1,value:!0})})}return[e,r]}function Ae(){v=!0}function ve(e){var r=v;try{return v=!1,[e(),v]}finally{v=r}}const be={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return S&&pe(`${e.name}.${String(r)}`),!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Ie(e,r,s){return new Proxy(S?{props:e,exclude:r,name:s,other:{},to_proxy:[]}:{props:e,exclude:r},be)}const he={get(e,r){if(!e.exclude.includes(r))return b(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=g;try{m(e.parent_effect),e.special[r]=Se({get[r](){return e.props[r]}},r,$)}finally{m(n)}}return e.special[r](s),I(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),I(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function me(e,r){return new Proxy({props:e,exclude:r,special:{},version:ee(0),parent_effect:g},he)}const Pe={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(_(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let i=e.props[n];_(i)&&(i=i());const u=E(i,r);if(u&&u.set)return u.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(_(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const i=E(n,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,r){if(r===R||r===U)return!1;for(let s of e.props)if(_(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(_(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function Le(...e){return new Proxy({props:e},Pe)}function Se(e,r,s,n){var i=!fe||(s&le)!==0,u=(s&ae)!==0,f=(s&ce)!==0,a=n,l=!0,h=()=>(l&&(l=!1,a=f?M(n):n),a),p;if(u){var q=R in e||U in e;p=E(e,r)?.set??(q&&r in e?t=>e[r]=t:void 0)}var d,y=!1;u?[d,y]=ve(()=>e[r]):d=e[r],d===void 0&&n!==void 0&&(d=h(),p&&(i&&re(r),p(d)));var o;if(i?o=()=>{var t=e[r];return t===void 0?h():(l=!0,t)}:o=()=>{var t=e[r];return t!==void 0&&(a=void 0),t===void 0?a:t},i&&(s&$)===0)return o;if(p){var C=e.$$legacy;return(function(t,P){return arguments.length>0?((!i||!P||C||y)&&p(P?o():t),t):o()})}var w=!1,c=((s&oe)!==0?ne:se)(()=>(w=!1,o()));S&&(c.label=r),u&&b(c);var F=g;return(function(t,P){if(arguments.length>0){const D=P?b(c):i&&u?ie(t):t;return Y(c,D),w=!0,a!==void 0&&(a=D),t}return ue&&w||(F.f&te)!==0?c.v:b(c)})}export{Te as a,ge as b,Re as c,De as d,Le as e,Oe as i,me as l,Ae as m,Se as p,Ie as r,ye as s};
