PageSourceSearch

https://preventblindness.org/wp-content/plugins/document-library-p…/js/dataviews.js?ver=39940e2accf5ad100073

js preventblindness.org collected 2026-09-24 15:32:14 UTC 618,259 bytes, 1 lines download raw bytes

vendor: 4,475 bytes, line 1
1(()=>{"use strict";var e,t,n,r,o,i,l,s,a,u,c,d,f,p,h,g,m,v,y,b,w,S,_,x,C,E,R,I,k,P,O,M,T,A,N,F,z,D,L,V,q,$,j,W,B,H,U,G,Z,K,J,Y,X,Q,ee;function te(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t){oe(e,t),t.add(e)}function re(e,t,n){oe(e,t),t.set(e,n)}function oe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ie(e,t){return e.get(se(e,t))}function le(e,t,n){return e.set(se(e,t),n),n}function se(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ae,ue,ce,de,fe,pe,he,ge,me,ve,ye,be,we,Se,_e,xe,Ce={},Ee=[],Re=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ie=Array.isArray;function ke(e,t){for(var n in t)e[n]=t[n];return e}function Pe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Oe(e,t,n){var r,o,i,l={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:l[i]=t[i];if(arguments.length>2&&(l.children=arguments.length>3?ae.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return Me(e,l,r,o,null)}function Me(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++ce:o,__i:-1,__u:0};return null==o&&null!=ue.vnode&&ue.vnode(i),i}function Te(){return{current:null}}function Ae(e){return e.children}function Ne(e,t){this.props=e,this.context=t}function Fe(e,t){if(null==t)return e.__?Fe(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Fe(e):null}function ze(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],o=[],i=ke({},t);i.__v=t.__v+1,ue.vnode&&ue.vnode(i),Ge(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,null==n?Fe(t):n,!!(32&t.__u),o),i.__v=t.__v,i.__.__k[i.__i]=i,Ke(r,i,o),t.__e=t.__=null,i.__e!=n&&De(i)}}function De(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some((function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e})),De(e)}function Le(e){(!e.__d&&(e.__d=!0)&&fe.push(e)&&!Ve.__r++||pe!=ue.debounceRendering)&&((pe=ue.debounceRendering)||he)(Ve)}function Ve(){try{for(var e,t=1;fe.length;)fe.length>t&&fe.sort(ge),e=fe.shift(),t=fe.length,ze(e)}finally{fe.length=Ve.__r=0}}function qe(e,t,n,r,o,i,l,s,a,u,c){var d,f,p,h,g,m,v,y=r&&r.__k||Ee,b=t.length;for(a=function(e,t,n,r,o){var i,l,s,a,u,c=n.length,d=c,f=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(l=t[i])&&"boolean"!=typeof l&&"function"!=typeof l?("string"==typeof l||"number"==typeof l||"bigint"==typeof l||l.constructor==String?l=e.__k[i]=Me(null,l,null,null,null):Ie(l)?l=e.__k[i]=Me(Ae,{children:l},null,null,null):void 0===l.constructor&&l.__b>0?l=e.__k[i]=Me(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[i]=l,a=i+f,l.__=e,l.__b=e.__b+1,s=null,-1!=(u=l.__i=We(l,n,a,d))&&(d--,(s=n[u])&&(s.__u|=2)),null==s||null==s.__v?(-1==u&&(o>c?f--:o<c&&f++),"function"!=typeof l.type&&(l.__u|=4)):u!=a&&(u==a-1?f--:u==a+1?f++:(u>a?f--:f++,l.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<c;i++)null!=(s=n[i])&&!(2&s.__u)&&(s.__e==r&&(r=Fe(s)),Xe(s,s));return r}(n,t,y,a,b),d=0;d<b;d++)null!=(p=n.__k[d])&&(f=-1!=p.__i&&y[p.__i]||Ce,p.__i=d,m=Ge(e,p,f,o,i,l,s,a,u,c),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Ye(f.ref,null,p),c.push(p.ref,p.__c||h,p)),null==g&&null!=h&&(g=h),(v=!!(4&p.__u))||f.__k===p.__k?(a=$e(p,a,e,v),v&&f.__e&&(f.__e=null)):"function"==typeof p.type&&void 0!==m?a=m:h&&(a=h.nextSibling),p.__u&=-7);return n.__e=g,a}function $e(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=$e(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Fe(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function je(e,t){return t=t||[],null==e||"boolean"==typeof e||(Ie(e)?e.some((function(e){je(e,t)})):t.push(e)),t}function We(e,t,n,r){var o,i,l,s=e.key,a=e.type,u=t[n],c=null!=u&&!(2&u.__u);if(null===u&&null==s||c&&s==u.key&&a==u.type)return n;if(r>(c?1:0))for(o=n-1,i=n+1;o>
vendor: 5,674 bytes, line 1
1=0||i<t.length;)if(null!=(u=t[l=o>=0?o--:i++])&&!(2&u.__u)&&s==u.key&&a==u.type)return l;return-1}function Be(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||Re.test(t)?n:n+"px"}function He(e,t,n,r,o){var i,l;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Be(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Be(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(be,"$1")),l=t.toLowerCase(),t=l in e||"onFocusOut"==t||"onFocusIn"==t?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[ye]=r[ye]:(n[ye]=we,e.addEventListener(t,i?_e:Se,i)):e.removeEventListener(t,i?_e:Se,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function Ue(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t[ve])t[ve]=we++;else if(t[ve]<n[ye])return;return n(ue.event?ue.event(t):t)}}}function Ge(e,t,n,r,o,i,l,s,a,u){var c,d,f,p,h,g,m,v,y,b,w,S,_,x,C,E,R=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(a=!!(32&n.__u),i=[s=t.__e=n.__e]),(c=ue.__b)&&c(t);e:if("function"==typeof R){d=l.length;try{if(y=t.props,b=R.prototype&&R.prototype.render,w=(c=R.contextType)&&r[c.__c],S=c?w?w.props.value:c.__:r,n.__c?v=(f=t.__c=n.__c).__=f.__E:(b?t.__c=f=new R(y,S):(t.__c=f=new Ne(y,S),f.constructor=R,f.render=Qe),w&&w.sub(f),f.state||(f.state={}),f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),b&&null==f.__s&&(f.__s=f.state),b&&null!=R.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=ke({},f.__s)),ke(f.__s,R.getDerivedStateFromProps(y,f.__s))),h=f.props,g=f.state,f.__v=t,p)b&&null==R.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),b&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(b&&null==R.getDerivedStateFromProps&&y!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(y,S),t.__v==n.__v||!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(y,f.__s,S)){t.__v!=n.__v&&(f.props=y,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),Ee.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&l.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(y,f.__s,S),b&&null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,g,m)}))}if(f.context=S,f.props=y,f.__P=e,f.__e=!1,_=ue.__r,x=0,b)f.state=f.__s,f.__d=!1,_&&_(t),c=f.render(f.props,f.state,f.context),Ee.push.apply(f.__h,f._sb),f._sb=[];else do{f.__d=!1,_&&_(t),c=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++x<25);f.state=f.__s,null!=f.getChildContext&&(r=ke(ke({},r),f.getChildContext())),b&&!p&&null!=f.getSnapshotBeforeUpdate&&(m=f.getSnapshotBeforeUpdate(h,g)),C=null!=c&&c.type===Ae&&null==c.key?Je(c.props.children):c,s=qe(e,Ie(C)?C:[C],t,n,r,o,i,l,s,a,u),f.base=t.__e,t.__u&=-161,f.__h.length&&l.push(f),v&&(f.__E=f.__=null)}catch(e){if(l.length=d,t.__v=null,a||null!=i)if(e.then){for(t.__u|=a?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;null!=i&&(i[i.indexOf(s)]=null),t.__e=s}else{if(null!=i)for(E=i.length;E--;)Pe(i[E]);Ze(t)}else t.__e=n.__e,!t.__k&&n.__k&&(t.__k=n.__k),e.then||Ze(t);ue.__e(e,t,n)}}else null==i&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=function(e,t,n,r,o,i,l,s,a){var u,c,d,f,p,h,g,m=n.props||Ce,v=t.props,y=t.type;if("svg"==y?o="http://www.w3.org/2000/svg":"math"==y?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=i)for(u=0;u<i.length;u++)if((p=i[u])&&"setAttribute"in p==!!y&&(y?p.localName==y:3==p.nodeType)){e=p,i[u]=null;break}if(null==e){if(null==y)return document.createTextNode(v);e=document.createElementNS(o,y,v.is&&v),s&&(ue.__m&&ue.__m(t,i),s=!1),i=null}if(null==y)m===v||s&&e.data==v||(e.data=v);else{if(i="textarea"==y&&null!=v.defaultValue?null:i&&ae.call(e.childNodes),!s&&null!=i)for(m={},u=0;u<e.attributes.length;u++)m[(p=e.attributes[u]).name]=p.value;for(u in m)p=m[u],"dangerouslySetInnerHTML"==u?d=p:"children"==u||u in v||"value"==u&&"defaultValue"in v||"checked"==u&&"defaultChecked"in v||He(e,u,null,p,o);for(u in v)p=v[u],"children"==u?f=p:"dangerouslySetInnerHTML"==u?c=p:"value"==u?h=p:"checked"==u?g=p:s&&"function"!=typeof p||m[u]===p||He(e,u,p,m[u],o);if(c)s||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),qe("template"==t.type?e.content:e,Ie(f)?f:[f],t,n,r,"foreignObject"==y?"http://www.w3.org/1999/xhtml":o,i,l,i?i[0]:n.__k&&Fe(n,0),s,a),null!=i)for(u=i.length;u--;)Pe(i[u]);s&&"textarea"!=y||(u="value","progress"==y&&null==h?e.removeAttribute("value"):null!=h&&(h!==e[u]||"progress"==y&&!h||"option"==y&&h!=m[u])&&He(e,u,h,m[u],o),u="checked",null!=g&&g!=e[u]&&He(e,u,g,m[u],o))}return e}(n.__e,t,n,r,o,i,l,a,u);return(c=ue.diffed)&&c(t),128&t.__u?void 0:s}function Ze(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ze))}function Ke(e,t,n){for(var r=0;r<n.length;r++)Ye(n[r],n[++r],n[++r]);ue.__c&&ue.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){ue.__e(e,t.__v)}}))}function Je(e){return"object"!=typeof e||null==e||e.__b>0?e:Ie(e)?e.map(Je):void 0!==e.constructor?null:ke({},e)}function Ye(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){ue.__e(e,n)}}function Xe(e,t,n){var r,o;
vendor: 2,338 bytes, line 1
1if(ue.unmount&&ue.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ye(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){ue.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Xe(r[o],t,n||"function"!=typeof e.type);n||Pe(e.__e),e.__c=e.__=e.__e=void 0}function Qe(e,t,n){return this.constructor(e,n)}function et(e,t,n){var r,o,i,l;t==document&&(t=document.documentElement),ue.__&&ue.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],l=[],Ge(t,e=(!r&&n||t).__k=Oe(Ae,null,[e]),o||Ce,Ce,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ae.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,l),Ke(i,e,l),e.props.children=null}function tt(e,t){et(e,t,tt)}function nt(e,t,n){var r,o,i,l,s=ke({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=void 0===t[i]&&null!=l?l[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?ae.call(arguments,2):n),Me(e.type,s,r||e.key,o||e.ref,null)}function rt(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach((function(e){e.__e=!0,Le(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+xe++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}ae=Ee.slice,ue={__e:function(e,t,n,r){for(var o,i,l;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),l=o.__d),l)return o.__E=o}catch(t){e=t}throw e}},ce=0,de=function(e){return null!=e&&void 0===e.constructor},Ne.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=ke({},this.state),"function"==typeof e&&(e=e(ke({},n),this.props)),e&&ke(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),Le(this))},Ne.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Le(this))},Ne.prototype.render=Ae,fe=[],he="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,ge=function(e,t){return e.__v.__b-t.__v.__b},Ve.__r=0,me=Math.random().toString(8),ve="__d"+me,ye="__a"+me,be=/(PointerCapture)$|Capture$/i,we=0,Se=Ue(!1),_e=Ue(!0),xe=0;var ot,it,lt,st,at=0,ut=[],ct=ue,dt=ct.__b,ft=ct.__r,pt=ct.diffed,ht=ct.__c,gt=ct.unmount,mt=ct.__;function vt(e,t){ct.__h&&ct.__h(it,e,at||t),at=0;var n=it.__H||(it.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function yt(e){return at=1,bt(Ft,e)}function bt(e,t,n){var r=vt(ot++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Ft(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=it,!it.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=!1,l=r.__c.props!==e;if(r.__c.__H.__.some((function(e){if(e.__N){o=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(l=!0)}})),i){var s=i.call(this,e,t,n);return o?s||l:s}return!o||l};it.__f=!0;var i=it.shouldComponentUpdate,l=it.componentWillUpdate;it.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}l&&l.call(this,e,t,n)},it.shouldComponentUpdate=o}return r.__N||r.__}function wt(e,t){var n=vt(ot++,3);!ct.__s&&Nt(n.__H,t)&&(n.__=e,n.u=t,it.__H.__h.push(n))}function St(e,t){var n=vt(ot++,4);!ct.__s&&Nt(n.__H,t)&&(n.__=e,n.u=t,it.__h.push(n))}function _t(e){return at=5,Ct((function(){return{current:e}}),[])}function xt(e,t,n){at=6,St((function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}}),null==n?n:n.concat(e))}function Ct(e,t){var n=vt(ot++,7);return Nt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Et(e,t){return at=8,Ct((function(){return e}),t)}function Rt(e){var t=it.context[e.__c],n=vt(ot++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(it)),t.props.value):e.__}function It(e,t){ct.useDebugValue&&ct.useDebugValue(t?t(e):e)}function kt(){var e=vt(ot++,11);if(!e.__){for(var t=it.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Pt(){for(var e;e=ut.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Tt),t.__h.some(At),t.__h=[]}catch(n){t.__h=[],ct.__e(n,e.__v)}}}ct.__b=function(e){it=null,dt&&dt(e)},ct.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),mt&&mt(e,t)},ct.__r=function(e){ft&&ft(e),ot=0;var t=(it=e.__c).__H;t&&(lt===it?(t.__h=[],it.__h=[],t.__.some((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.length&&Pt(),ot=0)),lt=it},ct.diffed=function(e){pt&&pt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==ut.push(t)&&st===ct.requestAnimationFrame||((st=ct.requestAnimationFrame)||Mt)(Pt)),t.__H.__.some((function(e){e.u&&(e.__H=e.u,e.u=void 0)}))),lt=it=null},ct.__c=function(e,t){t.some((function(e){try{e.__h.some(Tt),e.__h=e.__h.filter((function(e){return!e.__||At(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],ct.__e(n,e.__v)}})),ht&&ht(e,t)},ct.unmount=function(e){gt&&gt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some((function(e){try{Tt(e)}catch(e){t=e}})),n.__H=void 0,t&&ct.__e(t,n.__v))};var Ot="function"==typeof requestAnimationFrame;function Mt(e){var t,n=function(){clearTimeout(r),Ot&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ot&&(t=requestAnimationFrame(n))}function Tt(e){var t=it,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),it=t}function At(e){var t=it;e.__c=e.__(),it=t}function Nt(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Ft(e,t){return"function"==typeof t?t(e):t}function zt(e,t){for(var n in t)e[n]=t[n];return e}function Dt(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Lt(e,t){var n=t(),r=yt({t:{__:n,u:t}}),o=r[0].t,i=r[1];return St((function(){o.__=n,o.u=t,Vt(o)&&i({t:o})}),[e,n,t]),wt((function(){return Vt(o)&&i({t:o}),e((function(){Vt(o)&&i({t:o})}))}),[e]),n}function Vt(e){try{return!((t=e.__)===(n=e.u())&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}var t,n}function qt(e){e()}function $t(e){return e}function jt(){return[!1,qt]}var Wt=St;function Bt(e,t){this.props=e,this.context=t}function Ht(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&("function"==typeof n?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:Dt(this.props,e)}function r(t){return this.shouldComponentUpdate=n,Oe(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(Bt.prototype=new Ne).isPureReactComponent=!0,Bt.prototype.shouldComponentUpdate=function(e,t){return Dt(this.props,e)||Dt(this.state,t)};var Ut=ue.__b;ue.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ut&&Ut(e)};var Gt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Zt(e){function t(t){var n=zt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Gt,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Kt=function(e,t){return null==e?null:je(je(e).map(t))},Jt={map:Kt,forEach:Kt,count:function(e){return e?je(e).length:0},only:function(e){var t=je(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:je},Yt=ue.__e;ue.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Yt(e,t,n,r)};var Xt=ue.unmount;function Qt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=zt({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Qt(e,t,n)}))),e}
1function en(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return en(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function tn(){this.__u=0,this.o=null,this.__b=null}function nn(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function rn(e){var t,n,r,o=null;function i(i){if(t||(t=e()).then((function(e){e&&(o=e.default||e),r=!0}),(function(e){n=e,r=!0})),n)throw n;if(!r)throw t;return o?Oe(o,i):null}return i.displayName="Lazy",i.__f=!0,i}function on(){this.i=null,this.l=null}ue.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Xt&&Xt(e)},(tn.prototype=new Ne).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=nn(r.__v),i=!1,l=function(){i||r.__z||(i=!0,n.__R=null,o?o(a):a())};n.__R=l;var s=n.__P;n.__P=null;var a=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=en(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(l,l)},tn.prototype.componentWillUnmount=function(){this.o=[]},tn.prototype.render=function(e,t){var n=this.__v;if(!n.__m){for(var r=n;r.__;)r=r.__;r=r.__m||(r.__m=[0,0]),n.__m=[r[1]++,0]}if(this.__b){if(n.__k){var o=document.createElement("div"),i=n.__k[0].__c;n.__k[0]=Qt(this.__b,o,i.__O=i.__P)}this.__b=null}var l=t.__a&&Oe(Ae,null,e.fallback);return l&&(l.__u&=-33),[Oe(Ae,null,t.__a?null:e.children),l]};var ln=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function sn(e){return this.getChildContext=function(){return e.context},e.children}function an(e){var t=this,n=e.v;if(t.componentWillUnmount=function(){et(null,t.h),t.h=null,t.v=null},t.v&&t.v!==n&&t.componentWillUnmount(),!t.h){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.v=n,t.h={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.v.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.v.removeChild(e)}}}et(Oe(sn,{context:t.context},e.__v),t.h)}function un(e,t){var n=Oe(an,{__v:e,v:t});return n.containerInfo=t,n}(on.prototype=new Ne).__a=function(e){var t=this,n=nn(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),ln(t,e,r)):o()};n?n(i):i()}},on.prototype.render=function(e){this.i=null,this.l=new Map;var t=je(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},on.prototype.componentDidUpdate=on.prototype.componentDidMount=function(){var e=this;this.l.forEach((function(t,n){ln(e,n,t)}))};var cn="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,dn=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,fn=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,pn=/[A-Z0-9]/g,hn="undefined"!=typeof document,gn=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function mn(e,t,n){return null==t.__k&&(t.textContent=""),et(e,t),"function"==typeof n&&n(),e?e.__c:null}
1function vn(e,t,n){return tt(e,t),"function"==typeof n&&n(),e?e.__c:null}Ne.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(Ne.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var yn=ue.event;ue.event=function(e){return yn&&(e=yn(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var bn,wn={configurable:!0,get:function(){return this.class}},Sn=ue.vnode;ue.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1==n.indexOf("-");for(var i in t){var l=t[i];if(!("value"===i&&"defaultValue"in t&&null==l||hn&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===l?l="":"translate"===s&&"no"===l?l=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||gn(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":fn.test(i)&&(i=s):s=i="oninput":o&&dn.test(i)?i=i.replace(pn,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=l}}"select"==n&&(r.multiple&&Array.isArray(r.value)&&(r.value=je(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),null!=r.defaultValue&&(r.value=je(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",wn)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=cn,Sn&&Sn(e)};var xn=ue.__r;ue.__r=function(e){xn&&xn(e),bn=e.__c};var Cn=ue.diffed;ue.diffed=function(e){Cn&&Cn(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),bn=null};var En={ReactCurrentDispatcher:{current:{readContext:function(e){return bn.__n[e.__c].props.value},useCallback:Et,useContext:Rt,useDebugValue:It,useDeferredValue:$t,useEffect:wt,useId:kt,useImperativeHandle:xt,useInsertionEffect:Wt,useLayoutEffect:St,useMemo:Ct,useReducer:bt,useRef:_t,useState:yt,useSyncExternalStore:Lt,useTransition:jt}}},Rn="18.3.1";function In(e){return Oe.bind(null,e)}function kn(e){return!!e&&e.$$typeof===cn}function Pn(e){return kn(e)&&e.type===Ae}function On(e){return!!e&&"string"==typeof e.displayName&&0==e.displayName.indexOf("Memo(")}function Mn(e){return kn(e)?nt.apply(null,arguments):e}function Tn(e){return!!e.__k&&(et(null,e),!0)}function An(e){return e&&(e.base||1===e.nodeType&&e)||null}var _n=function(e,t){return e(t)},Nn=function(e,t){var n=ue.debounceRendering;ue.debounceRendering=function(e){return e()};var r=e(t);return ue.debounceRendering=n,r},Fn=kn,zn={useState:yt,useId:kt,useReducer:bt,useEffect:wt,useLayoutEffect:St,useInsertionEffect:Wt,useTransition:jt,useDeferredValue:$t,useSyncExternalStore:Lt,startTransition:qt,useRef:_t,useImperativeHandle:xt,useMemo:Ct,useCallback:Et,useContext:Rt,useDebugValue:It,version:"18.3.1",Children:Jt,render:mn,hydrate:vn,unmountComponentAtNode:Tn,createPortal:un,createElement:Oe,createContext:rt,createFactory:In,cloneElement:Mn,createRef:Te,Fragment:Ae,isValidElement:kn,isElement:Fn,isFragment:Pn,isMemo:On,findDOMNode:An,Component:Ne,PureComponent:Bt,memo:Ht,forwardRef:Zt,flushSync:Nn,unstable_batchedUpdates:_n,StrictMode:Ae,Suspense:tn,SuspenseList:on,lazy:rn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:En},Dn=Object.freeze({__proto__:null,Children:Jt,Component:Ne,Fragment:Ae,PureComponent:Bt,StrictMode:Ae,Suspense:tn,SuspenseList:on,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:En,cloneElement:Mn,createContext:rt,createElement:Oe,createFactory:In,createPortal:un,createRef:Te,default:zn,findDOMNode:An,flushSync:Nn,forwardRef:Zt,hydrate:vn,isElement:Fn,isFragment:Pn,isMemo:On,isValidElement:kn,lazy:rn,memo:Ht,render:mn,startTransition:qt,unmountComponentAtNode:Tn,unstable_batchedUpdates:_n,useCallback:Et,useContext:Rt,useDebugValue:It,useDeferredValue:$t,useEffect:wt,useErrorBoundary:function(e){var t=vt(ot++,10),n=yt();return t.__=e,it.componentDidCatch||(it.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:kt,useImperativeHandle:xt,useInsertionEffect:Wt,useLayoutEffect:St,useMemo:Ct,useReducer:bt,useRef:_t,useState:yt,useSyncExternalStore:Lt,useTransition:jt,version:Rn}),Ln=Symbol.for("preact-signals");function Vn(){if(Wn>1)Wn--;else{var e,t=!1;for(function(){var e=Gn;for(Gn=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==jn;){var n=jn;for(jn=void 0,Bn++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Xn(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Bn=0,Wn--,t)throw e}}var qn=void 0;function $n(e){var t=qn;qn=void 0;try{return e()}finally{qn=t}}var jn=void 0,Wn=0,Bn=0,Hn=0,Un=0,Gn=void 0,Zn=0;function Kn(e){if(void 0!==qn){var t=e.n;if(void 0===t||t.t!==qn)return t={i:0,S:e,p:qn.s,n:void 0,t:qn,e:void 0,x:void 0,r:t},void 0!==qn.s&&(qn.s.n=t),qn.s=t,e.n=t,32&qn.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=qn.s,t.n=void 0,qn.s.n=t,qn.s=t),t}}function Jn(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Yn(e,t){return new Jn(e,t)}function Xn(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Qn(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function er(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function tr(e,t){Jn.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Zn-1,this.f=4}function nr(e,t){return new tr(e,t)}function rr(e){var t=e.m;if(e.m=void 0,"function"==typeof t){Wn++;var n=qn;qn=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,or(e),t}finally{qn=n,Vn()}}}function or(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,rr(e)}function ir(e){if(qn!==this)throw new Error("Out-of-order effect");er(this),qn=e,this.f&=-2,8&this.f&&or(this),Vn()}function lr(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function sr(e,t){var n=new lr(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}Jn.prototype.brand=Ln,Jn.prototype.h=function(){return!0},Jn.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:$n((function(){var e;null==(e=t.W)||e.call(t)})))},Jn.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&$n((function(){var e;null==(e=t.Z)||e.call(t)})))}},Jn.prototype.subscribe=function(e){var t=this;return sr((function(){var n=t.value;$n((function(){return e(n)}))}),{name:"sub"})},Jn.prototype.valueOf=function(){return this.value},Jn.prototype.toString=function(){return this.value+""},Jn.prototype.toJSON=function(){return this.value},Jn.prototype.peek=function(){var e=this;return $n((function(){return e.value}))},Object.defineProperty(Jn.prototype,"value",{get:function(){var e=Kn(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Bn>100)throw new Error("Cycle detected");!function(e){0!==Wn&&0===Bn&&e.l!==Un&&(e.l=Un,Gn={S:e,v:e.v,i:e.i,o:Gn})}(this),this.v=e,this.i++,Zn++,Wn++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{Vn()}}}}),tr.prototype=new Jn,tr.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;
1if(this.f&=-5,this.g===Zn)return!0;if(this.g=Zn,this.f|=1,this.i>0&&!Xn(this))return this.f&=-2,!0;var e=qn;try{Qn(this),qn=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return qn=e,er(this),this.f&=-2,!0},tr.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}Jn.prototype.S.call(this,e)},tr.prototype.U=function(e){if(void 0!==this.t&&(Jn.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},tr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(tr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Kn(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),lr.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},lr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,rr(this),Qn(this),Wn++;var e=qn;return qn=this,ir.bind(this,e)},lr.prototype.N=function(){2&this.f||(this.f|=2,this.u=jn,jn=this)},lr.prototype.d=function(){this.f|=8,1&this.f||or(this)},lr.prototype.dispose=function(){this.d()};var ar,ur,cr="undefined"!=typeof window&&!!window.__PREACT_SIGNALS_DEVTOOLS__,dr=[];function fr(e,t){ue[e]=t.bind(null,ue[e]||function(){})}function pr(e){if(ur){var t=ur;ur=void 0,t()}ur=e&&e.S()}function hr(e){var t=this,n=e.data,r=function(e){return Ct((function(){return Yn(e,undefined)}),[])}(n);r.value=n;var o=Ct((function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var o=nr((function(){var e=r.value.value;return 0===e?0:!0===e?"":e||""})),i=nr((function(){return!Array.isArray(o.value)&&!de(o.value)})),l=sr((function(){if(this.N=yr,i.value){var t=o.value;e.__v&&e.__v.__e&&3===e.__v.__e.nodeType&&(e.__v.__e.data=t)}})),s=t.__$u.d;return t.__$u.d=function(){l(),s.call(this)},[i,o]}),[]),i=o[0],l=o[1];return i.value?l.peek():l.value}function gr(e,t,n,r){var o=t in e&&void 0===e.ownerSVGElement,i=Yn(n);return{o:function(e,t){i.value=e,r=t},d:sr((function(){this.N=yr;var n=i.value.value;r[t]!==n&&(r[t]=n,o?e[t]=n:null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}))}}sr((function(){ar=this.N}))(),hr.displayName="ReactiveTextNode",Object.defineProperties(Jn.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:hr},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),fr("__b",(function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var o in r)if("children"!==o){var i=r[o];i instanceof Jn&&(n||(t.__np=n={}),n[o]=i,r[o]=i.peek())}}e(t)})),fr("__r",(function(e,t){if(e(t),t.type!==Ae){pr();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=n=function(e,t){var n;return sr((function(){n=this}),{name:t}),n.c=e,n}((function(){var e;cr&&(null==(e=n.y)||e.call(n)),r.__$f|=1,r.setState({})}),"function"==typeof t.type?t.type.displayName||t.type.name:""))),pr(n)}})),fr("__e",(function(e,t,n,r){pr(),e(t,n,r)})),fr("diffed",(function(e,t){var n;if(pr(),"string"==typeof t.type&&(n=t.__e)){var r=t.__np,o=t.props;if(r){var i=n.U;if(i)for(var l in i){var s=i[l];void 0===s||l in r||(s.d(),i[l]=void 0)}else i={},n.U=i;for(var a in r){var u=i[a],c=r[a];void 0===u?(u=gr(n,a,c,o),i[a]=u):u.o(c,o)}}}e(t)})),fr("unmount",(function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var o in n.U=void 0,r){var i=r[o];i&&i.d()}}var l=t.__np;if(l){var s=t.props;for(var a in l)s[a]=l[a]}t.__np=void 0}else{var u=t.__c;if(u){var c=u.__$u;c&&(u.__$u=void 0,c.d())}}e(t)})),fr("__h",(function(e,t,n,r){(r<3||9===r)&&(t.__$f|=2),e(t,n,r)})),Ne.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&void 0!==n.s;for(var o in t)return!0;if(this.__f||"boolean"==typeof this.u&&!0===this.u){var i=2&this.__$f;if(!(r||i||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(r||4&this.__$f))return!0;
1if(3&this.__$f)return!0}for(var l in e)if("__source"!==l&&e[l]!==this.props[l])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};var mr=function(e){queueMicrotask((function(){queueMicrotask(e)}))};function vr(){!function(e){if(Wn>0)return e();Un=++Hn,Wn++;try{return e()}finally{Vn()}}((function(){for(var e;e=dr.shift();)ar.call(e)}))}function yr(){1===dr.push(this)&&(ue.requestAnimationFrame||mr)(vr)}var br=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wr=new(e=new WeakMap,t=new WeakMap,n=new WeakMap,class extends br{constructor(){super(),re(this,e,void 0),re(this,t,void 0),re(this,n,void 0),le(n,this,(e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}))}onSubscribe(){ie(t,this)||this.setEventListener(ie(n,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=ie(t,this))||void 0===e||e.call(this),le(t,this,void 0))}setEventListener(e){var r;le(n,this,e),null===(r=ie(t,this))||void 0===r||r.call(this),le(t,this,e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})))}setFocused(t){ie(e,this)!==t&&(le(e,this,t),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){var t;return"boolean"==typeof ie(e,this)?ie(e,this):"hidden"!==(null===(t=globalThis.document)||void 0===t?void 0:t.visibilityState)}}),Sr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},_r=new(r=new WeakMap,o=new WeakMap,class{constructor(){re(this,r,Sr),re(this,o,!1)}setTimeoutProvider(e){le(r,this,e)}setTimeout(e,t){return ie(r,this).setTimeout(e,t)}clearTimeout(e){ie(r,this).clearTimeout(e)}setInterval(e,t){return ie(r,this).setInterval(e,t)}clearInterval(e){ie(r,this).clearInterval(e)}}),xr="undefined"==typeof window||"Deno"in globalThis;function Cr(){}function Er(e){return"number"==typeof e&&e>=0&&e!==1/0}function Rr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ir(e,t){return"function"==typeof e?e(t):e}function kr(e,t){return"function"==typeof e?e(t):e}function Pr(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:l,stale:s}=e;if(l)if(r){if(t.queryHash!==Mr(l,t.options))return!1}else if(!Ar(t.queryKey,l))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return!("boolean"==typeof s&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function Or(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Tr(t.options.mutationKey)!==Tr(i))return!1}else if(!Ar(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Mr(e,t){return((null==t?void 0:t.queryKeyHashFn)||Tr)(e)}function Tr(e){return JSON.stringify(e,((e,t)=>Lr(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function Ar(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every((n=>Ar(e[n],t[n])))}var Nr=Object.prototype.hasOwnProperty;function Fr(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Dr(e)&&Dr(t);if(!(r||Lr(e)&&Lr(t)))return t;const o=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),l=i.length,s=r?new Array(l):{};let a=0;for(let u=0;u<l;u++){const l=r?u:i[u],c=e[l],d=t[l];if(c===d){s[l]=c,(r?u<o:Nr.call(e,l))&&a++;continue}if(null===c||null===d||"object"!=typeof c||"object"!=typeof d){s[l]=d;continue}const f=Fr(c,d,n+1);s[l]=f,f===c&&a++}return o===l&&a===o?e:s}function zr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Dr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lr(e){if(!Vr(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;
1return!!Vr(n)&&!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function Vr(e){return"[object Object]"===Object.prototype.toString.call(e)}function qr(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?Fr(e,t):t}function $r(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function jr(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Wr=Symbol();function Br(e,t){return!e.queryFn&&null!=t&&t.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==Wr?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Hr(e,t){return"function"==typeof e?e(...t):!!e}var Ur=(()=>{let e=()=>xr;return{isServer:()=>e(),setIsServer(t){e=t}}})();function Gr(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch((()=>{})),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}var Zr=function(e){setTimeout(e,0)},Kr=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=Zr;const i=r=>{t?e.push(r):o((()=>{n(r)}))};return{batch:i=>{let l;t++;try{l=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))})()}return l},batchCalls:e=>(...t)=>{i((()=>{e(...t)}))},schedule:i,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}(),Jr=new(i=new WeakMap,l=new WeakMap,s=new WeakMap,class extends br{constructor(){super(),re(this,i,!0),re(this,l,void 0),re(this,s,void 0),le(s,this,(e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}))}onSubscribe(){ie(l,this)||this.setEventListener(ie(s,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=ie(l,this))||void 0===e||e.call(this),le(l,this,void 0))}setEventListener(e){var t;le(s,this,e),null===(t=ie(l,this))||void 0===t||t.call(this),le(l,this,e(this.setOnline.bind(this)))}setOnline(e){ie(i,this)!==e&&(le(i,this,e),this.listeners.forEach((t=>{t(e)})))}isOnline(){return ie(i,this)}});function Yr(e){return Math.min(1e3*2**e,3e4)}function Xr(e){return"online"!==(null!=e?e:"online")||Jr.isOnline()}var Qr=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function eo(e){let t,n=!1,r=0;const o=Gr(),i=()=>"pending"!==o.status,l=()=>wr.isFocused()&&("always"===e.networkMode||Jr.isOnline())&&e.canRun(),s=()=>Xr(e.networkMode)&&e.canRun(),a=e=>{var n;i()||(null===(n=t)||void 0===n||n(),o.resolve(e))},u=e=>{var n;i()||(null===(n=t)||void 0===n||n(),o.reject(e))},c=()=>new Promise((n=>{var r;t=e=>{(i()||l())&&n(e)},null===(r=e.onPause)||void 0===r||r.call(e)})).then((()=>{var n;t=void 0,i()||null===(n=e.onContinue)||void 0===n||n.call(e)})),d=()=>{if(i())return;let t;const o=0===r?e.initialPromise:void 0;try{t=null!=o?o:e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(a).catch((t=>{var o,s,a;if(i())return;const f=null!==(o=e.retry)&&void 0!==o?o:Ur.isServer()?0:3,p=null!==(s=e.retryDelay)&&void 0!==s?s:Yr,h="function"==typeof p?p(r,t):p,g=!0===f||"number"==typeof f&&r<f||"function"==typeof f&&f(r,t);var m;!n&&g?(r++,null===(a=e.onFail)||void 0===a||a.call(e,r,t),(m=h,new Promise((e=>{_r.setTimeout(e,m)}))).then((()=>l()?void 0:c())).then((()=>{n?u(t):d()}))):u(t)}))};return{promise:o,status:()=>o.status,cancel:t=>{if(!i()){var n;const r=new Qr(t);u(r),null===(n=e.onCancel)||void 0===n||n.call(e,r)}},continue:()=>{var e;return null===(e=t)||void 0===e||e(),o},cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:s,start:()=>(s()?d():c().then(d),o)}}var to=(a=new WeakMap,class{constructor(){re(this,a,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Er(this.gcTime)&&le(a,this,_r.setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!=e?e:Ur.isServer()?1/0:3e5)}clearGcTimeout(){void 0!==ie(a,this)&&(_r.clearTimeout(ie(a,this)),le(a,this,void 0))}});function no(e){return{onFetch:(t,n)=>{var r,o,i;const l=t.options,s=null===(r=t.fetchOptions)||void 0===r||null===(r=r.meta)||void 0===r||null===(r=r.fetchMore)||void 0===r?void 0:r.direction,a=(null===(o=t.state.data)||void 0===o?void 0:o.pages)||[],u=(null===(i=t.state.data)||void 0===i?void 0:i.pageParams)||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let n=!1;const r=e=>{!function(e,n,r){let o,i=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(null!=o||(o=t.signal),i||(i=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)})}(e,0,(()=>n=!0))},o=Br(t.options,t.fetchOptions),i=async(e,i,l)=>{if(n)return Promise.reject(t.signal.reason);if(null==i&&e.pages.length)return Promise.resolve(e);const s=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:l?"backward":"forward",meta:t.options.meta};return r(e),e})(),a=await o(s),{maxPages:u}=t.options,c=l?jr:$r;return{pages:c(e.pages,a,u),pageParams:c(e.pageParams,i,u)}};if(s&&a.length){const e="backward"===s,t={pages:a,pageParams:u},n=(e?oo:ro)(l,t);c=await i(t,n,e)}else{const t=null!=e?e:a.length;do{var f;const e=0===d?null!==(f=u[0])&&void 0!==f?f:l.initialPageParam:ro(l,c);if(d>0&&null==e)break;c=await i(c,e),d++}while(d<t)}return c};t.options.persister?t.fetchFn=()=>{var e,r;return null===(e=(r=t.options).persister)||void 0===e?void 0:e.call(r,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function ro(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function oo(e,{pages:t,pageParams:n}){var r;return t.length>0?null===(r=e.getPreviousPageParam)||void 0===r?void 0:r.call(e,t[0],t,n[0],n):void 0}function io(e,t){return!!t&&null!=ro(e,t)}function lo(e,t){return!(!t||!e.getPreviousPageParam)&&null!=oo(e,t)}var so=(u=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,g=new WeakMap,m=new WeakMap,v=new WeakSet,class extends to{constructor(e){var t;super(),ne(this,v),re(this,u,void 0),re(this,c,void 0),re(this,d,void 0),re(this,f,void 0),re(this,p,void 0),re(this,h,void 0),re(this,g,void 0),re(this,m,void 0),le(m,this,!1),le(g,this,e.defaultOptions),this.setOptions(e.options),this.observers=[],le(p,this,e.client),le(f,this,ie(p,this).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,le(c,this,po(this.options)),this.state=null!==(t=e.state)&&void 0!==t?t:ie(c,this),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ie(u,this)}get promise(){var e;return null===(e=ie(h,this))||void 0===e?void 0:e.promise}setOptions(e){if(this.options={...ie(g,this),...e},null!=e&&e._type&&le(u,this,e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=po(this.options);void 0!==e.data&&(this.setState(fo(e.data,e.dataUpdatedAt)),le(c,this,e))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||ie(f,this).remove(this)}setData(e,t){const n=qr(this.state.data,e,this.options);return se(v,this,uo).call(this,{data:n,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),n}setState(e){se(v,this,uo).call(this,{type:"setState",state:e})}cancel(e){var t,n;const r=null===(t=ie(h,this))||void 0===t?void 0:t.promise;return null===(n=ie(h,this))||void 0===n||n.cancel(e),r?r.then(Cr).catch(Cr):Prom
1ise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ie(c,this)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some((e=>!1!==kr(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wr||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some((e=>"static"===Ir(e.options.staleTime,this)))}isStale(){return this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Rr(this.state.dataUpdatedAt,e))}onFocus(){var e;const t=this.observers.find((e=>e.shouldFetchOnWindowFocus()));null==t||t.refetch({cancelRefetch:!1}),null===(e=ie(h,this))||void 0===e||e.continue()}onOnline(){var e;const t=this.observers.find((e=>e.shouldFetchOnReconnect()));null==t||t.refetch({cancelRefetch:!1}),null===(e=ie(h,this))||void 0===e||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),ie(f,this).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(ie(h,this)&&(ie(m,this)||se(v,this,ao).call(this)?ie(h,this).cancel({revert:!0}):ie(h,this).cancelRetry()),this.scheduleGc()),ie(f,this).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(v,this,uo).call(this,{type:"invalidate"})}async fetch(e,t){var n,r;if("idle"!==this.state.fetchStatus&&"rejected"!==(null===(n=ie(h,this))||void 0===n?void 0:n.status()))if(void 0!==this.state.data&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(ie(h,this))return ie(h,this).continueRetry(),ie(h,this).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const o=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(le(m,this,!0),o.signal)})},l=()=>{const e=Br(this.options,t),n=(()=>{const e={client:ie(p,this),queryKey:this.queryKey,meta:this.meta};return i(e),e})();return le(m,this,!1),this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ie(p,this),state:this.state,fetchFn:l};return i(e),e})(),a="infinite"===ie(u,this)?no(this.options.pages):this.options.behavior;var c;null==a||a.onFetch(s,this),le(d,this,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(r=s.fetchOptions)||void 0===r?void 0:r.meta))&&se(v,this,uo).call(this,{type:"fetch",meta:null===(c=s.fetchOptions)||void 0===c?void 0:c.meta}),le(h,this,eo({initialPromise:null==t?void 0:t.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof Qr&&e.revert&&this.setState({...ie(d,this),fetchStatus:"idle"}),o.abort()},onFail:(e,t)=>{se(v,this,uo).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{se(v,this,uo).call(this,{type:"pause"})},onContinue:()=>{se(v,this,uo).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{var g,y,b,w;const e=await ie(h,this).start();if(void 0===e)throw new Error(`${this.queryHash} data is undefined`);return this.setData(e),null===(g=(y=ie(f,this).config).onSuccess)||void 0===g||g.call(y,e,this),null===(b=(w=ie(f,this).config).onSettled)||void 0===b||b.call(w,e,this.state.error,this),e}catch(e){var S,_,x,C;if(e instanceof Qr){if(e.silent)return ie(h,this).promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw se(v,this,uo).call(this,{type:"error",error:e}),null===(S=(_=ie(f,this).config).onError)||void 0===S||S.call(_,e,this),null===(x=(C=ie(f,this).config).onSettled)||void 0===x||x.call(C,this.state.data,e,this),e}finally{this.scheduleGc()}}});function ao(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}function uo(e){this.state=(t=>{var n;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...co(t.data,this.options),fetchMeta:null!==(n=e.meta)&&void 0!==n?n:null};case"success":const r={...t,...fo(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return le(d,this,e.manual?r:void 0),r;case"error":const o=e.error;
1return{...t,error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Kr.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),ie(f,this).notify({query:this,type:"updated",action:e})}))}function co(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xr(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function fo(e,t){return{data:e,dataUpdatedAt:null!=t?t:Date.now(),error:null,isInvalidated:!1,status:"success"}}function po(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!=r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ho=(y=new WeakMap,b=new WeakMap,w=new WeakMap,S=new WeakMap,_=new WeakMap,x=new WeakMap,C=new WeakMap,E=new WeakMap,R=new WeakMap,I=new WeakMap,k=new WeakMap,P=new WeakMap,O=new WeakMap,M=new WeakMap,T=new WeakMap,A=new WeakSet,class extends br{constructor(e,t){super(),ne(this,A),re(this,y,void 0),re(this,b,void 0),re(this,w,void 0),re(this,S,void 0),re(this,_,void 0),re(this,x,void 0),re(this,C,void 0),re(this,E,void 0),re(this,R,void 0),re(this,I,void 0),re(this,k,void 0),re(this,P,void 0),re(this,O,void 0),re(this,M,void 0),re(this,T,new Set),this.options=t,le(y,this,e),le(E,this,null),le(C,this,Gr()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(ie(b,this).addObserver(this),Co(ie(b,this),this.options)?se(A,this,go).call(this):this.updateResult(),se(A,this,bo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Eo(ie(b,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Eo(ie(b,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(A,this,wo).call(this),se(A,this,So).call(this),ie(b,this).removeObserver(this)}setOptions(e){const t=this.options,n=ie(b,this);if(this.options=ie(y,this).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof kr(this.options.enabled,ie(b,this)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(A,this,_o).call(this),ie(b,this).setOptions(this.options),t._defaulted&&!zr(this.options,t)&&ie(y,this).getQueryCache().notify({type:"observerOptionsUpdated",query:ie(b,this),observer:this});const r=this.hasListeners();r&&Ro(ie(b,this),n,this.options,t)&&se(A,this,go).call(this),this.updateResult(),!r||ie(b,this)===n&&kr(this.options.enabled,ie(b,this))===kr(t.enabled,ie(b,this))&&Ir(this.options.staleTime,ie(b,this))===Ir(t.staleTime,ie(b,this))||se(A,this,mo).call(this);const o=se(A,this,vo).call(this);!r||ie(b,this)===n&&kr(this.options.enabled,ie(b,this))===kr(t.enabled,ie(b,this))&&o===ie(M,this)||se(A,this,yo).call(this,o)}getOptimisticResult(e){const t=ie(y,this).getQueryCache().build(ie(y,this),e),n=this.createResult(t,e);return r=n,!zr(this.getCurrentResult(),r)&&(le(S,this,n),le(x,this,this.options),le(_,this,ie(b,this).state)),n;var r}getCurrentResult(){return ie(S,this)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),null==t||t(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==ie(C,this).status||ie(C,this).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){ie(T,this).add(e)}getCurrentQuery(){return ie(b,this)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=ie(y,this).defaultQueryOptions(e),n=ie(y,this).getQueryCache().build(ie(y,this),t);return n.fetch().then((()=>this.createResult(n,t)))}fetch(e){var t;return se(A,this,go).call(this,{...e,cancelRefetch:null===(t=e.cancelRefetch)||void 0===t||t}).then((()=>(this.updateResult(),ie(S,this))))}createResult(e,t){const n=ie(b,this),r=this.options,o=ie(S,this),i=ie(_,this),l=ie(x,this),s=e!==n?e.state:ie(w,this),{state:a}=e;let u,c={...a},d=!1;if(t._optimisticResults){const o=this.hasListeners(),i=!o&&Co(e,t),l=o&&Ro(e,n,t,r);(i||l)&&(c={...c,...co(a.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:f,errorUpdatedAt:p,status:h}=c;u=c.data;let g=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===h){let e;var m;null!=o&&o.isPlaceholderData&&t.placeholderData===(null==l?void 0:l.placeholderData)?(e=o.data,g=!0):e="function"==typeof t.placeholderData?t.placeholderData(null===(m=ie(k,this))||void 0===m?void 0:m.state.data,ie(k,this)):t.placeholderData,void 0!==e&&(h="success",u=qr(null==o?void 0:o.data,e,t),d=!0)}if(t.select&&void 0!==u&&!g)if(o&&u===(null==i?void 0:i.data)&&t.select===ie(R,this))u=ie(I,this);else try{le(R,this,t.select),u=t.select(u),u=qr(null==o?void 0:o.data,u,t),le(I,this,u),le(E,this,null)}catch(e){le(E,this,e)}ie(E,this)&&(f=ie(E,this),u=ie(I,this),p=Date.now(),h="error");const v="fetching"===c.fetchStatus,y="pending"===h,P="error"===h,O=y&&v,M=void 0!==u,T={status:h,fetchStatus:c.fetchStatus,isPending:y,isSuccess:"success"===h,isError:P,isInitialLoading:O,isLoading:O,data:u,dataUpdatedAt:c.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdate
1Count:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>s.dataUpdateCount||c.errorUpdateCount>s.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:P&&!M,isPaused:"paused"===c.fetchStatus,isPlaceholderData:d,isRefetchError:P&&M,isStale:Io(e,t),refetch:this.refetch,promise:ie(C,this),isEnabled:!1!==kr(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==T.data,r="error"===T.status&&!t,o=e=>{r?e.reject(T.error):t&&e.resolve(T.data)},i=()=>{const e=le(C,this,T.promise=Gr());o(e)},l=ie(C,this);switch(l.status){case"pending":e.queryHash===n.queryHash&&o(l);break;case"fulfilled":(r||T.data!==l.value)&&i();break;case"rejected":r&&T.error===l.reason||i()}}return T}updateResult(){const e=ie(S,this),t=this.createResult(ie(b,this),this.options);le(_,this,ie(b,this).state),le(x,this,this.options),void 0!==ie(_,this).data&&le(k,this,ie(b,this)),zr(t,e)||(le(S,this,t),se(A,this,xo).call(this,{listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!ie(T,this).size)return!0;const r=new Set(null!=n?n:ie(T,this));return this.options.throwOnError&&r.add("error"),Object.keys(ie(S,this)).some((t=>{const n=t;return ie(S,this)[n]!==e[n]&&r.has(n)}))})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(A,this,bo).call(this)}});function go(e){se(A,this,_o).call(this);let t=ie(b,this).fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(Cr)),t}function mo(){se(A,this,wo).call(this);const e=Ir(this.options.staleTime,ie(b,this));if(Ur.isServer()||ie(S,this).isStale||!Er(e))return;const t=Rr(ie(S,this).dataUpdatedAt,e)+1;le(P,this,_r.setTimeout((()=>{ie(S,this).isStale||this.updateResult()}),t))}function vo(){var e;return null!==(e="function"==typeof this.options.refetchInterval?this.options.refetchInterval(ie(b,this)):this.options.refetchInterval)&&void 0!==e&&e}function yo(e){se(A,this,So).call(this),le(M,this,e),!Ur.isServer()&&!1!==kr(this.options.enabled,ie(b,this))&&Er(ie(M,this))&&0!==ie(M,this)&&le(O,this,_r.setInterval((()=>{(this.options.refetchIntervalInBackground||wr.isFocused())&&se(A,this,go).call(this)}),ie(M,this)))}function bo(){se(A,this,mo).call(this),se(A,this,yo).call(this,se(A,this,vo).call(this))}function wo(){void 0!==ie(P,this)&&(_r.clearTimeout(ie(P,this)),le(P,this,void 0))}function So(){void 0!==ie(O,this)&&(_r.clearInterval(ie(O,this)),le(O,this,void 0))}function _o(){const e=ie(y,this).getQueryCache().build(ie(y,this),this.options);if(e===ie(b,this))return;const t=ie(b,this);le(b,this,e),le(w,this,e.state),this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}function xo(e){Kr.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(ie(S,this))})),ie(y,this).getQueryCache().notify({query:ie(b,this),type:"observerResultsUpdated"})}))}function Co(e,t){return function(e,t){return!1!==kr(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===kr(t.retryOnMount,e))}(e,t)||void 0!==e.state.data&&Eo(e,t,t.refetchOnMount)}function Eo(e,t,n){if(!1!==kr(t.enabled,e)&&"static"!==Ir(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Io(e,t)}return!1}function Ro(e,t,n,r){return(e!==t||!1===kr(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Io(e,n)}function Io(e,t){return!1!==kr(t.enabled,e)&&e.isStaleByTime(Ir(t.staleTime,e))}var ko=class extends ho{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var n;const{state:r}=e,o=super.createResult(e,t),{isFetching:i,isRefetching:l,isError:s,isRefetchError:a}=o,u=null===(n=r.fetchMeta)||void 0===n||null===(n=n.fetchMore)||void 0===n?void 0:n.direction,c=s&&"forward"===u,d=i&&"forward"===u,f=s&&"backward"===u,p=i&&"backward"===u;return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:io(t,r.data),hasPreviousPage:lo(t,r.data),isFetchNextPageError:c,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:a&&!c&&!f,isRefetching:l&&!d&&!p}}},Po=(N=new WeakMap,F=new WeakMap,z=new WeakMap,D=new WeakMap,L=new WeakSet,class extends to{constructor(e){super(),ne(this,L),re(this,N,void 0),re(this,F,void 0),re(this,z,void 0),re(this,D,void 0),le(N,this,e.client),this.mutationId=e.mutationId,le(z,this,e.mutationCache),le(F,this,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){ie(F,this).includes(e)||(ie(F,this).push(e),this.clearGcTimeout(),ie(z,this).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){le(F,this,ie(F,this).filter((t=>t!==e))),this.scheduleGc(),ie(z,this).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){ie(F,this).length||("pending"===this.state.status?this.scheduleGc():ie(z,this).remove(this))}continue(){var e,t;return null!==(e=null===(t=ie(D,this))||void 0===t?void 0:t.continue())&&void 0!==e?e:this.execute(this.state.variables)}async execute(e){var t;const n=()=>{se(L,this,Oo).call(this,{type:"continue"})},r={client:ie(N,this),meta:this.options.meta,mutationKey:this.options.mutationKey};le(D,this,eo({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{se(L,this,Oo).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{se(L,this,Oo).call(this,{type:"pause"})},onContinue:n,retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ie(z,this).canRun(this)}));const o="pending"===this.state.status,i=!ie(D,this).canStart();try{var l,s,a,u,c,d,f,p;if(o)n();else{var h,g;se(L,this,Oo).call(this,{type:"pending",variables:e,isPaused:i}),ie(z,this).config.onMutate&&await ie(z,this).config.onMutate(e,this,r);const t=await(null===(h=(g=this.options).onMutate)||void 0===h?void 0:h.call(g,e,r));t!==this.state.context&&se(L,this,Oo).call(this,{type:"pending",context:t,variables:e,isPaused:i})}const t=await ie(D,this).start();return await(null===(l=(s=ie(z,this).config).onSuccess)||void 0===l?void 0:l.call(s,t,e,this.state.context,this,r)),await(null===(a=(u=this.options).onSuccess)||void 0===a?void 0:a.call(u,t,e,this.state.context,r)),await(null===(c=(d=ie(z,this).config).onSettled)||void 0===c?void 0:c.call(
1d,t,null,this.state.variables,this.state.context,this,r)),await(null===(f=(p=this.options).onSettled)||void 0===f?void 0:f.call(p,t,null,e,this.state.context,r)),se(L,this,Oo).call(this,{type:"success",data:t}),t}catch(t){try{var m,v;await(null===(m=(v=ie(z,this).config).onError)||void 0===m?void 0:m.call(v,t,e,this.state.context,this,r))}catch(e){Promise.reject(e)}try{var y,b;await(null===(y=(b=this.options).onError)||void 0===y?void 0:y.call(b,t,e,this.state.context,r))}catch(e){Promise.reject(e)}try{var w,S;await(null===(w=(S=ie(z,this).config).onSettled)||void 0===w?void 0:w.call(S,void 0,t,this.state.variables,this.state.context,this,r))}catch(e){Promise.reject(e)}try{var _,x;await(null===(_=(x=this.options).onSettled)||void 0===_?void 0:_.call(x,void 0,t,e,this.state.context,r))}catch(e){Promise.reject(e)}throw se(L,this,Oo).call(this,{type:"error",error:t}),t}finally{ie(z,this).runNext(this)}}});function Oo(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Kr.batch((()=>{ie(F,this).forEach((t=>{t.onMutationUpdate(e)})),ie(z,this).notify({mutation:this,type:"updated",action:e})}))}var Mo=(V=new WeakMap,q=new WeakMap,$=new WeakMap,class extends br{constructor(e={}){super(),re(this,V,void 0),re(this,q,void 0),re(this,$,void 0),this.config=e,le(V,this,new Set),le(q,this,new Map),le($,this,0)}build(e,t,n){var r;const o=new Po({client:e,mutationCache:this,mutationId:le($,this,(r=ie($,this),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(o),o}add(e){ie(V,this).add(e);const t=To(e);if("string"==typeof t){const n=ie(q,this).get(t);n?n.push(e):ie(q,this).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(ie(V,this).delete(e)){const t=To(e);if("string"==typeof t){const n=ie(q,this).get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&ie(q,this).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=To(e);if("string"==typeof t){const n=ie(q,this).get(t),r=null==n?void 0:n.find((e=>"pending"===e.state.status));return!r||r===e}return!0}runNext(e){const t=To(e);if("string"==typeof t){var n,r;const o=null===(n=ie(q,this).get(t))||void 0===n?void 0:n.find((t=>
1t!==e&&t.state.isPaused));return null!==(r=null==o?void 0:o.continue())&&void 0!==r?r:Promise.resolve()}return Promise.resolve()}clear(){Kr.batch((()=>{ie(V,this).forEach((e=>{this.notify({type:"removed",mutation:e})})),ie(V,this).clear(),ie(q,this).clear()}))}getAll(){return Array.from(ie(V,this))}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Or(t,e)))}findAll(e={}){return this.getAll().filter((t=>Or(e,t)))}notify(e){Kr.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return Kr.batch((()=>Promise.all(e.map((e=>e.continue().catch(Cr))))))}});function To(e){var t;return null===(t=e.options.scope)||void 0===t?void 0:t.id}var Ao=(j=new WeakMap,class extends br{constructor(e={}){super(),re(this,j,void 0),this.config=e,le(j,this,new Map)}build(e,t,n){var r;const o=t.queryKey,i=null!==(r=t.queryHash)&&void 0!==r?r:Mr(o,t);let l=this.get(i);return l||(l=new so({client:e,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o)}),this.add(l)),l}add(e){ie(j,this).has(e.queryHash)||(ie(j,this).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=ie(j,this).get(e.queryHash);t&&(e.destroy(),t===e&&ie(j,this).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Kr.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return ie(j,this).get(e)}getAll(){return[...ie(j,this).values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>Pr(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>Pr(e,t))):t}notify(e){Kr.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){Kr.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){Kr.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}}),No=(W=new WeakMap,B=new WeakMap,H=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,K=new WeakMap,J=new WeakMap,class{constructor(e={}){re(this,W,void 0),re(this,B,void 0),re(this,H,void 0),re(this,U,void 0),re(this,G,void 0),re(this,Z,void 0),re(this,K,void 0),re(this,J,void 0),le(W,this,e.queryCache||new Ao),le(B,this,e.mutationCache||new Mo),le(H,this,e.defaultOptions||{}),le(U,this,new Map),le(G,this,new Map),le(Z,this,0)}mount(){var e;le(Z,this,(e=ie(Z,this),++e)),1===ie(Z,this)&&(le(K,this,wr.subscribe((async e=>{e&&(await this.resumePausedMutations(),ie(W,this).onFocus())}))),le(J,this,Jr.subscribe((async e=>{e&&(await this.resumePausedMutations(),ie(W,this).onOnline())}))))}unmount(){var e,t,n;le(Z,this,(e=ie(Z,this),--e)),0===ie(Z,this)&&(null===(t=ie(K,this))||void 0===t||t.call(this),le(K,this,void 0),null===(n=ie(J,this))||void 0===n||n.call(this),le(J,this,void 0))}isFetching(e){return ie(W,this).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ie(B,this).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=ie(W,this).get(n.queryHash))||void 0===t?void 0:t.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=ie(W,this).build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ir(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return ie(W,this).findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=ie(W,this).get(r.queryHash),i=function(e,t){return"function"==typeof e?e(t):e}(t,null==o?void 0:o.state.data);if(void 0!==i)return ie(W,this).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Kr.batch((()=>ie(W,this).findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=ie(W,this).get(n.queryHash))||void 0===t?void 0:t.state}removeQueries(e){const t=ie(W,this);Kr.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=ie(W,this);return Kr.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries({type:"active",...e},t))))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Kr.batch((()=>ie(W,this).findAll(e).map((e=>e.cancel(n)))));return Promise.all(r).then(Cr).catch(Cr)}invalidateQueries(e,t={}){return Kr.batch((()=>{var n,r;return ie(W,this).findAll(e).forEach((e=>
1{e.invalidate()})),"none"===(null==e?void 0:e.refetchType)?Promise.resolve():this.refetchQueries({...e,type:null!==(n=null!==(r=null==e?void 0:e.refetchType)&&void 0!==r?r:null==e?void 0:e.type)&&void 0!==n?n:"active"},t)}))}refetchQueries(e,t={}){var n;const r={...t,cancelRefetch:null===(n=t.cancelRefetch)||void 0===n||n},o=Kr.batch((()=>ie(W,this).findAll(e).filter((e=>!e.isDisabled()&&!e.isStatic())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(Cr)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(o).then(Cr)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=ie(W,this).build(this,t);return n.isStaleByTime(Ir(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Cr).catch(Cr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Cr).catch(Cr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Jr.isOnline()?ie(B,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return ie(W,this)}getMutationCache(){return ie(B,this)}getDefaultOptions(){return ie(H,this)}setDefaultOptions(e){le(H,this,e)}setQueryDefaults(e,t){ie(U,this).set(Tr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ie(U,this).values()],n={};return t.forEach((t=>{Ar(e,t.queryKey)&&Object.assign(n,t.defaultOptions)})),n}setMutationDefaults(e,t){ie(G,this).set(Tr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ie(G,this).values()],n={};return t.forEach((t=>{Ar(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ie(H,this).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mr(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Wr&&(t.enabled=!1),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...ie(H,this).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ie(W,this).clear(),ie(B,this).clear()}});function Fo(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch(e){}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var zo=Fo(Dn),Do=/["&<]/;function Lo(e){if(0===e.length||!1===Do.test(e))return e;for(var t=0,n=0,r="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=o,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var Vo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,qo=0,$o=Array.isArray;function jo(e,t,n,r,o,i){t||(t={});var l,s,a=t;if("ref"in a)for(s in a={},t)"ref"==s?l=t[s]:a[s]=t[s];var u={type:e,props:a,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--qo,__i:-1,__u:0,__source:o,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===a[s]&&(a[s]=l[s]);return ue.vnode&&ue.vnode(u),u}var Wo,Bo,Ho={},Uo=/[A-Z]/g,Go=Object.freeze({__proto__:null,Fragment:Ae,jsx:jo,jsxAttr:function(e,t){if(ue.attr){var n=ue.attr(e,t);if("string"==typeof n)return n}if(t=function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.valueOf?e.valueOf():e}(t),"ref"===e||"key"===e)return"";if("style"===e&&"object"==typeof t){var r="";for(var o in t){var i=t[o];
1if(null!=i&&""!==i){var l="-"==o[0]?o:Ho[o]||(Ho[o]=o.replace(Uo,"-$&").toLowerCase()),s=";";"number"!=typeof i||l.startsWith("--")||Vo.test(l)||(s="px;"),r=r+l+":"+i+s}}return e+'="'+Lo(r)+'"'}return null==t||!1===t||"function"==typeof t||"object"==typeof t?"":!0===t?e:e+'="'+Lo(""+t)+'"'},jsxDEV:jo,jsxEscape:function e(t){if(null==t||"boolean"==typeof t||"function"==typeof t)return null;if("object"==typeof t){if(void 0===t.constructor)return t;if($o(t)){for(var n=0;n<t.length;n++)t[n]=e(t[n]);return t}}return Lo(""+t)},jsxTemplate:function(e){var t=jo(Ae,{tpl:e,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t},jsxs:jo}),Zo=Bo?Wo:(Bo=1,Wo=Fo(Go)),Ko=rt(void 0),Jo=e=>{const t=Rt(Ko);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yo=({client:e,children:t})=>(wt((()=>(e.mount(),()=>{e.unmount()})),[e]),Zo.jsx(Ko.Provider,{value:e,children:t})),Xo=rt(!1);Xo.Provider;var Qo=rt(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),ei=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function ti(e,t,n){var r,o,i,l;const s=Rt(Xo),a=Rt(Qo),u=Jo(),c=u.defaultQueryOptions(e);
1null===(r=u.getDefaultOptions().queries)||void 0===r||null===(o=r._experimental_beforeQuery)||void 0===o||o.call(r,c);const d=u.getQueryCache().get(c.queryHash),f=!1!==e.subscribed;c._optimisticResults=s?"isRestoring":f?"optimistic":void 0,(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(null!=e?e:t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(c),((e,t,n)=>{const r=null!=n&&n.state.error&&"function"==typeof e.throwOnError?Hr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))})(c,a,d),(e=>{wt((()=>{e.clearReset()}),[e])})(a);const p=!u.getQueryCache().get(c.queryHash),[h]=yt((()=>new t(u,c))),g=h.getOptimisticResult(c),m=!s&&f;if(Lt(Et((e=>{const t=m?h.subscribe(Kr.batchCalls(e)):Cr;return h.updateResult(),t}),[h,m]),(()=>h.getCurrentResult())),wt((()=>{h.setOptions(c)}),[c,h]),((e,t)=>(null==e?void 0:e.suspense)&&t.isPending)(c,g))throw ei(c,h,a);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&void 0===e.data||Hr(n,[e.error,r])))({result:g,errorResetBoundary:a,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;if(null===(i=u.getDefaultOptions().queries)||void 0===i||null===(l=i._experimental_afterQuery)||void 0===l||l.call(i,c,g),c.experimental_prefetchInRender&&!Ur.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(g,s)){const e=p?ei(c,h,a):null==d?void 0:d.promise;null==e||e.catch(Cr).finally((()=>{h.updateResult()}))}return c.notifyOnChangeProps?g:h.trackResult(g)}function ni(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ni(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ri(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ni(e))&&(r&&(r+=" "),r+=t);return r}var oi=function(){return oi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},oi.apply(this,arguments)};function ii(e,t){for(var n={},r={},o=e.split("~~"),i=!1,l=0;o.length>l;l++){for(var s=o[l].split("~"),a=0;a<s.length;a+=2){var u=s[a],c=s[a+1],d="&"+u+";";n[d]=c,i&&(n["&"+u]=c),r[c]=d}i=!0}return t?{entities:oi(oi({},n),t.entities),characters:oi(oi({},r),t.characters)}:{entities:n,characters:r}}var li={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/&notin;|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/&centerdot;|&copysr;|&divideontimes;|&gtcc;|&gtcir;|&gtdot;|&gtlPar;|&gtquest;|&gtrapprox;|&gtrarr;|&gtrdot;|&gtreqless;|&gtreqqless;|&gtrless;|&gtrsim;|&ltcc;|&ltcir;|&ltdot;|&lthree;|&ltimes;|&ltlarr;|&ltquest;|&ltrPar;|&ltri;|&ltrie;|&ltrif;|&notin;|&notinE;|&notindot;|&notinva;|&notinvb;|&notinvc;|&notni;|&notniva;|&notnivb;|&notnivc;|&parallel;|&timesb;|&timesbar;|&timesd;|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g},si={};si.xml=ii("lt~<~gt~>
1~quot~\"~apos~'~amp~&"),si.html4=ii("apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~‌~zwj~‍~lrm~‎~rlm~‏~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~­~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~\"~amp~&~lt~<~gt~>"),si.html5=ii('
vendor: 7,275 bytes, line 1
1Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~⁡~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~⁣~InvisibleTimes~⁢~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~​~NegativeThickSpace~​~NegativeThinSpace~​~NegativeVeryThinSpace~​~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~⁠~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~\t~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~  ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcir
vendor: 14,923 bytes, line 1
1c~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~​~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~⁡~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~⁣~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~⁢~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~
1"~REG~®',si.html4);var ai={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},ui=String.fromCodePoint||function(e){return String.fromCharCode(Math.floor((e-65536)/1024)+55296,(e-65536)%1024+56320)},ci=function(){return ci=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ci.apply(this,arguments)},di=ci(ci({},si),{all:si.html5}),fi={scope:"body",level:"all"},pi=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,hi=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,gi={xml:{strict:pi,attribute:hi,body:li.xml},html4:{strict:pi,attribute:hi,body:li.html4},html5:{strict:pi,attribute:hi,body:li.html5}},mi=ci(ci({},gi),{all:gi.html5}),vi=String.fromCharCode,yi=vi(65533);const bi=e=>e.includes("&")?function(e,t){var n=void 0===t?fi:t,r=n.level,o=void 0===r?"all":r,i=n.scope;if(!e)return"";var l=mi[o][i],s=di[o].entities;return e.replace(l,(function(e){return function(e,t){var n=e;e[e.length-1];var r=t[e];if(r)n=r;else if("&"===e[0]&&"#"===e[1]){var o=e[2],i="x"==o||"X"==o?parseInt(e.substr(3),16):parseInt(e.substr(2));n=i>=1114111?yi:i>65535?ui(i):vi(ai[i]||i)}return n}(e,s)}))}(e,{level:"html5",scope:"body"}):e,wi={show:"Show",perPage:"per page",all:"All",showingRangeOfTotal:({start:e,end:t,total:n})=>`Showing ${e}-${t} of ${n}`,showingRangeToTotal:({start:e,end:t,total:n})=>`Showing ${e} to ${t} of ${n}`,itemsPerPageOption:({count:e})=>`${e} / page`,firstPage:"First page",previousPage:"Previous page",page:({page:e})=>`Page ${e}`,nextPage:"Next page",lastPage:"Last page",tableView:"Table view",gridView:"Grid view",selectAll:"Select all",resetFilters:"Reset Filters",reset:"Reset",searchPlaceholder:"Search...",searchTableData:"Search table data",clearSearch:"Clear search",selectFilter:({filterName:e})=>`Select ${e}`,clearSelection:"Clear selection",clearAllSelections:"Clear all selections",searchFilter:({filterName:e})=>`Search ${e}`,searchFilterPlaceholder:({filterName:e})=>`Search ${e}...`,noResultsFound:"No results found",activeSearch:({query:e})=>`Search: ${e}`,removeActiveItem:({label:e})=>`Remove ${e}`,filterBy:({filterName:e})=>`Filter by ${e}`,clear:"Clear",sort:"Sort",sortByColumn:({columnName:e})=>`Sort by ${e}`,columnOptionsFor:({columnName:e})=>`Column options for ${e}`,sortAscending:"Sort ascending",sortDescending:"Sort descending",switchToPrimarySort:"Switch to primary sort",switchToSecondarySort:"Switch to secondary sort",setAsPrimarySort:"Set as primary sort",setAsSecondarySort:"Set as secondary sort",replacePrimarySort:({columnName:e})=>`Replace ${e} as primary sort`,replaceSecondarySort:({columnName:e})=>`Replace ${e} as secondary sort`,loadingMore:"Loading more...",loadingMoreItems:"Loading more items...",noMoreItemsToLoad:"No more items to load",allItemsLoaded:"All items loaded",noDataAvailable:"No data available",noFilteredDataAvailable:"No data available",noItemsFound:"No items found",noFilteredItemsFound:"No items found",adjustFiltersOrSearch:"Try adjusting your filters or search criteria",details:"Details",close:"Close",additionalRowDetail
1s:"Additional row details",expandRowDetails:"Expand row details",collapseRowDetails:"Collapse row details",openLightboxFor:({label:e})=>`Open lightbox for ${e}`,image:"image",filterByTerm:({term:e})=>`Filter by ${e}`},Si=rt({displayMode:"table",i18n:wi}),_i=Si.Provider,xi=()=>Rt(Si),Ci=rt({selectedItems:new Map,selectItem:()=>{},deselectItem:()=>{},selectAll:()=>{},deselectAll:()=>{},containerRef:null,selectedCount:0,isActionLoading:!1}),Ei=Ci.Provider;var Ri;function Ii(e,t,n){var r;function o(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:s,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);const o=s.prototype,i=Object.keys(o);for(let e=0;e<i.length;e++){const t=i[e];t in n||(n[t]=o[t].bind(n))}}const i=null!==(r=null==n?void 0:n.Parent)&&void 0!==r?r:Object;class l extends i{}function s(e){var t,r;const i=null!=n&&n.Parent?new l:this;o(i,e),null!==(t=(r=i._zod).deferred)&&void 0!==t||(r.deferred=[]);for(const e of i._zod.deferred)e();return i}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:t=>{var r;return!!(null!=n&&n.Parent&&t instanceof n.Parent)||(null==t||null===(r=t._zod)||void 0===r||null===(r=r.traits)||void 0===r?void 0:r.has(e))}}),Object.defineProperty(s,"name",{value:e}),s}class ki extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Pi extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}null!==(Y=(Ri=globalThis).__zod_globalConfig)&&void 0!==Y||(Ri.__zod_globalConfig={});const Oi=globalThis.__zod_globalConfig;function Mi(e){return Oi}function Ti(e){const t=Object.values(e).filter((e=>"number"==typeof e)),n=Object.entries(e).filter((([e,n])=>-1===t.indexOf(+e))).map((([e,t])=>t));return n}function Ai(e,t){return"bigint"==typeof t?t.toString():t}function Ni(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Fi(e){return null==e}function zi(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Di=Symbol("evaluating");function Li(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Di)return void 0===r&&(r=Di,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Vi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qi(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function $i(e){return JSON.stringify(e)}const ji="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Wi(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Bi=Ni((()=>{var e;if(Oi.jitless)return!1;if("undefined"!=typeof navigator&&null!==(e=navigator)&&void 0!==e&&null!==(e=e.userAgent)&&void 0!==e&&e.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function Hi(e){if(!1===Wi(e))return!1;const t=e.constructor;if(void 0===t)return!0;if("function"!=typeof t)return!0;const n=t.prototype;return!1!==Wi(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function Ui(e){return Hi(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Gi=new Set(["string","number","symbol"]);function Zi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ki(e,t,n){const r=new e._zod.constr(null!=t?t:e._zod.def);return(!t||null!=n&&n.parent)&&(r._zod.parent=e),r}function Ji(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==(null==t?void 0:t.message)){if(void 0!==(null==t?void 0:t.error))throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const Yi={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Xi(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++){var n;if(!0!==(null===(n=e.issues[r])||void 0===n?void 0:n.continue))return!0}return!1}function Qi(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++){var n;if(!1===(null===(n=e.issues[r])||void 0===n?void 0:n.continue))return!0}return!1}function el(e,t){return t.map((t=>{var n,r;return null!==(n=(r=t).path)&&void 0!==n||(r.path=[]),t.path.unshift(e),t}))}function tl(e){return"string"==typeof e?e:null==e?void 0:e.message}function nl(e,t,n){var r,o,i,l,s,a,u,c,d,f;const p=e.message?e.message:null!==(r=null!==(o=null!==(i=null!==(l=tl(null===(s=e.inst)||void 0===s||null===(s=s._zod.def)||void 0===s||null===(a=s.error)||void 0===a?void 0:a.call(s,e)))&&void 0!==l?l:tl(null==t||null===(u=t.error)||void 0===u?void 0:u.call(t,e)))&&void 0!==i?i:tl(null===(c=n.customError)||void 0===c?void 0:c.call(n,e)))&&void 0!==o?o:tl(null===(d=n.localeError)||void 0===d?void 0:d.call(n,e)))&&void 0!==r?r:"Invalid input",{inst:h,continue:g,input:m,...v}=e;return null!==(f=v.path)&&void 0!==f||(v.path=[]),v.message=p,null!=t&&t.reportInput&&(v.input=m),v}function rl(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function ol(...e){const[t,n,r]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:r}:{...t}}const il=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ai,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ll=Ii("$ZodError",il),sl=Ii("$ZodError",il,{Parent:Error}),al=e=>(t,n,r,o)=>{const i=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new ki;if(l.issues.length){var s;const t=new(null!==(s=null==o?void 0:o.Err)&&void 0!==s?s:e)(l.issues.map((e=>nl(e,i,Mi()))));throw ji(t,null==o?void 0:o.callee),t}return l.value},ul=e=>async(t,n,r,o)=>{const i=r?{...r,async:!0}:{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){var s;const t=new(null!==(s=null==o?void 0:o.Err)&&void 0!==s?s:e)(l.issues.map((e=>nl(e,i,Mi()))));throw ji(t,null==o?void 0:o.callee),t}return l.value},cl=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new ki;return i.issues.length?{success:!1,error:new(null!=e?e:ll)(i.issues.map((e=>nl(e,o,Mi()))))}:{success:!0,data:i.value}},dl=cl(sl),fl=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map((e=>nl(e,o,Mi()))))}:{success:!0,data:i.value}},pl=fl(sl),hl=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return al(e)(t,n,o)},gl=e=>(t,n,r)=>al(e)(t,n,r),ml=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ul(e)(t,n,o)},vl=e=>async(t,n,r)=>ul(e)(t,n,r),yl=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return cl(e)(t,n,o)},bl=e=>(t,n,r)=>cl(e)(t,n,r),wl=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return fl(e)(t,n,o)},Sl=e=>async(t,n,r)=>fl(e)(t,n,r),_l=/^[cC][0-9a-z]{6,}
1$/,xl=/^[0-9a-z]+$/,Cl=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,El=/^[0-9a-vA-V]{20}$/,Rl=/^[A-Za-z0-9]{27}$/,Il=/^[a-zA-Z0-9_-]{21}$/,kl=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pl=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ol=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ml=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Tl=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Al=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Nl=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Fl=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dl=/^[A-Za-z0-9_-]*$/,Ll=/^https?$/,Vl=/^\+[1-9]\d{6,14}$/,ql="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",$l=new RegExp(`^${ql}$`);function jl(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const Wl=/^-?\d+$/,Bl=/^-?\d+(?:\.\d+)?$/,Hl=/^(?:true|false)$/i,Ul=/^[^A-Z]*$/,Gl=/^[^a-z]*$/,Zl=Ii("$ZodCheck",((e,t)=>{var n,r,o;null!==(n=e._zod)&&void 0!==n||(e._zod={}),e._zod.def=t,null!==(r=(o=e._zod).onattach)&&void 0!==r||(o.onattach=[])})),Kl={number:"number",bigint:"bigint",object:"date"},Jl=Ii("$ZodCheckLessThan",((e,t)=>{Zl.init(e,t);const n=Kl[typeof t.value];e._zod.onattach.push((e=>{var n;const r=e._zod.bag,o=null!==(n=t.inclusive?r.maximum:r.exclusiveMaximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Yl=Ii("$ZodCheckGreaterThan",((e,t)=>{Zl.init(e,t);const n=Kl[typeof t.value];e._zod.onattach.push((e=>{var n;const r=e._zod.bag,o=null!==(n=t.inclusive?r.minimum:r.exclusiveMinimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)})),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),Xl=Ii("$ZodCheckMultipleOf",((e,t)=>{Zl.init(e,t),e._zod.onattach.push((e=>{var n,r;null!==(n=(r=e._zod.bag).multipleOf)&&void 0!==n||(r.multipleOf=t.value)})),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),Ql=Ii("$ZodCheckNumberFormat",((e,t)=>{var n;Zl.init(e,t),t.format=t.format||"float64";const r=null===(n=t.format)||void 0===n?void 0:n.includes("int"),o=r?"int":"number",[i,l]=Yi[t.format];e._zod.onattach.push((e=>{const n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=l,r&&(n.pattern=Wl)})),e._zod.check=n=>{const s=n.value;if(r){if(!Number.isInteger(s))return void n.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>
10?n.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):n.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}))}s<i&&n.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>l&&n.issues.push({origin:"number",input:s,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}})),es=Ii("$ZodCheckMaxLength",((e,t)=>{var n,r;Zl.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=e=>{const t=e.value;return!Fi(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{var n;const r=null!==(n=e._zod.bag.maximum)&&void 0!==n?n:Number.POSITIVE_INFINITY;t.maximum<r&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const o=rl(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),ts=Ii("$ZodCheckMinLength",((e,t)=>{var n,r;Zl.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=e=>{const t=e.value;return!Fi(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{var n;const r=null!==(n=e._zod.bag.minimum)&&void 0!==n?n:Number.NEGATIVE_INFINITY;t.minimum>r&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const o=rl(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}})),ns=Ii("$ZodCheckLengthEquals",((e,t)=>{var n,r;Zl.init(e,t),null!==(n=(r=e._zod.def).when)&&void 0!==n||(r.when=e=>{const t=e.value;return!Fi(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=n=>{const r=n.value,o=r.length;if(o===t.length)return;const i=rl(r),l=o>t.length;n.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}})),rs=Ii("$ZodCheckStringFormat",((e,t)=>{var n,r,o,i;Zl.init(e,t),e._zod.onattach.push((e=>{const n=e._zod.bag;var r;n.format=t.format,t.pattern&&(null!==(r=n.patterns)&&void 0!==r||(n.patterns=new Set),n.patterns.add(t.pattern))})),t.pattern?null!==(n=(o=e._zod).check)&&void 0!==n||(o.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):null!==(r=(i=e._zod).check)&&void 0!==r||(i.check=()=>{})})),os=Ii("$ZodCheckRegex",((e,t)=>{rs.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}})),is=Ii("$ZodCheckLowerCase",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Ul),rs.init(e,t)})),ls=Ii("$ZodCheckUpperCase",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Gl),rs.init(e,t)})),ss=Ii("$ZodCheckIncludes",((e,t)=>{Zl.init(e,t);const n=Zi(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push((e=>{var t;const n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}})),as=Ii("$ZodCheckStartsWith",((e,t)=>
1{var n;Zl.init(e,t);const r=new RegExp(`^${Zi(t.prefix)}.*`);null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push((e=>{var t;const n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}})),us=Ii("$ZodCheckEndsWith",((e,t)=>{var n;Zl.init(e,t);const r=new RegExp(`.*${Zi(t.suffix)}$`);null!==(n=t.pattern)&&void 0!==n||(t.pattern=r),e._zod.onattach.push((e=>{var t;const n=e._zod.bag;null!==(t=n.patterns)&&void 0!==t||(n.patterns=new Set),n.patterns.add(r)})),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}})),cs=Ii("$ZodCheckOverwrite",((e,t)=>{Zl.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));class ds{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter((e=>e)),n=Math.min(...t.map((e=>e.length-e.trimStart().length))),r=t.map((e=>e.slice(n))).map((e=>" ".repeat(2*this.indent)+e));for(const e of r)this.content.push(e)}compile(){var e;const t=Function,n=null==this?void 0:this.args,r=[...(null!==(e=null==this?void 0:this.content)&&void 0!==e?e:[""]).map((e=>`  ${e}`))];return new t(...n,r.join("\n"))}}const fs={major:4,minor:4,patch:3},ps=Ii("$ZodType",((e,t)=>{var n,r;null!=e||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fs;const o=[...null!==(n=e._zod.def.checks)&&void 0!==n?n:[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const t of o)for(const n of t._zod.onattach)n(e);if(0===o.length){var i,l;null!==(i=(r=e._zod).deferred)&&void 0!==i||(r.deferred=[]),null===(l=e._zod.deferred)||void 0===l||l.push((()=>{e._zod.run=e._zod.parse}))}else{const t=(e,t,n)=>{let r,o=Xi(e);for(const i of t){if(i._zod.def.when){if(Qi(e))continue;if(!i._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,l=i._zod.check(e);if(l instanceof Promise&&!1===(null==n?void 0:n.async))throw new ki;if(r||l instanceof Promise)r=(null!=r?r:Promise.resolve()).then((async()=>{await l,e.issues.length!==t&&(o||(o=Xi(e,t)))}));else{if(e.issues.length===t)continue;o||(o=Xi(e,t))}}return r?r.then((()=>e)):e},n=(n,r,i)=>{if(Xi(n))return n.aborted=!0,n;const l=t(r,o,i);if(l instanceof Promise){if(!1===i.async)throw new ki;return l.then((t=>e._zod.parse(t,i)))}return e._zod.parse(l,i)};e._zod.run=(r,i)=>{if(i.skipChecks)return e._zod.parse(r,i);if("backward"===i.direction){const t=e._zod.parse({value:r.value,issues:[]},{...i,skipChecks:!0});return t instanceof Promise?t.then((e=>n(e,r,i))):n(t,r,i)}const l=e._zod.parse(r,i);if(l instanceof Promise){if(!1===i.async)throw new ki;return l.then((e=>t(e,o,i)))}return t(l,o,i)}}Li(e,"~standard",(()=>({validate:t=>{try{var n;const r=dl(e,t);return r.success?{value:r.data}:{issues:null===(n=r.error)||void 0===n?void 0:n.issues}}catch(n){return pl(e,t).then((e=>{var t;return e.success?{value:e.data}:{issues:null===(t=e.error)||void 0===t?void 0:t.issues}}))}},vendor:"zod",version:1})))})),hs=Ii("$ZodString",((e,t)=>{var n,r,o;ps.init(e,t),e._zod.pattern=null!==(n=[...null!==(r=null==e||null===(o=e._zod.bag)||void 0===o?void 0:o.patterns)&&void 0!==r?r:[]].pop())&&void 0!==n?n:(e=>{var t,n;const r=e?`[\\s\\S]{${null!==(t=null==e?void 0:e.minimum)&&void 0!==t?t:0},${null!==(n=null==e?void 0:e.maximum)&&void 0!==n?n:""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)})(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch(r){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}})),gs=Ii("$ZodStringFormat",((e,t)=>{rs.init(e,t),hs.init(e,t)})),ms=Ii("$ZodGUID",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Pl),gs.init(e,t)})),vs=Ii("$ZodUUID",((e,t)=>{var n;if(t.version){var r;const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);null!==(r=t.pattern)&&void 0!==r||(t.pattern=Ol(e))}
vendor: 4,243 bytes, line 1
1else null!==(n=t.pattern)&&void 0!==n||(t.pattern=Ol());gs.init(e,t)})),ys=Ii("$ZodEmail",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Ml),gs.init(e,t)})),bs=Ii("$ZodURL",((e,t)=>{gs.init(e,t),e._zod.check=n=>{try{var r;const o=n.value.trim();if(!t.normalize&&(null===(r=t.protocol)||void 0===r?void 0:r.source)===Ll.source&&!/^https?:\/\//i.test(o))return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});const i=new URL(o);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=i.href:n.value=o)}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}})),ws=Ii("$ZodEmoji",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),gs.init(e,t)})),Ss=Ii("$ZodNanoID",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Il),gs.init(e,t)})),_s=Ii("$ZodCUID",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=_l),gs.init(e,t)})),xs=Ii("$ZodCUID2",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=xl),gs.init(e,t)})),Cs=Ii("$ZodULID",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Cl),gs.init(e,t)})),Es=Ii("$ZodXID",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=El),gs.init(e,t)})),Rs=Ii("$ZodKSUID",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Rl),gs.init(e,t)})),Is=Ii("$ZodISODateTime",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=function(e){const t=jl({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ql}T(?:${r})$`)}(t)),gs.init(e,t)})),ks=Ii("$ZodISODate",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=$l),gs.init(e,t)})),Ps=Ii("$ZodISOTime",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=new RegExp(`^${jl(t)}$`)),gs.init(e,t)})),Os=Ii("$ZodISODuration",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=kl),gs.init(e,t)})),Ms=Ii("$ZodIPv4",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Tl),gs.init(e,t),e._zod.bag.format="ipv4"})),Ts=Ii("$ZodIPv6",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Al),gs.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}})),As=Ii("$ZodCIDRv4",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Nl),gs.init(e,t)})),Ns=Ii("$ZodCIDRv6",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Fl),gs.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(2!==r.length)throw new Error;const[e,t]=r;if(!t)throw new Error;const n=Number(t);if(`${n}`!==t)throw new Error;if(n<0||n>128)throw new Error;new URL(`http://[${e}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}}));function Fs(e){if(""===e)return!0;if(/\s/.test(e))return!1;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const zs=Ii("$ZodBase64",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=zl),gs.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Fs(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),Ds=Ii("$ZodBase64URL",((e,t)=>{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Dl),gs.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{(function(e){if(!Dl.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return Fs(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}})),Ls=Ii("$ZodE164",((e,t)=>
vendor: 1,274 bytes, line 1
1{var n;null!==(n=t.pattern)&&void 0!==n||(t.pattern=Vl),gs.init(e,t)})),Vs=Ii("$ZodJWT",((e,t)=>{gs.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&"JWT"!==(null==o?void 0:o.typ)||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),qs=Ii("$ZodNumber",((e,t)=>{var n;ps.init(e,t),e._zod.pattern=null!==(n=e._zod.bag.pattern)&&void 0!==n?n:Bl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const i="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),n}})),$s=Ii("$ZodNumberFormat",((e,t)=>{Ql.init(e,t),qs.init(e,t)})),js=Ii("$ZodBoolean",((e,t)=>{ps.init(e,t),e._zod.pattern=Hl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}})),Ws=Ii("$ZodUnknown",((e,t)=>
1{ps.init(e,t),e._zod.parse=e=>e})),Bs=Ii("$ZodNever",((e,t)=>{ps.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}));function Hs(e,t,n){e.issues.length&&t.issues.push(...el(n,e.issues)),t.value[n]=e.value}const Us=Ii("$ZodArray",((e,t)=>{ps.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let e=0;e<o.length;e++){const l=o[e],s=t.element._zod.run({value:l,issues:[]},r);s instanceof Promise?i.push(s.then((t=>Hs(t,n,e)))):Hs(s,n,e)}return i.length?Promise.all(i).then((()=>n)):n}}));function Gs(e,t,n,r,o,i){const l=n in r;if(e.issues.length){if(o&&i&&!l)return;t.issues.push(...el(n,e.issues))}l||o?void 0===e.value?l&&(t.value[n]=void 0):t.value[n]=e.value:e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]})}function Zs(e){const t=Object.keys(e.shape);for(const r of t){var n;if(null===(n=e.shape)||void 0===n||null===(n=n[r])||void 0===n||null===(n=n._zod)||void 0===n||null===(n=n.traits)||void 0===n||!n.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`)}const r=(o=e.shape,Object.keys(o).filter((e=>"optional"===o[e]._zod.optin&&"optional"===o[e]._zod.optout)));var o;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Ks(e,t,n,r,o,i){const l=[],s=o.keySet,a=o.catchall._zod,u=a.def.type,c="optional"===a.optin,d="optional"===a.optout;for(const o in t){if("__proto__"===o)continue;if(s.has(o))continue;if("never"===u){l.push(o);continue}const i=a.run({value:t[o],issues:[]},r);i instanceof Promise?e.push(i.then((e=>Gs(e,n,o,t,c,d)))):Gs(i,n,o,t,c,d)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then((()=>n)):n}const Js=Ii("$ZodObject",((e,t)=>{ps.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(null==n||!n.get){const e=t.shape;Object.defineProperty(t,"shape",{get:()=>{const n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}const r=Ni((()=>Zs(t)));Li(e._zod,"propValues",(()=>{const e=t.shape,n={};for(const t in e){const o=e[t]._zod;if(o.values){var r;null!==(r=n[t])&&void 0!==r||(n[t]=new Set);for(const e of o.values)n[t].add(e)}}return n}));const o=Wi,i=t.catchall;let l;e._zod.parse=(t,n)=>{null!=l||(l=r.value);const s=t.value;if(!o(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const a=[],u=l.shape;for(const e of l.keys){const r=u[e],o="optional"===r._zod.optin,i="optional"===r._zod.optout,l=r._zod.run({value:s[e],issues:[]},n);l instanceof Promise?a.push(l.then((n=>Gs(n,t,e,s,o,i)))):Gs(l,t,e,s,o,i)}return i?Ks(a,s,t,n,r.value,e):a.length?Promise.all(a).then((()=>t)):t}})),Ys=Ii("$ZodObjectJIT",((e,t)=>{Js.init(e,t);const n=e._zod.parse,r=Ni((()=>Zs(t)));let o;const i=Wi,l=!Oi.jitless,s=l&&Bi.value,a=t.catchall;let u;e._zod.parse=(c,d)=>{null!=u||(u=r.value);const f=c.value;return i(f)?l&&s&&!1===(null==d?void 0:d.async)&&!0!==d.jitless?(o||(o=(e=>{const t=new ds(["shape","payload","ctx"]),n=r.value,o=e=>{const t=$i(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const i=Object.create(null);let l=0;for(const e of n.keys)i[e]="key_"+l++;t.write("const newResult = {};");for(const r of n.keys){var s,a;const n=i[r],l=$i(r),u=e[r],c="optional"===(null==u||null===(s=u._zod)||void 0===s?void 0:s.optin),d="optional"===(null==u||null===(a=u._zod)||void 0===a?void 0:a.optout);t.write(`const ${n} = ${o(r)};`),c&&d?t.write(`\n        if (${n}.issues.length) {\n          if (${l} in input) {\n            payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n              ...iss,\n              path: iss.path ? [${l}, ...iss.path] : [${l}]\n            })));\n          }\n        }\n        \n        if (${n}.value === undefined) {\n          if (${l} in input) {\n            newResult[${l}] = undefined;\n          }\n        } else {\n          newResult[${l}
1] = ${n}.value;\n        }\n        \n      `):c?t.write(`\n        if (${n}.issues.length) {\n          payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n            ...iss,\n            path: iss.path ? [${l}, ...iss.path] : [${l}]\n          })));\n        }\n        \n        if (${n}.value === undefined) {\n          if (${l} in input) {\n            newResult[${l}] = undefined;\n          }\n        } else {\n          newResult[${l}] = ${n}.value;\n        }\n        \n      `):t.write(`\n        const ${n}_present = ${l} in input;\n        if (${n}.issues.length) {\n          payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n            ...iss,\n            path: iss.path ? [${l}, ...iss.path] : [${l}]\n          })));\n        }\n        if (!${n}_present && !${n}.issues.length) {\n          payload.issues.push({\n            code: "invalid_type",\n            expected: "nonoptional",\n            input: undefined,\n            path: [${l}]\n          });\n        }\n\n        if (${n}_present) {\n          if (${n}.value === undefined) {\n            newResult[${l}] = undefined;\n          } else {\n            newResult[${l}] = ${n}.value;\n          }\n        }\n\n      `)}t.write("payload.value = newResult;"),t.write("return payload;");const u=t.compile();return(t,n)=>u(e,t,n)})(t.shape)),c=o(c,d),a?Ks([],f,c,d,u,e):c):n(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c)}}));function Xs(e,t,n,r){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const o=e.filter((e=>!Xi(e)));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((e=>e.issues.map((e=>nl(e,r,Mi())))))}),t)}const Qs=Ii("$ZodUnion",((e,t)=>{ps.init(e,t),Li(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),Li(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),Li(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),Li(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){const e=t.options.map((e=>e._zod.pattern));return new RegExp(`^(${e.map((e=>zi(e.source))).join("|")})$`)}}));const n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1;const l=[];for(const e of t.options){const t=e._zod.run({value:r.value,issues:[]},o);if(t instanceof Promise)l.push(t),i=!0;else{if(0===t.issues.length)return t;l.push(t)}}return i?Promise.all(l).then((t=>Xs(t,r,e,o))):Xs(l,r,e,o)}})),ea=Ii("$ZodIntersection",((e,t)=>{ps.init(e,t),e._zod.parse=(e,n)=>{const r=e.value,o=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return o instanceof Promise||i instanceof Promise?Promise.all([o,i]).then((([t,n])=>na(e,t,n))):na(e,o,i)}}));function ta(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Hi(e)&&Hi(t)){const n=Object.keys(t),r=Object.keys(e).filter((e=>-1!==n.indexOf(e))),o={...e,...t};for(const n of r){const r=ta(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};o[n]=r.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=ta(e[r],t[r]);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function na(e,t,n){const r=new Map;let o;for(const n of t.issues)if("unrecognized_keys"===n.code){null!=o||(o=n);for(const e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(const t of n.issues)if("unrecognized_keys"===t.code)for(const e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);const i=[...r].filter((([,e])=>e.l&&e.r)).map((([e])=>e));if(i.length&&o&&e.issues.push({...o,keys:i}),Xi(e))return e;const l=ta(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const ra=Ii("$ZodEnum",((e,t)=>
vendor: 4,680 bytes, line 1
1{ps.init(e,t);const n=Ti(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter((e=>Gi.has(typeof e))).map((e=>"string"==typeof e?Zi(e):e.toString())).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return r.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}})),oa=Ii("$ZodLiteral",((e,t)=>{if(ps.init(e,t),0===t.values.length)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map((e=>"string"==typeof e?Zi(e):e?Zi(e.toString()):String(e))).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}})),ia=Ii("$ZodTransform",((e,t)=>{ps.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Pi(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then((e=>(n.value=e,n.fallback=!0,n)));if(o instanceof Promise)throw new ki;return n.value=o,n.fallback=!0,n}}));function la(e,t){return void 0===t&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const sa=Ii("$ZodOptional",((e,t)=>{ps.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Li(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),Li(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${zi(e.source)})?$`):void 0})),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const r=e.value,o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then((e=>la(e,r))):la(o,r)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),aa=Ii("$ZodExactOptional",((e,t)=>{sa.init(e,t),Li(e._zod,"values",(()=>t.innerType._zod.values)),Li(e._zod,"pattern",(()=>t.innerType._zod.pattern)),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)})),ua=Ii("$ZodNullable",((e,t)=>{ps.init(e,t),Li(e._zod,"optin",(()=>t.innerType._zod.optin)),Li(e._zod,"optout",(()=>t.innerType._zod.optout)),Li(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${zi(e.source)}|null)$`):void 0})),Li(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)})),ca=Ii("$ZodDefault",((e,t)=>{ps.init(e,t),e._zod.optin="optional",Li(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((e=>da(e,t))):da(r,t)}}));function da(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const fa=Ii("$ZodPrefault",((e,t)=>{ps.init(e,t),e._zod.optin="optional",Li(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))})),pa=Ii("$ZodNonOptional",((e,t)=>{ps.init(e,t),Li(e._zod,"values",(()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then((t=>ha(t,e))):ha(o,e)}}));function ha(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const ga=Ii("$ZodCatch",((e,t)=>{ps.init(e,t),e._zod.optin="optional",Li(e._zod,"optout",(()=>t.innerType._zod.optout)),Li(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then((r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>nl(e,n,Mi())))},input:e.value}),e.issues=[],e.fallback=!0),e))):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map((e=>nl(e,n,Mi())))},input:e.value}),e.issues=[],e.fallback=!0),e)}})),ma=Ii("$ZodPipe",((e,t)=>{ps.init(e,t),Li(e._zod,"values",(()=>t.in._zod.values)),Li(e._zod,"optin",(()=>t.in._zod.optin)),Li(e._zod,"optout",(()=>t.out._zod.optout)),Li(e._zod,"propValues",(()=>t.in._zod.propValues)),e._zod.parse=(e,n)=>{if("backward"===n.direction){const r=t.out._zod.run(e,n);return r instanceof Promise?r.then((e=>va(e,t.in,n))):va(r,t.in,n)}const r=t.in._zod.run(e,n);return r instanceof Promise?r.then((e=>va(e,t.out,n))):va(r,t.out,n)}}));function va(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const ya=Ii("$ZodReadonly",((e,t)=>
1{ps.init(e,t),Li(e._zod,"propValues",(()=>t.innerType._zod.propValues)),Li(e._zod,"values",(()=>t.innerType._zod.values)),Li(e._zod,"optin",(()=>{var e;return null===(e=t.innerType)||void 0===e||null===(e=e._zod)||void 0===e?void 0:e.optin})),Li(e._zod,"optout",(()=>{var e;return null===(e=t.innerType)||void 0===e||null===(e=e._zod)||void 0===e?void 0:e.optout})),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ba):ba(r)}}));function ba(e){return e.value=Object.freeze(e.value),e}const wa=Ii("$ZodCustom",((e,t)=>{Zl.init(e,t),ps.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then((t=>Sa(t,n,r,e)));Sa(o,n,r,e)}}));function Sa(e,t,n,r){if(!e){var o;const e={code:"custom",input:n,inst:r,path:[...null!==(o=r._zod.def.path)&&void 0!==o?o:[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ol(e))}}var _a;null!==(X=(_a=globalThis).__zod_globalRegistry)&&void 0!==X||(_a.__zod_globalRegistry=new class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){var n;const r={...null!==(n=this.get(t))&&void 0!==n?n:{}};delete r.id;const o={...r,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}});const xa=globalThis.__zod_globalRegistry;function Ca(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ji(t)})}function Ea(e,t){return new Jl({check:"less_than",...Ji(t),value:e,inclusive:!1})}function Ra(e,t){return new Jl({check:"less_than",...Ji(t),value:e,inclusive:!0})}function Ia(e,t){return new Yl({check:"greater_than",...Ji(t),value:e,inclusive:!1})}function ka(e,t){return new Yl({check:"greater_than",...Ji(t),value:e,inclusive:!0})}function Pa(e,t){return new Xl({check:"multiple_of",...Ji(t),value:e})}function Oa(e,t){return new es({check:"max_length",...Ji(t),maximum:e})}function Ma(e,t){return new ts({check:"min_length",...Ji(t),minimum:e})}function Ta(e,t){return new ns({check:"length_equals",...Ji(t),length:e})}function Aa(e){return new cs({check:"overwrite",tx:e})}function Na(e){var t,n,r,o,i,l,s,a,u;let c=null!==(t=null==e?void 0:e.target)&&void 0!==t?t:"draft-2020-12";return"draft-4"===c&&(c="draft-04"),"draft-7"===c&&(c="draft-07"),{processors:null!==(n=e.processors)&&void 0!==n?n:{},metadataRegistry:null!==(r=null==e?void 0:e.metadata)&&void 0!==r?r:xa,target:c,unrepresentable:null!==(o=null==e?void 0:e.unrepresentable)&&void 0!==o?o:"throw",override:null!==(i=null==e?void 0:e.override)&&void 0!==i?i:()=>{},io:null!==(l=null==e?void 0:e.io)&&void 0!==l?l:"output",counter:0,seen:new Map,cycles:null!==(s=null==e?void 0:e.cycles)&&void 0!==s?s:"ref",reused:null!==(a=null==e?void 0:e.reused)&&void 0!==a?a:"inline",external:null!==(u=null==e?void 0:e.external)&&void 0!==u?u:void 0}}function Fa(e,t,n={path:[],schemaPath:[]}){var r,o,i,l;const s=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const u={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,u);const c=null===(r=(o=e._zod).toJSONSchema)||void 0===r?void 0:r.call(o);if(c)u.schema=c;else{const r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,r);else{const n=u.schema,o=t.processors[s.type];if(!o)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);o(e,t,n,r)}const o=e._zod.parent;o&&(u.ref||(u.ref=o),Fa(o,t,r),t.seen.get(o).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(u.schema,d),"input"===t.io&&La(e)&&(delete u.schema.examples,delete u.schema.default),"input"===t.io&&"_prefault"in u.schema&&(null!==(i=(l=u.schema).default)&&void 0!==i||(l.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function za(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const t of e.seen.entries()){var o;const n=null===(o=e.metadataRegistry.get(t[0]))||void 0===o?void 0:o.id;if(n){const e=r.get(n);if(e&&e!==t[0])throw new Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}const i=t=>{if(t[1].schema.$ref)return;const r=t[1],{ref:o,defId:i}=(t=>{var r;
1const o="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){var i,l,s,a;const n=null===(i=e.external.registry.get(t[0]))||void 0===i?void 0:i.id,r=null!==(l=e.external.uri)&&void 0!==l?l:e=>e;if(n)return{ref:r(n)};const u=null!==(s=null!==(a=t[1].defId)&&void 0!==a?a:t[1].schema.id)&&void 0!==s?s:"schema"+e.counter++;return t[1].defId=u,{defId:u,ref:`${r("__shared")}#/${o}/${u}`}}if(t[1]===n)return{ref:"#"};const u=`#/${o}/`,c=null!==(r=t[1].schema.id)&&void 0!==r?r:"__schema"+e.counter++;return{defId:c,ref:u+c}})(t);r.def={...r.schema},i&&(r.defId=i);const l=r.schema;for(const e in l)delete l[e];l.$ref=o};if("throw"===e.cycles)for(const t of e.seen.entries()){const e=t[1];var l;if(e.cycle)throw new Error(`Cycle detected: #/${null===(l=e.cycle)||void 0===l?void 0:l.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const n of e.seen.entries()){var s;const r=n[1];if(t!==n[0]){if(e.external){var a;const r=null===(a=e.external.registry.get(n[0]))||void 0===a?void 0:a.id;if(t!==n[0]&&r){i(n);continue}}((null===(s=e.metadataRegistry.get(n[0]))||void 0===s?void 0:s.id)||r.cycle||r.count>1&&"ref"===e.reused)&&i(n)}else i(n)}}function Da(e,t){var n,r,o,i,l;const s=e.seen.get(t);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=t=>{var n,r;const o=e.seen.get(t);if(null===o.ref)return;const i=null!==(n=o.def)&&void 0!==n?n:o.schema,l={...i},s=o.ref;if(o.ref=null,s){a(s);const n=e.seen.get(s),r=n.schema;var u;if(!r.$ref||"draft-07"!==e.target&&"draft-04"!==e.target&&"openapi-3.0"!==e.target?Object.assign(i,r):(i.allOf=null!==(u=i.allOf)&&void 0!==u?u:[],i.allOf.push(r)),Object.assign(i,l),t._zod.parent===s)for(const e in i)"$ref"!==e&&"allOf"!==e&&(e in l||delete i[e]);if(r.$ref&&n.def)for(const e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}const c=t._zod.parent;if(c&&c!==s){a(c);const t=e.seen.get(c);if(null!=t&&t.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(const e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:null!==(r=o.path)&&void 0!==r?r:[]})};for(const t of[...e.seen.entries()].reverse())a(t[0]);const u={};if("draft-2020-12"===e.target?u.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?u.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?u.$schema="http://json-schema.org/draft-04/schema#":e.target,null!==(n=e.external)&&void 0!==n&&n.uri){var c;const n=null===(c=e.external.registry.get(t))||void 0===c?void 0:c.id;if(!n)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(n)}Object.assign(u,null!==(r=s.def)&&void 0!==r?r:s.schema);const d=null===(o=e.metadataRegistry.get(t))||void 0===o?void 0:o.id;void 0!==d&&u.id===d&&delete u.id;const f=null!==(i=null===(l=e.external)||void 0===l?void 0:l.defs)&&void 0!==i?i:{};for(const t of e.seen.entries()){const e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,f[e.defId]=e.def)}e.external||Object.keys(f).length>0&&("draft-2020-12"===e.target?u.$defs=f:u.definitions=f);try{const n=JSON.parse(JSON.stringify(u));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:Va(t,"input",e.processors),output:Va(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw new Error("Error converting schema to JSON.")}}function La(e,t){const n=null!=t?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if("transform"===r.type)return!0;if("array"===r.type)return La(r.element,n);if("set"===r.type)return La(r.valueType,n);if("lazy"===r.type)return La(r.getter(),n);if("promise"===r.type||"optional"===r.type||"nonoptional"===r.type||"nullable"===r.type||"readonly"===r.type||"default"===r.type||"prefault"===r.type)return La(r.innerType,n);if("intersection"===r.type)return La(r.left,n)||La(r.right,n);if("record"===r.type||"map"===r.type)return La(r.keyType,n)||La(r.valueType,n);if("pipe"===r.type)return!!e._zod.traits.has("$ZodCodec")||La(r.in,n)||La(r.out,n);if("object"===r.type){for(const e in r.shape)if(La(r.shape[e],n))return!0;return!1}if("union"===r.type){for(const e of r.options)if(La(e,n))return!0;return!1}if("tuple"===r.type){for(const e of r.items)if(La(e,n))return!0;return!(!r.rest||!La(r.rest,n))}return!1}const Va=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=null!=r?r:{},l=Na({...null!=o?o:{},target:i,io:t,processors:n});return Fa(e,l),za(l,e),Da(l,e)},qa={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$a=(e,t,n,r)=>{const o=e._zod.def;Fa(o.innerType,t,r),t.seen.get(e).ref=o.innerType},ja=Ii("ZodISODateTime",((e,t)=>
1{Is.init(e,t),fu.init(e,t)}));const Wa=Ii("ZodISODate",((e,t)=>{ks.init(e,t),fu.init(e,t)}));const Ba=Ii("ZodISOTime",((e,t)=>{Ps.init(e,t),fu.init(e,t)}));const Ha=Ii("ZodISODuration",((e,t)=>{Os.init(e,t),fu.init(e,t)}));const Ua=(e,t)=>{ll.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t=e=>e.message){const n={_errors:[]},r=(e,o=[])=>{for(const i of e.issues)if("invalid_union"===i.code&&i.errors.length)i.errors.map((e=>r({issues:e},[...o,...i.path])));else if("invalid_key"===i.code)r({issues:i.issues},[...o,...i.path]);else if("invalid_element"===i.code)r({issues:i.issues},[...o,...i.path]);else{const e=[...o,...i.path];if(0===e.length)n._errors.push(t(i));else{let r=n,o=0;for(;o<e.length;){const n=e[o];o===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(i))):r[n]=r[n]||{_errors:[]},r=r[n],o++}}}};return r(e),n}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ai,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ai,2)}},isEmpty:{get:()=>0===e.issues.length}})},Ga=Ii("ZodError",Ua,{Parent:Error}),Za=al(Ga),Ka=ul(Ga),Ja=cl(Ga),Ya=fl(Ga),Xa=hl(Ga),Qa=gl(Ga),eu=ml(Ga),tu=vl(Ga),nu=yl(Ga),ru=bl(Ga),ou=wl(Ga),iu=Sl(Ga),lu=new WeakMap;function su(e,t,n){const r=Object.getPrototypeOf(e);let o=lu.get(r);if(o||(o=new Set,lu.set(r,o)),!o.has(t)){o.add(t);for(const e in n){const t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){const n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const au=Ii("ZodType",((e,t)=>(ps.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Va(e,"input"),output:Va(e,"output")}}),e.toJSONSchema=((e,t={})=>n=>{const r=Na({...n,processors:t});return Fa(e,r),za(r,e),Da(r,e)})(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Za(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Ja(e,t,n),e.parseAsync=async(t,n)=>Ka(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Ya(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Xa(e,t,n),e.decode=(t,n)=>Qa(e,t,n),e.encodeAsync=async(t,n)=>eu(e,t,n),e.decodeAsync=async(t,n)=>tu(e,t,n),e.safeEncode=(t,n)=>nu(e,t,n),e.safeDecode=(t,n)=>ru(e,t,n),e.safeEncodeAsync=async(t,n)=>ou(e,t,n),e.safeDecodeAsync=async(t,n)=>iu(e,t,n),su(e,"ZodType",{check(...e){var t;const n=this.def;return this.clone(qi(n,{checks:[...null!==(t=n.checks)&&void 0!==t?t:[],...e.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ki(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ji(n)})}(cc,e,t)}(e,t))},superRefine(e,t){return this.check(function(e,t){return function(e,t){const n=function(e,t){const n=new Zl({check:"custom",...Ji(t)});return n._zod.check=e,n}((t=>(t.addIssue=e=>{if("string"==typeof e)t.issues.push(ol(e,t.value,n._zod.def));else{var r,o,i,l;const s=e;s.fatal&&(s.continue=!1),null!==(r=s.code)&&void 0!==r||(s.code="custom"),null!==(o=s.input)&&void 0!==o||(s.input=t.value),null!==(i=s.inst)&&void 0!==i||(s.inst=n),null!==(l=s.continue)&&void 0!==l||(s.continue=!n._zod.def.abort),t.issues.push(ol(s))}},e(t.value,t))),t);return n}(e,t)}(e,t))},overwrite(e){return this.check(Aa(e))},optional(){return Qu(this)},exactOptional(){return new ec({type:"optional",innerType:this})},nullable(){return nc(this)},nullish(){return Qu(nc(this))},nonoptional(e){return function(e,t){return new ic({type:"nonoptional",innerType:e,...Ji(t)})}(this,e)},array(){return ju(this)},or(e){return Uu([this,e])},and(e){return new Gu({type:"intersection",left:this,right:e})},transform(e){return ac(this,function(e){return new Yu({type:"transform",transform:e})}(e))},default(e){return t=e,new rc({type:"default",innerType:this,get defaultValue(){return"function"==typeof t?t():Ui(t)}});var t},prefault(e){return t=e,new oc({type:"prefault",innerType:this,get defaultValue(){return"function"==typeof t?t():Ui(t)}});var t},catch(e){return new lc({type:"catch",innerType:this,catchValue:"function"==typeof(t=e)?t:()=>t});var t},pipe(e){return ac(this,e)},readonly(){return new uc({type:"readonly",innerType:this})},describe(e){const t=this.clone();return xa.add(t,{description:e}),t},meta(...e){if(0===e.length)return xa.get(this);const t=this.clone();return xa.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){var t;return null===(t=xa.get(e))||void 0===t?void 0:t.description},configurable:!0}),e))),uu=Ii("_ZodString",((e,t)=>
1{var n,r,o;hs.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n;r.type="string";const{minimum:o,maximum:i,format:l,patterns:s,contentEncoding:a}=e._zod.bag;var u;if("number"==typeof o&&(r.minLength=o),"number"==typeof i&&(r.maxLength=i),l&&(r.format=null!==(u=qa[l])&&void 0!==u?u:l,""===r.format&&delete r.format,"time"===l&&delete r.format),a&&(r.contentEncoding=a),s&&s.size>0){const e=[...s];1===e.length?r.pattern=e[0].source:e.length>1&&(r.allOf=[...e.map((e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source})))])}})(e,t,n);const i=e._zod.bag;e.format=null!==(n=i.format)&&void 0!==n?n:null,e.minLength=null!==(r=i.minimum)&&void 0!==r?r:null,e.maxLength=null!==(o=i.maximum)&&void 0!==o?o:null,su(e,"_ZodString",{regex(...e){return this.check(function(e,t){return new os({check:"string_format",format:"regex",...Ji(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new ss({check:"string_format",format:"includes",...Ji(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new as({check:"string_format",format:"starts_with",...Ji(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new us({check:"string_format",format:"ends_with",...Ji(t),suffix:e})}(...e))},min(...e){return this.check(Ma(...e))},max(...e){return this.check(Oa(...e))},length(...e){return this.check(Ta(...e))},nonempty(...e){return this.check(Ma(1,...e))},lowercase(e){return this.check(function(e){return new is({check:"string_format",format:"lowercase",...Ji(e)})}(e))},uppercase(e){return this.check(function(e){return new ls({check:"string_format",format:"uppercase",...Ji(e)})}(e))},trim(){return this.check(Aa((e=>e.trim())))},normalize(...e){return this.check(function(e){return Aa((t=>t.normalize(e)))}(...e))},toLowerCase(){return this.check(Aa((e=>e.toLowerCase())))},toUpperCase(){return this.check(Aa((e=>e.toUpperCase())))},slugify(){return this.check(Aa((e=>function(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}(e))))}})})),cu=Ii("ZodString",((e,t)=>{hs.init(e,t),uu.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ji(t)})}(pu,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ji(t)})}(mu,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ji(t)})}(Mu,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ji(t)})}(vu,t)),e.guid=t=>e.check(Ca(hu,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ji(t)})}(gu,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ji(t)})}(gu,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ji(t)})}(gu,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ji(t)})}(gu,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ji(t)})}(yu,t)),e.guid=t=>e.check(Ca(hu,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ji(t)})}(bu,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ji(t)})}(wu,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ji(t)})}(Su,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ji(t)})}(ku,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ji(t)})}(Pu,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ji(t)})}(_u,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ji(t)})}(xu,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ji(t)})}(Cu,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ji(t)})}(Eu,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ji(t)})}(Ru,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ji(t)})}(Iu,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ji(t)})}(Ou,t)),e.datetime=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ji(t)})}(ja,e)}(t)),e.date=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Ji(t)})}(Wa,e)}(t)),e.time=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ji(t)})}(Ba,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ji(t)})}(Ha,e)}(t))}));function du(e){return function(e,t){return new e({type:"string",...Ji(t)})}(cu,e)}const fu=Ii("ZodStringFormat",((e,t)=>
1{gs.init(e,t),uu.init(e,t)})),pu=Ii("ZodEmail",((e,t)=>{ys.init(e,t),fu.init(e,t)})),hu=Ii("ZodGUID",((e,t)=>{ms.init(e,t),fu.init(e,t)})),gu=Ii("ZodUUID",((e,t)=>{vs.init(e,t),fu.init(e,t)})),mu=Ii("ZodURL",((e,t)=>{bs.init(e,t),fu.init(e,t)})),vu=Ii("ZodEmoji",((e,t)=>{ws.init(e,t),fu.init(e,t)})),yu=Ii("ZodNanoID",((e,t)=>{Ss.init(e,t),fu.init(e,t)})),bu=Ii("ZodCUID",((e,t)=>{_s.init(e,t),fu.init(e,t)})),wu=Ii("ZodCUID2",((e,t)=>{xs.init(e,t),fu.init(e,t)})),Su=Ii("ZodULID",((e,t)=>{Cs.init(e,t),fu.init(e,t)})),_u=Ii("ZodXID",((e,t)=>{Es.init(e,t),fu.init(e,t)})),xu=Ii("ZodKSUID",((e,t)=>{Rs.init(e,t),fu.init(e,t)})),Cu=Ii("ZodIPv4",((e,t)=>{Ms.init(e,t),fu.init(e,t)})),Eu=Ii("ZodIPv6",((e,t)=>{Ts.init(e,t),fu.init(e,t)})),Ru=Ii("ZodCIDRv4",((e,t)=>{As.init(e,t),fu.init(e,t)})),Iu=Ii("ZodCIDRv6",((e,t)=>{Ns.init(e,t),fu.init(e,t)})),ku=Ii("ZodBase64",((e,t)=>{zs.init(e,t),fu.init(e,t)})),Pu=Ii("ZodBase64URL",((e,t)=>{Ds.init(e,t),fu.init(e,t)})),Ou=Ii("ZodE164",((e,t)=>{Ls.init(e,t),fu.init(e,t)})),Mu=Ii("ZodJWT",((e,t)=>{Vs.init(e,t),fu.init(e,t)})),Tu=Ii("ZodNumber",((e,t)=>{var n,r,o,i,l,s,a,u,c;qs.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=n,{minimum:o,maximum:i,format:l,multipleOf:s,exclusiveMaximum:a,exclusiveMinimum:u}=e._zod.bag;"string"==typeof l&&l.includes("int")?r.type="integer":r.type="number";const c="number"==typeof u&&u>=(null!=o?o:Number.NEGATIVE_INFINITY),d="number"==typeof a&&a<=(null!=i?i:Number.POSITIVE_INFINITY),f="draft-04"===t.target||"openapi-3.0"===t.target;c?f?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:"number"==typeof o&&(r.minimum=o),d?f?(r.maximum=a,r.exclusiveMaximum=!0):r.exclusiveMaximum=a:"number"==typeof i&&(r.maximum=i),"number"==typeof s&&(r.multipleOf=s)})(e,t,n),su(e,"ZodNumber",{gt(e,t){return this.check(Ia(e,t))},gte(e,t){return this.check(ka(e,t))},min(e,t){return this.check(ka(e,t))},lt(e,t){return this.check(Ea(e,t))},lte(e,t){return this.check(Ra(e,t))},max(e,t){return this.check(Ra(e,t))},int(e){return this.check(Fu(e))},safe(e){return this.check(Fu(e))},positive(e){return this.check(Ia(0,e))},nonnegative(e){return this.check(ka(0,e))},negative(e){return this.check(Ea(0,e))},nonpositive(e){return this.check(Ra(0,e))},multipleOf(e,t){return this.check(Pa(e,t))},step(e,t){return this.check(Pa(e,t))},finite(){return this}});const d=e._zod.bag;e.minValue=null!==(n=Math.max(null!==(r=d.minimum)&&void 0!==r?r:Number.NEGATIVE_INFINITY,null!==(o=d.exclusiveMinimum)&&void 0!==o?o:Number.NEGATIVE_INFINITY))&&void 0!==n?n:null,e.maxValue=null!==(i=Math.min(null!==(l=d.maximum)&&void 0!==l?l:Number.POSITIVE_INFINITY,null!==(s=d.exclusiveMaximum)&&void 0!==s?s:Number.POSITIVE_INFINITY))&&void 0!==i?i:null,e.isInt=(null!==(a=d.format)&&void 0!==a?a:"").includes("int")||Number.isSafeInteger(null!==(u=d.multipleOf)&&void 0!==u?u:.5),e.isFinite=!0,e.format=null!==(c=d.format)&&void 0!==c?c:null}));function Au(e){return function(e,t){return new e({type:"number",checks:[],...Ji(t)})}(Tu,e)}const Nu=Ii("ZodNumberFormat",((e,t)=>{$s.init(e,t),Tu.init(e,t)}));function Fu(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ji(t)})}(Nu,e)}const zu=Ii("ZodBoolean",((e,t)=>
1{js.init(e,t),au.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.type="boolean"})(0,0,t)}));function Du(e){return function(e,t){return new e({type:"boolean",...Ji(t)})}(zu,e)}const Lu=Ii("ZodUnknown",((e,t)=>{Ws.init(e,t),au.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{}}));function Vu(){return new Lu({type:"unknown"})}const qu=Ii("ZodNever",((e,t)=>{Bs.init(e,t),au.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t,n)=>{n.not={}})(0,0,t)}));const $u=Ii("ZodArray",((e,t)=>{Us.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:l,maximum:s}=e._zod.bag;"number"==typeof l&&(o.minItems=l),"number"==typeof s&&(o.maxItems=s),o.type="array",o.items=Fa(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element,su(e,"ZodArray",{min(e,t){return this.check(Ma(e,t))},nonempty(e){return this.check(Ma(1,e))},max(e,t){return this.check(Oa(e,t))},length(e,t){return this.check(Ta(e,t))},unwrap(){return this.element}})}));function ju(e,t){return function(e,t,n){return new e({type:"array",element:t,...Ji(n)})}($u,e,t)}const Wu=Ii("ZodObject",((e,t)=>{Ys.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{var o;const i=n,l=e._zod.def;i.type="object",i.properties={};const s=l.shape;for(const e in s)i.properties[e]=Fa(s[e],t,{...r,path:[...r.path,"properties",e]});const a=new Set(Object.keys(s)),u=new Set([...a].filter((e=>{const n=l.shape[e]._zod;return"input"===t.io?void 0===n.optin:void 0===n.optout})));u.size>0&&(i.required=Array.from(u)),"never"===(null===(o=l.catchall)||void 0===o?void 0:o._zod.def.type)?i.additionalProperties=!1:l.catchall?l.catchall&&(i.additionalProperties=Fa(l.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(i.additionalProperties=!1)})(e,t,n,r),Li(e,"shape",(()=>t.shape)),su(e,"ZodObject",{keyof(){return function(e){const t=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new Zu({type:"enum",entries:t,...Ji(void 0)})}(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Vu()})},loose(){return this.clone({...this._zod.def,catchall:Vu()})},strict(){return this.clone({...this._zod.def,catchall:function(e,t){return new e({type:"never",...Ji(t)})}(qu,e)});var e},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return function(e,t){if(!Hi(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const n=e._zod.def.shape;for(const e in t)if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=qi(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Vi(this,"shape",n),n}});return Ki(e,r)}(this,e)},safeExtend(e){return function(e,t){if(!Hi(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=qi(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Vi(this,"shape",n),n}});return Ki(e,n)}(this,e)},merge(e){return function(e,t){var n,r;if(null!==(n=e._zod.def.checks)&&void 0!==n&&n.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const o=qi(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Vi(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:null!==(r=t._zod.def.checks)&&void 0!==r?r:[]});return Ki(e,o)}(this,e)},pick(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return Ki(e,qi(e._zod.def,{get shape(){const e={};for(const r in t){if(!(r in n.shape))throw new Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Vi(this,"shape",e),e},checks:[]}))}(this,e)},omit(e){return function(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=qi(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Vi(this,"shape",r),r},checks:[]});return Ki(e,o)}(this,e)},partial(...e){return function(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=qi(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:r[t]}):r[t])}else for(const t in r)o[t]=e?new e({type:"optional",innerType:r[t]}):r[t];return Vi(this,"shape",o),o},checks:[]});return Ki(t,o)}(Xu,this,e[0])},required(...e){return function(e,t,n){const r=qi(t._zod.def,{get shape(){const r=t._zod.def.shape,o={...r};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:r[t]}))}else for(const t in r)o[t]=new e({type:"nonoptional",innerType:r[t]});return Vi(this,"shape",o),o}});return Ki(t,r)}(ic,this,e[0])}})}));function Bu(e,t){const n={type:"object",shape:null!=e?e:{},...Ji(t)};return new Wu(n)}const Hu=Ii("ZodUnion",((e,t)=>
vendor: 2,231 bytes, line 1
1{Qs.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=!1===o.inclusive,l=o.options.map(((e,n)=>Fa(e,t,{...r,path:[...r.path,i?"oneOf":"anyOf",n]})));i?n.oneOf=l:n.anyOf=l})(e,t,n,r),e.options=t.options}));function Uu(e,t){return new Hu({type:"union",options:e,...Ji(t)})}const Gu=Ii("ZodIntersection",((e,t)=>{ea.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Fa(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=Fa(o.right,t,{...r,path:[...r.path,"allOf",1]}),s=e=>"allOf"in e&&1===Object.keys(e).length,a=[...s(i)?i.allOf:[i],...s(l)?l.allOf:[l]];n.allOf=a})(e,t,n,r)})),Zu=Ii("ZodEnum",((e,t)=>{ra.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=Ti(e._zod.def.entries);r.every((e=>"number"==typeof e))&&(n.type="number"),r.every((e=>"string"==typeof e))&&(n.type="string"),n.enum=r})(e,0,n),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{const o={};for(const r of e){if(!n.has(r))throw new Error(`Key ${r} not found in enum`);o[r]=t.entries[r]}return new Zu({...t,checks:[],...Ji(r),entries:o})},e.exclude=(e,r)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new Zu({...t,checks:[],...Ji(r),entries:o})}})),Ku=Ii("ZodLiteral",((e,t)=>{oa.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{const r=e._zod.def,o=[];for(const e of r.values)if(void 0===e){if("throw"===t.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===t.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every((e=>"number"==typeof e))&&(n.type="number"),o.every((e=>"string"==typeof e))&&(n.type="string"),o.every((e=>"boolean"==typeof e))&&(n.type="boolean"),o.every((e=>null===e))&&(n.type="null"),n.enum=o})(e,t,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
1(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}));function Ju(e,t){return new Ku({type:"literal",values:Array.isArray(e)?e:[e],...Ji(t)})}const Yu=Ii("ZodTransform",((e,t)=>{ia.init(e,t),au.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema")})(0,e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new Pi(e.constructor.name);n.addIssue=r=>{if("string"==typeof r)n.issues.push(ol(r,n.value,t));else{var o,i,l;const t=r;t.fatal&&(t.continue=!1),null!==(o=t.code)&&void 0!==o||(t.code="custom"),null!==(i=t.input)&&void 0!==i||(t.input=n.value),null!==(l=t.inst)&&void 0!==l||(t.inst=e),n.issues.push(ol(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then((e=>(n.value=e,n.fallback=!0,n))):(n.value=o,n.fallback=!0,n)}})),Xu=Ii("ZodOptional",((e,t)=>{sa.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$a(e,t,0,r),e.unwrap=()=>e._zod.def.innerType}));function Qu(e){return new Xu({type:"optional",innerType:e})}const ec=Ii("ZodExactOptional",((e,t)=>{aa.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$a(e,t,0,r),e.unwrap=()=>e._zod.def.innerType})),tc=Ii("ZodNullable",((e,t)=>{ua.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=Fa(o.innerType,t,r),l=t.seen.get(e);"openapi-3.0"===t.target?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}));function nc(e){return new tc({type:"nullable",innerType:e})}const rc=Ii("ZodDefault",((e,t)=>{ca.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Fa(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),oc=Ii("ZodPrefault",((e,t)=>{fa.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Fa(o.innerType,t,r),t.seen.get(e).ref=o.innerType,"input"===t.io&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType})),ic=Ii("ZodNonOptional",((e,t)=>{pa.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Fa(o.innerType,t,r),t.seen.get(e).ref=o.innerType})(e,t,0,r),e.unwrap=()=>e._zod.def.innerType})),lc=Ii("ZodCatch",((e,t)=>{ga.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;let i;Fa(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),sc=Ii("ZodPipe",((e,t)=>{ma.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),l="input"===t.io?i?o.out:o.in:o.out;Fa(l,t,r),t.seen.get(e).ref=l})(e,t,0,r),e.in=t.in,e.out=t.out}));function ac(e,t){return new sc({type:"pipe",in:e,out:t})}const uc=Ii("ZodReadonly",((e,t)=>{ya.init(e,t),au.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{const o=e._zod.def;Fa(o.innerType,t,r),t.seen.get(e).ref=o.innerType,n.readOnly=!0})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType})),cc=Ii("ZodCustom",((e,t)=>{wa.init(e,t),au.init(e,t),e._zod.processJSONSchema=(e,t,n)=>((e,t)=>{if("throw"===t.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")})(0,e)})),dc=500,fc=100,pc=Bu({pageIndex:Au().int().min(0).max(1e4).catch(0),pageSize:Uu([Ju(-1),Au().int().positive()]).catch(10)}).catch({pageIndex:0,pageSize:10}),hc=ju(Bu({id:du().max(dc).catch(""),desc:Du().catch(!1)})).max(fc).catch([]),gc=Uu([du().max(200),Au(),Du()]).catch(""),mc=Uu([gc,ju(gc).max(fc)]).catch([]),vc=ju(Bu({id:du().max(dc).catch(""),value:mc}).catch({id:"",value:""})).max(fc).catch([]),yc=Bu({query:du().max(dc).catch("")}).catch({query:""});Bu({pagination:pc,sorting:hc,filters:vc,search:yc}),Bu({page:du().regex(/^\d+$/).transform((e=>parseInt(e,10))).pipe(Au().int().min(1).max(1e4)).catch(1),per_page:du().regex(/^-?\d+$/).transform((e=>parseInt(e,10))).pipe(Uu([Ju(-1),Au().int().positive()])).catch(10),search:du().max(dc).catch("").optional(),sort:du().max(5e3).catch("").optional()}).catchall(du().max(200).catch(""));const bc=new class{get(){return window.location.hash.substring(1)}set(e){const t=e?`#${e}`:window.location.pathname+window.location.search;window.history.replaceState(null,"",t)}subscribe(e){return window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}}},wc=(e,t,n)=>{var r,o;const i=new URLSearchParams,l=_c(),s=new URLSearchParams(l),a=null!==(r=null==n?void 0:n.pagination.pageSize)&&void 0!==r?r:10,u=null!==(o=null==n?void 0:n.sorting)&&void 0!==o?o:[];if(t.includes("page")){const t=e.pagination.pageIndex+1;(t>1||s.has("page"))&&i.set("page",String(t))}if(t.includes("pageSize")&&e.pagination.pageSize!==a&&i.set("per_page",String(e.pagination.pageSize)),t.includes("filters")&&e.filters.length>0){const t=(e=>{const t={};return e.forEach((e=>{if(null===e.value||void 0===e.value)return;const n=`_${e.id}`,r=Array.isArray(e.value)?e.value.join(","):String(e.value);r&&""!==r&&(t[n]=r)})),t})(e.filters);Object.entries(t).forEach((([e,t])=>{i.set(e,t)}))}if(t.includes("search")&&e.search.query&&i.set("search",e.search.query),t.includes("sorting")&&!((e,t)=>e.length===t.length&&e.every(((e,n)=>{const r=t[n];return e.id===r.id&&e.desc===r.desc})))(e.sorting,u)){const t=e.sorting.map((e=>`${e.id}:${e.desc?"desc":"asc"}`)).join(",");i.set("sort",t)}return i.toString()},Sc=(e,t,n)=>{const r=e.startsWith("#")?e.substring(1):e;if(!r)return{};const o=new URLSearchParams(r),i={sorting:n.sorting||[]};let l;if(t.includes("page")){const e=o.get("page");if(e)try{const t=parseInt(e,10);!isNaN(t)&&t>=1&&t<=1e4&&(l={...l,pageIndex:t-1})}catch{console.warn(`Invalid page parameter: ${e}`)}}if(t.includes("pageSize")){const e=o.get("per_page");if(e)try{const t=parseInt(e,10);!isNaN(t)&&(-1===t||t>0)&&(l={...l,pageSize:t})}catch{console.warn(`Invalid per_page parameter: ${e}`)}}if(l&&(i.pagination={...n.pagination,...l}),t.includes("filters")){const e=(e=>{const t=[];return e.forEach(((e,n)=>{if(n.startsWith("_")){const r=n.substring(1);try{const n=(e=>{const t=e=>{const t=e.trim().slice(0,200);if(/^-?\d+$/.test(t)){const e=parseInt(t,10);if(!isNaN(e)&&e>=Number.MIN_SAFE_INTEGER&&e<=Number.MAX_SAFE_INTEGER)return e}return t};return e.includes(",")?e.split(",").slice(0,fc).map(t).filter((e=>""!==e)):t(e)})(e);""===n||null==n||Array.isArray(n)&&0===n.length||t.push({id:r,value:n})}catch(t){console.warn(`Invalid filter value for "${r}":`,e,t)}}})),t})(o);i.filters=e.length>0?e:[]}if(t.includes("search")){const e=o.get("search");if(e)try{const t=e.substring(0,500);i.search={query:t}}catch(e){console.warn("Invalid search parameters:",e),i.search={query:""}}else i.search={query:""}}if(t.includes("sorting"))if(o.has("sort")){const e=(e=>{if(!e||""===e.trim())return[];try{const t=e.split(",").slice(0,fc),n=[];for(const e of t){const t=e.trim();if(!t)continue;const[r,o]=t.split(":");r&&o&&(r.length>dc||"asc"!==o&&"desc"!==o||n.push({id:r,desc:"desc"===o}))}return n}catch(t){return console.warn(`Invalid sorting parameter: ${e}`,t),[]}})(o.get("sort")||"");i.sorting=e}else i.sorting=n.sorting||[];return i},_c=()=>bc.get(),xc=e=>{bc.set(e)},Cc=(e,t,n,r)=>{const{enabled:o,syncParams:i=["page","pageSize","filters","search","sorting"]}=n,l=Ct((()=>i),[JSON.stringify(i)]),s=_t(""),a=_t(!1);wt((()=>{o&&(s.current=_c())}),[]),wt((()=>
1{if(!o)return;if(a.current)return;const t=setTimeout((()=>{const t=wc(e,l,r);t!==s.current&&(xc(t),s.current=t)}),150);return()=>clearTimeout(t)}),[e,o,l,r]),wt((()=>{if(!o)return;const e=bc.subscribe((()=>{const e=_c();if(e===s.current)return;const n=Sc(e,l,r);Object.keys(n).length>0&&(a.current=!0,t((e=>({...e,...n,pagination:n.pagination?{...e.pagination,...n.pagination}:e.pagination,sorting:void 0!==n.sorting?n.sorting:e.sorting}))),queueMicrotask((()=>{a.current=!1}))),s.current=e}));return()=>{e()}}),[o,l,r])},Ec=e=>Object.keys(e).sort().reduce(((t,n)=>(t[n]=e[n],t)),{}),Rc=(e,t,n,r,o,i)=>{const l={filters:n.filters.map((e=>Ec(e))),pageSize:n.pagination.pageSize,search:Ec(n.search),sorting:n.sorting.map((e=>Ec(e)))};return["serverData","infinite",e,t,l,r||"table",o,Ec(i||{})]},Ic=e=>{const{serverUrl:t,restNonce:n,fetchData:r,viewId:o,state:i,enabled:l=!0,urlSync:s,displayMode:a,extraRequestData:u}=e,c=Jo(),[d,f]=yt(0),p=_t(r);wt((()=>{p.current!==r&&(p.current=r,f((e=>e+1)))}),[r]);const h=r?"fetchData":t?`${t}:${n||"no-rest-nonce"}`:"missing-data-source",g=_t(i||{pagination:{pageIndex:0,pageSize:25},sorting:[],filters:[],search:{query:""}}),m=Ct((()=>{var e;const t=g.current;if(null==s||!s.enabled)return t;const n=_c();if(!n)return t;const r=s.syncParams||["pageSize","filters","search","sorting"],o=Sc(n,r,t);return{...t,...o,pagination:{pageIndex:0,pageSize:(null===(e=o.pagination)||void 0===e?void 0:e.pageSize)||t.pagination.pageSize},sorting:void 0!==o.sorting?o.sorting:t.sorting}}),[]),[v,y]=yt(m);Cc(v,y,s||{enabled:!1,syncParams:[]},g.current);const b=Et((e=>{y((t=>{var n;return{...t,...e,pagination:{pageIndex:0,pageSize:(null===(n=e.pagination)||void 0===n?void 0:n.pageSize)||t.pagination.pageSize}}}))}),[]),{data:w,isLoading:S,isFetching:_,error:x,fetchNextPage:C,hasNextPage:E,isFetchingNextPage:R,refetch:I}=function(e){return ti(e,ko)}({queryKey:Rc(h,d,v,a,o,u),queryFn:({pageParam:e})=>(async(e,t,n,r,o)=>{const i=r?{...r,...e}:e;if(t)return t(i);if(n)return(async(e,t,n)=>{const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...n?{"X-WP-Nonce":n}:{}},credentials:"same-origin",body:JSON.stringify(t)});if(!r.ok)throw new Error(`Server error: ${r.status} ${r.statusText}`);return r.json()})(n,i,o);throw new Error("DataView configuration error: provide fetchData or serverUrl.")})(((e,t,n,r)=>({viewId:r,pagination:{pageIndex:t,pageSize:e.pagination.pageSize},sorting:e.sorting,filters:e.filters,search:e.search,displayMode:n}))(v,e,a,o),r,t,u,n),initialPageParam:0,getNextPageParam:(e,t,n)=>{if(e.currentPage+1<e.totalPages)return n+1},enabled:l,placeholderData:e=>e,refetchOnWindowFocus:!1,staleTime:6e4,gcTime:3e5}),k=Ct((()=>null!=w&&w.pages?w.pages.flatMap((e=>e.data)):[]),[null==w?void 0:w.pages]),P=Ct((()=>null!=w&&w.pages?w.pages.flatMap((e=>e.cardHtml||[])):[]),[null==w?void 0:w.pages]),O=Ct((()=>null!=w&&w.pages&&0!==w.pages.length?w.pages[w.pages.length-1].totalRows:0),[null==w?void 0:w.pages]),M=Ct((()=>null!=w&&w.pages&&0!==w.pages.length?w.pages[w.pages.length-1].totalPages:0),[null==w?void 0:w.pages]),T=Ct((()=>{if(null!=w&&w.pages&&0!==w.pages.length)return w.pages[w.pages.length-1].filterCounts}),[null==w?void 0:w.pages]);return wt((()=>{c.invalidateQueries({queryKey:Rc(h,d,v,a,o,u)})}),[v.filters,v.search,v.sorting,h,d,c,v,a,o,u]),Ct((()=>({data:k,cardHtml:P.length>0?P:void 0,loading:S,isFetching:_,isPlaceholderData:!1,error:x,totalRows:O,totalPages:M,state:v,setState:b,refetch:I,hasNextPage:E,fetchNextPage:C,isFetchingNextPage:R,filterCounts:T}
1)),[k,P,S,_,x,O,M,v,b,I,E,C,R,T])},kc=e=>Object.keys(e).sort().reduce(((t,n)=>(t[n]=e[n],t)),{}),Pc=(e,t,n,r,o,i)=>{const l={filters:n.filters.map((e=>kc(e))),pagination:kc(n.pagination),search:kc(n.search),sorting:n.sorting.map((e=>kc(e)))};return["serverData",e,t,l,r||"table",o,kc(i||{})]},Oc=(e,t,n)=>({viewId:n,pagination:e.pagination,sorting:e.sorting,filters:e.filters,search:e.search,displayMode:t}),Mc=async(e,t,n,r,o)=>{const i=r?{...r,...e}:e;if(t)return t(i);if(n)return(async(e,t,n)=>{const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...n?{"X-WP-Nonce":n}:{}},credentials:"same-origin",body:JSON.stringify(t)});if(!r.ok)throw new Error(`Server error: ${r.status} ${r.statusText}`);return r.json()})(n,i,o);throw new Error("DataView configuration error: provide fetchData or serverUrl.")},Tc=({left:e,center:t,right:n})=>{if(t)return e&&!n?"pagination-layout-left-center":!e&&n?"pagination-layout-center-right":void 0},Ac=({config:e,children:t,componentProps:n={},hideControls:r=!1})=>{var o,i;const l=Ct((()=>{const t={top:[],bottom:[],left:[],right:[]};return e.components.forEach((e=>{t[e.position].push(e)})),Object.keys(t).forEach((e=>{t[e].sort(((e,t)=>(e.order||0)-(t.order||0)))})),t}),[e.components]),s=e=>{const t=e.component,r={...n,...e.props};return jo("div",{className:`layout-component layout-component-${e.id}`,children:jo(t,{...r})},e.id)},a=Ct((()=>{const e={search:[],filters:[],reset:[],active:[],actions:[]},t=l.top.filter((e=>!e.id.startsWith("per-page-selector-top")&&!e.id.startsWith("document-count-top")&&!e.id.startsWith("page-navigation-top")));return t.forEach((t=>{t.slot&&e[t.slot].push(t)})),Object.keys(e).forEach((t=>{e[t].sort(((e,t)=>(e.order||0)-(t.order||0)))})),e}),[l.top]),u=Ct((()=>l.top.filter((e=>e.id.startsWith("per-page-selector-top")||e.id.startsWith("document-count-top")||e.id.startsWith("page-navigation-top")))),[l.top]),c=u.length>0,d=!c&&a.actions.length>0,f=Ct((()=>a.search.length>0||a.filters.length>0||a.reset.length>0||a.active.length>0||d),[a,d]),p=Ct((()=>u.filter((e=>e.id.startsWith("per-page-selector")))),[u]),h=Ct((()=>u.filter((e=>e.id.startsWith("document-count")))),[u]),g=Ct((()=>u.filter((e=>e.id.startsWith("page-navigation")))),[u]),m=Ct((()=>l.bottom.filter((e=>e.id.includes("action-button")))),[l.bottom]),v=Ct((()=>l.bottom.filter((e=>"table-info"===e.id||e.id.startsWith("per-page-selector")||"search"===e.slot))),[l.bottom]),y=Ct((()=>l.bottom.filter((e=>e.id.startsWith("document-count")))),[l.bottom]),b=Ct((()=>l.bottom.filter((e=>"pagination"===e.id||e.id.startsWith("page-navigation")))),[l.bottom]),w=Tc({left:p.length>0,center:h.length>0,right:g.length>0||a.actions.length>0}),S=Tc({left:v.length>0,center:y.length>0,right:b.length>0||m.length>0}),_=a.active.length>0,x=a.search.length>0||a.filters.length>0||!_&&a.reset.length>0;return jo(Ae,{children:[!r&&(null===(o=e.header)||void 0===o?void 0:o.show)&&f&&jo("div",{className:ri("layout-header",e.header.sticky&&"header-sticky",d&&"layout-header--inline-actions",d&&_&&"layout-header--has-active",d&&x&&"layout-header--has-controls"),children:[x&&jo("div",{className:"header-filters",children:[a.search.map(s),a.filters.map(s),!_&&a.reset.map(s)]}),_&&jo("div",{className:"header-active",children:[a.active.map(s),a.reset.map(s)]}),d&&jo("div",{className:"header-actions",children:a.actions.map(s)})]}),!r&&c&&jo("div",{className:ri("header-controls",w),children:[jo("div",{className:"pagination-left",children:p.map(s)}),jo("div",{className:"pagination-center",children:h.map(s)}),jo("div",{className:"pagination-right",children:[g.map(s),a.actions.map(s)]})]}),t,!r&&(null===(i=e.footer)||void 0===i?void 0:i.show)&&jo("div",{className:ri("footer-controls",e.footer.sticky&&"footer-controls-sticky",S),children:[jo("div",{className:"pagination-left",children:v.map(s)}),jo("div",{className:"pagination-center",children:y.map(s)}),jo("div",{className:"pagination-right",children:[b.map(s),m.map(s)]})]})]})},Nc={components:[],header:{show:!0,sticky:!1},footer:{show:!0,sticky:!1}},Fc=(e,t,n="top",r=0,o)=>({id:e,component:t,position:n,order:r,slot:null==o?void 0:o.slot,props:o});let zc=null;
1const Dc=({value:e,onChange:t,onSearch:n,placeholder:r,debounceMs:o=300,className:i,disabled:l=!1})=>{const{i18n:s}=xi(),[a,u]=yt(e),c=bi(null!=r?r:s.searchPlaceholder);wt((()=>{u(e)}),[e]);const d=Et((e=>{const r=e.target.value;u(r),zc&&clearTimeout(zc),zc=setTimeout((()=>{t(r),n()}),o)}),[t,n,o]),f=Et((e=>{"Enter"===e.key&&(zc&&clearTimeout(zc),t(a),n())}),[a,t,n]),p=Et((()=>{u(""),t(""),n()}),[t,n]);return jo("div",{className:ri("search-input-wrapper",i),style:l?{pointerEvents:"none"}:void 0,children:jo("div",{className:"search-input-container",children:[jo("svg",{className:"search-icon",width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jo("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16zM19 19l-4.35-4.35",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),jo("input",{type:"text",value:a,onInput:d,onKeyDown:f,placeholder:c,className:"search-input","aria-label":s.searchTableData}),a&&jo("button",{type:"button",onClick:p,className:"search-clear-btn","aria-label":s.clearSearch,title:s.clearSearch,children:jo("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jo("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})};function Lc({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=_t(void 0!==e),[i,l]=yt(t);return[o?e:i,Et((e=>{o||l(e)}),[])]}const Vc="undefined"!=typeof document?St:()=>{};function qc(e){const t=_t(!0);t.current&&(t.current=!1,e())}const $c={...Dn},jc={};function Wc(e,t){const n=_t(jc);return n.current===jc&&(n.current=e(t)),n}const Bc=$c.useInsertionEffect,Hc=Bc&&Bc!==$c.useLayoutEffect?Bc:e=>e();function Uc(e){const t=Wc(Gc).current;return t.next=e,Hc(t.effect),t.trampoline}function Gc(){const e={next:void 0,callback:Zc,trampoline:(...t)=>{var n;return null===(n=e.callback)||void 0===n?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Zc(){}function Kc(e,t,n,r){const o=Wc(Jc).current;return function(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}(o,e,t,n,r)&&Yc(o,[e,t,n,r]),o.callback}function Jc(){return{callback:null,cleanup:null,refs:[]}}function Yc(e,t){e.refs=t,t.every((e=>null==e))?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const o=t[e];if(null!=o)switch(typeof o){case"function":{const t=o(n);"function"==typeof t&&(r[e]=t);break}case"object":o.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}function Xc(e){const t=Wc(Qc,e).current;return t.next=e,Vc(t.effect),t}function Qc(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const ed={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},td={...ed,position:"fixed",top:0,left:0},nd={...ed,position:"absolute"},rd=function(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach((e=>n.searchParams.append("args[]",e))),`Base UI error #${e}; visit ${n} for the full message.`};const od=(e,t,n,r,o,i,...l)=>{if(l.length>0)throw new Error(rd(1));let s;if(!e)throw new Error("Missing arguments");return s=e,s};var id,ld,sd={exports:{}},ad={};function ud(){return ld||(ld=1,sd.exports=function(){if(id)return ad;id=1;var e=zo,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,r=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function l(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),a=n({inst:{value:s,getSnapshot:t}}),u=a[0].inst,c=a[1];return o((function(){u.value=s,u.getSnapshot=t,l(u)&&c({inst:u})}),[e,s,t]),r((function(){return l(u)&&c({inst:u}),e((function(){l(u)&&c({inst:u})}))}),[e]),i(s),s};return ad.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,ad}()),sd.exports}
1var cd,dd,fd=ud(),pd={exports:{}},hd={},gd=(dd||(dd=1,pd.exports=function(){if(cd)return hd;cd=1;var e=zo,t=ud(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,l=e.useMemo,s=e.useDebugValue;return hd.useSyncExternalStoreWithSelector=function(e,t,a,u,c){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l((function(){function e(e){if(!i){if(i=!0,r=e,e=u(e),void 0!==c&&f.hasValue){var t=f.value;if(c(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var l=u(e);return void 0!==c&&c(t,l)?(r=e,t):(r=e,o=l)}var r,o,i=!1,l=void 0===a?null:a;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,a,u,c]);var p=r(e,d[0],d[1]);return i((function(){f.hasValue=!0,f.value=p}),[p]),s(p),p},hd}()),pd.exports);const md=parseInt(Rn,10);function vd(e){return md>=e}const yd=[];let bd;function wd(e){const t=(t,n)=>{const r=Wc(Sd).current;let o;try{bd=r;for(const e of yd)e.before(r);o=e(t,n);for(const e of yd)e.after(r);r.didInitialize=!0}finally{bd=void 0}return o};return t.displayName=e.displayName||e.name,t}function Sd(){return{didInitialize:!1}}const _d=vd(19)?function(e,t,n,r,o){const i=bd;if(!i)return function(e,t,n,r,o){const i=Et((()=>t(e.getSnapshot(),n,r,o)),[e,t,n,r,o]);return fd.useSyncExternalStore(e.subscribe,i,i)}(e,t,n,r,o);const l=i.syncIndex;let s;return i.syncIndex+=1,i.didInitialize?(s=i.syncHooks[l],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,o)||(s.store!==e&&(i.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=o,s.value=t(e.getSnapshot(),n,r,o))):(s={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o)},i.syncHooks.push(s)),s.value}:function(e,t,n,r,o){return gd.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,(e=>t(e,n,r,o)))};function xd(e,t,n,r,o){return _d(e,t,n,r,o)}var Cd;Cd={before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,o)||(t=!0,r.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const t of e.syncHooks)n.add(t.store);const r=[];for(const e of n)r.push(e.subscribe(t));return()=>{for(const e of r)e()}}),fd.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}},yd.push(Cd);class Ed{constructor(e){te(this,"subscribe",(e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}))),te(this,"getSnapshot",(()=>this.state)),this.state=e,this.listeners=new Set,this.updateTick=0}setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const t=this.updateTick;for(const n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){const e={...this.state};this.setState(e)}use(e,t,n,r){return xd(this,e,t,n,r)}}function Rd(){}const Id=Object.freeze([]),kd=Object.freeze({});class Pd extends Ed{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){It(e);const n=this;Vc((()=>{n.state[e]!==t&&n.set(e,t)}),[n,e,t])}useSyncedValueWithCleanup(e,t){const n=this;Vc((()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)})),[n,e,t])}useSyncedValues(e){const t=this,n=Object.values(e);Vc((()=>{t.update(e)}),[t,...n])}useControlledProp(e,t){It(e);const n=this,r=void 0!==t;Vc((()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})}),[n,e,t,r])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return It(e),xd(this,this.selectors[e],t,n,r)}useContextCallback(e,t){It(e);const n=Uc(null!=t?t:Rd);this.context[e]=n}useStateSetter(e){const t=_t(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n="function"==typeof e?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe((e=>{const o=n(e);if(!Object.is(r,o)){const e=r;r=o,t(o,e,this)}}))}}function Od(){return"undefined"!=typeof window}function Md(e){return Nd(e)?(e.nodeName||"").toLowerCase():"#document"}function Td(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ad(e){var t;return null==(t=(Nd(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Nd(e){return!!Od()&&(e instanceof Node||e instanceof Td(e).Node)}function Fd(e){return!!Od()&&(e instanceof Element||e instanceof Td(e).Element)}function zd(e){return!!Od()&&(e instanceof HTMLElement||e instanceof Td(e).HTMLElement)}function Dd(e){return!(!Od()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Td(e).ShadowRoot)}function Ld(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Zd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Vd(e){return/^(table|td|th)$/.test(Md(e))}function qd(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const $d=/transform|translate|scale|rotate|perspective|filter/,jd=/paint|layout|strict|content/,Wd=e=>!!e&&"none"!==e;let Bd;function Hd(e){const t=Fd(e)?Zd(e):e;return Wd(t.transform)||Wd(t.translate)||Wd(t.scale)||Wd(t.rotate)||Wd(t.perspective)||!Ud()&&(Wd(t.backdropFilter)||Wd(t.filter))||$d.test(t.willChange||"")||jd.test(t.contain||"")}function Ud(){return null==Bd&&(Bd="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Bd}function Gd(e){return/^(html|body|#document)$/.test(Md(e))}function Zd(e){return Td(e).getComputedStyle(e)}function Kd(e){return Fd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jd(e){if("html"===Md(e))return e;const t=e.assignedSlot||e.parentNode||Dd(e)&&e.host||Ad(e);return Dd(t)?t.host:t}function Yd(e){const t=Jd(e);return Gd(t)?e.ownerDocument?e.ownerDocument.body:e.body:zd(t)&&Ld(t)?t:Yd(t)}function Xd(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Yd(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=Td(o);if(i){const e=Qd(l);
1return t.concat(l,l.visualViewport||[],Ld(o)?o:[],e&&n?Xd(e):[])}return t.concat(o,Xd(o,[],n))}function Qd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ef(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function tf(e){return(null==e?void 0:e.ownerDocument)||document}function nf(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}const rf=[];function of(e){wt(e,rf)}const lf=null,sf=new class{constructor(){te(this,"callbacks",[]),te(this,"callbacksCount",0),te(this,"nextId",1),te(this,"startId",1),te(this,"isScheduled",!1),te(this,"tick",(e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1){var r;null===(r=t[n])||void 0===r||r.call(t,e)}}))}request(e){const t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class af{constructor(){te(this,"currentId",lf),te(this,"cancel",(()=>{this.currentId!==lf&&(sf.cancel(this.currentId),this.currentId=lf)})),te(this,"disposeEffect",(()=>this.cancel))}static create(){return new af}static request(e){return sf.request(e)}static cancel(e){return sf.cancel(e)}request(e){this.cancel(),this.currentId=sf.request((()=>{this.currentId=lf,e()}))}}function uf(){const e=Wc(af.create).current;return of(e.disposeEffect),e}class cf{constructor(){te(this,"currentId",0),te(this,"clear",(()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)})),te(this,"disposeEffect",(()=>this.clear))}static create(){return new cf}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=0,t()}),e)}isStarted(){return 0!==this.currentId}}function df(){const e=Wc(cf.create).current;return of(e.disposeEffect),e}const{userAgent:ff,platform:pf,maxTouchPoints:hf}="undefined"==typeof navigator?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:null!==(gf=navigator.platform)&&void 0!==gf?gf:"",maxTouchPoints:null!==(mf=navigator.maxTouchPoints)&&void 0!==mf?mf:0};var gf,mf;const vf=ff.toLowerCase(),yf=pf.toLowerCase(),bf=/^i(os$|p)/.test(yf)||"macintel"===yf&&hf>1,wf="android",Sf=yf===wf||vf.includes(wf),_f=!bf&&yf.startsWith("mac");yf.startsWith("win");const xf=_f||bf,Cf="undefined"!=typeof CSS&&!(null===(Q=(ee=CSS).supports)||void 0===Q||!Q.call(ee,"-webkit-backdrop-filter:none")),Ef=!Cf&&vf.includes("firefox");!Cf&&vf.includes("chrom");const Rf=xf,If=/jsdom|happydom/.test(vf);function kf(e){e.preventDefault(),e.stopPropagation()}function Pf(e){return!(""!==e.pointerType||!e.isTrusted)||(Sf&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Of(e){return!If&&(!Sf&&0===e.width&&0===e.height||Sf&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Mf(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}const Tf="data-base-ui-focusable",Af="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Nf="ArrowLeft",Ff="ArrowRight",zf="ArrowUp",Df="ArrowDown";function Lf(e){let t=e.activeElement;for(;null!=(null===(n=t)||void 0===n||null===(n=n.shadowRoot)||void 0===n?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Vf(e,t){var n;if(!e||!t)return!1;const r=null===(n=t.getRootNode)||void 0===n?void 0:n.call(t);if(e.contains(t))return!0;if(r&&Dd(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function qf(e){return"composedPath"in e?e.composedPath()[0]:e.target}function $f(e,t){if(!Fd(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,e]of t.entries())if(Vf(e,n))return!e.hasAttribute("data-trigger-disabled");return!1}function jf(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Wf(e){return zd(e)&&e.matches(Af)}function Bf(e){return!!e&&"combobox"===e.getAttribute("role")&&Wf(e)}function Hf(e){return e?e.hasAttribute(Tf)?e:e.querySelector(`[${Tf}]`)||e:null}function Uf(e,t,n){const r=function(e,t){return null==t||Mf(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:null==r?void 0:r[t]}function Gf(e){return"function"==typeof e?e():e}function Zf(e,t){return t||"click"===e||"mousedown"===e}const Kf="none",Jf="trigger-press",Yf="trigger-hover",Xf="trigger-focus",Qf="outside-press",ep="item-press",tp="close-press",np="clear-press",rp="input-change",op="input-clear",ip="focus-out",lp="escape-key",sp="list-navigation",ap="cancel-open",up="sibling-open",cp="imperative-action";function dp(e,t,n,r){let o=!1,i=!1;const l=kd;return{reason:e,event:null!=t?t:new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...l}}function fp(e,t,n){const r=null!=n?n:kd;return{reason:e,event:null!=t?t:new Event("base-ui"),...r}}const pp=Zt((function(e,t){const[n,r]=yt();Vc((()=>{Rf&&Cf&&r("button")}),[]);const o={tabIndex:0,role:n};return Zo.jsx("span",{...e,ref:t,style:td,"aria-hidden":!n||void 0,...o,"data-base-ui-focus-guard":""})})),hp=["top","right","bottom","left"],gp=Math.min,mp=Math.max,vp=Math.round,yp=Math.floor,bp=e=>({x:e,y:e}
1),wp={left:"right",right:"left",bottom:"top",top:"bottom"};function Sp(e,t,n){return mp(e,gp(t,n))}function _p(e,t){return"function"==typeof e?e(t):e}function xp(e){return e.split("-")[0]}function Cp(e){return e.split("-")[1]}function Ep(e){return"x"===e?"y":"x"}function Rp(e){return"y"===e?"height":"width"}function Ip(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function kp(e){return Ep(Ip(e))}function Pp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Op=["left","right"],Mp=["right","left"],Tp=["top","bottom"],Ap=["bottom","top"];function Np(e){const t=xp(e);return wp[t]+e.slice(t.length)}function Fp(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function zp(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Dp(e,t,n){return Math.floor(e/t)!==n}function Lp(e,t){return t<0||t>=e.length}function Vp(e,t){return $p(e.current,{disabledIndices:t})}function qp(e,t){return $p(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function $p(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do{i+=n?-o:o}while(i>=0&&i<=e.length-1&&jp(e,i,r));return i}
1function jp(e,t,n){var r;if("function"==typeof n?n(t):null!==(r=null==n?void 0:n.includes(t))&&void 0!==r&&r)return!0;const o=e[t];return!!o&&(!Wp(o)||!n&&(o.hasAttribute("disabled")||"true"===o.getAttribute("aria-disabled")))}function Wp(e,t=(e?Zd(e):null)){return!(!(e&&e.isConnected&&t)||function(e){return"hidden"===e.visibility||"collapse"===e.visibility}(t))&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}function Bp(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return Dd(n)?n.host:null}function Hp(e){for(const t of Array.from(e.children))if("summary"===Md(t))return t;return null}function Up(e,t){const n=Hp(t);return!!n&&(e===n||Vf(n,e))}function Gp(e){const t=e?Md(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==t||null!=e.parentElement&&"details"===Md(e.parentElement)&&Hp(e.parentElement)===e)&&("details"!==t||null==Hp(e))&&("input"!==t||"hidden"!==e.type)}function Zp(e){if(!Gp(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=Bp(t)){const n=t!==e,r="slot"===Md(t);if(t.hasAttribute("inert"))return!1;if(n&&"details"===Md(t)&&!t.open&&!Up(e,t)||t.hasAttribute("hidden")||!r&&!Kp(t,n))return!1}return!0}function Kp(e,t){const n=Zd(e);return t?"none"!==n.display:Wp(e,n)}function Jp(e){const t=e.tabIndex;if(t<0){const t=Md(e);if("details"===t||"audio"===t||"video"===t||zd(e)&&e.isContentEditable)return 0}return t}function Yp(e){if("input"!==Md(e))return null;const t=e;return"radio"===t.type&&""!==t.name?t:null}function Xp(e){if(zd(e)&&"slot"===Md(e)){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return zd(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Qp(e,t){Xp(e).forEach((e=>{Gp(e)&&t.push(e),Qp(e,t)}))}function eh(e,t,n){Xp(e).forEach((e=>{zd(e)&&e.matches(t)&&n.push(e),eh(e,t,n)}))}function th(e){return Zp(e)&&Jp(e)>=0}function nh(e){const t=[];return Qp(e,t),t.filter(Zp)}function rh(e){const t=nh(e);return t.filter((e=>Jp(e)>=0&&function(e,t){const n=Yp(e);if(!n)return!0;const r=t.find((e=>{const t=Yp(e);return(null==t?void 0:t.name)===n.name&&t.form===n.form&&t.checked}));return r?r===n:t.find((e=>{const t=Yp(e);return(null==t?void 0:t.name)===n.name&&t.form===n.form}))===n}(e,t)))}function oh(e,t){const n=rh(e),r=n.length;if(0===r)return;const o=Lf(tf(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function ih(e){return oh(tf(e).body,1)||e}function lh(e){return oh(tf(e).body,-1)||e}function sh(e,t){if(!e)return null;const n=rh(tf(e).body),r=n.length;if(0===r)return null;const o=n.indexOf(e);return-1===o?null:n[(o+t+r)%r]}function ah(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Vf(n,r)}function uh(e){const t=[];eh(e,"[data-tabindex]",t),t.forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}function ch(e,t,n=!0){return e.filter((e=>e.parentId===t)).flatMap((t=>{var r;return[...!n||null!==(r=t.context)&&void 0!==r&&r.open?[t]:[],...ch(e,t.id,n)]}))}function dh(e,t){var n;let r=[],o=null===(n=e.find((e=>e.id===t)))||void 0===n?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}function fh(e){return`data-base-ui-${e}`}let ph=0;function hh(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;function i(){o&&!o()||null==e||e.focus({preventScroll:n})}if(cancelAnimationFrame(ph),r)return i(),Rd;const l=requestAnimationFrame(i);return ph=l,()=>{ph===l&&(cancelAnimationFrame(l),ph=0)}}const gh={inert:new WeakMap,"aria-hidden":new WeakMap},mh="data-base-ui-inert",vh={inert:new WeakSet,"aria-hidden":new WeakSet};let yh=new WeakMap,bh=0;function wh(e){return e?Dd(e)?e.host:wh(e.parentNode):null}const Sh=(e,t)=>t.map((t=>{if(e.contains(t))return t;const n=wh(t);return e.contains(n)?n:null})).filter((e=>null!=e)),_h=e=>{const t=new Set;return e.forEach((e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode})),t},xh=(e,t,n)=>{const r=[],o=e=>
1{e&&!n.has(e)&&Array.from(e.children).forEach((e=>{"script"!==Md(e)&&(t.has(e)?o(e):r.push(e))}))};return o(e),r};function Ch(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t;return function(e,t,n,r,{mark:o=!0}){let i=null;r?i="inert":n&&(i="aria-hidden");let l=null,s=null;const a=Sh(t,e),u=o?xh(t,_h(a),new Set(a)):[],c=[],d=[];if(i){const e=gh[i],n=function(e){return vh[e]}(i);s=n,l=e;const r=Sh(t,Array.from(t.querySelectorAll("[aria-live]"))),o=a.concat(r);xh(t,_h(o),new Set(o)).forEach((t=>{const r=t.getAttribute(i),o=null!==r&&"false"!==r,l=(e.get(t)||0)+1;e.set(t,l),c.push(t),1===l&&o&&n.add(t),o||t.setAttribute(i,"inert"===i?"":"true")}))}return o&&u.forEach((e=>{const t=(yh.get(e)||0)+1;yh.set(e,t),d.push(e),1===t&&e.setAttribute(mh,"")})),bh+=1,()=>{l&&c.forEach((e=>{const t=(l.get(e)||0)-1;var n,r;l.set(e,t),t||(null!==(n=s)&&void 0!==n&&n.has(e)||!i||e.removeAttribute(i),null===(r=s)||void 0===r||r.delete(e))})),o&&d.forEach((e=>{const t=(yh.get(e)||0)-1;yh.set(e,t),t||e.removeAttribute(mh)})),bh-=1,bh||(gh.inert=new WeakMap,gh["aria-hidden"]=new WeakMap,vh.inert=new WeakSet,vh["aria-hidden"]=new WeakSet,yh=new WeakMap)}}(e,tf(e[0]).body,n,r,{mark:o})}let Eh=0;const Rh=$c.useId;function Ih(e,t){if(void 0!==Rh){const n=Rh();return null!=e?e:t?`${t}-${n}`:n}return function(e,t="mui"){const[n,r]=yt(e),o=e||n;return wt((()=>{null==n&&(Eh+=1,r(`${t}-${Eh}`))}),[n,t]),o}(e,t)}function kh(e){var t;if(!kn(e))return null;const n=e,r=n.props;return null!==(t=vd(19)?null==r?void 0:r.ref:n.ref)&&void 0!==t?t:null}function Ph(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}const Oh={};function Mh(e,t,n,r,o){if(!(n||r||o||e))return Th(t);let i=Th(e);return t&&(i=Ah(i,t)),n&&(i=Ah(i,n)),r&&(i=Ah(i,r)),o&&(i=Ah(i,o)),i}function Th(e){return Fh(e)?{...zh(e,Oh)}:function(e){const t={...e};for(const e in t){const n=t[e];Nh(e,n)&&(t[e]=Lh(n))}return t}(e)}function Ah(e,t){return Fh(t)?zh(t,e):function(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":e[n]=Ph(e.style,r);break;case"className":e[n]=qh(e.className,r);break;default:Nh(n,r)?e[n]=Dh(e[n],r):e[n]=r}}return e}(e,t)}function Nh(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return 111===n&&110===r&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}function Fh(e){return"function"==typeof e}function zh(e,t){return Fh(e)?e(t):null!=e?e:Oh}function Dh(e,t){return t?e?(...n)=>{const r=n[0];if($h(r)){const o=r;Vh(o);const i=t(...n);return o.baseUIHandlerPrevented||null==e||e(...n),i}const o=t(...n);return null==e||e(...n),o}:Lh(t):e}function Lh(e){return e?(...t)=>{const n=t[0];return $h(n)&&Vh(n),e(...t)}:e}function Vh(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function qh(e,t){return t?e?t+" "+e:t:e}function $h(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}function jh(e,t,n={}){var r;const o=t.render,i=function(e,t={}){var n;const{className:r,style:o,render:i}=e,{state:l=kd,ref:s,props:a,stateAttributesMapping:u,enabled:c=!0}=t,d=c?function(e,t){return"function"==typeof e?e(t):e}(r,l):void 0,f=c?function(e,t){return"function"==typeof e?e(t):e}(o,l):void 0,p=c?function(e,t){const n={};for(const r in e){const o=e[r];if(null!=t&&t.hasOwnProperty(r)){const e=t[r](o);null!=e&&Object.assign(n,e)}else!0===o?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}(l,u):kd,h=c&&a?function(e){return Array.isArray(e)?function(e){if(0===e.length)return Oh;if(1===e.length)return Th(e[0]);let t=Th(e[0]);for(let n=1;n<e.length;n+=1)t=Ah(t,e[n]);return t}(e):Mh(void 0,e)}(a):void 0,g=c?null!==(n=Ph(p,h))&&void 0!==n?n:{}:kd;return"undefined"!=typeof document&&(c?Array.isArray(s)?g.ref=function(e){const t=Wc(Jc).current;return function(e,t){return e.refs.length!==t.length||e.refs.some(((e,n)=>e!==t[n]))}(t,e)&&Yc(t,e),t.callback}([g.ref,kh(i),...s]):g.ref=Kc(g.ref,kh(i),s):Kc(null,null)),c?(void 0!==d&&(g.className=qh(g.className,d)),void 0!==f&&(g.style=Ph(g.style,f)),g):kd}(t,n);return!1===n.enabled?null:function(e,t,n,r){if(t){var o;if("function"==typeof t)return t(n,r);const e=Mh(n,t.props);e.ref=n.ref;let i=t;return(null===(o=i)||void 0===o?void 0:o.$$typeof)===Wh&&(i=Jt.toArray(t)[0]),Mn(i,e)}if(e&&"string"==typeof e)return function(e,t){return"button"===e?Oe("button",{type:"button",...t,key:t.key}):"img"===e?Oe("img",{alt:"",...t,key:t.key}):Oe(e,t)}(e,n);throw new Error(rd(8))}(e,o,i,null!==(r=n.state)&&void 0!==r?r:kd)}const Wh=Symbol.for("react.lazy"),Bh={style:{transition:"none"}}
1,Hh={fallbackAxisSide:"none"},Uh={fallbackAxisSide:"end"},Gh={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Zh=rt(null),Kh=()=>Rt(Zh),Jh=fh("portal"),Yh=Zt((function(e,t){const{render:n,className:r,style:o,children:i,container:l,renderGuards:s,...a}=e,{portalNode:u,portalSubtree:c}=function(e={}){const{ref:t,container:n,componentProps:r=kd,elementProps:o}=e,i=Ih(),l=Kh(),s=null==l?void 0:l.portalNode,[a,u]=yt(null),[c,d]=yt(null),f=Uc((e=>{null!==e&&d(e)})),p=_t(null);Vc((()=>{var e,t;if(null===n)return void(p.current&&(p.current=null,d(null),u(null)));if(null==i)return;const r=null!==(e=null!==(t=n&&(Nd(n)?n:n.current))&&void 0!==t?t:s)&&void 0!==e?e:document.body;null!=r?p.current!==r&&(p.current=r,d(null),u(r)):p.current&&(p.current=null,d(null),u(null))}),[n,s,i]);const h=jh("div",r,{ref:[t,f],props:[{id:i,[Jh]:""},o]});return{portalNode:c,portalSubtree:a&&h?un(h,a):null}}({container:l,ref:t,componentProps:e,elementProps:a}),d=_t(null),f=_t(null),p=_t(null),h=_t(null),[g,m]=yt(null),v=_t(!1),y=null==g?void 0:g.modal,b=null==g?void 0:g.open,w="boolean"==typeof s?s:!!g&&!g.modal&&g.open&&!!u;wt((()=>{if(u&&!y)return ef(nf(u,"focusin",e,!0),nf(u,"focusout",e,!0));function e(e){u&&e.relatedTarget&&ah(e)&&("focusin"===e.type?v.current&&(uh(u),v.current=!1):(function(e){rh(e).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}(u),v.current=!0))}}),[u,y]),Vc((()=>{u&&!0===b&&v.current&&(uh(u),v.current=!1)}),[b,u]);const S=Ct((()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:u,setFocusManagerState:m})),[u]);return Zo.jsxs(Ae,{children:[c,Zo.jsxs(Zh.Provider,{value:S,children:[w&&u&&Zo.jsx(pp,{"data-type":"outside",ref:d,onFocus:e=>{if(ah(e,u)){var t;null===(t=p.current)||void 0===t||t.focus()}else{const e=lh(g?g.domReference:null);null==e||e.focus()}}}),w&&u&&Zo.jsx("span",{"aria-owns":u.id,style:Gh}),u&&un(i,u),w&&u&&Zo.jsx(pp,{"data-type":"outside",ref:f,onFocus:e=>{if(ah(e,u)){var t;null===(t=h.current)||void 0===t||t.focus()}else{const t=ih(g?g.domReference:null);null==t||t.focus(),null!=g&&g.closeOnFocusOut&&(null==g||g.onOpenChange(!1,dp(ip,e.nativeEvent)))}}})]})]})}));function Xh(){const e=new Map;return{emit(t,n){var r;null===(r=e.get(t))||void 0===r||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null===(r=e.get(t))||void 0===r||r.delete(n)}}}class Qh{constructor(){te(this,"nodesRef",{current:[]}),te(this,"events",Xh())}addNode(e){this.nodesRef.current.push(e)}removeNode(e){const t=this.nodesRef.current.findIndex((t=>t===e));-1!==t&&this.nodesRef.current.splice(t,1)}}const eg=rt(null),tg=rt(null),ng=()=>{var e;return(null===(e=Rt(eg))||void 0===e?void 0:e.id)||null},rg=e=>{const t=Rt(tg);return null!=e?e:t};function og(e){const t=Ih(),n=rg(e),r=ng();return Vc((()=>{if(!t)return;const e={id:t,parentId:r};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,r]),t}function ig(e){const{children:t,id:n}=e,r=ng();return Zo.jsx(eg.Provider,{value:Ct((()=>({id:n,parentId:r})),[n,r]),children:t})}function lg(e){const{children:t,externalTree:n}=e,r=Wc((()=>null!=n?n:new Qh)).current;return Zo.jsx(tg.Provider,{value:r,children:t})}function sg(e){return null==e?e:"current"in e?e.current:e}let ag=[];function ug(){ag=ag.filter((e=>{var t;return null===(t=e.deref())||void 0===t?void 0:t.isConnected}))}function cg(e){ug(),e&&"body"!==Md(e)&&(ag.push(new WeakRef(e)),ag.length>20&&(ag=ag.slice(-20)))}function dg(){var e;return ug(),null===(e=ag[ag.length-1])||void 0===e?void 0:e.deref()}function fg(e){var t;if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex"))return;if(null===(t=e.getAttribute("role"))||void 0===t||!t.includes("dialog"))return;const n=nh(e).filter((e=>{const t=e.getAttribute("data-tabindex")||"";return th(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")})),r=e.getAttribute("tabindex");0===n.length?"0"!==r&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):("-1"!==r||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function pg(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:l=!1,modal:s=!0,closeOnFocusOut:a=!0,openInteractionType:u="",nextFocusableElement:c,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:h}=e,g="rootStore"in t?t.rootStore:t,m=g.useState("open"),v=g.useState("domReferenceElement"),y=g.useState("floatingElement"),{events:b,dataRef:w}=g.context,S=Uc((()=>{var e;return null===(e=w.current.floatingContext)||void 0===e?void 0:e.nodeId})),_=!1===o,x=Bf(v)&&_,C=Xc(o),E=Xc(i),R=Xc(u),I=Xc(m),k=rg(p),P=Kh(),O=_t(!1),M=_t(!1),T=_t(!1),A=_t(null),N=_t(""),F=_t(""),z=_t(null),D=_t(null),L=Kc(z,f,null==P?void 0:P.beforeInsideRef),V=Kc(D,null==P?void 0:P.afterInsideRef),q=df(),$=df(),j=uf(),W=null!=P,B=Hf(y),H=Uc(((e=B)=>e?rh(e):[])),U=Uc((()=>{var e;return null!==(e=null==h?void 0:h().filter((e=>null!=e)))&&void 0!==e?e:[]}));wt((()=>
1{if(!r&&s)return nf(tf(B),"keydown",(function(e){"Tab"===e.key&&Vf(B,Lf(tf(B)))&&0===H().length&&!x&&kf(e)}))}),[r,B,s,x,H]),wt((()=>{if(r||!m)return;const e=tf(B);function t(){T.current=!1}return ef(nf(e,"pointerdown",(function(e){const t=qf(e),n=U(),r=Vf(y,t)||Vf(v,t)||Vf(null==P?void 0:P.portalNode,t)||n.some((e=>e===t||Vf(e,t)));T.current=!r,F.current=e.pointerType||"keyboard",null!=t&&t.closest("[data-base-ui-click-trigger]")&&(M.current=!0,$.start(0,(()=>{M.current=!1})))}),!0),nf(e,"pointerup",t,!0),nf(e,"pointercancel",t,!0),nf(e,"keydown",(function(){F.current="keyboard"}),!0),t)}),[r,y,v,B,m,P,$,U]),wt((()=>{if(r||!a)return;const e=tf(B);function t(t){const n=t.relatedTarget,r=t.currentTarget,o=qf(t);s&&null==n&&null!=o&&Vf(y,o)&&cg(o),queueMicrotask((()=>{const i=S(),a=g.context.triggerElements,u=U(),f=(null==n?void 0:n.hasAttribute(fh("focus-guard")))&&[z.current,D.current,null==P?void 0:P.beforeInsideRef.current,null==P?void 0:P.afterInsideRef.current,null==P?void 0:P.beforeOutsideRef.current,null==P?void 0:P.afterOutsideRef.current,sg(d),sg(c)].includes(n),p=!(Vf(v,n)||Vf(y,n)||Vf(n,y)||Vf(null==P?void 0:P.portalNode,n)||u.some((e=>e===n||Vf(e,n)))||null!=n&&a.hasElement(n)||a.hasMatchingElement((e=>Vf(e,n)))||f||k&&(ch(k.nodesRef.current,i).find((e=>{var t,r;return Vf(null===(t=e.context)||void 0===t?void 0:t.elements.floating,n)||Vf(null===(r=e.context)||void 0===r?void 0:r.elements.domReference,n)}))||dh(k.nodesRef.current,i).find((e=>{var t,r,o;return[null===(t=e.context)||void 0===t?void 0:t.elements.floating,Hf(null===(r=e.context)||void 0===r?void 0:r.elements.floating)].includes(n)||(null===(o=e.context)||void 0===o?void 0:o.elements.domReference)===n}))));if(r===v&&B&&fg(B),l&&r!==v&&!Wp(o)&&Lf(e)===e.body){if(zd(B)&&(B.focus(),"popup"===l))return void j.request((()=>{B.focus()}));const e=H(),t=A.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||B;zd(n)&&n.focus()}w.current.insideReactTree?w.current.insideReactTree=!1:!x&&s||!n||!p||M.current||!x&&n===dg()||(O.current=!0,g.setOpen(!1,dp(ip,t)))}))}const n=zd(v)?v:null;return y||n?ef(n&&nf(n,"focusout",t),n&&nf(n,"pointerdown",(function(){M.current=!0,$.start(0,(()=>{M.current=!1}))})),y&&nf(y,"focusin",(function(e){const t=qf(e);th(t)&&(A.current=t)})),y&&nf(y,"focusout",t),y&&P&&nf(y,"focusout",(function(){T.current||(w.current.insideReactTree=!0,q.start(0,(()=>{w.current.insideReactTree=!1})))}),!0)):void 0}),[r,v,y,B,s,k,P,g,a,l,H,x,S,w,q,$,j,c,d,U]),wt((()=>{var e,t;if(r||!y||!m)return;const n=Array.from((null==P||null===(e=P.portalNode)||void 0===e?void 0:e.querySelectorAll(`[${fh("portal")}]`))||[]),o=null===(t=(k?dh(k.nodesRef.current,S()):[]).find((e=>{var t;return Bf((null===(t=e.context)||void 0===t?void 0:t.elements.domReference)||null)})))||void 0===t||null===(t=t.context)||void 0===t?void 0:t.elements.domReference,i=[y,...n,z.current,D.current,null==P?void 0:P.beforeOutsideRef.current,null==P?void 0:P.afterOutsideRef.current,...U(),o,sg(d),sg(c),x?v:null].filter((e=>null!=e)),l=Ch(i,{ariaHidden:s||x,mark:!1}),a=[y,...n].filter((e=>null!=e)),u=Ch(a);return()=>{u(),l()}}),[m,r,v,y,s,P,x,k,S,c,d,U]),Vc((()=>{if(!m||r||!zd(B))return;const e=tf(B),t=Lf(e);queueMicrotask((()=>{const n=C.current,r="function"==typeof n?n(R.current||""):n;if(void 0===r||!1===r)return;if(Vf(B,t))return;let o=null;const i=()=>(null==o&&(o=H(B)),o[0]||B);let l;l=!0===r||null===r?i():sg(r),l=l||i();const s=Vf(B,Lf(e));hh(l,{preventScroll:l===B,shouldFocus(){if(!I.current)return!1;if(s)return!0;const t=Lf(e);return!(t!==l&&Vf(B,t))}})}))}),[r,m,B,H,C,R,I]),Vc((()=>{if(r||!B)return;const e=tf(B),t=Lf(e),n=null==R.current;function o(e){if(e.open||(N.current=function(e,t){const n=Td(qf(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,F.current)),e.reason===Yf&&"mouseleave"===e.nativeEvent.type&&(O.current=!0),e.reason===Qf)if(e.nested)O.current=!1;else if(Pf(e.nativeEvent)||Of(e.nativeEvent))O.current=!1;else{let e=!1;tf(B).createElement("div").focus({get preventScroll(){return e=!0,!1}}),O.current=!e}}return cg(t),b.on("openchange",o),()=>{b.off("openchange",o);const r=Lf(e),i=U(),l=Vf(y,r)||i.some((e=>e===r||Vf(e,r)))||k&&ch(k.nodesRef.current,S(),!1).some((e=>{var t;return Vf(null===(t=e.context)||void 0===t?void 0:t.elements.floating,r)})),s=E.current,a=function(){const e=E.current;let r="function"==typeof e?e(N.current):e;if(void 0===r||!1===r)return null;null===r&&(r=!0);const o=null!=v&&v.isConnected?v:null,i=null!=t&&t.isConnected&&"body"!==Md(t)?t:null;let l=n?i||o:o||i;return l||(l=dg()||null),"boolean"==typeof r?l:sg(r)||l||null}();queueMicrotask((()=>{const t=(n=a)?th(n)?n:rh(n)[0]||n:null;var n;const o="boolean"!=typeof s;
1s&&!O.current&&zd(t)&&(o||t===r||r===e.body||l)&&t.focus({preventScroll:!0}),O.current=!1}))}}),[r,y,B,E,R,b,k,v,S,U]),Vc((()=>{if(!Cf||m||!y)return;const e=Lf(tf(y));zd(e)&&Wf(e)&&Vf(y,e)&&e.blur()}),[m,y]),Vc((()=>{if(!r&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:a,open:m,onOpenChange:g.setOpen,domReference:v}),()=>{P.setFocusManagerState(null)}}),[r,P,s,m,g,a,v]),Vc((()=>{if(!r&&B)return fg(B),()=>{queueMicrotask(ug)}}),[r,B]);const G=!r&&(!s||!x)&&(W||s);return Zo.jsxs(Ae,{children:[G&&Zo.jsx(pp,{"data-type":"inside",ref:L,onFocus:e=>{if(s){const e=H();hh(e[e.length-1])}else if(null!=P&&P.portalNode)if(O.current=!1,ah(e,P.portalNode)){const e=ih(v);null==e||e.focus()}else{var t;null===(t=sg(null!=d?d:P.beforeOutsideRef))||void 0===t||t.focus()}}}),n,G&&Zo.jsx(pp,{"data-type":"inside",ref:V,onFocus:e=>{if(s)hh(H()[0]);else if(null!=P&&P.portalNode)if(a&&(O.current=!0),ah(e,P.portalNode)){const e=lh(v);null==e||e.focus()}else{var t;null===(t=sg(null!=c?c:P.afterOutsideRef))||void 0===t||t.focus()}}})]})}function hg(e,t={}){const{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:i=!1,stickIfOpen:l=!0,touchOpenDelay:s=0,reason:a=Jf}=t,u="rootStore"in e?e.rootStore:e,c=u.context.dataRef,d=_t(void 0),f=uf(),p=df(),h=Ct((()=>{function e(e,t,n,r){const o=dp(a,t,n);e&&"touch"===r&&s>0?p.start(s,(()=>{u.setOpen(!0,o)})):u.setOpen(e,o)}function t(e,t,n){const r=c.current.openEvent,i=u.select("domReferenceElement")!==t;return!((!e||!i)&&e&&o&&(!r||!l||n(r.type)))}return{onPointerDown(e){d.current=e.pointerType},onMouseDown(n){const o=d.current,l=n.nativeEvent,s=u.select("open");if(0!==n.button||"click"===r||Mf(o,!0)&&i)return;const a=t(s,n.currentTarget,(e=>"click"===e||"mousedown"===e)),c=qf(l);if(Wf(c))return void e(a,l,c,o);const p=n.currentTarget;f.request((()=>{e(a,l,p,o)}))},onClick(n){if("mousedown-only"===r)return;const o=d.current;"mousedown"===r&&o?d.current=void 0:Mf(o,!0)&&i||e(t(u.select("open"),n.currentTarget,(e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e)),n.nativeEvent,n.currentTarget,o)},onKeyDown(){d.current=void 0}}}),[c,r,i,a,u,l,o,f,p,s]);return Ct((()=>n?{reference:h}:kd),[n,h])}function gg(){return!1}function mg(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:i="sloppy",referencePress:l=gg,bubbles:s,externalTree:a}=t,u="rootStore"in e?e.rootStore:e,c=u.useState("open"),d=u.useState("floatingElement"),{dataRef:f}=u.context,p=rg(a),h=Uc("function"==typeof o?o:()=>!1),g="function"==typeof o?h:o,m=!1!==g,v=Uc((()=>i)),{escapeKey:y,outsidePress:b}={escapeKey:"boolean"==typeof(w=s)?w:null!==(S=null==w?void 0:w.escapeKey)&&void 0!==S&&S,outsidePress:"boolean"==typeof w?w:null===(_=null==w?void 0:w.outsidePress)||void 0===_||_};var w,S,_;const x=_t(!1),C=_t(!1),E=_t(!1),R=_t(!1),I=_t(""),k=_t(null),P=df(),O=df(),M=Uc((()=>{O.clear(),f.current.insideReactTree=!1})),T=Uc((e=>{var t;const n=null===(t=f.current.floatingContext)||void 0===t?void 0:t.nodeId;return(p?ch(p.nodesRef.current,n):[]).some((t=>{var n;return(null===(n=t.context)||void 0===n?void 0:n.open)&&!t.context.dataRef.current[e]}))})),A=Uc((e=>jf(e,u.select("floatingElement"))||jf(e,u.select("domReferenceElement")))),N=Uc((e=>{l()&&u.setOpen(!1,dp(Jf,e.nativeEvent))})),F=Uc((e=>{if(!c||!n||!r||"Escape"!==e.key)return;if(R.current)return;if(!y&&T("__escapeKeyBubbles"))return;const t=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,o=dp(lp,t);u.setOpen(!1,o),o.isCanceled||e.preventDefault(),y||o.isPropagationAllowed||e.stopPropagation()})),z=Uc((()=>{f.current.insideReactTree=!0,O.start(0,M)})),D=Uc((e=>{if(!c||!n||0!==e.button)return;const t=qf(e.nativeEvent);Vf(u.select("floatingElement"),t)&&(x.current||(x.current=!0,C.current=!1))})),L=Uc((e=>{c&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(C.current=!0)}));wt((()=>{if(!c||!n)return;f.current.__escapeKeyBubbles=y,f.current.__outsidePressBubbles=b;const e=new cf,t=new cf;function o(){E.current=!0,t.start(0,(()=>{E.current=!1}))}function i(){x.current=!1,C.current=!1}function l(){const e=I.current,t="pen"!==e&&e?e:"mouse",n=v(),r="function"==typeof n?n():n;return"string"==typeof r?r:r[t]}function s(e){var t;const n=null===(t=f.current.floatingContext)||void 0===t?void 0:t.nodeId,r=p&&ch(p.nodesRef.current,n).some((t=>{var n;return jf(e,null===(n=t.context)||void 0===n?void 0:n.elements.floating)}));return A(e)||r}function a(e){if(function(e){const t=l();return"intentional"===t&&"click"!==e.type||"sloppy"===t&&"click"===e.type}(e))return"click"===e.type||A(e)||(t.clear(),E.current=!1),void M();if(f.current.insideReactTree)return void M();const n=qf(e),r=`[${fh("inert")}]`,o=Fd(n)?n.getRootNode():null,i=Array.from((Dd(o)?o:tf(u.select("floatingElement"))).querySelectorAll(r)),a=u.context.triggerElements;
1if(n&&(a.hasElement(n)||a.hasMatchingElement((e=>Vf(e,n)))))return;let c=Fd(n)?n:null;for(;c&&!Gd(c);){const e=Jd(c);if(Gd(e)||!Fd(e))break;c=e}if(!i.length||!Fd(n)||n.matches("html,body")||Vf(n,u.select("floatingElement"))||!i.every((e=>!Vf(c,e)))){if(zd(n)&&!("touches"in e)){const t=Gd(n),r=Zd(n),o=/auto|scroll/,i=t||o.test(r.overflowX),l=t||o.test(r.overflowY),s=i&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,a=l&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,u="rtl"===r.direction,c=a&&(u?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(c||d)return}if(!s(e))return"intentional"===l()&&E.current?(t.clear(),void(E.current=!1)):void(("function"!=typeof g||g(e))&&(T("__outsidePressBubbles")||(u.setOpen(!1,dp(Qf,e)),M())))}}function h(e){if("sloppy"!==l()||!u.select("open")||!n||A(e))return;const t=e.touches[0];t&&(k.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,(()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)})))}function w(e,t){const n=qf(e);if(!n)return;const r=nf(n,e.type,(()=>{t(e),r()}))}function S(e){P.clear(),"pointerdown"===e.type&&(I.current=e.pointerType),"mousedown"===e.type&&k.current&&!k.current.dismissOnMouseDown||w(e,(e=>{"pointerdown"===e.type?function(e){"sloppy"===l()&&"touch"!==e.pointerType&&u.select("open")&&n&&!A(e)&&a(e)}(e):a(e)}))}function _(e){if(!x.current)return;const n=C.current;i(),"intentional"===l()&&("pointercancel"!==e.type?s(e)||(n?o():("function"!=typeof g||g(e))&&(t.clear(),E.current=!0,M())):n&&o())}function O(e){if("sloppy"!==l()||!k.current||A(e))return;const t=e.touches[0];if(!t)return;const n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),o=Math.sqrt(n*n+r*r);o>5&&(k.current.dismissOnTouchEnd=!0),o>10&&(a(e),P.clear(),k.current=null)}function N(e){"sloppy"===l()&&k.current&&!A(e)&&(k.current.dismissOnTouchEnd&&a(e),P.clear(),k.current=null)}const z=tf(d),D=ef(r&&ef(nf(z,"keydown",F),nf(z,"compositionstart",(function(){e.clear(),R.current=!0})),nf(z,"compositionend",(function(){e.start(Cf?5:0,(()=>{R.current=!1}))}))),m&&ef(nf(z,"click",S,!0),nf(z,"pointerdown",S,!0),nf(z,"pointerup",_,!0),nf(z,"pointercancel",_,!0),nf(z,"mousedown",S,!0),nf(z,"mouseup",_,!0),nf(z,"touchstart",(function(e){I.current="touch",w(e,h)}),!0),nf(z,"touchmove",(function(e){w(e,O)}),!0),nf(z,"touchend",(function(e){w(e,N)}),!0)));return()=>{D(),e.clear(),t.clear(),i(),E.current=!1}}),[f,d,r,m,g,c,n,y,b,F,M,v,T,A,p,u,P]),wt(M,[g,M]);const V=Ct((()=>({onKeyDown:F,onPointerDown:N,onClick:N})),[F,N]),q=Ct((()=>({onKeyDown:F,onPointerDown:L,onMouseDown:L,onClickCapture:z,onMouseDownCapture(e){z(),D(e)},onPointerDownCapture(e){z(),D(e)},onMouseUpCapture:z,onTouchEndCapture:z,onTouchMoveCapture:z})),[F,z,D,L]);return Ct((()=>n?{reference:V,floating:q,trigger:V}:{}),[n,V,q])}function vg(e,t,n){let{reference:r,floating:o}=e;const i=Ip(t),l=kp(t),s=Rp(l),a=xp(t),u="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(a){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Cp(t)){case"start":p[l]-=f*(n&&u?-1:1);break;case"end":p[l]+=f*(n&&u?-1:1)}return p}async function yg(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=_p(t,e),h=Fp(p),g=s[f?"floating"===d?"reference":"floating":d],m=zp(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),v="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=zp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:a}):v);return{top:(m.top-w.top+h.top)/b.y,bottom:(w.bottom-m.bottom+h.bottom)/b.y,left:(m.left-w.left+h.left)/b.x,right:(w.right-m.right+h.right)/b.x}}function bg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wg(e){return hp.some((t=>e[t]>=0))}const Sg=new Set(["left","top"]);function _g(e){const t=Zd(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=zd(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=vp(n)!==i||vp(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function xg(e){return Fd(e)?e:e.contextElement}function Cg(e){const t=xg(e);
vendor: 5,489 bytes, line 1
1if(!zd(t))return bp(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_g(t);let l=(i?vp(n.width):n.width)/r,s=(i?vp(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}const Eg=bp(0);function Rg(e){const t=Td(e);return Ud()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Eg}function Ig(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=xg(e);let l=bp(1);t&&(r?Fd(r)&&(l=Cg(r)):l=Cg(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Td(e))&&t}(i,n,r)?Rg(i):bp(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,c=o.width/l.x,d=o.height/l.y;if(i){const e=Td(i),t=r&&Fd(r)?Td(r):r;let n=e,o=Qd(n);for(;o&&r&&t!==n;){const e=Cg(o),t=o.getBoundingClientRect(),r=Zd(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;a*=e.x,u*=e.y,c*=e.x,d*=e.y,a+=i,u+=l,n=Td(o),o=Qd(n)}}return zp({width:c,height:d,x:a,y:u})}function kg(e,t){const n=Kd(e).scrollLeft;return t?t.left+n:Ig(Ad(e)).left+n}function Pg(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-kg(e,n),y:n.top+t.scrollTop}}function Og(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Td(e),r=Ad(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const e=Ud();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}const u=kg(r);if(u<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else u<=25&&(i+=u);return{width:i,height:l,x:s,y:a}}(e,n);else if("document"===t)r=function(e){const t=Ad(e),n=Kd(e),r=e.ownerDocument.body,o=mp(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=mp(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+kg(e);const s=-n.scrollTop;return"rtl"===Zd(r).direction&&(l+=mp(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}(Ad(e));else if(Fd(t))r=function(e,t){const n=Ig(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=zd(e)?Cg(e):bp(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Rg(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return zp(r)}function Mg(e,t){const n=Jd(e);return!(n===t||!Fd(n)||Gd(n))&&("fixed"===Zd(n).position||Mg(n,t))}function Tg(e,t,n){const r=zd(t),o=Ad(t),i="fixed"===n,l=Ig(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=bp(0);function u(){a.x=kg(o)}if(r||!r&&!i)if(("body"!==Md(t)||Ld(o))&&(s=Kd(t)),r){const e=Ig(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const c=!o||r||i?bp(0):Pg(o,s);return{x:l.left+s.scrollLeft-a.x-c.x,y:l.top+s.scrollTop-a.y-c.y,width:l.width,height:l.height}}function Ag(e){return"static"===Zd(e).position}function Ng(e,t){if(!zd(e)||"fixed"===Zd(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ad(e)===n&&(n=n.ownerDocument.body),n}function Fg(e,t){const n=Td(e);if(qd(e))return n;if(!zd(e)){let t=Jd(e);for(;t&&!Gd(t);){if(Fd(t)&&!Ag(t))return t;t=Jd(t)}return n}let r=Ng(e,t);for(;r&&Vd(r)&&Ag(r);)r=Ng(r,t);return r&&Gd(r)&&Ag(r)&&!Hd(r)?n:r||function(e){let t=Jd(e);for(;zd(t)&&!Gd(t);){if(Hd(t))return t;if(qd(t))return null;t=Jd(t)}return null}(e)||n}const zg={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,l=Ad(r),s=!!t&&qd(t.floating);if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},u=bp(1);const c=bp(0),d=zd(r);if((d||!d&&!i)&&(("body"!==Md(r)||Ld(l))&&(a=Kd(r)),d)){const e=Ig(r);u=Cg(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}const f=!l||d||i?bp(0):Pg(l,a);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}},getDocumentElement:Ad,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?qd(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Xd(e,[],!1).filter((e=>Fd(e)&&"body"!==Md(e))),o=null;const i="fixed"===Zd(e).position;let l=i?Jd(e):e;for(;Fd(l)&&!Gd(l);){const t=Zd(l),n=Hd(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ld(l)&&!n&&Mg(e,l))?r=r.filter((e=>e!==l)):o=t,l=Jd(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=Og(t,i[0],o);let s=l.top,a=l.right,u=l.bottom,c=l.left;for(let e=1;e<i.length;e++){const n=Og(t,i[e],o);s=mp(n.top,s),a=gp(n.right,a),u=gp(n.bottom,u),c=mp(n.left,c)}return{width:a-c,height:u-s,x:c,y:s}},getOffsetParent:Fg,getElementRects:async function(e){const t=this.getOffsetParent||Fg,n=this.getDimensions,r=await n(e.floating);return{reference:Tg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=_g(e);return{width:t,height:n}},getScale:Cg,isElement:Fd,isRTL:function(e){return"rtl"===Zd(e).direction}};function Dg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lg(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:a=!1}=r,u=xg(e),c=o||i?[...u?Xd(u):[],...t?Xd(t):[]]:[];
vendor: 4,990 bytes, line 1
1c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=u&&s?function(e,t){let n,r=null;const o=Ad(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;const h={rootMargin:-yp(d)+"px "+-yp(o.clientWidth-(c+f))+"px "+-yp(o.clientHeight-(d+p))+"px "+-yp(c)+"px",threshold:mp(0,gp(1,a))||1};let g=!0;function m(t){const r=t[0].intersectionRatio;if(r!==a){if(!g)return l();r?l(!1,r):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}1!==r||Dg(u,e.getBoundingClientRect())||l(),g=!1}try{r=new IntersectionObserver(m,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,h)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,h=null;l&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),u&&!a&&h.observe(u),t&&h.observe(t));let g=a?Ig(e):null;return a&&function t(){const r=Ig(e);g&&!Dg(g,r)&&n(),g=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,a&&cancelAnimationFrame(f)}}const Vg=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=_p(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=xp(o),y=Ip(s),b=xp(s)===s,w=await(null==a.isRTL?void 0:a.isRTL(u.floating)),S=f||(b||!g?[Np(s)]:function(e){const t=Np(e);return[Pp(e),t,Pp(t)]}(s)),_="none"!==h;!f&&_&&S.push(...function(e,t,n,r){const o=Cp(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Mp:Op:t?Op:Mp;case"left":case"right":return t?Tp:Ap;default:return[]}}(xp(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(Pp)))),i}(s,g,h,w));const x=[s,...S],C=await a.detectOverflow(t,m),E=[];let R=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&E.push(C[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Cp(e),o=kp(e),i=Rp(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Np(l)),[l,Np(l)]}(o,l,w);E.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:o,overflows:E}],!E.every((e=>e<=0))){var I,k;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=x[e];if(t&&("alignment"!==d||y===Ip(t)||R.every((e=>Ip(e.placement)!==y||e.overflows[0]>0))))return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(k=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var P;const e=null==(P=R.filter((e=>{if(_){const t=Ip(e.placement);return t===y||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},qg=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=_p(e,t),c={x:n,y:r},d=Ip(o),f=Ep(d);let p=c[f],h=c[d];const g=_p(s,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+m.mainAxis,n=i.reference[f]+i.reference[e]-m.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y;const e="y"===f?"width":"height",t=Sg.has(xp(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=l.offset)?void 0:v[d])||0)+(t?0:m.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=l.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},$g=(e,t,n)=>{const r=new Map,o={platform:zg,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=l.detectOverflow?l:{...l,detectOverflow:yg},a=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=vg(u,r,a),f=r,p=0;const h={};for(let n=0;n<i.length;n++){const g=i[n];if(!g)continue;const{name:m,fn:v}=g,{x:y,y:b,data:w,reset:S}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=y?y:c,d=null!=b?b:d,h[m]={...h[m],...w},S&&p<50&&(p++,"object"==typeof S&&(S.placement&&(f=S.placement),S.rects&&(u=!0===S.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):S.rects),({x:c,y:d}=vg(u,f,a))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var jg="undefined"!=typeof document?St:function(){};function Wg(e,t){if(e===t)return!0;
1if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Wg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Wg(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Bg(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hg(e,t){const n=Bg(e);return Math.round(t*n)/n}function Ug(e){const t=_t(e);return jg((()=>{t.current=e})),t}const Gg={open:od((e=>e.open)),transitionStatus:od((e=>e.transitionStatus)),domReferenceElement:od((e=>e.domReferenceElement)),referenceElement:od((e=>{var t;return null!==(t=e.positionReference)&&void 0!==t?t:e.referenceElement})),floatingElement:od((e=>e.floatingElement)),floatingId:od((e=>e.floatingId))};class Zg extends Pd{constructor(e){const{syncOnly:t,nested:n,onOpenChange:r,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Xh(),nested:n,triggerElements:o},Gg),te(this,"syncOpenEvent",((e,t)=>{(!e||!this.state.open||null!=t&&function(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)})),te(this,"dispatchOpenChange",((e,t)=>{this.syncOpenEvent(e,t.event);const n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)})),te(this,"setOpen",((e,t)=>{var n,r,o,i;this.syncOnly?null===(o=(i=this.context).onOpenChange)||void 0===o||o.call(i,e,t):(this.dispatchOpenChange(e,t),null===(n=(r=this.context).onOpenChange)||void 0===n||n.call(r,e,t))})),this.syncOnly=t}}function Kg(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:i,onOpenChange:l}=e,s=t.useState("open"),a=t.useState("activeTriggerElement"),u=t.useState(n?"popupElement":"positionerElement"),c=t.context.triggerElements,d=l,f=_t(null);void 0===r&&null===f.current&&(f.current=new Zg({open:s,transitionStatus:void 0,referenceElement:a,floatingElement:u,triggerElements:c,onOpenChange:d,floatingId:o,syncOnly:!0,nested:i}));const p=null!=r?r:f.current;return t.useSyncedValue("floatingId",o),Vc((()=>{const e={open:s,floatingId:o,referenceElement:a,floatingElement:u};Fd(a)&&(e.domReferenceElement=a),p.state.positionReference===p.state.referenceElement&&(e.positionReference=a),p.update(e)}),[s,o,a,u,p]),p.context.onOpenChange=d,p.context.nested=i,p}function Jg(e,t=!1,n=!1){const[r,o]=yt(e&&t?"idle":void 0),[i,l]=yt(e);return e&&!i&&(l(!0),o("starting")),e||!i||"ending"===r||n||o("ending"),e||i||"ending"!==r||o(void 0),Vc((()=>{if(!e&&i&&"ending"!==r&&n){const e=af.request((()=>{o("ending")}));return()=>{af.cancel(e)}}}),[e,i,r,n]),Vc((()=>{if(!e||t)return;const n=af.request((()=>{o(void 0)}));return()=>{af.cancel(n)}}),[t,e]),Vc((()=>{if(!e||!t)return;e&&i&&"idle"!==r&&o("starting");const n=af.request((()=>{o("idle")}));return()=>{af.cancel(n)}}),[t,e,i,r]),{mounted:i,setMounted:l,transitionStatus:r}}let Yg=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const Xg={[Yg.startingStyle]:""},Qg={[Yg.endingStyle]:""},em={transitionStatus:e=>"starting"===e?Xg:"ending"===e?Qg:null};function tm(e,t=!1,n=!0){const r=uf();return Uc(((o,i=null)=>{r.cancel();const l=sg(e);if(null==l)return;const s=l,a=()=>{Nn(o)};if("function"!=typeof s.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{if(t){const e=Yg.startingStyle;if(!s.hasAttribute(e))return void r.request(u);const t=new MutationObserver((()=>{s.hasAttribute(e)||(t.disconnect(),u())}));return t.observe(s,{attributes:!0,attributeFilter:[e]}),void(null==i||i.addEventListener("abort",(()=>t.disconnect()),{once:!0}))}r.request(u)}function u(){Promise.all(s.getAnimations().map((e=>e.finished))).then((()=>{null!=i&&i.aborted||a()})).catch((()=>
1{if(n)return void(null!=i&&i.aborted||a());const e=s.getAnimations();(null==i||!i.aborted)&&e.length>0&&e.some((e=>e.pending||"finished"!==e.playState))&&u()}))}}))}function nm(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Uc(o),l=tm(r,n,!1);wt((()=>{if(!t)return;const e=new AbortController;return l(i,e.signal),()=>{e.abort()}}),[t,n,i,l])}const rm={tabIndex:-1,[Tf]:""};function om(e,t,n,r=!1){var o;t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const i=null!==(o=null==n?void 0:n.id)&&void 0!==o?o:null;(i||t)&&(e.activeTriggerId=i,e.activeTriggerElement=null!=n?n:null)}function im(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");Vc((()=>{if(!r)return void(0!==e.state.triggerCount&&e.set("triggerCount",0));const t=e.context.triggerElements.size,o={};e.state.triggerCount!==t&&(o.triggerCount=t);const i=e.select("activeTriggerId");let l=null;if(i){const t=e.context.triggerElements.getById(i);t?t!==e.state.activeTriggerElement&&(o.activeTriggerElement=t):l=i}if(!l&&!i&&1===t){const t=e.context.triggerElements.entries().next();if(!t.done){const[e,n]=t.value;o.activeTriggerId=e,o.activeTriggerElement=n}}void 0===o.triggerCount&&void 0===o.activeTriggerId&&void 0===o.activeTriggerElement||e.update(o),l&&n&&queueMicrotask((()=>{if(e.select("open")&&e.select("activeTriggerId")===l&&!e.context.triggerElements.getById(l)){const t=dp(Kf);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}}))}),[r,e,o,n])}function lm(e,t,n){const{mounted:r,setMounted:o,transitionStatus:i}=Jg(e),l=t.useState("preventUnmountingOnClose"),s=!e&&l;t.useSyncedValues({mounted:r,transitionStatus:i,preventUnmountingOnClose:s});const a=Uc((()=>{var e,r;o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),null==n||n(),null===(e=(r=t.context).onOpenChangeComplete)||void 0===e||e.call(r,!1)}));return nm({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:i}}function sm(e,t){e.useSyncedValues(t),Vc((()=>()=>{e.update({activeTriggerProps:kd,inactiveTriggerProps:kd,popupProps:kd})}),[e])}class am{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){const n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){const t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(const t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function um(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Zg({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new am,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0}),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:kd,inactiveTriggerProps:kd,popupProps:kd}}const cm=od((e=>{var t;return null!==(t=e.triggerIdProp)&&void 0!==t?t:e.activeTriggerId})),dm=od((e=>{var t;return null!==(t=e.openProp)&&void 0!==t?t:e.open})),fm=od((e=>{var t,n;return(null!==(t=null===(n=e.popupElement)||void 0===n?void 0:n.id)&&void 0!==t?t:e.floatingId)||void 0}));function pm(e,t){return void 0!==t&&dm(e)&&cm(e)===t}const hm={open:dm,mounted:od((e=>e.mounted)),transitionStatus:od((e=>e.transitionStatus)),floatingRootContext:od((e=>e.floatingRootContext)),triggerCount:od((e=>e.triggerCount)),preventUnmountingOnClose:od((e=>e.preventUnmountingOnClose)),payload:od((e=>e.payload)),activeTriggerId:cm,activeTriggerElement:od((e=>e.mounted?e.activeTriggerElement:null)),popupId:fm,isTriggerActive:od(((e,t)=>void 0!==t&&cm(e)===t)),isOpenedByTrigger:od(((e,t)=>pm(e,t))),isMountedByTrigger:od(((e,t)=>void 0!==t&&cm(e)===t&&e.mounted)),triggerProps:od(((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps)),triggerPopupId:od(((e,t)=>function(e,t){return!!pm(e,t)||void 0!==t&&dm(e)&&null==cm(e)&&1===e.triggerCount}(e,t)?fm(e):void 0)),popupProps:od((e=>e.popupProps)),popupElement:od((e=>e.popupElement)),positionerElement:od((e=>e.positionerElement))};function gm(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=Ih(),i=null!=ng(),l=Wc((()=>{var e,l;return new Zg({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:null!==(e=r.reference)&&void 0!==e?e:null,floatingElement:null!==(l=r.floating)&&void 0!==l?l:null,triggerElements:new am,floatingId:o,syncOnly:!1,nested:i})})).current;return Vc((()=>{const e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=Fd(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),l.update(e)}),[t,o,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=i,l}const mm=_f&&Cf;class vm{constructor(){te(this,"dispose",(()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()}
1)),te(this,"disposeEffect",(()=>this.dispose)),this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new cf,this.restTimeout=new cf,this.handleCloseOptions=void 0}static create(){return new vm}}const ym=new WeakMap;function bm(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;var n,r,o;t&&ym.get(t)===e&&(null===(n=e.pointerEventsScopeElement)||void 0===n||n.style.removeProperty("pointer-events"),null===(r=e.pointerEventsReferenceElement)||void 0===r||r.style.removeProperty("pointer-events"),null===(o=e.pointerEventsFloatingElement)||void 0===o||o.style.removeProperty("pointer-events"),ym.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function wm(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t,i=ym.get(n);i&&i!==e&&bm(i),bm(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,ym.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function Sm(e){const t=e.context.dataRef.current,n=Wc((()=>{var e;return null!==(e=t.hoverInteractionState)&&void 0!==e?e:vm.create()})).current;return t.hoverInteractionState||(t.hoverInteractionState=n),of(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}const _m={current:null};function xm(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Cm(e,t){return xm(t,e===zf||e===Df,e===Nf||e===Ff)}function Em(e,t,n){return xm(t,e===Df,n?e===Nf:e===Ff)||"Enter"===e||" "===e||""===e}function Rm(e,t){const{listRef:n,activeIndex:r,onNavigate:o=()=>{},enabled:i=!0,selectedIndex:l=null,allowEscape:s=!1,loopFocus:a=!1,nested:u=!1,rtl:c=!1,virtual:d=!1,focusItemOnOpen:f="auto",focusItemOnHover:p=!0,openOnArrowKeyDown:h=!0,disabledIndices:g,orientation:m="vertical",parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:w,grid:S}=t,_=null!=S,x="rootStore"in e?e.rootStore:e,C=x.useState("open"),E=x.useState("floatingElement"),R=x.useState("domReferenceElement"),I=x.context.dataRef,k=Hf(E),P=Bf(R),O=Xc(k),M=ng(),T=rg(w),A=_t(f),N=_t(null!=l?l:-1),F=_t(null),z=_t(!0),D=Uc((e=>{o(-1===N.current?null:N.current,e)})),L=_t(!!E),V=_t(C),q=_t(!1),$=_t(!1),j=_t(null),W=Xc(g),B=Xc(C),H=Xc(l),U=Xc(b),G=uf(),Z=uf(),K=Uc((()=>{function e(e){d?null==T||T.events.emit("virtualfocus",e):j.current=hh(e,{sync:q.current,preventScroll:!0})}const t=n.current[N.current],r=$.current;t&&e(t),(q.current?e=>e():e=>G.request(e))((()=>{const o=n.current[N.current]||t;var i;o&&(t||e(o),!te||!r&&z.current||null===(i=o.scrollIntoView)||void 0===i||i.call(o,{block:"nearest",inline:"nearest"}))}))}));Vc((()=>{I.current.orientation=m}),[I,m]),Vc((()=>{i&&(C&&E?(N.current=null!=l?l:-1,A.current&&null!=l&&($.current=!0,D())):L.current&&(N.current=-1,D()))}),[i,C,E,l,D]),Vc((()=>{if(i)if(C){if(E)if(null==r){if(q.current=!1,null!=H.current)return;if(L.current&&(N.current=-1,K()),(!V.current||!L.current)&&A.current&&(null!=F.current||!0===A.current&&null==F.current)){let e=0;const t=()=>{null==n.current[0]?(e<2&&(e?e=>Z.request(e):queueMicrotask)(t),e+=1):(N.current=null==F.current||Em(F.current,m,c)||u?Vp(n):qp(n),F.current=null,D())};t()}}else Lp(n.current,r)||(N.current=r,K(),$.current=!1)}else q.current=!1}),[i,C,E,r,H,u,n,m,c,D,K,Z]),Vc((()=>{var e,t;if(!i||E||!T||d||!L.current)return;const n=T.nodesRef.current,r=null===(e=n.find((e=>e.id===M)))||void 0===e||null===(e=e.context)||void 0===e?void 0:e.elements.floating,o=Lf(tf(null!==(t=null!=R?R:r)&&void 0!==t?t:null)),l=n.some((e=>e.context&&Vf(e.context.elements.floating,o)));r&&!l&&z.current&&r.focus({preventScroll:!0})}),[i,E,R,T,M,d]),Vc((()=>{V.current=C,L.current=!!E})),Vc((()=>{C||(F.current=null,A.current=f)}),[C,f]);const J=null!=r,Y=Uc((e=>{if(!B.current)return;const t=n.current.indexOf(e.currentTarget);-1===t||N.current===t&&r===t||(N.current=t,D(e))})),X=Uc((()=>{var e;return null!=v?v:null==T||null===(e=T.nodesRef.current.find((e=>e.id===M)))||void 0===e||null===(e=e.context)||void 0===e||null===(e=e.dataRef)||void 0===e?void 0:e.current.orientation})),Q=Uc((()=>Vp(n,W.current))),ee=Uc((e=>{if(z.current=!1,q.current=!0,229===e.which)return;if(!B.current&&e.currentTarget===O.current)return;if(u&&function(e,t,n,r){return"both"===t||"horizontal"===t&&r?"Escape"===e:xm(t,n?e===Ff:e===Nf,e===zf)}(e.key,m,c,_))return Cm(e.key,X())||kf(e),x.setOpen(!1,dp(sp,e.nativeEvent)),void(zd(R)&&(d?null==T||T.events.emit("virtualfocus",R):R.focus()));const t=N.current,r=Vp(n,g),o=qp(n,g);
1if(P||("Home"===e.key&&(kf(e),N.current=r,D(e)),"End"===e.key&&(kf(e),N.current=o,D(e))),null!=S){const t=S(e,N.current,n,m,a,c,g,r,o);if(null!=t&&(N.current=t,D(e)),"both"===m)return}if(Cm(e.key,m)){if(kf(e),C&&!d&&Lf(e.currentTarget.ownerDocument)===e.currentTarget)return N.current=Em(e.key,m,c)?r:o,void D(e);Em(e.key,m,c)?a?t>=o?s&&t!==n.current.length?N.current=-1:(q.current=!1,N.current=r):N.current=$p(n.current,{startingIndex:t,disabledIndices:g}):N.current=Math.min(o,$p(n.current,{startingIndex:t,disabledIndices:g})):a?t<=r?s&&-1!==t?N.current=n.current.length:(q.current=!1,N.current=o):N.current=$p(n.current,{startingIndex:t,decrement:!0,disabledIndices:g}):N.current=Math.max(r,$p(n.current,{startingIndex:t,decrement:!0,disabledIndices:g})),Lp(n.current,N.current)&&(N.current=-1),D(e)}})),te=Ct((()=>({onFocus(e){q.current=!0,Y(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){q.current=!0,$.current=!1,p&&Y(e)},onPointerLeave(e){var t;if(!B.current||!z.current||"touch"===e.pointerType)return;q.current=!0;const r=e.relatedTarget;if(p&&!n.current.includes(r)&&U.current&&(null===(t=j.current)||void 0===t||t.call(j),j.current=null,N.current=-1,D(e),!d)){const e=O.current,t=Lf(tf(e));e&&Vf(e,t)&&e.focus({preventScroll:!0})}}})),[Y,B,O,p,n,D,U,d]),ne=Ct((()=>d&&C&&J&&{"aria-activedescendant":`${y}-${r}`}),[d,C,J,y,r]),re=Ct((()=>({"aria-orientation":"both"===m?void 0:m,...P?{}:ne,onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&C&&!d){const t=qf(e.nativeEvent);if(t&&!Vf(O.current,t))return;return kf(e),x.setOpen(!1,dp(ip,e.nativeEvent)),void(zd(R)&&R.focus())}ee(e)},onPointerMove(){z.current=!0}})),[ne,ee,O,m,P,x,C,d,R]),oe=Ct((()=>{function e(e){x.setOpen(!0,dp(sp,e.nativeEvent,e.currentTarget))}function t(e){"auto"===f&&Pf(e.nativeEvent)&&(A.current=!d)}function n(e){A.current=f,"auto"===f&&Of(e.nativeEvent)&&(A.current=!0)}return{onKeyDown(t){const n=x.select("open");z.current=!1;const r=t.key.startsWith("Arrow"),o=function(e,t,n){return xm(t,n?e===Nf:e===Ff,e===Df)}(t.key,X(),c),i=Cm(t.key,m),l=(u?o:i)||"Enter"===t.key||""===t.key.trim();if(d&&n)return ee(t);if(n||h||!r){if(l){const e=Cm(t.key,X());F.current=u&&e?null:t.key}u?o&&(kf(t),n?(N.current=Q(),D(t)):e(t)):i&&(null!=H.current&&(N.current=H.current),kf(t),!n&&h?e(t):ee(t),n&&D(t))}},onFocus(e){x.select("open")&&!d&&(N.current=-1,D(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}}),[ee,f,Q,u,D,x,h,m,X,c,H,d]),ie=Ct((()=>({...ne,...oe})),[ne,oe]);return Ct((()=>i?{reference:ie,floating:re,item:te,trigger:oe}:{}),[i,ie,re,oe,te])}function Im(e,t){var n;const{listRef:r,elementsRef:o,activeIndex:i,onMatch:l,disabledIndices:s,onTyping:a,enabled:u=!0,resetMs:c=750,selectedIndex:d=null}=t,f="rootStore"in e?e.rootStore:e,p=f.useState("open"),h=df(),g=_t(""),m=_t(null!==(n=null!=d?d:i)&&void 0!==n?n:-1),v=_t(null),y=Uc((e=>{var t;function n(e){return!(!function(e){const t=null==o?void 0:o.current[e];return!t||Wp(t)}(e)||null!=s&&jp(Id,e,s))}function u(e,t,r=0){if(0===e.length)return-1;const o=(r%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){const r=(o+t)%e.length,l=e[r];if(null!=l&&l.toLowerCase().startsWith(i)&&n(r))return r}return-1}const f=r.current;if(g.current.length>0&&" "===e.key&&(kf(e),null==a||a(!0)),g.current.length>0&&" "!==g.current[0]&&-1===u(f,g.current)&&" "!==e.key&&(null==a||a(!1)),null==f||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;p&&" "!==e.key&&(kf(e),null==a||a(!0));const y=""===g.current;var b;y&&(m.current=null!==(b=null!=d?d:i)&&void 0!==b?b:-1);const w=f.every(((e,t)=>{var r,o;return!e||!n(t)||(null===(r=e[0])||void 0===r?void 0:r.toLowerCase())!==(null===(o=e[1])||void 0===o?void 0:o.toLowerCase())}));w&&g.current===e.key&&(g.current="",m.current=v.current),g.current+=e.key,h.start(c,(()=>{g.current="",m.current=v.current,null==a||a(!1)}));const S=y?null!==(t=null!=d?d:i)&&void 0!==t?t:-1:m.current,_=(null!=S?S:0)+1,x=u(f,g.current,_);-1!==x?(null==l||l(x),v.current=x):" "!==e.key&&(g.current="",null==a||a(!1))})),b=Uc((e=>{const t=e.relatedTarget,n=f.select("domReferenceElement"),r=f.select("floatingElement");
1Vf(n,t)||Vf(r,t)||(h.clear(),g.current="",m.current=v.current,null==a||a(!1))}));Vc((()=>{(p||null===d)&&(h.clear(),v.current=null,""!==g.current&&(g.current=""))}),[p,d,h]),Vc((()=>{var e;p&&""===g.current&&(m.current=null!==(e=null!=d?d:i)&&void 0!==e?e:-1)}),[p,d,i]);const w=Ct((()=>({onKeyDown:y,onBlur:b})),[y,b]);return Ct((()=>u?{reference:w,floating:w}:{}),[u,w])}const km=.1*.1,Pm=.5;function Om(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function Mm(e,t,n,r,o,i,l,s,a,u){let c=!1;return Om(e,t,n,r,o,i)&&(c=!c),Om(e,t,o,i,l,s)&&(c=!c),Om(e,t,l,s,a,u)&&(c=!c),Om(e,t,a,u,n,r)&&(c=!c),c}function Tm(e,t,n,r,o,i){const l=Math.min(n,o),s=Math.max(n,o),a=Math.min(r,i),u=Math.max(r,i);return e>=l&&e<=s&&t>=a&&t<=u}function Am(e={}){const{blockPointerEvents:t=!1}=e,n=new cf,r=({x:e,y:t,placement:r,elements:o,onClose:i,nodeId:l,tree:s})=>{const a=null==r?void 0:r.split("-")[0];let u=!1,c=null,d=null,f="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const p=o.domReference,h=o.floating;if(!p||!h||null==a||null==e||null==t)return;const{clientX:g,clientY:m}=r,v=qf(r),y="mouseleave"===r.type,b=Vf(h,v),w=Vf(p,v);if(b&&(u=!0,!y))return;if(w&&(u=!1,!y))return void(u=!0);if(y&&Fd(r.relatedTarget)&&Vf(h,r.relatedTarget))return;function S(){return Boolean(s&&ch(s.nodesRef.current,l).length>0)}function _(){S()||(n.clear(),i())}if(S())return;const x=p.getBoundingClientRect(),C=h.getBoundingClientRect(),E=e>C.right-C.width/2,R=t>C.bottom-C.height/2,I=C.width>x.width,k=C.height>x.height,P=(I?x:C).left,O=(I?x:C).right,M=(k?x:C).top,T=(k?x:C).bottom;if("top"===a&&t>=x.bottom-1||"bottom"===a&&t<=x.top+1||"left"===a&&e>=x.right-1||"right"===a&&e<=x.left+1)return void _();let A=!1;switch(a){case"top":A=Tm(g,m,P,x.top+1,O,C.bottom-1);break;case"bottom":A=Tm(g,m,P,C.top+1,O,x.bottom-1);break;case"left":A=Tm(g,m,C.right-1,T,x.left+1,M);break;case"right":A=Tm(g,m,x.right-1,T,C.left+1,M)}if(A)return;if(u&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(g,m,x))return void _();if(!y&&function(e,t){const n=performance.now(),r=n-f;if(null===c||null===d||0===r)return c=e,d=t,f=n,!1;const o=e-c,i=t-d;return c=e,d=t,f=n,o*o+i*i<r*r*km}(g,m))return void _();let N=!1;switch(a){case"top":{const n=I?.25:2,r=I||E?e+n:e-n,o=I?e-n:E?e+n:e-n,i=t+Pm+1,l=E||I?C.bottom-Pm:C.top,s=E?I?C.bottom-Pm:C.top:C.bottom-Pm;N=Mm(g,m,r,i,o,i,C.left,l,C.right,s);break}case"bottom":{const n=I?.25:2,r=I||E?e+n:e-n,o=I?e-n:E?e+n:e-n,i=t-Pm,l=E||I?C.top+Pm:C.bottom,s=E?I?C.top+Pm:C.bottom:C.top+Pm;N=Mm(g,m,r,i,o,i,C.left,l,C.right,s);break}case"left":{const n=k?.25:2,r=k||R?t+n:t-n,o=k?t-n:R?t+n:t-n,i=e+Pm+1,l=R||k?C.right-Pm:C.left,s=R?k?C.right-Pm:C.left:C.right-Pm;N=Mm(g,m,l,C.top,s,C.bottom,i,r,i,o);break}case"right":{const n=k?.25:2,r=k||R?t+n:t-n,o=k?t-n:R?t+n:t-n,i=e-Pm,l=R||k?C.left+Pm:C.right,s=R?k?C.left+Pm:C.right:C.left+Pm;N=Mm(g,m,i,r,i,o,l,C.top,s,C.bottom);break}}N?u||n.start(40,_):_()}};return r.__options={...e,blockPointerEvents:t},r}function Nm(e,t,n,r,o,i,l,s,a,u=2){const c=function(e,{event:t,orientation:n,loopFocus:r,onLoop:o,rtl:i,cols:l,disabledIndices:s,minIndex:a,maxIndex:u,prevIndex:c,stopEvent:d=!1}){let f,p=c;if(t.key===zf?f="up":t.key===Df&&(f="down"),f){var h;const n=[],i=[];let g=!1,m=0;{let t=null,r=-1;e.forEach(((e,o)=>{if(null==e)return;m+=1;const l=e.closest('[role="row"]');l&&(g=!0),l===t&&-1!==r||(t=l,r+=1,n[r]=[]),n[r].push(o),i[o]=r}))}let v=!1,y=0;if(g)for(const e of n){const t=e.length;t>y&&(y=t),t!==l&&(v=!0)}const b=v&&m<e.length,w=y||l,S=l=>{if(!v||-1===c)return;const a=i[c];if(null==a)return;const u=n[a].indexOf(c),d="up"===l?-1:1;for(let l=a+d,h=0;h<n.length;h+=1,l+=d){if(l<0||l>=n.length){if(!r||b)return;if(l=l<0?n.length-1:0,o){var f,p;const e=Math.min(u,n[l].length-1),r=null!==(f=n[l][e])&&void 0!==f?f:n[l][0],s=o(t,c,r);l=null!==(p=i[s])&&void 0!==p?p:l}}const a=n[l];for(let t=Math.min(u,a.length-1);t>=0;t-=1){const n=a[t];if(!jp(e,n,s))return n}}},_=t=>{if(!b||-1===c)return;const n=c%w,o="up"===t?-w:w,i=u-u%w,l=yp(u/w)+1;for(let t=c-n+o,a=0;a<l;a+=1,t+=o){if(t<0||t>u){if(!r)return;t=t<0?i:0}const o=Math.min(t+w-1,u);for(let r=Math.min(t+n,o);r>=t;r-=1)if(!jp(e,r,s))return r}};d&&kf(t);const x=null!==(h=S(f))&&void 0!==h?h:_(f);if(void 0!==x)p=x;else if(-1===c)p="up"===f?u:a;else if(p=$p(e,{startingIndex:c,amount:w,decrement:"up"===f,disabledIndices:s}),r){if("up"===f&&(c-w<a||p<0)){const e=c%w,n=u%w,r=u-(n-e);p=n===e?u:n>e?r:r-w,o&&(p=o(t,c,p))}"down"===f&&c+w>u&&(p=$p(e,{startingIndex:c%w-w,amount:w,disabledIndices:s}),o&&(p=o(t,c,p)))}Lp(e,p)&&(p=c)}if("both"===n){const n=yp(c/l);t.key===(i?Nf:Ff)&&(d&&kf(t),c%l!=l-1?(p=$p(e,{startingIndex:c,disabledIndices:s}),r&&Dp(p,l,n)&&(p=$p(e,{startingIndex:c-c%l-1,disabledIndices:s}),o&&(p=o(t,c,p)))):r&&(p=$p(e,{startingIndex:c-c%l-1,disabledIndices:s}),o&&(p=o(t,c,p))),Dp(p,l,n)&&(p=c)),t.key===(i?Ff:Nf)&&(d&&kf(t),c%l!=0?(p=$p(e,{startingIndex:c,decrement:!0,disabledIndices:s}),r&&Dp(p,l,n)&&(p=$p(e,{startingIndex:c+(l-c%l),decrement:!0,disabledIndices:s}),o&&(p=o(t,c,p)))):r&&(p=$p(e,{startingIndex:c+(l-c%l),decrement:!0,disabledIndices:s}),o&&(p=o(t,c,p))),Dp(p,l,n)&&(p=c));const a=yp(u/l)===n;Lp(e,p)&&(r&&a?(p=t.key===(i?Ff:Nf)?u:$p(e,{startingIndex:c-c%l-1,disabledIndices:s}),o&&(p=o(t,c,p))):p=c)}return p}(n.current,{event:e,orientation:r,loopFocus:o,rtl:i,cols:u,disabledIndices:l,minIndex:s,maxIndex:a,prevIndex:t>a?s:t,stopEvent:!0});return Lp(n.current,c)?void 0:c}const Fm=rt(void 0),zm=rt(void 0),Dm=rt(void 0),Lm=rt(!1),Vm=rt("");function qm(){const e=Rt(Fm);if(!e)throw new Error(rd(22));return e}function $m(){const e=Rt(zm);if(!e)throw new Error(rd(23));return e}function jm(){const e=Rt(Dm);if(!e)throw new Error(rd(24));return e}function Wm(){return Rt(Vm)}const Bm=(e,t)=>Object.is(e,t);function Hm(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function Um(e,t,n){return!(!e||0===e.length)&&e.some((e=>void 0!==e&&Hm(t,e,n)))}function Gm(e,t,n){return e&&0!==e.length?e.findIndex((e=>void 0!==e&&Hm(e,t,n))):-1}function Zm(e,t,n){return e.filter((e=>!Hm(t,e,n)))}function Km(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Jm(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function Ym(e){if(!Array.isArray(e))return null!=e&&"null"in e;
1const t=e;if(Jm(t)){for(const e of t)for(const t of e.items)if(t&&null==t.value&&null!=t.label)return!0;return!1}for(const e of t)if(e&&null==e.value&&null!=e.label)return!0;return!1}function Xm(e,t){var n;if(t&&null!=e)return null!==(n=t(e))&&void 0!==n?n:"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return Km(e)}function Qm(e,t){var n;return t&&null!=e?null!==(n=t(e))&&void 0!==n?n:"":Km(e&&"object"==typeof e&&"value"in e&&"label"in e?e.value:e)}function ev(e,t,n){function r(){return Xm(e,n)}if(n&&null!=e)return n(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;var o;if(t&&!Array.isArray(t))return null!==(o=t[e])&&void 0!==o?o:r();if(Array.isArray(t)){const n=t,o=Jm(n)?n.flatMap((e=>e.items)):n;if(null==e||"object"!=typeof e){const t=o.find((t=>t.value===e));return t&&null!=t.label?t.label:r()}if("value"in e){const t=o.find((t=>t&&t.value===e.value));if(t&&null!=t.label)return t.label}}return r()}const tv={id:od((e=>e.id)),labelId:od((e=>e.labelId)),items:od((e=>e.items)),selectedValue:od((e=>e.selectedValue)),hasSelectionChips:od((e=>{const t=e.selectedValue;return Array.isArray(t)&&t.length>0})),hasSelectedValue:od((e=>{const{selectedValue:t,selectionMode:n}=e;return null!=t&&("multiple"!==n||!Array.isArray(t)||t.length>0)})),hasNullItemLabel:od(((e,t)=>!!t&&Ym(e.items))),open:od((e=>e.open)),mounted:od((e=>e.mounted)),forceMounted:od((e=>e.forceMounted)),inline:od((e=>e.inline)),activeIndex:od((e=>e.activeIndex)),selectedIndex:od((e=>e.selectedIndex)),isActive:od(((e,t)=>e.activeIndex===t)),isSelected:od(((e,t)=>{const n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some((e=>Hm(t,e,n))):Hm(t,r,n)})),transitionStatus:od((e=>e.transitionStatus)),popupProps:od((e=>e.popupProps)),inputProps:od((e=>e.inputProps)),triggerProps:od((e=>e.triggerProps)),itemProps:od((e=>e.itemProps)),positionerElement:od((e=>e.positionerElement)),listElement:od((e=>e.listElement)),popupId:od((e=>e.popupId)),triggerElement:od((e=>e.triggerElement)),inputElement:od((e=>e.inputElement)),inputGroupElement:od((e=>e.inputGroupElement)),popupSide:od((e=>e.popupSide)),openMethod:od((e=>e.openMethod)),inputInsidePopup:od((e=>e.inputInsidePopup)),inputOwnsFormValue:od((e=>e.inputOwnsFormValue)),selectionMode:od((e=>e.selectionMode)),name:od((e=>e.name)),form:od((e=>e.form)),disabled:od((e=>e.disabled)),readOnly:od((e=>e.readOnly)),required:od((e=>e.required)),grid:od((e=>e.grid)),virtualized:od((e=>e.virtualized)),itemToStringLabel:od((e=>e.itemToStringLabel)),isItemEqualToValue:od((e=>e.isItemEqualToValue)),modal:od((e=>e.modal)),autoHighlight:od((e=>e.autoHighlight)),submitOnItemClick:od((e=>e.submitOnItemClick))};let nv=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const rv={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},ov={disabled:!1,...rv},iv={valid:e=>null===e?null:e?{[nv.valid]:""}:{[nv.invalid]:""}},lv={invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:Rd,disabled:void 0,touched:rv.touched,setTouched:Rd,dirty:rv.dirty,setDirty:Rd,filled:rv.filled,setFilled:Rd,focused:rv.focused,setFocused:Rd,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:ov,markedDirtyRef:{current:!1},registerFieldControl:Rd,validation:{getValidationProps:(e,t=kd)=>t,inputRef:{current:null},registerInput:Rd,commit:async()=>{},change:Rd}},sv=rt(lv);function av(e=!0){const t=Rt(sv);if(t.setValidityData===Rd&&!e)throw new Error(rd(28));return t}function uv(e,t,n,r,o=!0,i){const{registerFieldControl:l}=av(),s=_t(null);s.current||(s.current=Symbol()),Vc((()=>{const a=s.current;if(a&&o)return l(a,{controlRef:e,getValue:r,id:t,name:i,value:n}),()=>{l(a,void 0)}}),[e,o,r,t,i,l,n])}const cv=rt({formRef:{current:{fields:new Map}},errors:{},clearErrors:Rd,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function dv(){return Rt(cv)}function fv(e){return Ih(e,"base-ui")}const pv=rt({controlId:void 0,registerControlId:Rd,labelId:void 0,setLabelId:Rd,messageIds:[],setMessageIds:Rd,getDescriptionProps:e=>e});function hv(){return Rt(pv)}
1function gv(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=hv(),l=fv(t),s=n?o:void 0,a=Wc((()=>Symbol("labelable-control"))),u=_t(!1),c=_t(null!=t),d=Uc((()=>{u.current&&i!==Rd&&(u.current=!1,i(a.current,void 0))}));return Vc((()=>{if(i===Rd)return;let e;if(n){const n=null==r?void 0:r.current;e=Fd(n)&&null!=n.closest("label")?null!=t?t:null:null!=s?s:l}else if(null!=t)c.current=!0,e=t;else{if(!c.current)return void d();e=l}void 0!==e?(u.current=!0,i(a.current,e)):d()}),[t,r,s,i,n,l,a,d]),wt((()=>d),[d]),null!=o?o:l}function mv(e){return null==e?void 0:`${e}-popup`}function vv(e){return Array.isArray(e)?e.map((e=>vv(e))).join(","):null==e?"":String(e)}const yv=new Map,bv=function(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${vv(e.locale)}|${JSON.stringify(t)}`,r=yv.get(n);if(r)return r;const o=new Intl.Collator(e.locale,t),i={contains(e,t,n){if(!t)return!0;const r=Xm(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===o.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;const r=Xm(e,n);return 0===o.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;const r=Xm(e,n),i=t.length;return r.length>=i&&0===o.compare(r.slice(r.length-i),t)}};return yv.set(n,i),i};function wv(e,t){const n=_t(e),r=Uc(t);Vc((()=>{n.current!==e&&r(n.current)}),[e,r]),Vc((()=>{n.current=e}),[e])}function Sv(e){const[t,n]=yt(null),r=function(e,t){const n=Uc(((n,r)=>{("function"==typeof e?e():e)||t(r||(bf?"touch":""))})),{onClick:r,onPointerDown:o}=function(e){const t=_t(""),n=Et((n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))}),[e]);return{onClick:Et((n=>{0!==n.detail?(e(n,"pointerType"in n?n.pointerType:t.current),t.current=""):e(n,"keyboard")}),[e]),onPointerDown:n}}(n);return Ct((()=>({onClick:r,onPointerDown:o})),[r,o])}(e,n);return wv(e,(t=>{t&&!e&&n(null)})),Ct((()=>({openMethod:t,triggerProps:r})),[t,r])}function _v(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}const xv=Symbol("none"),Cv={value:xv,index:-1},Ev=rt(void 0);function Rv(){var e;const t=Rt(Ev);return null!==(e=null==t?void 0:t.direction)&&void 0!==e?e:"ltr"}function Iv(e){const{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:i,defaultInputValue:l,inputValue:s,open:a,defaultOpen:u=!1,selectionMode:c="none",onItemHighlighted:d,name:f,form:p,disabled:h=!1,readOnly:g=!1,required:m=!1,inputRef:v,grid:y=!1,items:b,filteredItems:w,filter:S,openOnInputClick:_=!0,autoHighlight:x=!1,keepHighlight:C=!1,highlightItemOnHover:E=!0,loopFocus:R=!0,itemToStringLabel:I,itemToStringValue:k,isItemEqualToValue:P=Bm,virtualized:O=!1,inline:M=!1,fillInputOnItemPress:T=!0,modal:A=!1,limit:N=-1,autoComplete:F="list",formAutoComplete:z,locale:D,submitOnItemClick:L=!1}=e,{clearErrors:V}=dv(),{setDirty:q,validityData:$,setFilled:j,name:W,disabled:B,setTouched:H,setFocused:U,validationMode:G,validation:Z}=av(),K=Rv(),J=gv({id:t}),Y=bv({locale:D}),[X,Q]=yt(!1),[ee,te]=yt(null),ne=_t([]),re=_t([]),oe=_t(null),ie=_t(null),le=_t(null),se=_t(null),ae=_t(null),ue=_t(!0),ce=_t(!1),de=_t(null),fe=_t(null),pe=_t(null),he=_t(Cv),ge=_t(null),me=_t([]),ve=_t([]),ye=B||h,be=null!=W?W:f,we="multiple"===c,Se="single"===c,_e=void 0!==s||void 0!==l,xe=void 0!==b,Ce=void 0!==w;let Ee;Ee="always"===x?"always":!!x&&"input-change";const[Re,Ie]=Lc({controlled:o,default:we?null!=r?r:Id:r,name:"Combobox",state:"selectedValue"}),ke=Ct((()=>null===S?()=>!0:void 0!==S?S:Se&&!X?function(e,t,n){return(r,o)=>{if(null==r)return!1;if(!o)return!0;const i=Xm(r,t),l=null!=n?Xm(n,t):"";return!(!l||!e.contains(l,o)||l.length!==o.length)||e.contains(i,o)}}(Y,I,Re):function(e,t){return(n,r)=>{if(null==n)return!1;const o=Xm(n,t);return e.contains(o,r)}}(Y,I)),[S,Se,Re,X,Y,I]),Pe=Wc((()=>_e?null!=l?l:"":Se?Xm(Re,I):"")).current,[Oe,Me]=Lc({controlled:s,default:Pe,name:"Combobox",state:"inputValue"}),[Te,Ne]=Lc({controlled:a,default:u,name:"Combobox",state:"open"}),Fe=Jm(b),ze=null!=ee?ee:""===Oe?"":String(Oe).trim(),De=Se?Xm(Re,I):"",Le=Se&&!X&&""!==ze&&""!==De&&De.length===ze.length&&Y.contains(De,ze),Ve=Le?"":ze,qe=xe&&Ce&&Le,$e=Ct((()=>b?Fe?b.flatMap((e=>e.items)):b:Id),[b,Fe]),je=Ct((()=>
1{if(w&&!qe)return w;if(!b)return Id;if(Fe){const e=b,t=[];let n=0;for(const r of e){if(N>-1&&n>=N)break;const e=""===Ve?r.items:r.items.filter((e=>ke(e,Ve,I)));if(0===e.length)continue;const o=N>-1?N-n:1/0,i=e.slice(0,o);if(i.length>0){const e={...r,items:i};t.push(e),n+=i.length}}return t}if(""===Ve)return N>-1?$e.slice(0,N):$e;const e=[];for(const t of $e){if(N>-1&&e.length>=N)break;ke(t,Ve,I)&&e.push(t)}return e}),[w,qe,b,Fe,Ve,N,ke,I,$e]),We=Ct((()=>Fe?je.flatMap((e=>e.items)):je),[je,Fe]),Be=Wc((()=>new Ed({id:J,labelId:void 0,selectedValue:Re,open:Te,filter:ke,query:ze,items:b,selectionMode:c,listRef:ne,labelsRef:re,popupRef:oe,emptyRef:ae,inputRef:ie,startDismissRef:le,endDismissRef:se,keyboardActiveRef:ue,chipsContainerRef:de,clearRef:fe,valuesRef:me,allValuesRef:ve,selectionEventRef:pe,name:be,form:p,disabled:ye,readOnly:g,required:m,grid:y,isGrouped:Fe,virtualized:O,openOnInputClick:_,itemToStringLabel:I,isItemEqualToValue:P,modal:A,autoHighlight:Ee,submitOnItemClick:L,hasInputValue:_e,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:M,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:kd,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:"none"===c,onOpenChangeComplete:n||Rd,setOpen:Rd,setInputValue:Rd,setSelectedValue:Rd,setIndices:Rd,onItemHighlighted:Rd,handleSelection:Rd,forceMount:Rd,requestSubmit:Rd}))).current,He="none"===c?Oe:Re,Ue=Ct((()=>"none"===c?He:Array.isArray(Re)?Re.map((e=>Qm(e,k))):Qm(Re,k)),[He,k,c,Re]),Ge=Uc(d),Ze=Uc(n),Ke=xd(Be,tv.activeIndex),Je=xd(Be,tv.selectedIndex),Ye=xd(Be,tv.positionerElement),Xe=xd(Be,tv.listElement),Qe=xd(Be,tv.triggerElement),et=xd(Be,tv.inputElement),tt=xd(Be,tv.inputGroupElement),nt=xd(Be,tv.inline),rt=xd(Be,tv.inputInsidePopup),ot=xd(Be,tv.inputOwnsFormValue),it=Xc(Qe),{mounted:lt,setMounted:st,transitionStatus:at}=Jg(Te),{openMethod:ut,triggerProps:ct}=Sv(Te),dt=Uc((()=>Ue));uv(rt?it:ie,J,He,dt,!ye,f);const ft=Uc((()=>{b?re.current=We.map((e=>Xm(e,I))):Be.set("forceMounted",!0)})),pt=_t(Re);Vc((()=>{Re!==pt.current&&ft()}),[ft,Re]);const ht=Uc((e=>{Be.update(e);const t=e.type||"none";if(void 0!==e.activeIndex)if(null===e.activeIndex)he.current!==Cv&&(he.current=Cv,Ge(void 0,fp(t,void 0,{index:-1})));else{const n=me.current[e.activeIndex];he.current={value:n,index:e.activeIndex},Ge(n,fp(t,void 0,{index:e.activeIndex}))}})),gt=Uc(((t,n)=>{var r;if(ce.current=n.reason===op,null===(r=e.onInputValueChange)||void 0===r||r.call(e,t,n),!n.isCanceled){if(n.reason===rp){const e=n.event,r=e.inputType;if("compositionend"===e.type||null!=r&&""!==r&&"insertReplacementText"!==r){const e=""!==t.trim();e&&Q(!0),ge.current={hasQuery:e},e&&Ee&&null==Be.state.activeIndex&&Be.set("activeIndex",0)}}Me(t)}})),mt=Uc(((t,n)=>{var r;if(Te!==t&&("escape-key"===n.reason&&xe&&0===We.length&&!Be.state.emptyRef.current&&n.allowPropagation(),null===(r=e.onOpenChange)||void 0===r||r.call(e,t,n),!n.isCanceled&&(t&&we&&rt&&!nt&&null!==ee&&(Q(!1),te(null),""!==Oe&&gt("",dp(op,n.event))),!t&&X&&(Se?(nt||te(ze),""===ze&&Q(!1)):we&&(nt||te(ze),rt&&ht({activeIndex:null}),rt&&!nt||gt("",dp(op,n.event)))),Ne(t),!t&&rt&&(n.reason===ip||n.reason===Qf)&&(H(!0),U(!1),"onBlur"===G)))){const e="none"===c?Oe:Re;Z.commit(e)}})),vt=Uc(((e,t)=>{null==i||i(e,t),t.isCanceled||(Ie(e),("none"===c&&oe.current&&T||Se&&!Be.state.inputInsidePopup)&&gt(Xm(e,I),dp(t.reason,t.event)),Se&&null!=e&&t.reason!==rp&&X&&!nt&&te(ze))})),bt=Uc(((e,t)=>{var n,r;let o=t;if(void 0===o){if(null===Ke)return;o=me.current[Ke]}const i=qf(e),l=null!==(n=pe.current)&&void 0!==n?n:e;pe.current=null;const s=dp(ep,l),a=null==i||null===(r=i.closest("a"))||void 0===r?void 0:r.getAttribute("href");if(a)a.startsWith("#")&&mt(!1,s);else if(we){const e=Array.isArray(Re)?Re:[],t=Um(e,o,Be.state.isItemEqualToValue)?Zm(e,o,Be.state.isItemEqualToValue):[...e,o];if(vt(t,s),s.isCanceled)return;if(!ie.current||""===ie.current.value.trim())return;Be.state.inputInsidePopup?gt("",dp(op,s.event)):mt(!1,s)}else{if(vt(o,s),s.isCanceled)return;mt(!1,s)}})),St=Uc((()=>{var e,t,n;if(!Be.state.submitOnItemClick)return;const r=null!==(e=null===(t=Z.inputRef.current)||void 0===t?void 0:t.form)&&void 0!==e?e:null===(n=Be.state.inputElement)||void 0===n?void 0:n.form;r&&"function"==typeof r.requestSubmit&&r.requestSubmit()})),Et=Uc((()=>
1{if(st(!1),null==Ze||Ze(!1),Q(!1),te(null),ht("none"===c?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),we&&ie.current&&""!==ie.current.value&&!ce.current&&gt("",dp(op)),Se)if(Be.state.inputInsidePopup)ie.current&&""!==ie.current.value&&gt("",dp(op));else{const e=Xm(Re,I);ie.current&&ie.current.value!==e&&gt(e,dp(""===e?op:Kf))}})),Rt=Ct((()=>nt&&Ye?{current:Ye.closest('[role="dialog"]')}:oe),[nt,Ye]);nm({enabled:!e.actionsRef,open:Te,ref:Rt,onComplete(){Te||Et()}}),xt(e.actionsRef,(()=>({unmount:Et})),[Et]),Vc((function(){if(Te||"none"===c)return;const e=b?$e:ve.current;if(we){const t=Array.isArray(Re)?Re:[],n=Gm(e,t[t.length-1],P);ht({selectedIndex:-1===n?null:n})}else{const t=Gm(e,Re,P);ht({selectedIndex:-1===t?null:t})}}),[Te,Re,b,c,$e,we,P,ht]),Vc((()=>{b&&(me.current=We,ne.current.length=We.length)}),[b,We]),Vc((()=>{const e=ge.current;if(e&&(e.hasQuery?Ee&&Be.set("activeIndex",0):"always"===Ee&&Be.set("activeIndex",0),ge.current=null),!Te&&!nt)return;const t=xe||Ce?We:me.current,n=Be.state.activeIndex;if(null==n)return"always"===Ee&&t.length>0?void Be.set("activeIndex",0):void(he.current!==Cv&&(he.current=Cv,Be.state.onItemHighlighted(void 0,fp(Kf,void 0,{index:-1}))));if(n>=t.length)return he.current!==Cv&&(he.current=Cv,Be.state.onItemHighlighted(void 0,fp(Kf,void 0,{index:-1}))),void Be.set("activeIndex",null);const r=t[n],o=he.current.value,i=o!==xv&&Hm(r,o,Be.state.isItemEqualToValue);he.current.index===n&&i||(he.current={value:r,index:n},Be.state.onItemHighlighted(r,fp(Kf,void 0,{index:n})))}),[Ke,Ee,Ce,xe,We,nt,Te,Be]),Vc((()=>{j("none"!==c?we?Array.isArray(Re)&&Re.length>0:null!=Re:""!==String(Oe))}),[j,c,Oe,Re,we]),wt((()=>{xe&&Ee&&0===We.length&&ht({activeIndex:null})}),[xe,Ee,We.length,ht]),wv(ze,(()=>{Te&&""!==ze&&ze!==String(Pe)&&Q(!0)})),wv(Re,(()=>{if("none"!==c&&(V(be),q(function(e){const t=$.initialValue;return Array.isArray(e)&&Array.isArray(t)?!_v(e,t,((e,t)=>Hm(e,t,P))):e!==t}(Re)),Z.change(Re),Se&&!_e&&!rt)){const e=Xm(Re,I);Oe!==e&&gt(e,dp(Kf))}})),wv(Oe,(()=>{"none"===c&&(V(be),q(Oe!==$.initialValue),Z.change(Oe))})),wv(b,(()=>{if(!Se||_e||rt||X)return;const e=Xm(Re,I);Oe!==e&&gt(e,dp(Kf))}));const It=gm({open:!!nt||Te,onOpenChange:mt,elements:{reference:rt?Qe:et,floating:Ye}});let kt,Pt;nt||(kt=y?"grid":"listbox",Pt=Te?"true":"false");const Ot=Ct((()=>{const e="INPUT"===(null==et?void 0:et.tagName),t=null==et||e,n=t?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return(t||Te)&&(n.role="combobox",n["aria-expanded"]=Pt,n["aria-haspopup"]=kt,n["aria-controls"]=Te?null==Xe?void 0:Xe.id:void 0,n["aria-autocomplete"]=F),{reference:n,floating:{role:"presentation"}}}),[et,Te,Pt,kt,null==Xe?void 0:Xe.id,F]),Mt=hg(It,{enabled:!g&&!ye&&_,event:"mousedown-only",toggle:!1,touchOpenDelay:rt?0:100,reason:"input-press"}),Tt=mg(It,{enabled:!g&&!ye&&!nt,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!nt||void 0,outsidePress(e){const t=qf(e);return!(Vf(Qe,t)||Vf(fe.current,t)||Vf(de.current,t)||Vf(tt,t))}}),At=Rm(It,{enabled:!g&&!ye,id:J,listRef:ne,activeIndex:Ke,selectedIndex:Je,virtual:!0,loopFocus:R,allowEscape:R&&!Ee,focusItemOnOpen:!(X||"none"===c&&!Ee)&&"auto",focusItemOnHover:E,resetOnPointerLeave:!C,orientation:y?"horizontal":void 0,rtl:"rtl"===K,disabledIndices:Id,grid:y?Nm:void 0,onNavigate(e,t){(t||Te)&&"ending"!==at&&ht(t?{activeIndex:e,type:ue.current?"keyboard":"pointer"}:{activeIndex:e})}}),Nt=Ct((()=>Mh(At.reference,{onKeyDown(e){!y||null!=Be.state.activeIndex||"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.preventBaseUIHandler()}},Tt.reference,Mt.reference,Ot.reference)),[At.reference,Tt.reference,Mt.reference,Ot.reference,y,Be]),Ft=Ct((()=>Mh(rm,At.floating,Tt.floating,Ot.floating)),[At.floating,Tt.floating,Ot.floating]),zt=Ct((()=>{const e=At.item;return e?{...e,onFocus:void 0}:kd}),[At.item]);qc((()=>{Be.update({inline:M,popupProps:Ft,inputProps:Nt,triggerProps:ct,itemProps:zt,setOpen:mt,setInputValue:gt,setSelectedValue:vt,setIndices:ht,onItemHighlighted:Ge,handleSelection:bt,forceMount:ft,requestSubmit:St})})),Vc((()=>{Be.update({id:J,selectedValue:Re,open:Te,mounted:lt,transitionStatus:at,items:b,inline:M,popupProps:Ft,inputProps:Nt,triggerProps:ct,openMethod:ut,itemProps:zt,selectionMode:c,name:be,form:p,disabled:ye,readOnly:g,required:m,grid:y,isGrouped:Fe,virtualized:O,onOpenChangeComplete:Ze,openOnInputClick:_,itemToStringLabel:I,modal:A,autoHighlight:Ee,isItemEqualToValue:P,submitOnItemClick:L,hasInputValue:_e,requestSubmit:St,inputOwnsFormValue:"none"===c&&(M||!Be.state.inputInsidePopup)})}),[Be,J,Re,Te,lt,at,b,Ft,Nt,zt,ut,ct,c,be,ye,g,m,Z,y,Fe,O,Ze,_,I,A,P,L,_e,M,St,Ee,p]);const Dt=Kc(v,Z.inputRef),Lt=Ct((()=>({query:ze,hasItems:xe,filteredItems:je,flatFilteredItems:We})),[ze,xe,je,We]),Vt=Ct((()=>Array.isArray(He)?"":Qm(He,k)),[He,k]),qt=we&&Array.isArray(Re)&&Re.length>0,$t=we||"none"===c&&ot?void 0:be,jt=Ct((()=>we&&Array.isArray(Re)&&be?Re.map((e=>{const t=Qm(e,k);return Zo.jsx("input",{type:"hidden",form:p,name:be,value:t,disabled:ye},t)})):null),[we,Re,p,be,k,ye]),Wt=Zo.jsxs(Ae,{children:[e.children,Zo.jsx("input",{...Z.getValidationProps(ye,{onFocus(){var e;rt?null==Qe||Qe.focus():null===(e=ie.current||Qe)||void 0===e||e.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||ye||g)return;const t=e.currentTarget.value,n=t.toLowerCase(),r=dp(Kf,e.nativeEvent),o=()=>me.current.findIndex((e=>Qm(e,k).toLowerCase()===n||Xm(e,I).toLowerCase()===n));Se&&(ft(),b&&-1===o()&&Be.set("forceMounted",!0)),queueMicrotask((function(){if(we)return;if("none"===c)return void gt(t,r);let e=o();-1===e&&(e=me.current.findIndex(((e,t)=>{const r=re.current[t];return null!=r&&r.toLowerCase()===n})));const i=-1===e?void 0:me.current[e];null!=i&&(null==vt||vt(i,r))}))}}),id:J&&null==$t?`${J}-hidden-input`:void 0,form:p,name:$t,autoComplete:z,disabled:ye,required:m&&!qt,readOnly:g,value:Vt,ref:Dt,style:$t?nd:td,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),jt]});return Zo.jsx(Fm.Provider,{value:Be,children:Zo.jsx(zm.Provider,{value:It,children:Zo.jsx(Lm.Provider,{value:xe,children:Zo.jsx(Dm.Provider,{value:Lt,children:Zo.jsx(Vm.Provider,{value:Oe,children:Wt})})})})})}function kv(e){const{multiple:t=!1,defaultValue:n,value:r,onValueChange:o,autoComplete:i,...l}=e;return Zo.jsx(Iv,{...l,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:o,formAutoComplete:i})}function Pv(e,t){return null!=e?e:t}let Ov=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Yg.startingStyle]="startingStyle",e[e.endingStyle=Yg.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),Mv=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const Tv={[Mv.popupOpen]:""},Av={[Mv.popupOpen]:"",[Mv.pressed]:""},Nv={[Ov.open]:""},Fv={[Ov.closed]:""},zv={[Ov.anchorHidden]:""},Dv={open:e=>e?Tv:null},Lv={open:e=>e?Av:null},Vv={open:e=>e?Nv:Fv,anchorHidden:e=>e?zv:null},qv={...Lv,...iv,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null},$v=rt(void 0),jv=rt(void 0);function Wv(e){const t=Rt(jv);if(void 0===t&&!e)throw new Error(rd(21));return t}const Bv=rt(void 0);function Hv(e=!1){const t=Rt(Bv);if(void 0===t&&!e)throw new Error(rd(16));return t}function Uv(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0,composite:i}=e,l=_t(null),s=Hv(!0),a=null!=i?i:void 0!==s,{props:u}=function(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,l=r&&!1!==t,s=r&&!1===t;return{props:Ct((()=>{const e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=o,!i&&n&&(e.tabIndex=t?o:-1)),(i&&(t||l)||!i&&n)&&(e["aria-disabled"]=n),!i||t&&!s||(e.disabled=n),e}),[r,n,t,l,s,i,o])}}({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o}),c=Et((()=>{const e=l.current;Gv(e)&&a&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)}),[t,u.disabled,a]);return Vc(c,[c]),{getButtonProps:Et(((e={})=>{const{onClick:n,onMouseDown:r,onKeyUp:i,onKeyDown:l,onPointerDown:s,...c}=e;return Mh({onClick(e){t?e.preventDefault():null==n||n(e)},onMouseDown(e){t||null==r||r(e)},onKeyDown(e){if(t)return;if(Vh(e),null==l||l(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,i=e.currentTarget,s=Gv(i),u=!o&&(c=i,Boolean("A"===(null==c?void 0:c.tagName)&&(null==c?void 0:c.href)));var c;const d=r&&(o?s:!u),f="Enter"===e.key,p=" "===e.key,h=i.getAttribute("role"),g=(null==h?void 0:h.startsWith("menuitem"))||"option"===h||"gridcell"===h;if(r&&a&&p){if(e.defaultPrevented&&g)return;return e.preventDefault(),void(u||o&&s?(i.click(),e.preventBaseUIHandler()):d&&(null==n||n(e),e.preventBaseUIHandler()))}d&&(o||!p&&!f||e.preventDefault(),!o&&f&&(null==n||n(e)))},onKeyUp(e){t||(Vh(e),null==i||i(e),e.target===e.currentTarget&&o&&a&&Gv(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||o||a||" "!==e.key||null==n||n(e))},onPointerDown(e){t?e.preventDefault():null==s||s(e)}},o?{type:"button"}:{role:"button"},u,c)}),[t,u,a,o]),buttonRef:Uc((e=>{l.current=e,c()}))}}function Gv(e){return zd(e)&&"BUTTON"===e.tagName}const Zv=Zt((function(e,t){const n=qm(),{buttonRef:r,getButtonProps:o}=Uv({native:!1}),i=Kc(t,r),l=o({onClick:function(e){n.state.setOpen(!1,dp(tp,e.nativeEvent,e.currentTarget))}});return Zo.jsx("span",{ref:i,...l,"aria-label":"Dismiss",tabIndex:void 0,style:nd})})),Kv=Zt((function(e,t){var n,r;const{render:o,className:i,disabled:l=!1,id:s,style:a,...u}
1=e,{state:c,disabled:d,setTouched:f,setFocused:p,validationMode:h,validation:g}=av(),{labelId:m}=hv(),v=Rt($v),y=Wv(!0),b=Boolean(y),w=qm(),{filteredItems:S}=jm(),_=Wm(),x=Rv(),C=xd(w,tv.required),E=xd(w,tv.disabled),R=xd(w,tv.readOnly),I=xd(w,tv.name),k=xd(w,tv.form),P=xd(w,tv.selectionMode),O=xd(w,tv.autoHighlight),M=xd(w,tv.inputProps),T=xd(w,tv.triggerProps),A=xd(w,tv.open),N=xd(w,tv.mounted),F=xd(w,tv.selectedValue),z=xd(w,tv.popupSide),D=xd(w,tv.positionerElement),L=xd(w,tv.id),V=xd(w,tv.inline),q=xd(w,tv.modal),$=Boolean(O),j=N&&D?z:null,W=d||E||l,B=0===S.length,H=b||V,U=!H||q,G=fv(null!=s?s:H?void 0:L),Z=Pv(m,void 0),K=b?rv:c,[J,Y]=yt(null),X=_t(!1),Q=_t(null),ee=_t(!1),te="none"===P&&!b,ne=Uc((e=>{const t=b||w.state.inline;t&&!w.state.hasInputValue&&w.state.setInputValue("",dp(Kf)),w.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:te})})),re=b||!g?u:g.getValidationProps(W,u),oe=jh("input",e,{state:{...K,open:A,disabled:W,readOnly:R,popupSide:j,listEmpty:B},ref:[t,w.state.inputRef,ne],props:[M,T,{type:"text",value:null!==(n=null!==(r=e.value)&&void 0!==r?r:J)&&void 0!==n?n:_,"aria-readonly":R||void 0,"aria-required":C||void 0,"aria-labelledby":Z,disabled:W,readOnly:R,required:"none"===P?C:void 0,form:k,...te&&I&&{name:I},id:G,onFocus(){if(p(!0),!V||!ee.current)return;ee.current=!1;const e=Q.current;null!=e&&Object.hasOwn(w.state.valuesRef.current,e)&&w.state.setIndices({activeIndex:e})},onBlur(){f(!0),p(!1);const e=w.state.activeIndex;if(V&&null!==e&&"always"!==O&&(Q.current=e,ee.current=!0,w.state.setIndices({activeIndex:null})),"onBlur"===h){const e="none"===P?_:F;g.commit(e)}},onCompositionStart(e){Sf||(X.current=!0,Y(e.currentTarget.value))},onCompositionEnd(e){X.current=!1;const t=e.currentTarget.value;Y(null),w.state.setInputValue(t,dp(rp,e.nativeEvent))},onChange(e){const t=e.nativeEvent.inputType,n=!t||"insertReplacementText"===t,r=X.current||!n;if(X.current){const t=e.currentTarget.value;Y(t),""!==t||w.state.openOnInputClick||w.state.inputInsidePopup||w.state.setOpen(!1,dp(op,e.nativeEvent));const n=t.trim(),o=$&&""!==n;return R||W||!n||r&&(w.state.setOpen(!0,dp(rp,e.nativeEvent)),$||w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"})),void(A&&null!==w.state.activeIndex&&!o&&w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"}))}const o=dp(rp,e.nativeEvent);if(w.state.setInputValue(e.currentTarget.value,o),o.isCanceled)return;const i=""===e.currentTarget.value,l=dp(op,e.nativeEvent);i&&!w.state.inputInsidePopup&&("single"===P&&w.state.setSelectedValue(null,l),w.state.openOnInputClick||w.state.setOpen(!1,l));const s=e.currentTarget.value.trim();R||W||!s||r&&(w.state.setOpen(!0,dp(rp,e.nativeEvent)),$||w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"})),A&&null!==w.state.activeIndex&&!$&&w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(e){if(W||R)return;if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;w.state.keyboardActiveRef.current=!0;const t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===x;if("Home"===e.key){kf(e);const n=Ef&&r?t.value.length:0;return t.setSelectionRange(n,n),void(t.scrollLeft=0)}if("End"===e.key){kf(e);const o=Ef&&r?0:t.value.length;return t.setSelectionRange(o,o),void(t.scrollLeft=r?-n:n)}if(!N&&"Escape"===e.key){const t="multiple"===P&&Array.isArray(F)?0===F.length:null===F,n=dp(lp,e.nativeEvent),r="multiple"===P?[]:null;return w.state.setInputValue("",n),w.state.setSelectedValue(r,n),void(t||w.state.inline||n.isPropagationAllowed||e.stopPropagation())}if(v&&"Backspace"===e.key&&""===t.value&&void 0===v.highlightedChipIndex&&Array.isArray(F)&&F.length>0){const t=v.chipsRef.current.length,n=t>0?t-1:F.length-1,r=F.filter(((e,t)=>t!==n));return w.state.setIndices({activeIndex:null,selectedIndex:null,type:w.state.keyboardActiveRef.current?"keyboard":"pointer"}
1),void w.state.setSelectedValue(r,dp(Kf,e.nativeEvent))}const o=void 0!==(null==v?void 0:v.highlightedChipIndex),i=function(e){var t;if(!v)return;let n;const{highlightedChipIndex:r}=v,o=v.chipsRef.current.length,i="rtl"===x,l=i?"ArrowRight":"ArrowLeft",s=i?"ArrowLeft":"ArrowRight";if(void 0!==r){if(e.key===l)e.preventDefault(),n=r>0?r-1:void 0;else if(e.key===s)e.preventDefault(),n=r<o-1?r+1:void 0;else if("Backspace"===e.key||"Delete"===e.key){e.preventDefault();const t=r>=F.length-1?F.length-2:r;n=t>=0?t:void 0,w.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return n}return e.key===l&&0===(null!==(t=e.currentTarget.selectionStart)&&void 0!==t?t:0)&&F.length>0?(e.preventDefault(),n=o>0?o-1:void 0):"Backspace"===e.key&&""===e.currentTarget.value&&F.length>0&&(w.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),e.preventDefault()),n}(e);var l;if(null==v||v.setHighlightedChipIndex(i),void 0!==i)null==v||null===(l=v.chipsRef.current[i])||void 0===l||l.focus();else if(o){var s;null===(s=w.state.inputRef.current)||void 0===s||s.focus()}if(229!==e.which&&"Enter"===e.key&&A){const t=w.state.activeIndex,n=e.nativeEvent;if(null===t){if(V)return;return void w.state.setOpen(!1,dp(Kf,n))}kf(e);const r=w.state.listRef.current[t];r&&(w.state.selectionEventRef.current=n,r.click(),w.state.selectionEventRef.current=null)}},onPointerMove(){w.state.keyboardActiveRef.current=!1},onPointerDown(){w.state.keyboardActiveRef.current=!1}},re],stateAttributesMapping:qv}),ie=b?Zo.jsx(sv.Provider,{value:lv,children:oe}):oe;return Zo.jsxs(Ae,{children:[A&&U&&Zo.jsx(Zv,{ref:w.state.startDismissRef}),ie]})}));function Jv(e){const t=e.getBoundingClientRect(),n=Td(e);if(If)return t;const r=n.getComputedStyle(e,"::before"),o=n.getComputedStyle(e,"::after");if("none"===r.content&&"none"===o.content)return t;const i=parseFloat(r.width)||0,l=parseFloat(r.height)||0,s=parseFloat(o.width)||0,a=parseFloat(o.height)||0,u=Math.max(t.width,i,s),c=Math.max(t.height,l,a),d=u-t.width,f=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}const Yv=Zt((function(e,t){const{render:n,className:r,nativeButton:o=!0,disabled:i=!1,id:l,style:s,...a}=e,{state:u,disabled:c,setTouched:d,setFocused:f,validationMode:p,validation:h}=av(),{labelId:g}=hv(),m=qm(),{filteredItems:v}=jm(),y=xd(m,tv.selectionMode),b=xd(m,tv.disabled),w=xd(m,tv.readOnly),S=xd(m,tv.required),_=xd(m,tv.mounted),x=xd(m,tv.popupSide),C=xd(m,tv.positionerElement),E=xd(m,tv.listElement),R=xd(m,tv.popupId),I=xd(m,tv.triggerProps),k=xd(m,tv.triggerElement),P=xd(m,tv.inputInsidePopup),O=xd(m,tv.id),M=xd(m,tv.labelId),T=xd(m,tv.open),A=xd(m,tv.selectedValue),N=xd(m,tv.activeIndex),F=xd(m,tv.selectedIndex),z=xd(m,tv.hasSelectedValue),D=$m(),L=Wm(),V=df(),q=c||b||i,$=0===v.length,j=_&&C?x:null;gv({id:P?l:void 0});const W=P?null!=l?l:O:l,B=Pv(g,M);let H;T&&P?H=null!=R?R:mv(O):T&&(H=null==E?void 0:E.id);const U=_t("");function G(e){U.current=e.pointerType}const Z=D.useState("domReferenceElement");wt((()=>{P&&k&&k!==Z&&D.set("domReferenceElement",k)}),[k,Z,D,P]);const{reference:K}=Im(D,{enabled:!T&&!w&&!b&&"single"===y,listRef:m.state.labelsRef,activeIndex:N,selectedIndex:F,onMatch(e){const t=m.state.valuesRef.current[e];void 0!==t&&m.state.setSelectedValue(t,dp("none"))}}),{reference:J}=hg(D,{enabled:!w&&!b,event:"mousedown"}),{buttonRef:Y,getButtonProps:X}=Uv({native:o,disabled:q}),Q={...u,open:T,disabled:q,popupSide:j,listEmpty:$,placeholder:"none"!==y&&!z};return jh("button",e,{ref:[t,Y,Uc((e=>{m.set("triggerElement",e)}))],state:Q,props:[I,J,K,{id:W,tabIndex:P?0:-1,role:P?"combobox":void 0,"aria-expanded":T?"true":"false","aria-haspopup":P?"dialog":"listbox","aria-controls":H,"aria-required":P&&S||void 0,"aria-labelledby":B,onPointerDown:G,onPointerEnter:G,onFocus(){f(!0),q||w||V.start(0,m.state.forceMount)},onBlur(e){if(!Vf(C,e.relatedTarget)&&(d(!0),f(!1),"onBlur"===p)){const e="none"===y?L:A;h.commit(e)}},onMouseDown(e){if(q||w)return;var t;if(P||D.set("domReferenceElement",e.currentTarget),m.state.forceMount(),"touch"!==U.current&&(null===(t=m.state.inputRef.current)||void 0===t||t.focus(),P||e.preventDefault()),T)return;const n=tf(e.currentTarget);P&&n.addEventListener("mouseup",(function(e){if(!k)return;const t=qf(e),n=m.state.positionerElement,r=m.state.listElement;
1if(Vf(k,t)||Vf(n,t)||Vf(r,t)||t===k)return;const o=Jv(k),i=e.clientX>=o.left-2&&e.clientX<=o.right+2,l=e.clientY>=o.top-2&&e.clientY<=o.bottom+2;i&&l||m.state.setOpen(!1,dp("cancel-open",e))}),{once:!0})},onKeyDown(e){var t;q||w||"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(kf(e),m.state.setOpen(!0,dp(sp,e.nativeEvent)),null===(t=m.state.inputRef.current)||void 0===t||t.focus())}},h?h.getValidationProps(q,a):a,X],stateAttributesMapping:qv})})),Xv=rt(null);function Qv(e){const{children:t}=e,{filteredItems:n}=jm(),r=Rt(Xv),o=r?r.items:n;return o?Zo.jsx(Ae,{children:o.map(t)}):null}const ey=rt({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function ty(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Uc(o),l=_t(0),s=Wc(ry).current,a=Wc(ny).current,[u,c]=yt(0),d=_t(u),f=Uc(((e,t)=>{a.set(e,null!=t?t:null),d.current+=1,c(d.current)})),p=Uc((e=>{a.delete(e),d.current+=1,c(d.current)})),h=Ct((()=>{const e=new Map;return Array.from(a.keys()).filter((e=>e.isConnected)).sort(oy).forEach(((t,n)=>{var r;const o=null!==(r=a.get(t))&&void 0!==r?r:{};e.set(t,{...o,index:n})})),e}),[a,u]);Vc((()=>{if("function"!=typeof MutationObserver||0===h.size)return;const e=new MutationObserver((e=>{const t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach((e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)})),0===t.size&&(d.current+=1,c(d.current))}));return h.forEach(((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})})),()=>{e.disconnect()}}),[h]),Vc((()=>{d.current===u&&(n.current.length!==h.size&&(n.current.length=h.size),r&&r.current.length!==h.size&&(r.current.length=h.size),l.current=h.size),i(h)}),[i,h,n,r,u]),Vc((()=>()=>{n.current=[]}),[n]),Vc((()=>()=>{r&&(r.current=[])}),[r]);const g=Uc((e=>(s.add(e),()=>{s.delete(e)})));Vc((()=>{s.forEach((e=>e(h)))}),[s,h]);const m=Ct((()=>({register:f,unregister:p,subscribeMapChange:g,elementsRef:n,labelsRef:r,nextIndexRef:l})),[f,p,g,n,r,l]);return Zo.jsx(ey.Provider,{value:m,children:t})}function ny(){return new Map}function ry(){return new Set}function oy(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const iy=Zt((function(e,t){var n;const{render:r,className:o,style:i,children:l,...s}=e,a=qm(),u=$m(),c=Boolean(Wv(!0)),{filteredItems:d,hasItems:f}=jm(),p=xd(a,tv.selectionMode),h=xd(a,tv.grid),g=xd(a,tv.popupProps),m=xd(a,tv.virtualized),v=xd(a,tv.forceMounted),y="multiple"===p,b=0===d.length,w=Uc((e=>{a.set("positionerElement",e)})),S=Uc((e=>{a.set("listElement",e)})),_=jh("div",e,{state:{empty:b},ref:[t,S,c?null:w],props:[g,{children:Ct((()=>"function"==typeof l?n||(n=Zo.jsx(Qv,{children:l})):l),[l]),tabIndex:-1,id:u.useState("floatingId"),role:h?"grid":"listbox","aria-multiselectable":y?"true":void 0,onKeyDown(e){if(!a.state.disabled&&!a.state.readOnly&&"Enter"===e.key){const t=a.state.activeIndex;if(null==t)return;kf(e);const n=e.nativeEvent,r=a.state.listRef.current[t];r&&(a.state.selectionEventRef.current=n,r.click(),a.state.selectionEventRef.current=null)}},onKeyDownCapture(){a.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){a.state.keyboardActiveRef.current=!1}},s]});if(m)return _;const x=f&&!v?void 0:a.state.labelsRef;return Zo.jsx(ty,{elementsRef:a.state.listRef,labelsRef:x,children:_})}));const ly=rt(void 0),sy=Zt((function(e,t){const{keepMounted:n=!1,...r}=e,o=qm(),i=xd(o,tv.mounted),l=xd(o,tv.forceMounted);return i||n||l?Zo.jsx(ly.Provider,{value:n,children:Zo.jsx(Yh,{ref:t,...r})}):null}));function ay(e){return vd(19)?e:e?"true":void 0}const uy=e=>({name:"arrow",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,rects:s,platform:a,elements:u,middlewareData:c}=t,{element:d,padding:f=0,offsetParent:p="real"}=_p(e,t)||{};if(null==d)return{};const h=Fp(f),g={x:o,y:i},m=kp(l),v=Rp(m),y=await a.getDimensions(d),b="y"===m,w=b?"top":"left",S=b?"bottom":"right",_=b?"clientHeight":"clientWidth",x=s.reference[v]+s.reference[m]-g[m]-s.floating[v],C=g[m]-s.reference[m],E="real"===p?await(null===(n=a.getOffsetParent)||void 0===n?void 0:n.call(a,d)):u.floating;let R=u.floating[_]||s.floating[v];R&&await(null===(r=a.isElement)||void 0===r?void 0:r.call(a,E))||(R=u.floating[_]||s.floating[v]);const I=x/2-C/2,k=R/2-y[v]/2-1,P=Math.min(h[w],k),O=Math.min(h[S],k),M=P,T=R-y[v]-O,A=R/2-y[v]/2+I,N=Sp(M,A,T),F=!c.arrow&&null!=Cp(l)&&A!==N&&s.reference[v]/2-(A<M?P:O)-y[v]/2<0,z=F?A<M?A-M:A-T:0;return{[m]:g[m]+z,data:{[m]:N,centerOffset:A-N-z,...F&&{alignmentOffset:z}},reset:F}}}),cy=(e=>{const t=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=_p(e,t);switch(o){case"referenceHidden":{const e=bg(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:wg(e)}}}case"escaped":{const e=bg(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:wg(e)}}}default:return{}}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})().fn,dy={name:"hide",async fn(e){var t;const{width:n,height:r,x:o,y:i}=e.rects.reference,l=0===n&&0===r&&0===o&&0===i;return{data:{referenceHidden:(null===(t=(await cy(e)).data)||void 0===t?void 0:t.referenceHidden)||l}}}},fy={sideX:"left",sideY:"top"},py={name:"adaptiveOrigin",async fn(e){var t,n;const{x:r,y:o,rects:{floating:i},elements:{floating:l},platform:s,strategy:a,placement:u}=e,c=Td(l),d=c.getComputedStyle(l);
1if("0s"===d.transitionDuration||""===d.transitionDuration)return{x:r,y:o,data:fy};const f=await(null===(t=s.getOffsetParent)||void 0===t?void 0:t.call(s,l));let p={width:0,height:0};if("fixed"===a&&null!=c&&c.visualViewport)p={width:c.visualViewport.width,height:c.visualViewport.height};else if(f===c){const e=tf(l);p={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(null===(n=s.isElement)||void 0===n?void 0:n.call(s,f))&&(p=await s.getDimensions(f));const h=xp(u);let g=r,m=o;return"left"===h&&(g=p.width-(r+i.width)),"top"===h&&(m=p.height-(o+i.height)),{x:g,y:m,data:{sideX:"left"===h?"right":fy.sideX,sideY:"top"===h?"bottom":fy.sideY}}}};function hy(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function gy(e,t,n){const{rects:r,placement:o}=e;return{side:hy(t,xp(o),n),align:Cp(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function my(e){var t,n;const{anchor:r,positionMethod:o="absolute",side:i="bottom",sideOffset:l=0,align:s="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:d=!1,arrowPadding:f=5,disableAnchorTracking:p=!1,inline:h,keepMounted:g=!1,floatingRootContext:m,mounted:v,collisionAvoidance:y,shiftCrossAxis:b=!1,nodeId:w,adaptiveOrigin:S,lazyFlip:_=!1,externalTree:x}=e,[C,E]=yt(null);v||null===C||E(null);const R=y.side||"flip",I=y.align||"flip",k=y.fallbackAxisSide||"end",P="function"==typeof r?r:void 0,O=Uc(P),M=P?O:r,T=Xc(r),A=Xc(v),N="rtl"===Rv(),F=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":N?"left":"right","inline-start":N?"right":"left"}[i],z="center"===s?F:`${F}-${s}`;let D=c;const L="bottom"===i?1:0,V="top"===i?1:0,q="right"===i?1:0,$="left"===i?1:0;"number"==typeof D?D={top:D+L,right:D+$,bottom:D+V,left:D+q}:D&&(D={top:(D.top||0)+L,right:(D.right||0)+$,bottom:(D.bottom||0)+V,left:(D.left||0)+q});const j={boundary:"clipping-ancestors"===u?"clippingAncestors":u,padding:D},W=_t(null),B=Xc(l),H=Xc(a),U="function"!=typeof l?l:0,G="function"!=typeof a?a:0,Z=[];h&&Z.push(h),Z.push(((e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=xp(n),s=Cp(n),a="y"===Ip(n),u=Sg.has(l)?-1:1,c=i&&a?-1:1,d=_p(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}(t,e);return l===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})((e=>{const t=gy(e,i,N),n="function"==typeof B.current?B.current(t):B.current,r="function"==typeof H.current?H.current(t):H.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}}),[U,G,N,i]));const K="none"===I&&"shift"!==R,J=!K&&(d||b||"shift"===R),Y="none"===R?null:(e=>{const t=Vg(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...j,padding:{top:D.top+1,right:D.right+1,bottom:D.bottom+1,left:D.left+1},mainAxis:!b&&"flip"===R,crossAxis:"flip"===I&&"alignment",fallbackAxisSideDirection:k}),X=K?null:((e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=_p(e,t),c={x:n,y:r},d=await i.detectOverflow(t,u),f=Ip(xp(o)),p=Ep(f);let h=c[p],g=c[f];if(l){const e="y"===p?"bottom":"right";h=Sp(h+d["y"===p?"top":"left"],h,h-d[e])}if(s){const e="y"===f?"bottom":"right";g=Sp(g+d["y"===f?"top":"left"],g,g-d[e])}const m=a.fn({...t,[p]:h,[f]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:l,[f]:s}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})((e=>{const t=tf(e.elements.floating).documentElement;return{...j,rootBoundary:b?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==I,crossAxis:J,limiter:d||b?void 0:(n=e=>{if(!W.current)return{};const{width:t,height:n}=W.current.getBoundingClientRect(),r=Ip(xp(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?D.left+D.right:D.top+D.bottom)/2}},{fn:qg(n).fn,options:[n,undefined]})};var n}),[j,d,b,D,I]);var Q,ee;"shift"===R||"shift"===I||"center"===s?Z.push(X,Y):Z.push(Y,X),Z.push((e=>{const t=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:s}=t,{apply:a=()=>{},...u}=_p(e,t),c=await l.detectOverflow(t,u),d=xp(o),f=Cp(o),p="y"===Ip(o),{width:h,height:g}=i.floating;let m,v;"top"===d||"bottom"===d?(m=d,v=f===(await(null==l.isRTL?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,m="end"===f?"top":"bottom");const y=g-c.top-c.bottom,b=h-c.left-c.right,w=gp(g-c[m],y),S=gp(h-c[v],b),_=!t.middlewareData.shift;let x=w,C=S;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(x=y),_&&!f){const e=mp(c.left,0),t=mp(c.right,0),n=mp(c.top,0),r=mp(c.bottom,0);p?C=h-2*(0!==e||0!==t?e+t:mp(c.left,c.right)):x=g-2*(0!==n||0!==r?n+r:mp(c.top,c.bottom))}await a({...t,availableWidth:C,availableHeight:x});const E=await l.getDimensions(s.floating);return h!==E.width||g!==E.height?{reset:{rects:!0}}:{}}}}(e);return{name:t.name,fn:t.fn,options:[e,void 0]}})({...j,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!A.current)return;const o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);const i=Td(e).devicePixelRatio||1,{x:l,y:s,width:a,height:u}=r.reference,c=(Math.round((l+a)*i)-Math.round(l*i))/i,d=(Math.round((s+u)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${c}px`),o.setProperty("--anchor-height",`${d}px`)}}),(ee=[f],{...uy(Q=e=>({element:W.current||tf(e.elements.floating).createElement("div"),padding:f,offsetParent:"floating"})),options:[Q,ee]}),{name:"transformOrigin",fn(e){var t,n,r;const{elements:o,middlewareData:s,placement:a,rects:u,y:c}=e,d=xp(a),f=Ip(d),p=W.current,h=(null===(t=s.arrow)||void 0===t?void 0:t.x)||0,g=(null===(n=s.arrow)||void 0===n?void 0:n.y)||0,m=h+((null==p?void 0:p.clientWidth)||0)/2,v=g+((null==p?void 0:p.clientHeight)||0)/2,y=Math.abs((null===(r=s.shift)||void 0===r?void 0:r.y
1)||0),b=u.reference.height/2,w="function"==typeof l?l(gy(e,i,N)):l,S=y>w,_={top:`${m}px calc(100% + ${w}px)`,bottom:`${m}px ${-w}px`,left:`calc(100% + ${w}px) ${v}px`,right:`${-w}px ${v}px`}[d],x=`${m}px ${u.reference.y+b-c}px`;return o.floating.style.setProperty("--transform-origin",J&&"y"===f&&S?x:_),{}}},dy,S),Vc((()=>{!v&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})}),[v,m]);const te=Ct((()=>({elementResize:!p&&"undefined"!=typeof ResizeObserver,layoutShift:!p&&"undefined"!=typeof IntersectionObserver})),[p]),{refs:ne,elements:re,x:oe,y:ie,middlewareData:le,update:se,placement:ae,context:ue,isPositioned:ce,floatingStyles:de}=function(e={}){const{nodeId:t,externalTree:n}=e,r=gm(e),o=e.rootContext||r,i=o.useState("referenceElement"),l=o.useState("floatingElement"),s=o.useState("domReferenceElement"),a=o.useState("open"),u=o.useState("floatingId"),[c,d]=yt(null),[f,p]=yt(void 0),[h,g]=yt(void 0),m=_t(null),v=rg(n),y=Ct((()=>({reference:i,floating:l,domReference:s})),[i,l,s]),b=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[c,d]=yt({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=yt(r);Wg(f,r)||p(r);const[h,g]=yt(null),[m,v]=yt(null),y=Et((e=>{e!==_.current&&(_.current=e,g(e))}),[]),b=Et((e=>{e!==x.current&&(x.current=e,v(e))}),[]),w=i||h,S=l||m,_=_t(null),x=_t(null),C=_t(c),E=null!=a,R=Ug(a),I=Ug(o),k=Ug(u),P=Et((()=>{if(!_.current||!x.current)return;const e={placement:t,strategy:n,middleware:f};I.current&&(e.platform=I.current),$g(_.current,x.current,e).then((e=>{const t={...e,isPositioned:!1!==k.current};O.current&&!Wg(C.current,t)&&(C.current=t,Nn((()=>{d(t)})))}))}),[f,t,n,I,k]);jg((()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[u]);const O=_t(!1);jg((()=>(O.current=!0,()=>{O.current=!1})),[]),jg((()=>{if(w&&(_.current=w),S&&(x.current=S),w&&S){if(R.current)return R.current(w,S,P);P()}}),[w,S,P,R,E]);const M=Ct((()=>({reference:_,floating:x,setReference:y,setFloating:b})),[y,b]),T=Ct((()=>({reference:w,floating:S})),[w,S]),A=Ct((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Hg(T.floating,c.x),r=Hg(T.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Bg(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,T.floating,c.x,c.y]);return Ct((()=>({...c,update:P,refs:M,elements:T,floatingStyles:A})),[c,P,M,T,A])}({...e,elements:{...y,...c&&{reference:c}}}),w=Fd(f)?f:null,S=void 0===h?o.state.floatingElement:h;o.useSyncedValue("referenceElement",null!=f?f:null),o.useSyncedValue("domReferenceElement",void 0===f?s:w),o.useSyncedValue("floatingElement",S);const _=Et((e=>{const t=Fd(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),b.refs.setReference(t)}),[b.refs]),x=Et((e=>{(Fd(e)||null===e)&&(m.current=e,p(e)),(Fd(b.refs.reference.current)||null===b.refs.reference.current||null!==e&&!Fd(e))&&b.refs.setReference(e)}),[b.refs,p]),C=Et((e=>{g(e),b.refs.setFloating(e)}),[b.refs]),E=Ct((()=>({...b.refs,setReference:x,setFloating:C,setPositionReference:_,domReference:m})),[b.refs,x,C,_]),R=Ct((()=>({...b.elements,domReference:s})),[b.elements,s]),I=Ct((()=>({...b,dataRef:o.context.dataRef,open:a,onOpenChange:o.setOpen,events:o.context.events,floatingId:u,refs:E,elements:R,nodeId:t,rootStore:o})),[b,E,R,t,o,a,u]);return Vc((()=>{s&&(m.current=s)}),[s]),Vc((()=>{o.context.dataRef.current.floatingContext=I;const e=null==v?void 0:v.nodesRef.current.find((e=>e.id===t));e&&(e.context=I)})),Ct((()=>({...b,context:I,refs:E,elements:R,rootStore:o})),[b,E,R,I,o])}({rootContext:m,open:g?v:void 0,placement:z,middleware:Z,strategy:o,whileElementsMounted:g?void 0:(...e)=>Lg(...e,te),nodeId:w,externalTree:x}),{sideX:fe,sideY:pe}=le.adaptiveOrigin||fy,he=ce?o:"fixed",ge=Ct((()=>{const e=S?{position:he,[fe]:oe,[pe]:ie}:{position:he,...de};return ce||(e.opacity=0),e}),[S,he,fe,oe,pe,ie,de,ce]),me=_t(null);Vc((()=>
1{if(!v)return;const e=T.current,t="function"==typeof e?e():e,n=(vy(t)?t.current:t)||null;n!==me.current&&(ne.setPositionReference(n),me.current=n)}),[v,ne,M,T]),wt((()=>{if(!v)return;const e=T.current;"function"!=typeof e&&vy(e)&&e.current!==me.current&&(ne.setPositionReference(e.current),me.current=e.current)}),[v,ne,M,T]),wt((()=>{if(g&&v&&re.reference&&re.floating)return Lg(re.reference,re.floating,se,te)}),[g,v,re,se,te]);const ve=xp(ae),ye=hy(i,ve,N),be=Cp(ae)||"center",we=Boolean(null===(t=le.hide)||void 0===t?void 0:t.referenceHidden);Vc((()=>{_&&v&&ce&&E(ve)}),[_,v,ce,ve]);const Se=Ct((()=>{var e,t;return{position:"absolute",top:null===(e=le.arrow)||void 0===e?void 0:e.y,left:null===(t=le.arrow)||void 0===t?void 0:t.x}}),[le.arrow]),_e=0!==(null===(n=le.arrow)||void 0===n?void 0:n.centerOffset);return Ct((()=>({positionerStyles:ge,arrowStyles:Se,arrowRef:W,arrowUncentered:_e,side:ye,align:be,physicalSide:ve,anchorHidden:we,refs:ne,context:ue,isPositioned:ce,update:se})),[ge,Se,W,_e,ye,be,ve,we,ne,ue,ce,se])}function vy(e){return null!=e&&"current"in e}const yy=Zt((function(e,t){const{cutout:n,...r}=e;let o;if(n){const e=n.getBoundingClientRect();o=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return Zo.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})}));function by(e){return"starting"===e?Bh:kd}function wy(e,t,{styles:n,transitionStatus:r,props:o,refs:i,hidden:l,inert:s=!1}){const a={...n};return s&&(a.pointerEvents="none"),jh("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:l,style:a},by(r),o],stateAttributesMapping:Vv})}let Sy={},_y={},xy="";const Cy=new class{constructor(){te(this,"lockCount",0),te(this,"restore",null),te(this,"timeoutLock",cf.create()),te(this,"timeoutUnlock",cf.create()),te(this,"release",(()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)})),te(this,"unlock",(()=>{var e;0===this.lockCount&&this.restore&&(null===(e=this.restore)||void 0===e||e.call(this),this.restore=null)}))}acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,(()=>this.lock(e))),this.release}lock(e){if(0===this.lockCount||null!==this.restore)return;const t=tf(e).documentElement,n=Td(t).getComputedStyle(t).overflowY;if("hidden"===n||"clip"===n)return void(this.restore=Rd);const r=bf||!function(e){if("undefined"==typeof document)return!1;const t=tf(e);return Td(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=r?function(e){const t=tf(e),n=t.documentElement,r=t.body,o=Ld(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}(e):function(e){var t,n;const r=tf(e),o=r.documentElement,i=r.body,l=Td(o);let s=0,a=0,u=!1;const c=af.create();
1if(Cf&&1!==(null!==(t=null===(n=l.visualViewport)||void 0===n?void 0:n.scale)&&void 0!==t?t:1))return()=>{};function d(){const t=l.getComputedStyle(o),n=l.getComputedStyle(i),r=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=o.scrollTop,a=o.scrollLeft,Sy={scrollbarGutter:o.style.scrollbarGutter,overflowY:o.style.overflowY,overflowX:o.style.overflowX},xy=o.style.scrollBehavior,_y={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const c=o.scrollHeight>o.clientHeight,d=o.scrollWidth>o.clientWidth,f="scroll"===t.overflowY||"scroll"===n.overflowY,p="scroll"===t.overflowX||"scroll"===n.overflowX,h=Math.max(0,l.innerWidth-i.clientWidth),g=Math.max(0,l.innerHeight-i.clientHeight),m=parseFloat(n.marginTop)+parseFloat(n.marginBottom),v=parseFloat(n.marginLeft)+parseFloat(n.marginRight),y=Ld(o)?o:i;if(u=function(e){if("undefined"==typeof CSS||!CSS.supports||!CSS.supports("scrollbar-gutter","stable")||"undefined"==typeof document)return!1;const t=tf(e),n=t.documentElement,r=t.body,o=Ld(n)?n:r,i=o.style.overflowY,l=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const s=o.offsetWidth;o.style.overflowY="hidden";const a=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=l,s===a}(e),u)return o.style.scrollbarGutter=r,y.style.overflowY="hidden",void(y.style.overflowX="hidden");Object.assign(o.style,{scrollbarGutter:r,overflowY:"hidden",overflowX:"hidden"}),(c||f)&&(o.style.overflowY="scroll"),(d||p)&&(o.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:m||g?`calc(100dvh - ${m+g}px)`:"100dvh",width:v||h?`calc(100vw - ${v+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),i.scrollTop=s,i.scrollLeft=a,o.setAttribute("data-base-ui-scroll-locked",""),o.style.scrollBehavior="unset"}function f(){Object.assign(o.style,Sy),Object.assign(i.style,_y),u||(o.scrollTop=s,o.scrollLeft=a,o.removeAttribute("data-base-ui-scroll-locked"),o.style.scrollBehavior=xy)}d();const p=nf(l,"resize",(function(){f(),c.request(d)}));return()=>{c.cancel(),f(),"function"==typeof l.removeEventListener&&p()}}(e)}};function Ey(e=!0,t=null){Vc((()=>{if(e)return Cy.acquire(t)}),[e,t])}function Ry(e,t,n,r){const[o,i]=yt(!1);Vc((()=>{if(!e||!t||null==n)return void i(!1);const r=tf(n).documentElement.clientWidth,o=n.offsetWidth;i(r>0&&o>0&&o>=r-20)}),[e,t,n]),Ey(e&&(!t||o),r)}const Iy=Zt((function(e,t){var n;const{render:r,className:o,anchor:i,positionMethod:l="absolute",side:s="bottom",align:a="center",sideOffset:u=0,alignOffset:c=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:g=!1,collisionAvoidance:m=Hh,style:v,...y}=e,b=qm(),{filteredItems:w}=jm(),S=$m(),_=function(){const e=Rt(ly);if(void 0===e)throw new Error(rd(20));return e}(),x=xd(b,tv.modal),C=xd(b,tv.open),E=xd(b,tv.mounted),R=xd(b,tv.openMethod),I=xd(b,tv.positionerElement),k=xd(b,tv.triggerElement),P=xd(b,tv.inputElement),O=xd(b,tv.inputGroupElement),M=xd(b,tv.inputInsidePopup),T=xd(b,tv.transitionStatus),A=0===w.length,N=my({anchor:null!=i?i:M?k:null!=O?O:P,floatingRootContext:S,positionMethod:l,mounted:E,side:s,sideOffset:u,align:a,alignOffset:c,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:h,disableAnchorTracking:g,keepMounted:_,collisionAvoidance:m,lazyFlip:!0});Ry(C&&x,"touch"===R,I,k);const F={open:C,side:N.side,align:N.align,anchorHidden:N.anchorHidden,empty:A};Vc((()=>{b.set("popupSide",N.side)}),[b,N.side]);const z=Uc((e=>{b.set("positionerElement",e)})),D=wy(e,F,{styles:N.positionerStyles,transitionStatus:T,props:y,refs:[t,z],hidden:!E,inert:!C});return Zo.jsxs(jv.Provider,{value:N,children:[E&&x&&Zo.jsx(yy,{inert:ay(!C),cutout:null!==(n=null!=O?O:P)&&void 0!==n?n:k}),D]})})),ky={...Vv,...em},Py=Zt((function(e,t){var n;const{render:r,className:o,style:i,initialFocus:l,finalFocus:s,...a}=e,u=qm(),c=Wv(),d=$m(),{filteredItems:f}=jm(),p=xd(u,tv.mounted),h=xd(u,tv.open),g=xd(u,tv.openMethod),m=xd(u,tv.transitionStatus),v=xd(u,tv.inputInsidePopup),y=xd(u,tv.inputElement),b=xd(u,tv.modal),w=xd(u,tv.i
1d),S=0===f.length,_=null!==(n=a.id)&&void 0!==n?n:v?mv(w):void 0;Vc((()=>{var e;return u.set("popupId",(null===(e=u.state.popupRef.current)||void 0===e?void 0:e.id)||_),()=>{u.set("popupId",void 0)}}),[u,_]),nm({open:h,ref:u.state.popupRef,onComplete(){h&&u.state.onOpenChangeComplete(!0)}});const x=jh("div",e,{state:{open:h,side:c.side,align:c.align,anchorHidden:c.anchorHidden,transitionStatus:m,empty:S},ref:[t,u.state.popupRef],props:[{id:_,role:v?"dialog":"presentation",tabIndex:-1,onFocus(e){const t=qf(e.nativeEvent);var n;"touch"===g||!Vf(u.state.listElement,t)&&t!==e.currentTarget||null===(n=u.state.inputRef.current)||void 0===n||n.focus()}},by(m),a],stateAttributesMapping:ky}),C=void 0===l?!!v&&(e=>"touch"===e?u.state.popupRef.current:y):l;let E;E=null!=s?s:!!v&&void 0;const R=!v||b;return Zo.jsx(pg,{context:d,disabled:!p,modal:R,openInteractionType:g,initialFocus:C,returnFocus:E,getInsideElements:()=>[u.state.startDismissRef.current,u.state.endDismissRef.current],children:Zo.jsxs(Ae,{children:[x,R&&Zo.jsx(Zv,{ref:u.state.endDismissRef})]})})}));let Oy=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function My(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:l,unregister:s,subscribeMapChange:a,elementsRef:u,labelsRef:c,nextIndexRef:d}=Rt(ey),f=_t(-1),[p,h]=yt(null!=i?i:o===Oy.GuessFromOrder?()=>{if(-1===f.current){const e=d.current;d.current+=1,f.current=e}return f.current}:-1),g=_t(null),m=Et((e=>{if(g.current=e,-1!==p&&null!==e&&(u.current[p]=e,c)){var n,o;const i=void 0!==t;c.current[p]=i?t:null!==(n=null==r||null===(o=r.current)||void 0===o?void 0:o.textContent)&&void 0!==n?n:e.textContent}}),[p,u,c,t,r]);return Vc((()=>{if(null!=i)return;const e=g.current;return e?(l(e,n),()=>{s(e)}):void 0}),[i,l,s,n]),Vc((()=>{if(null==i)return a((e=>{var t;const n=g.current?null===(t=e.get(g.current))||void 0===t?void 0:t.index:null;null!=n&&h(n)}))}),[i,a,h]),{ref:m,index:p}}const Ty=rt(void 0);function Ay(){const e=Rt(Ty);if(!e)throw new Error(rd(19));return e}const Ny=rt(!1);function Fy(e){const{componentProps:t,forwardedRef:n,virtualized:r,indexFromFilter:o}=e,{render:i,className:l,style:s,value:a=null,index:u,disabled:c=!1,nativeButton:d=!1,...f}=t,p=_t(!1),h=_t(null),g=My({index:u,textRef:h,indexGuessBehavior:Oy.GuessFromOrder}),m=qm(),v=Rt(Ny),y=Rt(Lm),b=xd(m,tv.open),w=xd(m,tv.selectionMode),S=xd(m,tv.readOnly),_=xd(m,tv.isItemEqualToValue),x="none"!==w,C=null!=u?u:r?null!=o?o:-1:g.index,E=-1!==g.index,R=xd(m,tv.id),I=xd(m,tv.isActive,C),k=xd(m,tv.isSelected,a),P=xd(m,tv.itemProps),O=_t(null),M=null!=R&&E?`${R}-${C}`:void 0,T=k&&x;Vc((()=>{if(!E||!r&&null==u)return;const e=m.state.listRef.current;return e[C]=O.current,()=>{delete e[C]}}),[E,r,C,u,m]),Vc((()=>{if(!E||y)return;const e=m.state.valuesRef.current;return e[C]=a,"none"!==w&&m.state.allValuesRef.current.push(a),()=>{delete e[C]}}),[E,y,C,a,m,w]),Vc((()=>{if(!b)return void(p.current=!1);if(!E||y)return;const e=m.state.selectedValue,t=Array.isArray(e)?e[e.length-1]:e;Hm(a,t,_)&&m.set("selectedIndex",C)}),[E,y,b,m,C,a,_]);const{getButtonProps:A,buttonRef:N}=Uv({disabled:c,focusableWhenDisabled:!0,native:d,composite:!0}),F={disabled:c,selected:T,highlighted:I};function z(e){function t(){m.state.handleSelection(e,a)}m.state.submitOnItemClick?(Nn(t),m.state.requestSubmit()):t()}const D={id:M,role:v?"gridcell":"option","aria-selected":x?T:void 0,tabIndex:void 0,onPointerDownCapture(e){p.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){c||S||z(e.nativeEvent)},onMouseUp(e){const t=p.current;p.current=!1,c||S||0!==e.button||t||!I||z(e.nativeEvent)}},L=jh("div",t,{ref:[N,n,g.ref,O],state:F,props:[P,D,f,A]}),V=Ct((()=>({selected:T,textRef:h})),[T,h]);return Zo.jsx(Ty.Provider,{value:V,children:L})}function zy(e){var t;const{componentProps:n,forwardedRef:r}=e,o=xd(qm(),tv.isItemEqualToValue),{flatFilteredItems:i}=jm(),l=Gm(i,null!==(t=n.value)&&void 0!==t?t:null,o);return Zo.jsx(Fy,{componentProps:n,forwardedRef:r,virtualized:!0,indexFromFilter:l})}const Dy=Ht(Zt((function(e,t){const n=xd(qm(),tv.virtualized);return n&&null==e.index?Zo.jsx(zy,{componentProps:e,forwardedRef:t}):Zo.jsx(Fy,{componentProps:e,forwardedRef:t,virtualized:n,indexFromFilter:void 0})}))),Ly=Zt((function(e,t){var n;const r=null!==(n=e.keepMounted)&&void 0!==n&&n,{selected:o}=Ay();return r||o?Zo.jsx(Vy,{...e,ref:t}):null})),Vy=Ht(Zt(((e,t)=>{const{render:n,className:r,style:o,keepMounted:i,...l}=e,{selected:s}=Ay(),a=_t(null),{transitionStatus:u,setMounted:c}=Jg(s),d=jh("span",e,{ref:[t,a],state:{selected:s,transitionStatus:u}
1,props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:em});return nm({open:s,ref:a,onComplete(){s||c(!1)}}),d}))),qy=Zt((function(e,t){const{render:n,className:r,style:o,children:i,...l}=e,{filteredItems:s}=jm(),a=qm(),u=function(){const e=df(),t=_t(null);return wt((()=>{var n;if(bf)return;const r=t.current;if(null==r)return;const o=function(e){const t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);let n=null;for(;t.nextNode();){const e=t.currentNode;""!==e.nodeValue&&(n=e)}return n}(r);if(null==o)return;const i=null!==(n=o.nodeValue)&&void 0!==n?n:"",l=`${i}⁠`;return o.nodeValue=l,e.start(200,(()=>{o.nodeValue===l&&(o.nodeValue=i)})),()=>{e.clear(),o.nodeValue===l&&(o.nodeValue=i)}}),[t,e]),t}(),c=0===s.length?i:null;return jh("div",e,{ref:[t,a.state.emptyRef,u],props:[{children:c,role:"status","aria-live":"polite","aria-atomic":!0},l]})})),$y={...em,...Dv},jy=Zt((function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,keepMounted:l=!1,style:s,...a}=e,{disabled:u}=av(),c=qm(),d=xd(c,tv.selectionMode),f=xd(c,tv.disabled),p=xd(c,tv.readOnly),h=xd(c,tv.open),g=xd(c,tv.selectedValue),m=xd(c,tv.hasSelectionChips),v=Wm();let y=!1;y="none"===d?""!==v:"single"===d?null!=g:m;const b=u||f||o,{buttonRef:w,getButtonProps:S}=Uv({native:i,disabled:b}),{mounted:_,transitionStatus:x,setMounted:C}=Jg(y),E={disabled:b,visible:y,open:h,transitionStatus:x};nm({open:y,ref:c.state.clearRef,onComplete(){y||C(!1)}});const R=jh("button",e,{state:E,ref:[t,w,c.state.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(e){e.preventDefault()},onClick(e){var t;if(b||p)return;const n=c.state.keyboardActiveRef;c.state.setInputValue("",dp(np,e.nativeEvent)),"none"!==d?(c.state.setSelectedValue(Array.isArray(g)?[]:null,dp(np,e.nativeEvent)),c.state.setIndices({activeIndex:null,selectedIndex:null,type:n.current?"keyboard":"pointer"})):c.state.setIndices({activeIndex:null,type:n.current?"keyboard":"pointer"}),null===(t=c.state.inputRef.current)||void 0===t||t.focus()}},a,S],stateAttributesMapping:$y});return l||_?R:null})),Wy=Zt((function(e,t){const{className:n,render:r,orientation:o="horizontal",style:i,...l}=e;return jh("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},l]})}));function By(e){return jo("svg",{fill:"currentcolor",width:"10",height:"10",viewBox:"0 0 10 10",...e,children:jo("path",{d:"M9.1603 1.12218C9.50684 1.34873 9.60427 1.81354 9.37792 2.16038L5.13603 8.66012C5.01614 8.8438 4.82192 8.96576 4.60451 8.99384C4.3871 9.02194 4.1683 8.95335 4.00574 8.80615L1.24664 6.30769C0.939709 6.02975 0.916013 5.55541 1.19372 5.24822C1.47142 4.94102 1.94536 4.91731 2.2523 5.19524L4.36085 7.10461L8.12299 1.33999C8.34934 0.993152 8.81376 0.895638 9.1603 1.12218Z"})})}function Hy(e){return jo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[jo("path",{d:"M18 6L6 18"}),jo("path",{d:"M6 6l12 12"})]})}function Uy(e){return jo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:jo("path",{d:"M6 9l6 6 6-6"})})}function Gy(e){return jo("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",...e,children:[jo("circle",{cx:"6",cy:"6",r:"4.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),jo("path",{d:"M9.5 9.5L12.5 12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function Zy(e){return String(e)}function Ky(e,t=0,n){const r=[];for(const o of e)r.push({...o,level:t,parentValue:n}),o.children&&o.children.length>0&&r.push(...Ky(o.children,t+1,o.value));return r}function Jy(e,t){const n=new Set,r=t.get(e);if(!r)return n;for(const e of r)n.add(e),Jy(e,t).forEach((e=>{n.add(e)}));return n}function Yy(e,t,n){const r=t.find((t=>Zy(t.value)===Zy(e.value)));if(!r||void 0===r.parentValue)return!1;let o=Zy(r.parentValue);const i=new Map(t.map((e=>[Zy(e.value),void 0===e.parentValue?void 0:Zy(e.parentValue)])));for(;void 0!==o;){if(n.has(o))return!0;o=i.get(o)}return!1}function Xy(e,t){const n=new Set(e.map((e=>Zy(e.value)))),r=new Set;for(const e of n)Jy(e,t).forEach((e=>{r.add(e)}));return e.filter((e=>!r.has(Zy(e.value))))}function Qy(e,t){var n;return null==e||null===(n=e[t])||void 0===n?void 0:n.items}function eb({options:e,filterCounts:t,value:n,multiple:r=!1,includeChildren:o=!1}){const i=Ct((()=>Ky(e)),[e]),l=Ct((()=>i.some((e=>e.level>0))),[i]),s=Ct((()=>function(e){const t=new Map;for(const r of e){var n;if(void 0===r.parentValue)continue;const e=Zy(r.parentValue),o=Zy(r.value),i=null!==(n=t.get(e))&&void 0!==n?n:new Set;i.add(o),t.set(e,i)}return t}(i)),[i]),a=Ct((()=>function(e,t){if(!t)return e;const n=function(e){const t=new Map;for(const n of e)t.set(Zy(n.value),n.count);return t}(t);return e.map((e=>{var t;return{...e,count:null!==(t=n.get(Zy(e.value)))&&void 0!==t?t:0}}))}(i.map((e=>({value:e.value,label:bi(e.label),level:e.level}))),t)),[i,t]),u=Ct((()=>function(e){if(!e)return new Set;const t=Array.isArray(e)?e:[e];return new Set(t.filter((e=>["string","number","boolean"].includes(typeof e))).map(Zy))}(n)),[n]),c=Ct((()=>r?function(e,t){return e.some((e=>void 0!==e.count))?e.filter((e=>!!t.has(Zy(e.value))||void 0===e.count||0!==e.count)):e}(a,u):function(e){return e.some((e=>void 0!==e.count))?e.filter((e=>void 0===e.count||e.count>0)):e}(a)),[a,u,r]),d=Ct((()=>o&&0!==u.size?c.map((e=>({...e,coveredBySelectedAncestor:Yy(e,i,u)}))):c),[o,u,c,i]),f=Ct((()=>0===u.size?[]:d.filter((e=>u.has(Zy(e.value))))),[u,d]),p=Ct((()=>r?l?function(e,t,n){if(0===n.size)return e;const r=new Map(e.map((e=>[Zy(e.value),e]))),o=new Map(t.map((e=>[Zy(e.value),void 0===e.parentValue?void 0:Zy(e.parentValue)]))),i=new Set;for(const t of e){const e=Zy(t.value);if(!n.has(e))continue;let l=e,s=o.get(l);for(;void 0!==s;
1)l=s,s=o.get(l);r.has(l)?i.add(l):i.add(e)}if(0===i.size)return e;const l=e=>{const t=Zy(e.value);let n=t,i=o.get(n);for(;void 0!==i;)n=i,i=o.get(n);return r.has(n)?n:t},s=[],a=[],u=new Set(e.map((e=>Zy(e.value))));for(const e of t){const t=Zy(e.value);if(!u.has(t))continue;const n=r.get(t);n&&(i.has(l(n))?s.push(n):a.push(n))}const c=new Set([...s,...a].map((e=>Zy(e.value)))),d=e.filter((e=>!c.has(Zy(e.value))));return[...s,...a,...d]}(d,i,u):function(e,t){return[...e.filter((e=>t.has(Zy(e.value)))),...e.filter((e=>!t.has(Zy(e.value))))]}(d,u):d),[d,r,l,i,u]),h=Ct((()=>!r||o||l?-1:f.length),[r,o,l,f.length]),g=r&&!o&&!l&&f.length>0&&p.length>f.length;return{items:d,sortedItems:p,selectedValues:u,selectedItems:f,flatOptions:i,childrenByParentKey:s,firstUnselectedIndex:h,showSeparator:g}}function tb({className:e="barn2-multiselect-separator"}){return jo("div",{className:e,role:"separator","aria-hidden":"true"})}function nb({item:e,className:t="barn2-select-item-text",prefixClassName:n="barn2-select-hierarchy-prefix",countClassName:r="barn2-select-item-count",showCounts:o=!0}){return jo("div",{className:t,children:[e.level>0&&jo("span",{className:n,"aria-hidden":"true",children:[(i=e.level,"—".repeat(i))," "]}),jo("span",{children:e.label}),o&&void 0!==e.count&&jo("span",{className:r,children:["(",e.count,")"]})]});var i}const rb=({filter:e,value:t,onChange:n,disabled:r=!1,filterCounts:o,showCounts:i=!0})=>{const l=kt(),{displayMode:s,i18n:a}=xi(),u=bi(e.name),{items:c,selectedItems:d}=eb({options:e.options,filterCounts:o,value:t,multiple:!1}),f=d.length>0?d[0]:null,p=c.length>9;return jo("div",{className:"select-filter-wrapper",style:r?{pointerEvents:"none"}:void 0,children:jo(kv,{items:c,value:f,onValueChange:Et((e=>{n(null==e?null:e.value)}),[n]),itemToStringLabel:Et((e=>e?e.label||String(e.value):""),[]),children:[jo("div",{className:"select-label",children:jo("div",{className:"select-display-wrapper",children:[jo(Yv,{className:"select-display-trigger","aria-label":a.selectFilter({filterName:u}),children:jo("span",{className:"select-display-text",children:f?f.label:u})}),jo("div",{className:"select-action-buttons",children:[f&&jo(jy,{className:"select-clear","aria-label":a.clearSelection,children:jo(Hy,{className:"select-clear-icon"})}),jo(Uy,{className:"select-trigger-icon"})]})]})}),jo(sy,{children:jo(Iy,{className:"barn2-select-positioner",positionMethod:"fixed",sideOffset:4,children:jo(Py,{className:"barn2-select-popup","data-display-mode":s,children:[p&&jo("div",{className:"barn2-select-popup-input-wrapper",children:[jo(Gy,{className:"barn2-select-search-icon"}),jo(Kv,{id:l,className:"barn2-select-popup-input",placeholder:a.searchFilterPlaceholder({filterName:u}),"aria-label":a.searchFilter({filterName:u})})]}),jo(qy,{className:"barn2-select-empty",children:a.noResultsFound}),jo(iy,{className:"barn2-select-list",children:e=>jo(Dy,{value:e,className:"barn2-select-item",children:[jo(Ly,{className:"barn2-select-item-indicator",children:jo(By,{"aria-hidden":"true",className:"barn2-select-item-indicator-icon"})}),jo(nb,{item:e,showCounts:i})]},String(e.value))})]})})})]},f?String(f.value):"empty")})},ob=({filter:e,value:t,onChange:n,disabled:r=!1,filterCounts:o,showCounts:i=!0})=>{const{displayMode:l,i18n:s}=xi(),a=bi(e.name),u=!0===e.hierarchical&&!0===e.includeChildren,{sortedItems:c,selectedItems:d,childrenByParentKey:f,firstUnselectedIndex:p,showSeparator:h}=eb({options:e.options,filterCounts:o,value:t,multiple:!0,includeChildren:u}),g=c.length>9;return jo("div",{className:"select-filter-wrapper multiselect",style:r?{pointerEvents:"none"}:void 0,children:jo(kv,{multiple:!0,items:c,value:d,onValueChange:Et((e=>{if(e&&0!==e.length){const t=u?Xy(e,f):e;n(t.map((e=>e.value)))}else n(null)}),[n,u,f]),itemToStringLabel:Et((e=>e?e.label||String(e.value):""),[]),children:[jo("div",{className:"multiselect-display-wrapper",children:[jo(Yv,{className:"multiselect-trigger","aria-label":`${a} filter`,children:jo("span",{className:"multiselect-display-text",children:[a,d.length>0&&jo("span",{className:"multiselect-count-badge",children:["(",d.length,")"]})]})}),jo("div",{className:"multiselect-actions",children:[d.length>0&&jo(jy,{className:"select-clear","aria-label":s.clearAllSelections,children:jo(Hy,{className:"select-clear-icon"})}),jo(Uy,{className:"select-trigger-icon"})]})]}),jo(sy,{children:jo(Iy,{className:"barn2-select-positioner",positionMethod:"fixed",sideOffset:4,children:jo(Py,{className:"barn2-select-popup barn2-multiselect-popup","data-display-mode":l,children:[g&&jo("div",{className:"barn2-select-popup-input-wrapper",children:[jo(Gy,{className:"barn2-select-search-icon"}),jo(Kv,{className:"barn2-select-popup-input",placeholder:s.searchFilterPlaceholder({filterName:a}),"aria-label":s.searchFilter({filterName:a})})]}),jo(qy,{className:"barn2-select-empty",children:s.noResultsFound}),jo(iy,{className:"barn2-select-list barn2-multiselect-list",children:(e,t)=>jo(Ae,{children:[t.index===p&&h&&jo(tb,{}),jo(Dy,{value:e,disabled:e.coveredBySelectedAncestor,"data-covered-selected":!!e.coveredBySelectedAncestor||void 0,className:"barn2-select-item barn2-multiselect-item",children:[jo("div",{className:"barn2-filter-checkbox",children:e.coveredBySelectedAncestor?jo(By,{}):jo(Ly,{children:jo(By,{})})}),jo(nb,{item:e,showCounts:i})]},String(e.value))]})})]})})})]})})},ib=({onReset:e,hasActiveFilters:t,label:n,className:r})=>{const{i18n:o}=xi(),i=bi(null!=n?n:o.resetFilters);return t?jo("button",{type:"button",onClick:e,className:ri("filter-reset-btn",r),"aria-label":i,title:i,children:[jo("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"filter-reset-icon","aria-hidden":"true",children:[jo("circle",{cx:"6",cy:"19",r:"3"}),jo("path",{d:"M9 19h8.5c.4 0 .9-.1 1.3-.2"}),jo("path",{d:"M5.2 5.2A3.5 3.53 0 0 0 6.5 12H12"}),jo("path",{d:"m2 2 20 20"}),jo("path",{d:"M21 15.3a3.5 3.5 0 0 0-3.3-3.3"}),jo("path",{d:"M15 5h-4.3"}),jo("circle",{cx:"18",cy:"5",r:"3"})]}),jo("span",{children:o.reset})]}):null},lb=()=>jo("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[jo("path",{d:"M18 6 6 18"}),jo("path",{d:"m6 6 12 12"})]}),sb=({filters:e,search:t,filterConfigs:n,onRemoveFilter:r,onClearSearch:o,className:i})=>{const{i18n:l}=xi(),s=function(e){const t=new Map;for(const n of e){const e=Ky(n.options);for(const n of e)t.set(Zy(n.value),bi(n.label))}return t}(n),a=function(e,t,n,r){const o=[];t.query&&t.query.trim().length>0&&o.push({id:"search",label:r.activeSearch({query:t.query}),type:"search"});for(const t of e){const e=Array.isArray(t.value)?t.value:[t.value];for(const r of e){const e=n.get(Zy(r))||String(r);o.push({id:`${t.id}-${r}`,label:e,type:"filter",filterId:t.id,value:r})}}return o}(e,t,s,l);return 0===a.length?null:jo("div",{className:ri("active-filters",i),children:a.map((e=>jo("span",{className:ri("active-filter-badge","search"===e.type&&"active-filter-badge--search"),children:[jo("span",{className:"active-filter-badge-label",children:e.label}),jo("button",{type:"button",onClick:()=>(e=>{"search"===e.type?o():e.filterId&&void 0!==e.value&&r(e.filterId,e.value)})(e),className:"active-filter-badge-remove","aria-label":l.removeActiveItem({label:e.label}),children:jo(lb,{})})]},e.id)))})},ab=rt(null),ub=rt(null);function cb(){const e=Rt(ab);if(null===e)throw new Error(rd(60));return e}function db(){const e=Rt(ub);if(null===e)throw new Error(rd(61));return e}const fb={id:od((e=>e.id)),labelId:od((e=>e.labelId)),modal:od((e=>e.modal)),multiple:od((e=>e.multiple)),items:od((e=>e.items)),itemToStringLabel:od((e=>e.itemToStringLabel)),itemToStringValue:od((e=>e.itemToStringValue)),isItemEqualToValue:od((e=>e.isItemEqualToValue)),value:od((e=>e.value)),hasSelectedValue:od((e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return null!=t&&(n&&Array.isArray(t)?t.length>0:""!==Qm(t,r))})),hasNullItemLabel:od(((e,t)=>!!t&&Ym(e.items))),open:od((e=>e.open)),mounted:od((e=>e.mounted)),forceMount:od((e=>e.forceMount)),transitionStatus:od((e=>e.transitionStatus)),openMethod:od((e=>e.openMethod)),activeIndex:od((e=>e.activeIndex)),selectedIndex:od((e=>e.selectedIndex)),isActive:od(((e,t)=>e.activeIndex===t)),isSelected:od(((e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some((e=>Hm(t,e,n))):Hm(t,r,n)})),isSelectedByFocus:od(((e,t)=>e.selectedIndex===t)),popupProps:od((e=>e.popupProps)),triggerProps:od((e=>e.triggerProps)),triggerElement:od((e=>e.triggerElement)),positionerElement:od((e=>e.positionerElement)),listElement:od((e=>e.listElement)),popupSide:od((e=>e.popupSide)),scrollUpArrowVisible:od((e=>e.scrollUpArrowVisible)),scrollDownArrowVisible:od((e=>e.scrollDownArrowVisible)),hasScrollArrows:od((e=>e.hasScrollArrows))};function pb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function hb(e,t){return Math.max(0,e-t)}function gb(e){var t,n;const{id:r,value:o,defaultValue:i=null,onValueChange:l,open:s,defaultOpen:a=!1,onOpenChange:u,name:c,form:d,autoComplete:f,disabled:p=!1,readOnly:h=!1,required:g=!1,modal:m=!0,actionsRef:v,inputRef:y,onOpenChangeComplete:b,items:w,multiple:S=!1,itemToStringLabel:_,itemToStringValue:x,isItemEqualToValue:C=Bm,highlightItemOnHover:E=!0,children:R}=e,{clearErrors:I}=dv(),{setDirty:k,setTouched:P,setFocused:O,validityData:M,setFilled:T,name:A,disabled:N,validation:F,validationMode:z}=av(),D=gv({id:r}),L=N||p,V=null!=A?A:c,[q,$]=Lc({controlled:o,default:S?null!=i?i:Id:i,name:"Select",state:"value"}),[j,W]=Lc({controlled:s,default:a,name:"Select",state:"open"}),B=_t([]),H=_t([]),U=_t(null),G=_t(null),Z=_t(0),K=_t(null),J=_t([]),Y=_t(!1),X=_t(null),Q=_t(null),ee=_t({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),te=_t(!1),{mounted:ne,setMounted:re,transitionStatus:oe}=Jg(j),{openMethod:ie,triggerProps:le}=Sv(j),se=Wc((()=>new Ed({id:D,labelId:void 0,modal:m,multiple:S,itemToStringLabel:_,itemToStringValue:x,isItemEqualToValue:C,value:q,open:j,mounted:ne,transitionStatus:oe,items:w,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1}))).current,ae=xd(se,fb.activeIndex),ue=xd(se,fb.selectedIndex),ce=xd(se,fb.triggerElement),de=xd(se,fb.positionerElement),fe=function(e){const[t,n]=yt({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}(ie),pe=null!==(t=null!=ie?ie:fe)&&void 0!==t?t:null,he=Ct((()=>S?"":Qm(q,x)),[S,q,x]),ge=Ct((()=>S&&Array.isArray(q)?q.map((e=>Qm(e,x))):Qm(q,x)),[S,q,x]),me=Xc(se.state.triggerElement),ve=Uc((()=>ge));uv(me,D,q,ve,!L,c);const ye=_t(q),be=S?Array.isArray(q)&&q.length>0:null!=q&&""!==Qm(q,x);Vc((()=>{q!==ye.current&&se.set("forceMount",!0)}),[se,q]),Vc((()=>{T(be)}),[be,T]),Vc((function(){const e=J.current;let t;if(S){const n=Array.isArray(q)?q:[];
1if(0===n.length)t=null;else{const r=Gm(e,n[n.length-1],C);t=-1===r?null:r}}else{const n=Gm(e,q,C);t=-1===n?null:n}null===t&&(Q.current=null),j||se.set("selectedIndex",t)}),[be,S,j,q,J,C,se,Q]),wv(q,(()=>{I(V),k(function(e){const t=M.initialValue;return Array.isArray(e)&&Array.isArray(t)?!_v(e,t,((e,t)=>Hm(e,t,C))):e!==t}(q)),F.change(q)}));const we=Uc(((e,t)=>{null==u||u(e,t),t.isCanceled||(W(e),e||t.reason!==ip&&t.reason!==Qf||(P(!0),O(!1),"onBlur"===z&&F.commit(q)))})),Se=Uc((()=>{re(!1),se.update({activeIndex:null,openMethod:null}),null==b||b(!1)}));nm({enabled:!v,open:j,ref:U,onComplete(){j||Se()}}),xt(v,(()=>({unmount:Se})),[Se]);const _e=Uc(((e,t)=>{null==l||l(e,t),t.isCanceled||$(e)})),xe=Uc((()=>{const e=se.state.listElement||U.current;if(!e)return;const t=hb(e.scrollHeight,e.clientHeight),n=function(e,t){if(t<=0)return 0;const n=pb(e,0,t),r=t-n,o=n<=1,i=r<=1;return o&&i?n<=r?0:t:o?0:i?t:n}(e.scrollTop,t),r=n>0,o=n<t;se.state.scrollUpArrowVisible!==r&&se.set("scrollUpArrowVisible",r),se.state.scrollDownArrowVisible!==o&&se.set("scrollDownArrowVisible",o)})),Ce=gm({open:j,onOpenChange:we,elements:{reference:ce,floating:de}}),Ee=hg(Ce,{enabled:!h&&!L,event:"mousedown"}),Re=mg(Ce),Ie=Rm(Ce,{enabled:!h&&!L,listRef:B,activeIndex:ae,selectedIndex:ue,disabledIndices:Id,onNavigate(e){(null!==e||j)&&se.set("activeIndex",e)},focusItemOnHover:E}),ke=Im(Ce,{enabled:!h&&!L&&(j||!S),listRef:H,activeIndex:ae,selectedIndex:ue,disabledIndices:e=>{return null==(t=B.current[e])||t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled");var t},onMatch(e){j?se.set("activeIndex",e):_e(J.current[e],dp("none"))},onTyping(e){Y.current=e}}),Pe=Ct((()=>{const e=Mh(ke.reference,Ie.reference,Re.reference,Ee.reference,le);return D&&(e.id=D),e}),[Ee.reference,ke.reference,Ie.reference,Re.reference,le,D]),Oe=Ct((()=>Mh(rm,ke.floating,Ie.floating,Re.floating)),[ke.floating,Ie.floating,Re.floating]),Me=null!==(n=Ie.item)&&void 0!==n?n:kd;qc((()=>{se.update({popupProps:Oe,triggerProps:Pe})})),Vc((()=>{se.update({id:D,modal:m,multiple:S,value:q,open:j,mounted:ne,transitionStatus:oe,popupProps:Oe,triggerProps:Pe,items:w,itemToStringLabel:_,itemToStringValue:x,isItemEqualToValue:C,openMethod:pe})}),[se,D,m,S,q,j,ne,oe,Oe,Pe,w,_,x,C,pe]);const Te=Ct((()=>({store:se,name:V,required:g,disabled:L,readOnly:h,multiple:S,highlightItemOnHover:E,setValue:_e,setOpen:we,listRef:B,popupRef:U,scrollHandlerRef:G,handleScrollArrowVisibility:xe,scrollArrowsMountedCountRef:Z,itemProps:Me,valueRef:K,valuesRef:J,labelsRef:H,typingRef:Y,selectionRef:ee,firstItemTextRef:X,selectedItemTextRef:Q,validation:F,onOpenChangeComplete:b,alignItemWithTriggerActiveRef:te,initialValueRef:ye})),[se,V,g,L,h,S,E,_e,we,Me,F,b,xe]),Ae=Kc(y,F.inputRef),Ne=S&&Array.isArray(q)&&q.length>0,Fe=S?void 0:V,ze=Ct((()=>S&&Array.isArray(q)&&V?q.map((e=>{const t=Qm(e,x);return Zo.jsx("input",{type:"hidden",form:d,name:V,value:t,disabled:L},t)})):null),[S,q,d,V,x,L]);return Zo.jsx(ab.Provider,{value:Te,children:Zo.jsxs(ub.Provider,{value:Ce,children:[R,Zo.jsx("input",{...F.getValidationProps(L,{onFocus(){var e;null===(e=se.state.triggerElement)||void 0===e||e.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||L||h)return;const t=e.currentTarget.value,n=dp(Kf,e.nativeEvent);se.set("forceMount",!0),queueMicrotask((function(){if(S)return;const e=t.toLowerCase();let r=J.current.findIndex((t=>Qm(t,x).toLowerCase()===e||Xm(t,_).toLowerCase()===e));-1===r&&(r=J.current.findIndex(((t,n)=>{const r=H.current[n];return null!=r&&r.toLowerCase()===e})));const o=-1===r?void 0:J.current[r];null!=o&&_e(o,n)}))}}),id:D&&null==Fe?`${D}-hidden-input`:void 0,form:d,name:Fe,autoComplete:f,value:he,disabled:L,required:g&&!Ne,readOnly:h,ref:Ae,style:V?nd:td,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ze]})})}const mb={...Lv,...iv,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},vb=Zt((function(e,t){var n,r;const{render:o,className:i,id:l,disabled:s=!1,nativeButton:a=!0,style:u,...c}=e,{setTouched:d,setFocused:f,validationMode:p,state:h,disabled:g}=av(),{labelId:m}=hv(),{store:v,setOpen:y,selectionRef:b,validation:w,readOnly:S,required:_,alignItemWithTriggerActiveRef:x,disabled:C}=cb(),E=g||C||s,R=xd(v,fb.open),I=xd(v,fb.mounted),k=xd(v,fb.value),P=xd(v,fb.triggerProps),O=xd(v,fb.positionerElement),M=xd(v,fb.listElement),T=xd(v,fb.popupSide),A=xd(v,fb.id),N=xd(v,fb.labelId),F=xd(v,fb.hasSelectedValue),z=I&&O?T:null,D=null!=l?l:A,L=Pv(m,N);
1gv({id:D});const V=Xc(O),q=_t(null),{getButtonProps:$,buttonRef:j}=Uv({disabled:E,native:a}),W=Uc((e=>{v.set("triggerElement",e)})),B=df(),H=df(),U=df();wt((()=>{if(R)return U.start(400,(()=>{b.current.allowUnselectedMouseUp=!0,b.current.allowSelectedMouseUp=!0})),()=>{U.clear()};b.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},H.clear()}),[R,b,H,U]);const G=Mh(P,{id:D,role:"combobox","aria-expanded":R?"true":"false","aria-haspopup":"listbox","aria-controls":R?null!==(n=null==M?void 0:M.id)&&void 0!==n?n:null===(r=Hf(O))||void 0===r?void 0:r.id:void 0,"aria-labelledby":L,"aria-readonly":S||void 0,"aria-required":_||void 0,tabIndex:E?-1:0,onFocus(e){f(!0),R&&x.current&&y(!1,dp(Kf,e.nativeEvent)),B.start(0,(()=>{v.set("forceMount",!0)}))},onBlur(e){Vf(O,e.relatedTarget)||(d(!0),f(!1),"onBlur"===p&&w.commit(k))},onMouseDown(e){if(R)return;const t=tf(e.currentTarget);function n(e){if(!q.current)return;const t=e.target;if(Vf(q.current,t)||Vf(V.current,t))return;const n=Jv(q.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||y(!1,dp(ap,e))}H.start(0,(()=>{t.addEventListener("mouseup",n,{once:!0})}))}},c,$),Z=w.getValidationProps(E,G);Z.role="combobox";const K={...h,open:R,disabled:E,value:k,readOnly:S,popupSide:z,placeholder:!F};return jh("button",e,{ref:[t,q,j,W],state:K,stateAttributesMapping:mb,props:Z})})),yb={value:()=>null},bb=Zt((function(e,t){const{className:n,render:r,children:o,placeholder:i,style:l,...s}=e,{store:a,valueRef:u}=cb(),c=xd(a,fb.value),d=xd(a,fb.items),f=xd(a,fb.itemToStringLabel),p=xd(a,fb.hasSelectedValue),h=!p&&null!=i&&null==o,g=xd(a,fb.hasNullItemLabel,h),m={value:c,placeholder:!p};let v=null;return v="function"==typeof o?o(c):null!=o?o:p||null==i||g?Array.isArray(c)?function(e,t,n){return e.reduce(((e,r,o)=>(o>0&&e.push(", "),e.push(Zo.jsx(Ae,{children:ev(r,t,n)},o)),e)),[])}(c,d,f):ev(c,d,f):i,jh("span",e,{state:m,ref:[t,u],props:[{children:v},s],stateAttributesMapping:yb})})),wb=Zt((function(e,t){const{render:n,className:r,style:o,...i}=e,{store:l}=cb();return jh("span",e,{state:{open:xd(l,fb.open)},ref:t,props:[{"aria-hidden":!0,children:"▼"},i],stateAttributesMapping:Dv})})),Sb=rt(void 0),_b=Zt((function(e,t){const{store:n}=cb(),r=xd(n,fb.mounted),o=xd(n,fb.forceMount);return r||o?Zo.jsx(Sb.Provider,{value:!0,children:Zo.jsx(Yh,{ref:t,...e})}):null})),xb=rt(void 0);function Cb(e,t){e&&Object.assign(e.style,t)}const Eb={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Rb={position:"fixed"},Ib=Zt((function(e,t){const{anchor:n,positionMethod:r="absolute",className:o,render:i,side:l="bottom",align:s="center",sideOffset:a=0,alignOffset:u=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:h,alignItemWithTrigger:g=!0,collisionAvoidance:m=Hh,style:v,...y}=e,{store:b,listRef:w,labelsRef:S,alignItemWithTriggerActiveRef:_,selectedItemTextRef:x,valuesRef:C,initialValueRef:E,popupRef:R,setValue:I}=cb(),k=db(),P=xd(b,fb.open),O=xd(b,fb.mounted),M=xd(b,fb.modal),T=xd(b,fb.value),A=xd(b,fb.openMethod),N=xd(b,fb.positionerElement),F=xd(b,fb.triggerElement),z=xd(b,fb.isItemEqualToValue),D=xd(b,fb.transitionStatus),L=_t(null),V=_t(null),[q,$]=yt(g),j=O&&q&&"touch"!==A;O||q===g||$(g),Vc((()=>{O||(fb.scrollUpArrowVisible(b.state)&&b.set("scrollUpArrowVisible",!1),fb.scrollDownArrowVisible(b.state)&&b.set("scrollDownArrowVisible",!1))}),[b,O]),xt(_,(()=>j)),Ry((j||M)&&P,"touch"===A,N,F);const W=my({anchor:n,floatingRootContext:k,positionMethod:r,mounted:O,side:l,sideOffset:a,align:s,alignOffset:u,arrowPadding:f,collisionBoundary:c,collisionPadding:d,sticky:p,disableAnchorTracking:null!=h?h:j,collisionAvoidance:m,keepMounted:!0}),B=j?"none":W.side,H=j?Rb:W.positionerStyles,U={open:P,side:B,align:W.align,anchorHidden:W.anchorHidden};Vc((()=>{b.set("popupSide",W.side)}),[b,W.side]);const G=Uc((e=>{b.set("positionerElement",e)})),Z=wy(e,U,{styles:H,transitionStatus:D,props:y,refs:[t,G],hidden:!O,inert:!P}),K=_t(0),J=Uc((e=>{if(0===e.size&&0===K.current)return;if(0===C.current.length)return;const t=K.current;if(K.current=e.size,e.size===t)return;const n=dp(Kf);if(0!==t&&!b.state.multiple&&null!==T&&-1===Gm(C.current,T,z)){const e=E.current,t=null!=e&&-1!==Gm(C.current,e,z)?e:null;I(t,n),null===t&&(b.set("selectedIndex",null),x.current=null)}if(0!==t&&b.state.multiple&&Array.isArray(T)){const e=e=>-1!==Gm(C.current,e,z),t=T.filter((t=>e(t)));(t.length!==T.length||t.some((e=>!Um(T,e,z))))&&(I(t,n),0===t.length&&(b.set("selectedIndex",null),x.current=null))}if(P&&j){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const e={height:""};Cb(N,e),Cb(R.current,e)}})),Y=Ct((()=>({...W,side:B,alignItemWithTriggerActive:j,setControlledAlignItemWithTrigger:$,scrollUpArrowRef:L,scrollDownArrowRef:V})),[W,B,j,$]);return Zo.jsx(ty,{elementsRef:w,labelsRef:S,onMapChange:J,children:Zo.jsxs(xb.Provider,{value:Y,children:[O&&M&&Zo.jsx(yy,{inert:ay(!P),cutout:F}),Z]})})})),kb="base-ui-disable-scrollbar",Pb=kb,Ob=e=>Zo.jsx("style",{nonce:e,href:kb,precedence:"base-ui:low",children:`.${kb}{scrollbar-width:none}.${kb}::-webkit-scrollbar{display:none}`}),Mb=rt(void 0);function Tb(e){return Rt(Mb)}const Ab=new Set(["ArrowLeft","ArrowRight"]),Nb=new Set(["ArrowUp","ArrowDown"]),Fb=new Set([...Ab,...Nb]),zb=new Set([...Fb,"Home","End"]),Db=rt(void 0),Lb={disableStyleElements:!1},Vb={...Vv,...em},qb=Zt((function(e,t){const{render:n,className:r,style:o,finalFocus:i,...l}=e,{store:s,popupRef:a,onOpenChangeComplete:u,setOpen:c,valueRef:d,firstItemTextRef:f,selectedItemTextRef:p,multiple:h,handleScrollArrowVisibility:g,scrollHandlerRef:m,listRef:v,highlightItemOnHover:y}=cb(),{side:b,align:w,alignItemWithTriggerActive:S,isPositioned:_,setControlledAlignItemWithTrigger:x}=function(){const e=Rt(xb);if(!e)throw new Error(rd(59));return e}(),C=null!=Tb(),E=db(),R=Rv(),{nonce:I,disableStyleElements:k}=null!==(P=Rt(Db))&&void 0!==P?P:Lb;var P;const O=xd(s,fb.id),M=xd(s,fb.open),T=xd(s,fb.openMethod),A=xd(s,fb.mounted),N=xd(s,fb.popupProps),F=xd(s,fb.transitionStatus),z=xd(s,fb.triggerElement),D=xd(s,fb.positionerElement),L=xd(s,fb.listElement),V=_t(!1),q=_t(!1),$=_t({}),j=uf(),W=Uc((e=>{if(!D||!a.current||!q.current)return;if(V.current||!S)return void g();const t="0px"===D.style.top,n="0px"===D.style.bottom;if(!t&&!n)return void g();const r=Wb(D),o=Bb(D.getBoundingClientRect().height,"y",r),i=tf(D),l=Td(D),s=l.getComputedStyle(D),u=parseFloat(s.marginTop),c=parseFloat(s.marginBottom),d=$b(l.getComputedStyle(a.current)),f=Math.min(i.documentElement.clientHeight-u-c,d),p=e.scrollTop,h=jb(e);let m=0,v=null,y=!1,b=!1;const w=e=>{D.style.height=`${e}px`},_=t?h-p:p,x=Math.min(o+_,f);if(m=x,_<=1)((t,n)=>{const r=pb(t,0,f-o);r>0&&w(o+r),e.scrollTop=n,f-(o+r)<=1&&(V.current=!0),g()})(_,t?h:0);else{if(f-x>1?t?b=!0:v=0:(y=!0,n&&p<h&&(v=p-(_-(o+_-f)))),m=Math.ceil(m),0!==m&&w(m),b||null!=v){const t=jb(e),n=b?t:pb(v,0,t);Math.abs(e.scrollTop-n)>1&&(e.scrollTop=n)}(y||m>=f-1)&&(V.current=!0),g()}}));xt(m,(()=>W),[W]),nm({open:M,ref:a,onComplete(){M&&(null==u||u(!0))}});const B={open:M,transitionStatus:F,side:b,align:w};Vc((()=>{D&&a.current&&!Object.keys($.current).length&&($.current={top:D.style.top||"0",left:D.style.left||"0",right:D.style.right,height:D.style.height,bottom:D.style.bottom,minHeight:D.style.minHeight,maxHeight:D.style.maxHeight,marginTop:D.style.marginTop,marginBottom:D.style.marginBottom})}),[a,D]),Vc((()=>{M||S||(q.current=!1,V.current=!1,Cb(D,$.current))}),[M,S,D,a]),Vc((()=>{const e=a.current;if(!M||!z||!D||!e||S&&!_||"ending"===s.state.transitionStatus)return;if(!S)return q.current=!0,j.request(g),void e.style.removeProperty("--transform-origin");const t=function(e){const{style:t}=e,n={};for(const[e,r]of Ub)n[e]=t.getPropertyValue(e),t.setProperty(e,r,"important");return()=>{for(const[e]of Ub){const r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}(e);e.style.removeProperty("--transform-origin");try{var n,r,o;let t=p.current;var i;if(null===(n=t)||void 0===n||!n.isConnected)t=!fb.hasSelectedValue(s.state)&&null!==(i=f.current)&&void 0!==i&&i.isConnected?f.current:null;const l=d.current,a=Td(D),u=a.getComputedStyle(D),c=a.getComputedStyle(e),h=tf(z),m=Wb(z),b=Hb(z.getBoundingClientRect(),m),w=Hb(D.getBoundingClientRect(),m),S=b.height,_=L||e,C=_.scrollHeight,E=parseFloat(c.borderBottomWidth),I=parseFloat(u.marginTop)||10,k=parseFloat(u.marginBottom)||10,P=parseFloat(u.minHeight)||100,O=$b(c),M=5,T=5,A=20,N=h.documentElement.clientHeight-I-k,F=h.documentElement.clientWidth,j=N-b.bottom+S;let W,B="rtl"===R?b.right-w.width:b.left,H=0;if(t&&l){const e=Hb(l.getBoundingClientRect(),m);W=Hb(t.getBoundingClientRect(),m),B=w.left+("rtl"===R?e.right-W.right:e.left-W.left);
1const n=e.top-b.top+e.height/2;H=W.top-w.top+W.height/2-n}const U=j+H+k+E;let G=Math.min(N,U);const Z=N-I-k,K=U-G,J=F-T;D.style.left=`${pb(B,M,J-w.width)}px`,D.style.height=`${G}px`,D.style.maxHeight="none",D.style.marginTop=`${I}px`,D.style.marginBottom=`${k}px`,e.style.height="100%";const Y=jb(_),X=K>=Y-1;X&&(G=Math.min(N,w.height)-(K-Y));const Q=b.top<A||b.bottom>N-A||Math.ceil(G)+1<Math.min(C,P),ee=1!==(null!==(r=null===(o=a.visualViewport)||void 0===o?void 0:o.scale)&&void 0!==r?r:1)&&Cf;if(Q||ee)return q.current=!0,Cb(D,$.current),void x(!1);const te=Math.max(P,G);if(X){const e=Math.max(0,N-U);D.style.top=w.height>=Z?"0":`${e}px`,D.style.height=`${G}px`,_.scrollTop=jb(_)}else D.style.bottom="0",_.scrollTop=K;if(W){const t=w.top,n=w.height,r=W.top+W.height/2,o=pb(n>0?(r-t)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(te===N||G>=O)&&(V.current=!0),g(),y&&null===s.state.selectedIndex&&null===s.state.activeIndex&&null!=v.current[0]&&s.set("activeIndex",0),q.current=!0}finally{t()}}),[s,M,D,z,d,f,p,a,g,S,x,j,L,v,y,R,_]),wt((()=>{if(S&&D&&M)return nf(Td(D),"resize",(function(e){c(!1,dp("window-resize",e))}))}),[c,S,D,M]);const H={...L?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":h||void 0,id:`${O}-list`},onKeyDown(e){C&&zb.has(e.key)&&e.stopPropagation()},onScroll(e){L||W(e.currentTarget)},...S&&{style:L?{height:"100%"}:Eb}},U=jh("div",e,{ref:[t,a],state:B,stateAttributesMapping:Vb,props:[N,H,by(F),{className:!L&&S?Pb:void 0},l]});return Zo.jsxs(Ae,{children:[!k&&Ob(I),Zo.jsx(pg,{context:E,modal:!1,disabled:!A,openInteractionType:T,returnFocus:i,restoreFocus:!0,children:U})]})}));function $b(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function jb(e){return hb(e.scrollHeight,e.clientHeight)}function Wb(e){return zg.getScale(e)}function Bb(e,t,n){return e/n[t]}function Hb(e,t){return zp({x:Bb(e.x,"x",t),y:Bb(e.y,"y",t),width:Bb(e.width,"x",t),height:Bb(e.height,"y",t)})}const Ub=[["transform","none"],["scale","1"],["translate","0 0"]],Gb=rt(void 0),Zb=Ht(Zt((function(e,t){const{render:n,className:r,style:o,value:i=null,label:l,disabled:s=!1,nativeButton:a=!1,...u}=e,c=_t(null),d=My({label:l,textRef:c,indexGuessBehavior:Oy.GuessFromOrder}),{store:f,itemProps:p,setOpen:h,setValue:g,selectionRef:m,typingRef:v,valuesRef:y,multiple:b,selectedItemTextRef:w,disabled:S,readOnly:_}=cb(),x=xd(f,fb.isActive,d.index),C=xd(f,fb.open),E=xd(f,fb.isSelected,i),R=xd(f,fb.isSelectedByFocus,d.index),I=xd(f,fb.isItemEqualToValue),k=d.index,P=-1!==k,O=_t(null);Vc((()=>{if(!P)return;const e=y.current;return e[k]=i,()=>{delete e[k]}}),[P,k,i,y]),Vc((()=>{if(!P)return;const e=f.state.value;let t=e;b&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),void 0!==t&&Hm(i,t,I)&&(f.set("selectedIndex",k),c.current&&(w.current=c.current))}),[P,k,b,I,f,i,w]);const M=_t(null),T=_t("mouse"),A=_t(!1),{getButtonProps:N,buttonRef:F}=Uv({disabled:s,focusableWhenDisabled:!0,native:a,composite:!0}),z={disabled:s,selected:E,highlighted:x};function D(){m.current.dragY=0}const L={role:"option","aria-selected":E,tabIndex:C&&x?0:-1,onKeyDown(e){M.current=e.key,f.set("activeIndex",k)," "===e.key&&v.current&&e.preventDefault()},onClick(e){const t="click"===e.type&&"touch"!==T.current,n=e.nativeEvent.pointerType,r=t&&Pf(e.nativeEvent)&&(void 0!==n||x),o=t&&!r&&!A.current;A.current=!1,"keydown"===e.type&&null===M.current||s||"keydown"===e.type&&" "===M.current&&v.current||o||(M.current=null,function(e){if(S||_)return;const t=f.state.value;if(b){const n=Array.isArray(t)?t:[],r=E?Zm(n,i,I):[...n,i];g(r,dp(ep,e))}else g(i,dp(ep,e)),h(!1,dp(ep,e))}(e.nativeEvent))},onPointerEnter(e){T.current=e.pointerType},onPointerMove(e){if("mouse"===e.pointerType&&1===e.buttons){const t=m.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){T.current=e.pointerType,A.current=!0,D()},onMouseUp(){var e;if(D(),s||"touch"===T.current)return;if(A.current)return;const t=!m.current.allowSelectedMouseUp&&E,n=!m.current.allowUnselectedMouseUp&&!E;t||n||(A.current=!0,null===(e=O.current)||void 0===e||e.click(),A.current=!1)}},V=jh("div",e,{ref:[F,t,d.ref,O],state:z,props:[p,L,u,N]}),q=Ct((()=>({selected:E,index:k,textRef:c,selectedByFocus:R,hasRegistered:P})),[E,k,c,R,P]);return Zo.jsx(Gb.Provider,{value:q,children:V})}))),Kb=Ht(Zt((function(e,t){const{index:n,textRef:r,selectedByFocus:o,hasRegistered:i}=function(){const e=Rt(Gb);if(!e)throw new Error(rd(57));return e}(),{firstItemTextRef:l,selectedItemTextRef:s}=cb(),{render:a,className:u,style:c,...d}=e;return jh("div",e,{ref:[Et((e=>{e&&(i&&0===n&&(l.current=e),i&&o&&(s.current=e))}),[l,s,n,o,i]),t,r],props:d})}))),Jb=({pageSize:e,rowsPerPageOptions:t=[10,25,50,100],onPageSizeChange:n,className:r,disabled:o=!1})=>{const{displayMode:i,i18n:l}=xi(),s=Et((e=>-1===("number"==typeof e?e:parseInt(e,10))?l.all:String(e)),[l.all]),a=Et((e=>{if(null===e)return;const t=parseInt(e,10);isNaN(t)||n(t)}),[n]);return jo("div",{className:ri("per-page-selector",r),children:[jo("span",{className:"per
1-page-selector-label",children:l.show}),jo(gb,{value:String(e),onValueChange:a,disabled:o,children:[jo(vb,{className:"per-page-selector-trigger",children:[jo(bb,{children:t=>s(null!=t?t:e)}),jo(wb,{className:"per-page-selector-icon",children:jo(Uy,{})})]}),jo(_b,{children:jo(Ib,{className:"barn2-select-positioner",positionMethod:"fixed",sideOffset:4,alignItemWithTrigger:!1,children:jo(qb,{className:"barn2-select-popup per-page-popup","data-display-mode":i,children:t.map((e=>jo(Zb,{value:String(e),className:"barn2-select-item per-page-item",children:jo(Kb,{children:s(e)})},e)))})})})]}),jo("span",{className:"per-page-selector-label",children:l.perPage})]})},Yb=({currentPage:e,pageSize:t,totalRows:n,className:r,infiniteScrollMode:o=!1})=>{const{i18n:i}=xi(),{startRow:l,endRow:s}=Ct((()=>o?{startRow:t>0?1:0,endRow:t}:-1===t?{startRow:1,endRow:n}:{startRow:e*t+1,endRow:Math.min((e+1)*t,n)}),[e,t,n,o]);return 0===n?null:jo("div",{className:ri("document-count",r),children:jo("span",{className:"document-count-text",children:i.showingRangeOfTotal({start:l,end:s,total:n})})})},Xb=({currentPage:e,totalPages:t,paginationType:n="full_numbers",onPageChange:r,className:o,disabled:i=!1})=>{const{i18n:l}=xi(),s=Et((()=>["simple","simple_numbers","full","full_numbers"].includes(n)),[n]),a=Et((()=>["full","full_numbers"].includes(n)),[n]),u=Et((()=>["numbers","simple_numbers","full_numbers"].includes(n)),[n]),c=Et((()=>{const n=[];if(t<=7)for(let e=0;e<t;e++)n.push(e);else if(e<=2){for(let e=0;e<5;e++)n.push(e);n.push("..."),n.push(t-1)}else if(e>=t-3){n.push(0),n.push("...");for(let e=t-5;e<t;e++)n.push(e)}else{n.push(0),n.push("...");for(let t=e-1;t<=e+1;t++)n.push(t);n.push("..."),n.push(t-1)}return n}),[e,t]);return t<=1?null:jo("div",{className:ri("page-navigation",o),style:i?{pointerEvents:"none"}:void 0,children:jo("div",{className:"page-navigation-buttons",children:[a()&&jo("button",{type:"button",onClick:()=>r(0),disabled:0===e,className:"pagination-btn pagination-btn-first","aria-label":l.firstPage,children:jo("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jo("path",{d:"M11 12L7 8L11 4M5 12V4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),s()&&jo("button",{type:"button",onClick:()=>r(Math.max(e-1,0)),disabled:0===e,className:"pagination-btn pagination-btn-prev","aria-label":l.previousPage,children:jo("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jo("path",{d:"M10 12L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),u()&&jo("div",{className:"pagination-pages",children:c().map(((t,n)=>{if("..."===t)return jo("span",{className:"pagination-ellipsis",children:"…"},`ellipsis-${n}`);const o=t;return jo("button",{type:"button",onClick:()=>r(o),className:ri("pagination-btn","pagination-btn-page",o===e&&"pagination-btn-active"),"aria-label":l.page({page:o+1}),"aria-current":o===e?"page":void 0,children:o+1},o)}))}),s()&&jo("button",{type:"button",onClick:()=>r(Math.min(e+1,t-1)),disabled:e>=t-1,className:"pagination-btn pagination-btn-next","aria-label":l.nextPage,children:jo("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jo("path",{d:"M6 12L10 8L6 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),a()&&jo("button",{type:"button",onClick:()=>r(t-1),disabled:e>=t-1,className:"pagination-btn pagination-btn-last","aria-label":l.lastPage,children:jo("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jo("path",{d:"M5 12L9 8L5 4M11 4V12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})},Qb=({currentPage:e,pageSize:t,totalRows:n,rowsPerPageOptions:r=[10,25,50,100],onPageSizeChange:o,className:i,disabled:l=!1})=>{const{i18n:s}=xi(),a=-1===t?1:e*t+1,u=-1===t?n:Math.min((e+1)*t,n);return jo("div",{className:ri("pagination-controls-info",i),style:l?{pointerEvents:"none"}:void 0,children:[jo("span",{className:"pagination-controls-text",children:s.showingRangeToTotal({start:a,end:u,total:n})}),jo("select",{id:"page-size",value:t,onChange:e=>{const t=parseInt(e.target.value,10);o(t)},className:"pagination-controls-select",children:r.map((e=>jo("option",{value:e,children:-1===e?s.all:s.itemsPerPageOption({count:e})},e)))})]})},ew=()=>jo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jo("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),jo("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),jo("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),tw=()=>jo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jo("rect",{x:"3",y:"3",width:"7",height:"7"}),jo("rect",{x:"14",y:"3",width:"7",height:"7"}),jo("rect",{x:"3",y:"14",width:"7",height:"7"}),jo("rect",{x:"14",y:"14",width:"7",height:"7"})]}),nw=({currentView:e,onViewChange:t,className:n,disabled:r=!1})=>{const{i18n:o}=xi();return jo("div",{className:ri("view-switcher",n),children:[jo("button",{type:"button",onClick:()=>t("table"),className:ri("view-switcher-btn","table"===e&&"active"),disabled:r,"aria-label":o.tableView,title:o.tableView,children:jo(ew,{})}),jo("button",{type:"button",onClick:()=>t("grid"),className:ri("view-switcher-btn","grid"===e&&"active"),disabled:r,"aria-label":o.gridView,title:o.gridView,children:jo(tw,{})})]})},rw=({label:e,labelOverrideSignal:t,selectedCount:n,onClick:r,isLoading:o=!1,className:i})=>{const l=null==t?void 0:t.value,s=null!=l,a=bi(null!=l?l:e),u=0===n||o,c=!s&&n>0&&!o,d=s?a:n>0?`${a} (${n})`:a;return jo("button",{type:"button",className:ri("dv-action-button",u&&"dv-action-button-disabled",o&&"dv-action-button-loading",i
1),disabled:u,onClick:r,"aria-label":d,"aria-busy":o,children:[o&&jo("span",{className:"dv-action-button-spinner","aria-hidden":"true"}),jo("span",{className:"dv-action-button-label",children:a}),c&&jo("span",{className:"dv-action-button-badge",children:n})]})},ow={type:"full_numbers",perPageSelector:"bottom",documentCount:"bottom",pageNavigation:"bottom"},iw={adjacentPages:!0},lw={threshold:.8,pageSize:10,height:"70vh"},sw={control:"inline",display:"childRow",breakpoints:{}},aw={minCardWidth:226,gap:25,columns:"autosize"},uw={enabled:!0,offset:15};function cw(e){return!1!==e&&("bottom"===e||"both"===e||"top"===e?e:"top")}function dw(e){return!1===e?{adjacentPages:!1}:"object"==typeof e?{adjacentPages:null!==(t=e.adjacentPages)&&void 0!==t?t:iw.adjacentPages}:{...iw};var t}function fw(e){var t;const n=!1!==(null==e?void 0:e.stickyHeader),r=!0===(null==e?void 0:e.hideHeader),o=null!==(t=null==e?void 0:e.headerLocation)&&void 0!==t?t:"top";return{sticky:n&&"bottom"!==o,hidden:r,location:o}}function pw(e){return!1===e?null:void 0===e||!0===e?{...uw}:"object"==typeof e?!1===e.enabled?null:{enabled:!0,offset:null!==(t=e.offset)&&void 0!==t?t:uw.offset}:{...uw};var t}function hw(e){return{enabled:!1!==(null==e?void 0:e.sorting),multi:!0===(null==e?void 0:e.multiSort)}}function gw(e){var t,n;const r=null==e?void 0:e.filtering;if("object"!=typeof r)return{enabled:!1!==r,above:!1!==r,column:!1,showCounts:!0};const o=!1!==r.enabled;return{enabled:o,above:o&&(null===(t=r.above)||void 0===t||t),column:o&&null!==(n=r.column)&&void 0!==n&&n,showCounts:!1!==r.showCounts}}function mw(e){return void 0===e||!1===e?null:"object"==typeof e?{enabled:!1!==e.enabled}:{enabled:!0}}function vw(e,t){if("grid"===t)return null;if(void 0===e||!1===e)return null;if(!0===e)return{enabled:!0,actionButton:null,selectAll:{enabled:!0,label:null}};if("object"==typeof e){var n,r;if(!1===e.enabled)return null;const t=!1===e.selectAll?{enabled:!1,label:null}:!0===e.selectAll||void 0===e.selectAll?{enabled:!0,label:null}:{enabled:!1!==e.selectAll.enabled,label:null!==(n=e.selectAll.label)&&void 0!==n?n:null};return{enabled:!0,actionButton:e.actionButton?{label:e.actionButton.label,position:null!==(r=e.actionButton.position)&&void 0!==r?r:"top",className:e.actionButton.className}:null,selectAll:t}}return null}const yw="data-dv-row-selection-id",bw=`input[type="checkbox"][${yw}]`;function ww(e){const t={};for(const n of Array.from(e.attributes))n.name.startsWith("data-")&&(t[n.name.slice(5).replace(/-([a-z])/g,((e,t)=>t.toUpperCase()))]=n.value);return t}function Sw(e,t){return"function"==typeof e?e(t):e}function _w(e,t){return n=>{t.setState((t=>({...t,[e]:Sw(n,t[e])})))}}function xw(e){return e instanceof Function}function Cw(e,t,n){let r,o=[];return i=>{let l;n.key&&n.debug&&(l=Date.now());const s=e(i),a=s.length!==o.length||s.some(((e,t)=>o[t]!==e));if(!a)return r;let u;if(o=s,n.key&&n.debug&&(u=Date.now()),r=t(...s),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-l))/100,t=Math.round(100*(Date.now()-u))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${o(t,5)} /${o(e,5)} ms`,`\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function Ew(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const Rw="debugHeaders";function Iw(e,t,n){var r;let o={id:null!=(r=n.id)?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const kw={createTable:e=>{e.getHeaderGroups=Cw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var i,l;const s=null!=(i=null==r?void 0:r.map((e=>n.find((t=>
1t.id===e)))).filter(Boolean))?i:[],a=null!=(l=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?l:[];return Pw(t,[...s,...n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),...a],e)}),Ew(e.options,Rw)),e.getCenterHeaderGroups=Cw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>Pw(t,n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),Ew(e.options,Rw)),e.getLeftHeaderGroups=Cw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;const i=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return Pw(t,i,e,"left")}),Ew(e.options,Rw)),e.getRightHeaderGroups=Cw((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;const i=null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[];return Pw(t,i,e,"right")}),Ew(e.options,Rw)),e.getFooterGroups=Cw((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),Ew(e.options,Rw)),e.getLeftFooterGroups=Cw((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),Ew(e.options,Rw)),e.getCenterFooterGroups=Cw((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),Ew(e.options,Rw)),e.getRightFooterGroups=Cw((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),Ew(e.options,Rw)),e.getFlatHeaders=Cw((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Ew(e.options,Rw)),e.getLeftFlatHeaders=Cw((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Ew(e.options,Rw)),e.getCenterFlatHeaders=Cw((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Ew(e.options,Rw)),e.getRightFlatHeaders=Cw((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Ew(e.options,Rw)),e.getCenterLeafHeaders=Cw((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Ew(e.options,Rw)),e.getLeftLeafHeaders=Cw((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Ew(e.options,Rw)),e.getRightLeafHeaders=Cw((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Ew(e.options,Rw)),e.getLeafHeaders=Cw((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,i,l,s,a;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(i=null==(l=t[0])?void 0:l.headers)?i:[],...null!=(s=null==(a=n[0])?void 0:a.headers)?s:[]].map((e=>e.getLeafHeaders())).flat()}),Ew(e.options,Rw))}};function Pw(e,t,n,r){var o,i;let l=0;const s=function(e,t){void 0===t&&(t=1),l=Math.max(l,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)}),0)};s(e);let a=[];const u=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const l=[...i].reverse()[0];let s,a=!1;if(e.column.depth===o.depth&&e.column.parent?s=e.column.parent:(s=e.column,a=!0),l&&(null==l?void 0:l.column)===s)l.subHeaders.push(e);else{const o=Iw(n,s,{id:[r,t,s.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?`${i.filter((e=>e.column===s)).length}`:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),a.push(o),t>0&&u(i,t-1)},c=t.map(((e,t)=>Iw(n,e,{depth:l,index:t})));u(c,l-1),a.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=a[0])?void 0:i.headers)?o:[]),a}const Ow=(e,t,n,r,o,i,l)=>{let s={id:t,index:r,original:n,depth:o,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]):void 0},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>function(e){const t=[],n=e=>{e.forEach((e=>{t.push(e);const r=(e=>e.subRows)(e);null!=r&&r.length&&n(r)}))};return n(e),t}(s.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:Cw((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:Cw((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),Ew(e.options,"debugCells"))};
1return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,s,t,t.id)))),Ew(e.options,"debugRows")),_getAllCellsByColumnId:Cw((()=>[s.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),Ew(e.options,"debugRows"))};for(let t=0;t<e._features.length;t++){const n=e._features[t];null==n||null==n.createRow||n.createRow(s,e)}return s},Mw={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Tw=(e,t,n)=>{var r,o;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(i))};Tw.autoRemove=e=>jw(e);const Aw=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};Aw.autoRemove=e=>jw(e);const Nw=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};Nw.autoRemove=e=>jw(e);const Fw=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};Fw.autoRemove=e=>jw(e);const zw=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));zw.autoRemove=e=>jw(e)||!(null!=e&&e.length);const Dw=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));Dw.autoRemove=e=>jw(e)||!(null!=e&&e.length);const Lw=(e,t,n)=>e.getValue(t)===n;Lw.autoRemove=e=>jw(e);const Vw=(e,t,n)=>e.getValue(t)==n;Vw.autoRemove=e=>jw(e);const qw=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};qw.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,l=null===n||Number.isNaN(o)?1/0:o;if(i>l){const e=i;i=l,l=e}return[i,l]},qw.autoRemove=e=>jw(e)||jw(e[0])&&jw(e[1]);const $w={includesString:Tw,includesStringSensitive:Aw,equalsString:Nw,arrIncludes:Fw,arrIncludesAll:zw,arrIncludesSome:Dw,equals:Lw,weakEquals:Vw,inNumberRange:qw};function jw(e){return null==e||""===e}const Ww={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:_w("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?$w.includesString:"number"==typeof r?$w.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?$w.equals:Array.isArray(r)?$w.arrIncludes:$w.weakEquals},e.getFilterFn=()=>{var n,r;return xw(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:$w[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find((t=>t.id===e.id)))?void 0:n.value},e.getFilterIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.setFilterValue=n=>{t.setColumnFilters((t=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),i=Sw(n,o?o.value:void 0);var l;if(Bw(r,i,e))return null!=(l=null==t?void 0:t.filter((t=>t.id!==e.id)))?l:[];const s={id:e.id,value:i};var a;return o?null!=(a=null==t?void 0:t.map((t=>t.id===e.id?s:t)))?a:[]:null!=t&&t.length?[...t,s]:[s]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=Sw(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));return!t||!Bw(t.getFilterFn(),e.value,t)}))}))},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Bw(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}
1const Hw={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:(e,t,n)=>{let r;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o<n&&(o=n)))})),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(!function(e){return Array.isArray(e)&&e.every((e=>"number"==typeof e))}(n))return;if(1===n.length)return n[0];const r=Math.floor(n.length/2),o=n.sort(((e,t)=>e-t));return n.length%2!=0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map((t=>t.getValue(e)))).values()),uniqueCount:(e,t)=>new Set(t.map((t=>t.getValue(e)))).size,count:(e,t)=>t.length},Uw={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:_w("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},e.getCanGroup=()=>{var n,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?Hw.sum:"[object Date]"===Object.prototype.toString.call(r)?Hw.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return xw(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:Hw[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}},Gw={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:_w("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Cw((e=>[eS(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),Ew(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=eS(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=eS(t,n);return(null==(r=o[o.length-1])?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=Cw((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));if("remove"===n)return r;const o=t.map((t=>e.find((e=>
1e.id===t)))).filter(Boolean);return[...o,...r]}(o,t,n)}),Ew(e.options,"debugTable"))}},Zw={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:_w("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,l,s,a;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).filter((e=>!(null!=r&&r.includes(e)))),right:[...(null!=(l=null==e?void 0:e.right)?l:[]).filter((e=>!(null!=r&&r.includes(e)))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter((e=>!(null!=r&&r.includes(e)))),...r],right:(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=r&&r.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=r&&r.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,i=n.some((e=>null==r?void 0:r.includes(e))),l=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!l&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Cw((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),Ew(t.options,"debugRows")),e.getLeftVisibleCells=Cw((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left]),((e,t)=>{const n=(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"left"})));return n}),Ew(t.options,"debugRows")),e.getRightVisibleCells=Cw((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>{const n=(null!=t?t:[]).map((t=>e.find((e=>e.column.id===t)))).filter(Boolean).map((e=>({...e,position:"right"})));return n}),Ew(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(i=r.right)?void 0:i.length))},e.getLeftLeafColumns=Cw((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),Ew(e.options,"debugColumns")),e.getRightLeafColumns=Cw((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),Ew(e.options,"debugColumns")),e.getCenterLeafColumns=Cw((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),Ew(e.options,"debugColumns"))}},Kw={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Jw={getDefaultColumnDef:()=>Kw,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:_w("columnSizing",e),onColumnSizingInfoChange:_w("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Kw.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:Kw.size),null!=(o=e.columnDef.maxSize)?o:Kw.maxSize)},e.getStart=Cw((e=>[e,eS(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),Ew(t.options,"debugColumns")),e.getAfter=Cw((e=>[e,eS(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),Ew(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing((t=>{let{[e.id]:n,...r}=t;return r}))},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0;const n=e=>{var r;
1e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return i=>{if(!r||!o)return;if(null==i.persist||i.persist(),Xw(i)&&i.touches&&i.touches.length>1)return;const l=e.getSize(),s=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],a=Xw(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const i="rtl"===t.options.columnResizeDirection?-1:1,l=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,s=Math.max(l/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*s,0))/100})),{...e,deltaOffset:l,deltaPercentage:s}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...u}))))},d=e=>c("move",e),f=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||("undefined"!=typeof document?document:null),h={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",h.moveHandler),null==p||p.removeEventListener("mouseup",h.upHandler),f(e.clientX)}},g={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",g.moveHandler),null==p||p.removeEventListener("touchend",g.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},m=!!function(){if("boolean"==typeof Yw)return Yw;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return Yw=e,Yw}()&&{passive:!1};Xw(i)?(null==p||p.addEventListener("touchmove",g.moveHandler,m),null==p||p.addEventListener("touchend",g.upHandler,m)):(null==p||p.addEventListener("mousemove",h.moveHandler,m),null==p||p.addEventListener("mouseup",h.upHandler,m)),t.setColumnSizingInfo((e=>({...e,startOffset:a,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id})))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.getSize()),0))?t:0}}};let Yw=null;function Xw(e){return"touchstart"===e.type}const Qw={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:_w("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},e.getIsVisible=()=>{var n,r;const o=e.columns;return null==(n=o.length?o.some((e=>e.getIsVisible())):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Cw((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),Ew(t.options,"debugRows")),e.getVisibleCells=Cw((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),Ew(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>Cw((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),Ew(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>e.getCenterLeafColumns())),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}};function eS(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const tS={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:_w("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;
1if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some((e=>e.getCanExpand())),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const t=e.getState().expanded;return"boolean"==typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded((r=>{var o;const i=!0===r||!(null==r||!r[e.id]);let l={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{l[e]=!0})):l=r,n=null!=(o=n)?o:!i,!i&&n)return{...l,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=l;return n}return r}))},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||
1!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},nS={getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:_w("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>Sw(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=Sw(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...n,pageIndex:r}}))},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination((e=>{const n=Math.max(1,Sw(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=Sw(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=Cw((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),Ew(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();
1return-1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex((e=>e-1)),e.nextPage=()=>e.setPageIndex((e=>e+1)),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},rS={getInitialState:e=>({rowPinning:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:_w("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],l=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],s=new Set([...l,e.id,...i]);t.setRowPinning((e=>{var t,r,o,i,l,a;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)]}:"top"===n?{top:[...(null!=(l=null==e?void 0:e.top)?l:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)],bottom:(null!=(a=null==e?void 0:e.bottom)?a:[]).filter((e=>!(null!=s&&s.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=s&&s.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some((e=>null==r?void 0:r.includes(e))),l=n.some((e=>null==o?void 0:o.includes(e)));return i?"top":!!l&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==i?void 0:i.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(i=r.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map((t=>{const n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null})):(null!=n?n:[]).map((e=>t.find((t=>t.id===e))))).filter(Boolean).map((e=>({...e,position:r})))},e.getTopRows=Cw((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),Ew(e.options,"debugRows")),e.getBottomRows=Cw((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),Ew(e.options,"debugRows")),e.getCenterRows=Cw((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),Ew(e.options,"debugRows"))}},oS={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:_w("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{iS(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Cw((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>
1Object.keys(t).length?lS(e,n):{rows:[],flatRows:[],rowsById:{}}),Ew(e.options,"debugTable")),e.getFilteredSelectedRowModel=Cw((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?lS(e,n):{rows:[],flatRows:[],rowsById:{}}),Ew(e.options,"debugTable")),e.getGroupedSelectedRowModel=Cw((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?lS(e,n):{rows:[],flatRows:[],rowsById:{}}),Ew(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter((e=>e.getCanSelect())).some((e=>e.getIsSelected()||e.getIsSomeSelected()))},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection((i=>{var l;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return iS(s,e.id,n,null==(l=null==r?void 0:r.selectChildren)||l,t),s}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return sS(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===aS(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===aS(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},iS=(e,t,n,r,o)=>{var i;const l=o.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),l.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=l.subRows)&&i.length&&l.getCanSelectSubRows()&&l.subRows.forEach((t=>iS(e,t.id,n,r,o)))};function lS(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(e,t){return e.map((e=>{var t;const l=sS(e,n);if(l&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),l)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function sS(e,t){var n;return null!=(n=t[e.id])&&n}function aS(e,t,n){var r;
1if(null==(r=e.subRows)||!r.length)return!1;let o=!0,i=!1;return e.subRows.forEach((e=>{if((!i||o)&&(e.getCanSelect()&&(sS(e,t)?i=!0:o=!1),e.subRows&&e.subRows.length)){const n=aS(e,t);"all"===n?i=!0:"some"===n?(i=!0,o=!1):o=!1}})),o?"all":!!i&&"some"}const uS=/([0-9]+)/gm;function cS(e,t){return e===t?0:e>t?1:-1}function dS(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function fS(e,t){const n=e.split(uS).filter(Boolean),r=t.split(uS).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),i=parseInt(t,10),l=[o,i].sort();if(isNaN(l[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(l[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-r.length}const pS={alphanumeric:(e,t,n)=>fS(dS(e.getValue(n)).toLowerCase(),dS(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>fS(dS(e.getValue(n)),dS(t.getValue(n))),text:(e,t,n)=>cS(dS(e.getValue(n)).toLowerCase(),dS(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>cS(dS(e.getValue(n)),dS(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},basic:(e,t,n)=>cS(e.getValue(n),t.getValue(n))},hS={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:_w("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return pS.datetime;if("string"==typeof n&&(r=!0,n.split(uS).length>1))return pS.alphanumeric}return r?pS.text:pS.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return xw(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:pS[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=null!=n;t.setSorting((l=>{const s=null==l?void 0:l.find((t=>t.id===e.id)),a=null==l?void 0:l.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===o;var f;return u=null!=l&&l.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=l&&l.length&&a!==l.length-1?"replace":s?"toggle":"replace","toggle"===u&&(i||o||(u="remove")),"add"===u?(c=[...l,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(f=t.options.maxMultiSortColCount)?f:Number.MAX_SAFE_INTEGER))):c="toggle"===u?l.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?l.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}],c}))},e.getFirstSortDir=()=>{var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?!!(l===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===l?"asc":"desc"):i},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((t=>t.id===e.id)))?n:-1},e.clearSorting=()=>{t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e.id)):[]))},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}}
1,gS=[kw,Qw,Gw,Zw,Mw,Ww,{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:_w("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>$w.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return xw(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:$w[r]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},hS,Uw,tS,nS,rS,oS,Jw];function mS(e){var t,n;const r=[...gS,...null!=(t=e._features)?t:[]];let o={_features:r};const i=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let l={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;l=null!=(t=null==e.getInitialState?void 0:e.getInitialState(l))?t:l}));const s=[];let a=!1;const u={_features:r,options:{...i,...e},initialState:l,_queue:e=>{s.push(e),a||(a=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();a=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=Sw(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:Cw((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),Ew(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:Cw((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,r){var o,i;const l={...e._getDefaultColumnDef(),...t},s=l.accessorKey;let a,u=null!=(o=null!=(i=l.id)?i:s?"function"==typeof String.prototype.replaceAll?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)?o:"string"==typeof l.header?l.header:void 0;if(l.accessorFn?a=l.accessorFn:s&&(a=s.includes(".")?e=>{let t=e;for(const e of s.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[l.accessorKey]),!u)throw new Error;let c={id:`${String(u)}`,accessorFn:a,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:Cw((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),Ew(e.options,"debugColumns")),getLeafColumns:Cw((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=c.columns)&&t.length){let t=c.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[c]}),Ew(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(o,e,r,n),l=e;return i.columns=l.columns?t(l.columns,i,r+1):[],i}))};return t(e)}),Ew(e,"debugColumns")),getAllFlatColumns:Cw((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),Ew(e,"debugColumns")),_getAllFlatColumnsById:Cw((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),Ew(e,"debugColumns")),getAllLeafColumns:Cw((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),Ew(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,u);for(let e=0;e<o._features.length;e++){const t=o._features[e];null==t||null==t.createTable||t.createTable(o)}return o}function vS(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(n=e)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?Oe(e,t):e:null;var n}function yS(e,t,n){var r;let o,i=null!==(r=n.initialDeps)&&void 0!==r?r:[],l=!0;function s(){const r=e(),s=r.length!==i.length||r.some(((e,t)=>i[t]!==e));return s?(i=r,o=t(...r),!(null==n?void 0:n.onChange)||l&&n.skipInitialOnChange||n.onChange(o),l=!1,o):o}return s.updateDeps=e=>{i=e},s}function bS(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const wS=(e,t,n)=>{let r;return function(...o){e.clearTimeout(r),r=e.setTimeout((()=>t.apply(this,o)),n)}};let SS;const _S=()=>
vendor: 4,967 bytes, line 1
1{if(void 0!==SS)return SS;if("undefined"==typeof navigator)return SS=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return SS=!0;const e=navigator.maxTouchPoints;return SS="MacIntel"===navigator.platform&&void 0!==e&&e>0},xS=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},CS=e=>e,ES=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=new Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},RS=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const o=e=>{const{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(o(xS(n)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver((t=>{const r=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void o({width:t.inlineSize,height:t.blockSize})}o(xS(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()}));return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},IS={passive:!0},kS="undefined"==typeof window||"onscrollend"in window,PS=(e,t)=>((e,t,n)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;const i=e.options.useScrollendEvent&&kS;let l=0;const s=i?null:wS(o,(()=>t(l,!1)),e.options.isScrollingResetDelay),a=e=>()=>{l=n(r),null==s||s(),t(l,e)},u=a(!0),c=a(!1);return r.addEventListener("scroll",u,IS),i&&r.addEventListener("scrollend",c,IS),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",c)}})(e,t,(t=>{const{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r?-1:1):t.scrollTop})),OS=(e,t,n)=>{if(n.options.useCachedMeasurements){var r;const t=n.indexFromElement(e),o=n.options.getItemKey(t);return null!==(r=n.itemSizeCache.get(o))&&void 0!==r?r:n.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const t=n.indexFromElement(e),r=n.options.getItemKey(t),o=n.itemSizeCache.get(r);if(void 0!==o)return o}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},MS=(e,{adjustments:t=0,behavior:n},r)=>{var o,i;null==(i=null==(o=r.scrollElement)?void 0:o.scrollTo)||i.call(o,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})};class TS{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e,t,n,r;return null!==(e=null==(r=null==(n=null==(t=this.targetWindow)?void 0:t.performance)?void 0:n.now)?void 0:r.call(n))&&void 0!==e?e:Date.now()},this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver((e=>{e.forEach((e=>{const t=()=>{const t=e.target,n=this.indexFromElement(t);if(t.isConnected)this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(const[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}}};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()}))})):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,n;const r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:CS,rangeExtractor:ES,onChange:()=>{},measureElement:OS,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const t in e){const n=e[t];void 0!==n&&(r[t]=n)}const o=this.options;let i=null,l=null,s=!1;if(void 0!==o&&o.enabled&&r.enabled&&"end"===r.anchorTo&&null!==this.scrollElement){var a,u;const e=o.count,d=r.count,f=this.getMeasurements(),p=e>0?null!==(a=null==(t=f[0])?void 0:t.key)&&void 0!==a?a:o.getItemKey(0):null,h=e>0?null!==(u=null==(n=f[e-1])?void 0:n.key)&&void 0!==u?u:o.getItemKey(e-1):null;if(d!==e||e>0&&d>0&&(r.getItemKey(0)!==p||r.getItemKey(d-1)!==h)){var c;s=!0;const t=e>0?null!==(c=this.getVirtualItemForOffset(this.getScrollOffset()))&&void 0!==c?c:f[0]:null;
vendor: 4,301 bytes, line 1
1t&&(i=[t.key,this.getScrollOffset()-t.start]);const n=!0===r.followOnAppend?"auto":r.followOnAppend||null;n&&d>e&&this.isAtEnd(o.scrollEndThreshold)&&(0===e||r.getItemKey(d-1)!==h)&&(l=n)}}this.options=r,s&&(this.pendingMin=0,this.itemSizeCacheVersion++);let d=!1,f=0;if(i&&null!==this.scrollOffset){const[e,t]=i,n=this.getMeasurements(),{count:r,getItemKey:o}=this.options;let l=0;for(;l<r&&o(l)!==e;)l++;if(l<r){const e=n[l];if(e){const n=e.start+t;n!==this.scrollOffset&&(f=n-this.scrollOffset,this.scrollOffset=n,d=!0)}}}(d||l)&&(this.pendingScrollAnchor=[d?i[0]:null,d?i[1]:0,l,f])},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=yS((()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null])),(e=>{this.notify(e)}),{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach((e=>e())),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();var n;if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=null!==(n=null==(e=this.scrollElement)?void 0:e.window)&&void 0!==n?n:null,this.elementsCache.forEach((e=>{this.observer.observe(e)})),this.unsubs.push(this.options.observeElementRect(this,(e=>{this.scrollRect=e,this.maybeNotify()}))),this.unsubs.push(this.options.observeElementOffset(this,((e,t)=>{t&&null===this._intendedScrollOffset&&e===this.scrollOffset||(null!==this._intendedScrollOffset&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify())}))),"addEventListener"in this.scrollElement){const e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,_S()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout((()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()}),150))};e.addEventListener("touchstart",t,IS),e.addEventListener("touchend",n,IS),this.unsubs.push((()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",n),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)}))}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const r=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,r&&this.scrollElement&&this.options.enabled){const[e,t,n,o]=r;null===e||n||(_S()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==o&&(this._iosDeferredAdjustment+=o):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),n&&this.scrollToEnd({behavior:n})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment)return;if(this.isScrolling)return;if(this._iosTouching)return;if(this._iosJustTouchEnded)return;const e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;const n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>{var e;return this.options.enabled?(this.scrollRect=null!==(e=this.scrollRect)&&void 0!==e?e:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)}
1,this.getScrollOffset=()=>{var e;return this.options.enabled?(this.scrollOffset=null!==(e=this.scrollOffset)&&void 0!==e?e:"function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(e,t)=>{const n=new Map,r=new Map;for(let o=t-1;o>=0;o--){const t=e[o];if(n.has(t.lane))continue;const i=r.get(t.lane);if(null==i||t.end>i.end?r.set(t.lane,t):t.end<i.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort(((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end))[0]:void 0},this.getMeasurementOptions=yS((()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode]),((e,t,n,r,o,i,l)=>(void 0!==this.prevLanes&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o,lanes:i,laneAssignmentMode:l})),{key:!1}),this.getMeasurements=yS((()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion]),(({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:o,lanes:i,laneAssignmentMode:l},s)=>{var a;const u=this.itemSizeCache;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach((e=>{this.itemSizeCache.set(e.key,e.size)})));const c=this.lanesSettling?0:null!==(a=this.pendingMin)&&void 0!==a?a:0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===i){const o=this.options.gap,i=2*e;let l,s=this._flatMeasurements;if(!s||s.length<i){const e=new Float64Array(i);s&&c>0&&e.set(s.subarray(0,2*c)),s=e,this._flatMeasurements=s}if(0===c)l=t+n;else{const e=c-1;l=s[2*e]+s[2*e+1]+o}for(let t=c;t<e;t++){const e=r(t),n=u.get(e),i="number"==typeof n?n:this.options.estimateSize(t);s[2*t]=l,s[2*t+1]=i,l+=i+o}const a=function(e,t,n){const r=new Array(e);return new Proxy(r,{get(r,o,i){if("string"==typeof o){const i=o.charCodeAt(0);if(i>=48&&i<=57){const i=+o;if(Number.isInteger(i)&&i>=0&&i<e){let e=r[i];if(!e){const o=t[2*i];e=r[i]={index:i,key:n(i),start:o,size:t[2*i+1],end:o+t[2*i+1],lane:0}}return e}}if("length"===o)return e}return Reflect.get(r,o,i)}})}(e,s,r);return this.measurementsCache=a,a}const d=this.measurementsCache.slice(0,c),f=new Array(i).fill(void 0);for(let e=0;e<c;e++){const t=d[e];t&&(f[t.lane]=e)}for(let o=c;o<e;o++){const e=r(o),i=this.laneAssignments.get(o);let s,a;const c="estimate"===l||u.has(e);if(void 0!==i&&this.options.lanes>1){s=i;const e=f[s],r=void 0!==e?d[e]:void 0;a=r?r.end+this.options.gap:t+n}else{const e=1===this.options.lanes?d[o-1]:this.getFurthestMeasurement(d,o);a=e?e.end+this.options.gap:t+n,s=e?e.lane:o%this.options.lanes,this.options.lanes>1&&c&&this.laneAssignments.set(o,s)}const p=u.get(e),h="number"==typeof p?p:this.options.estimateSize(o),g=a+h;d[o]={index:o,start:a,size:h,end:g,key:e,lane:s},f[s]=o}return this.measurementsCache=d,d}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=yS((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes]),((e,t,n,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:r,flat:o}){const i=e.length-1,l=o?e=>o[2*e]:t=>e[t].start,s=o?e=>o[2*e]+o[2*e+1]:t=>e[t].end;if(e.length<=r)return{startIndex:0,endIndex:i};let a=AS(0,i,l,n),u=a;if(1===r)for(;u<i&&s(u)<n+t;)u++;else if(r>1){const o=Array(r).fill(0);for(;u<i&&o.some((e=>e<n+t));){const t=e[u];o[t.lane]=t.end,u++}const l=Array(r).fill(n+t);for(;a>=0&&l.some((e=>e>=n));){const t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%r),u=Math.min(i,u+(r-1-u%r))}return{startIndex:a,endIndex:u}}({measurements:e,outerSize:t,scrollOffset:n,lanes:r,flat:1===r&&null!=this._flatMeasurements?this._flatMeasurements:null}):null),{key:!1,debug:()=>this.options.debug}
1),this.getVirtualIndexes=yS((()=>{let e=null,t=null;const n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]}),((e,t,n,r,o)=>null===r||null===o?[]:e({startIndex:r,endIndex:o,overscan:t,count:n})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t,n;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;const r=null!==(t=this.scrollState.index)&&void 0!==t?t:null==(n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:n.index;if(void 0!==r&&this.range){const t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),n=Math.max(0,r-t),o=Math.min(this.options.count-1,r+t);return e>=n&&e<=o}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach(((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))}));const t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),this.isScrolling&&!this.scrollState||!this.shouldMeasureDuringScroll(t)||this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n,r,o;if(e<0||e>=this.options.count)return;let i,l,s;const a=this._flatMeasurements;if(1===this.options.lanes&&null!==a)s=this.options.getItemKey(e),l=a[2*e],i=a[2*e+1];else{const t=this.measurementsCache[e];if(!t)return;s=t.key,l=t.start,i=t.size}const u=t-(null!==(n=this.itemSizeCache.get(s))&&void 0!==n?n:i);if(0!==u){var c;const n="end"===this.options.anchorTo&&"smooth"!==(null==(r=this.scrollState)?void 0:r.behavior)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,a=n?this.getTotalSize():0,d="smooth"!==(null==(o=this.scrollState)?void 0:o.behavior)&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(null!==(c=this.measurementsCache[e])&&void 0!==c?c:{index:e,key:s,start:l,size:i,end:l+i,lane:0},u,this):l<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(s)||"backward"!==this.scrollDirection));(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(s,t),this.itemSizeCacheVersion++,n?this.applyScrollAdjustment(this.getTotalSize()-a):d&&this.applyScrollAdjustment(u),this.notify(!1)}},this.getVirtualItems=yS((()=>
vendor: 1,143 bytes, line 1
1[this.getVirtualIndexes(),this.getMeasurements()]),((e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=t[e[r]];n.push(o)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0===t.length)return;const n=this._flatMeasurements,r=1===this.options.lanes&&null!=n,o=AS(0,t.length-1,r?e=>n[2*e]:e=>bS(t[e]).start,e);return bS(t[o])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>
vendor: 4,913 bytes, line 1
1{if(!this.scrollElement)return 0;const r=this.getSize(),o=this.getScrollOffset();"auto"===t&&(t=e>=o+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r);const i=this.getMaxScrollOffset();return Math.max(Math.min(i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.getSize(),r=this.getScrollOffset(),o=this.measurementsCache[e];if(!o)return;if("auto"===t)if(o.end>=r+n-this.options.scrollPaddingEnd)t="end";else{if(!(o.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const i="end"===t?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,o.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{const r=this.getOffsetForAlignment(e,t),o=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:o,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));const r=this.getOffsetForIndex(e,t);if(!r)return;const[o,i]=r,l=this.now();this.scrollState={index:e,align:i,behavior:n,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{const n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;if(0===t.length)n=this.options.paddingStart;else if(1===this.options.lanes){const o=t.length-1,i=this._flatMeasurements;var r;n=null!=i?i[2*o]+i[2*o+1]:null!==(r=null==(e=t[o])?void 0:e.end)&&void 0!==r?r:0}else{const e=Array(this.options.lanes).fill(null);let r=t.length-1;for(;r>=0&&e.some((e=>null===e));){const n=t[r];null===e[n.lane]&&(e[n.lane]=n.end),r--}n=Math.max(...e.filter((e=>null!==e)))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const e=[];if(0===this.itemSizeCache.size)return e;const t=this.getMeasurements();for(const n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(null!=t?t:0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){0!==e&&(_S()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),null!==this.scrollOffset&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){this.targetWindow?null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame((()=>{this.rafId=null,this.reconcileScroll()}))):this.scrollState=null}reconcileScroll(){if(!this.scrollState)return;if(!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3)return void(this.scrollState=null);const e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&((e,t)=>Math.abs(e-t)<1.01)(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1)return this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),void(this.scrollState=null)}else if(this.scrollState.stableFrames=0,n){const e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r="smooth"===this.scrollState.behavior&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}}const AS=(e,t,n,r)=>{for(;e<=t;){const o=(e+t)/2|0,i=n(o);if(i<r)e=o+1;else{if(!(i>r))return o;t=o-1}}return e>0?e-1:0},NS="undefined"!=typeof document?St:wt;const FS=/[^a-zA-Z0-9_-]/g,zS="http://www.w3.org/2000/svg";function DS(e){const t=Array.from(e.querySelectorAll("button, a.button, .multi-cart-check, .wpt-multi-checkbox"));if(t.length<2)return 0;let n=0;for(let e=0;e<t.length;e++)for(let r=e+1;r<t.length;r++){const o=t[e],i=t[r];
1if(o.contains(i)||i.contains(o))continue;const l=o.getBoundingClientRect(),s=i.getBoundingClientRect();if(l.width<=0||l.height<=0||s.width<=0||s.height<=0)continue;if(Math.min(l.bottom,s.bottom)-Math.max(l.top,s.top)<=0)continue;const a=Math.min(l.right,s.right)-Math.max(l.left,s.left);a>0&&(n=Math.max(n,a+4))}return Math.ceil(n)}const LS=e=>{const t=parseFloat(e);return Number.isFinite(t)?t:0},VS=e=>e.replace(/<[^>]*>/g,""),qS=e=>"object"==typeof e&&null!==e&&"taxonomy"===e.dataType&&Array.isArray(e.items),$S=e=>null==e?null:qS(e)?(e=>{var t;if(!qS(e)||0===e.items.length)return null;const n=String(null!==(t=e.separator)&&void 0!==t?t:", ").replace(/\s+$/,"");return e.items.map(((t,r)=>{var o;const i=(e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"))(String(null!==(o=t.name)&&void 0!==o?o:""));return i?`<span class="taxonomy-term-group"><span>${i}</span>${r===e.items.length-1?"":`<span class="taxonomy-separator">${BS(n)}</span> `}</span>`:""})).join("")})(e):"object"==typeof e?null:String(e),jS=e=>{const t=e.split(/\s+/).filter(Boolean);return 0===t.length?0:t.reduce(((e,t)=>Math.max(e,t.length)),0)},WS=e=>e&&"__responsive_control__"!==e?`col-${e.replace(FS,"")}`:"",BS=e=>e?e.replace(/<script\b[^>]*>[\s\S]*?<\/script>
1/gi,"").replace(/\s(id|name)\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,""):"",HS=(e,t)=>{const n=t.trim();if(!n||e.has(n))return;const r=VS(n).replace(/\s+/g," ").trim();e.set(n,{value:n,rawLength:n.length,visibleLength:r.length,longestWordLength:jS(r)})},US=e=>Array.from(e.values()).sort(((e,t)=>t.longestWordLength!==e.longestWordLength?t.longestWordLength-e.longestWordLength:t.visibleLength!==e.visibleLength?t.visibleLength-e.visibleLength:t.rawLength-e.rawLength)).slice(0,12).map((e=>e.value)),GS=e=>e.nodeType===Node.ELEMENT_NODE&&(e.matches('a[rel~="tag"]')||e.matches("span[data-slug]")),ZS=e=>{const t=e.cloneNode(!0);var n;return[...(n=t).matches(".combined-column")?[n]:[],...Array.from(n.querySelectorAll(".combined-column"))].forEach((e=>{const t=Array.from(e.childNodes);if(t.filter(GS).length<2)return;const n=document.createDocumentFragment();let r=0;for(;r<t.length;){const e=t[r];if(!GS(e)){n.appendChild(e),r++;continue}const o=document.createElement("span");for(o.className="taxonomy-term-group",o.appendChild(e),r++;r<t.length&&!GS(t[r]);)o.appendChild(t[r]),r++;n.appendChild(o)}e.appendChild(n)})),t.outerHTML},KS=e=>{const t=e.trim();if(!t||!t.includes("combined-column"))return[];const n=document.createElement("template");n.innerHTML=BS(t);const r=Array.from(n.content.querySelectorAll(".combined-column-block"));return(r.length>0?r:Array.from(n.content.querySelectorAll(".combined-column"))).map(ZS).filter(Boolean)},JS=e=>KS(e).length>0,YS=e=>"number"==typeof e||"string"==typeof e&&e.endsWith("px"),XS=e=>{const t=new Set,n=[];return e.forEach((e=>{t.has(e.id)||(t.add(e.id),n.push(e))})),n},QS=e=>{var t;return!(!1===e.visible||null!==(t=e.responsive)&&void 0!==t&&t.never)},e_=({columnsToMeasure:e,htmlColumnIds:t,htmlMeasureCandidates:n,textMeasureContent:r,pixelColumnIds:o,contentLineColumnIds:i,suppressContentLineHeaders:l=!1,mode:s,constrainedWidth:a})=>{const u=document.createElement("table");u.className=`data-table measurement-table measurement-table--${s}`,u.style.cssText="legacyFit"===s?"table-layout: auto; width: 100%; max-width: 100%;":"table-layout: auto; width: auto; max-width: none;";const c=document.createElement("thead"),d=document.createElement("tr");e.forEach((e=>{const t=document.createElement("th"),n=WS(e.id),r=l&&i.has(e.id),o=r?"":String(e.header||""),s=!1!==e.sortable&&!r;if(t.className=["table-header-cell",n].filter(Boolean).join(" "),t.setAttribute("data-column-id",e.id),s){const e=document.createElement("div");e.className="table-header-cell-wrapper";const n=document.createElement("div");n.className="table-header-content clickable";const r=document.createElement("span");r.className="table-header-label",r.textContent=o,n.appendChild(r);const i=document.createElement("div");i.className="header-menu";const l=document.createElement("button");l.type="button",l.className="header-menu-trigger header-menu-trigger-indicator-only",l.tabIndex=-1,l.setAttribute("aria-hidden","true"),l.appendChild((()=>{const e=document.createElementNS(zS,"svg");return e.setAttribute("width","14"),e.setAttribute("height","14"),e.setAttribute("viewBox","0 0 14 14"),e.setAttribute("fill","none"),e.setAttribute("class","header-menu-icon header-menu-icon-none"),e.setAttribute("aria-hidden","true"),[{x:"1",y:"2.75",width:"12"},{x:"3",y:"6.25",width:"8"},{x:"5",y:"9.75",width:"4"}].forEach((t=>{const n=document.createElementNS(zS,"rect");n.setAttribute("x",t.x),n.setAttribute("y",t.y),n.setAttribute("width",t.width),n.setAttribute("height","1.5"),n.setAttribute("rx","0.75"),n.setAttribute("fill","currentColor"),e.appendChild(n)})),e})()),i.appendChild(l),e.appendChild(n),e.appendChild(i),t.appendChild(e)}else t.textContent=o;d.appendChild(t)})),c.appendChild(d),u.appendChild(c);const f=document.createElement("tbody"),p=e.reduce(((e,r)=>{var o;if(!t.has(r.id))return e;const i=(null===(o=n[r.id])||void 0===o?void 0:o.length)||1;return Math.max(e,i)}),1);for(let i=0;i<p;i++){const l=document.createElement("tr");l.className="table-row measurement-row",e.forEach((e=>{var a;const u=document.createElement("td"),c=WS(e.id);
1u.className=["table-cell",c].filter(Boolean).join(" "),u.setAttribute("data-column-id",e.id);const d=document.createElement("div");if(d.className="cell-content","responsiveFit"!==s&&o.has(e.id)&&"button"!==e.dataType){var f;let t=0;"image"===e.dataType&&null!==(f=e.imageSize)&&void 0!==f&&f.width?t=e.imageSize.width:"number"==typeof e.width?t=e.width:"string"==typeof e.width&&e.width.endsWith("px")&&(t=parseFloat(e.width.slice(0,-2)));const n=document.createElement("div");n.style.cssText=`width: ${t}px; height: ${t}px; display: inline-block;`,d.appendChild(n)}else if("responsiveFit"===s&&"image"===e.dataType&&null!==(a=e.imageSize)&&void 0!==a&&a.width){var p;const t=document.createElement("div");t.style.cssText=`width: ${e.imageSize.width}px; height: ${null!==(p=e.imageSize.height)&&void 0!==p?p:e.imageSize.width}px; display: inline-block;`,d.appendChild(t)}else if(t.has(e.id)){var h,g;const t=n[e.id]||[],r=null!==(h=null!==(g=t[i])&&void 0!==g?g:t[0])&&void 0!==h?h:"";d.innerHTML=BS(r)}else d.textContent=r[e.id]||"";u.appendChild(d),l.appendChild(u)})),f.appendChild(l)}if(u.appendChild(f),"legacyFit"===s){const e=document.createElement("div");return e.style.cssText=`width: ${null!=a?a:0}px; max-width: ${null!=a?a:0}px;`,e.appendChild(u),{hostNode:e,table:u}}return{hostNode:u,table:u}},t_=(e,t)=>{const n={},r={},o=new Set,i=e.querySelectorAll("th[data-column-id]"),l=e.querySelectorAll("td[data-column-id]");i.forEach((e=>{const t=e.getAttribute("data-column-id");if(!t)return;const o=e.getBoundingClientRect().width;r[t]=Math.max(r[t]||0,(e=>{const t=getComputedStyle(e),n=LS(t.paddingLeft)+LS(t.paddingRight),r=e.querySelector(".table-header-cell-wrapper"),o=(e=>{const t=e.textContent||"";if(0===t.trim().length)return 0;const n=document.createElement("span"),r=getComputedStyle(e);n.textContent=t,n.style.position="absolute",n.style.visibility="hidden",n.style.pointerEvents="none",n.style.whiteSpace="nowrap",n.style.overflowWrap="normal",n.style.wordBreak="normal",n.style.display="inline-block",n.style.width="auto",n.style.maxWidth="none",n.style.font=r.font,n.style.letterSpacing=r.letterSpacing,n.style.textTransform=r.textTransform,document.body.appendChild(n);const o=n.getBoundingClientRect().width;return n.remove(),o})((r||e).querySelector(".table-header-label")||e);if(o<=0)return 0;const i=null==r?void 0:r.querySelector(".header-menu"),l=null==r?void 0:r.querySelector(".header-menu-trigger"),s=Math.max((null==i?void 0:i.getBoundingClientRect().width)||0,(null==l?void 0:l.getBoundingClientRect().width)||0),a=r?getComputedStyle(r):null,u=r&&s>0?LS((null==a?void 0:a.columnGap)||(null==a?void 0:a.gap)||"0"):0;return Math.ceil(o+s+u+n)})(e)),n[t]=Math.max(n[t]||0,o)})),l.forEach((e=>{const r=e.getAttribute("data-column-id");if(!r)return;if("responsiveFit"===t)return;if("natural"===t){const t=(e=>{const t=e.getBoundingClientRect();if(t.width<=0)return{requiredWidth:0,shouldAvoidExpansion:!1};let n=t.left,r=t.right;e.querySelectorAll("*").forEach((e=>{const t=getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility)return;const o=e.getBoundingClientRect();o.width<=0||o.height<=0||(n=Math.min(n,o.left),r=Math.max(r,o.right))}));const o=Math.max(0,t.left-n),i=Math.max(0,r-t.right),l=DS(e),s=null!==e.querySelector("button, a.button"),a=null!==e.querySelector('.multi-cart-check, .wpt-multi-checkbox, input[type="checkbox"]');return{requiredWidth:t.width+o+i+l,shouldAvoidExpansion:s&&a}})(e),i=t.requiredWidth;return n[r]=Math.max(n[r]||0,i),void(t.shouldAvoidExpansion&&o.add(r))}const i=e.getBoundingClientRect().width;n[r]=Math.max(n[r]||0,i)}));let s=24;if("natural"===t){const e=l[0];if(e){const t=getComputedStyle(e);s=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)}}const a=e.offsetWidth,u=Object.values(n).reduce(((e,t)=>e+t),0),c=Math.max(0,a-u);return{widths:n,headerIntrinsicWidths:r,cellPadding:s,borderOverhead:c,noExpandColumnIds:o}};function n_(e,t,n,r){const[o,i]=yt({}),[l,s]=yt({}),[a,u]=yt({}),[c,d]=yt({}),[f,p]=yt(24),[h,g]=yt(0),[m,v]=yt(!1),[y,b]=yt(new Set),w=_t(0),S=Ct((()=>((e,t)=>{const n=new Set,r=new Set,o=new Set,i=[];return e.forEach((e=>{if("button"!==e.dataType)return;o.add(e.id);const l=e.accessor||e.id,s=t.map((e=>$S(e[l]))).filter((e=>null!==e&&(e=>{if(!e||"undefined"==typeof document)return!1;const t=document.createElement("template");return t.innerHTML=e,Array.from(t.content.querySelectorAll('[data-dv-column-layout="flexible"]')).some((e=>"SCRIPT"!==e.tagName))})(e)));s.length>0?(n.add(e.id),i.push(`${e.id}:${(e=>{const t=Array.from(new Set(e)).sort();let n=2166136261;return t.forEach((e=>{for(let t=0;t<e.length;t++)n^=e.charCodeAt(t),n=Math.imul(n,16777619);n^=255,n=Math.imul(n,16777619)})),`${t.length.toString(36)}.${(n>>>0).toString(36)}`})(s)}`)):r.add(e.id)}
1)),{flexibleColumnIds:n,compactColumnIds:r,minimumProtectedColumnIds:o,markedContentSignature:i.sort().join(",")}})(e,t)),[e,t]),_=_t(!1),x=_t({}),C=_t({}),E=`${Ct((()=>e.map((e=>{var t,n,r;return`${e.id}:${null!==(t=e.width)&&void 0!==t?t:"auto"}:${null!==(n=null===(r=e.imageSize)||void 0===r?void 0:r.width)&&void 0!==n?n:""}`})).join("|")),[e])}:flexible:${S.markedContentSignature}`,R=Ct((()=>r<=0?0:Math.max(10,10*Math.round(r/10))),[r]),I=_t(E);return St((()=>{E!==I.current&&(_.current=!1,x.current={},C.current={},i({}),s({}),u({}),d({}),b(new Set),v(!1),I.current=E)}),[E]),St((()=>{if(0===t.length)return void v(!0);if(!n.current||0===r||0===R)return;const o=`${E}:${R}`,l=x.current[o],a=C.current[o],c=!_.current;if(!c&&l&&a)return u(l),d(a),void v(!0);c&&v(!1);const f=e.filter((e=>{const t=e.width;return!t||"auto"===t||!YS(t)&&!(e=>"string"==typeof e&&e.endsWith("%"))(t)})),h=e.filter((e=>YS(e.width))),m=e.filter(QS),y=XS([...f,...h]),S=XS([...y,...m]),I=new Set(h.map((e=>e.id)));if(0===y.length&&0===m.length){c&&(i({}),s({}),b(new Set),_.current=!0);const e=l||{};return l||(x.current[o]=e),a||(C.current[o]=e),u(e),d(a||e),void v(!0)}const k={},P={},O=new Set,M=new Set(S.filter((e=>"html"===e.dataType||"button"===e.dataType)).map((e=>e.id)));S.forEach((e=>{const n=e.accessor||e.id;if(M.has(e.id)){const o=[];t.forEach((e=>{const t=e[n],r=$S(t);null!==r&&o.push(r)}));const i="combined-column"===(null===(r=e.metadata)||void 0===r?void 0:r.measurement)||o.some(JS),l=i?(e=>{const t=new Map;return e.forEach((e=>{KS(e).forEach((e=>{HS(t,e)}))})),US(t)})(o):[],s=l.length>0?l:(e=>{const t=new Map;return e.forEach((e=>{HS(t,e)})),US(t)})(o);return i&&O.add(e.id),void(P[e.id]=s.length>0?s:[i?"":String(e.header||"Column")])}var r;let o=0,i="";const l=String(e.header||"");l.length>o&&(o=l.length,i=l),t.forEach((e=>{const t=(e=>{if(null==e)return"";if(qS(e)){var t;const n=VS(String(null!==(t=e.separator)&&void 0!==t?t:", ")).replace(/\s+$/,""),r=n?`${n} `:" ";return e.items.map((e=>{var t;return String(null!==(t=e.name)&&void 0!==t?t:"")})).filter(Boolean).join(r)}return"object"==typeof e?"[object]":VS(String(e))})(e[n]);t.length>o&&(o=t.length,i=t)})),k[e.id]=i||e.header||"Column"}));const T=document.createElement("div");T.style.cssText="position: absolute; visibility: hidden; pointer-events: none; z-index: -1000; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clear: both;",T.className="barn2-dataview measurement-wrapper";let A=null;if(c&&y.length>0){const e=e_({columnsToMeasure:y,htmlColumnIds:M,htmlMeasureCandidates:P,textMeasureContent:k,pixelColumnIds:I,contentLineColumnIds:O,mode:"natural"});A=e.table,T.appendChild(e.hostNode)}let N=null;if(!l&&y.length>0){const e=e_({columnsToMeasure:y,htmlColumnIds:M,htmlMeasureCandidates:P,textMeasureContent:k,pixelColumnIds:I,contentLineColumnIds:O,mode:"legacyFit",constrainedWidth:R});N=e.table,T.appendChild(e.hostNode)}let F=null;if(!a&&m.length>0){const e=e_({columnsToMeasure:m,htmlColumnIds:M,htmlMeasureCandidates:P,textMeasureContent:k,pixelColumnIds:I,contentLineColumnIds:O,mode:"responsiveFit"});F=e.table,T.appendChild(e.hostNode)}const z=++w.current;return n.current.appendChild(T),requestAnimationFrame((()=>{if(z===w.current)try{if(c){if(A){const e=t_(A,"natural");i(e.widths),s(e.headerIntrinsicWidths),b(e.noExpandColumnIds),p(e.cellPadding),g(e.borderOverhead)}else i({}),s({}),b(new Set);_.current=!0}let e=l||{};l||(N&&(e=t_(N,"legacyFit").widths),x.current[o]=e);let t=a||e;a||(F&&(t=((e,t)=>{const n={...e.headerIntrinsicWidths};return t.forEach((t=>{if("image"!==t.dataType&&"button"!==t.dataType)return;const r=e.widths[t.id]||0;r>0&&(n[t.id]=Math.max(n[t.id]||0,r))})),n})(t_(F,"responsiveFit"),m)),C.current[o]=t),!l&&O.size>0&&Object.keys(e).length>0&&(e=((e,t,n)=>{const r={...e};let o=0;if(t.forEach((e=>{r[e]>0&&(r[e]+=48,o+=48)})),o<=0)return r;const i=Object.keys(r).filter((e=>!t.has(e)&&!n.has(e)&&r[e]>50));let l=o;for(;l>.01&&i.length>0;){const e=i.map((e=>({columnId:e,capacity:Math.max(0,r[e]-50)}))),t=e.reduce(((e,t)=>e+t.capacity),0);if(t<=0)break;let n=0;if(e.forEach((({columnId:e,capacity:o})=>{if(o<=0)return;const i=Math.min(o,l*o/t);r[e]-=i,n+=i})),n<=0)break;l-=n}return r})(e,O,I),x.current[o]=e),u(e),d(t)}catch{const e=l||{},t=a||e;c&&(_.current=!0),x.current[o]=e,C.current[o]=t,u(e),d(t)}finally{T.remove(),v(!0)}else T.remove()})),()=>{T.parentNode&&T.remove()}}
1),[e,t,n,r,R,E,o]),{naturalWidths:o,headerIntrinsicWidths:l,legacyFitWidths:a,responsiveFitWidths:c,cellPadding:f,borderOverhead:h,ready:m,compactColumnIds:Ct((()=>{const e=new Set([...y,...S.compactColumnIds]);return S.flexibleColumnIds.forEach((t=>e.delete(t))),e}),[y,S]),minimumProtectedColumnIds:Ct((()=>new Set([...y,...S.minimumProtectedColumnIds])),[y,S])}}const r_=50;function o_(e,t,n,r,o=24,i=0){const l=t-i,s=Et((e=>{var t;if("image"===e.dataType&&null!==(t=e.imageSize)&&void 0!==t&&t.width)return{type:"pixel",value:e.imageSize.width+o};const n=e.width;return n&&"auto"!==n?"number"==typeof n?{type:"pixel",value:n}:"string"==typeof n&&n.endsWith("%")?{type:"percentage",value:parseFloat(n.slice(0,-1))}:"string"==typeof n&&n.endsWith("px")?{type:"pixel",value:parseFloat(n.slice(0,-2))}:{type:"auto",value:0}:{type:"auto",value:0}}),[o]),a=Et((e=>Math.max(0,(null==n?void 0:n[e])||0)),[n]),u=Et((e=>Math.max(r_,a(e))),[a]),c=Et((e=>Math.min(u(e),120)),[u]),d=Et((e=>!("__responsive_control__"===e.id||null!=r&&r.has(e.id))&&"image"!==e.dataType),[r]),f=Et((e=>"__responsive_control__"!==e.id),[]),p=Et((e=>{if("__responsive_control__"===e.id)return e.parsedWidth.value||r_;if("image"===e.dataType||null!=r&&r.has(e.id)){const t=a(e.id);return t>0&&"pixel"===e.parsedWidth.type?Math.min(e.parsedWidth.value,t):"pixel"===e.parsedWidth.type?e.parsedWidth.value:r_}return r_}),[a,r]),h=Et(((e,t)=>{const n={};if(0===e.length||t<=0)return n;const r=e.map((e=>({id:e.id,weight:u(e.id)}))),o=r.reduce(((e,t)=>e+t.weight),0);return r.forEach((r=>{n[r.id]=o>0?t*r.weight/o:t/e.length})),n}),[u]),g=Et(((e,t)=>{const n={};if(0===e.length||t<=0)return n;const r=e.map((e=>({id:e.id,minimum:c(e.id),weight:u(e.id)}))),o=r.reduce(((e,t)=>e+t.minimum),0);if(o>=t){const o=r.reduce(((e,t)=>e+t.minimum),0);return r.forEach((r=>{n[r.id]=o>0?t*r.minimum/o:t/e.length})),n}r.forEach((e=>{n[e.id]=e.minimum}));const i=t-o,l=r.reduce(((e,t)=>e+t.weight),0);return r.forEach((t=>{const r=l>0?t.weight/l:1/e.length;n[t.id]+=i*r})),n}),[c,u]),m=Et(((e,t,n)=>{const r=e.reduce(((e,n)=>e+(t[n.id]||0)),0);if(r<=n+.5)return t;const o={...t};let i=r-n,l=e.filter(f).map((e=>({id:e.id,capacity:Math.max(0,(o[e.id]||0)-p(e))}))).filter((e=>e.capacity>0));for(;i>.5&&l.length>0;){const e=l.reduce(((e,t)=>e+t.capacity),0);if(e<=0)break;let t=0;if(l=l.map((n=>{const r=Math.min(n.capacity,i*n.capacity/e);return o[n.id]-=r,t+=r,{...n,capacity:n.capacity-r}})).filter((e=>e.capacity>.5)),t<=0)break;i-=t}return o}),[f,p]),v=Et(((e,t,n)=>{const r=e.reduce(((e,n)=>e+(t[n.id]||0)),0);if(r<=0||Math.abs(r-n)<=.5)return t;const o={...t};if(r<n){const t=e.filter(d);if(0===t.length)return o;const i=n-r,l=t.reduce(((e,t)=>e+Math.max(r_,o[t.id]||0)),0);return t.forEach((e=>{const n=Math.max(r_,o[e.id]||0),r=l>0?n/l:1/t.length;o[e.id]=(o[e.id]||0)+i*r})),o}return m(e,o,n)}),[d,m]),y=Et((t=>{if(!t||0===e.length)return{};const n=e.map((e=>({...e,parsedWidth:s(e)}))),r=n.some((e=>"percentage"===e.parsedWidth.type)),o=n.some((e=>"pixel"===e.parsedWidth.type)),i=n.filter((e=>"auto"===e.parsedWidth.type)),l=n.filter((e=>"pixel"===e.parsedWidth.type)),a=n.filter((e=>"percentage"===e.parsedWidth.type)),u=a.reduce(((e,t)=>e+t.parsedWidth.value),0);if(!r&&!o)return h(n,t);if(r){const e={};let r=0;l.forEach((t=>{e[t.id]=t.parsedWidth.value,r+=t.parsedWidth.value}));const s=i.reduce(((e,t)=>e+c(t.id)),0),d=l.reduce(((e,t)=>e+p(t)),0),f=t*u/100,h=Math.max(0,t-d-s);let y=f;if(o||0!==i.length?f>h&&(y=h):y=t,u>0&&a.forEach((t=>{e[t.id]=y*t.parsedWidth.value/u})),l.length>0){const n=Math.max(0,t-y-s);r>n&&Object.assign(e,m(l,e,n))}if(i.length>0){const n=Math.max(0,t-Object.values(e).reduce(((e,t)=>e+t),0)),r=g(i,n);Object.assign(e,r)}return v(n,e,t)}if(o){const e={};let r=0;if(l.forEach((t=>{e[t.id]=t.parsedWidth.value,r+=t.parsedWidth.value})),i.length>0){const n=Math.max(0,t-r),o=g(i,n);Object.assign(e,o)}return v(n,e,t)}return{}}),[e,s,h,c,g,v]);return{widths:Ct((()=>y(l)),[l,y]),tableWidth:l}}const i_={desktop:1/0,"tablet-l":1024,"tablet-p":768,"mobile-l":480,"mobile-p":320},l_=(e,t)=>{const n=Object.entries(t).sort(((e,t)=>e[1]-t[1]));for(const[t,r]of n)if(e<=r)return t;return"desktop"},s_=e=>e.trim().toLowerCase().replace(/_/g,"-"),a_=(e,t,n)=>{if(0===e.length)return null;if(e.includes("never"))return"never";if(e.includes("all"))return!0;
1if(e.includes("none"))return!1;const r=(e=>Object.entries(e).sort(((e,t)=>e[1]-t[1])).map((([e])=>e)))(n),o=r.indexOf(t);for(const n of e)if(n.startsWith("not-")&&n.slice(4)===t)return!1;for(const t of e)if(t.startsWith("min-")){const e=t.slice(4);if(o>=r.indexOf(e))return!0}for(const t of e)if(t.startsWith("max-")){const e=t.slice(4);if(o<=r.indexOf(e))return!0}return!!e.some((e=>r.includes(e)&&e===t))||!e.some((e=>r.includes(e)||e.startsWith("not-")||e.startsWith("min-")||e.startsWith("max-")))},u_=(e,t,n,r,o=100)=>{const i=r[e];if(i&&i>0)return i;const l=t.width;if("number"==typeof l||"string"==typeof l&&(l.endsWith("px")||l.endsWith("%")))return o;const s=n[e];return s&&s>0?Math.max(s,o):o},c_=(e,t,n,r,o,i={})=>{const l=new Set,s=new Set,a=new Set,u=[];for(const n of e){var c,d;if(null!==(c=n.responsive)&&void 0!==c&&c.never){a.add(n.id);continue}const e=(f=null===(d=n.responsive)||void 0===d?void 0:d.breakpoints)?(e=>{const t=[];for(const n of e){const e=n.match(/^not-(.+)$/),r=n.match(/^min-(.+)$/),o=n.match(/^max-(.+)$/);if(e){const r=e[1];"tablet"===r?t.push("not-tablet-l","not-tablet-p"):"mobile"===r?t.push("not-mobile-l","not-mobile-p"):t.push(n)}else if(r){const e=r[1];"tablet"===e?t.push("min-tablet-p"):"mobile"===e?t.push("min-mobile-p"):t.push(n)}else if(o){const e=o[1];"tablet"===e?t.push("max-tablet-l"):"mobile"===e?t.push("max-mobile-l"):t.push(n)}else"tablet"===n?t.push("tablet-l","tablet-p"):"mobile"===n?t.push("mobile-l","mobile-p"):t.push(n)}return t})((Array.isArray(f)?f.flatMap((e=>String(e).split(/[\s,]+/))):f.split(/[\s,]+/)).map(s_).filter(Boolean).filter((e=>"default"!==e))):[],r=a_(e,t,o);"never"===r?a.add(n.id):null===r?u.push(n):!0===r?l.add(n.id):s.add(n.id)}var f;if(u.length>0){let t=0;for(const n of l){const o=e.find((e=>e.id===n));t+=o?u_(n,o,r,i,100):i[n]||r[n]||100}const o=((e,t,n,r={})=>{const o=(e=>e.map((e=>{var t,n;return{...e,priority:null!==(t=null===(n=e.column.responsive)||void 0===n?void 0:n.priority)&&void 0!==t?t:1e4+e.index}})).sort(((e,t)=>e.priority!==t.priority?e.priority-t.priority:e.index-t.index)))(e.map(((e,t)=>({column:e,index:t})))),i=new Set;let l=0;for(const{column:e}of o){const o=u_(e.id,e,n,r,100);if(!(l+o<=t))break;i.add(e.id),l+=o}return 0===i.size&&o.length>0&&i.add(o[0].column.id),i})(u,n-t,r,i);for(const e of u)o.has(e.id)?l.add(e.id):s.add(e.id)}return{visibleColumns:l,hiddenColumns:s,neverColumns:a}},d_=()=>"undefined"==typeof window?1024:window.innerWidth||document.documentElement.clientWidth,f_=(e,t)=>{const n="undefined"==typeof window?"":window.location.hash.replace(/^#/,""),r=new URLSearchParams(n);r.delete("page"),r.set(`_${e}`,String(t));const o=r.toString();return"undefined"==typeof window?o?`#${o}`:"#":`${window.location.pathname}${window.location.search}${o?`#${o}`:""}`},p_=e=>{if(!e)return[];const t=String(e);return t.includes(", ")?t.split(", ").map((e=>e.trim())):t.includes(",")?t.split(",").map((e=>e.trim())):t.includes(" | ")?t.split(" | ").map((e=>e.trim())):t.includes("|")?t.split("|").map((e=>e.trim())):t.includes("; ")?t.split("; ").map((e=>e.trim())):t.includes(";")?t.split(";").map((e=>e.trim())):[t.trim()]},h_=({value:e,filterOptions:t,filterId:n,onFilterClick:r,valueParser:o,currentFilterValue:i})=>{const{i18n:l}=xi(),s=Ct((()=>(o||p_)(e).map(bi)),[e,o]),a=Ct((()=>(e=>{const t=[],n=e=>{e.forEach((e=>{t.push(e),e.children&&n(e.children)}))};return n(e),t})(t)),[t]),u=Ct((()=>{const e=new Map;return a.forEach((t=>{e.set(bi(t.label).toLowerCase(),t.value)})),e}),[a]),c=Ct((()=>{if(!i)return new Set;const e=Array.isArray(i)?i:[i];return new Set(e.map(Zy))}),[i]),d=e=>{const t=e.toLowerCase(),n=u.get(t);return void 0!==n?n:null},f=e=>c.has(Zy(e));if(1===s.length){const e=s[0],t=d(e);return null===t||f(t)?jo(Ae,{children:e}):jo("a",{href:f_(n,t),className:"clickable-filter-term",onClick:e=>{e.preventDefault(),r(t)},"aria-label":l.filterByTerm({term:e}),children:e})}return jo(Ae,{children:s.map(((e,t)=>{const o=d(e),i=t===s.length-1;return jo(Ae,null!==o?f(o)?{children:[jo("span",{children:e}),!i&&jo("span",{children:", "})]}:{children:[jo("a",{href:f_(n,o),className:"clickable-filter-term",onClick:e=>{e.preventDefault(),r(o)},"aria-label":l.filterByTerm({term:e}),children:e}),!i&&jo("span",{children:", "})]}:{children:[jo("span",{children:e}),!i&&jo("span",{children:", "})]},t)}))})},g_="carousel",m_="controller",v_="portal",y_="toolbar",b_="fullscreen",w_="thumbnails",S_="loading",x_="error",C_="complete",E_="flex_center",R_="no_scroll_padding",I_="slide",k_="prev",P_="next",O_="swipe",M_="close",T_="onPointerDown",A_="onPointerMove",N_="onPointerUp",F_="onPointerLeave",z_="onPointerCancel",D_="onKeyDown",L_="onWheel",V_="icon",q_="contain",$_="cover",j_="yarl__";function W_(...e){return e.filter(Boolean).join(" ")}function B_(e){return`${j_}${e}`}function H_(e){return`--${j_}${e}`}function U_(e,t){return`${e}${t?`_${t}`:""}`}function G_(e){return t=>U_(e,t)}function Z_(e,t){var n;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:t}function K_(e,t,n){return Z_(e,"{index} of {total}").replace(/\{index}/g,`${rx(n,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function J_(...e){return()=>{e.forEach((e=>{e()}))}}function Y_(e,t,n){return()=>{const r=Rt(n);if(!r)throw new Error(`${e} must be used within a ${t}.Provider`);return r}}function X_(){return"undefined"!=typeof window}function Q_(e){return void 0===e.type||"image"===e.type}function ex(e){return"string"==typeof e?Number.parseInt(e,10):e}function tx(e){if("number"==typeof e)return{pixel:e};if("string"==typeof e){const t=ex(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function nx(e,t){const n=tx(t),r=void 0!==n.percent?e.width/100*n.percent:n.pixel;return{width:Math.max(e.width-2*r,0),height:Math.max(e.height-2*r,0)}}function rx(e,t){return t>0?(e%t+t)%t:0}function ox(e){return e.length>0}function ix(e,t){return e[rx(t,e.length)]}function lx(e,t){return ox(e)?ix(e,t):void 0}function sx(e){return Q_(e)?e.src:void 0}
1function ax(e,t,n){if(!n)return e;const{buttons:r,...o}=e,i=r.findIndex((e=>e===t)),l=kn(n)?Mn(n,{key:t},null):n;if(i>=0){const e=[...r];return e.splice(i,1,l),{buttons:e,...o}}return{buttons:[l,...r],...o}}const ux=Number(Rn.split(".")[0])>=19,cx={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[M_]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:q_,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,closeOnEscape:!0,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function dx(e,t){return{name:e,component:t}}function fx(e,t){return{module:e,children:t}}function px(e,t,n){return e.module.name===t?n(e):e.children?[fx(e.module,e.children.flatMap((e=>{var r;return null!==(r=px(e,t,n))&&void 0!==r?r:[]})))]:[e]}function hx(e,t,n){return e.flatMap((e=>{var r;return null!==(r=px(e,t,n))&&void 0!==r?r:[]}))}const gx=rt(null),mx=Y_("useA11yContext","A11yContext",gx);function vx({children:e}){const[t,n]=yt(!1),[r,o]=yt(!1),i=Ct((()=>({focusWithin:t,trackFocusWithin:(e,t)=>{const r=r=>o=>{var i;o.currentTarget.contains(o.relatedTarget)||n(r),null===(i=r?e:t)||void 0===i||i(o)};return{onFocus:r(!0),onBlur:r(!1)}},autoPlaying:r,setAutoPlaying:o})),[t,r]);return Oe(gx.Provider,{value:i},e)}const yx=rt(null),bx=Y_("useDocument","DocumentContext",yx);function wx({nodeRef:e,children:t}){const n=Ct((()=>{const t=t=>{var n;return(null===(n=t||e.current)||void 0===n?void 0:n.ownerDocument)||document};return{getOwnerDocument:t,getOwnerWindow:e=>{var n;return(null===(n=t(e))||void 0===n?void 0:n.defaultView)||window}}}),[e]);return Oe(yx.Provider,{value:n},t)}const Sx=rt(null),xx=Y_("useEvents","EventsContext",Sx);function Cx({children:e}){const[t]=yt({});wt((()=>()=>{Object.keys(t).forEach((e=>delete t[e]))}),[t]);const n=Ct((()=>{const e=(e,n)=>{var r;null===(r=t[e])||void 0===r||r.splice(0,t[e].length,...t[e].filter((e=>e!==n)))};return{publish:(...[e,n])=>{var r;null===(r=t[e])||void 0===r||r.forEach((e=>e(n)))},subscribe:(n,r)=>(t[n]||(t[n]=[]),t[n].push(r),()=>e(n,r)),unsubscribe:e}}),[t]);return Oe(Sx.Provider,{value:n},e)}const Ex=rt(null),Rx=Y_("useLightboxProps","LightboxPropsContext",Ex);function Ix({children:e,...t}){return Oe(Ex.Provider,{value:t},e)}const kx=rt(null),Px=Y_("useLightboxState","LightboxStateContext",kx),Ox=rt(null),Mx=Y_("useLightboxDispatch","LightboxDispatchContext",Ox);function Tx(e,t){switch(t.type){case"swipe":{const{slides:n}=e,r=(null==t?void 0:t.increment)||0,o=e.globalIndex+r,i=rx(o,n.length);return{slides:n,currentIndex:i,globalIndex:o,currentSlide:lx(n,i),animation:r||void 0!==t.duration?{increment:r,duration:t.duration,easing:t.easing}:void 0}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:lx(t.slides,t.index)}:e;default:throw new Error("Unknown action type")}}function Ax({slides:e,index:t,children:n}){const[r,o]=bt(Tx,{slides:e,currentIndex:t,globalIndex:t,currentSlide:lx(e,t)}),[i,l]=yt(e),[s,a]=yt(t);e===i&&t===s||(l(e),a(t),o({type:"update",slides:e,index:t}));const u=Ct((()=>({...r,state:r,dispatch:o})),[r,o]);return Oe(Ox.Provider,{value:o},Oe(kx.Provider,{value:u},n))}const Nx=rt(null),Fx=Y_("useRTLContext","RTLContext",Nx);function zx({isRTL:e,children:t}){const n=Ct((()=>({isRTL:e})),[e]);return Oe(Nx.Provider,{value:n},t)}const Dx=rt(null),Lx=Y_("useTimeouts","TimeoutsContext",Dx);function Vx({children:e}){const[t]=yt([]);wt((()=>()=>{t.forEach((e=>window.clearTimeout(e))),t.splice(0,t.length)}),[t]);const n=Ct((()=>{const e=e=>{t.splice(0,t.length,...t.filter((t=>t!==e)))};return{setTimeout:(n,r)=>{const o=window.setTimeout((()=>{e(o),n()}),r);return t.push(o),o},clearTimeout:t=>{void 0!==t&&(e(t),window.clearTimeout(t))}}}),[t]);return Oe(Dx.Provider,{value:n},e)}const qx=Zt((function({label:e,className:t,icon:n,renderIcon:r,onClick:o,style:i,...l},s){const{styles:a,labels:u}=Rx(),c=Z_(u,e);
1return Oe("button",{ref:s,type:"button",title:c,"aria-label":c,className:W_(B_("button"),t),onClick:o,style:{...i,...a.button},...l},r?r():Oe(n,{className:B_(V_),style:a.icon}))}));function $x(e,t){return function(e,t){const n=e=>Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...e},t);return n.displayName=e,n}(e,Oe("g",{fill:"currentColor"},Oe("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const jx=$x("Close",Oe("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),Wx=$x("Previous",Oe("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Bx=$x("Next",Oe("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Hx=$x("Loading",Oe(Ae,null,Array.from({length:8}).map(((e,t,n)=>Oe("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(t+1),transform:`rotate(${360/n.length*t}, 12, 12)`}))))),Ux=$x("Error",Oe("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Gx=X_()?St:wt;function Zx(){const[e,t]=yt(!1);return wt((()=>{var e,n;const r=null===(e=window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-reduced-motion: reduce)");t(null==r?void 0:r.matches);const o=e=>t(e.matches);return null===(n=null==r?void 0:r.addEventListener)||void 0===n||n.call(r,"change",o),()=>{var e;return null===(e=null==r?void 0:r.removeEventListener)||void 0===e?void 0:e.call(r,"change",o)}}),[]),e}function Kx(e,t){const n=_t(void 0),r=_t(void 0),o=Zx();return Gx((()=>{var i,l,s;if(e.current&&void 0!==n.current&&!o){const{keyframes:o,duration:a,easing:u,onfinish:c}=t(n.current,e.current.getBoundingClientRect(),function(e){let t=0,n=0,r=0;const o=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(o){const e=o[1].split(",").map(ex);6===e.length?(t=e[4],n=e[5]):16===e.length&&(t=e[12],n=e[13],r=e[14])}return{x:t,y:n,z:r}}(e.current))||{};if(o&&a){null===(i=r.current)||void 0===i||i.cancel(),r.current=void 0;try{r.current=null===(s=(l=e.current).animate)||void 0===s?void 0:s.call(l,o,{duration:a,easing:u})}catch(e){console.error(e)}r.current&&(r.current.onfinish=()=>{r.current=void 0,null==c||c()})}}n.current=void 0})),{prepareAnimation:e=>{n.current=e},isAnimationPlaying:()=>{var e;return"running"===(null===(e=r.current)||void 0===e?void 0:e.playState)}}}function Jx(){const e=_t(null),t=_t(void 0),[n,r]=yt(),o=Et((n=>{e.current=n,t.current&&(t.current.disconnect(),t.current=void 0);const o=()=>{if(n){const e=window.getComputedStyle(n),t=e=>parseFloat(e)||0;r({width:Math.round(n.clientWidth-t(e.paddingLeft)-t(e.paddingRight)),height:Math.round(n.clientHeight-t(e.paddingTop)-t(e.paddingBottom))})}else r(void 0)};o(),n&&"undefined"!=typeof ResizeObserver&&(t.current=new ResizeObserver(o),t.current.observe(n))}),[]);return{setContainerRef:o,containerRef:e,containerRect:n}}function Yx(){const e=_t(void 0),{setTimeout:t,clearTimeout:n}=Lx();return Et(((r,o)=>{n(e.current),e.current=t(r,o>0?o:0)}),[t,n])}function Xx(e){const t=_t(e);return Gx((()=>{t.current=e})),Et(((...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function Qx(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function eC(e,t){return Ct((()=>null==e&&null==t?null:n=>{Qx(e,n),Qx(t,n)}),[e,t])}function tC(e,t=!1){const n=_t(!1);return Gx((()=>{t&&n.current&&(n.current=!1,e())}),[t,e]),{onFocus:Et((()=>{n.current=!0}),[]),onBlur:Et((()=>{n.current=!1}),[])}}function nC(){return Fx().isRTL}function rC(e,t){const n=_t(0),r=Yx(),o=Xx(((...t)=>{n.current=Date.now(),e(t)}));return Et(((...e)=>{r((()=>{o(e)}),t-(Date.now()-n.current))}),[t,o,r])}const oC=G_("slide"),iC=G_("slide_image");function lC({slide:e,offset:t,render:n,rect:r,imageFit:o,imageProps:i,onClick:l,onLoad:s,onError:a,style:u}){var c,d,f,p,h,g,m,v;const[y,b]=yt(S_),{publish:w}=xx(),{setTimeout:S}=Lx(),_=_t(null);
1wt((()=>{0===t&&w((e=>`active-slide-${e}`)(y))}),[t,y,w]);const x=Xx((e=>{("decode"in e?e.decode():Promise.resolve()).catch((()=>{})).then((()=>{e.parentNode&&(b(C_),S((()=>{null==s||s(e)}),0))}))})),C=Et((e=>{_.current=e,(null==e?void 0:e.complete)&&x(e)}),[x]),E=Et((e=>{x(e.currentTarget)}),[x]),R=Xx((()=>{b(x_),null==a||a()})),I=function(e,t){return e.imageFit===$_||e.imageFit!==q_&&t===$_}(e,o),k=(e,t)=>Number.isFinite(e)?e:t,P=k(Math.max(...(null!==(d=null===(c=e.srcSet)||void 0===c?void 0:c.map((e=>e.width)))&&void 0!==d?d:[]).concat(e.width?[e.width]:[]).filter(Boolean)),(null===(f=_.current)||void 0===f?void 0:f.naturalWidth)||0),O=k(Math.max(...(null!==(h=null===(p=e.srcSet)||void 0===p?void 0:p.map((e=>e.height)))&&void 0!==h?h:[]).concat(e.height?[e.height]:[]).filter(Boolean)),(null===(g=_.current)||void 0===g?void 0:g.naturalHeight)||0),M=P&&O?{maxWidth:`min(${P}px, 100%)`,maxHeight:`min(${O}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},T=null===(m=e.srcSet)||void 0===m?void 0:m.slice().sort(((e,t)=>e.width-t.width)).map((e=>`${e.src}
1 ${e.width}w`)).join(", "),A=T&&r&&X_()?`${Math.round(Math.min(r&&!I&&e.width&&e.height?r.height/e.height*e.width:Number.MAX_VALUE,r.width))}px`:void 0,{style:N,className:F,...z}=("function"==typeof i?i(e):i)||{};return Oe(Ae,null,Oe("img",{ref:C,onLoad:E,onError:R,onClick:l,draggable:!1,className:W_(B_(iC()),I&&B_(iC("cover")),y!==C_&&B_(iC("loading")),F),style:{...M,...u,...N},...z,alt:null!==(v=e.alt)&&void 0!==v?v:"",sizes:A,srcSet:T,src:e.src}),y!==C_&&Oe("div",{className:B_(oC("placeholder"))},y===S_&&((null==n?void 0:n.iconLoading)?n.iconLoading():Oe(Hx,{className:W_(B_(V_),B_(oC(S_)))})),y===x_&&((null==n?void 0:n.iconError)?n.iconError():Oe(Ux,{className:W_(B_(V_),B_(oC(x_)))}))))}const sC=Zt((function({className:e,children:t,onFocus:n,onBlur:r,...o},i){const l=_t(null),[s,a]=yt(!1),{trackFocusWithin:u}=mx();return wt(Xx((()=>{if(l.current){const e="rtl"===window.getComputedStyle(l.current).direction;e!==s&&a(e)}}))),Oe(wx,{nodeRef:l},Oe(zx,{isRTL:s},Oe("div",{ref:eC(i,l),className:W_(B_("root"),e),...u(n,r),...o},t)))}));var aC,uC;!function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"}(aC||(aC={})),function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"}(uC||(uC={}));const cC=G_("container"),dC=rt(null),fC=Y_("useController","ControllerContext",dC),pC=dx(m_,(function({children:e,...t}){var n;const{carousel:r,animation:o,controller:i,on:l,styles:s,render:a}=t,{closeOnPullUp:u,closeOnPullDown:c,preventDefaultWheelX:d,preventDefaultWheelY:f}=i,[p,h]=yt(),g=Px(),m=Mx(),[v,y]=yt(aC.NONE),b=_t(0),w=_t(0),S=_t(1),{registerSensors:_,subscribeSensors:x}=function(){const[e]=yt({}),t=Et(((t,n)=>{var r;null===(r=e[t])||void 0===r||r.forEach((e=>{n.isPropagationStopped()||e(n)}))}),[e]);return{registerSensors:Ct((()=>({onPointerDown:e=>t(T_,e),onPointerMove:e=>t(A_,e),onPointerUp:e=>t(N_,e),onPointerLeave:e=>t(F_,e),onPointerCancel:e=>t(z_,e),onKeyDown:e=>t(D_,e),onKeyUp:e=>t("onKeyUp",e),onWheel:e=>t(L_,e)})),[t]),subscribeSensors:Et(((t,n)=>(e[t]||(e[t]=[]),e[t].unshift(n),()=>{const r=e[t];r&&r.splice(0,r.length,...r.filter((e=>e!==n)))})),[e])}}(),{subscribe:C,publish:E}=xx(),R=Yx(),I=Yx(),k=Yx(),{containerRef:P,setContainerRef:O,containerRect:M}=Jx(),T=eC(function({preventDefaultWheelX:e,preventDefaultWheelY:t}){const n=_t(null),r=Xx((n=>{const r=Math.abs(n.deltaX)>Math.abs(n.deltaY);(r&&e||!r&&t||n.ctrlKey)&&n.preventDefault()}));return Et((e=>{var t;e?e.addEventListener("wheel",r,{passive:!1}):null===(t=n.current)||void 0===t||t.removeEventListener("wheel",r),n.current=e}),[r])}({preventDefaultWheelX:d,preventDefaultWheelY:f}),O),A=_t(null),N=eC(A,void 0),{getOwnerDocument:F}=bx(),z=nC(),D=e=>(z?-1:1)*("number"==typeof e?e:1),L=Xx((()=>{var e;return null===(e=P.current)||void 0===e?void 0:e.focus()})),V=Xx((()=>t)),q=Xx((()=>g)),$=Et((e=>E(k_,e)),[E]),j=Et((e=>E(P_,e)),[E]),W=Et((()=>E(M_)),[E]),B=e=>!(r.finite&&(D(e)>0&&0===g.currentIndex||D(e)<0&&g.currentIndex===g.slides.length-1)),H=e=>{var t;b.current=e,null===(t=P.current)||void 0===t||t.style.setProperty(H_("swipe_offset"),`${Math.round(e)}px`)},U=e=>{var t,n;w.current=e,S.current=(()=>{const t=c&&e>0?e:u&&e<0?-e:0;return Math.min(Math.max(function(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}(1-t/60*.5,2),.5),1)})(),null===(t=P.current)||void 0===t||t.style.setProperty(H_("pull_offset"),`${Math.round(e)}px`),null===(n=P.current)||void 0===n||n.style.setProperty(H_("pull_opacity"),`${S.current}`)},{prepareAnimation:G}=Kx(A,((e,t,n)=>{if(A.current&&M)return{keyframes:[{transform:`translate(0, ${e.rect.y-t.y+n.y}px)`,opacity:e.opacity},{transform:"translate(0, 0)",opacity:1}],duration:e.duration,easing:o.easing.fade}})),Z=(e,t)=>{if(u||c){U(e);let n=0;A.current&&(n=o.fade*(t?2:1),G({rect:A.current.getBoundingClientRect(),opacity:S.current,duration:n})),k((()=>{U(0),y(aC.NONE)}),n),y(aC.ANIMATION),t||W()}},{prepareAnimation:K,isAnimationPlaying:J}=Kx(A,((e,t,n)=>{var o;if(A.current&&M&&(null===(o=g.animation)||void 0===o?void 0:o.duration)){const o=tx(r.spacing),i=(o.percent?o.percent*M.width/100:o.pixel)||0;return{keyframes:[{transform:`translate(${D(g.globalIndex-e.index)*(M.width+i)+e.rect.x-t.x+n.x}
1px, 0)`},{transform:"translate(0, 0)"}],duration:g.animation.duration,easing:g.animation.easing}}})),Y=Xx((e=>{var t,n;const r=e.offset||0,i=r?o.swipe:null!==(t=o.navigation)&&void 0!==t?t:o.swipe,l=r||J()?o.easing.swipe:o.easing.navigation;let{direction:s}=e;const a=null!==(n=e.count)&&void 0!==n?n:1;let u=aC.ANIMATION,c=i*a;if(!s){const t=null==M?void 0:M.width,n=e.duration||0,o=t?i/t*Math.abs(r):i;0!==a?(n<o?c=c/o*Math.max(n,o/5):t&&(c=i/t*(t-Math.abs(r))),s=D(r)>0?k_:P_):c=i/2}let d=0;s===k_?B(D(1))?d=-a:(u=aC.NONE,c=i):s===P_&&(B(D(-1))?d=a:(u=aC.NONE,c=i)),c=Math.round(c),I((()=>{H(0),y(aC.NONE)}),c),A.current&&K({rect:A.current.getBoundingClientRect(),index:g.globalIndex}),y(u),E(O_,{type:"swipe",increment:d,duration:c,easing:l})}));wt((()=>{var e,t;(null===(e=g.animation)||void 0===e?void 0:e.increment)&&(null===(t=g.animation)||void 0===t?void 0:t.duration)&&R((()=>m({type:"swipe",increment:0})),g.animation.duration)}),[g.animation,m,R]);const X=[x,B,(null==M?void 0:M.width)||0,o.swipe,()=>y(aC.SWIPE),e=>H(e),(e,t)=>Y({offset:e,duration:t,count:1}),e=>Y({offset:e,count:0})],Q=[()=>{c&&y(aC.PULL)},e=>U(e),e=>Z(e),e=>Z(e,!0)];(function({disableSwipeNavigation:e,closeOnBackdropClick:t},n,r,o,i,l,s,a,u,c,d,f,p,h,g,m){const v=_t(0),y=_t([]),b=_t(void 0),w=_t(0),S=_t(uC.NONE),_=Et((e=>{b.current===e.pointerId&&(b.current=void 0,S.current=uC.NONE);const t=y.current;t.splice(0,t.length,...t.filter((t=>t.pointerId!==e.pointerId)))}),[]),x=Et((e=>{_(e),e.persist(),y.current.push(e)}),[_]),C=Et((e=>y.current.find((({pointerId:t})=>e.pointerId===t))),[]),E=Xx((e=>{x(e)})),R=(e,t)=>d&&e>t||c&&e<-t,I=Xx((e=>{const n=C(e);if(n)if(b.current===e.pointerId){const e=Date.now()-w.current,t=v.current;S.current===uC.SWIPE?Math.abs(t)>.3*o||Math.abs(t)>5&&e<i?a(t,e):u(t):S.current===uC.PULL&&(R(t,60)?h(t,e):g(t)),v.current=0,S.current=uC.NONE}else{const{target:r}=e;t&&r instanceof HTMLElement&&r===n.target&&(r.classList.contains(B_(I_))||r.classList.contains(B_("slide_wrapper")))&&m()}_(e)}));!function(e,t,n,r){wt((()=>J_(e(T_,t),e(A_,n),e(N_,r),e(F_,r),e(z_,r))),[e,t,n,r,void 0])}(n,E,Xx((t=>{const n=C(t);if(n){const o=b.current===t.pointerId;if(0===t.buttons)return void(o&&0!==v.current?I(t):_(n));const i=t.clientX-n.clientX,a=t.clientY-n.clientY;if(void 0===b.current){const n=e=>{x(t),b.current=t.pointerId,w.current=Date.now(),S.current=e};Math.abs(i)>Math.abs(a)&&Math.abs(i)>30&&r(i)?e||(n(uC.SWIPE),l()):Math.abs(a)>Math.abs(i)&&R(a,30)&&(n(uC.PULL),f())}else o&&(S.current===uC.SWIPE?(v.current=i,s(i)):S.current===uC.PULL&&(v.current=a,p(a)))}})),I)})(i,...X,u,c,...Q,W),function(e,t,n,r,o,i,l,s,a){const u=_t(0),c=_t(0),d=_t(void 0),f=_t(void 0),p=_t(0),h=_t(void 0),g=_t(0),{setTimeout:m,clearTimeout:v}=Lx(),y=Et((()=>{d.current&&(v(d.current),d.current=void 0)}),[v]),b=Et((()=>{f.current&&(v(f.current),f.current=void 0)}),[v]),w=Xx((()=>{e!==aC.SWIPE&&(u.current=0,g.current=0,y(),b())}));wt(w,[e,w]);const S=Xx((e=>{f.current=void 0,u.current===e&&a(u.current)})),_=Xx((t=>{if(t.ctrlKey)return;if(Math.abs(t.deltaY)>Math.abs(t.deltaX))return;const a=e=>{p.current=e,v(h.current),h.current=e>0?m((()=>{p.current=0,h.current=void 0}),300):void 0};if(e===aC.NONE){if(Math.abs(t.deltaX)<=1.2*Math.abs(p.current))return void a(t.deltaX);if(!n(-t.deltaX))return;if(c.current+=t.deltaX,y(),Math.abs(c.current)>30)c.current=0,a(0),g.current=Date.now(),i();else{const e=c.current;d.current=m((()=>{d.current=void 0,e===c.current&&(c.current=0)}),o)}}else if(e===aC.SWIPE){let e=u.current-t.deltaX;if(e=Math.min(Math.abs(e),r)*Math.sign(e),u.current=e,l(e),b(),Math.abs(e)>.2*r)return a(t.deltaX),void s(e,Date.now()-g.current);f.current=m((()=>S(e)),2*o)}else a(t.deltaX)}));wt((()=>t(L_,_)),[t,_])}(v,...X);const ee=Xx((()=>{i.focus&&F().querySelector(`.${B_(v_)} .${B_(cC())}`)&&L()}));wt(ee,[ee]);const te=Xx((()=>{var e;null===(e=l.view)||void 0===e||e.call(l,{index:g.currentIndex})}));wt(te,[g.globalIndex,te]),wt((()=>J_(C(k_,(e=>Y({direction:k_,...e}))),C(P_,(e=>Y({direction:P_,...e}))),C(O_,(e=>m(e))))),[C,Y,m]);const ne=Ct((()=>({prev:$,next:j,close:W,focus:L,slideRect:M?nx(M,r.padding):{width:0,height:0},containerRect:M||{width:0,height:0},subscribeSensors:x,containerRef:P,setCarouselRef:N,toolbarWidth:p,setToolbarWidth:h})),[$,j,W,L,x,M,P,N,p,h,r.padding]);return xt(i.ref,(()=>({prev:$,next:j,close:W,focus:L,getLightboxProps:V,getLightboxState:q}
1)),[$,j,W,L,V,q]),Oe("div",{ref:T,className:W_(B_(cC()),B_(E_)),style:{...v===aC.SWIPE?{[H_("swipe_offset")]:`${Math.round(b.current)}px`}:null,...v===aC.PULL?{[H_("pull_offset")]:`${Math.round(w.current)}px`,[H_("pull_opacity")]:`${S.current}`}:null,..."none"!==i.touchAction?{[H_("controller_touch_action")]:i.touchAction}:null,...s.container},tabIndex:-1,..._},M&&Oe(dC.Provider,{value:ne},e,null===(n=a.controls)||void 0===n?void 0:n.call(a)))}));function hC(e){return U_(g_,e)}function gC(e){return U_(I_,e)}function mC({slide:e,offset:t}){const n=_t(null),{currentIndex:r,slides:o}=Px(),{slideRect:i,focus:l}=fC(),{render:s,carousel:{imageFit:a,imageProps:u},on:{click:c},styles:{slide:d},labels:f}=Rx(),{getOwnerDocument:p}=bx(),h=0!==t;return wt((()=>{var e;h&&(null===(e=n.current)||void 0===e?void 0:e.contains(p().activeElement))&&l()}),[h,l,p]),Oe("div",{ref:n,className:W_(B_(gC()),!h&&B_(gC("current")),B_(E_)),...(g=h,{inert:ux?g:g?"":void 0}),style:d,role:"group","aria-roledescription":Z_(f,"Slide"),"aria-label":K_(f,o,r+t)},(()=>{var n,o,l,d;let f=null===(n=s.slide)||void 0===n?void 0:n.call(s,{slide:e,offset:t,rect:i});return!f&&Q_(e)&&(f=Oe(lC,{slide:e,offset:t,render:s,rect:i,imageFit:a,imageProps:u,onClick:h?void 0:()=>null==c?void 0:c({index:r})})),f?Oe(Ae,null,null===(o=s.slideHeader)||void 0===o?void 0:o.call(s,{slide:e}),(null!==(l=s.slideContainer)&&void 0!==l?l:({children:e})=>e)({slide:e,children:f}),null===(d=s.slideFooter)||void 0===d?void 0:d.call(s,{slide:e})):null})());var g}function vC(){const e=Rx().styles.slide;return Oe("div",{className:B_(I_),style:e})}const yC=dx(g_,(function({carousel:e,labels:t}){const{slides:n,currentIndex:r,globalIndex:o}=Px(),{setCarouselRef:i}=fC(),{autoPlaying:l,focusWithin:s}=mx(),a=tx(e.spacing),u=tx(e.padding),c=function(e,t,n=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),n))}(e,n,1),d=[];if(ox(n))for(let t=r-c;t<=r+c;t+=1){const i=ix(n,t),l=o-r+t,s=e.finite&&(t<0||t>n.length-1);d.push(s?{key:l}:{key:[`${l}`,sx(i)].filter(Boolean).join("|"),offset:t-r,slide:i})}return Oe("div",{ref:i,className:W_(B_(hC()),d.length>0&&B_(hC("with_slides"))),style:{[`${H_(hC("slides_count"))}`]:d.length,[`${H_(hC("spacing_px"))}`]:a.pixel||0,[`${H_(hC("spacing_percent"))}`]:a.percent||0,[`${H_(hC("padding_px"))}`]:u.pixel||0,[`${H_(hC("padding_percent"))}`]:u.percent||0},role:"region","aria-live":l&&!s?"off":"polite","aria-roledescription":Z_(t,"Carousel"),"aria-label":Z_(t,"Photo gallery")},d.map((({key:e,slide:t,offset:n})=>t?Oe(mC,{key:e,slide:t,offset:n}):Oe(vC,{key:e}))))}));function bC(){const{carousel:e}=Rx(),{slides:t,currentIndex:n}=Px();return{prevDisabled:0===t.length||e.finite&&0===n,nextDisabled:0===t.length||e.finite&&n===t.length-1}}function wC({label:e,icon:t,renderIcon:n,action:r,onClick:o,disabled:i,style:l}){return Oe(qx,{label:e,icon:t,renderIcon:n,className:B_(`navigation_${r}`),disabled:i,onClick:o,style:l,...tC(fC().focus,i)})}const SC=dx("navigation",(function({render:{buttonPrev:e,buttonNext:t,iconPrev:n,iconNext:r},styles:o}){const{prev:i,next:l,subscribeSensors:s}=fC(),{prevDisabled:a,nextDisabled:u}=bC();return function(e){var t;const n=nC(),{publish:r}=xx(),{animation:o,controller:i}=Rx(),{prevDisabled:l,nextDisabled:s}=bC(),a=(null!==(t=o.navigation)&&void 0!==t?t:o.swipe)/2,u=rC((()=>r(k_)),a),c=rC((()=>r(P_)),a),d=Xx((e=>{switch(e.key){case"Escape":if(!i.closeOnEscape)return;r(M_);break;case"ArrowLeft":(n?s:l)||(n?c:u)();break;case"ArrowRight":(n?l:s)||(n?u:c)();break;default:return}e.stopPropagation()}));wt((()=>e(D_,d)),[e,d])}(s),Oe(Ae,null,e?e():Oe(wC,{label:"Previous",action:k_,icon:Wx,renderIcon:n,style:o.navigationPrev,disabled:a,onClick:i}),t?t():Oe(wC,{label:"Next",action:P_,icon:Bx,renderIcon:r,style:o.navigationNext,disabled:u,onClick:l}))})),_C=B_("no_scroll"),xC=B_(R_);function CC(e){return"style"in e}function EC(e,t,n){const r=window.getComputedStyle(e),o=n?"padding-left":"padding-right",i=n?r.paddingLeft:r.paddingRight,l=e.style.getPropertyValue(o);return e.style.setProperty(o,`${(ex(i)||0)+t}px`),()=>{l?e.style.setProperty(o,l):e.style.removeProperty(o)}}const RC=dx("no-scroll",(function({noScroll:{disabled:e}
1,children:t}){const n=nC(),{getOwnerDocument:r,getOwnerWindow:o}=bx();return wt((()=>{if(e)return()=>{};const t=[],i=o(),{body:l,documentElement:s}=r(),a=Math.round(i.innerWidth-s.clientWidth);if(a>0){t.push(EC(l,a,n));const e=l.getElementsByTagName("*");for(let r=0;r<e.length;r+=1){const o=e[r];CC(o)&&"fixed"===i.getComputedStyle(o).getPropertyValue("position")&&!o.classList.contains(xC)&&t.push(EC(o,a,n))}}return l.classList.add(_C),()=>{l.classList.remove(_C),t.forEach((e=>e()))}}),[n,e,r,o]),Oe(Ae,null,t)}));function IC(e){return U_(v_,e)}function kC(e,t,n){const r=e.getAttribute(t);return e.setAttribute(t,n),()=>{r?e.setAttribute(t,r):e.removeAttribute(t)}}const PC=dx(v_,(function({portal:{root:e,container:{className:t,style:n,...r}={}},animation:o,styles:i,className:l,on:s,close:a,labels:u,children:c}){const[d,f]=yt(!1),[p,h]=yt(!1),g=_t([]),m=_t(null),{setTimeout:v}=Lx(),{subscribe:y}=xx(),b=Zx()?0:o.fade;wt((()=>(f(!0),()=>{f(!1),h(!1)})),[]);const w=Xx((()=>{g.current.forEach((e=>e())),g.current=[]})),S=Xx((()=>{var e;h(!1),w(),null===(e=s.exiting)||void 0===e||e.call(s),v((()=>{var e;null===(e=s.exited)||void 0===e||e.call(s),a()}),b)}));wt((()=>y(M_,S)),[y,S]);const _=Xx((e=>{var t,n,r;!function(e){e.scrollTop}(e),h(!0),null===(t=s.entering)||void 0===t||t.call(s);const o=null!==(r=null===(n=e.parentNode)||void 0===n?void 0:n.children)&&void 0!==r?r:[];for(let t=0;t<o.length;t+=1){const n=o[t];-1===["TEMPLATE","SCRIPT","STYLE"].indexOf(n.tagName)&&n!==e&&(g.current.push(kC(n,"inert","")),g.current.push(kC(n,"aria-hidden","true")))}g.current.push((()=>{var e,t;null===(t=null===(e=m.current)||void 0===e?void 0:e.focus)||void 0===t||t.call(e)})),v((()=>{var e;null===(e=s.entered)||void 0===e||e.call(s)}),b)})),x=Et((e=>{e?_(e):w()}),[_,w]);return d?un(Oe(sC,{ref:x,className:W_(l,t,B_(IC()),B_(R_),p&&B_(IC("open"))),"aria-modal":!0,role:"dialog","aria-label":Z_(u,"Lightbox"),style:{...o.fade!==cx.animation.fade?{[H_("fade_animation_duration")]:`${b}ms`}:null,...o.easing.fade!==cx.animation.easing.fade?{[H_("fade_animation_timing_function")]:o.easing.fade}:null,...i.root,...n},onFocus:e=>{m.current||(m.current=e.relatedTarget)},...r},c),("function"==typeof e?e():e)||document.body):null})),OC=dx("root",(function({children:e}){return Oe(Ae,null,e)})),MC=dx(y_,(function({toolbar:{buttons:e},render:{buttonClose:t,iconClose:n},styles:r}){const{close:o,setToolbarWidth:i}=fC(),{setContainerRef:l,containerRect:s}=Jx();return Gx((()=>{i(null==s?void 0:s.width)}),[i,null==s?void 0:s.width]),Oe("div",{ref:l,style:r.toolbar,className:B_(U_(y_,undefined))},null==e?void 0:e.map((e=>e===M_?t?t():Oe(qx,{key:M_,label:"Close",icon:jx,renderIcon:n,onClick:o}):e)))}));function TC(e,t){var n;return Oe(e.module.component,{key:e.module.name,...t},null===(n=e.children)||void 0===n?void 0:n.map((e=>TC(e,t))))}function AC(e,t={}){const{easing:n,...r}=e,{easing:o,...i}=t;return{easing:{...n,...o},...r,...i}}function NC({carousel:e,animation:t,render:n,toolbar:r,controller:o,noScroll:i,on:l,plugins:s,slides:a,index:u,...c}){const{animation:d,carousel:f,render:p,toolbar:h,controller:g,noScroll:m,on:v,slides:y,index:b,plugins:w,...S}=cx,{config:_,augmentation:x}=function(e,t=[],n=[]){let r=e;const o=e=>{const t=[...r];for(;t.length>0;){const n=t.pop();if((null==n?void 0:n.module.name)===e)return!0;(null==n?void 0:n.children)&&t.push(...n.children)}return!1},i=(e,t)=>{r=""!==e?hx(r,e,(e=>[fx(t,[e])])):[fx(t,r)]},l=(e,t)=>{r=hx(r,e,(e=>[fx(e.module,[fx(t,e.children)])]))},s=(e,t,n)=>{r=hx(r,e,(e=>{var r;return[fx(e.module,[...n?[fx(t)]:[],...null!==(r=e.children)&&void 0!==r?r:[],...n?[]:[fx(t)]])]}))},a=(e,t,n)=>{r=hx(r,e,(e=>[...n?[fx(t)]:[],e,...n?[]:[fx(t)]]))},u=e=>{l(m_,e)},c=(e,t)=>{r=hx(r,e,(e=>[fx(t,e.children)]))},d=e=>{r=hx(r,e,(e=>e.children))},f=e=>{n.push(e)};return t.forEach((e=>{e({contains:o,addParent:i,append:l,addChild:s,addSibling:a,addModule:u,replace:c,remove:d,augment:f})})),{config:r,augmentation:e=>n.reduce(((e,t)=>t(e)),e)}}([fx(PC,[fx(RC,[fx(pC,[fx(yC),fx(MC),fx(SC)])])])],s||w),C=x({animation:AC(d,t),carousel:{...f,...e},render:{...p,...n},toolbar:{...h,...r},controller:{...g,...o},noScroll:{...m,...i},on:{...v,...l},...S,...c});return C.open?Oe(Ix,{...C},Oe(Ax,{slides:a||y,index:ex(u||b)},Oe(Vx,null,Oe(Cx,null,Oe(vx,null,TC(fx(OC,_),C)))))):null}const FC={auto:!1,ref:null},zC=e=>({...FC,...e}),DC=rt(null),LC=Y_("useFullscreen","FullscreenContext",DC);function VC({fullscreen:e,on:t,children:n}){const{auto:r,ref:o}=zC(e),i=_t(null),[l,s]=yt(),[a,u]=yt(!1),c=_t(!1),{getOwnerDocument:d}=bx();Gx((()=>{var e,t,n,r;const o=d();s(!(null!==(r=null!==(n=null!==(t=null!==(e=o.fullscreenEnabled)&&void 0!==e?e:o.webkitFullscreenEnabled)&&void 0!==t?t:o.mozFullScreenEnabled)&&void 0!==n?n:o.msFullscreenEnabled)&&void 0!==r&&r))}),[d]);const f=Et((()=>{var e;const t=d(),n=t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement;return(null===(e=null==n?void 0:n.shadowRoot)||void 0===e?void 0:e.fullscreenElement)||n}),[d]),p=Et((()=>{const e=i.current;try{e.requestFullscreen?e.requestFullscreen().catch((()=>{})):e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}catch(e){}}),[]),h=Et((()=>
1{if(!f())return;const e=d();try{e.exitFullscreen?e.exitFullscreen().catch((()=>{})):e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()}catch(e){}}),[f,d]);wt((()=>{const e=d(),t=()=>{u(f()===i.current)};return J_(...["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].map((n=>(e.addEventListener(n,t),()=>e.removeEventListener(n,t)))))}),[f,d]);const g=Xx((()=>{var e;return null===(e=t.enterFullscreen)||void 0===e?void 0:e.call(t)})),m=Xx((()=>{var e;return null===(e=t.exitFullscreen)||void 0===e?void 0:e.call(t)}));wt((()=>{a&&(c.current=!0),c.current&&(a?g:m)()}),[a,g,m]);const v=Xx((()=>{var e;return null===(e=r?p:null)||void 0===e||e(),h}));wt(v,[v]);const y=Ct((()=>({fullscreen:a,disabled:l,enter:p,exit:h})),[a,l,p,h]);return xt(o,(()=>y),[y]),Oe("div",{ref:i,className:W_(B_(b_),B_("fullsize"))},Oe(DC.Provider,{value:y},n))}const qC=$x("EnterFullscreen",Oe("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})),$C=$x("ExitFullscreen",Oe("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}));function jC(){var e;const{fullscreen:t,disabled:n,enter:r,exit:o}=LC(),{render:i}=Rx();return n?null:i.buttonFullscreen?Oe(Ae,null,null===(e=i.buttonFullscreen)||void 0===e?void 0:e.call(i,{fullscreen:t,disabled:n,enter:r,exit:o})):Oe(qx,{disabled:n,label:t?"Exit Fullscreen":"Enter Fullscreen",icon:t?$C:qC,renderIcon:t?i.iconExitFullscreen:i.iconEnterFullscreen,onClick:t?o:r})}function WC({augment:e,contains:t,addParent:n}){e((({fullscreen:e,toolbar:t,...n})=>({toolbar:ax(t,b_,Oe(jC,null)),fullscreen:zC(e),...n}))),n(t(w_)?w_:m_,dx(b_,VC))}function BC({isOpen:e,imageUrl:t,caption:n,enableFullscreen:r=!0,onClose:o}){const{i18n:i}=xi();if(wt((()=>{if(!e)return;const t=e=>{"Escape"===e.key&&o()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)}),[e,o]),!e||!t)return null;const l={src:t,alt:n||i.image,title:n||void 0};return jo(NC,{open:e,close:o,slides:[l],plugins:r?[WC]:[],render:{slideFooter:n?()=>jo("div",{className:"yarl__caption",children:jo("div",{className:"yarl__caption_container",children:n})}):void 0,buttonPrev:()=>null,buttonNext:()=>null},carousel:{finite:!0},controller:{closeOnBackdropClick:!0},styles:{root:{"--yarl__color_backdrop":"rgba(0, 0, 0, 0.9)"}}})}const HC=({thumbnailUrl:e,largeImageUrl:t,alt:n="",caption:r,width:o=70,height:i=70,className:l=""})=>{const{i18n:s}=xi(),[a,u]=yt(!1),c=t||e,d=bi(n),f=r?bi(r):r,p=d||s.image,h=e=>{e.stopPropagation(),c&&u(!0)};return jo(Ae,{children:[jo("span",{className:`clickable-lightbox-image ${l}`,onClick:h,role:"button",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),h(e))},"aria-label":s.openLightboxFor({label:p}),style:{cursor:"pointer",display:"inline-block"},children:jo("img",{src:e,alt:d,loading:"lazy",width:o,height:i,style:{display:"block",maxWidth:"100%",height:"auto"}})}),a&&jo(BC,{isOpen:a,imageUrl:c,caption:f||d,onClose:()=>{u(!1)}})]})},UC=({data:e,columnId:t,clickToFilter:n=!1,filterOptions:r=[],onFilterChange:o,currentFilterValue:i})=>{const{i18n:l}=xi(),{separator:s,items:a}=e;if(!a||0===a.length)return null;const u=s.replace(/\s+$/,""),c=Ct((()=>(e=>{const t=[],n=e=>{for(const r of e)t.push(r),r.children&&n(r.children)};return n(e),t})(r)),[r]),d=Ct((()=>{if(!i)return new Set;const e=Array.isArray(i)?i:[i];return new Set(e.map(Zy))}),[i]);return jo(Ae,{children:a.map(((e,r)=>{const i=r===a.length-1,s=bi(e.name),f=n?((e,t)=>t.find((t=>t.value===e.slug))||t.find((t=>bi(t.label).toLowerCase()===bi(e.name).toLowerCase())))({...e,name:s},c):void 0,p=!!f&&d.has(Zy(f.value));let h;return h=f&&o&&!p?jo("a",{href:e.link||f_(t,f.value),rel:e.link?"tag":void 0,className:"clickable-filter-term",onClick:e=>{e.preventDefault(),o(t,f.value)},"aria-label":l.filterByTerm({term:s}),children:s}):n?jo("span",{children:s}):e.link?jo("a",{href:e.link,rel:"tag",children:s}):jo("span",{children:s}),jo(Ae,{children:[jo("span",{className:"taxonomy-term-group",children:[h,!i&&jo("span",{className:"taxonomy-separator",dangerouslySetInnerHTML:{__html:u}})]}),!i&&" "]},e.id)}))})},GC=({isExpanded:e,onClick:t,type:n,hasHiddenColumns:r})=>{const{i18n:o}=xi();return r?jo("button",{type:"button",className:ri("responsive-control",n,e&&"expanded"),onClick:e=>{e.stopPropagation(),t()},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),t())}
1,"aria-expanded":e,"aria-label":e?o.collapseRowDetails:o.expandRowDetails,tabIndex:0,children:jo("span",{className:"responsive-control-icon","aria-hidden":"true",children:jo("svg",e?{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jo("path",{d:"M3 8h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})}:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jo("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})})})}):null},ZC=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"].join(","),KC="dv-responsive-embed",JC=(e,t)=>{const n=e.getAttribute(t);if(null===n||""===n.trim())return null;const r=Number(n);return Number.isFinite(r)&&r>0?r:null},YC=e=>{const t=[];e instanceof HTMLElement&&e.matches(ZC)&&t.push(e),t.push(...Array.from(e.querySelectorAll(ZC))),t.forEach((e=>{if(!(e=>!e.classList.contains(KC)&&!e.classList.contains("fitvidsignore")&&!e.matches("object object, object embed"))(e))return;const[t,n]=(e=>{const t=JC(e,"width"),n=JC(e,"height");if(t&&n)return[t,n];const r=e.getBoundingClientRect();return r.width>0&&r.height>0?[r.width,r.height]:[16,9]})(e);e.style.setProperty("--dv-responsive-embed-ratio",`${t} / ${n}`),e.classList.add(KC)}))},XC=({html:e,className:t})=>{const n=_t(null);return St((()=>{n.current&&YC(n.current)}),[e]),jo("div",{ref:n,className:t,dangerouslySetInnerHTML:{__html:e}})},QC="__responsive_control__",eE={width:70,height:70},tE=e=>"object"==typeof e&&null!==e&&"dataType"in e&&"string"==typeof e.dataType,nE=e=>!(!e||"object"!=typeof e)&&(tE(e)&&"image"===e.dataType?"thumbnail"in e:"thumbnail"in e&&"string"==typeof e.thumbnail),rE=e=>tE(e)&&"taxonomy"===e.dataType&&"items"in e&&Array.isArray(e.items),oE=e=>e?nE(e)?e.thumbnail:"string"==typeof e?e:null:null,iE=e=>nE(e)?bi(e.alt||""):"",lE={text:e=>e?bi(String(e)):"",number:e=>(e=>{if(null==e)return"";const t=Number(e);return isNaN(t)?String(e):t.toLocaleString("en-US")})(e),date:e=>(e=>{if(!e)return"";try{const t=new Date(e);return isNaN(t.getTime())?String(e):t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return String(e)}})(e),html:e=>jo(XC,{html:e||""}),image:(e,t)=>{const n=oE(e);if(!n)return null;const r=(null==t?void 0:t.imageSize)||eE,o=jo("img",{src:n,alt:iE(e),style:{width:`${r.width}px`,height:`${r.height}px`,objectFit:"contain"}}),i=(e=>{if(nE(e))return e.link})(e);return i?jo("a",{href:i,children:o}):o},button:e=>jo(XC,{html:e||""})},sE=e=>{const t=(e=>e&&"auto"!==e?"number"==typeof e?{type:"pixel",value:e,original:e}:"string"==typeof e&&e.endsWith("%")?{type:"percentage",value:parseFloat(e.slice(0,-1)),original:e}:"string"==typeof e&&e.endsWith("px")?{type:"pixel",value:parseFloat(e.slice(0,-2)),original:e}:{type:"auto",value:0,original:e}:{type:"auto",value:0,original:e})(e);return"pixel"===t.type?t.value:150},aE=(e,t)=>null==e?void 0:e.find((e=>e.id===t||e.columnId===t)),uE=(e,t)=>{var n;return null==e||null===(n=e.find((e=>e.id===t)))||void 0===n?void 0:n.value},cE=[{name:"customRenderer",shouldApply:e=>!!e.customRenderer,createRenderer:e=>t=>jo(e.customRenderer,{value:t.getValue(),row:t.row.original,column:e})},{name:"structuredTaxonomy",shouldApply:e=>("image"!==e.dataType||!e.lightbox)&&!1!==e.filterable,createRenderer:(e,t)=>{const n=!!e.clickToFilter&&!1!==t.allowClickToFilter,r="object"==typeof e.clickToFilter?e.clickToFilter:{},o=r.filterTarget||e.id;return i=>{var l;const s=i.getValue();if(!rE(s)){if(n&&t.filters&&t.onFilterChange){var a;const e=aE(t.filters,o),n=(null==e?void 0:e.options)||[],i=null!==(a=null==e?void 0:e.id)&&void 0!==a?a:o;if(n.length>0){const e=uE(t.currentFilters,i);return jo(h_,{value:s,filterOptions:n,filterId:i,onFilterClick:e=>t.onFilterChange(i,e),valueParser:r.valueParser,currentFilterValue:e})}}return(0,lE[e.dataType])(s,e)}const u=aE(t.filters,o),c=(null==u?void 0:u.options)||[],d=null!==(l=null==u?void 0:u.id)&&void 0!==l?l:o,f=uE(t.currentFilters,d);return jo(UC,{data:s,columnId:d,clickToFilter:n,filterOptions:c,onFilterChange:n?t.onFilterChange:void 0,currentFilterValue:f})}}},{name:"clickToFilter",shouldApply:(e,t)=>{if(!e.clickToFilter||!t.filters||!t.onFilterChange||!1===t.allowClickToFilter)return!1;const n=("object"==typeof e.clickToFilter?e.clickToFilter:{}).filterTarget||e.id,r=aE(t.filters,n);return((null==r?void 0:r.options)||[]).length>0},createRenderer:(e,t)=>n=>{var r;const o=n.getValue(),i="object"==typeof e.clickToFilter?e.clickToFilter:{},l=i.filterTarget||e.id,s=i.valueParser,a=aE(t.filters,l),u=(null==a?void 0:a.options)||[],c=null!==(r=null==a?void 0:a.id)&&void 0!==r?r:l,d=uE(t.currentFilters,c);return jo(h_,{value:o,filterOptions:u,filterId:c,onFilterClick:e=>t.onFilterChange(c,e),valueParser:s,currentFilterValue:d})}},{name:"lightbox",shouldApply:e=>"image"===e.dataType&&!!e.lightbox,createRenderer:e=>t=>{var n,r;const o=t.getValue(),i=oE(o);if(!i)return null;const l="object"==typeof e.lightbox?e.lightbox:{},s=e.imageSize||eE,a=(e=>nE(e)?e.large||e.thumbnail:oE(e))(o)||(null===(n=l.getLargeImageUrl)||void 0===n?void 0:n.call(l,t.row.original))||i,u=(e=>{if(nE(e))return e.caption?bi(e.caption):e.caption})(o)||(null===(r=l.getCaption)||void 0===r?void 0:r.call(l,t.row.original)),c=iE(o);return jo(HC,{thumbnailUrl:i,largeImageUrl:a,alt:c,caption:u,width:s.width,height:s.height})}},{name:"default",shouldApply:()=>!0,createRenderer:e=>t=>(0,lE[e.dataType])(t.getValue(),e)}],dE=(e,t)=>{const n=(e=>null!=e?e:{})(t);for(const t of cE)if(t.shouldApply(e,n))return t.createRenderer(e,n);return()=>null},fE=(e,t)=>!(e.id!==QC&&!t.has(e.id))||"image"===e.dataType;function pE({columns:e,data:t,containerRef:n,containerWidth:r,responsiveConfig:o,loading:i,dataStateKey:l}){const s=null!==o,[a,u]=yt({}),c=_t({key:"",passes:0});wt((()=>{u({}),c.current={key:"",passes:0}}),[Ct((()=>e.map((e=>{var t;return`${e.id}:${null!==(t=e.width)&&void 0!==t?t:"auto"}`})).join("|")),[e])]);
1const{naturalWidths:d,headerIntrinsicWidths:f,legacyFitWidths:p,responsiveFitWidths:h,cellPadding:g,borderOverhead:m,ready:v,compactColumnIds:y,minimumProtectedColumnIds:b}=n_(e,t,n,r),w=Ct((()=>Object.keys(p).length>0?p:d),[p,d]),S=Ct((()=>{const e=Object.keys(a).length>0,t=y.size>0&&Object.keys(d).length>0;if(!e&&!t)return w;const n={...w};return t&&y.forEach((e=>{const t=d[e];t>0&&n[e]>t&&(n[e]=t)})),e&&Object.entries(a).forEach((([e,t])=>{n[e]=Math.max(n[e]||0,t)})),n}),[w,a,y,d]),{widths:_}=o_(e,r,S,y,g,m),x=Ct((()=>{if(0===b.size)return h;const e={...h};return b.forEach((t=>{const n=d[t]||0;n>0&&(e[t]=Math.max(e[t]||0,n))})),e}),[h,b,d]),C="column"===(null==o?void 0:o.control)?Math.max(0,r-50):r,E=(e=>{const{config:t,columns:n,columnWidths:r,measuredWidths:o={},containerWidth:i,data:l}=e,s=Ct((()=>{return e=null==t?void 0:t.breakpoints,{...i_,...e};var e}),[null==t?void 0:t.breakpoints]),[a,u]=yt((()=>{const e=d_();return l_(e,s)})),[c,d]=yt(new Set),f=_t(s);wt((()=>{f.current=s}),[s]);const p=Ct((()=>{const e=n.map(((e,t)=>({column:e,index:t})));return e.map((e=>{var t,n;return{...e,priority:null!==(t=null===(n=e.column.responsive)||void 0===n?void 0:n.priority)&&void 0!==t?t:1e4}})).sort(((e,t)=>e.priority-t.priority))}),[n]),{visibleColumns:h,hiddenColumns:g,neverColumns:m}=Ct((()=>{const e=10*Math.round(i/10),l=c_(n,a,e,r,s,o);if("inline"!==(null==t?void 0:t.control)||0===l.hiddenColumns.size)return l;const u=Math.max(0,e-36);return u===e?l:c_(n,a,u,r,s,o)}),[n,a,i,r,s,o,null==t?void 0:t.control,p]),v=g.size>0,y=Et((()=>{const e=d_(),t=l_(e,f.current);u((e=>t!==e?t:e))}),[]),b=Ct((()=>(e=>{let t=null;return(...n)=>{t&&clearTimeout(t),t=setTimeout((()=>{e(...n)}),150)}})(y)),[y]);wt((()=>(y(),window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)})),[b,y]);const w=Et((e=>{d((t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))}),[]),S=Et((e=>"childRowVisible"===(null==t?void 0:t.display)||c.has(e)),[c,null==t?void 0:t.display]),_=Ct((()=>{const e=[];return n.forEach(((t,n)=>{g.has(t.id)&&!m.has(t.id)&&e.push({id:t.id,index:n,header:bi(t.header),accessor:t.accessor})})),e}),[n,g,m]),x=Ct((()=>{const e=[];return n.forEach(((t,n)=>{m.has(t.id)||"__responsive_control__"===t.id||e.push({id:t.id,index:n,header:bi(t.header),accessor:t.accessor})})),e}),[n,m]),C=Et(((e,t)=>_.map((t=>{const n=t.accessor?e[t.accessor]:e[t.id];return{columnId:t.id,columnIndex:t.index,title:t.header,data:n}}))),[_]),E=Et(((e,t)=>x.map((t=>{const n=t.accessor?e[t.accessor]:e[t.id];return{columnId:t.id,columnIndex:t.index,title:t.header,data:n}}))),[x]),R=v;return wt((()=>{if("childRowVisible"===(null==t?void 0:t.display)&&v){const e=l.map(((e,t)=>String(e&&"object"==typeof e&&"id"in e?e.id:t)));d((t=>{const n=new Set(t);return e.forEach((e=>n.add(e))),n}))}else"childRowVisible"!==(null==t?void 0:t.display)&&d(new Set)}),[null==t?void 0:t.display,v,l]),{responsiveState:{currentBreakpoint:a,visibleColumns:h,hiddenColumns:g,neverColumns:m,expandedRows:c,isResponsiveMode:v},toggleRow:w,isRowExpanded:S,getHiddenColumnsForRow:C,getAllColumnsForRow:E,shouldShowControl:R}})({config:o,columns:e,columnWidths:_,measuredWidths:x,containerWidth:C,data:t}),R=Ct((()=>{let t=[...e];return t=t.filter((e=>!1!==e.visible)),s&&(t=t.filter((e=>E.responsiveState.visibleColumns.has(e.id))),"column"===(null==o?void 0:o.control)&&E.shouldShowControl&&(t=[{id:"__responsive_control__",header:"",dataType:"html",width:50,sortable:!1,filterable:!1,searchable:!1},...t])),t}),[e,s,o,E.responsiveState.visibleColumns,E.shouldShowControl]),I=Ct((()=>{if(!o||"inline"!==o.control||!E.shouldShowControl)return S;const e=R.find((e=>"__responsive_control__"!==e.id));if(!e)return S;const t=S[e.id]||0,n=(a[e.id]||0)>0;let r=t+36;if("image"===e.dataType&&!n){var i;const t=d[e.id]||0,n=null!==(i=e.imageSize)&&void 0!==i&&i.width?e.imageSize.width+g:0,o=Math.max(t,n);o>0&&(r=o+36+8)}return{...S,[e.id]:r}}),[S,o,E.shouldShowControl,R,a,d,g]),{widths:k}
1=o_(R,r,I,y,g,m),P=Ct((()=>{const e={...f,...h};if(b.forEach((t=>{const n=d[t]||0;n>0&&(e[t]=Math.max(e[t]||0,n))})),"inline"===(null==o?void 0:o.control)&&E.shouldShowControl){const t=R.find((e=>"__responsive_control__"!==e.id));if(t){const n=e[t.id]||0;e[t.id]=n+36}}return((e,t,n,r,o,i,l={})=>{if(n<=0||0===e.length)return t;const s=Math.max(0,n-r),a=e.reduce(((e,n)=>{const r=l[n.id]||0,s=i.has(n.id)?r:0,a=fE(n,o)?t[n.id]||0:50;return e+Math.max(a,s||r)}),0)<=s+.5,u={...t};e.forEach((e=>{const t=l[e.id]||0;t>0&&(a||i.has(e.id))&&(u[e.id]=Math.max(u[e.id]||0,t))}));let c=e.reduce(((e,t)=>e+(u[t.id]||0)),0)-s;if(c<=.5)return u;const d=e.filter((e=>!fE(e,o))).map((e=>({id:e.id,capacity:Math.max(0,(u[e.id]||0)-Math.max(50,i.has(e.id)&&l[e.id]||0,a&&l[e.id]||0))}))).filter((e=>e.capacity>0));if(0===d.length)return u;let f=d;for(;c>.5&&f.length>0;){const e=f.reduce(((e,t)=>e+t.capacity),0);if(e<=0)break;let t=0;const n=[];if(f.forEach((r=>{const o=c*r.capacity/e,i=Math.min(r.capacity,o);u[r.id]-=i,t+=i;const l=r.capacity-i;l>.5&&n.push({id:r.id,capacity:l})})),t<=0)break;c-=t,f=n}return u})(R,k,r,m,y,b,e)}),[R,k,r,m,y,b,f,h,d,o,E.shouldShowControl]),O=Ct((()=>JSON.stringify({dataStateKey:l,visibleColumns:R.map((e=>e.id)),dataLength:t.length})),[l,R,t.length]);wt((()=>{if(!v||i||0===t.length||!n.current)return;if(c.current.key!==O&&(c.current={key:O,passes:0}),c.current.passes>=2)return;const e=n.current.querySelectorAll("tbody td.table-cell[data-column-id] .cell-content"),r={};e.forEach((e=>{const t=e.closest("td[data-column-id]"),n=null==t?void 0:t.getAttribute("data-column-id");if(!t||!n||n===QC)return;const o=e.scrollWidth-e.clientWidth,i=DS(e),l=Math.max(o,i);if(l<=1)return;const s=P[n]||t.getBoundingClientRect().width,a=Math.ceil(s+l+4);r[n]=Math.max(r[n]||0,a)})),0!==Object.keys(r).length?(c.current.passes+=1,u((e=>{const t={...e};let n=!1;return Object.entries(r).forEach((([e,r])=>{r>(t[e]||0)&&(t[e]=r,n=!0)})),n?t:e}))):c.current.passes=2}),[v,i,t.length,P,O]);const M=E.responsiveState.hiddenColumns.size>0;return{visibleColumnConfigs:R,columnWidths:P,widthsReady:v,responsiveState:E.responsiveState,responsiveEnabled:s,hasHiddenColumns:M,shouldShowControl:E.shouldShowControl,isRowExpanded:E.isRowExpanded,toggleRow:E.toggleRow,getHiddenColumnsForRow:E.getHiddenColumnsForRow,getAllColumnsForRow:E.getAllColumnsForRow,responsiveConfig:o}}function hE({enabled:e,offset:t=0,targetRef:n,stateKey:r,loading:o=!1}){const i=_t(r),l=_t(!0);wt((()=>{if(l.current)return l.current=!1,void(i.current=r);if(!e)return;if(i.current===r)return;if(i.current=r,o)return;if(null==n||!n.current)return;const s=n.current.getBoundingClientRect();if(!(s.top>=t)){const e=window.pageYOffset+s.top-t;window.scrollTo({top:Math.max(0,e),behavior:"smooth"})}}),[r,o,e,t,n])}function gE({columnId:e,label:t}){const{i18n:n}=xi(),{containerRef:r,selectedItems:o,selectAll:i,deselectAll:l,isActionLoading:s}=Rt(Ci),[a,u]=yt(new Map),c=_t(null),d=Et((()=>{const t=null==r?void 0:r.current;u(t?((e,t)=>{const n=new Map;return e.querySelectorAll(bw).forEach((e=>{if(e.disabled)return;const r=e.closest("td[data-column-id]");if(!r||r.getAttribute("data-column-id")!==t)return;const o=e.getAttribute(yw);o&&!n.has(o)&&n.set(o,{id:o,attributes:ww(e)})})),n})(t,e):new Map)}),[r,e]);wt((()=>{d()}),[d]),wt((()=>{const e=null==r?void 0:r.current;if(!e)return;let t=null;const n=()=>{null!==t&&cancelAnimationFrame(t),t=requestAnimationFrame((()=>{t=null,d()}))},o=new MutationObserver(n);return o.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["disabled","data-column-id",yw]}),n(),()=>{o.disconnect(),null!==t&&cancelAnimationFrame(t)}}),[r,d]);const f=Ct((()=>Array.from(a.keys())),[a]),p=Ct((()=>f.reduce(((e,t)=>e+(o.has(t)?1:0)),0)),[f,o]),h=f.length,g=h>0&&p===h,m=p>0&&p<h;wt((()=>{c.current&&(c.current.indeterminate=m)}),[m]);const v=Et((e=>{e.currentTarget.checked?0!==a.size&&i(Array.from(a.values())):l()}),[l,i,a]),y=Et((e=>{e.stopPropagation()}),[]),b=Ct((()=>"dv-select-all"+(s?" is-disabled":"")),[s]);return 0===h?null:jo("label",{className:b,onClick:y,children:[jo("span",{className:"dv-select-all__text",children:bi(null!=t?t:n.selectAll)}),jo("span",{className:"dv-select-all__toggle",children:jo("input",{ref:c,type:"checkbox",className:"dv-select-all__input",checked:g,onClick:y,onChange:v,disabled:s})})]})}const mE=rt(void 0);function vE(e){const t=Rt(mE);if(void 0===t&&!e)throw new Error(rd(33));return t}const yE=rt(void 0);function bE(e){const t=Rt(yE);if(void 0===t&&!e)throw new Error(rd(36));return t}const wE=rt(void 0);function SE(e=!0){const t=Rt(wE);if(void 0===t&&!e)throw new Error(rd(25));return t}const _E={type:"regular-item"};const xE=rt(void 0),CE=Zt((function(e,t){const{render:n,className:r,style:o,...i}=e,[l,s]=yt(void 0),a=jh("div",e,{ref:t,props:{role:"group","aria-labelledby":l,...i}});return Zo.jsx(xE.Provider,{value:s,children:a})})),EE=Zt((function(e,t){const{render:n,className:r,style:o,id:i,...l}=e,s=fv(i),a=function(){const e=Rt(xE);if(void 0===e)throw new Error(rd(31));return e}();return Vc((()=>(a(s),()=>{a(void 0)})),[a,s]),jh("div",e,{ref:t,props:{id:s,role:"presentation",...l}})})),RE=Zt((function(e,t){const{render:n,className:r,id:o,label:i,nativeButton:l=!1,disabled:s=!1,closeOnClick:a=!0,style:u,...c}=e,d=My({label:i}),f=vE(!0),p=fv(o),{store:h}
1=bE(),g=h.useState("isActive",d.index),m=h.useState("itemProps"),{getItemProps:v,itemRef:y}=function(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:o,store:i,typingRef:l=i.context.typingRef,nativeButton:s,itemMetadata:a,nodeId:u}=e,c=i.useState("disabled"),d=n||c,f=_t(null),{getButtonProps:p,buttonRef:h}=Uv({disabled:d,focusableWhenDisabled:!0,native:s,composite:!0}),g=function(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:o,store:i,typingRef:l,itemRef:s,itemMetadata:a}=e,{events:u}=i.useState("floatingTreeRoot"),c=i.useState("open"),d=SE(!0),f=void 0!==d;return Ct((()=>({id:r,role:"menuitem",tabIndex:c&&n?0:-1,onKeyDown(e){" "===e.key&&null!=l&&l.current&&e.preventDefault()},onMouseMove(e){o&&u.emit("itemhover",{nodeId:o,target:e.currentTarget})},onClick(e){t&&u.emit("close",{domEvent:e,reason:ep})},onMouseUp(e){if(d){const t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1)return;if(f&&!_f&&2===e.button)return}!s.current||!i.context.allowMouseUpTriggerRef.current||f&&2!==e.button||a&&"regular-item"!==a.type||s.current.click()}})),[t,n,r,u,o,c,i,l,s,d,f,a])}({closeOnClick:t,highlighted:r,id:o,nodeId:u,store:i,typingRef:l,itemRef:f,itemMetadata:a}),m=Et((e=>Mh(g,{onMouseEnter(){"submenu-trigger"===a.type&&a.setActive()}},e,p)),[g,p,a]),v=Kc(f,h);return Ct((()=>({getItemProps:m,itemRef:v})),[m,v])}({closeOnClick:a,disabled:s,highlighted:g,id:p,store:h,nativeButton:l,nodeId:null==f?void 0:f.context.nodeId,itemMetadata:_E});return jh("div",e,{state:{disabled:s,highlighted:g},props:[m,c,v],ref:[y,t,d.ref]})}
1)),IE={...Vv,...em},kE=Zt((function(e,t){const{render:n,className:r,style:o,finalFocus:i,...l}=e,{store:s}=bE(),{side:a,align:u}=vE(),c=null!=Tb(),d=s.useState("open"),f=s.useState("transitionStatus"),p=s.useState("popupProps"),h=s.useState("mounted"),g=s.useState("instantType"),m=s.useState("activeTriggerElement"),v=s.useState("parent"),y=s.useState("lastOpenChangeReason"),b=s.useState("rootId"),w=s.useState("floatingRootContext"),S=s.useState("floatingTreeRoot"),_=s.useState("closeDelay"),x=s.useState("activeTriggerElement"),C=s.useState("hoverEnabled"),E=s.useState("disabled"),R=s.useState("openMethod"),I="context-menu"===v.type;nm({open:d,ref:s.context.popupRef,onComplete(){var e,t;d&&(null===(e=(t=s.context).onOpenChangeComplete)||void 0===e||e.call(t,!0))}}),wt((()=>{function e(e){s.setOpen(!1,dp(e.reason,e.domEvent))}return S.events.on("close",e),()=>{S.events.off("close",e)}}),[S.events,s]),function(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:o}=t,i="rootStore"in e?e.rootStore:e,l=i.useState("open"),s=i.useState("floatingElement"),a=i.useState("domReferenceElement"),{dataRef:u}=i.context,c=rg(),d=ng(),f=Sm(i),p=df(),h=Uc((()=>{var e;return Zf(null===(e=u.current.openEvent)||void 0===e?void 0:e.type,f.interactedInside)})),g=Uc((()=>{var e,t;return(null==(t=null===(e=u.current.openEvent)||void 0===e?void 0:e.type)?void 0:t.includes("mouse"))&&"mousedown"!==t})),m=Uc((()=>{bm(f)}));Vc((()=>{l||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,m())}),[l,f,m]),wt((()=>m),[m]),Vc((()=>{var e;if(n&&l&&null!==(e=f.handleCloseOptions)&&void 0!==e&&e.blockPointerEvents&&g()&&Fd(a)&&s){var t,r,o,i,u,p,h;const e=a,n=s,l=tf(s),g=null==c||null===(t=c.nodesRef.current.find((e=>e.id===d)))||void 0===t||null===(t=t.context)||void 0===t?void 0:t.elements.floating;g&&(g.style.pointerEvents="");const v=f.pointerEventsScopeElement!==n?f.pointerEventsScopeElement:null,y=g!==n?g:null,b=null!==(r=null!==(o=null!==(i=null!==(u=null===(p=f.handleCloseOptions)||void 0===p||null===(h=p.getScope)||void 0===h?void 0:h.call(p))&&void 0!==u?u:v)&&void 0!==i?i:y)&&void 0!==o?o:e.closest("[data-rootownerid]"))&&void 0!==r?r:l.body;return wm(f,{scopeElement:b,referenceElement:e,floatingElement:n}),()=>{m()}}}),[n,l,a,s,f,g,c,d,m]),wt((()=>{if(!n)return;function e(){return!!(c&&d&&ch(c.nodesRef.current,d).length>0)}function t(n){c&&d&&!e()&&p.start(0,(()=>{c.events.off("floating.closed",t),i.setOpen(!1,dp(Yf,n)),c.events.emit("floating.closed",n)}))}const l=s;return ef(l&&nf(l,"mouseenter",(function(){f.openChangeTimeout.clear(),p.clear(),null==c||c.events.off("floating.closed",t),m()})),l&&nf(l,"mouseleave",(function(n){var l,s;if(e()&&c)return void c.events.on("floating.closed",t);if($f(n.relatedTarget,i.context.triggerElements))return;const a=null!==(l=null===(s=u.current.floatingContext)||void 0===s?void 0:s.nodeId)&&void 0!==l?l:o,d=n.relatedTarget;c&&a&&Fd(d)&&ch(c.nodesRef.current,a,!1).some((e=>{var t;return Vf(null===(t=e.context)||void 0===t?void 0:t.elements.floating,d)}))||(f.handler?f.handler(n):(m(),g()&&!h()&&function(e){const t=Uf(r,"close",f.pointerType),n=()=>{i.setOpen(!1,dp(Yf,e)),null==c||c.events.emit("floating.closed",e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}(n)))})),l&&nf(l,"pointerdown",(function(e){const t=qf(e);var n;null!=(null==(n=t)?void 0:n.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Af}`))?f.interactedInside=null!=(null==t?void 0:t.closest("[aria-haspopup]")):f.interactedInside=!1}),!0),(()=>{null==c||c.events.off("floating.closed",t)}))}),[n,s,i,u,r,o,g,h,m,f,c,d,p])}(w,{enabled:C&&!E&&!I&&"menubar"!==v.type,closeDelay:_});const k=Et((e=>{s.set("popupElement",e)}),[s]),P=jh("div",e,{state:{transitionStatus:f,side:a,align:u,open:d,nested:"menu"===v.type,instant:g},ref:[t,s.context.popupRef,k],stateAttributesMapping:IE,props:[p,{onKeyDown(e){c&&zb.has(e.key)&&e.stopPropagation()}},by(f),l,{"data-rootownerid":b}]});let O=void 0===v.type||I;return(m||"menubar"===v.type&&y!==Qf)&&(O=!0),Zo.jsx(pg,{context:w,openInteractionType:R,modal:I,disabled:!h,returnFocus:void 0===i?O:i,initialFocus:"menu"!==v.type,restoreFocus:!0,externalTree:"menubar"!==v.type?S:void 0,previousFocusableElement:x,nextFocusableElement:void 0===v.type?s.context.triggerFocusTargetRef
1:void 0,beforeContentFocusGuardRef:void 0===v.type?s.context.beforeContentFocusGuardRef:void 0,children:P})})),PE=rt(void 0),OE=Zt((function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=bE();return o.useState("mounted")||n?Zo.jsx(PE.Provider,{value:n,children:Zo.jsx(Yh,{ref:t,...r})}):null})),ME=Zt((function(e,t){const{anchor:n,positionMethod:r="absolute",className:o,render:i,side:l,align:s,sideOffset:a=0,alignOffset:u=0,collisionBoundary:c="clipping-ancestors",collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:h=!1,collisionAvoidance:g=Hh,style:m,...v}=e,{store:y}=bE(),b=function(){const e=Rt(PE);if(void 0===e)throw new Error(rd(32));return e}(),w=SE(!0),S=y.useState("parent"),_=y.useState("floatingRootContext"),x=y.useState("floatingTreeRoot"),C=y.useState("mounted"),E=y.useState("open"),R=y.useState("modal"),I=y.useState("openMethod"),k=y.useState("activeTriggerElement"),P=y.useState("transitionStatus"),O=y.useState("positionerElement"),M=y.useState("instantType"),T=y.useState("hasViewport"),A=y.useState("lastOpenChangeReason"),N=y.useState("floatingNodeId"),F=y.useState("floatingParentNodeId"),z=_.useState("domReferenceElement"),D=_t(null),L=tm(O,!1,!1);let V=n,q=a,$=u,j=s,W=g;var B,H,U;"context-menu"===S.type&&(V=null!=n?n:null===(B=S.context)||void 0===B?void 0:B.anchor,j=null!=j?j:"start",l||"center"===j||($=null!==(H=e.alignOffset)&&void 0!==H?H:2,q=null!==(U=e.sideOffset)&&void 0!==U?U:-5));let G=l,Z=j;var K;"menu"===S.type?(G=null!=G?G:"inline-end",Z=null!=Z?Z:"start",W=null!==(K=e.collisionAvoidance)&&void 0!==K?K:Uh):"menubar"===S.type&&(G=null!=G?G:"vertical"===S.context.orientation?"inline-end":"bottom",Z=null!=Z?Z:"start");const J="context-menu"===S.type,Y=my({anchor:V,floatingRootContext:_,positionMethod:w?"fixed":r,mounted:C,side:G,sideOffset:q,align:Z,alignOffset:$,arrowPadding:J?0:f,collisionBoundary:c,collisionPadding:d,sticky:p,nodeId:N,keepMounted:b,disableAnchorTracking:h,collisionAvoidance:W,shiftCrossAxis:J&&!("side"in W&&"flip"===W.side),externalTree:x,adaptiveOrigin:T?py:void 0});wt((()=>{function e(e){e.open&&(e.parentNodeId===N&&y.set("hoverEnabled",!1),e.nodeId!==N&&e.parentNodeId===y.select("floatingParentNodeId")&&y.setOpen(!1,dp(up)))}return x.events.on("menuopenchange",e),()=>{x.events.off("menuopenchange",e)}}),[y,x.events,N]),wt((()=>{if(null!=y.select("floatingParentNodeId"))return x.events.on("menuopenchange",e),()=>{x.events.off("menuopenchange",e)};function e(e){var t;if(e.open||e.nodeId!==y.select("floatingParentNodeId"))return;const n=null!==(t=e.reason)&&void 0!==t?t:up;y.setOpen(!1,dp(n))}}),[x.events,y]);const X=df();wt((()=>{E||X.clear()}),[E,X]),wt((()=>{function e(e){if(E&&e.nodeId===y.select("floatingParentNodeId"))if(e.target&&k&&k!==e.target){const e=y.select("closeDelay");e>0?X.isStarted()||X.start(e,(()=>{y.setOpen(!1,dp(up))})):y.setOpen(!1,dp(up))}else X.clear()}return x.events.on("itemhover",e),()=>{x.events.off("itemhover",e)}}),[x.events,E,k,y,X]),wt((()=>{const e={open:E,nodeId:N,parentNodeId:F,reason:y.select("lastOpenChangeReason")};x.events.emit("menuopenchange",e)}),[x.events,E,y,N,F]),Vc((()=>{const e=z,t=D.current;if(e&&(D.current=e),t&&e&&e!==t){y.set("instantType",void 0);const e=new AbortController;return L((()=>{y.set("instantType","trigger-change")}),e.signal),()=>{e.abort()}}}),[z,L,y]);const Q={open:E,side:Y.side,align:Y.align,anchorHidden:Y.anchorHidden,nested:"menu"===S.type,instant:M},ee="menubar"===S.type&&S.context.modal;Ry(E&&(ee||R&&A!==Yf),"touch"===I,O,k);const te=wy(e,Q,{styles:Y.positionerStyles,transitionStatus:P,props:v,refs:[t,y.useStateSetter("positionerElement")],hidden:!C,inert:!E}),ne=C&&"menu"!==S.type&&("menubar"!==S.type&&R&&A!==Yf||"menubar"===S.type&&S.context.modal);let re=null;return"menubar"===S.type?re=S.context.contentElement:void 0===S.type&&(re=k),Zo.jsxs(mE.Provider,{value:Y,children:[ne&&Zo.jsx(yy,{ref:"context-menu"===S.type||"nested-context-menu"===S.type?S.context.internalBackdropRef:null,inert:ay(!E),cutout:re}),Zo.jsx(ig,{id:N,children:Zo.jsx(ty,{elementsRef:y.context.itemDomElements,labelsRef:y.context.
1itemLabels,children:te})})]})})),TE=rt(null);function AE(e){return Rt(TE)}const NE={...hm,disabled:od((e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled)),modal:od((e=>{var t;return(void 0===e.parent.type||"context-menu"===e.parent.type)&&(null===(t=e.modal)||void 0===t||t)})),openMethod:od((e=>e.openMethod)),allowMouseEnter:od((e=>e.allowMouseEnter)),highlightItemOnHover:od((e=>e.highlightItemOnHover)),stickIfOpen:od((e=>e.stickIfOpen)),parent:od((e=>e.parent)),rootId:od((e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId)),activeIndex:od((e=>e.activeIndex)),isActive:od(((e,t)=>e.activeIndex===t)),hoverEnabled:od((e=>e.hoverEnabled)),instantType:od((e=>e.instantType)),lastOpenChangeReason:od((e=>e.openChangeReason)),floatingTreeRoot:od((e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot)),floatingNodeId:od((e=>e.floatingNodeId)),floatingParentNodeId:od((e=>e.floatingParentNodeId)),itemProps:od((e=>e.itemProps)),closeDelay:od((e=>e.closeDelay)),hasViewport:od((e=>e.hasViewport)),keyboardEventRelay:od((e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0))};class FE extends Pd{constructor(e){super({...{...um(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Qh,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:kd,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...e},{positionerRef:Te(),popupRef:Te(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:Te(),beforeContentFocusGuardRef:Te(),onOpenChangeComplete:void 0,triggerElements:new am},NE),te(this,"unsubscribeParentListener",null),this.unsubscribeParentListener=this.observe("parent",(e=>{var t;if(null===(t=this.unsubscribeParentListener)||void 0===t||t.call(this),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");return this.unsubscribeParentListener=e.store.subscribe((()=>{const o=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),l=e.store.select("keyboardEventRelay");t===o&&n===i&&r===l||(t=o,n=i,r=l,this.notifyAll())})),void(this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef)}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null}))}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){const n=Wc((()=>new FE(t))).current;return null!=e?e:n}}const zE=rt(void 0),DE=wd((function(e){var t,n,r;const{children:o,open:i,onOpenChange:l,onOpenChangeComplete:s,defaultOpen:a=!1,disabled:u=!1,modal:c,loopFocus:d=!0,orientation:f="vertical",actionsRef:p,closeParentOnEsc:h=!1,handle:g,triggerId:m,defaultTriggerId:v=null,highlightItemOnHover:y=!0}=e,b=SE(!0),w=bE(!0),S=AE(),_=Rt(zE),x=Ct((()=>_&&w?{type:"menu",store:w.store}:S?{type:"menubar",context:S}:b&&!w?{type:"context-menu",context:b}:{type:void 0}),[b,w,S,_]),C=FE.useStore(null==g?void 0:g.store,{open:a,openProp:i,activeTriggerId:v,triggerIdProp:m,parent:x});!function(e,t,n,r){qc((()=>{void 0===t&&!1===e.state.open&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})}))}(C,i,a,v),C.useControlledProp("openProp",i),C.useControlledProp("triggerIdProp",m),C.useContextCallback("onOpenChangeComplete",s);const E=Ih(),R=Ih(),I=C.useState("floatingTreeRoot"),k=og(I),P=ng(),O=C.useState("open"),M=C.useState("activeTriggerElement"),T=C.useState("positionerElement"),A=C.useState("hoverEnabled"),N=C.useState("disabled"),F=C.useState("lastOpenChangeReason"),z=C.useState("parent"),D=C.useState("activeIndex"),L=C.useState("payload"),V=C.useState("floatingParentNodeId"),q=_t(null),$=_t("context-menu"!==z.type),j=df(),W=_t(!0),B=df(),H=null!=V,{openMethod:U,triggerProps:G}=Sv(O);C.useSyncedValues({disabled:u,highlightItemOnHover:y,modal:void 0===z.type?c:void 0,openMethod:U,rootId:E}),im(C);const{forceUnmount:Z}=lm(O,C,(()=>{C.update({allowMouseEnter:!1,stickIfOpen:!0})}));Vc((()=>{b&&!w?C.update({parent:{type:"context-menu",context:b},floatingNodeId:k,floatingParentNodeId:P}):w&&C.update({floatingNodeId:k,floatingParentNodeId:P})}),[b,w,k,P,C]),wt((()=>
1{if(O||(q.current=null),"context-menu"===z.type)return O?void j.start(500,(()=>{$.current=!0})):(j.clear(),void($.current=!1))}),[j,O,z.type]),Vc((()=>{O||A||C.set("hoverEnabled",!0)}),[O,A,C]);const K=Uc(((e,t)=>{var n;const r=t.reason;if(O===e&&t.trigger===M&&F===r)return;const o=function(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}(t);if(e||null!=t.trigger||(t.trigger=null!=M?M:void 0),null==l||l(e,t),t.isCanceled)return;C.state.floatingRootContext.dispatchOpenChange(e,t);const i=t.event;if(!1===e&&"click"===(null==i?void 0:i.type)&&"touch"===i.pointerType&&!W.current)return;e&&r===Xf?(W.current=!1,B.start(300,(()=>{W.current=!0}))):(W.current=!0,B.clear());const s=(r===Jf||r===ep)&&0===i.detail&&(null==i?void 0:i.isTrusted),a=!e&&(r===lp||null==r),u={open:e,openChangeReason:r};q.current=null!==(n=t.event)&&void 0!==n?n:null,om(u,e,t.trigger,o()),C.update(u),"menubar"!==z.type||r!==Xf&&r!==ip&&r!==Yf&&r!==sp&&r!==up?s||a?C.set("instantType",s?"click":"dismiss"):C.set("instantType",void 0):C.set("instantType","group")})),J=Kg({popupStore:C,floatingId:R,nested:null!=P,onOpenChange:K}),Y=J.context.events;wt((()=>{const e=({open:e,eventDetails:t})=>K(e,t);return Y.on("setOpen",e),()=>{null==Y||Y.off("setOpen",e)}}),[Y,K]);const X=Et((()=>{C.setOpen(!1,dp(cp))}),[C]);let Q;xt(p,(()=>({unmount:Z,close:X})),[Z,X]),"context-menu"===z.type&&(Q=z.context),xt(null===(t=Q)||void 0===t?void 0:t.positionerRef,(()=>T),[T]),xt(null===(n=Q)||void 0===n?void 0:n.actionsRef,(()=>({setOpen:K})),[K]);const ee=mg(J,{enabled:!N,bubbles:{escapeKey:h&&"menu"===z.type},outsidePress(){var e;return"context-menu"!==z.type||"contextmenu"===(null===(e=q.current)||void 0===e?void 0:e.type)||$.current},externalTree:H?I:void 0}),te=Rv(),ne=Et((e=>{C.select("activeIndex")!==e&&C.set("activeIndex",e)}),[C]),re=Rm(J,{enabled:!N,listRef:C.context.itemDomElements,activeIndex:D,nested:void 0!==z.type,loopFocus:d,orientation:f,parentOrientation:"menubar"===z.type?z.context.orientation:void 0,rtl:"rtl"===te,disabledIndices:Id,onNavigate:ne,openOnArrowKeyDown:"context-menu"!==z.type,externalTree:H?I:void 0,focusItemOnHover:y}),oe=Et((e=>{C.context.typingRef.current=e}),[C]),ie=Im(J,{enabled:!N,listRef:C.context.itemLabels,elementsRef:C.context.itemDomElements,activeIndex:D,resetMs:500,onMatch:e=>{O&&e!==D&&C.set("activeIndex",e)},onTyping:oe}),le=Ct((()=>{const e=Mh(ie.reference,re.reference,ee.reference,{onMouseMove(){C.set("allowMouseEnter",!0)}},G);return e["aria-haspopup"]="menu",e["aria-expanded"]=O,e}),[C,ie.reference,re.reference,ee.reference,G,O]),se=Ct((()=>{const e=Mh(re.trigger,ee.trigger,G);return e["aria-haspopup"]="menu",e["aria-expanded"]=!1,e}),[re.trigger,ee.trigger,G]),ae=Ct((()=>Mh(rm,{id:R,role:"menu","aria-labelledby":null==M?void 0:M.id,onMouseMove(){C.set("allowMouseEnter",!0),"menu"===z.type&&C.set("hoverEnabled",!1)},onClick(){C.select("hoverEnabled")&&C.set("hoverEnabled",!1)},onKeyDown(e){const t=C.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}},ie.floating,re.floating,ee.floating)),[M,R,z.type,C,ie.floating,re.floating,ee.floating]),ue=null!==(r=re.item)&&void 0!==r?r:kd;sm(C,{floatingRootContext:J,activeTriggerProps:le,inactiveTriggerProps:se,popupProps:ae,itemProps:ue});const ce=Ct((()=>({store:C,parent:x})),[C,x]),de=Zo.jsx(yE.Provider,{value:ce,children:"function"==typeof o?o({payload:L}):o});return void 0===z.type||"context-menu"===z.type?Zo.jsx(lg,{externalTree:I,children:de}):de}));function LE(e){const{render:t,className:n,style:r,state:o=kd,props:i=Id,refs:l=Id,metadata:s,stateAttributesMapping:a,tag:u="div",...c}=e,{compositeProps:d,compositeRef:f}=function(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Hv(),{ref:o,index:i}=My(e),l=n===i,s=_t(null),a=Kc(o,s);return{compositeProps:{tabIndex:l?0:-1,onFocus(){r(i)},onMouseMove(){const e=s.current;if(!t||!e)return;const n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;l||n||e.focus()}},compositeRef:a,index:i}}({metadata:s});return jh(u,e,{state:o,ref:[...l,f],props:[d,...i,c],stateAttributesMapping:a})}function VE(e){var t;return zd(e)&&e.hasAttribute("data-rootownerid")?null!==(t=e.getAttribute("data-rootownerid"))&&void 0!==t?t:void 0:Gd(e)?void 0:VE(Jd(e))}const qE=Zt(wd((function(e,t){var n;const{render:r,className:o,style:i,disabled:l=!1,nativeButton:s=!0,id:a,openOnHover:u,delay:c=100,closeDelay:d=0,handle:f,payload:p,...h}=e,g=bE(!0),m=null!==(n=null==f?void 0:f.store)&&void 0!==n?n:null==g?void 0:g.store;if(!m)throw new Error(rd(85));
1const v=fv(a),y=m.useState("isTriggerActive",v),b=m.useState("floatingRootContext"),w=m.useState("isOpenedByTrigger",v),S=m.useState("triggerPopupId",v),_=_t(null),x=function(){const e=SE(!0),t=bE(!0),n=AE();return Ct((()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0}),[e,t,n])}(),C=Hv(!0),E=rg(),R=Ct((()=>null!=E?E:new Qh),[E]),I=og(R),k=ng(),{registerTrigger:P,isMountedByThisTrigger:O}=function(e,t,n,r){const o=n.useState("isMountedByTrigger",e),i=function(e,t){const n=_t(null),r=_t(null);return Et((o=>{if(void 0===e)return;let i=!1;if(null!==n.current){const e=n.current,o=r.current,l=t.context.triggerElements.getById(e);o&&l===o&&(t.context.triggerElements.delete(e),i=!0),n.current=null,r.current=null}if(null!==o&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),i=!0),i){const e=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==e&&t.set("triggerCount",e)}}),[t,e])}(e,n),l=Uc((t=>{if(i(t),!t)return;const o=n.select("open"),l=n.select("activeTriggerId");l!==e?null==l&&o&&n.update({activeTriggerId:e,activeTriggerElement:t,...r}):n.update({activeTriggerElement:t,...o?r:null})}));return Vc((()=>{o&&n.update({activeTriggerElement:t.current,...r})}),[o,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:o}}(v,_,m,{payload:p,closeDelay:d,parent:x,floatingTreeRoot:R,floatingNodeId:I,floatingParentNodeId:k,keyboardEventRelay:null==C?void 0:C.relayKeyboardEvent}),M="menubar"===x.type,T=m.useState("disabled"),A=l||T||M&&x.context.disabled,{getButtonProps:N,buttonRef:F}=Uv({disabled:A,native:s});wt((()=>{w||void 0!==x.type||(m.context.allowMouseUpTriggerRef.current=!1)}),[m,w,x.type]);const z=_t(null),D=df(),L=Uc((e=>{if(!z.current)return;D.clear(),m.context.allowMouseUpTriggerRef.current=!1;const t=e.target;if(Vf(z.current,t)||Vf(m.select("positionerElement"),t)||t===z.current)return;if(null!=t&&VE(t)===m.select("rootId"))return;const n=Jv(z.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||R.events.emit("close",{domEvent:e,reason:ap})}));wt((()=>{w&&m.select("lastOpenChangeReason")===Yf&&tf(z.current).addEventListener("mouseup",L,{once:!0})}),[w,L,m]);const V=M&&x.context.hasSubmenuOpen,q=function(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:l=0,move:s=!0,triggerElementRef:a=_m,externalTree:u,isActiveTrigger:c=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,h="rootStore"in e?e.rootStore:e,{dataRef:g,events:m}=h.context,v=rg(u),y=Sm(h),b=_t(!1),w=Xc(o),S=Xc(r),_=Xc(l),x=Xc(n),C=Xc(p),E=Xc(f),R=Uc((()=>{var e;return Zf(null===(e=g.current.openEvent)||void 0===e?void 0:e.type,y.interactedInside)})),I=Uc((()=>{var e;return!1!==(null===(e=C.current)||void 0===e?void 0:e.call(C))})),k=Uc(((e,t,n)=>{const r=h.context.triggerElements;if(r.hasElement(t))return!e||!Vf(e,t);if(!Fd(n))return!1;const o=n;return r.hasMatchingElement((e=>Vf(e,o)))&&(!e||!Vf(e,o))})),P=Uc((()=>{y.handler&&(tf(h.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0)})),O=Uc((()=>{bm(y)}));var M;return c&&(y.handleCloseOptions=null===(M=w.current)||void 0===M?void 0:M.__options),wt((()=>P),[P]),wt((()=>{if(n)return m.on("openchange",e),()=>{m.off("openchange",e)};function e(e){e.open?b.current=!1:(b.current=e.reason===Yf,P(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}}),[n,m,y,P]),wt((()=>{var e;if(!n)return;function t(e,t=!0){const n=Uf(S.current,"close",y.pointerType);n?y.openChangeTimeout.start(n,(()=>{h.setOpen(!1,dp(Yf,e)),null==v||v.events.emit("floating.closed",e)})):t&&(y.openChangeTimeout.clear(),h.setOpen(!1,dp(Yf,e)),null==v||v.events.emit("floating.closed",e))}const r=null!==(e=a.current)&&void 0!==e?e:c?h.select("domReferenceElement"):null;if(Fd(r))return s?ef(nf(r,"mousemove",o,{once:!0}),nf(r,"mouseenter",o),nf(r,"mouseleave",l)):ef(nf(r,"mouseenter",o),nf(r,"mouseleave",l));function o(e){var t,n,r;if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,i&&!Mf(y.pointerType))return;const o=Gf(_.current),l=Uf(S.current,"open",y.pointerType),s=qf(e),a=null!==(t=e.currentTarget)&&void 0!==t?t:null,u=h.select("domReferenceElement");let c=a;if(Fd(s)&&!h.context.triggerElements.hasElement(s))for(const e of h.context.triggerElements.elements())if(Vf(e,s)){c=e;break}Fd(a)&&Fd(u)&&!h.context.triggerElements.hasElement(a)&&Vf(a,u)&&(c=u);const d=null!=c&&k(u,c,s),f=h.select("open"),p=null!==(n=null===(r=E.current)||void 0===r?void 0:r.call(E))&&void 0!==n?n:"ending"===h.select("transitionStatus"),g=!f&&p&&b.current,m=!d&&Fd(c)&&Fd(u)&&Vf
1(u,c)&&g,v=o>0&&!l,w=!f||d;d&&(f||g)||m?I()&&h.setOpen(!0,dp(Yf,e,c)):v||(l?y.openChangeTimeout.start(l,(()=>{w&&I()&&h.setOpen(!0,dp(Yf,e,c))})):w&&I()&&h.setOpen(!0,dp(Yf,e,c)))}function l(e){var n;if(R())return void O();P();const r=tf(h.select("domReferenceElement"));y.restTimeout.clear(),y.restTimeoutPending=!1;const o=null!==(n=g.current.floatingContext)&&void 0!==n?n:null==d?void 0:d();if(!$f(e.relatedTarget,h.context.triggerElements)){if(w.current&&o){h.select("open")||y.openChangeTimeout.clear();const n=a.current;return y.handler=w.current({...o,tree:v,x:e.clientX,y:e.clientY,onClose(){O(),P(),x.current&&!R()&&n===h.select("domReferenceElement")&&t(e,!0)}}),r.addEventListener("mousemove",y.handler),void y.handler(e)}("touch"!==y.pointerType||!Vf(h.select("floatingElement"),e.relatedTarget))&&t(e)}}}),[P,O,g,S,h,n,w,y,c,k,R,i,s,_,a,v,x,d,E,I]),Ct((()=>{if(n)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){var t;const{nativeEvent:n}=e,r=e.currentTarget,o=h.select("domReferenceElement"),l=h.select("open"),s=k(o,r,e.target);if(i&&!Mf(y.pointerType))return;if(l&&s&&null!==(t=y.handleCloseOptions)&&void 0!==t&&t.blockPointerEvents){const e=h.select("floatingElement");if(e){var a,u,c;const t=null!==(a=null===(u=y.handleCloseOptions)||void 0===u||null===(c=u.getScope)||void 0===c?void 0:c.call(u))&&void 0!==a?a:r.ownerDocument.body;wm(y,{scopeElement:t,referenceElement:r,floatingElement:e})}}const d=Gf(_.current);function f(){if(y.restTimeoutPending=!1,R())return;const e=h.select("open");y.blockMouseMove||e&&!s||!I()||h.setOpen(!0,dp(Yf,n,r))}l&&!s||0===d||!s&&y.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(y.restTimeout.clear(),"touch"===y.pointerType?Nn((()=>{f()})):s&&l?f():(y.restTimeoutPending=!0,y.restTimeout.start(d,f)))}};function e(e){y.pointerType=e.pointerType}}),[n,y,R,k,i,h,_,I])}(b,{enabled:(null!=u?u:V)&&!A&&"context-menu"!==x.type&&(!M||V&&!O),handleClose:Am({blockPointerEvents:!M}),mouseOnly:!0,move:!1,restMs:void 0===x.type?c:void 0,delay:{close:d},triggerElementRef:_,externalTree:R,isActiveTrigger:y,isClosing:()=>"ending"===m.select("transitionStatus")}),$=function(e,t){const n=df(),[r,o]=yt(!1);return Vc((()=>{e&&"trigger-hover"===t?(o(!0),n.start(500,(()=>{o(!1)}))):e||(n.clear(),o(!1))}),[e,t,n]),r}(w,m.select("lastOpenChangeReason")),j=hg(b,{enabled:!A&&"context-menu"!==x.type,event:w&&M?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===x.type&&$}),W=function(e,t={}){const{enabled:n=!0,delay:r}=t,o="rootStore"in e?e.rootStore:e,{events:i,dataRef:l}=o.context,s=_t(!1),a=_t(null),u=_t(!0),c=df();wt((()=>{const e=o.select("domReferenceElement");if(!n)return;const t=Td(e);return ef(nf(t,"blur",(function(){const e=o.select("domReferenceElement");!o.select("open")&&zd(e)&&e===Lf(tf(e))&&(s.current=!0)})),mm&&nf(t,"keydown",(function(){u.current=!0}),!0),mm&&nf(t,"pointerdown",(function(){u.current=!1}),!0))}),[o,n]),wt((()=>{if(n)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){if(e.reason===Jf||e.reason===lp){const e=o.select("domReferenceElement");Fd(e)&&(a.current=e,s.current=!0)}}}
1),[i,n,o]);const d=Ct((()=>{function e(){s.current=!1,a.current=null}return{onMouseLeave(){e()},onFocus(t){const n=t.currentTarget;if(s.current){if(a.current===n)return;e()}const i=qf(t.nativeEvent);if(Fd(i))if(mm&&!t.relatedTarget){if(!u.current&&!Wf(i))return}else if(!function(e){if(!e||If)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(i))return;const l=$f(t.relatedTarget,o.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p="function"==typeof r?r():r;o.select("open")&&l||0===p||void 0===p?o.setOpen(!0,dp(Xf,d,f)):c.start(p,(()=>{s.current||o.setOpen(!0,dp(Xf,d,f))}))},onBlur(t){e();const n=t.relatedTarget,r=t.nativeEvent,i=Fd(n)&&n.hasAttribute(fh("focus-guard"))&&"outside"===n.getAttribute("data-type");c.start(0,(()=>{var e;const t=o.select("domReferenceElement"),s=Lf(tf(t));(n||s!==t)&&(Vf(null===(e=l.current.floatingContext)||void 0===e?void 0:e.refs.floating.current,s)||Vf(t,s)||i||$f(null!=n?n:s,o.context.triggerElements)||o.setOpen(!1,dp(Xf,r)))}))}}}),[l,r,o,c]);return Ct((()=>n?{reference:d,trigger:d}:{}),[n,d])}(b,{enabled:!A&&V}),B=function(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,o=_t(!1);return Ct((()=>t?{onMouseDown:e=>{("open"===n&&!r||"close"===n&&r)&&(o.current=!0,tf(e.currentTarget).addEventListener("click",(()=>{o.current=!1}),{once:!0}))},onClick:e=>{o.current&&(o.current=!1,e.preventBaseUIHandler())}}:kd),[t,n,r])}({open:w,enabled:M,mouseDownAction:"open"}),H=Ct((()=>Mh(W.reference,j.reference)),[W.reference,j.reference]),U=m.useState("triggerProps",O),{preFocusGuardRef:G,handlePreFocusGuardFocus:Z,handleFocusTargetFocus:K}=function(e,t){const n=_t(null);return{preFocusGuardRef:n,handlePreFocusGuardFocus:function(t){Nn((()=>{e.setOpen(!1,dp(ip,t.nativeEvent,t.currentTarget))}));const r=sh(n.current,-1);null==r||r.focus()},handleFocusTargetFocus:function(n){const r=e.select("positionerElement");if(r&&ah(n,r)){var o;null===(o=e.context.beforeContentFocusGuardRef.current)||void 0===o||o.focus()}else{var i;Nn((()=>{e.setOpen(!1,dp(ip,n.nativeEvent,n.currentTarget))}));let o=sh(e.context.triggerFocusTargetRef.current||t.current,1);for(;null!==o&&Vf(r,o);){const e=o;if(o=ih(o),o===e)break}null===(i=o)||void 0===i||i.focus()}}}}(m,_),J={disabled:A,open:w},Y=[z,t,F,P,_],X=[H,null!=q?q:kd,U,{"aria-haspopup":"menu","aria-controls":S,id:v,onMouseDown:e=>{m.select("open")||(D.start(200,(()=>{m.context.allowMouseUpTriggerRef.current=!0})),tf(e.currentTarget).addEventListener("mouseup",L,{once:!0}))}},M?{role:"menuitem"}:{},B,h,N],Q=jh("button",e,{enabled:!M,stateAttributesMapping:Lv,state:J,ref:Y,props:X});return M?Zo.jsx(LE,{tag:"button",render:r,className:o,style:i,state:J,refs:Y,props:X,stateAttributesMapping:Lv}):w?Zo.jsxs(Ae,{children:[Zo.jsx(pp,{ref:G,onFocus:Z},`${v}-pre-focus-guard`),Zo.jsx(Ae,{children:Q},v),Zo.jsx(pp,{ref:m.context.triggerFocusTargetRef,onFocus:K},`${v}-post-focus-guard`)]}):Zo.jsx(Ae,{children:Q},v)}))),$E=({columnId:e,columnName:t,canSort:n,multiSortEnabled:r,sorting:o,onSortingChange:i})=>{var l,s;const{i18n:a}=xi(),u=Ct((()=>o.find((t=>t.id===e))),[o,e]),c=Ct((()=>o.findIndex((t=>t.id===e))),[o,e]),d=u&&!u.desc,f=u&&u.desc,p=(null===(l=o[0])||void 0===l?void 0:l.columnName)||"",h=(null===(s=o[1])||void 0===s?void 0:s.columnName)||"",g=Et((n=>{const l=n?d:f,s={id:e,columnName:t,desc:n},a=r?2:1;if(n?f:d)i(o.filter((t=>t.id!==e)));else if(l){const t=o.map((t=>t.id===e?{...t,desc:n}:t));i(t)}else{const e=r&&o.length>0?[o[0],s]:[s];i(((e,t)=>{const n=new Set,r=[];for(const o of e)if(!n.has(o.id)&&(n.add(o.id),r.push(o),r.length>=t))break;return r})(e,a))}}),[e,t,o,i,d,f,r]),m=Et((()=>{var n;const r=null!==(n=null==u?void 0:u.desc)&&void 0!==n&&n;if(u&&1===c){const e=[...o],t=e[0];e[0]={...u,desc:r},e[1]=t,i(e)}else u||1!==o.length||i([{id:e,columnName:t,desc:!1},...o])}),[e,t,u,c,o,i]),v=Et((()=>{var n;const r=null!==(n=null==u?void 0:u.desc)&&void 0!==n&&n;if(u&&0===c){const e=[...o],t=e[1];e[1]={...u,desc:r},e[0]=t,i(e)}else u||1!==o.length||i([...o,{id:e,columnName:t,desc:!1}])}),[e,t,u,c,o,i]),y=Et((()=>{const n=[...o];n[0]={id:e,columnName:t,desc:!1},i(n)}),[e,t,o,i]),b=Et((()=>{const n=[...o];n[1]={id:e,columnName:t,desc:!1},i(n)}),[e,t,o,i]),w=Ct((()=>r?0===o.length?{switchToPrimary:!1,switchToSecondary:!1,addAsPrimary:!1,addAsSecondary:!1,replacePrimary:!1,replaceSecondary:!1}:u?2===o.length?{switchToPrimary:1===c,switchToSecondary:0===c,addAsPrimary:!1,addAsSecondary:!1,replacePrimary:!1,replaceSecondary:!1}:{switchToPrimary:!1,switchToSecondary:!1,addAsPrimary:!1,addAsSecondary:!1,replacePrimary:!1,replaceSecondary:!1}:1===o.length?{switchToPrimary:!1,switchToSecondary:!1,addAsPrimary:!0,addAsSecondary:!0,replacePrimary:!1,replaceSecondary:!1}:2===o.length?{switchToPrimary:!1,switchToSecondary:!1,addAsPrimary:!1,addAsSecondary:!1,replacePrimary:!0,replaceSecondary:!0}:{switchToPrimary:!1,switchToSecondary:!1,addAsPrimary:!1,addAsSecondary:!1,replacePrimary:!1,replaceSecondary:!1}:{switchToPrimary:!1,switchToSecondary:!1,addAsPrimary:!1,addAsSecondary:!1,replacePrimary:!1,replaceSecondary:!1}),[u,r,c,o.length]);return n?jo(CE,{className:"barn2-sort-section",children:[jo(EE,{className:"barn2-sort-section-header",render:jo("div",{}),children:jo("span",{className:"barn2-sort-section-label",children:a.sort})}),jo(RE,{className:ri("barn2-sort-menu-item",d&&"barn2-sort-menu-item-active"),onClick:()=>g(!1),children:[jo("span",{children:a.sortAscending}),d&&jo(By,{className:"barn2-sort-menu-check"})]}),jo(RE,{className:ri("barn2-sort-menu-item",f&&"barn2-sort-menu-item-active"),onClick:()=>g(!0),children:[jo("span",{children:a.sortDescending}),f&&jo(By,{className:"barn2-sort-menu-check"})]}),w.switchToPrimary&&jo(RE,{className:"barn2-sort-menu-item",onClick:m,children:jo("span",{children:a.switchToPrimarySort})}),w.switchToSecondary&&jo(RE,{className:"barn2-sort-menu-item",onClick:v,children:jo("span",{children:a.switchToSecondarySort})}),w.addAsPrimary&&jo(RE,{className:"barn2-sort-menu-item",onClick:m,children:jo("span",{children:a.setAsPrimarySort})}),w.addAsSecondary&&jo(RE,{className:"barn2-sort-menu-item",onClick:v,children:jo("span",{children:a.setAsSecondarySort})}),w.replacePrimary&&jo(RE,{className:"barn2-sort-menu-item",onClick:y,children:jo("span",{children:a.replacePrimarySort({columnName:p})})}),w.replaceSecondary&&jo(RE,{className:"barn2-sort-menu-item",onClick:b,children:jo("span",{children:a.replaceSecondarySort({columnName:h})})})]}):null},jE=({filter:e,value:t,onChange:n,filterCounts:r,showCounts:o=!0})=>{const{i18n:i}=xi(),l=_t(null),[s,a]=yt(""),u=bi(e.name),c=!0===e.multiple,d=c&&!0===e.hierarchical&&!0===e.includeChildren,{sortedItems:f,selectedItems:p,selectedValues:h,childrenByParentKey:g,firstUnselectedIndex:m,showSeparator:v}=eb({options:e.options,filterCounts:r,value:t,multiple:!0,includeChildren:d}),y=Et((e=>{if(a(""),e&&0!==e.length){const t=d?Xy(e,g):e;n(t.map((e=>e.value)))}else n(null)}),[n,d,g]),b=Et((e=>{a(""),n(e?e.value:null)}),[n]),w=Et((e=>e?e.label||String(e.value):""),[]),S=Et((e=>{e.preventDefault(),e.stopPropagation(),n(null)}),[n]),_=Et((e=>{e.stopPropagation()}),[]),x=Et((e=>{const t=f.some((t=>(t.label||String(t.value))===e));a(t?"":e)}),[f]),C=h.size>0,E=f.length>9;if(c)return jo("div",{className:"barn2-filter-section",onKeyDown:_,ref:l,children:jo(kv,{multiple:!0,open:!0,items:f,value:p,onValueChange:y,itemToStringLabel:w,inputValue:s,onInputValueChange:x,children:[jo("div",{className:"barn2-filter-section-header",children:[jo("span",{className:"barn2-filter-section-label",children:i.filterBy({filterName:u})}),C&&jo("button",{type:"button",className:"barn2-filter-clear-btn",onClick:S,children:i.clear})]}),E&&jo("div",{className:"barn2-filter-search-wrapper",children:[jo(Gy,{className:"barn2-filter-search-icon"}),jo(Kv,{className:"barn2-filter-search-input",placeholder:i.searchFilterPlaceholder({filterName:u}),"aria-label":i.searchFilter({filterName:u})})]}),jo("div",{className:"barn2-filter-options-list barn2-filter-popup--embedded",children:[jo(qy,{className:"barn2-filter-empty",children:i.noResultsFound}),jo(iy,{className:"barn2-filter-list",children:(e,t)=>jo(Ae,{children:[t.index===m&&v&&jo(tb,{className:"barn2-filter-separator"}),jo(Dy,{value:e,disabled:e.coveredBySelectedAncestor,"data-covered-selected":!!e.coveredBySelectedAncestor||void 0,className:"barn2-filter-option",children:[jo("div",{className:"barn2-filter-checkbox",children:e.coveredBySelectedAncestor?jo(By,{"aria-hidden":"true"}):jo(Ly,{children:jo(By,{"aria-hidden":"true"})})}),jo(nb,{item:e,className:"barn2-filter-option-text",prefixClassName:"barn2-filter-hierarchy-prefix",countClassName:"barn2-filter-item-count",showCounts:o})]},String(e.value))]})})]})]})});const R=p.length>0?p[0]:null;return jo("div",{className:"barn2-filter-section",onKeyDown:_,ref:l,children:jo(kv,{open:!0,items:f,value:R,onValueChange:b,itemToStringLabel:w,inputValue:s,onInputValueChange:x,children:[jo("div",{className:"barn2-filter-section-header",children:[jo("span",{className:"barn2-filter-section-label",children:i.filterBy({filterName:u})}),C&&jo("button",{type:"button",className:"barn2-filter-clear-btn",onClick:S,children:i.clear})]}),E&&jo("div",{className:"barn2-filter-search-wrapper",children:[jo(Gy,{className:"barn2-filter-search-icon"}),jo(Kv,{className:"barn2-filter-search-input",placeholder:i.searchFilterPlaceholder({filterName:u}),"aria-label":i.searchFilter({filterName:u})})]}),jo("div",{className:"barn2-filter-options-list barn2-filter-popup--embedded",children:[jo(qy,{className:"barn2-filter-empty",children:i.noResultsFound}),jo(iy,{className:"barn2-filter-list",children:(e,t)=>jo(Ae,{children:[t.index===m&&v&&jo(tb,{className:"barn2-filter-separator"}),jo(Dy,{value:e,className:"barn2-filter-option",children:[jo(Ly,{className:"barn2-filter-indicator",children:jo(By,{"aria-hidden":"true"})}),jo(nb,{item:e,className:"barn2-filter-option-text",prefixClassName:"barn2-filter-hierarchy-prefix",countClassName:"barn2-filter-item-count",showCounts:o})]},String(e.value))]})})]})]})})},WE=({column:e,columnName:t,sorting:n,multiSortEnabled:r,onSortingChange:o,onSingleSortClick:i,inlineFilter:l,filterValue:s,onFilterChange:a,filterCounts:u,showCounts:c=!0})=>{const d=e.id,{displayMode:f,i18n:p}=xi(),h=e.getCanSort(),g=Ct((()=>n.find((e=>e.id===d))),[n,d]),m=!!g,v=null!=g&&g.desc?"desc":g?"asc":"none",y=r||l,b=Et((e=>{e.stopPropagation()}),[]),w=Et((t=>{if(t.stopPropagation(),!h)return;if(!y&&i)return void i(d);const n=e.getToggleSortingHandler();n&&n(t)}),[h,e,d,i,y]),S=h&&l;return jo("div",y?{className:"header-menu",onClick:b,children:jo(DE,{modal:!1,children:[jo(qE,{className:ri("header-menu-trigger",m&&"header-menu-trigger-active"),"aria-label":p.columnOptionsFor({columnName:t}),children:jo(BE,{direction:v})}),jo(OE,{children:jo(ME,{className:"barn2-header-menu-positioner",positionMethod:"fixed",sideOffset:4,side:"bottom",align:"end",children:jo(kE,{className:"barn2-header-menu-popup","data-display-mode":f,children:[h&&jo($E,{columnId:d,columnName:t,canSort:h,multiSortEnabled:r,sorting:n,onSortingChange:o}),S&&jo(Wy,{className:"barn2-header-menu-separator"}),l&&a&&jo(jE,{filter:l,value:null!=s?s:null,onChange:a,filterCounts:u,showCounts:c})]})})})]})}:{className:"header-menu",children:jo("button",{type:"button",className:ri("header-menu-trigger","header-menu-trigger-indicator-only",m&&"header-menu-trigger-active"),onClick:w,"aria-label":p.sortByColumn({columnName:t}),children:jo(BE,{direction:v})})})},BE=({direction:e})=>jo("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:ri("header-menu-icon",`header-menu-icon-${e}`),"aria-hidden":"true",children:[jo("rect",{x:"1",y:"2.75",width:"12",height:"1.5",rx:"0.75",fill:"currentColor"}
1),jo("rect",{x:"3",y:"6.25",width:"8",height:"1.5",rx:"0.75",fill:"currentColor"}),jo("rect",{x:"5",y:"9.75",width:"4",height:"1.5",rx:"0.75",fill:"currentColor"})]});function HE({header:e,columnWidths:t,shouldShowDropdown:n,getColumnName:r,sortItems:o,multiSortEnabled:i,onSortingChange:l,onSingleSortClick:s,inlineFilterMap:a,currentFilters:u,onFilterChange:c,filterCounts:d,showCounts:f}){var p;const h=e.column.getCanSort(),g=e.column.id,m=a.get(g),v=n(g,h),y=t[g]||e.getSize(),b=m?null===(p=u.find((e=>e.id===m.id)))||void 0===p?void 0:p.value:void 0,w=v&&(i||!!m),S=_t(null),_=Et((()=>{var e;const t=null===(e=S.current)||void 0===e?void 0:e.querySelector(".header-menu-trigger");t instanceof HTMLElement&&t.click()}),[]),x=w?_:h?()=>s(g):void 0;return jo("th",{className:ri("table-header-cell",h&&"sortable",g&&"__responsive_control__"!==g?`col-${g.replace(/[^a-zA-Z0-9_-]/g,"")}`:""),"data-column-id":g,style:{width:y,maxWidth:y},children:e.isPlaceholder?null:jo("div",{ref:v?S:void 0,className:v?"table-header-cell-wrapper":void 0,children:[jo("div",{className:ri("table-header-content",(h||w)&&"clickable"),onClick:x,children:jo("span",{className:"table-header-label",children:vS(e.column.columnDef.header,e.getContext())})}),v&&jo(WE,{column:e.column,columnName:r(g),sorting:o,multiSortEnabled:i,onSortingChange:l,onSingleSortClick:s,inlineFilter:m,filterValue:null!=b?b:null,onFilterChange:m?e=>c(m.id,e):void 0,filterCounts:m?Qy(d,m.id):void 0,showCounts:f})]})})}const UE=Ht((function({headerGroups:e,hidden:t,isSticky:n,stickyEnabled:r,asF
1ooter:o,columnWidths:i,shouldShowDropdown:l,getColumnName:s,sortItems:a,multiSortEnabled:u,onSortingChange:c,onSingleSortClick:d,inlineFilterMap:f,currentFilters:p,onFilterChange:h,filterCounts:g,showCounts:m,style:v,className:y}){if(t)return null;const b=jo(Ae,{children:e.map((e=>jo("tr",{className:"table-header-row",children:e.headers.map((e=>jo(HE,{header:e,columnWidths:i,shouldShowDropdown:l,getColumnName:s,sortItems:a,multiSortEnabled:u,onSortingChange:c,onSingleSortClick:d,inlineFilterMap:f,currentFilters:p,onFilterChange:h,filterCounts:g,showCounts:m},e.id)))},e.id)))});return jo(o?"tfoot":"thead",{className:ri("table-header",o&&"table-footer",!r&&"table-header-not-sticky",n&&"table-header-fixed",y),style:v,children:b})})),GE=({value:e,rowData:t,className:n,columnConfig:r,filters:o,currentFilters:i,onFilterChange:l,allowClickToFilter:s=!0})=>{const a=_t(null),u=Ct((()=>r?dE(r,{filters:o,onFilterChange:l,currentFilters:i,allowClickToFilter:s}):null),[r,o,l,i,s]);if(St((()=>{a.current&&YC(a.current)}),[e,u]),null==e||""===e)return jo("div",{className:n,children:"—"});const c=u?u({getValue:()=>e,row:{original:t}}):(e=>{if("string"==typeof e)return jo("span",{dangerouslySetInnerHTML:{__html:e}});if(rE(e))return jo(UC,{data:e,columnId:"",clickToFilter:!1});if(nE(e)){const t=e;return t.thumbnail?jo("img",{src:t.thumbnail,alt:t.alt||"",style:{width:"70px",height:"70px",objectFit:"contain"}}):null}return"boolean"==typeof e?e?"true":"false":"number"==typeof e||"bigint"==typeof e||kn(e)?e:null})(e);return jo("div",null==c||""===c?{className:n,children:"—"}:{ref:a,className:n,children:c})},ZE=({hiddenColumns:e,rowData:t,columnConfigById:n,filters:r,currentFilters:o,onFilterChange:i,rowIndex:l})=>0===e.length?null:jo("ul",{className:"child-row-list","data-row-index":l,children:e.map((e=>jo("li",{className:ri("child-row-item",e.columnId?`col-${e.columnId.replace(/[^a-zA-Z0-9_-]/g,"")}`:""),"data-column-id":e.columnId,children:[jo("span",{className:"child-row-title",children:e.title}),jo(GE,{value:e.data,rowData:t,className:"child-row-data",columnConfig:n.get(e.columnId),filters:r,currentFilters:o,onFilterChange:i,allowClickToFilter:!0})]},e.columnId)))}),KE=({hiddenColumns:e,rowData:t,columnConfigById:n,filters:r,currentFilters:o,onFilterChange:i,rowIndex:l,visibleColumnCount:s,isVisible:a,display:u})=>{const{i18n:c}=xi();return a||"childRowVisible"===u?0===e.length?null:jo("tr",{className:ri("child-row","childRowVisible"===u&&"always-visible",a&&"shown"),"data-parent-row":l,role:"region","aria-label":c.additionalRowDetails,children:jo("td",{colSpan:s,className:"child-row-cell",children:jo("div",{className:"child-row-content",children:jo(ZE,{hiddenColumns:e,rowData:t,columnConfigById:n,filters:r,currentFilters:o,onFilterChange:i,rowIndex:l})})})}):null},JE=rt(!1),YE=rt(void 0);function XE(e){const t=Rt(YE);if(!1===e&&void 0===t)throw new Error(rd(27));return t}const QE={...Vv,...em},eR=Zt((function(e,t){const{render:n,className:r,style:o,forceRender:i=!1,...l}=e,{store:s}=XE(),a=s.useState("open"),u=s.useState("nested"),c=s.useState("mounted");return jh("div",e,{state:{open:a,transitionStatus:s.useState("transitionStatus")},ref:[s.context.backdropRef,t],stateAttributesMapping:QE,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:i||!u})})),tR=Zt((function(e,t){const{render:n,className:r,style:o,disabled:i=!1,nativeButton:l=!0,...s}=e,{store:a}=XE(),u=a.useState("open"),{getButtonProps:c,buttonRef:d}=Uv({disabled:i,native:l});return jh("button",e,{state:{disabled:i},ref:[t,d],props:[{onClick:function(e){u&&a.setOpen(!1,dp(tp,e.nativeEvent))}},s,c]})}));let nR=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),rR=function(e){return e[e.open=Ov.open]="open",e[e.closed=Ov.closed]="closed",e[e.startingStyle=Ov.startingStyle]="startingStyle",e[e.endingStyle=Ov.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const oR=rt(void 0),iR={...Vv,...em,nestedDialogOpen:e=>e?{[rR.nestedDialogOpen]:""}:null},lR=Zt((function(e,t){var n;const{render:r,className:o,style:i,finalFocus:l,initialFocus:s,...a}=e,{store:u}=XE(),c=u.useState("descriptionElementId"),d=u.useState("disablePointerDismissal"),f=u.useState("floatingRootContext"),p=u.useState("popupProps"),h=u.useState("modal"),g=u.useState("mounted"),m=u.useState("nested"),v=u.useState("nestedOpenDialogCount"),y=u.useState("open"),b=u.useState("openMethod"),w=u.useState("titleElementId"),S=u.useState("transitionStatus"),_=u.useState("role"),x=f.useState("floatingId"),C=null!==(n=a.id)&&void 0!==n?n:x;!function(){if(void 0===Rt(oR))throw new Error(rd(26))}(),nm({open:y,ref:u.context.popupRef,onComplete(){var e,t;y&&(null===(e=(t=u.context).onOpenChangeComplete)||void 0===e||e.call(t,!0))}});const E=void 0===s?(R=u.context.popupRef,e=>"touch"!==e||R.current):s;var R;const I=v>0,k=u.useStateSetter("popupElement"),P=jh("div",e,{state:{open:y,nested:m,transitionStatus:S,nestedDialogOpen:I},props:[p,{id:C,"aria-labelledby":null!=w?w:void 0,"aria-describedby":null!=c?c:void 0,role:_,...rm,hidden:!g,onKeyDown(e){zb.has(e.key)&&e.stopPropagation()},style:{[nR.nestedDialogs]:v}},a],ref:[t,u.context.popupRef,k],stateAttributesMapping:iR});return Zo.jsx(pg,{context:f,openInteractionType:b,disabled:!g,closeOnFocusOut:!d,initialFocus:E,returnFocus:l,modal:!1!==h,restoreFocus:"popup",children:P})})),sR=Zt((function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=XE(),i=o.useState("mounted"),l=o.useState("modal"),s=o.useState("open");return i||n?Zo.jsx(oR.Provider,{value:n,children:Zo.jsxs(Yh,{ref:t,...r,children:[i&&!0===l&&Zo.jsx(yy,{ref:o.context.
1internalBackdropRef,inert:ay(!s)}),e.children]})}):null}));function aR({store:e,parentContext:t,isDrawer:n}){var r,o,i;const l=e.useState("open"),s=e.useState("disablePointerDismissal"),a=e.useState("modal"),u=e.useState("popupElement"),c=e.useState("floatingRootContext"),[d,f]=yt(0),[p,h]=yt(0),g=0===d,m=mg(c,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===a?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current)return!1;if("button"in t&&0!==t.button)return!1;if("touches"in t&&1!==t.touches.length)return!1;const n=qf(t);return!(!g||s)&&(!a||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||Vf(n,u)&&!(null!=n&&n.hasAttribute("data-base-ui-portal")))},escapeKey:g});Ey(l&&!0===a,u),e.useContextCallback("onNestedDialogOpen",((e,t)=>{f(e),h(t)})),e.useContextCallback("onNestedDialogClose",(()=>{f(0),h(0)})),wt((()=>(null!=t&&t.onNestedDialogOpen&&l&&t.onNestedDialogOpen(d+1,p+(n?1:0)),null!=t&&t.onNestedDialogClose&&!l&&t.onNestedDialogClose(),()=>{null!=t&&t.onNestedDialogClose&&l&&t.onNestedDialogClose()})),[n,l,d,p,t]);const v=null!==(r=m.reference)&&void 0!==r?r:kd,y=null!==(o=m.trigger)&&void 0!==o?o:kd,b=null!==(i=m.floating)&&void 0!==i?i:kd;return sm(e,{activeTriggerProps:v,inactiveTriggerProps:y,popupProps:b,nestedOpenDialogCount:d,nestedOpenDrawerCount:p}),null}const uR={...hm,modal:od((e=>e.modal)),nested:od((e=>e.nested)),nestedOpenDialogCount:od((e=>e.nestedOpenDialogCount)),nestedOpenDrawerCount:od((e=>e.nestedOpenDrawerCount)),disablePointerDismissal:od((e=>e.disablePointerDismissal)),openMethod:od((e=>e.openMethod)),descriptionElementId:od((e=>e.descriptionElementId)),titleElementId:od((e=>e.titleElementId)),viewportElement:od((e=>e.viewportElement)),role:od((e=>e.role))};class cR extends Pd{constructor(e,t,n=!1){const r=new am,o=function(e={}){return{...um(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);o.floatingRootContext=function(e,t,n=!1){return new Zg({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}(r,t,n),super(o,{popupRef:Te(),backdropRef:Te(),internalBackdropRef:Te(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},uR),te(this,"setOpen",((e,t)=>{var n,r,o;if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=null!==(o=this.state.activeTriggerElement)&&void 0!==o?o:void 0),null===(n=(r=this.context).onOpenChange)||void 0===n||n.call(r,e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);const i={open:e};om(i,e,t.trigger),this.update(i)}))}static useStore(e,t){const n=function(e,t,n=!1){const r=Ih(),o=null!=ng(),i=_t(null);void 0===e&&null===i.current&&(i.current=t(r,o));const l=null!=e?e:i.current;return Kg({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:l.setOpen}),{store:l,internalStore:i.current}}(e,((e,n)=>new cR(t,e,n)),!0).store;return n}}function dR(e){return function(e,t="dialog"){const{children:n,open:r,defaultOpen:o=!1,onOpenChange:i,onOpenChangeComplete:l,disablePointerDismissal:s=!1,modal:a=!0,actionsRef:u,handle:c,triggerId:d,defaultTriggerId:f=null}=e,p="drawer"===t,h="alert-dialog"===t,g=!!h||a,m=h||s,v=h?"alertdialog":"dialog",y=XE(!0),b={modal:g,disablePointerDismissal:m,nested:Boolean(y),role:v},w=cR.useStore(null==c?void 0:c.store,{open:o,openProp:r,activeTriggerId:f,triggerIdProp:d,...b});qc((()=>{const e=void 0===r&&!1===w.state.open&&!0===o?{open:!0,activeTriggerId:f}:null;h?w.update(e?{...b,...e}:b):e&&w.update(e)})),w.useControlledProp("openProp",r),w.useControlledProp("triggerIdProp",d),w.useSyncedValues(b),w.useContextCallback("onOpenChange",i
1),w.useContextCallback("onOpenChangeComplete",l);const S=w.useState("open"),_=w.useState("mounted"),x=w.useState("payload");!function(e){const{store:t,actionsRef:n}=e,r=t.useState("open");!function(e,t){Vc((()=>{t||null===e.state.openMethod||e.set("openMethod",null)}),[t,e]),Vc((()=>()=>{null!==e.state.openMethod&&e.set("openMethod",null)}),[e])}(t,r),im(t);const{forceUnmount:o}=lm(r,t),i=Et((()=>{t.setOpen(!1,dp(cp))}),[t]);xt(n,(()=>({unmount:o,close:i})),[o,i])}({store:w,actionsRef:u});const C=S||_,E=Ct((()=>({store:w})),[w]);return Zo.jsx(JE.Provider,{value:!1,children:Zo.jsxs(YE.Provider,{value:E,children:[C&&Zo.jsx(aR,{store:w,parentContext:null==y?void 0:y.store.context,isDrawer:p}),"function"==typeof n?n({payload:x}):n]})})}(e,Rt(JE)?"drawer":"dialog")}const fR=Zt((function(e,t){const{render:n,className:r,style:o,id:i,...l}=e,{store:s}=XE(),a=fv(i);return s.useSyncedValueWithCleanup("titleElementId",a),jh("h2",e,{ref:t,props:[{id:a},l]})})),pR=({allColumns:e,rowData:t,columnConfigById:n,filters:r,currentFilters:o,onFilterChange:i,allowClickToFilter:l=!1,isOpen:s,onClose:a,rowIndex:u=0,title:c,popupRef:d})=>{const{displayMode:f,i18n:p}=xi();St((()=>{s&&d.current&&YC(d.current)}),[s,e,c,d]);const h=Ct((()=>c?e.filter((e=>"title"!==e.columnId)):e),[e,c]);return 0===e.length?null:jo(dR,{open:s,onOpenChange:e=>!e&&a(),children:jo(sR,{children:[jo(eR,{className:"barn2-responsive-modal-backdrop"}),jo(lR,{ref:d,className:"barn2-responsive-modal-popup","data-display-mode":f,children:jo("div",{className:"barn2-responsive-modal-content",children:[jo("div",{className:"barn2-responsive-modal-header",children:[jo(fR,c?{className:"barn2-responsive-modal-title",dangerouslySetInnerHTML:{__html:c}}:{className:"barn2-responsive-modal-title",children:p.details}),jo(tR,{className:"barn2-responsive-modal-close","aria-label":p.close,children:jo(Hy,{})})]}),jo("div",{className:"barn2-responsive-modal-body",children:jo("ul",{className:"modal-details-list","data-row-index":u,children:h.map((e=>jo("li",{className:ri("modal-details-item",e.columnId?`col-${e.columnId.replace(/[^a-zA-Z0-9_-]/g,"")}`:""),"data-column-id":e.columnId,children:[jo("span",{className:"modal-details-title",children:e.title}),jo(GE,{value:e.data,rowData:t,className:"modal-details-data",columnConfig:n.get(e.columnId),filters:r,currentFilters:o,onFilterChange:i,allowClickToFilter:l})]},e.columnId)))})})]})})]})})};function hR({data:e,columns:t,features:n,state:r,totalPages:o,containerWidth:i,filters:l,filterCounts:s,onFilterChange:a,onSortingChange:u,onPaginationChange:c,onRowClick:d,wrapperRef:f,loading:p,rowSelection:h,infiniteScroll:g,hasScrolledInfiniteScrollContainer:m}){var v,y,b,w,S;const{i18n:_}=xi(),x=_t(null),C=_t(null),E=null!==h,R=!1!==(null==h?void 0:h.selectAll.enabled),I=null!==(v=null==h?void 0:h.selectAll.label)&&void 0!==v?v:void 0,k=r.filters.length>0||""!==r.search.query.trim(),P=Ct((()=>JSON.stringify({pageIndex:r.pagination.pageIndex,sorting:r.sorting,filters:r.filters,search:r.search.query})),[r.pagination.pageIndex,r.sorting,r.filters,r.search.query]),O=n.header,M=n.scrollToTop,T=void 0!==g,{visibleColumnConfigs:A,columnWidths:N,widthsReady:F,responsiveEnabled:z,hasHiddenColumns:D,shouldShowControl:L,isRowExpanded:V,toggleRow:q,getHiddenColumnsForRow:$,getAllColumnsForRow:j,responsiveConfig:W,responsiveState:B}=pE({columns:t,data:e,containerRef:x,containerWidth:i,responsiveConfig:n.responsive,loading:p,dataStateKey:P}),{isSticky:H,stickyStyle:U}=function({enabled:e,offset:t=0,tableRef:n}){const[r,o]=yt(!1),[i,l]=yt({}),[s,a]=yt([]),u=_t(null),c=Et((()=>{if(!e||!n.current)return void o(!1);const r=n.current.querySelector("table"),i=null==r?void 0:r.querySelector("thead");if(!r||!i)return void o(!1);u.current=i;const s=r.getBoundingClientRect(),a=i.getBoundingClientRect(),c=a.bottom<t&&s.bottom>t+a.height;o(c),c&&l({position:"fixed",top:t,left:s.left,width:s.width,zIndex:1e3})}),[e,t,n]),d=Et((()=>{if(!u.current)return;const e=u.current.querySelectorAll("th"),t=[];e.forEach((e=>{t.push(e.offsetWidth)})),a(t)}),[]);return wt((()=>{if(!e||!n.current)return;c(),d();const t=()=>{c()},r=()=>{d(),c()};window.addEventListener("scroll",t,{passive:!0}),window.addEventListener("resize",r);const o=n.current.querySelector("table");let i=null;return o&&(i=new ResizeObserver((()=>{d(),c()})),i.observe(o)),()=>{var e;window.removeEventListener("scroll",t),window.removeEventListener("resize",r),null===(e=i)||void 0===e||e.disconnect()}}
1),[e,n,c,d]),wt((()=>{r&&d()}),[r,d]),{isSticky:r,stickyStyle:i,columnWidths:s}}({enabled:O.sticky&&!O.hidden,offset:null!==(y=null==M?void 0:M.offset)&&void 0!==y?y:0,tableRef:x});hE({enabled:null!==M,offset:null!==(b=null==M?void 0:M.offset)&&void 0!==b?b:0,targetRef:f,stateKey:JSON.stringify({...!T&&{page:r.pagination.pageIndex},filters:r.filters,search:r.search.query}),loading:p});const[G,Z]=yt(null),K=Ct((()=>(e=>{const t=new Map;return e.forEach((e=>{t.set(e.id,e)})),t})(t)),[t]),J=Ct((()=>{if(!n.filtering.column||!l)return new Map;const e=new Map;return l.forEach((t=>{var n;const r=null!==(n=t.columnId)&&void 0!==n?n:t.id;K.has(r)&&e.set(r,t)})),e}),[n.filtering.column,l,K]),Y=Et((e=>{const t=K.get(e);return null!=t&&t.header?bi(t.header):e}),[K]),X=Ct((()=>((e,t)=>e.map((e=>({id:e.id,columnName:t(e.id),desc:e.desc}))))(r.sorting,Y)),[r.sorting,Y]),Q=Et((e=>{u(e.map((({id:e,desc:t})=>({id:e,desc:t}))))}),[u]),ee=Et((e=>{const t=r.sorting.find((t=>t.id===e));u(t?[{id:e,desc:!t.desc}]:[{id:e,desc:!1}])}),[u,r.sorting]),te=Et(((e,t)=>J.has(e)||t),[J]),ne=_t(new Map),re=(he={count:e.length,estimateSize:()=>52,getScrollElement:()=>x.current,overscan:5,measureElement:"undefined"!=typeof window?e=>{if(!e)return 0;let t=e.getBoundingClientRect().height;const n=e.nextElementSibling;return n&&n.classList.contains("child-row")&&(t+=n.getBoundingClientRect().height),t}:void 0},function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...r}){const o=bt((e=>e+1),0)[1],i=_t({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=t,i.current.mode=n;const l=e=>{const t=i.current;if(!t.enabled||!t.container)return;const n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;const r=e.options.horizontal?"width":"height";t.container.style[r]=`${n}px`}const r=!!e.options.horizontal,o="transform"===t.mode,l=r?"left":"top",s=e.options.scrollMargin,a=e.getVirtualItems();for(const n of a){const i=n.start-s,a=e.elementsCache.get(n.key);a&&t.lastPositions.get(a)!==i&&(t.lastPositions.set(a,i),o?a.style.transform=r?`translate3d(${i}px, 0, 0)`:`translate3d(0, ${i}px, 0)`:a.style[l]=`${i}px`)}},s={...r,onChange:(t,n)=>{var s;const a=i.current;let u=!0;if(a.enabled){l(t);const e=t.range,n=a.prevRange;u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==(null==e?void 0:e.startIndex)||n.endIndex!==(null==e?void 0:e.endIndex),u&&(a.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n?Nn(o):o()),null==(s=r.onChange)||s.call(r,t,n)}},[a]=yt((()=>{const e=new TS(s);return Object.assign(e,{containerRef:t=>{const n=i.current;if(n.container=t,n.lastSize=null,t&&n.enabled){const r=e.getTotalSize();n.lastSize=r;const o=e.options.horizontal?"width":"height";t.style[o]=`${r}px`}}})}));return a.setOptions(s),NS((()=>a._didMount()),[]),NS((()=>a._willUpdate())),NS((()=>{l(a)})),a}({observeElementRect:RS,observeElementOffset:PS,scrollToFn:MS,...he})),oe=re.getVirtualItems(),ie=oe[0],le=oe[oe.length-1],se=Array.from(B.expandedRows).sort().join(","),ae=`${null!==(w=null==ie?void 0:ie.index)&&void 0!==w?w:-1}:${null!==(S=null==le?void 0:le.index)&&void 0!==S?S:-1}:${e.length}:${se}:${null!=G?G:""}`,ue=Et((e=>{q(e),requestAnimationFrame((()=>{const t=ne.current.get(e);t&&re.measureElement(t)}))}),[q,re]),ce=Ct((()=>{if(!E||!R)return null;const t=A.filter((e=>e.id!==QC)),n=Math.min(e.length,50);for(const r of t){const t=r.accessor||r.id;for(let o=0;o<n;o++){const n=e[o],i=null==n?void 0:n[t];if("string"==typeof i&&i.includes("data-dv-row-selection-id"))return r.id}}for(const e of["buy","link"])if(t.some((t=>t.id===e)))return e;return null}),[E,R,A,e]),de=Ct((()=>{var e,t;const n=((e,t)=>e.map((e=>((e,t)=>{const n={id:e.id,header:e.header,size:sE(e.width),enableSorting:!1!==e.sortable,enableHiding:!0,meta:{dataType:e.dataType,filterable:!1!==e.filterable,searchable:!1!==e.searchable,...e.metadata}};return e.accessor?n.accessorKey=e.accessor:n.accessorKey=e.id,n.cell=dE(e,t),e.tanstackColumn&&Object.assign(n,e.tanstackColumn),"string"==typeof n.header&&(n.header=bi(n.header)),n}
1)(e,t))))(A.filter((e=>e.id!==QC)),{filters:l,onFilterChange:a,currentFilters:r.filters}),o=E&&R&&ce?n.map((e=>{if(e.id!==ce)return e;const t=e.header,n=null!=t;return{...e,header:e=>jo("span",{className:ri("dv-select-all-header",n&&"dv-select-all-header--with-title"),children:[n&&jo("span",{className:"dv-select-all-header__title",children:"function"==typeof t?t(e):t}),jo(gE,{columnId:ce,label:I})]})}})):n,i=(e=>{const t=[],n=e.responsive;return n&&n.enabled&&"column"===n.controlType&&n.shouldShowControl&&t.push({id:QC,header:()=>null,cell:({row:e})=>jo(GC,{isExpanded:n.isRowExpanded(e.id),onClick:()=>{"modal"===n.displayMode?n.onOpenModal(e.index):n.onToggleRow(e.id)},type:"column",hasHiddenColumns:n.hasHiddenColumns}),size:50,enableSorting:!1,enableHiding:!1,meta:{isResponsiveControl:!0}}),t})({responsive:z?{enabled:z,controlType:null!==(e=null==W?void 0:W.control)&&void 0!==e?e:"inline",displayMode:null!==(t=null==W?void 0:W.display)&&void 0!==t?t:"childRow",shouldShowControl:L,hasHiddenColumns:D,isRowExpanded:V,onToggleRow:ue,onOpenModal:Z}:null});return i.length>0?[...i,...o]:o}),[A,l,a,r.filters,E,R,I,ce,z,W,L,V,D,ue,Z]),fe=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=yt((()=>({current:mS(t)}))),[r,o]=yt((()=>n.current.initialState));return n.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}}))),n.current}({data:e,columns:de,getCoreRowModel:e=>Cw((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const l=[];for(let a=0;a<t.length;a++){const u=Ow(e,e._getRowId(t[a],a,i),t[a],a,o,0,null==i?void 0:i.id);var s;n.flatRows.push(u),n.rowsById[u.id]=u,l.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[a],a),null!=(s=u.originalSubRows)&&s.length&&(u.subRows=r(u.originalSubRows,o+1,u)))}return l};return n.rows=r(t),n}),Ew(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getSortedRowModel:e=>Cw((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],i=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),l={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(l[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const s=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r<i.length;r+=1){var n;const o=i[r],s=l[o.id],a=s.sortUndefined,u=null!=(n=null==o?void 0:o.desc)&&n;let c=0;if(a){const n=void 0===e.getValue(o.id),r=void 0===t.getValue(o.id);if(n||r){if("first"===a)return n?-1:1;if("last"===a)return n?1:-1;c=n&&r?0:n?a:-a}}if(0===c&&(c=s.sortingFn(e,t,o.id)),0!==c)return u&&(c*=-1),s.invertSorting&&(c*=-1),c}return e.index-t.index})),t.forEach((e=>{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))})),t};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}}),Ew(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getFilteredRowModel:e=>Cw((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,r)=>{if(!t.rows.length||(null==n||!n.length)&&!r){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const o=[],i=[];(null!=n?n:[]).forEach((t=>{var n;const r=e.getColumn(t.id);if(!r)return;const i=r.getFilterFn();i&&o.push({id:t.id,filterFn:i,resolvedValue:null!=(n=null==i.resolveFilterValue?void 0:i.resolveFilterValue(t.value))?n:t.value})}));const l=(null!=n?n:[]).map((e=>e.id)),s=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,c;r&&s&&a.length&&(l.push("__global__"),a.forEach((e=>{var t;i.push({id:e.id,filterFn:s,resolvedValue:null!=(t=null==s.resolveFilterValue?void 0:s.resolveFilterValue(r))?t:r})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},o.length)for(let e=0;e<o.length;e++){u=o[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(i.length){for(let e=0;e<i.length;e++){c=i[e];const t=c.id;if(c.filterFn(n,t,c.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return function(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){var r;const o=[],i={},l=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,s=function(e,r){void 0===r&&(r=0);const a=[];for(let c=0;c<e.length;c++){var u;let d=e[c];const f=Ow(n,d.id,d.original,d.index,d.depth,0,d.parentId);if(f.columnFilters=d.columnFilters,null!=(u=d.subRows)&&u.length&&r<l){if(f.subRows=s(d.subRows,r+1),d=f,t(d)&&!f.subRows.length){a.push(d),i[d.id]=d,o.push(d);continue}if(t(d)||f.subRows.length){a.push(d),i[d.id]=d,o.push(d);continue}}else d=f,t(d)&&(a.push(d),i[d.id]=d,o.push(d))}return a};return{rows:s(e),flatRows:o,rowsById:i}}
1(e,t,n):function(e,t,n){var r;const o=[],i={},l=null!=(r=n.options.maxLeafRowFilterDepth)?r:100,s=function(e,r){void 0===r&&(r=0);const a=[];for(let c=0;c<e.length;c++){let d=e[c];if(t(d)){var u;if(null!=(u=d.subRows)&&u.length&&r<l){const e=Ow(n,d.id,d.original,d.index,d.depth,0,d.parentId);e.subRows=s(d.subRows,r+1),d=e}a.push(d),o.push(d),i[d.id]=d}}return a};return{rows:s(e),flatRows:o,rowsById:i}}(e,t,n)}(t.rows,(e=>{for(let t=0;t<l.length;t++)if(!1===e.columnFilters[l[t]])return!1;return!0}),e)}),Ew(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableMultiSort:n.sorting.multi,maxMultiSortColCount:n.sorting.multi?2:1,pageCount:o,getRowId:(e,t)=>String(e&&"object"==typeof e&&"id"in e?e.id:t),state:{pagination:r.pagination,sorting:r.sorting.map((e=>({id:e.id,desc:e.desc})))},onSortingChange:e=>{const t=r.sorting.map((e=>({id:e.id,desc:e.desc}))),n="function"==typeof e?e(t):e;u(n)},onPaginationChange:e=>{const t="function"==typeof e?e(r.pagination):e;c(t)}}),pe=Et((e=>{if(e&&T&&null!=g&&g.fetchNextPage){const{scrollHeight:t,scrollTop:n,clientHeight:r}=e;t-n-r<500&&!g.isFetchingNextPage&&g.hasNextPage&&g.fetchNextPage()}}),[g,T]);var he;wt((()=>{if(!T)return;const e=x.current;if(!e)return;const t=()=>pe(e);return e.addEventListener("scroll",t,{passive:!0}),()=>e.removeEventListener("scroll",t)}),[T,pe]),wt((()=>{e.length>0&&re&&requestAnimationFrame((()=>{ne.current.forEach((e=>{re.measureElement(e)}))}))}),[e,re]);const ge=Et((()=>{var e;const{rows:t}=fe.getRowModel(),n=re.getVirtualItems(),o=re.getTotalSize(),i=n[0],s=n[n.length-1],u=null!==(e=null==i?void 0:i.start)&&void 0!==e?e:0,c=s?Math.max(o-s.end,0):0,f=fe.getVisibleLeafColumns().length||A.length,p=(e,t)=>t<=0?null:jo("tr",{className:"virtual-spacer-row","aria-hidden":"true",children:jo("td",{colSpan:f,style:{border:0,height:`${t}px`,lineHeight:0,padding:0}})},e);return jo("tbody",{children:[p("top-spacer",u),n.map((e=>{const n=t[e.index];if(!n)return null;const o=n.id,i=V(o),s=$(n.original,n.index),u=n.original.rowClass||"",c=e.index%2==1;return jo(Ae,{children:[jo("tr",{"data-index":e.index,"data-row-id":n.original.id||n.id,ref:e=>{e?(ne.current.set(o,e),re.measureElement(e)):ne.current.delete(o)},onClick:()=>null==d?void 0:d(n.original),className:ri("table-row",c?"odd":"even",u,d&&"table-row-clickable",z&&D&&"responsive-parent",i&&"expanded"),children:n.getVisibleCells().map(((e,t)=>{const r=0===t,l=z&&"inline"===(null==W?void 0:W.control)&&r&&L;return jo("td",{className:ri("table-cell",e.column.id&&"__responsive_control__"!==e.column.id?`col-${e.column.id.replace(/[^a-zA-Z0-9_-]/g,"")}`:""),"data-column-id":e.column.id,style:{width:N[e.column.id]||e.column.getSize(),maxWidth:N[e.column.id]||e.column.getSize()},children:jo("div",{className:ri("cell-content",l&&"has-responsive-control"),children:[l&&jo(GC,{isExpanded:i,onClick:()=>{"modal"===(null==W?void 0:W.display)?Z(n.index):ue(o)},type:"inline",hasHiddenColumns:D}),vS(e.column.columnDef.cell,e.getContext())]})},e.id)}))}),z&&W&&("childRow"===W.display||"childRowVisible"===W.display)&&jo(KE,{hiddenColumns:s,rowData:n.original,columnConfigById:K,filters:l,currentFilters:r.filters,onFilterChange:a,rowIndex:n.index,visibleColumnCount:n.getVisibleCells().length,isVisible:i,display:null==W?void 0:W.display},`${n.id}-child`)]},n.id)})),p("bottom-spacer",c)]})}),[fe,re,A.length,V,$,D,L,z,W,N,d,ue,K,l,r.filters,a]),me=O.location,ve="top"===me||"both"===me,ye="bottom"===me||"both"===me,be=O.hidden,we=Ct((()=>({headerGroups:fe.getHeaderGroups(),hidden:be,stickyEnabled:O.sticky,asFooter:!1,columnWidths:N,shouldShowDropdown:te,getColumnName:Y,sortItems:X,multiSortEnabled:n.sorting.multi,onSortingChange:Q,onSingleSortClick:ee,inlineFilterMap:J,currentFilters:r.filters,onFilterChange:a,filterCounts:s,showCounts:n.filtering.showCounts})),[fe,be,O.sticky,N,te,Y,X,n.sorting.multi,Q,ee,J,r.filters,a,s,n.filtering.showCounts]),Se=Ct((()=>({...we,hidden:!1,asFooter:!0})),[we]),_e=T&&e.length>0&&((null==g?void 0:g.isFetchingNextPage)||m&&!(null!=g&&g.hasNextPage)),xe=Et((()=>jo(Ae,{children:[jo("table",{className:"data-table",children:[ve&&jo(UE,{...we,isSticky:!1}),ge(),ye&&jo(UE,{...Se,isSticky:!1})]}),H&&ve&&jo("div",{className:"barn2-table-header-fixed-wrapper is-visible",style:U,children:jo("table",{className:"data-table",children:jo(UE,{...we,isSticky:!0})})}),_e&&jo("div",{className:"infinite-scroll-status",style:{textAlign:"center",padding:"20px",fontSize:"14px",color:"#666"},children:[(null==g?void 0:g.isFetchingNextPage)&&jo("div",{children:_.loadingMoreItems}),!(null!=g&&g.hasNextPage)&&!(null!=g&&g.isFetchingNextPage)&&jo("div",{children:_.allItemsLoaded})]}),!p&&0===e.length&&jo("div",{className:"no-data",children:k?_.noFilteredDataAvailable:_.noDataAvailable})]})),[we,Se,ge,H,U,T,g,m,_e,e.length,k,ve,ye,_]),Ce=Et((()=>
1{if(!z||"modal"!==(null==W?void 0:W.display)||null===G)return null;const t=e[G],n=null!=t&&t.title?String(t.title):void 0;return jo(pR,{allColumns:j(t,G),rowData:t,columnConfigById:K,filters:l,currentFilters:r.filters,onFilterChange:a,allowClickToFilter:!1,isOpen:null!==G,onClose:()=>Z(null),rowIndex:G,title:n,popupRef:C})}),[z,W,G,j,e,K,l,r.filters,a]);return{containerRef:x,modalContainerRef:C,renderContent:xe,renderVersion:ae,renderModal:Ce,widthsReady:F}}const gR=({onLoadMore:e,hasMore:t,isLoading:n,hasScrolled:r,loadingMessage:o,endMessage:i})=>{const{i18n:l}=xi(),s=null!=o?o:l.loadingMore,a=null!=i?i:l.noMoreItemsToLoad,u=_t(null);return wt((()=>{const r=u.current;if(!r)return;const o=new IntersectionObserver((r=>{r[0].isIntersecting&&t&&!n&&e()}),{root:null,rootMargin:"500px",threshold:0});return o.observe(r),()=>{o.disconnect()}}),[e,t,n]),t||n?jo("div",{ref:u,className:"infinite-scroll-trigger",style:{textAlign:"center",padding:"20px",minHeight:"1px",display:"block"},children:n&&jo("div",{className:"infinite-scroll-loading",style:{fontSize:"14px",color:"#666"},children:s})}):r?jo("div",{className:"infinite-scroll-end",style:{textAlign:"center",padding:"20px",color:"#666",fontSize:"14px"},children:a}):null},mR=({config:e,className:t,containerStyle:n,onStateChange:r,onError:o,onAction:i,actionLoading:l,initialSelections:s,rowSelectionResetVersion:a,onSelectionChange:u,actionButtonLabelOverride:c,features:d,onDisplayModeChange:f})=>{var p;const h=_t(null),{displayMode:g,infiniteScroll:m,grid:v,hasLightboxColumn:y,prefetch:b}=d,w=null!==m,S="grid"===g,[_,x]=yt(0),C=Ct((()=>{var t,n,r,o;return{pagination:(null===(t=e.defaultState)||void 0===t?void 0:t.pagination)||{pageIndex:0,pageSize:(null==m?void 0:m.pageSize)||10},sorting:(null===(n=e.defaultState)||void 0===n?void 0:n.sorting)||[],filters:(null===(r=e.defaultState)||void 0===r?void 0:r.filters)||[],search:(null===(o=e.defaultState)||void 0===o?void 0:o.search)||{query:""}}}),[e,null==m?void 0:m.pageSize]),{data:E,cardHtml:R,loading:I,isFetching:k,error:P,totalRows:O,totalPages:M,state:T,setState:A,refetch:N,hasNextPage:F,fetchNextPage:z,isFetchingNextPage:D,filterCounts:L}=(e=>{var t;const{serverUrl:n,restNonce:r,fetchData:o,viewId:i,state:l,enabled:s=!0,refetchInterval:a,urlSync:u,infiniteScroll:c,prefetchAdjacentPages:d=!0,displayMode:f,extraRequestData:p}=e;if(c)return Ic(e);const[h,g]=yt(0),m=_t(o);wt((()=>{m.current!==o&&(m.current=o,g((e=>e+1)))}),[o]);const v=o?"fetchData":n?`${n}:${r||"no-rest-nonce"}`:"missing-data-source",y=_t(l||{pagination:{pageIndex:0,pageSize:10},sorting:[],filters:[],search:{query:""}}),b=Jo(),w=Ct((()=>{const e=y.current;if(null==u||!u.enabled)return e;const t=_c();if(!t)return e;const n=u.syncParams||["page","pageSize","filters","search","sorting"],r=Sc(t,n,e);return{...e,...r,pagination:r.pagination?{...e.pagination,...r.pagination}:e.pagination,sorting:void 0!==r.sorting?r.sorting:e.sorting}}),[]),[S,_]=yt(w);Cc(S,_,u||{enabled:!1,syncParams:[]},y.current);const x=Et((e=>{_((t=>({...t,...e,pagination:e.filters||e.search||e.sorting?{...t.pagination,pageIndex:0,...e.pagination||{}}:{...t.pagination,...e.pagination||{}}})))}),[]),{data:C,isLoading:E,isFetching:R,isPlaceholderData:I,error:k,refetch:P}=function(e){return ti(e,ho)}({queryKey:Pc(v,h,S,f,i,p),queryFn:()=>Mc(Oc(S,f,i),o,n,p,r),enabled:s,refetchInterval:a,placeholderData:e=>e,refetchOnWindowFocus:!1,staleTime:6e4,gcTime:3e5});return wt((()=>{if(!S.pagination)return;const e=S.pagination.pageIndex,t=(null==C?void 0:C.totalPages)||0;if((o||n)&&d){if(e<t-1){const t={...S,pagination:{...S.pagination,pageIndex:e+1}};b.prefetchQuery({queryKey:Pc(v,h,t,f,i,p),queryFn:()=>Mc(Oc(t,f,i),o,n,p,r),staleTime:6e4})}if(e>0){const t={...S,pagination:{...S.pagination,pageIndex:e-1}};b.prefetchQuery({queryKey:Pc(v,h,t,f,i,p),queryFn:()=>Mc(Oc(t,f,i),o,n,p,r),staleTime:6e4})}}}),[null===(t=S.pagination)||void 0===t?void 0:t.pageIndex,null==C?void 0:C.totalPages,v,h,o,n,r,d,S,b,f,i,p]),Ct((()=>({data:(null==C?void 0:C.data)||[],cardHtml:null==C?void 0:C.cardHtml,loading:E,isFetching:R,isPlaceholderData:I,error:k,totalRows:(null==C?void 0:C.totalRows)||0,totalPages:(null==C?void 0:C.totalPages)||0,state:S,setState:x,refetch:P,filterCounts:null==C?void 0:C.filterCounts})),[C,E,R,I,k,S,x,P])})({serverUrl:e.serverUrl,restNonce:e.restNonce,fetchData:e.fetchData,viewId:e.viewId,state:C,enabled:!0,urlSync:e.urlSync,infiniteScroll:w,prefetchAdjacentPages:b.adjacentPages,displayMode:g,extraRequestData:e.extraRequestData}),V=_t(e.defaultState);wt((()=>{V.current!==e.defaultState&&(V.current=e.defaultState,e.defaultState&&A(e.defaultState))}),[e.defaultState,A]);const q=Ct((()=>JSON.stringify({displayMode:g,filters:T.filters,search:T.search.query,sorting:T.sorting,pageSize:T.pagination.pageSize})),[g,T.filters,T.search.query,T.sorting,T.pagination.pageSize]),[$,j]=yt({stateKey:q,hasScrolled:!1}),W=_t(q),B=_t(!1);W.current!==q&&(W.current=q,B.current=!1);const H=$.stateKey===q&&$.hasScrolled;wt((()=>
1{if(j((e=>e.stateKey===q?e:{stateKey:q,hasScrolled:!1})),!w||k)return void(B.current=!1);let e=0;const t=requestAnimationFrame((()=>{e=requestAnimationFrame((()=>{B.current=!0}))}));return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}}),[w,q,k]);const U=Et((e=>{!w||!B.current||e.currentTarget.scrollTop<=0||j((e=>e.stateKey===q&&e.hasScrolled?e:{stateKey:q,hasScrolled:!0}))}),[w,q]);wt((()=>{null==r||r(T)}),[T,r]);const G=Et(((e,t)=>{const n=[...T.filters],r=n.findIndex((t=>t.id===e));null==t||Array.isArray(t)&&0===t.length?r>=0&&n.splice(r,1):r>=0?n[r]={id:e,value:t}:n.push({id:e,value:t}),A({filters:n})}),[A,T.filters]),Z=Et((e=>{A({search:{...T.search,query:e}})}),[A,T.search]),K=Et((()=>{N()}),[N]),J=Et((()=>{A({filters:[],search:{query:""}})}),[A]),Y=Et(((e,t)=>{const n=T.filters.map((n=>{if(n.id!==e)return n;if(Array.isArray(n.value)){const e=Zy(t),r=n.value.filter((t=>Zy(t)!==e));return r.length>0?{...n,value:r}:null}return null})).filter((e=>null!==e));A({filters:n})}),[T.filters,A]),X=Et((()=>{A({search:{query:""}})}),[A]),Q=T.filters.length>0||T.search.query.length>0,ee=null!==d.rowSelection,te=function({enabled:e,isActionLoading:t,initialSelections:n,resetVersion:r=0,onSelectionChange:o}){const[i,l]=yt((()=>null!=n?n:new Map)),s=_t(r);wt((()=>{s.current!==r&&(s.current=r,l(new Map))}),[r]);const a=_t(o);a.current=o,wt((()=>{var e;null===(e=a.current)||void 0===e||e.call(a,i)}),[i]);const u=Et((t=>{e&&l((e=>{const n=new Map(e);return n.set(t.id,t),n}))}),[e]),c=Et((t=>{e&&l((e=>{const n=new Map(e);return n.delete(t),n}))}),[e]),d=Et((t=>{e&&0!==t.length&&l((e=>{const n=new Map(e);return t.forEach((e=>{n.set(e.id,e)})),n}))}),[e]),f=Et((()=>{e&&l((()=>new Map))}),[e]),p=i.size;return Ct((()=>({selectedItems:i,selectItem:u,deselectItem:c,selectAll:d,deselectAll:f,containerRef:null,selectedCount:p,isActionLoading:t})),[i,u,c,d,f,p,t])}({enabled:ee,isActionLoading:null!=l&&l,initialSelections:s,resetVersion:a,onSelectionChange:u}),ne=Et((()=>{if(i){const e=Array.from(te.selectedItems.values());i({items:e,count:e.length})}}),[i,te.selectedItems]),re=Et((e=>{A({sorting:e})}),[A]),oe=Et((e=>{A({pagination:e})}),[A]),ie=Ct((()=>{if(S||!d.filtering.column||!e.filters)return new Map;const t=new Map,n=new Set(e.columns.map((e=>e.id)));return e.filters.forEach((e=>{var r;const o=null!==(r=e.columnId)&&void 0!==r?r:e.id;n.has(o)&&t.set(o,e)})),t}),[S,d.filtering.column,e.filters,e.columns]),le=Ct((()=>({handleSearch:Z,handleSearchExecute:K,handleFilterChange:G,handleResetFilters:J,handleRemoveFilterValue:Y,handleClearSearch:X,setDisplayMode:f,setPageSize:e=>A({pagination:{pageIndex:0,pageSize:e}}),setPage:e=>A({pagination:{...T.pagination,pageIndex:e}}),handleActionClick:ne})),[Z,K,G,J,Y,X,ne,f,A,T.pagination]),se=function({features:e,state:t,totalPages:n,totalRows:r,hasActiveFilters:o,filters:i,filterCounts:l,rowsPerPageOptions:s,customLayout:a,inlineFilterMap:u,rowSelection:c,selectedCount:d,isActionLoading:f,actionButtonLabelOverride:p,handlers:h}){return Ct((()=>{var u,g,m,v;const y=[],{pagination:b,viewSwitcherEnabled:w,displayMode:S}=e,_=null!==b,x=null!==(u=null==b?void 0:b.perPageSelector)&&void 0!==u?u:"bottom",C=null!==(g=null==b?void 0:b.documentCount)&&void 0!==g?g:"bottom",E=null!==(m=null==b?void 0:b.pageNavigation)&&void 0!==m?m:"bottom",R=(e,t,n,r,o)=>{!1!==n&&("both"!==n&&"top"!==n||y.push(Fc(`${e}-top`,t,"top",r,o)),"both"!==n&&"bottom"!==n||y.push(Fc(`${e}-bottom`,t,"bottom",r,o)))};var I;if((I=e.searching,!1===I?[]:"both"===I?["top","bottom"]:[I]).forEach((e=>{y.push(Fc("top"===e?"search":"search-bottom",Dc,e,1,{slot:"search",value:t.search.query,onChange:h.handleSearch,onSearch:h.handleSearchExecute}))})),e.filtering.above&&i&&i.forEach(((n,r)=>{var o;const i=n.multiple?ob:rb,s=Qy(l,n.id);y.push(Fc(`filter-${n.id}`,i,"top",2+r,{slot:"filters",filter:n,value:null===(o=t.filters.find((e=>e.id===n.id)))||void 0===o?void 0:o.value,onChange:e=>h.handleFilterChange(n.id,e),onReset:()=>h.handleFilterChange(n.id,null),filterCounts:s,showCounts:e.filtering.showCounts}))})),w&&y.push(Fc("view-switcher",nw,"top",99,{slot:"actions",currentView:S,onViewChange:h.setDisplayMode})),e.filtering.enabled&&o&&y.push(Fc("filter-reset",ib,"top",52,{slot:"reset",onReset:h.handleResetFilters,hasActiveFilters:o})),null!==(v=e.activeFilters)&&void 0!==v&&v.enabled&&o&&y.push(Fc("active-filters",sb,"top",51,{slot:"active",filters:t.filters,search:t.search,filterConfigs:i||[],onRemoveFilter:h.handleRemoveFilterValue,onClearSearch:h.handleClearSearch})),_&&!1===x&&!1===C&&!1===E&&y.push(Fc("table-info",Qb,"bottom",1,{currentPage:t.pagination.pageIndex,pageSize:t.pagination.pageSize,totalRows:r,rowsPerPageOptions:s,onPageSizeChange:h.setPageSize})),_&&b&&(R("per-page-selector",Jb,x,1,{pageSize:t.pagination.pageSize,rowsPerPageOptions:s,onPageSizeChange:h.setPageSize}),R("document-count",Yb,C,2,{currentPage:t.pagination.pageIndex,pageSize:t.pagination.pageSize,totalRows:r}),n>1&&R("page-navigation",Xb,E,3,{currentPage:t.pagination.pageIndex,totalPages:n,paginationType:b.type,onPageChange:h.setPage})),null!=c&&c.actionButton&&"table"===S){var k;const e=c.actionButton,t={slot:"actions",label:e.label,labelOverrideSignal:p,className:e.className,selectedCount:null!=d?d:0,onClick:null!==(k=h.handleActionClick)&&void 0!==k?k:()=>{},isLoading:null!=f&&f};R("action-button",rw,e.position,100,t)}return{...Nc,...a,components:[...y,...(null==a?void 0:a.components)||[]]}}),[e,t,n,r,o,i,l,s,a,u,c,d,f,p,h])}({features:d,state:T,totalPages:M,totalRows:O,hasActiveFilters:Q,filters:e.filters,filterCounts:L,rowsPerPageOptions:e.rowsPerPageOptions,customLayout:e.layout,inlineFilterMap:ie,rowSelection:d.rowSelection,selectedCount:te.selectedCount,isActionLoading:te.isActionLoading,actionButtonLabelOverride:c,handlers:le}),ae=hR({data:E,columns:e.columns,features:d,state:T,totalPages:M,containerWidth:_,filters:e.filters,filterCounts:L,onFilterChange:G,onSortingChange:re,onPaginationChange:oe,onRowClick:e.onRowClick,wrapperRef:h,loading:I,rowSelection:d.rowSelection,hasScrolledInfiniteScrollContainer:H,infiniteScroll:w?{hasNextPage:null!=F&&F,isFetchingNextPage:null!=D&&D,fetchNextPage:null!=z?z:()=>{}}:void 0}),ue=function({cardHtml:e,config:t,loading:n,enableLightbox:r=!1,infiniteScroll:o,scrollToTop:i,wrapperRef:l,state:s,hasScrolledInfiniteScrollContainer:a}){var u,c,d,f;const{i18n:p}=xi(),h=_t(null),g=null!==(u=t.gap)&&void 0!==u?u:25,m=null!==(c=t.columns)&&void 0!==c?c:"autosize",v=Boolean(s&&(s.filters.length>0||""!==s.search.query.trim())),y=null!==(d=null==o?void 0:o.enabled)&&void 0!==d&&d;hE({enabled:null!=i,offset:null!==(f=null==i?void 0:i.offset)&&void 0!==f?f:0,targetRef
1:null!=l?l:h,stateKey:s?JSON.stringify({...!y&&{page:s.pagination.pageIndex},filters:s.filters,search:s.search.query,sorting:s.sorting}):"",loading:n});const[b,w]=yt({isOpen:!1,imageUrl:null,caption:null}),S=Et((()=>{null!=o&&o.fetchNextPage&&!o.isFetchingNextPage&&o.fetchNextPage()}),[o]),_=Et((e=>{if(!r)return;const t=e.target.closest("img");if(!t)return;const n=t.dataset.lightboxUrl||t.src,o=t.alt||"";w({isOpen:!0,imageUrl:n,caption:o})}),[r]),x=Et((()=>{w({isOpen:!1,imageUrl:null,caption:null})}),[]),C=`grid-container dlp-grid-documents ${((e="autosize")=>"autosize"===e?"grid-autosize":`columns-${e}`)(m)}`,E=Et((()=>n||0!==e.length?jo("div",{className:"grid-wrapper",children:[jo("div",{className:C,style:{gap:`${g}px`},onClick:_,children:e.map(((e,t)=>jo(XC,{className:"grid-card",html:e},t)))}),(null==o?void 0:o.enabled)&&jo(gR,{onLoadMore:S,hasMore:o.hasNextPage,isLoading:o.isFetchingNextPage,hasScrolled:a,loadingMessage:p.loadingMoreItems,endMessage:p.noMoreItemsToLoad}),b.isOpen&&jo(BC,{isOpen:b.isOpen,imageUrl:b.imageUrl,caption:b.caption,onClose:x})]}):jo("div",{className:"grid-empty",children:[jo("div",{className:"grid-empty-title",children:v?p.noFilteredItemsFound:p.noItemsFound}),jo("div",{className:"grid-empty-message",children:p.adjustFiltersOrSearch})]})),[n,e,C,g,_,o,S,a,b,x,p,v]);return{containerRef:h,renderContent:E,renderVersion:String(e.length)}}({cardHtml:R||[],config:v||{gap:25,columns:"autosize"},loading:I,enableLightbox:y,hasScrolledInfiniteScrollContainer:H,infiniteScroll:w?{enabled:!0,hasNextPage:null!=F&&F,isFetchingNextPage:null!=D&&D,fetchNextPage:null!=z?z:()=>{}}:void 0,scrollToTop:d.scrollToTop,wrapperRef:h,state:T}),ce=S?ue:ae,de=Ct((()=>({...te,containerRef:ce.containerRef})),[te,ce.containerRef]),fe=I&&0===E.length||!S&&!ae.widthsReady;!function({enabled:e,containerRef:t,selectedItems:n,onSelect:r,onDeselect:o,data:i,contentRendered:l}){const s=_t(null),a=_t(new Set),u=_t(r);u.current=r;const c=_t(o);c.current=o;const d=_t(n);d.current=n,wt((()=>{a.current=new Set(n.keys())}),[n]);const f=Et((()=>{const e=t.current;e&&e.querySelectorAll(bw).forEach((e=>{const t=e.getAttribute(yw);if(!t)return;const n=d.current.has(t);e.checked!==n&&(e.checked=n,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})))}))}),[t]),p=Et(((e,n)=>{const r=t.current;r&&r.querySelectorAll(bw).forEach((t=>{t.getAttribute(yw)===e&&(t.checked=n)}))}),[t]),h=Et((e=>{if(!(e instanceof Element))return null;if(e instanceof HTMLInputElement&&e.matches(bw))return e;const t=e.closest(bw);if(t instanceof HTMLInputElement)return t;const n=e.closest("label");if(n){const e=n.querySelector(bw);if(e)return e}const r=e.closest(".multi-cart-check, .wpt-multi-checkbox");return r?r.querySelector(bw):null}),[]),g=Et((()=>{null!==s.current&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame((()=>{s.current=null,f()}))}),[f]),m=Et((e=>{const t=e.getAttribute(yw);if(!t)return;const n=e.checked;p(t,n),a.current.has(t)!==n&&(n?(a.current.add(t),u.current({id:t,attributes:ww(e)})):(a.current.delete(t),c.current(t)))}),[p]);wt((()=>{if(e&&l)return g(),()=>{null!==s.current&&(cancelAnimationFrame(s.current),s.current=null)}}
1),[e,l,n,g,i]),wt((()=>{if(!e||!l)return;const n=t.current;if(!n)return void g();const r=e=>{const t=h(e.target);t&&n.contains(t)&&m(t)},o=e=>{const t=h(e.target);t&&n.contains(t)&&requestAnimationFrame((()=>{m(t)}))},i=new MutationObserver((()=>{g()}));return n.addEventListener("change",r,!0),n.addEventListener("input",r,!0),n.addEventListener("click",o,!0),i.observe(n,{childList:!0,subtree:!0}),g(),()=>{i.disconnect(),n.removeEventListener("change",r,!0),n.removeEventListener("input",r,!0),n.removeEventListener("click",o,!0),null!==s.current&&(cancelAnimationFrame(s.current),s.current=null)}}),[e,l,t,g,m,h])}({enabled:ee,containerRef:ce.containerRef,selectedItems:te.selectedItems,onSelect:te.selectItem,onDeselect:te.deselectItem,data:E,contentRendered:!fe}),wt((()=>{if(fe||k)return;const e=ce.containerRef.current;if(!e)return;let t=!1;const n=requestAnimationFrame((()=>{requestAnimationFrame((()=>{if(t)return;const n=[e],r=S?null:ae.modalContainerRef.current;r&&n.push(r),n.forEach((t=>{YC(t),e.dispatchEvent(new CustomEvent("contentRendered",{bubbles:!0,detail:{container:t,displayMode:g,itemCount:E.length,state:T}}))}))}))}));return()=>{t=!0,cancelAnimationFrame(n)}}),[fe,k,ce.containerRef,ce.renderVersion,S,ae.modalContainerRef,g,E.length,T]);const pe=w?{maxHeight:null!==(p=null==m?void 0:m.height)&&void 0!==p?p:"70vh"}:null;if(wt((()=>{const e=ce.containerRef.current;if(!e)return;const t=e.offsetWidth;x(t);const n=new ResizeObserver((e=>{for(const t of e){const e=t.contentRect.width;x(e)}}));return n.observe(e),()=>{n.disconnect()}}),[ce.containerRef]),wt((()=>{P&&(console.warn("DataView: failed to load data",P),null==o||o(P))}),[P,o]),P)return null;const he=k&&E.length>0,ge=fe||he;return jo(Ei,{value:de,children:jo("div",{ref:h,className:ri("barn2-dataview","data-view",t),"data-display-mode":g,children:[jo(Ac,{config:se,hideControls:fe,children:jo("div",{ref:ce.containerRef,onScroll:U,className:ri("dataview-container",ge&&"loading",S&&"grid-mode",w&&"infinite-scroll-mode",!w&&!S&&"paginated-mode"),style:{...n,...pe,position:"relative"},children:[ge&&jo("div",{className:"data-view-loading-overlay",children:jo("div",{className:"loading-spinner dv-loading-spinner"})}),!fe&&ce.renderContent()]})}),!S&&ae.renderModal()]})})},vR=e=>{var t;const{config:n}=e,r=(null===(t=n.features)||void 0===t?void 0:t.displayMode)||"table",[o,i]=yt(r),l=Ct((()=>function(e,t){const n=e.features||{},r=!0===n.viewSwitcher,o=n.displayMode||"table",i=r&&t?t:o,l=void 0===(s=n.grid)||!1===s?null:"object"==typeof s?{minCardWidth:null!==(a=s.minCardWidth)&&void 0!==a?a:aw.minCardWidth,gap:null!==(u=s.gap)&&void 0!==u?u:aw.gap,columns:null!==(c=s.columns)&&void 0!==c?c:aw.columns}:{...aw};var s,a,u,c;const d=function(e){return void 0===e||!1===e?null:"object"==typeof e?{threshold:null!==(t=e.threshold)&&void 0!==t?t:lw.threshold,pageSize:null!==(n=e.pageSize)&&void 0!==n?n:lw.pageSize,height:null!==(r=e.height)&&void 0!==r?r:lw.height}:{...lw};var t,n,r}(n.infiniteScroll),f=null!==d,p=function(e,t){return t||!1===e?null:"object"==typeof e?{type:null!==(n=e.type)&&void 0!==n?n:ow.type,perPageSelector:null!==(r=e.perPageSelector)&&void 0!==r?r:ow.perPageSelector,documentCount:null!==(o=e.documentCount)&&void 0!==o?o:ow.documentCount,pageNavigation:null!==(i=e.pageNavigation)&&void 0!==i?i:ow.pageNavigation}:{...ow};var n,r,o,i}(n.pagination,f),h=function(e,t){return"grid"===t||void 0===e||!1===e?null:"object"==typeof e?{control:null!==(o=e.control)&&void 0!==o?o:sw.control,display:(n=e.display,n&&null!==(r={child_row:"childRow",childRow:"childRow",child_row_visible:"childRowVisible",childRowVisible:"childRowVisible",modal:"modal"}[n])&&void 0!==r?r:sw.display),breakpoints:null!==(i=e.breakpoints)&&void 0!==i?i:sw.breakpoints}:{...sw};var n,r,o,i}(n.responsive,i);return{displayMode:i,viewSwitcherEnabled:r&&null!==l,pagination:p,prefetch:dw(n.prefetch),infiniteScroll:d,responsive:h,grid:l,sorting:hw(n),filtering:gw(n),searching:cw(n.searching),header:fw(n),scrollToTop:pw(n.scrollToTop),hasLightboxColumn:(g=e.columns,g.some((e=>"image"===e.dataType&&e.lightbox))),activeFilters:mw(n.activeFilters),rowSelection:vw(n.rowSelection,i)};var g}(n,o)),[n,o]),s=Ct((()=>(e=>{var t,n,r,o;
1if(!e)return wi;const i=Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e))),l={...wi,...i};return l.noFilteredDataAvailable=null!==(t=null!==(n=e.noFilteredDataAvailable)&&void 0!==n?n:e.noDataAvailable)&&void 0!==t?t:wi.noFilteredDataAvailable,l.noFilteredItemsFound=null!==(r=null!==(o=e.noFilteredItemsFound)&&void 0!==o?o:e.noItemsFound)&&void 0!==r?r:wi.noFilteredItemsFound,Object.fromEntries(Object.entries(l).map((([e,t])=>[e,"function"==typeof t?e=>bi(t(e)):bi(t)])))})(n.i18n)),[n.i18n]);return jo(_i,{value:{displayMode:l.displayMode,i18n:s},children:jo(mR,{...e,features:l,onDisplayModeChange:i})})};class yR{constructor(e,t){if(this.mounted=!1,this.eventHandlers=new Map,this.currentState=null,this.pendingRequest=null,this.selections=new Map,this.rowSelectionResetVersion=0,this.actionLoading=!1,this.actionButtonLabelOverride=Yn(null),this.contentRenderedListener=null,"string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`Container not found: ${e}`);this.container=t}else this.container=e;this.id=t.id||this.generateId(),this.config=Yn(t),this.urlDefaultState=this.getDefaultState(t),this.queryClient=new No({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:6e4,gcTime:3e5}}}),this.mount(),yR.instances.set(this.id,this)}renderApp(){mn(Oe(Yo,{client:this.queryClient},Oe(vR,{config:this.config.value,onStateChange:e=>{this.currentState=e,this.emit("stateChange",e)},onError:e=>{this.rejectPendingRequest(e),this.emit("error",e)},onAction:e=>this.emit("rowSelectionAction",e),actionLoading:this.actionLoading,initialSelections:this.selections,rowSelectionResetVersion:this.rowSelectionResetVersion,onSelectionChange:e=>{this.selections=e},actionButtonLabelOverride:this.actionButtonLabelOverride})),this.container)}mount(){try{this.renderApp(),this.mounted=!0,this.contentRenderedListener=e=>{this.emit("contentRendered",e.detail),this.resolvePendingRequest(!0)},this.container.addEventListener("contentRendered",this.contentRenderedListener)}catch(e){const t=e instanceof Error?e:new Error(String(e));throw this.rejectPendingRequest(t),this.emit("error",t),t}}updateConfig(e){this.config.value={...this.config.value,...e},this.emit("configUpdate",e),this.refresh()}updateRequest(e){this.resolvePendingRequest(!1);const t=this.config.value,n=this.currentState||this.getDefaultState(t),r=e.state||{},o={...n,...r,pagination:{...n.pagination,...r.pagination||{}},search:{...n.search,...r.search||{}}};this.currentState=o,this.config.value={...t,extraRequestData:{...t.extraRequestData||{},...e.extraRequestData||{}},defaultState:o},this.syncUrlState(o);const i=new Promise(((e,t)=>{this.pendingRequest={resolve:e,reject:t}}));try{this.renderApp()}catch(e){const t=e instanceof Error?e:new Error(String(e));this.rejectPendingRequest(t),this.emit("error",t)}return i}setFilters(e){const t=this.config.value;this.config.value={...t,defaultState:{...t.defaultState,filters:Object.entries(e).map((([e,t])=>({id:e,value:t})))}}}refresh(){this.mounted&&(this.unmount(),this.mount())}setActionLoading(e){this.actionLoading!==e&&(this.actionLoading=e,this.mounted&&this.renderApp())}setActionButtonLabel(e){const t=null===e?null:String(e);this.actionButtonLabelOverride.value!==t&&(this.actionButtonLabelOverride.value=t)}clearRowSelections(){this.selections=new Map,this.rowSelectionResetVersion+=1,this.mounted&&this.renderApp()}destroy(){this.resolvePendingRequest(!1),this.unmount(),this.queryClient.clear(),yR.instances.delete(this.id),this.eventHandlers.clear()}unmount(){this.mounted&&(this.contentRenderedListener&&(this.container.removeEventListener("contentRendered",this.contentRenderedListener),this.contentRenderedListener=null),mn(null,this.container),this.mounted=!1)}getDefaultState(e){var t,n,r,o;return{pagination:(null===(t=e.defaultState)||void 0===t?void 0:t.pagination)||{pageIndex:0,pageSize:10},sorting:(null===(n=e.defaultState)||void 0===n?void 0:n.sorting)||[],filters:(null===(r=e.defaultState)||void 0===r?void 0:r.filters)||[],search:(null===(o=e.defaultState)||void 0===o?void 0:o.search)||{query:""}}}syncUrlState(e){const t=this.config.value.urlSync;if(null==t||!t.enabled)return;const n=t.syncParams||["page","pageSize","filters","search","sorting"];xc(wc(e,n,this.urlDefaultState))}resolvePendingRequest(e){if(!this.pendingRequest)return;const{resolve:t}=this.pendingRequest;this.pendingRequest=null,t(e)}rejectPendingRequest(e){if(!this.pendingRequest)return;const{reject:t}=this.pendingRequest;this.pendingRequest=null,t(e)}on(e,t){this.eventHandlers.has(e)||this.eventHandlers.set(e,new Set),this.eventHandlers.get(e).add(t)}off(e,t){var n;null===(n=this.eventHandlers.get(e))||void 0===n||n.delete(t)}emit(e,t){var n;
1null===(n=this.eventHandlers.get(e))||void 0===n||n.forEach((e=>e(t)))}generateId(){return`dataview-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}getId(){return this.id}getConfig(){return this.config.value}getContainer(){return this.container}static getInstance(e){return yR.instances.get(e)}static getAllInstances(){return Array.from(yR.instances.values())}static destroyAll(){yR.instances.forEach((e=>e.destroy()))}}yR.instances=new Map;const bR=["show","perPage","all","firstPage","previousPage","nextPage","lastPage","tableView","gridView","selectAll","resetFilters","reset","searchPlaceholder","searchTableData","clearSearch","clearSelection","clearAllSelections","noResultsFound","clear","sort","sortAscending","sortDescending","switchToPrimarySort","switchToSecondarySort","setAsPrimarySort","setAsSecondarySort","loadingMore","loadingMoreItems","noMoreItemsToLoad","allItemsLoaded","noDataAvailable","noFilteredDataAvailable","noItemsFound","noFilteredItemsFound","adjustFiltersOrSearch","details","close","additionalRowDetails","expandRowDetails","collapseRowDetails","image"],wR=new WeakSet,SR=new WeakSet,_R=(e,t)=>{const n=Array.from(e.querySelectorAll(t));return e.matches(t)&&n.unshift(e),n},xR=(e,t,n)=>{_R(e,`.${t}`).forEach((e=>e.classList.add(n)))};const CR={DataViewManager:yR,version:'"1.0.13"',create:(e,t)=>new yR(e,t),getInstance:yR.getInstance,getAllInstances:yR.getAllInstances,destroyAll:yR.destroyAll},ER=window.wp.i18n;var RR;window.Barn2DataViews=CR;const IR=(({strings:e={},sprintf:t})=>{const n={};for(const t of bR){const r=e[t];void 0!==r&&(n[t]=r)}return void 0!==e.showingRangeOfTotal&&(n.showingRangeOfTotal=({start:n,end:r,total:o})=>t(e.showingRangeOfTotal,n,r,o)),void 0!==e.showingRangeToTotal&&(n.showingRangeToTotal=({start:n,end:r,total:o})=>t(e.showingRangeToTotal,n,r,o)),void 0!==e.itemsPerPageOption&&(n.itemsPerPageOption=({count:n})=>t(e.itemsPerPageOption,n)),void 0!==e.page&&(n.page=({page:n})=>t(e.page,n)),void 0!==e.selectFilter&&(n.selectFilter=({filterName:n})=>t(e.selectFilter,n)),void 0!==e.searchFilter&&(n.searchFilter=({filterName:n})=>t(e.searchFilter,n)),void 0!==e.searchFilterPlaceholder&&(n.searchFilterPlaceholder=({filterName:n})=>t(e.searchFilterPlaceholder,n)),void 0!==e.activeSearch&&(n.activeSearch=({query:n})=>t(e.activeSearch,n)),void 0!==e.removeActiveItem&&(n.removeActiveItem=({label:n})=>t(e.removeActiveItem,n)),void 0!==e.filterBy&&(n.filterBy=({filterName:n})=>t(e.filterBy,n)),void 0!==e.sortByColumn&&(n.sortByColumn=({columnName:n})=>t(e.sortByColumn,n)),void 0!==e.columnOptionsFor&&(n.columnOptionsFor=({columnName:n})=>t(e.columnOptionsFor,n)),void 0!==e.replacePrimarySort&&(n.replacePrimarySort=({columnName:n})=>t(e.replacePrimarySort,n)),void 0!==e.replaceSecondarySort&&(n.replaceSecondarySort=({columnName:n})=>t(e.replaceSecondarySort,n)),void 0!==e.openLightboxFor&&(n.openLightboxFor=({label:n})=>t(e.openLightboxFor,n)),void 0!==e.filterByTerm&&(n.filterByTerm=({term:n})=>t(e.filterByTerm,n)),n})({strings:null!==(RR=window.DocumentLibraryProDVF?.i18n)&&void 0!==RR?RR:{},sprintf:ER.sprintf});document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll('.dlp-dataview[data-frontend="dataviews"]').forEach((e=>{var t;if(e.closest(".facetwp-template"))return;const n=JSON.parse(e.dataset.config||"{}");var r,o;n.i18n={...IR,...null!==(t=n.i18n)&&void 0!==t?t:{}},r=new yR(e,n),o={mediaClassPrefix:"dlp"},wR.has(r)||(wR.add(r),r.on("contentRendered",(e=>{((e,t)=>{var n,r;if(!(e instanceof Element))return;xR(e,`${t}-playlist`,"wp-playlist"),xR(e,`${t}-video-shortcode`,"wp-video-shortcode"),xR(e,`${t}-audio-shortcode`,"wp-audio-shortcode");const o=window;"function"==typeof o.WPPlaylistView&&_R(e,".wp-playlist").forEach((e=>{SR.has(e)||e.querySelector(".mejs-container")||(SR.add(e),new o.WPPlaylistView({el:e}))})),null===(n=o.wp)||void 0===n||null===(n=n.mediaelement)||void 0===n||null===(r=n.initialize)||void 0===r||r.call(n)})(null==e?void 0:e.container,o.mediaClassPrefix)})))}))}))})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.