var ve,m,Mt,Ze,Q,$t,Wt,Je,et,Qe,Xe,Ht,de={},Ft=[],Dr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,tt=Array.isArray;function A(e,t){for(var r in t)e[r]=t[r];return e}function At(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function R(e,t,r){var n,i,o,s={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ve.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return he(e,s,n,i,null)}function he(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Mt,__i:-1,__u:0};return i==null&&m.vnode!=null&&m.vnode(o),o}function Be(e){return e.children}function se(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(e.__,e.__i+1):null;for(var r;tt&&Q.sort(Je));$e.__r=0}function jt(e,t,r,n,i,o,s,f,u,c,l){var a,h,p,w,P,d=n&&n.__k||Ft,_=t.length;for(r.__d=u,Gr(r,t,d),u=r.__d,a=0;a<_;a++)(p=r.__k[a])!=null&&(h=p.__i===-1?de:d[p.__i]||de,p.__i=a,rt(e,p,h,i,o,s,f,u,c,l),w=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&nt(h.ref,null,p),l.push(p.ref,p.__c||w,p)),P==null&&w!=null&&(P=w),65536&p.__u||h.__k===p.__k?u=Vt(p,u,e):typeof p.type=="function"&&p.__d!==void 0?u=p.__d:w&&(u=w.nextSibling),p.__d=void 0,p.__u&=-196609);r.__d=u,r.__e=P}function Gr(e,t,r){var n,i,o,s,f,u=t.length,c=r.length,l=c,a=0;for(e.__k=[],n=0;n0?he(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,(f=i.__i=Or(i,r,s,l))!==-1&&(l--,(o=r[f])&&(o.__u|=131072)),o==null||o.__v===null?(f==-1&&a--,typeof i.type!="function"&&(i.__u|=65536)):f!==s&&(f==s-1?a--:f==s+1?a++:(f>s?a--:a++,i.__u|=65536))):i=e.__k[n]=null;if(l)for(n=0;n(u!=null&&(131072&u.__u)==0?1:0))for(;s>=0||f=0){if((u=t[s])&&(131072&u.__u)==0&&i==u.key&&o===u.type)return s;s--}if(f2&&(f.children=arguments.length>3?ve.call(arguments,2):r),he(e.type,f,n||e.key,i||e.ref,null)}function Jt(e,t){var r={__c:t="__cC"+Ht++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(f){f.__e=!0,Ye(f)})},this.sub=function(s){i.push(s);var f=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.splice(i.indexOf(s),1),f&&f.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}ve=Ft.slice,m={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(f){e=f}throw e}},Mt=0,Ze=function(e){return e!=null&&e.constructor==null},se.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=A({},this.state),typeof e=="function"&&(e=e(A({},r),this.props)),e&&A(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ye(this))},se.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ye(this))},se.prototype.render=Be,Q=[],Wt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Je=function(e,t){return e.__v.__b-t.__v.__b},$e.__r=0,et=0,Qe=qt(!1),Xe=qt(!0),Ht=0;var X,y,st,Qt,me=0,ir=[],b=m,Xt=b.__b,Yt=b.__r,Zt=b.diffed,er=b.__c,tr=b.unmount,rr=b.__;function ge(e,t){b.__h&&b.__h(y,e,me||t),me=0;var r=y.__H||(y.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function qr(e){return me=1,Mr(sr,e)}function Mr(e,t,r){var n=ge(X++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):sr(void 0,t),function(f){var u=n.__N?n.__N[0]:n.__[0],c=n.t(u,f);u!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=y,!y.u)){var i=function(f,u,c){if(!n.__c.__H)return!0;var l=n.__c.__H.__.filter(function(h){return!!h.__c});if(l.every(function(h){return!h.__N}))return!o||o.call(this,f,u,c);var a=!1;return l.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(a=!0)}}),!(!a&&n.__c.props===f)&&(!o||o.call(this,f,u,c))};y.u=!0;var o=y.shouldComponentUpdate,s=y.componentWillUpdate;y.componentWillUpdate=function(f,u,c){if(this.__e){var l=o;o=void 0,i(f,u,c),o=l}s&&s.call(this,f,u,c)},y.shouldComponentUpdate=i}return n.__N||n.__}function ye(e,t){var r=ge(X++,3);!b.__s&&ft(r.__H,t)&&(r.__=e,r.i=t,y.__H.__h.push(r))}function or(e,t){var r=ge(X++,4);!b.__s&&ft(r.__H,t)&&(r.__=e,r.i=t,y.__h.push(r))}function V(e){return me=5,L(function(){return{current:e}},[])}function L(e,t){var r=ge(X++,7);return ft(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Me(e,t){return me=8,L(function(){return e},t)}function we(e){var t=y.context[e.__c],r=ge(X++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(y)),t.props.value):e.__}function Wr(){for(var e;e=ir.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(qe),e.__H.__h.forEach(at),e.__H.__h=[]}catch(t){e.__H.__h=[],b.__e(t,e.__v)}}b.__b=function(e){y=null,Xt&&Xt(e)},b.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),rr&&rr(e,t)},b.__r=function(e){Yt&&Yt(e),X=0;var t=(y=e.__c).__H;t&&(st===y?(t.__h=[],y.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(qe),t.__h.forEach(at),t.__h=[],X=0)),st=y},b.diffed=function(e){Zt&&Zt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ir.push(t)!==1&&Qt===b.requestAnimationFrame||((Qt=b.requestAnimationFrame)||Hr)(Wr)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),st=y=null},b.__c=function(e,t){t.some(function(r){try{r.__h.forEach(qe),r.__h=r.__h.filter(function(n){return!n.__||at(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],b.__e(n,r.__v)}}),er&&er(e,t)},b.unmount=function(e){tr&&tr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{qe(n)}catch(i){t=i}}),r.__H=void 0,t&&b.__e(t,r.__v))};var nr=typeof requestAnimationFrame=="function";function Hr(e){var t,r=function(){clearTimeout(n),nr&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);nr&&(t=requestAnimationFrame(r))}function qe(e){var t=y,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),y=t}function at(e){var t=y;e.__c=e.__(),y=t}function ft(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function sr(e,t){return typeof t=="function"?t(e):t}var Fr=Symbol.for("preact-signals");function He(){if(z>1)z--;else{for(var e,t=!1;be!==void 0;){var r=be;for(be=void 0,ct++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&fr(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(ct=0,z--,t)throw e}}function Y(e){if(z>0)return e();z++;try{return e()}finally{He()}}var g=void 0;var be=void 0,z=0,ct=0,We=0;function ar(e){if(g!==void 0){var t=e.n;if(t===void 0||t.t!==g)return t={i:0,S:e,p:g.s,n:void 0,t:g,e:void 0,x:void 0,r:t},g.s!==void 0&&(g.s.n=t),g.s=t,e.n=t,32&g.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=g.s,t.n=void 0,g.s.n=t,g.s=t),t}}function E(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}E.prototype.brand=Fr;E.prototype.h=function(){return!0};E.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};E.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};E.prototype.subscribe=function(e){var t=this;return Z(function(){var r=t.value,n=g;g=void 0;try{e(r)}finally{g=n}})};E.prototype.valueOf=function(){return this.value};E.prototype.toString=function(){return this.value+""};E.prototype.toJSON=function(){return this.value};E.prototype.peek=function(){var e=g;g=void 0;try{return this.value}finally{g=e}};Object.defineProperty(E.prototype,"value",{get:function(){var e=ar(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(ct>100)throw new Error("Cycle detected");this.v=e,this.i++,We++,z++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{He()}}}});function U(e){return new E(e)}function fr(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function cr(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ur(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function ce(e){E.call(this,void 0),this.x=e,this.s=void 0,this.g=We-1,this.f=4}(ce.prototype=new E).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===We))return!0;if(this.g=We,this.f|=1,this.i>0&&!fr(this))return this.f&=-2,!0;var e=g;try{cr(this),g=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return g=e,ur(this),this.f&=-2,!0};ce.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}E.prototype.S.call(this,e)};ce.prototype.U=function(e){if(this.t!==void 0&&(E.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};ce.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(ce.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=ar(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Se(e){return new ce(e)}function lr(e){var t=e.u;if(e.u=void 0,typeof t=="function"){z++;var r=g;g=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,ut(e),n}finally{g=r,He()}}}function ut(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,lr(e)}function Ar(e){if(g!==this)throw new Error("Out-of-order effect");ur(this),g=e,this.f&=-2,8&this.f&&ut(this),He()}function xe(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}xe.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};xe.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,lr(this),cr(this),z++;var e=g;return g=this,Ar.bind(this,e)};xe.prototype.N=function(){2&this.f||(this.f|=2,this.o=be,be=this)};xe.prototype.d=function(){this.f|=8,1&this.f||ut(this)};function Z(e){var t=new xe(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var pt,lt;function ue(e,t){m[e]=t.bind(null,m[e]||function(){})}function Fe(e){lt&<(),lt=e&&e.S()}function pr(e){var t=this,r=e.data,n=jr(r);n.value=r;var i=L(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Ze(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},Se(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}pr.displayName="_st";Object.defineProperties(E.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:pr},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});ue("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof E&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)});ue("__r",function(e,t){Fe();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=(function(i){var o;return Z(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o})())),pt=n,Fe(r),e(t)});ue("__e",function(e,t,r,n){Fe(),pt=void 0,e(t,r,n)});ue("diffed",function(e,t){Fe(),pt=void 0;var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var s in o){var f=o[s];f!==void 0&&!(s in n)&&(f.d(),o[s]=void 0)}else r.U=o={};for(var u in n){var c=o[u],l=n[u];c===void 0?(c=Lr(r,u,l,i),o[u]=c):c.o(l,i)}}}e(t)});function Lr(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=U(r);return{o:function(s,f){o.value=s,n=f},d:Z(function(){var s=o.value.value;n[t]!==s&&(n[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}ue("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var s=t.__c;if(s){var f=s.__$u;f&&(s.__$u=void 0,f.d())}}e(t)});ue("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});se.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function jr(e){return L(function(){return U(e)},[])}var _t=[],q=()=>_t.slice(-1)[0],M=e=>{_t.push(e)},W=()=>{_t.pop()};var ht=[],D=()=>ht.slice(-1)[0],ee=e=>{ht.push(e)},j=()=>{ht.pop()};var Vr=e=>D().context[e||q()],zr=()=>{let e=D(),t={},{ref:r,attributes:n}=e;return Object.freeze({ref:r.current,attributes:H(n,t)})};function dt(e){let t=D();return dt.subscribe=te.value,t.serverContext[e||q()]}dt.subscribe=0;var Kr=e=>new Promise(t=>{let r=()=>{clearTimeout(n),window.cancelAnimationFrame(i),setTimeout(()=>{e(),t()})},n=setTimeout(r,100),i=window.requestAnimationFrame(r)}),re=typeof window.scheduler?.yield=="function"?window.scheduler.yield.bind(window.scheduler):()=>new Promise(e=>{setTimeout(e,0)});function Jr(e,t){let r=()=>{},n=Z(function(){return r=this.c.bind(this),this.x=e,this.c=t,e()});return{flush:r,dispose:n}}function Qr(e){ye(()=>{let t=null,r=!1;return t=Jr(e,async()=>{t&&!r&&(r=!0,await Kr(t.flush),r=!1)}),t.dispose},[])}function O(e){let t=D(),r=q(),n;if(e?.constructor?.name==="GeneratorFunction"?n=async(...o)=>{let s=e(...o),f,u,c;for(;;){M(r),ee(t);try{u=c?s.throw(c):s.next(f),c=void 0}catch(l){throw l}finally{j(),W()}try{f=await u.value}catch(l){c=l}if(u.done){if(c)throw c;break}}return f}:n=(...o)=>{M(r),ee(t);try{return e(...o)}finally{W(),j()}},e.sync){let o=n;return o.sync=!0,o}return n}function mt(e){Qr(O(e))}function K(e){ye(O(e),[])}function Xr(e,t){ye(O(e),t)}function Yr(e,t){or(O(e),t)}function Zr(e,t){return Me(O(e),t)}function en(e,t){return L(O(e),t)}var _r=(e,t)=>{t=[].concat(t);let r=t[t.length-1].nextSibling;function n(i,o){e.insertBefore(i,o||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild(i){e.removeChild(i)},contains(i){e.contains(i)}}};function hr(e){return e.replace(/^-+|-+$/g,"").toLowerCase().replace(/-([a-z])/g,function(t,r){return r.toUpperCase()})}var gt=e=>{},T=e=>!!(e&&typeof e=="object"&&e.constructor===Object);function tn(e){let t=e;return t.sync=!0,t}var vt=new WeakMap,rn=e=>{let t=()=>!1;return{get(r,n){let i=r[n];return i&&typeof i=="object"?H(i,{errorMessage:e}):i},set:t,deleteProperty:t,defineProperty:t}};function H(e,t){let r=t?.errorMessage??"Cannot modify read-only object";if(!vt.has(e)){let n=rn(r);vt.set(e,new Proxy(e,n))}return vt.get(e)}var te=U(0);var Ae=new WeakMap,dr=new WeakMap,yt=new WeakMap,nn=new Set([Object,Array]),Le=(e,t,r)=>{if(!ne(t))throw Error("This object cannot be proxified.");if(!Ae.has(t)){let n=new Proxy(t,r);Ae.set(t,n),dr.set(n,t),yt.set(n,e)}return Ae.get(t)},je=e=>Ae.get(e),$=e=>yt.get(e),ne=e=>typeof e!="object"||e===null?!1:!yt.has(e)&&nn.has(e.constructor),vr=e=>dr.get(e);var on={},mr=class{owner;computedsByScope;valueSignal;getterSignal;pendingGetter;constructor(e){this.owner=e,this.computedsByScope=new WeakMap}setValue(e){this.update({value:e})}setGetter(e){this.update({get:e})}setPendingGetter(e){this.pendingGetter=e,queueMicrotask(()=>this.consolidateGetter())}consolidateGetter(){let e=this.pendingGetter;e&&(this.pendingGetter=void 0,this.update({get:e}))}getComputed(){let e=D()||on;if(!this.valueSignal&&!this.getterSignal&&this.update({}),this.pendingGetter&&this.consolidateGetter(),!this.computedsByScope.has(e)){let t=()=>{let r=this.getterSignal?.value;return r?r.call(this.owner):this.valueSignal?.value};M($(this.owner)),this.computedsByScope.set(e,Se(O(t))),W()}return this.computedsByScope.get(e)}update({get:e,value:t}){this.valueSignal?(t!==this.valueSignal.peek()||e!==this.getterSignal.peek())&&Y(()=>{this.valueSignal.value=t,this.getterSignal.value=e}):(this.valueSignal=U(t),this.getterSignal=U(e))}};var sn=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(e=>typeof e=="symbol")),le=new WeakMap,an=(e,t)=>le.has(e)&&le.get(e).has(t),Ee=(e,t,r)=>{le.has(e)||le.set(e,new Map),t=typeof t=="number"?`${t}`:t;let n=le.get(e);if(!n.has(t)){let i=$(e),o=new mr(e);if(n.set(t,o),r){let{get:s,value:f}=r;s?o.setGetter(s):o.setValue(ne(f)?G(i,f):f)}}return n.get(t)},F=new WeakMap,wt=!1,k=Symbol("PENDING_GETTER"),fn={get(e,t,r){if(wt||!e.hasOwnProperty(t)&&t in e||typeof t=="symbol"&&sn.has(t))return Reflect.get(e,t,r);let n=Object.getOwnPropertyDescriptor(e,t),o=Ee(r,t,n).getComputed().value;if(o===k)throw k;if(typeof o=="function"){let s=$(r);return(...f)=>{M(s);try{return o.call(r,...f)}finally{W()}}}return o},set(e,t,r,n){M($(n));try{return Reflect.set(e,t,r,n)}finally{W()}},defineProperty(e,t,r){let n=!(t in e),i=Reflect.defineProperty(e,t,r);if(i){let o=je(e),s=Ee(o,t),{get:f,value:u}=r;if(f)s.setGetter(f);else{let c=$(o);s.setValue(ne(u)?G(c,u):u)}n&&F.has(e)&&F.get(e).value++,Array.isArray(e)&&le.get(o)?.has("length")&&Ee(o,"length").setValue(e.length)}return i},deleteProperty(e,t){let r=Reflect.deleteProperty(e,t);return r&&(Ee(je(e),t).setValue(void 0),F.has(e)&&F.get(e).value++),r},ownKeys(e){return F.has(e)||F.set(e,U(0)),F._=F.get(e).value,Reflect.ownKeys(e)}},G=(e,t)=>Le(e,t,fn),St=(e,t)=>{wt=!0;try{return e[t]}finally{wt=!1}},bt=(e,t,r=!0)=>{if(!(T(e)&&T(t)))return;let n=!1;for(let i in t){let o=!(i in e);n=n||o;let s=Object.getOwnPropertyDescriptor(t,i),f=je(e),u=!!f&&an(f,i)&&Ee(f,i);if(typeof s.get=="function"||typeof s.set=="function")(r||o)&&(Object.defineProperty(e,i,{...s,configurable:!0,enumerable:!0}),s.get&&u&&u.setPendingGetter(s.get));else if(T(t[i])){let c=Object.getOwnPropertyDescriptor(e,i)?.value;if(o||r&&!T(c)){if(e[i]={},u){let l=$(f);u.setValue(G(l,e[i]))}bt(e[i],t[i],r)}else T(c)&&bt(e[i],t[i],r)}else if((r||o)&&(Object.defineProperty(e,i,s),u)){let{value:c}=s,l=$(f);u.setValue(ne(c)?G(l,c):c)}}n&&F.has(e)&&F.get(e).value++},ie=(e,t,r=!0)=>Y(()=>bt(vr(e)||e,t,r));var gr=new WeakSet,cn={get:(e,t,r)=>{let n=Reflect.get(e,t),i=$(r);if(typeof n>"u"&&gr.has(r)){let o={};return Reflect.set(e,t,o),Pe(i,o,!1)}if(typeof n=="function"){M(i);let o=O(n);return W(),o}return T(n)&&ne(n)?Pe(i,n,!1):n}},Pe=(e,t,r=!0)=>{let n=Le(e,t,cn);return n&&r&&gr.add(n),n};var xt=new WeakMap,pe=new WeakMap,yr=new WeakSet,wr=Reflect.getOwnPropertyDescriptor,un={get:(e,t)=>{let r=pe.get(e),n=e[t];return t in e?n:r[t]},set:(e,t,r)=>{let n=pe.get(e),i=t in e||!(t in n)?e:n;return i[t]=r,!0},ownKeys:e=>[...new Set([...Object.keys(pe.get(e)),...Object.keys(e)])],getOwnPropertyDescriptor:(e,t)=>wr(e,t)||wr(pe.get(e),t),has:(e,t)=>Reflect.has(e,t)||Reflect.has(pe.get(e),t)},Te=(e,t={})=>{if(yr.has(e))throw Error("This object cannot be proxified.");if(pe.set(e,t),!xt.has(e)){let r=new Proxy(e,un);xt.set(e,r),yr.add(r)}return xt.get(e)};var Ie=new Map,br=new Map,Ve=new Map,Et=new Map,Ce=new Map,ln=e=>Et.get(e||q())||{};function Pt(e){let t=e||q();return Ce.has(t)||Ce.set(t,H({})),Pt.subscribe=te.value,Ce.get(t)}Pt.subscribe=0;var oe="I acknowledge that using a private store means my plugin will inevitably break on the next store release.";function ke(e,{state:t={},...r}={},{lock:n=!1}={}){if(Ie.has(e)){if(n!==oe&&!Ve.has(e))Ve.set(e,n);else{let o=Ve.get(e);if(!(n===oe||n!==!0&&n===o))throw Error(o?"Cannot unlock a private store with an invalid lock code":"Cannot lock a public store")}let i=br.get(e);ie(i,r),ie(i.state,t)}else{n!==oe&&Ve.set(e,n);let i={state:G(e,T(t)?t:{}),...r},o=Pe(e,i);br.set(e,i),Ie.set(e,o)}return Ie.get(e)}var Tt=(e=document)=>{let t=e.getElementById("wp-script-module-data-@wordpress/interactivity")??e.getElementById("wp-interactivity-data");if(t?.textContent)try{return JSON.parse(t.textContent)}catch{}return{}},It=e=>{Ce.clear(),Et.clear(),T(e?.state)&&Object.entries(e.state).forEach(([t,r])=>{let n=ke(t,{},{lock:oe});ie(n.state,r,!1),Ce.set(t,H(r))}),T(e?.config)&&Object.entries(e.config).forEach(([t,r])=>{Et.set(t,r)}),T(e?.derivedStateClosures)&&Object.entries(e.derivedStateClosures).forEach(([t,r])=>{let n=ke(t,{},{lock:oe});r.forEach(i=>{let o=i.split("."),s=o.splice(-1,1)[0],f=o.reduce((c,l)=>St(c,l),n),u=Object.getOwnPropertyDescriptor(f,s);T(u?.value)&&(f[s]=k)})}),te.value+=1},pn=Tt();It(pn);function J(e){return e.suffix!==null}function _e(e){return e.suffix===null}var Sr=Jt({client:{},server:{}}),Ct={},Er={},S=(e,t,{priority:r=10}={})=>{Ct[e]=t,Er[e]=r},_n=(e,t)=>{if(!t){gt(`Namespace missing for "${e}". The value for that path won't be resolved.`);return}let r=Ie.get(t);typeof r>"u"&&(r=ke(t,{},{lock:oe}));let n={...r,context:D().context[t]};try{return e.split(".").reduce((o,s)=>o[s],n)}catch(i){if(i===k)return k}},kt=({scope:e})=>((t,...r)=>{let{value:n,namespace:i}=t;if(typeof n!="string")throw new Error("The `value` prop should be a string path");let o=n[0]==="!"&&!!(n=n.slice(1));ee(e);let s=_n(n,i);if(typeof s=="function"){if(o){gt("Using a function with a negation operator is deprecated and will stop working in WordPress 6.9. Please use derived state instead.");let c=!s(...r);return j(),c}j();let u=(...c)=>{ee(e);let l=s(...c);return j(),l};if(s.sync){let c=u;c.sync=!0}return u}let f=s;return j(),o&&s!==k?!f:f}),hn=e=>{let t=Object.keys(e).reduce((r,n)=>{if(Ct[n]){let i=Er[n];(r[i]=r[i]||[]).push(n)}return r},{});return Object.entries(t).sort(([r],[n])=>parseInt(r)-parseInt(n)).map(([,r])=>r)},Pr=({directives:e,priorityLevels:[t,...r],element:n,originalProps:i,previousScope:o})=>{let s=V({}).current;s.evaluate=Me(kt({scope:s}),[]);let{client:f,server:u}=we(Sr);s.context=f,s.serverContext=u,s.ref=o?.ref||V(null),n=fe(n,{ref:s.ref}),s.attributes=n.props;let c=r.length>0?R(Pr,{directives:e,priorityLevels:r,element:n,originalProps:i,previousScope:s}):n,l={...i,children:c},a={directives:e,props:l,element:n,context:Sr,evaluate:s.evaluate};ee(s);for(let h of t){let p=Ct[h]?.(a);p!==void 0&&(l.children=p)}return j(),l.children},xr=m.vnode;m.vnode=e=>{if(e.props.__directives){let t=e.props,r=t.__directives;r.key&&(e.key=r.key.find(_e).value),delete t.__directives;let n=hn(r);n.length>0&&(e.props={directives:r,priorityLevels:n,originalProps:t,type:e.type,element:R(e.type,t),top:!0},e.type=Pr)}xr&&xr(e)};function Nt(e){return T(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Nt(r)])):Array.isArray(e)?e.map(t=>Nt(t)):e}function Nr(e){let t={get(r,n,i){let o=r[n];switch(n){case"currentTarget":break;case"preventDefault":case"stopImmediatePropagation":case"stopPropagation":break}return o instanceof Function?function(...s){return o.apply(this===i?r:this,s)}:o}};return new Proxy(e,t)}var dn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,vn=/\/\*[^]*?\*\/| +/g,Tr=/\n+/g,Ir=" ",mn=e=>{let t=[{}],r,n;for(;r=dn.exec(e.replace(vn,""));)r[4]?t.shift():r[3]?(n=r[3].replace(Tr,Ir).trim(),t.unshift(t[0][n]=t[0][n]||{})):t[0][r[1]]=r[2].replace(Tr,Ir).trim();return t[0]},Cr=e=>({directives:t,evaluate:r})=>{t[`on-${e}`].filter(J).forEach(n=>{let o=n.suffix.split("--",2)[0];K(()=>{let s=u=>{let c=r(n);typeof c=="function"&&(c?.sync||(u=Nr(u)),c(u))},f=e==="window"?window:document;return f.addEventListener(o,s),()=>f.removeEventListener(o,s)})})},gn=(e,t,r,n,i)=>{let o={...e.client,[t]:{...e.client[t],[n]:r}},s={...D(),context:o,serverContext:e.server};return i?kt({scope:s})(i):r},yn=function*(e,t,r,n,i){let{current:o}=V(new Map);for(let s of r){let f=gn(e,t,s,n,i);o.has(f)||o.set(f,Te(G(t,{[n]:void 0}),e.client[t])),yield[s,o.get(f),f]}},kr=e=>({directives:t,evaluate:r})=>{t[`on-async-${e}`].filter(J).forEach(n=>{let i=n.suffix.split("--",1)[0];K(()=>{let o=async f=>{await re();let u=r(n);typeof u=="function"&&u(f)},s=e==="window"?window:document;return s.addEventListener(i,o,{passive:!0}),()=>s.removeEventListener(i,o)})})},Ne=new Map,Rr=()=>{S("context",({directives:{context:e},props:{children:t},context:r})=>{let n=e.filter(_e).reverse();if(!n.length)return;let{Provider:i}=r,{client:o,server:s}=we(r),f=V({}),u={},c={client:{...o},server:{...s}},l=new Set;return n.forEach(({value:a,namespace:h,uniqueId:p})=>{T(a)&&(f.current[h]||(f.current[h]=G(h,{})),ie(f.current[h],Nt(a),!1),u[h]=H(a),l.add(h))}),l.forEach(a=>{c.client[a]=Te(f.current[a],o[a]),c.server[a]=Te(u[a],s[a])}),R(i,{value:c},t)},{priority:5}),S("watch",({directives:{watch:e},evaluate:t})=>{e.forEach(r=>{mt(()=>{let n,i=t(r);return typeof i=="function"&&(i=i()),i})})}),S("init",({directives:{init:e},evaluate:t})=>{e.forEach(r=>{K(()=>{let n,i=t(r);return typeof i=="function"&&(i=i()),i})})}),S("on",({directives:{on:e},element:t,evaluate:r})=>{let n=new Map;e.filter(J).forEach(i=>{let o=i.suffix.split("--",2);n.has(o[0])||n.set(o[0],new Set),n.get(o[0]).add(i)}),n.forEach((i,o)=>{let s=t.props[`on${o}`];t.props[`on${o}`]=f=>{s&&s(f),i.forEach(u=>{let c,l=r(u);typeof l=="function"&&(l?.sync||(f=Nr(f)),l(f))})}})}),S("on-async",({directives:{"on-async":e},element:t,evaluate:r})=>{let n=new Map;e.filter(J).forEach(i=>{let o=i.suffix.split("--",1)[0];n.has(o)||n.set(o,new Set),n.get(o).add(i)}),n.forEach((i,o)=>{let s=t.props[`on${o}`];t.props[`on${o}`]=f=>{s&&s(f),i.forEach(async u=>{await re();let c=r(u);typeof c=="function"&&c(f)})}})}),S("on-window",Cr("window")),S("on-document",Cr("document")),S("on-async-window",kr("window")),S("on-async-document",kr("document")),S("class",({directives:{class:e},element:t,evaluate:r})=>{e.filter(J).forEach(n=>{let i=n.uniqueId?`${n.suffix}---${n.uniqueId}`:n.suffix,o=r(n);if(o===k)return;typeof o=="function"&&(o=o());let s=t.props.class||"",f=new RegExp(`(^|\\s)${i}(\\s|$)`,"g");o?f.test(s)||(t.props.class=s?`${s} ${i}`:i):t.props.class=s.replace(f," ").trim(),K(()=>{o?t.ref.current.classList.add(i):t.ref.current.classList.remove(i)})})}),S("style",({directives:{style:e},element:t,evaluate:r})=>{e.filter(J).forEach(n=>{if(n.uniqueId)return;let i=n.suffix,o=r(n);o!==k&&(typeof o=="function"&&(o=o()),t.props.style=t.props.style||{},typeof t.props.style=="string"&&(t.props.style=mn(t.props.style)),o?t.props.style[i]=o:delete t.props.style[i],K(()=>{o?t.ref.current.style.setProperty(i,o):t.ref.current.style.removeProperty(i)}))})}),S("bind",({directives:{bind:e},element:t,evaluate:r})=>{e.filter(J).forEach(n=>{if(n.uniqueId)return;let i=n.suffix,o=r(n);o!==k&&(typeof o=="function"&&(o=o()),t.props[i]=o,K(()=>{let s=t.ref.current;if(i==="style"){typeof o=="string"&&(s.style.cssText=o);return}else if(i!=="width"&&i!=="height"&&i!=="href"&&i!=="list"&&i!=="form"&&i!=="tabIndex"&&i!=="download"&&i!=="rowSpan"&&i!=="colSpan"&&i!=="role"&&i in s)try{s[i]=o??"";return}catch{}o!=null&&(o!==!1||i[4]==="-")?s.setAttribute(i,o):s.removeAttribute(i)}))})}),S("ignore",({element:{type:e,props:{innerHTML:t,...r}}})=>{let n=L(()=>t,[]);return R(e,{dangerouslySetInnerHTML:{__html:n},...r})}),S("text",({directives:{text:e},element:t,evaluate:r})=>{let n=e.filter(_e);n.length&&n.forEach(i=>{if(!i.uniqueId)try{let o=r(i);if(o===k)return;typeof o=="function"&&(o=o()),t.props.children=typeof o=="object"?null:o.toString()}catch{t.props.children=null}})}),S("run",({directives:{run:e},evaluate:t})=>{e.forEach(r=>{let n=t(r);return typeof n=="function"&&(n=n()),n})}),S("each",({directives:{each:e,"each-key":t},context:r,element:n,evaluate:i})=>{if(n.type!=="template")return;let{Provider:o}=r,s=we(r),[f]=e,{namespace:u,suffix:c,uniqueId:l}=f;if(e.length>1||l)return;let a=i(f);if(a===k||(typeof a=="function"&&(a=a()),typeof a?.[Symbol.iterator]!="function"))return;let h=c?hr(c):"item",p=[],w=yn(s,u,a,h,t?.[0]);for(let[P,d,_]of w){let v={client:{...s.client,[u]:d},server:{...s.server}};v.client[u][h]=P,p.push(R(o,{value:v,key:_},n.props.content))}return p},{priority:20}),S("each-child",({directives:{"each-child":e},element:t,evaluate:r})=>{let n=e.find(_e);return n?r(n)===k?t:null:void 0},{priority:1}),S("router-region",({directives:{"router-region":e}})=>{let t=e.find(_e);if(!t||t.suffix||t.uniqueId)return;let r=typeof t.value=="string"?t.value:t.value.id;Ne.has(r)||Ne.set(r,U());let n=Ne.get(r).value;if(n&&typeof n.type!="string"){let i=D();return fe(n,{previousScope:i})}return n},{priority:1})};var Rt="data-wp-",ze=[],wn=()=>ze[ze.length-1]??null,bn=e=>!!(e&&typeof e=="object"&&e.constructor===Object),Sn=/[^a-z0-9-_]/i;function xn(e){let t=e.substring(8);if(Sn.test(t))return null;let r=t.indexOf("--");if(r===-1)return{prefix:t,suffix:null,uniqueId:null};let n=t.substring(0,r),i=t.substring(r);if(i.startsWith("---")&&i[3]!=="-")return{prefix:n,suffix:null,uniqueId:i.substring(3)||null};let o=i.substring(2),s=o.indexOf("---");if(s!==-1&&o.substring(s)[3]!=="-"){let f=o.substring(s+3)||null;return o=o.substring(0,s)||null,{prefix:n,suffix:o,uniqueId:f}}return{prefix:n,suffix:o||null,uniqueId:null}}var En=/^([\w_\/-]+)::(.+)$/,Ut=new WeakSet;function Re(e){let t=new Set,r=new Set,n=document.createTreeWalker(e,205);function i(s){let{nodeType:f}=s;if(f===3)return s.data;if(f===4)return r.add(s),s.nodeValue;if(f===8||f===7)return t.add(s),null;let u=s,{attributes:c}=u,l=u.localName,a={},h=[],p=[],w=!1,P=!1;for(let d=0;d{let I=xn(_);if(I===null)return d;let{prefix:x,suffix:C,uniqueId:Ue}=I;return d[x]=d[x]||[],d[x].push({namespace:v??wn(),value:N,suffix:C,uniqueId:Ue}),d},{});for(let d in a.__directives)a.__directives[d].sort((_,v)=>{let N=_.suffix??"",I=v.suffix??"";if(N!==I)return NC)-+(xRe(d));else{let d=n.firstChild();if(d){for(;d;){let _=i(d);_&&h.push(_),d=n.nextSibling()}n.parentNode()}}return P&&ze.pop(),R(l,a,h)}let o=i(n.currentNode);return t.forEach(s=>s.remove()),r.forEach(s=>s.replaceWith(new window.Text(s.nodeValue??""))),o}var Dt=new WeakMap,Gt=e=>{let t=Array.isArray(e)?e[0]:e;if(!t.parentElement)throw Error("The passed region should be an element with a parent.");return Dt.has(t)||Dt.set(t,_r(t.parentElement,e)),Dt.get(t)},Ot=new WeakMap,Ur=async()=>{let e=document.querySelectorAll("[data-wp-interactive]");await new Promise(t=>{setTimeout(t,0)});for(let t of e)if(!Ut.has(t)){await re();let r=Gt(t),n=Re(t);Ot.set(t,n),await re(),ot(n,r)}};var Pn="I acknowledge that using private APIs means my theme or plugin will inevitably break in the next version of WordPress.",io=e=>{if(e===Pn)return{getRegionRootFragment:Gt,initialVdom:Ot,toVdom:Re,directive:S,getNamespace:q,h:R,cloneElement:fe,render:it,proxifyState:G,parseServerData:Tt,populateServerData:It,batch:Y,routerRegions:Ne,deepReadOnly:H,navigationSignal:te};throw new Error("Forbidden access.")};Rr();Ur();export{ln as getConfig,Vr as getContext,zr as getElement,dt as getServerContext,Pt as getServerState,io as privateApis,re as splitTask,ke as store,Zr as useCallback,Xr as useEffect,K as useInit,Yr as useLayoutEffect,en as useMemo,V as useRef,qr as useState,mt as useWatch,O as withScope,tn as withSyncEvent}; //# sourceMappingURL=index.min.js.map