diff --git a/book/api/metrics-generated.md b/book/api/metrics-generated.md index 001dbb12d2..5e922b7bae 100644 --- a/book/api/metrics-generated.md +++ b/book/api/metrics-generated.md @@ -141,6 +141,10 @@ | Metric | Type | Description | |--------|------|-------------| | resolv_​no_​bank_​drop | `counter` | Count of transactions dropped because the bank was not available | +| resolv_​stash_​operation_​inserted | `counter` | Count of operations that happened on the transaction stash (A transaction with an unknown blockhash was added to the stash) | +| resolv_​stash_​operation_​overrun | `counter` | Count of operations that happened on the transaction stash (A transaction with an unknown blockhash was dropped because the stash was full) | +| resolv_​stash_​operation_​published | `counter` | Count of operations that happened on the transaction stash (A transaction with an unknown blockhash was published as the blockhash became known) | +| resolv_​stash_​operation_​removed | `counter` | Count of operations that happened on the transaction stash (A transaction with an unknown blockhash was removed from the stash without publishing, due to a bad LUT resolved failure, or no bank. These errors are double counted with the respective metrics for those categories.) | | resolv_​lut_​resolved_​invalid_​lookup_​index | `counter` | Count of address lookup tables resolved (The transaction referenced an index in a LUT that didn't exist) | | resolv_​lut_​resolved_​account_​uninitialized | `counter` | Count of address lookup tables resolved (The account referenced as a LUT hasn't been initialized) | | resolv_​lut_​resolved_​invalid_​account_​data | `counter` | Count of address lookup tables resolved (The account referenced as a LUT couldn't be parsed) | @@ -148,7 +152,6 @@ | resolv_​lut_​resolved_​account_​not_​found | `counter` | Count of address lookup tables resolved (The account referenced as a LUT couldn't be found) | | resolv_​lut_​resolved_​success | `counter` | Count of address lookup tables resolved (Resolved successfully) | | resolv_​blockhash_​expired | `counter` | Count of transactions that failed to resolve because the blockhash was expired | -| resolv_​blockhash_​unknown | `counter` | Count of transactions with an unknown blockhash. These may be very recent, very old, nonces, or bogus. | ## Pack Tile | Metric | Type | Description | diff --git a/book/api/websocket.md b/book/api/websocket.md index fabbc8a327..d50f9da562 100644 --- a/book/api/websocket.md +++ b/book/api/websocket.md @@ -484,7 +484,8 @@ tranasactions per second. "next_leader_slot": 285228774, "waterfall": { "in": { - "retained": 2014, + "pack_retained": 2011, + "resolv_retained": 13, "quic": 66767, "udp": 1054, "gossip": 517 @@ -501,7 +502,12 @@ tranasactions per second. "verify_failed": 4092, "verify_duplicate": 128, "dedup_duplicate": 87, - "pack_invalid": 12, + "resolv_lut_failed": 4, + "resolv_expired": 0, + "resolv_ancient": 2, + "resolv_no_ledger": 0, + "resolv_retained": 0, + "pack_invalid": 6, "pack_expired": 2, "pack_retained": 1985, "pack_overrun": 54, @@ -973,7 +979,8 @@ are skipped on the currently active fork. }, "waterfall": { "in": { - "retained": 0, + "pack_retained": 0, + "resolv_retained": 0, "quic": 28159, "udp": 14323, "gossip": 4659 @@ -990,7 +997,11 @@ are skipped on the currently active fork. "verify_failed": 0, "verify_duplicate": 114, "dedup_duplicate": 19384, - "resolv_failed": 3, + "resolv_lut_failed": 3, + "resolv_expired": 0, + "resolv_ancient": 0, + "resolv_retained": 0, + "resolv_no_ledger": 0, "pack_invalid": 0, "pack_expired": 0, "pack_retained": 2225, @@ -1077,12 +1088,13 @@ are skipped on the currently active fork. | out | `TxnWaterfallOut` | Transactions sent out of the waterfall | **`TxnWaterfallIn`** -| Field | Type | Description | -|----------|----------|-------------| -| retained | `number` | Transactions were received during or prior to an earlier leader slot, but weren't executed and were retained inside the validator to potentially be included in a later slot | -| quic | `number` | A QUIC transaction was received. The stream does not have to successfully complete | -| udp | `number` | A non-QUIC UDP transaction was received | -| gossip | `number` | A gossipped vote transaction was received from a gossip peer | +| Field | Type | Description | +|-----------------|----------|-------------| +| pack_retained | `number` | Transactions were received during or prior to an earlier leader slot, but weren't executed because they weren't a high enough priority, and were retained inside the validator to potentially be included in a later slot | +| resolv_retained | `number` | Transactions were received during or prior to an earlier leader slot, but weren't executed because we did not know the blockhash they referenced. They were instead kept in a holding area in case we learn the blockhash later | +| quic | `number` | A QUIC transaction was received. The stream does not have to successfully complete | +| udp | `number` | A non-QUIC UDP transaction was received | +| gossip | `number` | A gossipped vote transaction was received from a gossip peer | **`TxnWaterfallOut`** | Field | Type | Description | @@ -1098,7 +1110,11 @@ are skipped on the currently active fork. | verify_failed | `number` | Transactions were dropped because signature verification failed | | verify_duplicate | `number` | Transactions were dropped because the verify tiles determined that they had already been processed | | dedup_duplicate | `number` | Transactions were dropped because the dedup tile determined that they had already been processed | -| resolv_failed | `number` | Transactions were dropped because they contained invalid address lookup tables (LUTs) | +| resolv_retained | `number` | Transactions were retained inside the validator memory because they referenced a blockhash we do not yet know. We might include the transactions in a future block, if we learn about the blockhash they reference | +| resolv_lut_failed | `number` | Transactions were dropped because they contained invalid address lookup tables (LUTs) | +| resolv_expired | `number` | Transactions were dropped because they contained a transaction that was already expired | +| resolv_no_ledger | `number` | Transactions were dropped because they contained a LUT but we didn't yet have a ledger to look them up in | +| resolv_ancient | `number` | Transactions were dropped because they referenced a blockhash we didn't recognize, and while waiting to see if the blockhash would arrive, the buffer became full | | pack_invalid | `number` | Transactions were dropped because pack determined they would never execute. Reasons can include the transaction requested too many compute units, or was too large to fit in a block | | pack_expired | `number` | Transactions were dropped because pack determined that their TTL expired | | pack_retained | `number` | Transactions were retained inside the validator memory because they were not high enough priority to make it into a prior block we produced, but have not yet expired. We might include the transactions in a future block | diff --git a/src/app/fdctl/dist/assets/index-DpcOWpAi.js b/src/app/fdctl/dist/assets/index-BRCbiG6W.js similarity index 62% rename from src/app/fdctl/dist/assets/index-DpcOWpAi.js rename to src/app/fdctl/dist/assets/index-BRCbiG6W.js index dd07309e91..d3b7d65f5b 100644 --- a/src/app/fdctl/dist/assets/index-DpcOWpAi.js +++ b/src/app/fdctl/dist/assets/index-BRCbiG6W.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cpm7kmGE.js","assets/index-Dz6VwGqc.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DVbm1KUU.js","assets/index-Dz6VwGqc.css"])))=>i.map(i=>d[i]); function IV(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Po=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X7={exports:{}},jg={},J7={exports:{}},rt={};/** * @license React * react.production.min.js @@ -7,7 +7,7 @@ function IV(e,t){for(var n=0;n>>1,Z=O[K];if(0>>1;Ki(ve,V))wei(Me,ve)?(O[K]=Me,O[we]=V,K=we):(O[K]=ve,O[Ee]=V,K=Ee);else if(wei(Me,V))O[K]=Me,O[we]=V,K=we;else break e}}return L}function i(O,L){var V=O.sortIndex-L.sortIndex;return V!==0?V:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],f=[],h=1,d=null,g=3,y=!1,b=!1,x=!1,C=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(O){for(var L=n(f);L!==null;){if(L.callback===null)r(f);else if(L.startTime<=O)r(f),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(f)}}function E(O){if(x=!1,k(O),!b)if(n(u)!==null)b=!0,D(R);else{var L=n(f);L!==null&&H(E,L.startTime-O)}}function R(O,L){b=!1,x&&(x=!1,_(I),I=-1),y=!0;var V=g;try{for(k(L),d=n(u);d!==null&&(!(d.expirationTime>L)||O&&!B());){var K=d.callback;if(typeof K=="function"){d.callback=null,g=d.priorityLevel;var Z=K(d.expirationTime<=L);L=e.unstable_now(),typeof Z=="function"?d.callback=Z:d===n(u)&&r(u),k(L)}else r(u);d=n(u)}if(d!==null)var de=!0;else{var Ee=n(f);Ee!==null&&H(E,Ee.startTime-L),de=!1}return de}finally{d=null,g=V,y=!1}}var A=!1,$=null,I=-1,F=5,N=-1;function B(){return!(e.unstable_now()-NO||125K?(O.sortIndex=V,t(f,O),n(u)===null&&O===n(f)&&(x?(_(I),I=-1):x=!0,H(E,V-K))):(O.sortIndex=Z,t(u,O),b||y||(b=!0,D(R))),O},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(O){var L=g;return function(){var V=g;g=L;try{return O.apply(this,arguments)}finally{g=V}}}})(fR);cR.exports=fR;var oH=cR.exports;/** + */(function(e){function t(O,L){var V=O.length;O.push(L);e:for(;0>>1,q=O[K];if(0>>1;Ki(ye,V))wei(Me,ye)?(O[K]=Me,O[we]=V,K=we):(O[K]=ye,O[Ee]=V,K=Ee);else if(wei(Me,V))O[K]=Me,O[we]=V,K=we;else break e}}return L}function i(O,L){var V=O.sortIndex-L.sortIndex;return V!==0?V:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],f=[],h=1,d=null,g=3,y=!1,b=!1,x=!1,C=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(O){for(var L=n(f);L!==null;){if(L.callback===null)r(f);else if(L.startTime<=O)r(f),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(f)}}function E(O){if(x=!1,k(O),!b)if(n(u)!==null)b=!0,D(R);else{var L=n(f);L!==null&&H(E,L.startTime-O)}}function R(O,L){b=!1,x&&(x=!1,_(N),N=-1),y=!0;var V=g;try{for(k(L),d=n(u);d!==null&&(!(d.expirationTime>L)||O&&!B());){var K=d.callback;if(typeof K=="function"){d.callback=null,g=d.priorityLevel;var q=K(d.expirationTime<=L);L=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(u)&&r(u),k(L)}else r(u);d=n(u)}if(d!==null)var de=!0;else{var Ee=n(f);Ee!==null&&H(E,Ee.startTime-L),de=!1}return de}finally{d=null,g=V,y=!1}}var A=!1,$=null,N=-1,z=5,I=-1;function B(){return!(e.unstable_now()-IO||125K?(O.sortIndex=V,t(f,O),n(u)===null&&O===n(f)&&(x?(_(N),N=-1):x=!0,H(E,V-K))):(O.sortIndex=q,t(u,O),b||y||(b=!0,D(R))),O},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(O){var L=g;return function(){var V=g;g=L;try{return O.apply(this,arguments)}finally{g=V}}}})(fR);cR.exports=fR;var oH=cR.exports;/** * @license React * react-dom.production.min.js * @@ -31,19 +31,19 @@ function IV(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ox=Object.prototype.hasOwnProperty,aH=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Rk={},Mk={};function lH(e){return ox.call(Mk,e)?!0:ox.call(Rk,e)?!1:aH.test(e)?Mk[e]=!0:(Rk[e]=!0,!1)}function uH(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function cH(e,t,n,r){if(t===null||typeof t>"u"||uH(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var wn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wn[e]=new Kn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wn[t]=new Kn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wn[e]=new Kn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wn[e]=new Kn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){wn[e]=new Kn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wn[e]=new Kn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wn[e]=new Kn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wn[e]=new Kn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wn[e]=new Kn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rw=/[\-:]([a-z])/g;function Mw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rw,Mw);wn[t]=new Kn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rw,Mw);wn[t]=new Kn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rw,Mw);wn[t]=new Kn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wn[e]=new Kn(e,1,!1,e.toLowerCase(),null,!1,!1)});wn.xlinkHref=new Kn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wn[e]=new Kn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pw(e,t,n,r){var i=wn.hasOwnProperty(t)?wn[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ox=Object.prototype.hasOwnProperty,aH=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Rk={},Mk={};function lH(e){return ox.call(Mk,e)?!0:ox.call(Rk,e)?!1:aH.test(e)?Mk[e]=!0:(Rk[e]=!0,!1)}function uH(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function cH(e,t,n,r){if(t===null||typeof t>"u"||uH(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var wn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wn[e]=new Kn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wn[t]=new Kn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wn[e]=new Kn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wn[e]=new Kn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){wn[e]=new Kn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wn[e]=new Kn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wn[e]=new Kn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wn[e]=new Kn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wn[e]=new Kn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rw=/[\-:]([a-z])/g;function Mw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rw,Mw);wn[t]=new Kn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rw,Mw);wn[t]=new Kn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rw,Mw);wn[t]=new Kn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wn[e]=new Kn(e,1,!1,e.toLowerCase(),null,!1,!1)});wn.xlinkHref=new Kn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wn[e]=new Kn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pw(e,t,n,r){var i=wn.hasOwnProperty(t)?wn[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var u=` -`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{y_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wf(e):""}function fH(e){switch(e.tag){case 5:return Wf(e.type);case 16:return Wf("Lazy");case 13:return Wf("Suspense");case 19:return Wf("SuspenseList");case 0:case 2:case 15:return e=__(e.type,!1),e;case 11:return e=__(e.type.render,!1),e;case 1:return e=__(e.type,!0),e;default:return""}}function ux(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pu:return"Fragment";case hu:return"Portal";case sx:return"Profiler";case Ow:return"StrictMode";case ax:return"Suspense";case lx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pR:return(e.displayName||"Context")+".Consumer";case hR:return(e._context.displayName||"Context")+".Provider";case Aw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $w:return t=e.displayName||null,t!==null?t:ux(e.type)||"Memo";case xs:t=e._payload,e=e._init;try{return ux(e(t))}catch{}}return null}function dH(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ux(t);case 8:return t===Ow?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Gs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hH(e){var t=gR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kp(e){e._valueTracker||(e._valueTracker=hH(e))}function vR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function m0(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function cx(e,t){var n=t.checked;return Gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ok(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Gs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function yR(e,t){t=t.checked,t!=null&&Pw(e,"checked",t,!1)}function fx(e,t){yR(e,t);var n=Gs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?dx(e,t.type,n):t.hasOwnProperty("defaultValue")&&dx(e,t.type,Gs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ak(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function dx(e,t,n){(t!=="number"||m0(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Uf=Array.isArray;function Pu(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Yp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pH=["Webkit","ms","Moz","O"];Object.keys(Jf).forEach(function(e){pH.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jf[t]=Jf[e]})});function wR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jf.hasOwnProperty(e)&&Jf[e]?(""+t).trim():t+"px"}function SR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=wR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var mH=Gt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mx(e,t){if(t){if(mH[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function gx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vx=null;function Lw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yx=null,Ou=null,Au=null;function Nk(e){if(e=Sh(e)){if(typeof yx!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=Ug(t),yx(e.stateNode,e.type,t))}}function CR(e){Ou?Au?Au.push(e):Au=[e]:Ou=e}function kR(){if(Ou){var e=Ou,t=Au;if(Au=Ou=null,Nk(e),t)for(e=0;e>>=0,e===0?32:31-(TH(e)/EH|0)|0}var Qp=64,Xp=4194304;function Bf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _0(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Bf(a):(o&=s,o!==0&&(r=Bf(o)))}else s=n&~i,s!==0?r=Bf(s):o!==0&&(r=Bf(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function bh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ei(t),e[t]=n}function OH(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=td),Vk=" ",Hk=!1;function HR(e,t){switch(e){case"keyup":return oG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mu=!1;function aG(e,t){switch(e){case"compositionend":return GR(t);case"keypress":return t.which!==32?null:(Hk=!0,Vk);case"textInput":return e=t.data,e===Vk&&Hk?null:e;default:return null}}function lG(e,t){if(mu)return e==="compositionend"||!Uw&&HR(e,t)?(e=BR(),Vm=Fw=Ms=null,mu=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Kk(n)}}function YR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function QR(){for(var e=window,t=m0();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=m0(e.document)}return t}function Bw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function vG(e){var t=QR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&YR(n.ownerDocument.documentElement,n)){if(r!==null&&Bw(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Yk(n,o);var s=Yk(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gu=null,Cx=null,rd=null,kx=!1;function Qk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kx||gu==null||gu!==m0(r)||(r=gu,"selectionStart"in r&&Bw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rd&&Ed(rd,r)||(rd=r,r=w0(Cx,"onSelect"),0_u||(e.current=Ox[_u],Ox[_u]=null,_u--)}function Ot(e,t){_u++,Ox[_u]=e.current,e.current=t}var qs={},Nn=ia(qs),ur=ia(!1),Za=qs;function Yu(e,t){var n=e.type.contextTypes;if(!n)return qs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function cr(e){return e=e.childContextTypes,e!=null}function C0(){It(ur),It(Nn)}function i6(e,t,n){if(Nn.current!==qs)throw Error(ce(168));Ot(Nn,t),Ot(ur,n)}function s9(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ce(108,dH(e)||"Unknown",i));return Gt({},n,r)}function k0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qs,Za=Nn.current,Ot(Nn,e),Ot(ur,ur.current),!0}function o6(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=s9(e,t,Za),r.__reactInternalMemoizedMergedChildContext=e,It(ur),It(Nn),Ot(Nn,e)):It(ur),Ot(ur,n)}var Mo=null,Bg=!1,$_=!1;function a9(e){Mo===null?Mo=[e]:Mo.push(e)}function MG(e){Bg=!0,a9(e)}function oa(){if(!$_&&Mo!==null){$_=!0;var e=0,t=bt;try{var n=Mo;for(bt=1;e>=s,i-=s,Oo=1<<32-Ei(t)+i|n<I?(F=$,$=null):F=$.sibling;var N=g(_,$,k[I],E);if(N===null){$===null&&($=F);break}e&&$&&N.alternate===null&&t(_,$),w=o(N,w,I),A===null?R=N:A.sibling=N,A=N,$=F}if(I===k.length)return n(_,$),Ft&&Ta(_,I),R;if($===null){for(;II?(F=$,$=null):F=$.sibling;var B=g(_,$,N.value,E);if(B===null){$===null&&($=F);break}e&&$&&B.alternate===null&&t(_,$),w=o(B,w,I),A===null?R=B:A.sibling=B,A=B,$=F}if(N.done)return n(_,$),Ft&&Ta(_,I),R;if($===null){for(;!N.done;I++,N=k.next())N=d(_,N.value,E),N!==null&&(w=o(N,w,I),A===null?R=N:A.sibling=N,A=N);return Ft&&Ta(_,I),R}for($=r(_,$);!N.done;I++,N=k.next())N=y($,_,I,N.value,E),N!==null&&(e&&N.alternate!==null&&$.delete(N.key===null?I:N.key),w=o(N,w,I),A===null?R=N:A.sibling=N,A=N);return e&&$.forEach(function(ee){return t(_,ee)}),Ft&&Ta(_,I),R}function C(_,w,k,E){if(typeof k=="object"&&k!==null&&k.type===pu&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Zp:e:{for(var R=k.key,A=w;A!==null;){if(A.key===R){if(R=k.type,R===pu){if(A.tag===7){n(_,A.sibling),w=i(A,k.props.children),w.return=_,_=w;break e}}else if(A.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===xs&&l6(R)===A.type){n(_,A.sibling),w=i(A,k.props),w.ref=Cf(_,A,k),w.return=_,_=w;break e}n(_,A);break}else t(_,A);A=A.sibling}k.type===pu?(w=Ua(k.props.children,_.mode,E,k.key),w.return=_,_=w):(E=Xm(k.type,k.key,k.props,null,_.mode,E),E.ref=Cf(_,w,k),E.return=_,_=E)}return s(_);case hu:e:{for(A=k.key;w!==null;){if(w.key===A)if(w.tag===4&&w.stateNode.containerInfo===k.containerInfo&&w.stateNode.implementation===k.implementation){n(_,w.sibling),w=i(w,k.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=W_(k,_.mode,E),w.return=_,_=w}return s(_);case xs:return A=k._init,C(_,w,A(k._payload),E)}if(Uf(k))return b(_,w,k,E);if(_f(k))return x(_,w,k,E);om(_,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,w!==null&&w.tag===6?(n(_,w.sibling),w=i(w,k),w.return=_,_=w):(n(_,w),w=z_(k,_.mode,E),w.return=_,_=w),s(_)):n(_,w)}return C}var Xu=f9(!0),d9=f9(!1),R0=ia(null),M0=null,wu=null,qw=null;function Zw(){qw=wu=M0=null}function Kw(e){var t=R0.current;It(R0),e._currentValue=t}function Lx(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Lu(e,t){M0=e,qw=wu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ar=!0),e.firstContext=null)}function ri(e){var t=e._currentValue;if(qw!==e)if(e={context:e,memoizedValue:t,next:null},wu===null){if(M0===null)throw Error(ce(308));wu=e,M0.dependencies={lanes:0,firstContext:e}}else wu=wu.next=e;return t}var La=null;function Yw(e){La===null?La=[e]:La.push(e)}function h9(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Yw(t)):(n.next=i.next,i.next=n),t.interleaved=n,Fo(e,r)}function Fo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var bs=!1;function Qw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function p9(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $o(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function js(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Fo(e,n)}return i=r.interleaved,i===null?(t.next=t,Yw(r)):(t.next=i.next,i.next=t),r.interleaved=t,Fo(e,n)}function Gm(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iw(e,n)}}function u6(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function P0(e,t,n,r){var i=e.updateQueue;bs=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,f=u.next;u.next=null,s===null?o=f:s.next=f,s=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==s&&(a===null?h.firstBaseUpdate=f:a.next=f,h.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;s=0,h=f=u=null,a=o;do{var g=a.lane,y=a.eventTime;if((r&g)===g){h!==null&&(h=h.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,x=a;switch(g=t,y=n,x.tag){case 1:if(b=x.payload,typeof b=="function"){d=b.call(y,d,g);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=x.payload,g=typeof b=="function"?b.call(y,d,g):b,g==null)break e;d=Gt({},d,g);break e;case 2:bs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[a]:g.push(a))}else y={eventTime:y,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(f=h=y,u=d):h=h.next=y,s|=g;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;g=a,a=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(h===null&&(u=d),i.baseState=u,i.firstBaseUpdate=f,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Qa|=s,e.lanes=s,e.memoizedState=d}}function c6(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=N_.transition;N_.transition={};try{e(!1),t()}finally{bt=n,N_.transition=r}}function O9(){return ii().memoizedState}function $G(e,t,n){var r=Fs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},A9(e))$9(t,n);else if(n=h9(e,t,n,r),n!==null){var i=Bn();Ri(n,e,r,i),L9(n,t,r)}}function LG(e,t,n){var r=Fs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(A9(e))$9(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Oi(a,s)){var u=t.interleaved;u===null?(i.next=i,Yw(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=h9(e,t,i,r),n!==null&&(i=Bn(),Ri(n,e,r,i),L9(n,t,r))}}function A9(e){var t=e.alternate;return e===Ht||t!==null&&t===Ht}function $9(e,t){id=A0=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function L9(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iw(e,n)}}var $0={readContext:ri,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useInsertionEffect:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useMutableSource:Tn,useSyncExternalStore:Tn,useId:Tn,unstable_isNewReconciler:!1},NG={readContext:ri,useCallback:function(e,t){return Gi().memoizedState=[e,t===void 0?null:t],e},useContext:ri,useEffect:d6,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zm(4194308,4,T9.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zm(4,2,e,t)},useMemo:function(e,t){var n=Gi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$G.bind(null,Ht,e),[r.memoizedState,e]},useRef:function(e){var t=Gi();return e={current:e},t.memoizedState=e},useState:f6,useDebugValue:oS,useDeferredValue:function(e){return Gi().memoizedState=e},useTransition:function(){var e=f6(!1),t=e[0];return e=AG.bind(null,e[1]),Gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ht,i=Gi();if(Ft){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),hn===null)throw Error(ce(349));Ya&30||y9(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,d6(x9.bind(null,r,o,e),[e]),r.flags|=2048,Nd(9,_9.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Gi(),t=hn.identifierPrefix;if(Ft){var n=Ao,r=Oo;n=(r&~(1<<32-Ei(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$d++,0")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{y_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wf(e):""}function fH(e){switch(e.tag){case 5:return Wf(e.type);case 16:return Wf("Lazy");case 13:return Wf("Suspense");case 19:return Wf("SuspenseList");case 0:case 2:case 15:return e=__(e.type,!1),e;case 11:return e=__(e.type.render,!1),e;case 1:return e=__(e.type,!0),e;default:return""}}function ux(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case pu:return"Fragment";case hu:return"Portal";case sx:return"Profiler";case Ow:return"StrictMode";case ax:return"Suspense";case lx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pR:return(e.displayName||"Context")+".Consumer";case hR:return(e._context.displayName||"Context")+".Provider";case Aw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $w:return t=e.displayName||null,t!==null?t:ux(e.type)||"Memo";case bs:t=e._payload,e=e._init;try{return ux(e(t))}catch{}}return null}function dH(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ux(t);case 8:return t===Ow?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Zs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function hH(e){var t=gR(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kp(e){e._valueTracker||(e._valueTracker=hH(e))}function vR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gR(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function m0(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function cx(e,t){var n=t.checked;return Gt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ok(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Zs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function yR(e,t){t=t.checked,t!=null&&Pw(e,"checked",t,!1)}function fx(e,t){yR(e,t);var n=Zs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?dx(e,t.type,n):t.hasOwnProperty("defaultValue")&&dx(e,t.type,Zs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ak(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function dx(e,t,n){(t!=="number"||m0(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Uf=Array.isArray;function Pu(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Yp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pH=["Webkit","ms","Moz","O"];Object.keys(Jf).forEach(function(e){pH.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jf[t]=Jf[e]})});function wR(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Jf.hasOwnProperty(e)&&Jf[e]?(""+t).trim():t+"px"}function SR(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=wR(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var mH=Gt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function mx(e,t){if(t){if(mH[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function gx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vx=null;function Lw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yx=null,Ou=null,Au=null;function Nk(e){if(e=Sh(e)){if(typeof yx!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=Ug(t),yx(e.stateNode,e.type,t))}}function CR(e){Ou?Au?Au.push(e):Au=[e]:Ou=e}function kR(){if(Ou){var e=Ou,t=Au;if(Au=Ou=null,Nk(e),t)for(e=0;e>>=0,e===0?32:31-(TH(e)/EH|0)|0}var Qp=64,Xp=4194304;function Bf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _0(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Bf(a):(o&=s,o!==0&&(r=Bf(o)))}else s=n&~i,s!==0?r=Bf(s):o!==0&&(r=Bf(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function bh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ei(t),e[t]=n}function OH(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=td),Vk=" ",Hk=!1;function HR(e,t){switch(e){case"keyup":return oG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mu=!1;function aG(e,t){switch(e){case"compositionend":return GR(t);case"keypress":return t.which!==32?null:(Hk=!0,Vk);case"textInput":return e=t.data,e===Vk&&Hk?null:e;default:return null}}function lG(e,t){if(mu)return e==="compositionend"||!Uw&&HR(e,t)?(e=BR(),Vm=Fw=Ps=null,mu=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Kk(n)}}function YR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function QR(){for(var e=window,t=m0();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=m0(e.document)}return t}function Bw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function vG(e){var t=QR(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&YR(n.ownerDocument.documentElement,n)){if(r!==null&&Bw(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Yk(n,o);var s=Yk(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gu=null,Cx=null,rd=null,kx=!1;function Qk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kx||gu==null||gu!==m0(r)||(r=gu,"selectionStart"in r&&Bw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rd&&Ed(rd,r)||(rd=r,r=w0(Cx,"onSelect"),0_u||(e.current=Ox[_u],Ox[_u]=null,_u--)}function Ot(e,t){_u++,Ox[_u]=e.current,e.current=t}var qs={},Nn=oa(qs),ur=oa(!1),qa=qs;function Yu(e,t){var n=e.type.contextTypes;if(!n)return qs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function cr(e){return e=e.childContextTypes,e!=null}function C0(){It(ur),It(Nn)}function i6(e,t,n){if(Nn.current!==qs)throw Error(ce(168));Ot(Nn,t),Ot(ur,n)}function s9(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ce(108,dH(e)||"Unknown",i));return Gt({},n,r)}function k0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qs,qa=Nn.current,Ot(Nn,e),Ot(ur,ur.current),!0}function o6(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=s9(e,t,qa),r.__reactInternalMemoizedMergedChildContext=e,It(ur),It(Nn),Ot(Nn,e)):It(ur),Ot(ur,n)}var Mo=null,Bg=!1,$_=!1;function a9(e){Mo===null?Mo=[e]:Mo.push(e)}function MG(e){Bg=!0,a9(e)}function sa(){if(!$_&&Mo!==null){$_=!0;var e=0,t=bt;try{var n=Mo;for(bt=1;e>=s,i-=s,Oo=1<<32-Ei(t)+i|n<N?(z=$,$=null):z=$.sibling;var I=g(_,$,k[N],E);if(I===null){$===null&&($=z);break}e&&$&&I.alternate===null&&t(_,$),w=o(I,w,N),A===null?R=I:A.sibling=I,A=I,$=z}if(N===k.length)return n(_,$),Ft&&Ea(_,N),R;if($===null){for(;NN?(z=$,$=null):z=$.sibling;var B=g(_,$,I.value,E);if(B===null){$===null&&($=z);break}e&&$&&B.alternate===null&&t(_,$),w=o(B,w,N),A===null?R=B:A.sibling=B,A=B,$=z}if(I.done)return n(_,$),Ft&&Ea(_,N),R;if($===null){for(;!I.done;N++,I=k.next())I=d(_,I.value,E),I!==null&&(w=o(I,w,N),A===null?R=I:A.sibling=I,A=I);return Ft&&Ea(_,N),R}for($=r(_,$);!I.done;N++,I=k.next())I=y($,_,N,I.value,E),I!==null&&(e&&I.alternate!==null&&$.delete(I.key===null?N:I.key),w=o(I,w,N),A===null?R=I:A.sibling=I,A=I);return e&&$.forEach(function(ee){return t(_,ee)}),Ft&&Ea(_,N),R}function C(_,w,k,E){if(typeof k=="object"&&k!==null&&k.type===pu&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case qp:e:{for(var R=k.key,A=w;A!==null;){if(A.key===R){if(R=k.type,R===pu){if(A.tag===7){n(_,A.sibling),w=i(A,k.props.children),w.return=_,_=w;break e}}else if(A.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===bs&&l6(R)===A.type){n(_,A.sibling),w=i(A,k.props),w.ref=Cf(_,A,k),w.return=_,_=w;break e}n(_,A);break}else t(_,A);A=A.sibling}k.type===pu?(w=Ba(k.props.children,_.mode,E,k.key),w.return=_,_=w):(E=Xm(k.type,k.key,k.props,null,_.mode,E),E.ref=Cf(_,w,k),E.return=_,_=E)}return s(_);case hu:e:{for(A=k.key;w!==null;){if(w.key===A)if(w.tag===4&&w.stateNode.containerInfo===k.containerInfo&&w.stateNode.implementation===k.implementation){n(_,w.sibling),w=i(w,k.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=W_(k,_.mode,E),w.return=_,_=w}return s(_);case bs:return A=k._init,C(_,w,A(k._payload),E)}if(Uf(k))return b(_,w,k,E);if(_f(k))return x(_,w,k,E);om(_,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,w!==null&&w.tag===6?(n(_,w.sibling),w=i(w,k),w.return=_,_=w):(n(_,w),w=z_(k,_.mode,E),w.return=_,_=w),s(_)):n(_,w)}return C}var Xu=f9(!0),d9=f9(!1),R0=oa(null),M0=null,wu=null,Zw=null;function qw(){Zw=wu=M0=null}function Kw(e){var t=R0.current;It(R0),e._currentValue=t}function Lx(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Lu(e,t){M0=e,Zw=wu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ar=!0),e.firstContext=null)}function ri(e){var t=e._currentValue;if(Zw!==e)if(e={context:e,memoizedValue:t,next:null},wu===null){if(M0===null)throw Error(ce(308));wu=e,M0.dependencies={lanes:0,firstContext:e}}else wu=wu.next=e;return t}var Na=null;function Yw(e){Na===null?Na=[e]:Na.push(e)}function h9(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Yw(t)):(n.next=i.next,i.next=n),t.interleaved=n,zo(e,r)}function zo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ws=!1;function Qw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function p9(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $o(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ds(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ut&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,zo(e,n)}return i=r.interleaved,i===null?(t.next=t,Yw(r)):(t.next=i.next,i.next=t),r.interleaved=t,zo(e,n)}function Gm(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iw(e,n)}}function u6(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function P0(e,t,n,r){var i=e.updateQueue;ws=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,f=u.next;u.next=null,s===null?o=f:s.next=f,s=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==s&&(a===null?h.firstBaseUpdate=f:a.next=f,h.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;s=0,h=f=u=null,a=o;do{var g=a.lane,y=a.eventTime;if((r&g)===g){h!==null&&(h=h.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,x=a;switch(g=t,y=n,x.tag){case 1:if(b=x.payload,typeof b=="function"){d=b.call(y,d,g);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=x.payload,g=typeof b=="function"?b.call(y,d,g):b,g==null)break e;d=Gt({},d,g);break e;case 2:ws=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[a]:g.push(a))}else y={eventTime:y,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(f=h=y,u=d):h=h.next=y,s|=g;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;g=a,a=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(h===null&&(u=d),i.baseState=u,i.firstBaseUpdate=f,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Qa|=s,e.lanes=s,e.memoizedState=d}}function c6(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=N_.transition;N_.transition={};try{e(!1),t()}finally{bt=n,N_.transition=r}}function O9(){return ii().memoizedState}function $G(e,t,n){var r=zs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},A9(e))$9(t,n);else if(n=h9(e,t,n,r),n!==null){var i=Bn();Ri(n,e,r,i),L9(n,t,r)}}function LG(e,t,n){var r=zs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(A9(e))$9(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Oi(a,s)){var u=t.interleaved;u===null?(i.next=i,Yw(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=h9(e,t,i,r),n!==null&&(i=Bn(),Ri(n,e,r,i),L9(n,t,r))}}function A9(e){var t=e.alternate;return e===Ht||t!==null&&t===Ht}function $9(e,t){id=A0=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function L9(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Iw(e,n)}}var $0={readContext:ri,useCallback:Tn,useContext:Tn,useEffect:Tn,useImperativeHandle:Tn,useInsertionEffect:Tn,useLayoutEffect:Tn,useMemo:Tn,useReducer:Tn,useRef:Tn,useState:Tn,useDebugValue:Tn,useDeferredValue:Tn,useTransition:Tn,useMutableSource:Tn,useSyncExternalStore:Tn,useId:Tn,unstable_isNewReconciler:!1},NG={readContext:ri,useCallback:function(e,t){return Gi().memoizedState=[e,t===void 0?null:t],e},useContext:ri,useEffect:d6,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qm(4194308,4,T9.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qm(4194308,4,e,t)},useInsertionEffect:function(e,t){return qm(4,2,e,t)},useMemo:function(e,t){var n=Gi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$G.bind(null,Ht,e),[r.memoizedState,e]},useRef:function(e){var t=Gi();return e={current:e},t.memoizedState=e},useState:f6,useDebugValue:oS,useDeferredValue:function(e){return Gi().memoizedState=e},useTransition:function(){var e=f6(!1),t=e[0];return e=AG.bind(null,e[1]),Gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ht,i=Gi();if(Ft){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),pn===null)throw Error(ce(349));Ya&30||y9(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,d6(x9.bind(null,r,o,e),[e]),r.flags|=2048,Nd(9,_9.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Gi(),t=pn.identifierPrefix;if(Ft){var n=Ao,r=Oo;n=(r&~(1<<32-Ei(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$d++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ki]=t,e[Pd]=r,V9(e,t,!1,!1),t.stateNode=e;e:{switch(s=gx(n,r),n){case"dialog":Lt("cancel",e),Lt("close",e),i=r;break;case"iframe":case"object":case"embed":Lt("load",e),i=r;break;case"video":case"audio":for(i=0;itc&&(t.flags|=128,r=!0,kf(o,!1),t.lanes=4194304)}else{if(!r)if(e=O0(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ft)return En(t),null}else 2*en()-o.renderingStartTime>tc&&n!==1073741824&&(t.flags|=128,r=!0,kf(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=en(),t.sibling=null,n=Vt.current,Ot(Vt,r?n&1|2:n&1),t):(En(t),null);case 22:case 23:return fS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xr&1073741824&&(En(t),t.subtreeFlags&6&&(t.flags|=8192)):En(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function BG(e,t){switch(Hw(t),t.tag){case 1:return cr(t.type)&&C0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ju(),It(ur),It(Nn),eS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jw(t),null;case 13:if(It(Vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));Qu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return It(Vt),null;case 4:return Ju(),null;case 10:return Kw(t.type._context),null;case 22:case 23:return fS(),null;case 24:return null;default:return null}}var am=!1,An=!1,VG=typeof WeakSet=="function"?WeakSet:Set,Te=null;function Su(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Bx(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var S6=!1;function HG(e,t){if(Tx=x0,e=QR(),Bw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,u=-1,f=0,h=0,d=e,g=null;t:for(;;){for(var y;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(y=d.firstChild)!==null;)g=d,d=y;for(;;){if(d===e)break t;if(g===n&&++f===i&&(a=s),g===o&&++h===r&&(u=s),(y=d.nextSibling)!==null)break;d=g,g=d.parentNode}d=y}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ex={focusedElem:e,selectionRange:n},x0=!1,Te=t;Te!==null;)if(t=Te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Te=e;else for(;Te!==null;){t=Te;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var x=b.memoizedProps,C=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?x:vi(t.type,x),C);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(E){Yt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,Te=e;break}Te=t.return}return b=S6,S6=!1,b}function od(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Bx(t,n,o)}i=i.next}while(i!==r)}}function Gg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function q9(e){var t=e.alternate;t!==null&&(e.alternate=null,q9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ki],delete t[Pd],delete t[Px],delete t[EG],delete t[RG])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Z9(e){return e.tag===5||e.tag===3||e.tag===4}function C6(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Z9(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=S0));else if(r!==4&&(e=e.child,e!==null))for(Hx(e,t,n),e=e.sibling;e!==null;)Hx(e,t,n),e=e.sibling}function Gx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gx(e,t,n),e=e.sibling;e!==null;)Gx(e,t,n),e=e.sibling}var xn=null,yi=!1;function ms(e,t,n){for(n=n.child;n!==null;)K9(e,t,n),n=n.sibling}function K9(e,t,n){if(Xi&&typeof Xi.onCommitFiberUnmount=="function")try{Xi.onCommitFiberUnmount(Dg,n)}catch{}switch(n.tag){case 5:An||Su(n,t);case 6:var r=xn,i=yi;xn=null,ms(e,t,n),xn=r,yi=i,xn!==null&&(yi?(e=xn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xn.removeChild(n.stateNode));break;case 18:xn!==null&&(yi?(e=xn,n=n.stateNode,e.nodeType===8?A_(e.parentNode,n):e.nodeType===1&&A_(e,n),kd(e)):A_(xn,n.stateNode));break;case 4:r=xn,i=yi,xn=n.stateNode.containerInfo,yi=!0,ms(e,t,n),xn=r,yi=i;break;case 0:case 11:case 14:case 15:if(!An&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Bx(n,t,s),i=i.next}while(i!==r)}ms(e,t,n);break;case 1:if(!An&&(Su(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}ms(e,t,n);break;case 21:ms(e,t,n);break;case 22:n.mode&1?(An=(r=An)||n.memoizedState!==null,ms(e,t,n),An=r):ms(e,t,n);break;default:ms(e,t,n)}}function k6(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VG),t.forEach(function(r){var i=eq.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hi(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=en()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qG(r/1960))-r,10e?16:e,Ps===null)var r=!1;else{if(e=Ps,Ps=null,I0=0,ut&6)throw Error(ce(331));var i=ut;for(ut|=4,Te=e.current;Te!==null;){var o=Te,s=o.child;if(Te.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uen()-uS?Wa(e,0):lS|=n),fr(e,t)}function rM(e,t){t===0&&(e.mode&1?(t=Xp,Xp<<=1,!(Xp&130023424)&&(Xp=4194304)):t=1);var n=Bn();e=Fo(e,t),e!==null&&(bh(e,t,n),fr(e,n))}function JG(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rM(e,n)}function eq(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ce(314))}r!==null&&r.delete(t),rM(e,n)}var iM;iM=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ur.current)ar=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ar=!1,WG(e,t,n);ar=!!(e.flags&131072)}else ar=!1,Ft&&t.flags&1048576&&l9(t,E0,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Km(e,t),e=t.pendingProps;var i=Yu(t,Nn.current);Lu(t,n),i=nS(null,t,r,e,i,n);var o=rS();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,cr(r)?(o=!0,k0(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Qw(t),i.updater=Hg,t.stateNode=i,i._reactInternals=t,Ix(t,r,e,n),t=Fx(null,t,r,!0,o,n)):(t.tag=0,Ft&&o&&Vw(t),zn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Km(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=nq(r),e=vi(r,e),i){case 0:t=Dx(null,t,r,e,n);break e;case 1:t=x6(null,t,r,e,n);break e;case 11:t=y6(null,t,r,e,n);break e;case 14:t=_6(null,t,r,vi(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),Dx(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),x6(e,t,r,i,n);case 3:e:{if(W9(t),e===null)throw Error(ce(387));r=t.pendingProps,o=t.memoizedState,i=o.element,p9(e,t),P0(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ec(Error(ce(423)),t),t=b6(e,t,r,n,i);break e}else if(r!==i){i=ec(Error(ce(424)),t),t=b6(e,t,r,n,i);break e}else for(kr=Is(t.stateNode.containerInfo.firstChild),Tr=t,Ft=!0,_i=null,n=d9(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qu(),r===i){t=zo(e,t,n);break e}zn(e,t,r,n)}t=t.child}return t;case 5:return m9(t),e===null&&$x(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Rx(r,i)?s=null:o!==null&&Rx(r,o)&&(t.flags|=32),z9(e,t),zn(e,t,s,n),t.child;case 6:return e===null&&$x(t),null;case 13:return U9(e,t,n);case 4:return Xw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xu(t,null,r,n):zn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),y6(e,t,r,i,n);case 7:return zn(e,t,t.pendingProps,n),t.child;case 8:return zn(e,t,t.pendingProps.children,n),t.child;case 12:return zn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ot(R0,r._currentValue),r._currentValue=s,o!==null)if(Oi(o.value,s)){if(o.children===i.children&&!ur.current){t=zo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=$o(-1,n&-n),u.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Lx(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ce(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Lx(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}zn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Lu(t,n),i=ri(i),r=r(i),t.flags|=1,zn(e,t,r,n),t.child;case 14:return r=t.type,i=vi(r,t.pendingProps),i=vi(r.type,i),_6(e,t,r,i,n);case 15:return D9(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),Km(e,t),t.tag=1,cr(r)?(e=!0,k0(t)):e=!1,Lu(t,n),N9(t,r,i),Ix(t,r,i,n),Fx(null,t,r,!0,e,n);case 19:return B9(e,t,n);case 22:return F9(e,t,n)}throw Error(ce(156,t.tag))};function oM(e,t){return AR(e,t)}function tq(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(e,t,n,r){return new tq(e,t,n,r)}function hS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nq(e){if(typeof e=="function")return hS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Aw)return 11;if(e===$w)return 14}return 2}function zs(e,t){var n=e.alternate;return n===null?(n=Kr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xm(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")hS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case pu:return Ua(n.children,i,o,t);case Ow:s=8,i|=8;break;case sx:return e=Kr(12,n,t,i|2),e.elementType=sx,e.lanes=o,e;case ax:return e=Kr(13,n,t,i),e.elementType=ax,e.lanes=o,e;case lx:return e=Kr(19,n,t,i),e.elementType=lx,e.lanes=o,e;case mR:return Zg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hR:s=10;break e;case pR:s=9;break e;case Aw:s=11;break e;case $w:s=14;break e;case xs:s=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=Kr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ua(e,t,n,r){return e=Kr(7,e,r,t),e.lanes=n,e}function Zg(e,t,n,r){return e=Kr(22,e,r,t),e.elementType=mR,e.lanes=n,e.stateNode={isHidden:!1},e}function z_(e,t,n){return e=Kr(6,e,null,t),e.lanes=n,e}function W_(e,t,n){return t=Kr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rq(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=b_(0),this.expirationTimes=b_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=b_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pS(e,t,n,r,i,o,s,a,u){return e=new rq(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Kr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qw(o),e}function iq(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uM)}catch(e){console.error(e)}}uM(),uR.exports=Ar;var pl=uR.exports;const uq=Sn(pl);var $6=pl;ix.createRoot=$6.createRoot,ix.hydrateRoot=$6.hydrateRoot;function cq(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kh(...e){return t=>e.forEach(n=>cq(n,t))}function jt(...e){return v.useCallback(kh(...e),e)}var Hn=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),o=i.find(fq);if(o){const s=o.props.children,a=i.map(u=>u===o?v.Children.count(s)>1?v.Children.only(null):v.isValidElement(s)?s.props.children:null:u);return m.jsx(Qx,{...r,ref:t,children:v.isValidElement(s)?v.cloneElement(s,void 0,a):null})}return m.jsx(Qx,{...r,ref:t,children:n})});Hn.displayName="Slot";var Qx=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=hq(n);return v.cloneElement(n,{...dq(r,n.props),ref:t?kh(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Qx.displayName="SlotClone";var cM=({children:e})=>m.jsx(m.Fragment,{children:e});function fq(e){return v.isValidElement(e)&&e.type===cM}function dq(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function hq(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],mt=pq.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Hn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function fM(e,t){e&&pl.flushSync(()=>e.dispatchEvent(t))}var mq="VisuallyHidden",yS=v.forwardRef((e,t)=>m.jsx(mt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));yS.displayName=mq;var gq=yS,dM={exports:{}};/*! +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function D_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function jx(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var DG=typeof WeakMap=="function"?WeakMap:Map;function I9(e,t,n){n=$o(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){N0||(N0=!0,Zx=r),jx(e,t)},n}function j9(e,t,n){n=$o(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){jx(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){jx(e,t),typeof r!="function"&&(Fs===null?Fs=new Set([this]):Fs.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function m6(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new DG;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=XG.bind(null,e,t,n),t.then(e,e))}function g6(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function v6(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$o(-1,1),t.tag=2,Ds(n,t,1))),n.lanes|=1),e)}var FG=Ko.ReactCurrentOwner,ar=!1;function zn(e,t,n,r){t.child=e===null?d9(t,null,n,r):Xu(t,e.child,n,r)}function y6(e,t,n,r,i){n=n.render;var o=t.ref;return Lu(t,i),r=nS(e,t,n,r,o,i),n=rS(),e!==null&&!ar?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wo(e,t,i)):(Ft&&n&&Vw(t),t.flags|=1,zn(e,t,r,i),t.child)}function _6(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!hS(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,D9(e,t,o,r,i)):(e=Xm(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ed,n(s,r)&&e.ref===t.ref)return Wo(e,t,i)}return t.flags|=1,e=Ws(o,r),e.ref=t.ref,e.return=t,t.child=e}function D9(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ed(o,r)&&e.ref===t.ref)if(ar=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(ar=!0);else return t.lanes=e.lanes,Wo(e,t,i)}return Dx(e,t,n,r,i)}function F9(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ot(Cu,xr),xr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ot(Cu,xr),xr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ot(Cu,xr),xr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ot(Cu,xr),xr|=r;return zn(e,t,i,n),t.child}function z9(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Dx(e,t,n,r,i){var o=cr(n)?qa:Nn.current;return o=Yu(t,o),Lu(t,i),n=nS(e,t,n,r,o,i),r=rS(),e!==null&&!ar?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wo(e,t,i)):(Ft&&r&&Vw(t),t.flags|=1,zn(e,t,n,i),t.child)}function x6(e,t,n,r,i){if(cr(n)){var o=!0;k0(t)}else o=!1;if(Lu(t,i),t.stateNode===null)Km(e,t),N9(t,n,r),Ix(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,f=n.contextType;typeof f=="object"&&f!==null?f=ri(f):(f=cr(n)?qa:Nn.current,f=Yu(t,f));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==f)&&p6(t,s,r,f),ws=!1;var g=t.memoizedState;s.state=g,P0(t,r,s,i),u=t.memoizedState,a!==r||g!==u||ur.current||ws?(typeof h=="function"&&(Nx(t,n,h,r),u=t.memoizedState),(a=ws||h6(t,n,a,r,g,u,f))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=f,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,p9(e,t),a=t.memoizedProps,f=t.type===t.elementType?a:vi(t.type,a),s.props=f,d=t.pendingProps,g=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=ri(u):(u=cr(n)?qa:Nn.current,u=Yu(t,u));var y=n.getDerivedStateFromProps;(h=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||g!==u)&&p6(t,s,r,u),ws=!1,g=t.memoizedState,s.state=g,P0(t,r,s,i);var b=t.memoizedState;a!==d||g!==b||ur.current||ws?(typeof y=="function"&&(Nx(t,n,y,r),b=t.memoizedState),(f=ws||h6(t,n,f,r,g,b,u)||!1)?(h||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,b,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,b,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),s.props=r,s.state=b,s.context=u,r=f):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Fx(e,t,n,r,o,i)}function Fx(e,t,n,r,i,o){z9(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&o6(t,n,!1),Wo(e,t,o);r=t.stateNode,FG.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Xu(t,e.child,null,o),t.child=Xu(t,null,a,o)):zn(e,t,a,o),t.memoizedState=r.state,i&&o6(t,n,!0),t.child}function W9(e){var t=e.stateNode;t.pendingContext?i6(e,t.pendingContext,t.pendingContext!==t.context):t.context&&i6(e,t.context,!1),Xw(e,t.containerInfo)}function b6(e,t,n,r,i){return Qu(),Gw(i),t.flags|=256,zn(e,t,n,r),t.child}var zx={dehydrated:null,treeContext:null,retryLane:0};function Wx(e){return{baseLanes:e,cachePool:null,transitions:null}}function U9(e,t,n){var r=t.pendingProps,i=Vt.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ot(Vt,i&1),e===null)return $x(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=qg(s,r,0,null),e=Ba(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Wx(n),t.memoizedState=zx,e):sS(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return zG(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Ws(i,u),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Ws(a,o):(o=Ba(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Wx(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=zx,r}return o=e.child,e=o.sibling,r=Ws(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function sS(e,t){return t=qg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function sm(e,t,n,r){return r!==null&&Gw(r),Xu(t,e.child,null,n),e=sS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zG(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=D_(Error(ce(422))),sm(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=qg({mode:"visible",children:r.children},i,0,null),o=Ba(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Xu(t,e.child,null,s),t.child.memoizedState=Wx(s),t.memoizedState=zx,o);if(!(t.mode&1))return sm(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(ce(419)),r=D_(o,r,void 0),sm(e,t,s,r)}if(a=(s&e.childLanes)!==0,ar||a){if(r=pn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,zo(e,i),Ri(r,e,i,-1))}return dS(),r=D_(Error(ce(421))),sm(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=JG.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,kr=js(i.nextSibling),Tr=t,Ft=!0,_i=null,e!==null&&(Hr[Gr++]=Oo,Hr[Gr++]=Ao,Hr[Gr++]=Ka,Oo=e.id,Ao=e.overflow,Ka=t),t=sS(t,r.children),t.flags|=4096,t)}function w6(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lx(e.return,t,n)}function F_(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function B9(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(zn(e,t,r.children,n),r=Vt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&w6(e,n,t);else if(e.tag===19)w6(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ot(Vt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&O0(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),F_(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&O0(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}F_(t,!0,n,null,o);break;case"together":F_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Km(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qa|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,n=Ws(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ws(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function WG(e,t,n){switch(t.tag){case 3:W9(t),Qu();break;case 5:m9(t);break;case 1:cr(t.type)&&k0(t);break;case 4:Xw(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ot(R0,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ot(Vt,Vt.current&1),t.flags|=128,null):n&t.child.childLanes?U9(e,t,n):(Ot(Vt,Vt.current&1),e=Wo(e,t,n),e!==null?e.sibling:null);Ot(Vt,Vt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return B9(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ot(Vt,Vt.current),r)break;return null;case 22:case 23:return t.lanes=0,F9(e,t,n)}return Wo(e,t,n)}var V9,Ux,H9,G9;V9=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ux=function(){};H9=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ia(Ji.current);var o=null;switch(n){case"input":i=cx(e,i),r=cx(e,r),o=[];break;case"select":i=Gt({},i,{value:void 0}),r=Gt({},r,{value:void 0}),o=[];break;case"textarea":i=hx(e,i),r=hx(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=S0)}mx(n,r);var s;n=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var a=i[f];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(xd.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var u=r[f];if(a=i!=null?i[f]:void 0,r.hasOwnProperty(f)&&u!==a&&(u!=null||a!=null))if(f==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(f,n)),n=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(xd.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&Lt("scroll",e),o||a===u||(o=[])):(o=o||[]).push(f,u))}n&&(o=o||[]).push("style",n);var f=o;(t.updateQueue=f)&&(t.flags|=4)}};G9=function(e,t,n,r){n!==r&&(t.flags|=4)};function kf(e,t){if(!Ft)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function En(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function UG(e,t,n){var r=t.pendingProps;switch(Hw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return En(t),null;case 1:return cr(t.type)&&C0(),En(t),null;case 3:return r=t.stateNode,Ju(),It(ur),It(Nn),eS(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(im(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_i!==null&&(Yx(_i),_i=null))),Ux(e,t),En(t),null;case 5:Jw(t);var i=Ia(Ad.current);if(n=t.type,e!==null&&t.stateNode!=null)H9(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ce(166));return En(t),null}if(e=Ia(Ji.current),im(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ki]=t,r[Pd]=o,e=(t.mode&1)!==0,n){case"dialog":Lt("cancel",r),Lt("close",r);break;case"iframe":case"object":case"embed":Lt("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ki]=t,e[Pd]=r,V9(e,t,!1,!1),t.stateNode=e;e:{switch(s=gx(n,r),n){case"dialog":Lt("cancel",e),Lt("close",e),i=r;break;case"iframe":case"object":case"embed":Lt("load",e),i=r;break;case"video":case"audio":for(i=0;itc&&(t.flags|=128,r=!0,kf(o,!1),t.lanes=4194304)}else{if(!r)if(e=O0(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kf(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ft)return En(t),null}else 2*en()-o.renderingStartTime>tc&&n!==1073741824&&(t.flags|=128,r=!0,kf(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=en(),t.sibling=null,n=Vt.current,Ot(Vt,r?n&1|2:n&1),t):(En(t),null);case 22:case 23:return fS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xr&1073741824&&(En(t),t.subtreeFlags&6&&(t.flags|=8192)):En(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function BG(e,t){switch(Hw(t),t.tag){case 1:return cr(t.type)&&C0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ju(),It(ur),It(Nn),eS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Jw(t),null;case 13:if(It(Vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));Qu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return It(Vt),null;case 4:return Ju(),null;case 10:return Kw(t.type._context),null;case 22:case 23:return fS(),null;case 24:return null;default:return null}}var am=!1,An=!1,VG=typeof WeakSet=="function"?WeakSet:Set,Te=null;function Su(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Bx(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var S6=!1;function HG(e,t){if(Tx=x0,e=QR(),Bw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,u=-1,f=0,h=0,d=e,g=null;t:for(;;){for(var y;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(y=d.firstChild)!==null;)g=d,d=y;for(;;){if(d===e)break t;if(g===n&&++f===i&&(a=s),g===o&&++h===r&&(u=s),(y=d.nextSibling)!==null)break;d=g,g=d.parentNode}d=y}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ex={focusedElem:e,selectionRange:n},x0=!1,Te=t;Te!==null;)if(t=Te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Te=e;else for(;Te!==null;){t=Te;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var x=b.memoizedProps,C=b.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?x:vi(t.type,x),C);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(E){Yt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,Te=e;break}Te=t.return}return b=S6,S6=!1,b}function od(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Bx(t,n,o)}i=i.next}while(i!==r)}}function Gg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Z9(e){var t=e.alternate;t!==null&&(e.alternate=null,Z9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ki],delete t[Pd],delete t[Px],delete t[EG],delete t[RG])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function q9(e){return e.tag===5||e.tag===3||e.tag===4}function C6(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||q9(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=S0));else if(r!==4&&(e=e.child,e!==null))for(Hx(e,t,n),e=e.sibling;e!==null;)Hx(e,t,n),e=e.sibling}function Gx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Gx(e,t,n),e=e.sibling;e!==null;)Gx(e,t,n),e=e.sibling}var xn=null,yi=!1;function gs(e,t,n){for(n=n.child;n!==null;)K9(e,t,n),n=n.sibling}function K9(e,t,n){if(Xi&&typeof Xi.onCommitFiberUnmount=="function")try{Xi.onCommitFiberUnmount(Dg,n)}catch{}switch(n.tag){case 5:An||Su(n,t);case 6:var r=xn,i=yi;xn=null,gs(e,t,n),xn=r,yi=i,xn!==null&&(yi?(e=xn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xn.removeChild(n.stateNode));break;case 18:xn!==null&&(yi?(e=xn,n=n.stateNode,e.nodeType===8?A_(e.parentNode,n):e.nodeType===1&&A_(e,n),kd(e)):A_(xn,n.stateNode));break;case 4:r=xn,i=yi,xn=n.stateNode.containerInfo,yi=!0,gs(e,t,n),xn=r,yi=i;break;case 0:case 11:case 14:case 15:if(!An&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Bx(n,t,s),i=i.next}while(i!==r)}gs(e,t,n);break;case 1:if(!An&&(Su(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}gs(e,t,n);break;case 21:gs(e,t,n);break;case 22:n.mode&1?(An=(r=An)||n.memoizedState!==null,gs(e,t,n),An=r):gs(e,t,n);break;default:gs(e,t,n)}}function k6(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VG),t.forEach(function(r){var i=eZ.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hi(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=en()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZG(r/1960))-r,10e?16:e,Os===null)var r=!1;else{if(e=Os,Os=null,I0=0,ut&6)throw Error(ce(331));var i=ut;for(ut|=4,Te=e.current;Te!==null;){var o=Te,s=o.child;if(Te.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uen()-uS?Ua(e,0):lS|=n),fr(e,t)}function rM(e,t){t===0&&(e.mode&1?(t=Xp,Xp<<=1,!(Xp&130023424)&&(Xp=4194304)):t=1);var n=Bn();e=zo(e,t),e!==null&&(bh(e,t,n),fr(e,n))}function JG(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rM(e,n)}function eZ(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ce(314))}r!==null&&r.delete(t),rM(e,n)}var iM;iM=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ur.current)ar=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ar=!1,WG(e,t,n);ar=!!(e.flags&131072)}else ar=!1,Ft&&t.flags&1048576&&l9(t,E0,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Km(e,t),e=t.pendingProps;var i=Yu(t,Nn.current);Lu(t,n),i=nS(null,t,r,e,i,n);var o=rS();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,cr(r)?(o=!0,k0(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Qw(t),i.updater=Hg,t.stateNode=i,i._reactInternals=t,Ix(t,r,e,n),t=Fx(null,t,r,!0,o,n)):(t.tag=0,Ft&&o&&Vw(t),zn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Km(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=nZ(r),e=vi(r,e),i){case 0:t=Dx(null,t,r,e,n);break e;case 1:t=x6(null,t,r,e,n);break e;case 11:t=y6(null,t,r,e,n);break e;case 14:t=_6(null,t,r,vi(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),Dx(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),x6(e,t,r,i,n);case 3:e:{if(W9(t),e===null)throw Error(ce(387));r=t.pendingProps,o=t.memoizedState,i=o.element,p9(e,t),P0(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=ec(Error(ce(423)),t),t=b6(e,t,r,n,i);break e}else if(r!==i){i=ec(Error(ce(424)),t),t=b6(e,t,r,n,i);break e}else for(kr=js(t.stateNode.containerInfo.firstChild),Tr=t,Ft=!0,_i=null,n=d9(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qu(),r===i){t=Wo(e,t,n);break e}zn(e,t,r,n)}t=t.child}return t;case 5:return m9(t),e===null&&$x(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Rx(r,i)?s=null:o!==null&&Rx(r,o)&&(t.flags|=32),z9(e,t),zn(e,t,s,n),t.child;case 6:return e===null&&$x(t),null;case 13:return U9(e,t,n);case 4:return Xw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xu(t,null,r,n):zn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),y6(e,t,r,i,n);case 7:return zn(e,t,t.pendingProps,n),t.child;case 8:return zn(e,t,t.pendingProps.children,n),t.child;case 12:return zn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ot(R0,r._currentValue),r._currentValue=s,o!==null)if(Oi(o.value,s)){if(o.children===i.children&&!ur.current){t=Wo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=$o(-1,n&-n),u.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Lx(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ce(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Lx(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}zn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Lu(t,n),i=ri(i),r=r(i),t.flags|=1,zn(e,t,r,n),t.child;case 14:return r=t.type,i=vi(r,t.pendingProps),i=vi(r.type,i),_6(e,t,r,i,n);case 15:return D9(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:vi(r,i),Km(e,t),t.tag=1,cr(r)?(e=!0,k0(t)):e=!1,Lu(t,n),N9(t,r,i),Ix(t,r,i,n),Fx(null,t,r,!0,e,n);case 19:return B9(e,t,n);case 22:return F9(e,t,n)}throw Error(ce(156,t.tag))};function oM(e,t){return AR(e,t)}function tZ(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(e,t,n,r){return new tZ(e,t,n,r)}function hS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nZ(e){if(typeof e=="function")return hS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Aw)return 11;if(e===$w)return 14}return 2}function Ws(e,t){var n=e.alternate;return n===null?(n=Kr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xm(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")hS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case pu:return Ba(n.children,i,o,t);case Ow:s=8,i|=8;break;case sx:return e=Kr(12,n,t,i|2),e.elementType=sx,e.lanes=o,e;case ax:return e=Kr(13,n,t,i),e.elementType=ax,e.lanes=o,e;case lx:return e=Kr(19,n,t,i),e.elementType=lx,e.lanes=o,e;case mR:return qg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hR:s=10;break e;case pR:s=9;break e;case Aw:s=11;break e;case $w:s=14;break e;case bs:s=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=Kr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ba(e,t,n,r){return e=Kr(7,e,r,t),e.lanes=n,e}function qg(e,t,n,r){return e=Kr(22,e,r,t),e.elementType=mR,e.lanes=n,e.stateNode={isHidden:!1},e}function z_(e,t,n){return e=Kr(6,e,null,t),e.lanes=n,e}function W_(e,t,n){return t=Kr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rZ(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=b_(0),this.expirationTimes=b_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=b_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pS(e,t,n,r,i,o,s,a,u){return e=new rZ(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Kr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qw(o),e}function iZ(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uM)}catch(e){console.error(e)}}uM(),uR.exports=Ar;var pl=uR.exports;const uZ=Sn(pl);var $6=pl;ix.createRoot=$6.createRoot,ix.hydrateRoot=$6.hydrateRoot;function cZ(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function kh(...e){return t=>e.forEach(n=>cZ(n,t))}function jt(...e){return v.useCallback(kh(...e),e)}var Hn=v.forwardRef((e,t)=>{const{children:n,...r}=e,i=v.Children.toArray(n),o=i.find(fZ);if(o){const s=o.props.children,a=i.map(u=>u===o?v.Children.count(s)>1?v.Children.only(null):v.isValidElement(s)?s.props.children:null:u);return m.jsx(Qx,{...r,ref:t,children:v.isValidElement(s)?v.cloneElement(s,void 0,a):null})}return m.jsx(Qx,{...r,ref:t,children:n})});Hn.displayName="Slot";var Qx=v.forwardRef((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const i=hZ(n);return v.cloneElement(n,{...dZ(r,n.props),ref:t?kh(t,i):i})}return v.Children.count(n)>1?v.Children.only(null):null});Qx.displayName="SlotClone";var cM=({children:e})=>m.jsx(m.Fragment,{children:e});function fZ(e){return v.isValidElement(e)&&e.type===cM}function dZ(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function hZ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],mt=pZ.reduce((e,t)=>{const n=v.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Hn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function fM(e,t){e&&pl.flushSync(()=>e.dispatchEvent(t))}var mZ="VisuallyHidden",yS=v.forwardRef((e,t)=>m.jsx(mt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));yS.displayName=mZ;var gZ=yS,dM={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ib,Object.values(b));return m.jsx(x.Provider,{value:C,children:y})}function h(d,g){const y=(g==null?void 0:g[e][u])||a,b=v.useContext(y);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,h]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const u=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return i.scopeName=e,[r,yq(i,...t)]}function yq(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:u,scopeName:f})=>{const d=u(o)[`__scope${f}`];return{...a,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}var Ja=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},_q=XV.useId||(()=>{}),xq=0;function jd(e){const[t,n]=v.useState(_q());return Ja(()=>{n(r=>r??String(xq++))},[e]),t?`radix-${t}`:""}function Ai(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ko({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=bq({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=Ai(n),u=v.useCallback(f=>{if(o){const d=typeof f=="function"?f(e):f;d!==e&&a(d)}else i(f)},[o,e,i,a]);return[s,u]}function bq({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),o=Ai(t);return v.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function wq(e,t=globalThis==null?void 0:globalThis.document){const n=Ai(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Sq="DismissableLayer",Xx="dismissableLayer.update",Cq="dismissableLayer.pointerDownOutside",kq="dismissableLayer.focusOutside",L6,hM=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...u}=e,f=v.useContext(hM),[h,d]=v.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=v.useState({}),b=jt(t,$=>d($)),x=Array.from(f.layers),[C]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),_=x.indexOf(C),w=h?x.indexOf(h):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,E=w>=_,R=Rq($=>{const I=$.target,F=[...f.branches].some(N=>N.contains(I));!E||F||(i==null||i($),s==null||s($),$.defaultPrevented||a==null||a())},g),A=Mq($=>{const I=$.target;[...f.branches].some(N=>N.contains(I))||(o==null||o($),s==null||s($),$.defaultPrevented||a==null||a())},g);return wq($=>{w===f.layers.size-1&&(r==null||r($),!$.defaultPrevented&&a&&($.preventDefault(),a()))},g),v.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(L6=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),N6(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=L6)}},[h,g,n,f]),v.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),N6())},[h,f]),v.useEffect(()=>{const $=()=>y({});return document.addEventListener(Xx,$),()=>document.removeEventListener(Xx,$)},[]),m.jsx(mt.div,{...u,ref:b,style:{pointerEvents:k?E?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,R.onPointerDownCapture)})});Jg.displayName=Sq;var Tq="DismissableLayerBranch",Eq=v.forwardRef((e,t)=>{const n=v.useContext(hM),r=v.useRef(null),i=jt(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),m.jsx(mt.div,{...e,ref:i})});Eq.displayName=Tq;function Rq(e,t=globalThis==null?void 0:globalThis.document){const n=Ai(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){pM(Cq,n,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Mq(e,t=globalThis==null?void 0:globalThis.document){const n=Ai(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&pM(kq,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function N6(){const e=new CustomEvent(Xx);document.dispatchEvent(e)}function pM(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?fM(i,o):i.dispatchEvent(o)}var U_="focusScope.autoFocusOnMount",B_="focusScope.autoFocusOnUnmount",I6={bubbles:!1,cancelable:!0},Pq="FocusScope",_S=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,u]=v.useState(null),f=Ai(i),h=Ai(o),d=v.useRef(null),g=jt(t,x=>u(x)),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let x=function(k){if(y.paused||!a)return;const E=k.target;a.contains(E)?d.current=E:_s(d.current,{select:!0})},C=function(k){if(y.paused||!a)return;const E=k.relatedTarget;E!==null&&(a.contains(E)||_s(d.current,{select:!0}))},_=function(k){if(document.activeElement===document.body)for(const R of k)R.removedNodes.length>0&&_s(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",C);const w=new MutationObserver(_);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",C),w.disconnect()}}},[r,a,y.paused]),v.useEffect(()=>{if(a){D6.add(y);const x=document.activeElement;if(!a.contains(x)){const _=new CustomEvent(U_,I6);a.addEventListener(U_,f),a.dispatchEvent(_),_.defaultPrevented||(Oq(Iq(mM(a)),{select:!0}),document.activeElement===x&&_s(a))}return()=>{a.removeEventListener(U_,f),setTimeout(()=>{const _=new CustomEvent(B_,I6);a.addEventListener(B_,h),a.dispatchEvent(_),_.defaultPrevented||_s(x??document.body,{select:!0}),a.removeEventListener(B_,h),D6.remove(y)},0)}}},[a,f,h,y]);const b=v.useCallback(x=>{if(!n&&!r||y.paused)return;const C=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,_=document.activeElement;if(C&&_){const w=x.currentTarget,[k,E]=Aq(w);k&&E?!x.shiftKey&&_===E?(x.preventDefault(),n&&_s(k,{select:!0})):x.shiftKey&&_===k&&(x.preventDefault(),n&&_s(E,{select:!0})):_===w&&x.preventDefault()}},[n,r,y.paused]);return m.jsx(mt.div,{tabIndex:-1,...s,ref:g,onKeyDown:b})});_S.displayName=Pq;function Oq(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_s(r,{select:t}),document.activeElement!==n)return}function Aq(e){const t=mM(e),n=j6(t,e),r=j6(t.reverse(),e);return[n,r]}function mM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function j6(e,t){for(const n of e)if(!$q(n,{upTo:t}))return n}function $q(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Lq(e){return e instanceof HTMLInputElement&&"select"in e}function _s(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Lq(e)&&t&&e.select()}}var D6=Nq();function Nq(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=F6(e,t),e.unshift(t)},remove(t){var n;e=F6(e,t),(n=e[0])==null||n.resume()}}}function F6(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Iq(e){return e.filter(t=>t.tagName!=="A")}var jq="Portal",ev=v.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=v.useState(!1);Ja(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?uq.createPortal(m.jsx(mt.div,{...r,ref:t}),s):null});ev.displayName=jq;function Dq(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ao=e=>{const{present:t,children:n}=e,r=Fq(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=jt(r.ref,zq(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};ao.displayName="Presence";function Fq(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),s=e?"mounted":"unmounted",[a,u]=Dq(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=cm(r.current);o.current=a==="mounted"?f:"none"},[a]),Ja(()=>{const f=r.current,h=i.current;if(h!==e){const g=o.current,y=cm(f);e?u("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&g!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Ja(()=>{if(t){const f=d=>{const y=cm(r.current).includes(d.animationName);d.target===t&&y&&pl.flushSync(()=>u("ANIMATION_END"))},h=d=>{d.target===t&&(o.current=cm(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function cm(e){return(e==null?void 0:e.animationName)||"none"}function zq(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var V_=0;function gM(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??z6()),document.body.insertAdjacentElement("beforeend",e[1]??z6()),V_++,()=>{V_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),V_--}},[])}function z6(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Yi=function(){return Yi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return rZ;var t=iZ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sZ=xM(),aZ=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` - .`.concat(Uq,` { +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ib,Object.values(b));return m.jsx(x.Provider,{value:C,children:y})}function h(d,g){const y=(g==null?void 0:g[e][u])||a,b=v.useContext(y);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return f.displayName=o+"Provider",[f,h]}const i=()=>{const o=n.map(s=>v.createContext(s));return function(a){const u=(a==null?void 0:a[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:u}}),[a,u])}};return i.scopeName=e,[r,yZ(i,...t)]}function yZ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:u,scopeName:f})=>{const d=u(o)[`__scope${f}`];return{...a,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}var Ja=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},_Z=XV.useId||(()=>{}),xZ=0;function jd(e){const[t,n]=v.useState(_Z());return Ja(()=>{n(r=>r??String(xZ++))},[e]),t?`radix-${t}`:""}function Ai(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Yo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=bZ({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=Ai(n),u=v.useCallback(f=>{if(o){const d=typeof f=="function"?f(e):f;d!==e&&a(d)}else i(f)},[o,e,i,a]);return[s,u]}function bZ({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,i=v.useRef(r),o=Ai(t);return v.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function wZ(e,t=globalThis==null?void 0:globalThis.document){const n=Ai(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var SZ="DismissableLayer",Xx="dismissableLayer.update",CZ="dismissableLayer.pointerDownOutside",kZ="dismissableLayer.focusOutside",L6,hM=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...u}=e,f=v.useContext(hM),[h,d]=v.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=v.useState({}),b=jt(t,$=>d($)),x=Array.from(f.layers),[C]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),_=x.indexOf(C),w=h?x.indexOf(h):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,E=w>=_,R=RZ($=>{const N=$.target,z=[...f.branches].some(I=>I.contains(N));!E||z||(i==null||i($),s==null||s($),$.defaultPrevented||a==null||a())},g),A=MZ($=>{const N=$.target;[...f.branches].some(I=>I.contains(N))||(o==null||o($),s==null||s($),$.defaultPrevented||a==null||a())},g);return wZ($=>{w===f.layers.size-1&&(r==null||r($),!$.defaultPrevented&&a&&($.preventDefault(),a()))},g),v.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(L6=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),N6(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=L6)}},[h,g,n,f]),v.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),N6())},[h,f]),v.useEffect(()=>{const $=()=>y({});return document.addEventListener(Xx,$),()=>document.removeEventListener(Xx,$)},[]),m.jsx(mt.div,{...u,ref:b,style:{pointerEvents:k?E?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,R.onPointerDownCapture)})});Jg.displayName=SZ;var TZ="DismissableLayerBranch",EZ=v.forwardRef((e,t)=>{const n=v.useContext(hM),r=v.useRef(null),i=jt(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),m.jsx(mt.div,{...e,ref:i})});EZ.displayName=TZ;function RZ(e,t=globalThis==null?void 0:globalThis.document){const n=Ai(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){pM(CZ,n,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function MZ(e,t=globalThis==null?void 0:globalThis.document){const n=Ai(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&pM(kZ,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function N6(){const e=new CustomEvent(Xx);document.dispatchEvent(e)}function pM(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?fM(i,o):i.dispatchEvent(o)}var U_="focusScope.autoFocusOnMount",B_="focusScope.autoFocusOnUnmount",I6={bubbles:!1,cancelable:!0},PZ="FocusScope",_S=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,u]=v.useState(null),f=Ai(i),h=Ai(o),d=v.useRef(null),g=jt(t,x=>u(x)),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let x=function(k){if(y.paused||!a)return;const E=k.target;a.contains(E)?d.current=E:xs(d.current,{select:!0})},C=function(k){if(y.paused||!a)return;const E=k.relatedTarget;E!==null&&(a.contains(E)||xs(d.current,{select:!0}))},_=function(k){if(document.activeElement===document.body)for(const R of k)R.removedNodes.length>0&&xs(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",C);const w=new MutationObserver(_);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",C),w.disconnect()}}},[r,a,y.paused]),v.useEffect(()=>{if(a){D6.add(y);const x=document.activeElement;if(!a.contains(x)){const _=new CustomEvent(U_,I6);a.addEventListener(U_,f),a.dispatchEvent(_),_.defaultPrevented||(OZ(IZ(mM(a)),{select:!0}),document.activeElement===x&&xs(a))}return()=>{a.removeEventListener(U_,f),setTimeout(()=>{const _=new CustomEvent(B_,I6);a.addEventListener(B_,h),a.dispatchEvent(_),_.defaultPrevented||xs(x??document.body,{select:!0}),a.removeEventListener(B_,h),D6.remove(y)},0)}}},[a,f,h,y]);const b=v.useCallback(x=>{if(!n&&!r||y.paused)return;const C=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,_=document.activeElement;if(C&&_){const w=x.currentTarget,[k,E]=AZ(w);k&&E?!x.shiftKey&&_===E?(x.preventDefault(),n&&xs(k,{select:!0})):x.shiftKey&&_===k&&(x.preventDefault(),n&&xs(E,{select:!0})):_===w&&x.preventDefault()}},[n,r,y.paused]);return m.jsx(mt.div,{tabIndex:-1,...s,ref:g,onKeyDown:b})});_S.displayName=PZ;function OZ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(xs(r,{select:t}),document.activeElement!==n)return}function AZ(e){const t=mM(e),n=j6(t,e),r=j6(t.reverse(),e);return[n,r]}function mM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function j6(e,t){for(const n of e)if(!$Z(n,{upTo:t}))return n}function $Z(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function LZ(e){return e instanceof HTMLInputElement&&"select"in e}function xs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LZ(e)&&t&&e.select()}}var D6=NZ();function NZ(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=F6(e,t),e.unshift(t)},remove(t){var n;e=F6(e,t),(n=e[0])==null||n.resume()}}}function F6(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function IZ(e){return e.filter(t=>t.tagName!=="A")}var jZ="Portal",ev=v.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=v.useState(!1);Ja(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?uZ.createPortal(m.jsx(mt.div,{...r,ref:t}),s):null});ev.displayName=jZ;function DZ(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var ao=e=>{const{present:t,children:n}=e,r=FZ(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=jt(r.ref,zZ(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};ao.displayName="Presence";function FZ(e){const[t,n]=v.useState(),r=v.useRef({}),i=v.useRef(e),o=v.useRef("none"),s=e?"mounted":"unmounted",[a,u]=DZ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=cm(r.current);o.current=a==="mounted"?f:"none"},[a]),Ja(()=>{const f=r.current,h=i.current;if(h!==e){const g=o.current,y=cm(f);e?u("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(h&&g!==y?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Ja(()=>{if(t){const f=d=>{const y=cm(r.current).includes(d.animationName);d.target===t&&y&&pl.flushSync(()=>u("ANIMATION_END"))},h=d=>{d.target===t&&(o.current=cm(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(f=>{f&&(r.current=getComputedStyle(f)),n(f)},[])}}function cm(e){return(e==null?void 0:e.animationName)||"none"}function zZ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var V_=0;function gM(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??z6()),document.body.insertAdjacentElement("beforeend",e[1]??z6()),V_++,()=>{V_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),V_--}},[])}function z6(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Yi=function(){return Yi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return rq;var t=iq(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},sq=xM(),aq=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(UZ,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } @@ -77,20 +77,20 @@ Error generating stack: `+o.message+` } body { - `).concat(Bq,": ").concat(a,`px; + `).concat(BZ,": ").concat(a,`px; } -`)},lZ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=v.useMemo(function(){return oZ(i)},[i]);return v.createElement(sZ,{styles:aZ(o,!t,i,n?"":"!important")})},Jx=!1;if(typeof window<"u")try{var fm=Object.defineProperty({},"passive",{get:function(){return Jx=!0,!0}});window.addEventListener("test",fm,fm),window.removeEventListener("test",fm,fm)}catch{Jx=!1}var Zl=Jx?{passive:!1}:!1,uZ=function(e){return e.tagName==="TEXTAREA"},bM=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uZ(e)&&n[t]==="visible")},cZ=function(e){return bM(e,"overflowY")},fZ=function(e){return bM(e,"overflowX")},U6=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=wM(e,r);if(i){var o=SM(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dZ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hZ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wM=function(e,t){return e==="v"?cZ(t):fZ(t)},SM=function(e,t){return e==="v"?dZ(t):hZ(t)},pZ=function(e,t){return e==="h"&&t==="rtl"?-1:1},mZ=function(e,t,n,r,i){var o=pZ(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,u=t.contains(a),f=!1,h=s>0,d=0,g=0;do{var y=SM(e,a),b=y[0],x=y[1],C=y[2],_=x-C-o*b;(b||_)&&wM(e,a)&&(d+=_,g+=b),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(h&&(Math.abs(d)<1||!i)||!h&&(Math.abs(g)<1||!i))&&(f=!0),f},dm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},B6=function(e){return[e.deltaX,e.deltaY]},V6=function(e){return e&&"current"in e?e.current:e},gZ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vZ=function(e){return` +`)},lq=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=v.useMemo(function(){return oq(i)},[i]);return v.createElement(sq,{styles:aq(o,!t,i,n?"":"!important")})},Jx=!1;if(typeof window<"u")try{var fm=Object.defineProperty({},"passive",{get:function(){return Jx=!0,!0}});window.addEventListener("test",fm,fm),window.removeEventListener("test",fm,fm)}catch{Jx=!1}var ql=Jx?{passive:!1}:!1,uq=function(e){return e.tagName==="TEXTAREA"},bM=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uq(e)&&n[t]==="visible")},cq=function(e){return bM(e,"overflowY")},fq=function(e){return bM(e,"overflowX")},U6=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=wM(e,r);if(i){var o=SM(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dq=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hq=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wM=function(e,t){return e==="v"?cq(t):fq(t)},SM=function(e,t){return e==="v"?dq(t):hq(t)},pq=function(e,t){return e==="h"&&t==="rtl"?-1:1},mq=function(e,t,n,r,i){var o=pq(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,u=t.contains(a),f=!1,h=s>0,d=0,g=0;do{var y=SM(e,a),b=y[0],x=y[1],C=y[2],_=x-C-o*b;(b||_)&&wM(e,a)&&(d+=_,g+=b),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!u&&a!==document.body||u&&(t.contains(a)||t===a));return(h&&(Math.abs(d)<1||!i)||!h&&(Math.abs(g)<1||!i))&&(f=!0),f},dm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},B6=function(e){return[e.deltaX,e.deltaY]},V6=function(e){return e&&"current"in e?e.current:e},gq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vq=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},yZ=0,Kl=[];function _Z(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(yZ++)[0],o=v.useState(xM)[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=Wq([e.lockRef.current],(e.shards||[]).map(V6),!0).filter(Boolean);return x.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(x,C){if("touches"in x&&x.touches.length===2)return!s.current.allowPinchZoom;var _=dm(x),w=n.current,k="deltaX"in x?x.deltaX:w[0]-_[0],E="deltaY"in x?x.deltaY:w[1]-_[1],R,A=x.target,$=Math.abs(k)>Math.abs(E)?"h":"v";if("touches"in x&&$==="h"&&A.type==="range")return!1;var I=U6($,A);if(!I)return!0;if(I?R=$:(R=$==="v"?"h":"v",I=U6($,A)),!I)return!1;if(!r.current&&"changedTouches"in x&&(k||E)&&(r.current=R),!R)return!0;var F=r.current||R;return mZ(F,C,x,F==="h"?k:E,!0)},[]),u=v.useCallback(function(x){var C=x;if(!(!Kl.length||Kl[Kl.length-1]!==o)){var _="deltaY"in C?B6(C):dm(C),w=t.current.filter(function(R){return R.name===C.type&&(R.target===C.target||C.target===R.shadowParent)&&gZ(R.delta,_)})[0];if(w&&w.should){C.cancelable&&C.preventDefault();return}if(!w){var k=(s.current.shards||[]).map(V6).filter(Boolean).filter(function(R){return R.contains(C.target)}),E=k.length>0?a(C,k[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),f=v.useCallback(function(x,C,_,w){var k={name:x,delta:C,target:_,should:w,shadowParent:xZ(_)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(E){return E!==k})},1)},[]),h=v.useCallback(function(x){n.current=dm(x),r.current=void 0},[]),d=v.useCallback(function(x){f(x.type,B6(x),x.target,a(x,e.lockRef.current))},[]),g=v.useCallback(function(x){f(x.type,dm(x),x.target,a(x,e.lockRef.current))},[]);v.useEffect(function(){return Kl.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",u,Zl),document.addEventListener("touchmove",u,Zl),document.addEventListener("touchstart",h,Zl),function(){Kl=Kl.filter(function(x){return x!==o}),document.removeEventListener("wheel",u,Zl),document.removeEventListener("touchmove",u,Zl),document.removeEventListener("touchstart",h,Zl)}},[]);var y=e.removeScrollBar,b=e.inert;return v.createElement(v.Fragment,null,b?v.createElement(o,{styles:vZ(i)}):null,y?v.createElement(lZ,{gapMode:e.gapMode}):null)}function xZ(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bZ=Yq(_M,_Z);var xS=v.forwardRef(function(e,t){return v.createElement(tv,Yi({},e,{ref:t,sideCar:bZ}))});xS.classNames=tv.classNames;var wZ=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yl=new WeakMap,hm=new WeakMap,pm={},Z_=0,CM=function(e){return e&&(e.host||CM(e.parentNode))},SZ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=CM(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},CZ=function(e,t,n,r){var i=SZ(t,Array.isArray(e)?e:[e]);pm[n]||(pm[n]=new WeakMap);var o=pm[n],s=[],a=new Set,u=new Set(i),f=function(d){!d||a.has(d)||(a.add(d),f(d.parentNode))};i.forEach(f);var h=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(g){if(a.has(g))h(g);else try{var y=g.getAttribute(r),b=y!==null&&y!=="false",x=(Yl.get(g)||0)+1,C=(o.get(g)||0)+1;Yl.set(g,x),o.set(g,C),s.push(g),x===1&&b&&hm.set(g,!0),C===1&&g.setAttribute(n,"true"),b||g.setAttribute(r,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return h(t),a.clear(),Z_++,function(){s.forEach(function(d){var g=Yl.get(d)-1,y=o.get(d)-1;Yl.set(d,g),o.set(d,y),g||(hm.has(d)||d.removeAttribute(r),hm.delete(d)),y||d.removeAttribute(n)}),Z_--,Z_||(Yl=new WeakMap,Yl=new WeakMap,hm=new WeakMap,pm={})}},kM=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=wZ(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),CZ(r,i,n,"aria-hidden")):function(){return null}};const lo={asChild:{type:"boolean"}},Ws={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}},bS={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}},wS=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],kZ=["auto","gray","mauve","slate","sage","olive","sand"],Th={color:{type:"enum",values:wS,default:void 0}},TZ={color:{type:"enum",values:wS,default:""}},nv={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}},EZ=["normal","start","end","both"],RZ={trim:{type:"enum",className:"rt-r-lt",values:EZ,responsive:!0}},MZ=["left","center","right"],PZ={align:{type:"enum",className:"rt-r-ta",values:MZ,responsive:!0}},OZ=["wrap","nowrap","pretty","balance"],AZ={wrap:{type:"enum",className:"rt-r-tw",values:OZ,responsive:!0}},$Z={truncate:{type:"boolean",className:"rt-truncate"}},LZ=["light","regular","medium","bold"],NZ={weight:{type:"enum",className:"rt-r-weight",values:LZ,responsive:!0}},SS=["initial","xs","sm","md","lg","xl"];function TM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ld(e){return typeof e=="object"&&Object.keys(e).some(t=>SS.includes(t))}function IZ({className:e,customProperties:t,...n}){const r=EM({allowArbitraryValues:!0,className:e,...n}),i=jZ({customProperties:t,...n});return[r,i]}function EM({allowArbitraryValues:e,value:t,className:n,propValues:r,parseValue:i=o=>o}){const o=[];if(t){if(typeof t=="string"&&r.includes(t))return H6(n,t,i);if(ld(t)){const s=t;for(const a in s){if(!TM(s,a)||!SS.includes(a))continue;const u=s[a];if(u!==void 0){if(r.includes(u)){const f=H6(n,u,i),h=a==="initial"?f:`${a}:${f}`;o.push(h)}else if(e){const f=a==="initial"?n:`${a}:${n}`;o.push(f)}}}return o.join(" ")}if(e)return n}}function H6(e,t,n){const r=e?"-":"",i=n(t),o=i==null?void 0:i.startsWith("-"),s=o?"-":"",a=o?i==null?void 0:i.substring(1):i;return`${s}${e}${r}${a}`}function jZ({customProperties:e,value:t,propValues:n,parseValue:r=i=>i}){let i={};if(!(!t||typeof t=="string"&&n.includes(t))){if(typeof t=="string"&&(i=Object.fromEntries(e.map(o=>[o,t]))),ld(t)){const o=t;for(const s in o){if(!TM(o,s)||!SS.includes(s))continue;const a=o[s];if(!n.includes(a))for(const u of e)i={[s==="initial"?u:`${u}-${s}`]:a,...i}}}for(const o in i){const s=i[o];s!==void 0&&(i[o]=r(s))}return i}}function eb(...e){let t={};for(const n of e)n&&(t={...t,...n});return Object.keys(t).length?t:void 0}function DZ(...e){return Object.assign({},...e)}function Gn(e,...t){let n,r;const i={...e},o=DZ(...t);for(const s in o){let a=i[s];const u=o[s];if(u.default!==void 0&&a===void 0&&(a=u.default),u.type==="enum"&&![u.default,...u.values].includes(a)&&!ld(a)&&(a=u.default),i[s]=a,"className"in u&&u.className){delete i[s];const f="responsive"in u;if(!a||ld(a)&&!f)continue;if(ld(a)&&(u.default!==void 0&&a.initial===void 0&&(a.initial=u.default),u.type==="enum"&&([u.default,...u.values].includes(a.initial)||(a.initial=u.default))),u.type==="enum"){const h=EM({allowArbitraryValues:!1,value:a,className:u.className,propValues:u.values,parseValue:u.parseValue});n=zt(n,h);continue}if(u.type==="string"||u.type==="enum | string"){const h=u.type==="string"?[]:u.values,[d,g]=IZ({className:u.className,customProperties:u.customProperties,propValues:h,parseValue:u.parseValue,value:a});r=eb(r,g),n=zt(n,d);continue}if(u.type==="boolean"&&a){n=zt(n,u.className);continue}}}return i.className=zt(n,e.className),i.style=eb(r,e.style),i}const xa=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Fi={m:{type:"enum | string",values:xa,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:xa,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:xa,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:xa,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:xa,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:xa,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:xa,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}},FZ=["span","div","label","p"],zZ=["1","2","3","4","5","6","7","8","9"],WZ={as:{type:"enum",values:FZ,default:"span"},...lo,size:{type:"enum",className:"rt-r-size",values:zZ,responsive:!0},...NZ,...PZ,...RZ,...$Z,...AZ,...Th,...nv},ae=v.forwardRef((e,t)=>{const{children:n,className:r,asChild:i,as:o="span",color:s,...a}=Gn(e,WZ,Fi);return v.createElement(Hn,{"data-accent-color":s,...a,ref:t,className:zt("rt-Text",r)},i?n:v.createElement(o,null,n))});ae.displayName="Text";const UZ=["top","right","bottom","left"],Zs=Math.min,Sr=Math.max,F0=Math.round,mm=Math.floor,Ks=e=>({x:e,y:e}),BZ={left:"right",right:"left",bottom:"top",top:"bottom"},VZ={start:"end",end:"start"};function tb(e,t,n){return Sr(e,Zs(t,n))}function Wo(e,t){return typeof e=="function"?e(t):e}function Uo(e){return e.split("-")[0]}function kc(e){return e.split("-")[1]}function CS(e){return e==="x"?"y":"x"}function kS(e){return e==="y"?"height":"width"}function Ys(e){return["top","bottom"].includes(Uo(e))?"y":"x"}function TS(e){return CS(Ys(e))}function HZ(e,t,n){n===void 0&&(n=!1);const r=kc(e),i=TS(e),o=kS(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=z0(s)),[s,z0(s)]}function GZ(e){const t=z0(e);return[nb(e),t,nb(t)]}function nb(e){return e.replace(/start|end/g,t=>VZ[t])}function qZ(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function ZZ(e,t,n,r){const i=kc(e);let o=qZ(Uo(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(nb)))),o}function z0(e){return e.replace(/left|right|bottom|top/g,t=>BZ[t])}function KZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function RM(e){return typeof e!="number"?KZ(e):{top:e,right:e,bottom:e,left:e}}function W0(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function G6(e,t,n){let{reference:r,floating:i}=e;const o=Ys(t),s=TS(t),a=kS(s),u=Uo(t),f=o==="y",h=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let y;switch(u){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:d};break;case"left":y={x:r.x-i.width,y:d};break;default:y={x:r.x,y:r.y}}switch(kc(t)){case"start":y[s]-=g*(n&&f?-1:1);break;case"end":y[s]+=g*(n&&f?-1:1);break}return y}const YZ=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:d}=G6(f,r,u),g=r,y={},b=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:u}=t,{element:f,padding:h=0}=Wo(e,t)||{};if(f==null)return{};const d=RM(h),g={x:n,y:r},y=TS(i),b=kS(y),x=await s.getDimensions(f),C=y==="y",_=C?"top":"left",w=C?"bottom":"right",k=C?"clientHeight":"clientWidth",E=o.reference[b]+o.reference[y]-g[y]-o.floating[b],R=g[y]-o.reference[y],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let $=A?A[k]:0;(!$||!await(s.isElement==null?void 0:s.isElement(A)))&&($=a.floating[k]||o.floating[b]);const I=E/2-R/2,F=$/2-x[b]/2-1,N=Zs(d[_],F),B=Zs(d[w],F),ee=N,Q=$-x[b]-B,U=$/2-x[b]/2+I,Y=tb(ee,U,Q),D=!u.arrow&&kc(i)!=null&&U!==Y&&o.reference[b]/2-(UU<=0)){var B,ee;const U=(((B=o.flip)==null?void 0:B.index)||0)+1,Y=$[U];if(Y)return{data:{index:U,overflows:N},reset:{placement:Y}};let D=(ee=N.filter(H=>H.overflows[0]<=0).sort((H,O)=>H.overflows[1]-O.overflows[1])[0])==null?void 0:ee.placement;if(!D)switch(y){case"bestFit":{var Q;const H=(Q=N.filter(O=>{if(A){const L=Ys(O.placement);return L===w||L==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(L=>L>0).reduce((L,V)=>L+V,0)]).sort((O,L)=>O[1]-L[1])[0])==null?void 0:Q[0];H&&(D=H);break}case"initialPlacement":D=a;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function q6(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Z6(e){return UZ.some(t=>e[t]>=0)}const JZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Wo(e,t);switch(r){case"referenceHidden":{const o=await Dd(t,{...i,elementContext:"reference"}),s=q6(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Z6(s)}}}case"escaped":{const o=await Dd(t,{...i,altBoundary:!0}),s=q6(o,n.floating);return{data:{escapedOffsets:s,escaped:Z6(s)}}}default:return{}}}}};async function eK(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Uo(n),a=kc(n),u=Ys(n)==="y",f=["left","top"].includes(s)?-1:1,h=o&&u?-1:1,d=Wo(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(y=a==="end"?b*-1:b),u?{x:y*h,y:g*f}:{x:g*f,y:y*h}}const tK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,u=await eK(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:s}}}}},nK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:C=>{let{x:_,y:w}=C;return{x:_,y:w}}},...u}=Wo(e,t),f={x:n,y:r},h=await Dd(t,u),d=Ys(Uo(i)),g=CS(d);let y=f[g],b=f[d];if(o){const C=g==="y"?"top":"left",_=g==="y"?"bottom":"right",w=y+h[C],k=y-h[_];y=tb(w,y,k)}if(s){const C=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=b+h[C],k=b-h[_];b=tb(w,b,k)}const x=a.fn({...t,[g]:y,[d]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:o,[d]:s}}}}}},rK=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=Wo(e,t),h={x:n,y:r},d=Ys(i),g=CS(d);let y=h[g],b=h[d];const x=Wo(a,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const k=g==="y"?"height":"width",E=o.reference[g]-o.floating[k]+C.mainAxis,R=o.reference[g]+o.reference[k]-C.mainAxis;yR&&(y=R)}if(f){var _,w;const k=g==="y"?"width":"height",E=["top","left"].includes(Uo(i)),R=o.reference[d]-o.floating[k]+(E&&((_=s.offset)==null?void 0:_[d])||0)+(E?0:C.crossAxis),A=o.reference[d]+o.reference[k]+(E?0:((w=s.offset)==null?void 0:w[d])||0)-(E?C.crossAxis:0);bA&&(b=A)}return{[g]:y,[d]:b}}}},iK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:u=()=>{},...f}=Wo(e,t),h=await Dd(t,f),d=Uo(i),g=kc(i),y=Ys(i)==="y",{width:b,height:x}=o.floating;let C,_;d==="top"||d==="bottom"?(C=d,_=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(_=d,C=g==="end"?"top":"bottom");const w=x-h.top-h.bottom,k=b-h.left-h.right,E=Zs(x-h[C],w),R=Zs(b-h[_],k),A=!t.middlewareData.shift;let $=E,I=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=w),A&&!g){const N=Sr(h.left,0),B=Sr(h.right,0),ee=Sr(h.top,0),Q=Sr(h.bottom,0);y?I=b-2*(N!==0||B!==0?N+B:Sr(h.left,h.right)):$=x-2*(ee!==0||Q!==0?ee+Q:Sr(h.top,h.bottom))}await u({...t,availableWidth:I,availableHeight:$});const F=await s.getDimensions(a.floating);return b!==F.width||x!==F.height?{reset:{rects:!0}}:{}}}};function rv(){return typeof window<"u"}function Tc(e){return MM(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uo(e){var t;return(t=(MM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function MM(e){return rv()?e instanceof Node||e instanceof Er(e).Node:!1}function $i(e){return rv()?e instanceof Element||e instanceof Er(e).Element:!1}function no(e){return rv()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function K6(e){return!rv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}function Eh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Li(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function oK(e){return["table","td","th"].includes(Tc(e))}function iv(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ES(e){const t=RS(),n=$i(e)?Li(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function sK(e){let t=Qs(e);for(;no(t)&&!nc(t);){if(ES(t))return t;if(iv(t))return null;t=Qs(t)}return null}function RS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nc(e){return["html","body","#document"].includes(Tc(e))}function Li(e){return Er(e).getComputedStyle(e)}function ov(e){return $i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qs(e){if(Tc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||K6(e)&&e.host||uo(e);return K6(t)?t.host:t}function PM(e){const t=Qs(e);return nc(t)?e.ownerDocument?e.ownerDocument.body:e.body:no(t)&&Eh(t)?t:PM(t)}function Fd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=PM(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Er(i);if(o){const a=rb(s);return t.concat(s,s.visualViewport||[],Eh(i)?i:[],a&&n?Fd(a):[])}return t.concat(i,Fd(i,[],n))}function rb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function OM(e){const t=Li(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=no(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=F0(n)!==o||F0(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function MS(e){return $i(e)?e:e.contextElement}function Iu(e){const t=MS(e);if(!no(t))return Ks(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=OM(t);let s=(o?F0(n.width):n.width)/r,a=(o?F0(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const aK=Ks(0);function AM(e){const t=Er(e);return!RS()||!t.visualViewport?aK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Er(e)?!1:t}function el(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=MS(e);let s=Ks(1);t&&(r?$i(r)&&(s=Iu(r)):s=Iu(e));const a=lK(o,n,r)?AM(o):Ks(0);let u=(i.left+a.x)/s.x,f=(i.top+a.y)/s.y,h=i.width/s.x,d=i.height/s.y;if(o){const g=Er(o),y=r&&$i(r)?Er(r):r;let b=g,x=rb(b);for(;x&&r&&y!==b;){const C=Iu(x),_=x.getBoundingClientRect(),w=Li(x),k=_.left+(x.clientLeft+parseFloat(w.paddingLeft))*C.x,E=_.top+(x.clientTop+parseFloat(w.paddingTop))*C.y;u*=C.x,f*=C.y,h*=C.x,d*=C.y,u+=k,f+=E,b=Er(x),x=rb(b)}}return W0({width:h,height:d,x:u,y:f})}function uK(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=uo(r),a=t?iv(t.floating):!1;if(r===s||a&&o)return n;let u={scrollLeft:0,scrollTop:0},f=Ks(1);const h=Ks(0),d=no(r);if((d||!d&&!o)&&((Tc(r)!=="body"||Eh(s))&&(u=ov(r)),no(r))){const g=el(r);f=Iu(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x,y:n.y*f.y-u.scrollTop*f.y+h.y}}function cK(e){return Array.from(e.getClientRects())}function ib(e,t){const n=ov(e).scrollLeft;return t?t.left+n:el(uo(e)).left+n}function fK(e){const t=uo(e),n=ov(e),r=e.ownerDocument.body,i=Sr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Sr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ib(e);const a=-n.scrollTop;return Li(r).direction==="rtl"&&(s+=Sr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function dK(e,t){const n=Er(e),r=uo(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;const f=RS();(!f||f&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a,y:u}}function hK(e,t){const n=el(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=no(e)?Iu(e):Ks(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,u=i*o.x,f=r*o.y;return{width:s,height:a,x:u,y:f}}function Y6(e,t,n){let r;if(t==="viewport")r=dK(e,n);else if(t==="document")r=fK(uo(e));else if($i(t))r=hK(t,n);else{const i=AM(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return W0(r)}function $M(e,t){const n=Qs(e);return n===t||!$i(n)||nc(n)?!1:Li(n).position==="fixed"||$M(n,t)}function pK(e,t){const n=t.get(e);if(n)return n;let r=Fd(e,[],!1).filter(a=>$i(a)&&Tc(a)!=="body"),i=null;const o=Li(e).position==="fixed";let s=o?Qs(e):e;for(;$i(s)&&!nc(s);){const a=Li(s),u=ES(s);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Eh(s)&&!u&&$M(e,s))?r=r.filter(h=>h!==s):i=a,s=Qs(s)}return t.set(e,r),r}function mK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?iv(t)?[]:pK(t,this._c):[].concat(n),r],a=s[0],u=s.reduce((f,h)=>{const d=Y6(t,h,i);return f.top=Sr(d.top,f.top),f.right=Zs(d.right,f.right),f.bottom=Zs(d.bottom,f.bottom),f.left=Sr(d.left,f.left),f},Y6(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function gK(e){const{width:t,height:n}=OM(e);return{width:t,height:n}}function vK(e,t,n){const r=no(t),i=uo(t),o=n==="fixed",s=el(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const u=Ks(0);if(r||!r&&!o)if((Tc(t)!=="body"||Eh(i))&&(a=ov(t)),r){const y=el(t,!0,o,t);u.x=y.x+t.clientLeft,u.y=y.y+t.clientTop}else i&&(u.x=ib(i));let f=0,h=0;if(i&&!r&&!o){const y=i.getBoundingClientRect();h=y.top+a.scrollTop,f=y.left+a.scrollLeft-ib(i,y)}const d=s.left+a.scrollLeft-u.x-f,g=s.top+a.scrollTop-u.y-h;return{x:d,y:g,width:s.width,height:s.height}}function K_(e){return Li(e).position==="static"}function Q6(e,t){if(!no(e)||Li(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return uo(e)===n&&(n=n.ownerDocument.body),n}function LM(e,t){const n=Er(e);if(iv(e))return n;if(!no(e)){let i=Qs(e);for(;i&&!nc(i);){if($i(i)&&!K_(i))return i;i=Qs(i)}return n}let r=Q6(e,t);for(;r&&oK(r)&&K_(r);)r=Q6(r,t);return r&&nc(r)&&K_(r)&&!ES(r)?n:r||sK(e)||n}const yK=async function(e){const t=this.getOffsetParent||LM,n=this.getDimensions,r=await n(e.floating);return{reference:vK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _K(e){return Li(e).direction==="rtl"}const xK={convertOffsetParentRelativeRectToViewportRelativeRect:uK,getDocumentElement:uo,getClippingRect:mK,getOffsetParent:LM,getElementRects:yK,getClientRects:cK,getDimensions:gK,getScale:Iu,isElement:$i,isRTL:_K};function bK(e,t){let n=null,r;const i=uo(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();const{left:f,top:h,width:d,height:g}=e.getBoundingClientRect();if(a||t(),!d||!g)return;const y=mm(h),b=mm(i.clientWidth-(f+d)),x=mm(i.clientHeight-(h+g)),C=mm(f),w={rootMargin:-y+"px "+-b+"px "+-x+"px "+-C+"px",threshold:Sr(0,Zs(1,u))||1};let k=!0;function E(R){const A=R[0].intersectionRatio;if(A!==u){if(!k)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),o}function wK(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=MS(e),h=i||o?[...f?Fd(f):[],...Fd(t)]:[];h.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const d=f&&a?bK(f,n):null;let g=-1,y=null;s&&(y=new ResizeObserver(_=>{let[w]=_;w&&w.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!u&&y.observe(f),y.observe(t));let b,x=u?el(e):null;u&&C();function C(){const _=el(e);x&&(_.x!==x.x||_.y!==x.y||_.width!==x.width||_.height!==x.height)&&n(),x=_,b=requestAnimationFrame(C)}return n(),()=>{var _;h.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(_=y)==null||_.disconnect(),y=null,u&&cancelAnimationFrame(b)}}const SK=tK,CK=nK,kK=XZ,TK=iK,EK=JZ,X6=QZ,RK=rK,MK=(e,t,n)=>{const r=new Map,i={platform:xK,...n},o={...i.platform,_c:r};return YZ(e,t,{...i,platform:o})};var t0=typeof document<"u"?v.useLayoutEffect:v.useEffect;function U0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!U0(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!U0(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function NM(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function J6(e,t){const n=NM(e);return Math.round(t*n)/n}function Y_(e){const t=v.useRef(e);return t0(()=>{t.current=e}),t}function PK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:u,open:f}=e,[h,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=v.useState(r);U0(g,r)||y(r);const[b,x]=v.useState(null),[C,_]=v.useState(null),w=v.useCallback(O=>{O!==A.current&&(A.current=O,x(O))},[]),k=v.useCallback(O=>{O!==$.current&&($.current=O,_(O))},[]),E=o||b,R=s||C,A=v.useRef(null),$=v.useRef(null),I=v.useRef(h),F=u!=null,N=Y_(u),B=Y_(i),ee=Y_(f),Q=v.useCallback(()=>{if(!A.current||!$.current)return;const O={placement:t,strategy:n,middleware:g};B.current&&(O.platform=B.current),MK(A.current,$.current,O).then(L=>{const V={...L,isPositioned:ee.current!==!1};U.current&&!U0(I.current,V)&&(I.current=V,pl.flushSync(()=>{d(V)}))})},[g,t,n,B,ee]);t0(()=>{f===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[f]);const U=v.useRef(!1);t0(()=>(U.current=!0,()=>{U.current=!1}),[]),t0(()=>{if(E&&(A.current=E),R&&($.current=R),E&&R){if(N.current)return N.current(E,R,Q);Q()}},[E,R,Q,N,F]);const Y=v.useMemo(()=>({reference:A,floating:$,setReference:w,setFloating:k}),[w,k]),D=v.useMemo(()=>({reference:E,floating:R}),[E,R]),H=v.useMemo(()=>{const O={position:n,left:0,top:0};if(!D.floating)return O;const L=J6(D.floating,h.x),V=J6(D.floating,h.y);return a?{...O,transform:"translate("+L+"px, "+V+"px)",...NM(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:V}},[n,a,D.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:Q,refs:Y,elements:D,floatingStyles:H}),[h,Q,Y,D,H])}const OK=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?X6({element:r.current,padding:i}).fn(n):{}:r?X6({element:r,padding:i}).fn(n):{}}}},AK=(e,t)=>({...SK(e),options:[e,t]}),$K=(e,t)=>({...CK(e),options:[e,t]}),LK=(e,t)=>({...RK(e),options:[e,t]}),NK=(e,t)=>({...kK(e),options:[e,t]}),IK=(e,t)=>({...TK(e),options:[e,t]}),jK=(e,t)=>({...EK(e),options:[e,t]}),DK=(e,t)=>({...OK(e),options:[e,t]});var FK="Arrow",IM=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return m.jsx(mt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});IM.displayName=FK;var zK=IM;function PS(e){const[t,n]=v.useState(void 0);return Ja(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const u=o.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,a=f.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var OS="Popper",[jM,Ec]=ai(OS),[WK,DM]=jM(OS),FM=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return m.jsx(WK,{scope:t,anchor:r,onAnchorChange:i,children:n})};FM.displayName=OS;var zM="PopperAnchor",WM=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=DM(zM,n),s=v.useRef(null),a=jt(t,s);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:m.jsx(mt.div,{...i,ref:a})});WM.displayName=zM;var AS="PopperContent",[UK,BK]=jM(AS),UM=v.forwardRef((e,t)=>{var Me,$e,ne,ye,ke,oe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:b,...x}=e,C=DM(AS,n),[_,w]=v.useState(null),k=jt(t,We=>w(We)),[E,R]=v.useState(null),A=PS(E),$=(A==null?void 0:A.width)??0,I=(A==null?void 0:A.height)??0,F=r+(o!=="center"?"-"+o:""),N=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},B=Array.isArray(f)?f:[f],ee=B.length>0,Q={padding:N,boundary:B.filter(HK),altBoundary:ee},{refs:U,floatingStyles:Y,placement:D,isPositioned:H,middlewareData:O}=PK({strategy:"fixed",placement:F,whileElementsMounted:(...We)=>wK(...We,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[AK({mainAxis:i+I,alignmentAxis:s}),u&&$K({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?LK():void 0,...Q}),u&&NK({...Q}),IK({...Q,apply:({elements:We,rects:_e,availableWidth:Ie,availableHeight:kt})=>{const{width:gt,height:gn}=_e.reference,vn=We.floating.style;vn.setProperty("--radix-popper-available-width",`${Ie}px`),vn.setProperty("--radix-popper-available-height",`${kt}px`),vn.setProperty("--radix-popper-anchor-width",`${gt}px`),vn.setProperty("--radix-popper-anchor-height",`${gn}px`)}}),E&&DK({element:E,padding:a}),GK({arrowWidth:$,arrowHeight:I}),g&&jK({strategy:"referenceHidden",...Q})]}),[L,V]=HM(D),K=Ai(b);Ja(()=>{H&&(K==null||K())},[H,K]);const Z=(Me=O.arrow)==null?void 0:Me.x,de=($e=O.arrow)==null?void 0:$e.y,Ee=((ne=O.arrow)==null?void 0:ne.centerOffset)!==0,[ve,we]=v.useState();return Ja(()=>{_&&we(window.getComputedStyle(_).zIndex)},[_]),m.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(ye=O.transformOrigin)==null?void 0:ye.x,(ke=O.transformOrigin)==null?void 0:ke.y].join(" "),...((oe=O.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(UK,{scope:n,placedSide:L,onArrowChange:R,arrowX:Z,arrowY:de,shouldHideArrow:Ee,children:m.jsx(mt.div,{"data-side":L,"data-align":V,...x,ref:k,style:{...x.style,animation:H?void 0:"none"}})})})});UM.displayName=AS;var BM="PopperArrow",VK={top:"bottom",right:"left",bottom:"top",left:"right"},VM=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=BK(BM,r),s=VK[o.placedSide];return m.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:m.jsx(zK,{...i,ref:n,style:{...i.style,display:"block"}})})});VM.displayName=BM;function HK(e){return e!==null}var GK=e=>({name:"transformOrigin",options:e,fn(t){var C,_,w;const{placement:n,rects:r,middlewareData:i}=t,s=((C=i.arrow)==null?void 0:C.centerOffset)!==0,a=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[f,h]=HM(n),d={start:"0%",center:"50%",end:"100%"}[h],g=(((_=i.arrow)==null?void 0:_.x)??0)+a/2,y=(((w=i.arrow)==null?void 0:w.y)??0)+u/2;let b="",x="";return f==="bottom"?(b=s?d:`${g}px`,x=`${-u}px`):f==="top"?(b=s?d:`${g}px`,x=`${r.floating.height+u}px`):f==="right"?(b=`${-u}px`,x=s?d:`${y}px`):f==="left"&&(b=`${r.floating.width+u}px`,x=s?d:`${y}px`),{data:{x:b,y:x}}}});function HM(e){const[t,n="center"]=e.split("-");return[t,n]}var $S=FM,sv=WM,LS=UM,NS=VM,[av,W8e]=ai("Tooltip",[Ec]),lv=Ec(),GM="TooltipProvider",qK=700,ob="tooltip.open",[ZK,IS]=av(GM),qM=e=>{const{__scopeTooltip:t,delayDuration:n=qK,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[s,a]=v.useState(!0),u=v.useRef(!1),f=v.useRef(0);return v.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),m.jsx(ZK,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(f.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(h=>{u.current=h},[]),disableHoverableContent:i,children:o})};qM.displayName=GM;var uv="Tooltip",[KK,Rh]=av(uv),ZM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,u=IS(uv,e.__scopeTooltip),f=lv(t),[h,d]=v.useState(null),g=jd(),y=v.useRef(0),b=s??u.disableHoverableContent,x=a??u.delayDuration,C=v.useRef(!1),[_=!1,w]=Ko({prop:r,defaultProp:i,onChange:$=>{$?(u.onOpen(),document.dispatchEvent(new CustomEvent(ob))):u.onClose(),o==null||o($)}}),k=v.useMemo(()=>_?C.current?"delayed-open":"instant-open":"closed",[_]),E=v.useCallback(()=>{window.clearTimeout(y.current),C.current=!1,w(!0)},[w]),R=v.useCallback(()=>{window.clearTimeout(y.current),w(!1)},[w]),A=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,w(!0)},x)},[x,w]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),m.jsx($S,{...f,children:m.jsx(KK,{scope:t,contentId:g,open:_,stateAttribute:k,trigger:h,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayed?A():E()},[u.isOpenDelayed,A,E]),onTriggerLeave:v.useCallback(()=>{b?R():window.clearTimeout(y.current)},[R,b]),onOpen:E,onClose:R,disableHoverableContent:b,children:n})})};ZM.displayName=uv;var sb="TooltipTrigger",KM=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Rh(sb,n),o=IS(sb,n),s=lv(n),a=v.useRef(null),u=jt(t,a,i.onTriggerChange),f=v.useRef(!1),h=v.useRef(!1),d=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(sv,{asChild:!0,...s,children:m.jsx(mt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Oe(e.onPointerMove,g=>{g.pointerType!=="touch"&&!h.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:Oe(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:Oe(e.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Oe(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Oe(e.onBlur,i.onClose),onClick:Oe(e.onClick,i.onClose)})})});KM.displayName=sb;var jS="TooltipPortal",[YK,QK]=av(jS,{forceMount:void 0}),YM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Rh(jS,t);return m.jsx(YK,{scope:t,forceMount:n,children:m.jsx(ao,{present:n||o.open,children:m.jsx(ev,{asChild:!0,container:i,children:r})})})};YM.displayName=jS;var rc="TooltipContent",QM=v.forwardRef((e,t)=>{const n=QK(rc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=Rh(rc,e.__scopeTooltip);return m.jsx(ao,{present:r||s.open,children:s.disableHoverableContent?m.jsx(XM,{side:i,...o,ref:t}):m.jsx(XK,{side:i,...o,ref:t})})}),XK=v.forwardRef((e,t)=>{const n=Rh(rc,e.__scopeTooltip),r=IS(rc,e.__scopeTooltip),i=v.useRef(null),o=jt(t,i),[s,a]=v.useState(null),{trigger:u,onClose:f}=n,h=i.current,{onPointerInTransitChange:d}=r,g=v.useCallback(()=>{a(null),d(!1)},[d]),y=v.useCallback((b,x)=>{const C=b.currentTarget,_={x:b.clientX,y:b.clientY},w=tY(_,C.getBoundingClientRect()),k=nY(_,w),E=rY(x.getBoundingClientRect()),R=oY([...k,...E]);a(R),d(!0)},[d]);return v.useEffect(()=>()=>g(),[g]),v.useEffect(()=>{if(u&&h){const b=C=>y(C,h),x=C=>y(C,u);return u.addEventListener("pointerleave",b),h.addEventListener("pointerleave",x),()=>{u.removeEventListener("pointerleave",b),h.removeEventListener("pointerleave",x)}}},[u,h,y,g]),v.useEffect(()=>{if(s){const b=x=>{const C=x.target,_={x:x.clientX,y:x.clientY},w=(u==null?void 0:u.contains(C))||(h==null?void 0:h.contains(C)),k=!iY(_,s);w?g():k&&(g(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,h,s,f,g]),m.jsx(XM,{...e,ref:o})}),[JK,eY]=av(uv,{isInside:!1}),XM=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,u=Rh(rc,n),f=lv(n),{onClose:h}=u;return v.useEffect(()=>(document.addEventListener(ob,h),()=>document.removeEventListener(ob,h)),[h]),v.useEffect(()=>{if(u.trigger){const d=g=>{const y=g.target;y!=null&&y.contains(u.trigger)&&h()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,h]),m.jsx(Jg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:h,children:m.jsxs(LS,{"data-state":u.stateAttribute,...f,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(cM,{children:r}),m.jsx(JK,{scope:n,isInside:!0,children:m.jsx(gq,{id:u.contentId,role:"tooltip",children:i||r})})]})})});QM.displayName=rc;var JM="TooltipArrow",eP=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=lv(n);return eY(JM,n).isInside?null:m.jsx(NS,{...i,...r,ref:t})});eP.displayName=JM;function tY(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function nY(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function rY(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function iY(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;or!=h>r&&n<(f-a)*(r-u)/(h-u)+a&&(i=!i)}return i}function oY(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),sY(t)}function sY(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aY=qM,lY=ZM,uY=KM,cY=YM,fY=QM,dY=eP,tP=v.createContext(void 0),hY=e=>{const{dir:t,children:n}=e;return m.jsx(tP.Provider,{value:t,children:n})};function Mh(e){const t=v.useContext(tP);return e||t||"ltr"}function pY(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}const nP=["none","small","medium","large","full"],DS={radius:{type:"enum",values:nP,default:void 0}},mY=["inherit","light","dark"],gY=["solid","translucent"],vY=["90%","95%","100%","105%","110%"],br={...lo,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:mY,default:"inherit"},accentColor:{type:"enum",values:wS,default:"indigo"},grayColor:{type:"enum",values:kZ,default:"auto"},panelBackground:{type:"enum",values:gY,default:"translucent"},radius:{type:"enum",values:nP,default:"medium"},scaling:{type:"enum",values:vY,default:"100%"}},Ql=()=>{},ab=v.createContext(void 0),cv=v.forwardRef((e,t)=>v.useContext(ab)===void 0?v.createElement(aY,{delayDuration:200},v.createElement(hY,{dir:"ltr"},v.createElement(rP,{...e,ref:t}))):v.createElement(FS,{...e,ref:t}));cv.displayName="Theme";const rP=v.forwardRef((e,t)=>{const{appearance:n=br.appearance.default,accentColor:r=br.accentColor.default,grayColor:i=br.grayColor.default,panelBackground:o=br.panelBackground.default,radius:s=br.radius.default,scaling:a=br.scaling.default,hasBackground:u=br.hasBackground.default,...f}=e,[h,d]=v.useState(n);v.useEffect(()=>d(n),[n]);const[g,y]=v.useState(r);v.useEffect(()=>y(r),[r]);const[b,x]=v.useState(i);v.useEffect(()=>x(i),[i]);const[C,_]=v.useState(o);v.useEffect(()=>_(o),[o]);const[w,k]=v.useState(s);v.useEffect(()=>k(s),[s]);const[E,R]=v.useState(a);return v.useEffect(()=>R(a),[a]),v.createElement(FS,{...f,ref:t,isRoot:!0,hasBackground:u,appearance:h,accentColor:g,grayColor:b,panelBackground:C,radius:w,scaling:E,onAppearanceChange:d,onAccentColorChange:y,onGrayColorChange:x,onPanelBackgroundChange:_,onRadiusChange:k,onScalingChange:R})});rP.displayName="ThemeRoot";const FS=v.forwardRef((e,t)=>{const n=v.useContext(ab),{asChild:r,isRoot:i,hasBackground:o,appearance:s=(n==null?void 0:n.appearance)??br.appearance.default,accentColor:a=(n==null?void 0:n.accentColor)??br.accentColor.default,grayColor:u=(n==null?void 0:n.resolvedGrayColor)??br.grayColor.default,panelBackground:f=(n==null?void 0:n.panelBackground)??br.panelBackground.default,radius:h=(n==null?void 0:n.radius)??br.radius.default,scaling:d=(n==null?void 0:n.scaling)??br.scaling.default,onAppearanceChange:g=Ql,onAccentColorChange:y=Ql,onGrayColorChange:b=Ql,onPanelBackgroundChange:x=Ql,onRadiusChange:C=Ql,onScalingChange:_=Ql,...w}=e,k=r?Hn:"div",E=u==="auto"?pY(a):u,R=e.appearance==="light"||e.appearance==="dark",A=o===void 0?i||R:o;return v.createElement(ab.Provider,{value:v.useMemo(()=>({appearance:s,accentColor:a,grayColor:u,resolvedGrayColor:E,panelBackground:f,radius:h,scaling:d,onAppearanceChange:g,onAccentColorChange:y,onGrayColorChange:b,onPanelBackgroundChange:x,onRadiusChange:C,onScalingChange:_}),[s,a,u,E,f,h,d,g,y,b,x,C,_])},v.createElement(k,{"data-is-root-theme":i?"true":"false","data-accent-color":a,"data-gray-color":E,"data-has-background":A?"true":"false","data-panel-background":f,"data-radius":h,"data-scaling":d,ref:t,...w,className:zt("radix-themes",{light:s==="light",dark:s==="dark"},w.className)}))});FS.displayName="ThemeImpl";const zS=e=>{if(!v.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${v.Children.toArray(e).map(t=>typeof t=="object"&&"type"in t&&typeof t.type=="string"?t.type:typeof t).join(", ")}`);return e};function yY(e,t){const{asChild:n,children:r}=e;if(!n)return typeof t=="function"?t(r):t;const i=v.Children.only(r);return v.cloneElement(i,{children:typeof t=="function"?t(i.props.children):t})}const _Y=["div","span"],xY=["none","inline","inline-block","block"],bY={as:{type:"enum",values:_Y,default:"div"},...lo,display:{type:"enum",className:"rt-r-display",values:xY,responsive:!0}},ba=["0","1","2","3","4","5","6","7","8","9"],n0={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:ba,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:ba,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:ba,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:ba,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:ba,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:ba,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:ba,responsive:!0}},Q_=["visible","hidden","clip","scroll","auto"],wY=["static","relative","absolute","fixed","sticky"],Ef=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],SY=["0","1"],CY=["0","1"],fv={...n0,...Ws,...bS,position:{type:"enum",className:"rt-r-position",values:wY,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:Ef,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:Ef,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:Ef,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:Ef,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:Ef,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:Q_,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:Q_,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:Q_,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:SY,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:CY,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0}},cn=v.forwardRef((e,t)=>{const{className:n,asChild:r,as:i="div",...o}=Gn(e,bY,fv,Fi);return v.createElement(r?Hn:i,{...o,ref:t,className:zt("rt-Box",n)})});cn.displayName="Box";const kY=["1","2","3","4"],TY=["classic","solid","soft","surface","outline","ghost"],e8={...lo,size:{type:"enum",className:"rt-r-size",values:kY,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:TY,default:"solid"},...TZ,...nv,...DS,loading:{type:"boolean",className:"rt-loading",default:!1}},X_=["0","1","2","3","4","5","6","7","8","9"],iP={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:X_,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:X_,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:X_,responsive:!0}},EY=["div","span"],RY=["none","inline-flex","flex"],MY=["row","column","row-reverse","column-reverse"],PY=["start","center","end","baseline","stretch"],OY=["start","center","end","between"],AY=["nowrap","wrap","wrap-reverse"],oP={as:{type:"enum",values:EY,default:"div"},...lo,display:{type:"enum",className:"rt-r-display",values:RY,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:MY,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:PY,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:OY,parseValue:$Y,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:AY,responsive:!0},...iP};function $Y(e){return e==="between"?"space-between":e}const me=v.forwardRef((e,t)=>{const{className:n,asChild:r,as:i="div",...o}=Gn(e,oP,fv,Fi);return v.createElement(r?Hn:i,{...o,ref:t,className:zt("rt-Flex",n)})});me.displayName="Flex";const LY=["1","2","3"],NY={size:{type:"enum",className:"rt-r-size",values:LY,default:"2",responsive:!0},loading:{type:"boolean",default:!0}},dv=v.forwardRef((e,t)=>{const{className:n,children:r,loading:i,...o}=Gn(e,NY,Fi);if(!i)return r;const s=v.createElement("span",{...o,ref:t,className:zt("rt-Spinner",n)},v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}));return r===void 0?s:v.createElement(me,{asChild:!0,position:"relative",align:"center",justify:"center"},v.createElement("span",null,v.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},r),v.createElement(me,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,s))))});dv.displayName="Spinner";function IY(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r)]))}function jY(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}const WS=v.forwardRef((e,t)=>{const{size:n=e8.size.default}=e,{className:r,children:i,asChild:o,color:s,radius:a,disabled:u=e.loading,...f}=Gn(e,e8,Fi);return v.createElement(o?Hn:"button",{"data-disabled":u||void 0,"data-accent-color":s,"data-radius":a,...f,ref:t,className:zt("rt-reset","rt-BaseButton",r),disabled:u},e.loading?v.createElement(v.Fragment,null,v.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},i),v.createElement(yS,null,i),v.createElement(me,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,v.createElement(dv,{size:IY(n,jY)})))):i)});WS.displayName="BaseButton";const oi=v.forwardRef(({className:e,...t},n)=>v.createElement(WS,{...t,ref:n,className:zt("rt-Button",e)}));oi.displayName="Button";const DY=["1","2","3","4","5"],FY=["surface","classic","ghost"],zY={...lo,size:{type:"enum",className:"rt-r-size",values:DY,default:"1",responsive:!0},variant:{type:"enum",className:"rt-variant",values:FY,default:"surface"}},sP=v.forwardRef((e,t)=>{const{asChild:n,className:r,...i}=Gn(e,zY,Fi);return v.createElement(n?Hn:"div",{ref:t,...i,className:zt("rt-reset","rt-BaseCard","rt-Card",r)})});sP.displayName="Card";function aP(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function US(e){const t=e+"CollectionProvider",[n,r]=ai(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:b,children:x}=y,C=nn.useRef(null),_=nn.useRef(new Map).current;return m.jsx(i,{scope:b,itemMap:_,collectionRef:C,children:x})};s.displayName=t;const a=e+"CollectionSlot",u=nn.forwardRef((y,b)=>{const{scope:x,children:C}=y,_=o(a,x),w=jt(b,_.collectionRef);return m.jsx(Hn,{ref:w,children:C})});u.displayName=a;const f=e+"CollectionItemSlot",h="data-radix-collection-item",d=nn.forwardRef((y,b)=>{const{scope:x,children:C,..._}=y,w=nn.useRef(null),k=jt(b,w),E=o(f,x);return nn.useEffect(()=>(E.itemMap.set(w,{ref:w,..._}),()=>void E.itemMap.delete(w))),m.jsx(Hn,{[h]:"",ref:k,children:C})});d.displayName=f;function g(y){const b=o(e+"CollectionConsumer",y);return nn.useCallback(()=>{const C=b.collectionRef.current;if(!C)return[];const _=Array.from(C.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((E,R)=>_.indexOf(E.ref.current)-_.indexOf(R.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:d},g,r]}var J_="rovingFocusGroup.onEntryFocus",WY={bubbles:!1,cancelable:!0},hv="RovingFocusGroup",[lb,lP,UY]=US(hv),[BY,Rc]=ai(hv,[UY]),[VY,HY]=BY(hv),uP=v.forwardRef((e,t)=>m.jsx(lb.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(lb.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(GY,{...e,ref:t})})}));uP.displayName=hv;var GY=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...d}=e,g=v.useRef(null),y=jt(t,g),b=Mh(o),[x=null,C]=Ko({prop:s,defaultProp:a,onChange:u}),[_,w]=v.useState(!1),k=Ai(f),E=lP(n),R=v.useRef(!1),[A,$]=v.useState(0);return v.useEffect(()=>{const I=g.current;if(I)return I.addEventListener(J_,k),()=>I.removeEventListener(J_,k)},[k]),m.jsx(VY,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:x,onItemFocus:v.useCallback(I=>C(I),[C]),onItemShiftTab:v.useCallback(()=>w(!0),[]),onFocusableItemAdd:v.useCallback(()=>$(I=>I+1),[]),onFocusableItemRemove:v.useCallback(()=>$(I=>I-1),[]),children:m.jsx(mt.div,{tabIndex:_||A===0?-1:0,"data-orientation":r,...d,ref:y,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{R.current=!0}),onFocus:Oe(e.onFocus,I=>{const F=!R.current;if(I.target===I.currentTarget&&F&&!_){const N=new CustomEvent(J_,WY);if(I.currentTarget.dispatchEvent(N),!N.defaultPrevented){const B=E().filter(D=>D.focusable),ee=B.find(D=>D.active),Q=B.find(D=>D.id===x),Y=[ee,Q,...B].filter(Boolean).map(D=>D.ref.current);dP(Y,h)}}R.current=!1}),onBlur:Oe(e.onBlur,()=>w(!1))})})}),cP="RovingFocusGroupItem",fP=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=jd(),u=o||a,f=HY(cP,n),h=f.currentTabStopId===u,d=lP(n),{onFocusableItemAdd:g,onFocusableItemRemove:y}=f;return v.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),m.jsx(lb.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:m.jsx(mt.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Oe(e.onMouseDown,b=>{r?f.onItemFocus(u):b.preventDefault()}),onFocus:Oe(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Oe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=KY(b,f.orientation,f.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let _=d().filter(w=>w.focusable).map(w=>w.ref.current);if(x==="last")_.reverse();else if(x==="prev"||x==="next"){x==="prev"&&_.reverse();const w=_.indexOf(b.currentTarget);_=f.loop?YY(_,w+1):_.slice(w+1)}setTimeout(()=>dP(_))}})})})});fP.displayName=cP;var qY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function KY(e,t,n){const r=ZY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return qY[r]}function dP(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function YY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BS=uP,VS=fP;const QY=["div","span"],XY=["none","inline-grid","grid"],JY=["1","2","3","4","5","6","7","8","9"],eQ=["1","2","3","4","5","6","7","8","9"],tQ=["row","column","dense","row-dense","column-dense"],nQ=["start","center","end","baseline","stretch"],rQ=["start","center","end","between"],B0={as:{type:"enum",values:QY,default:"div"},...lo,display:{type:"enum",className:"rt-r-display",values:XY,responsive:!0},areas:{type:"string",className:"rt-r-gta",customProperties:["--grid-template-areas"],responsive:!0},columns:{type:"enum | string",className:"rt-r-gtc",customProperties:["--grid-template-columns"],values:JY,parseValue:t8,responsive:!0},rows:{type:"enum | string",className:"rt-r-gtr",customProperties:["--grid-template-rows"],values:eQ,parseValue:t8,responsive:!0},flow:{type:"enum",className:"rt-r-gaf",values:tQ,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:nQ,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:rQ,parseValue:iQ,responsive:!0},...iP};function t8(e){return B0.columns.values.includes(e)?e:e!=null&&e.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function iQ(e){return e==="between"?"space-between":e}const HS=v.forwardRef((e,t)=>{const{className:n,asChild:r,as:i="div",...o}=Gn(e,B0,fv,Fi);return v.createElement(r?Hn:i,{...o,ref:t,className:zt("rt-Grid",n)})});HS.displayName="Grid";const oQ=["1","2","3","4"],sQ=["none","initial"],aQ=["left","center","right"],lQ={...lo,size:{type:"enum",className:"rt-r-size",values:oQ,default:"4",responsive:!0},display:{type:"enum",className:"rt-r-display",values:sQ,parseValue:uQ,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:aQ,parseValue:cQ,responsive:!0}};function uQ(e){return e==="initial"?"flex":e}function cQ(e){return e==="left"?"start":e==="right"?"end":e}const GS=v.forwardRef(({width:e,minWidth:t,maxWidth:n,height:r,minHeight:i,maxHeight:o,...s},a)=>{const{asChild:u,children:f,className:h,...d}=Gn(s,lQ,fv,Fi),{className:g,style:y}=Gn({width:e,minWidth:t,maxWidth:n,height:r,minHeight:i,maxHeight:o},Ws,bS);return v.createElement(u?Hn:"div",{...d,ref:a,className:zt("rt-Container",h)},yY({asChild:u,children:f},b=>v.createElement("div",{className:zt("rt-ContainerInner",g),style:y},b)))});GS.displayName="Container";var ub=["Enter"," "],fQ=["ArrowDown","PageUp","Home"],hP=["ArrowUp","PageDown","End"],dQ=[...fQ,...hP],hQ={ltr:[...ub,"ArrowRight"],rtl:[...ub,"ArrowLeft"]},pQ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ph="Menu",[zd,mQ,gQ]=US(Ph),[ml,pP]=ai(Ph,[gQ,Ec,Rc]),pv=Ec(),mP=Rc(),[vQ,gl]=ml(Ph),[yQ,Oh]=ml(Ph),gP=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,a=pv(t),[u,f]=v.useState(null),h=v.useRef(!1),d=Ai(o),g=Mh(i);return v.useEffect(()=>{const y=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),m.jsx($S,{...a,children:m.jsx(vQ,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:f,children:m.jsx(yQ,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:h,dir:g,modal:s,children:r})})})};gP.displayName=Ph;var _Q="MenuAnchor",qS=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=pv(n);return m.jsx(sv,{...i,...r,ref:t})});qS.displayName=_Q;var ZS="MenuPortal",[xQ,vP]=ml(ZS,{forceMount:void 0}),yP=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=gl(ZS,t);return m.jsx(xQ,{scope:t,forceMount:n,children:m.jsx(ao,{present:n||o.open,children:m.jsx(ev,{asChild:!0,container:i,children:r})})})};yP.displayName=ZS;var ti="MenuContent",[bQ,KS]=ml(ti),_P=v.forwardRef((e,t)=>{const n=vP(ti,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=gl(ti,e.__scopeMenu),s=Oh(ti,e.__scopeMenu);return m.jsx(zd.Provider,{scope:e.__scopeMenu,children:m.jsx(ao,{present:r||o.open,children:m.jsx(zd.Slot,{scope:e.__scopeMenu,children:s.modal?m.jsx(wQ,{...i,ref:t}):m.jsx(SQ,{...i,ref:t})})})})}),wQ=v.forwardRef((e,t)=>{const n=gl(ti,e.__scopeMenu),r=v.useRef(null),i=jt(t,r);return v.useEffect(()=>{const o=r.current;if(o)return kM(o)},[]),m.jsx(YS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),SQ=v.forwardRef((e,t)=>{const n=gl(ti,e.__scopeMenu);return m.jsx(YS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),YS=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,onDismiss:y,disableOutsideScroll:b,...x}=e,C=gl(ti,n),_=Oh(ti,n),w=pv(n),k=mP(n),E=mQ(n),[R,A]=v.useState(null),$=v.useRef(null),I=jt(t,$,C.onContentChange),F=v.useRef(0),N=v.useRef(""),B=v.useRef(0),ee=v.useRef(null),Q=v.useRef("right"),U=v.useRef(0),Y=b?xS:v.Fragment,D=b?{as:Hn,allowPinchZoom:!0}:void 0,H=L=>{var Me,$e;const V=N.current+L,K=E().filter(ne=>!ne.disabled),Z=document.activeElement,de=(Me=K.find(ne=>ne.ref.current===Z))==null?void 0:Me.textValue,Ee=K.map(ne=>ne.textValue),ve=NQ(Ee,V,de),we=($e=K.find(ne=>ne.textValue===ve))==null?void 0:$e.ref.current;(function ne(ye){N.current=ye,window.clearTimeout(F.current),ye!==""&&(F.current=window.setTimeout(()=>ne(""),1e3))})(V),we&&setTimeout(()=>we.focus())};v.useEffect(()=>()=>window.clearTimeout(F.current),[]),gM();const O=v.useCallback(L=>{var K,Z;return Q.current===((K=ee.current)==null?void 0:K.side)&&jQ(L,(Z=ee.current)==null?void 0:Z.area)},[]);return m.jsx(bQ,{scope:n,searchRef:N,onItemEnter:v.useCallback(L=>{O(L)&&L.preventDefault()},[O]),onItemLeave:v.useCallback(L=>{var V;O(L)||((V=$.current)==null||V.focus(),A(null))},[O]),onTriggerLeave:v.useCallback(L=>{O(L)&&L.preventDefault()},[O]),pointerGraceTimerRef:B,onPointerGraceIntentChange:v.useCallback(L=>{ee.current=L},[]),children:m.jsx(Y,{...D,children:m.jsx(_S,{asChild:!0,trapped:i,onMountAutoFocus:Oe(o,L=>{var V;L.preventDefault(),(V=$.current)==null||V.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:m.jsx(Jg,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,onDismiss:y,children:m.jsx(BS,{asChild:!0,...k,dir:_.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:A,onEntryFocus:Oe(u,L=>{_.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(LS,{role:"menu","aria-orientation":"vertical","data-state":NP(C.open),"data-radix-menu-content":"",dir:_.dir,...w,...x,ref:I,style:{outline:"none",...x.style},onKeyDown:Oe(x.onKeyDown,L=>{const K=L.target.closest("[data-radix-menu-content]")===L.currentTarget,Z=L.ctrlKey||L.altKey||L.metaKey,de=L.key.length===1;K&&(L.key==="Tab"&&L.preventDefault(),!Z&&de&&H(L.key));const Ee=$.current;if(L.target!==Ee||!dQ.includes(L.key))return;L.preventDefault();const we=E().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);hP.includes(L.key)&&we.reverse(),$Q(we)}),onBlur:Oe(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(F.current),N.current="")}),onPointerMove:Oe(e.onPointerMove,Wd(L=>{const V=L.target,K=U.current!==L.clientX;if(L.currentTarget.contains(V)&&K){const Z=L.clientX>U.current?"right":"left";Q.current=Z,U.current=L.clientX}}))})})})})})})});_P.displayName=ti;var CQ="MenuGroup",QS=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(mt.div,{role:"group",...r,ref:t})});QS.displayName=CQ;var kQ="MenuLabel",xP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(mt.div,{...r,ref:t})});xP.displayName=kQ;var V0="MenuItem",n8="menu.itemSelect",mv=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=v.useRef(null),s=Oh(V0,e.__scopeMenu),a=KS(V0,e.__scopeMenu),u=jt(t,o),f=v.useRef(!1),h=()=>{const d=o.current;if(!n&&d){const g=new CustomEvent(n8,{bubbles:!0,cancelable:!0});d.addEventListener(n8,y=>r==null?void 0:r(y),{once:!0}),fM(d,g),g.defaultPrevented?f.current=!1:s.onClose()}};return m.jsx(bP,{...i,ref:u,disabled:n,onClick:Oe(e.onClick,h),onPointerDown:d=>{var g;(g=e.onPointerDown)==null||g.call(e,d),f.current=!0},onPointerUp:Oe(e.onPointerUp,d=>{var g;f.current||(g=d.currentTarget)==null||g.click()}),onKeyDown:Oe(e.onKeyDown,d=>{const g=a.searchRef.current!=="";n||g&&d.key===" "||ub.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});mv.displayName=V0;var bP=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=KS(V0,n),a=mP(n),u=v.useRef(null),f=jt(t,u),[h,d]=v.useState(!1),[g,y]=v.useState("");return v.useEffect(()=>{const b=u.current;b&&y((b.textContent??"").trim())},[o.children]),m.jsx(zd.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:m.jsx(VS,{asChild:!0,...a,focusable:!r,children:m.jsx(mt.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:Oe(e.onPointerMove,Wd(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(e.onPointerLeave,Wd(b=>s.onItemLeave(b))),onFocus:Oe(e.onFocus,()=>d(!0)),onBlur:Oe(e.onBlur,()=>d(!1))})})})}),TQ="MenuCheckboxItem",wP=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return m.jsx(EP,{scope:e.__scopeMenu,checked:n,children:m.jsx(mv,{role:"menuitemcheckbox","aria-checked":H0(n)?"mixed":n,...i,ref:t,"data-state":JS(n),onSelect:Oe(i.onSelect,()=>r==null?void 0:r(H0(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wP.displayName=TQ;var SP="MenuRadioGroup",[EQ,RQ]=ml(SP,{value:void 0,onValueChange:()=>{}}),CP=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Ai(r);return m.jsx(EQ,{scope:e.__scopeMenu,value:n,onValueChange:o,children:m.jsx(QS,{...i,ref:t})})});CP.displayName=SP;var kP="MenuRadioItem",TP=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=RQ(kP,e.__scopeMenu),o=n===i.value;return m.jsx(EP,{scope:e.__scopeMenu,checked:o,children:m.jsx(mv,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":JS(o),onSelect:Oe(r.onSelect,()=>{var s;return(s=i.onValueChange)==null?void 0:s.call(i,n)},{checkForDefaultPrevented:!1})})})});TP.displayName=kP;var XS="MenuItemIndicator",[EP,MQ]=ml(XS,{checked:!1}),RP=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=MQ(XS,n);return m.jsx(ao,{present:r||H0(o.checked)||o.checked===!0,children:m.jsx(mt.span,{...i,ref:t,"data-state":JS(o.checked)})})});RP.displayName=XS;var PQ="MenuSeparator",MP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(mt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});MP.displayName=PQ;var OQ="MenuArrow",PP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=pv(n);return m.jsx(NS,{...i,...r,ref:t})});PP.displayName=OQ;var AQ="MenuSub",[U8e,OP]=ml(AQ),Hf="MenuSubTrigger",AP=v.forwardRef((e,t)=>{const n=gl(Hf,e.__scopeMenu),r=Oh(Hf,e.__scopeMenu),i=OP(Hf,e.__scopeMenu),o=KS(Hf,e.__scopeMenu),s=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=o,f={__scopeMenu:e.__scopeMenu},h=v.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return v.useEffect(()=>h,[h]),v.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),u(null)}},[a,u]),m.jsx(qS,{asChild:!0,...f,children:m.jsx(bP,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":NP(n.open),...e,ref:kh(t,i.onTriggerChange),onClick:d=>{var g;(g=e.onClick)==null||g.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,Wd(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:Oe(e.onPointerLeave,Wd(d=>{var y,b;h();const g=(y=n.content)==null?void 0:y.getBoundingClientRect();if(g){const x=(b=n.content)==null?void 0:b.dataset.side,C=x==="right",_=C?-5:5,w=g[C?"left":"right"],k=g[C?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+_,y:d.clientY},{x:w,y:g.top},{x:k,y:g.top},{x:k,y:g.bottom},{x:w,y:g.bottom}],side:x}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,d=>{var y;const g=o.searchRef.current!=="";e.disabled||g&&d.key===" "||hQ[r.dir].includes(d.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),d.preventDefault())})})})});AP.displayName=Hf;var $P="MenuSubContent",LP=v.forwardRef((e,t)=>{const n=vP(ti,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=gl(ti,e.__scopeMenu),s=Oh(ti,e.__scopeMenu),a=OP($P,e.__scopeMenu),u=v.useRef(null),f=jt(t,u);return m.jsx(zd.Provider,{scope:e.__scopeMenu,children:m.jsx(ao,{present:r||o.open,children:m.jsx(zd.Slot,{scope:e.__scopeMenu,children:m.jsx(YS,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:f,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var d;s.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,h=>{h.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,h=>{s.onClose(),h.preventDefault()}),onKeyDown:Oe(e.onKeyDown,h=>{var y;const d=h.currentTarget.contains(h.target),g=pQ[s.dir].includes(h.key);d&&g&&(o.onOpenChange(!1),(y=a.trigger)==null||y.focus(),h.preventDefault())})})})})})});LP.displayName=$P;function NP(e){return e?"open":"closed"}function H0(e){return e==="indeterminate"}function JS(e){return H0(e)?"indeterminate":e?"checked":"unchecked"}function $Q(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function NQ(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=LQ(e,Math.max(o,0));i.length===1&&(s=s.filter(f=>f!==n));const u=s.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function IQ(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;or!=h>r&&n<(f-a)*(r-u)/(h-u)+a&&(i=!i)}return i}function jQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return IQ(n,t)}function Wd(e){return t=>t.pointerType==="mouse"?e(t):void 0}var DQ=gP,FQ=qS,zQ=yP,WQ=_P,UQ=QS,BQ=xP,VQ=mv,HQ=wP,GQ=CP,qQ=TP,ZQ=RP,KQ=MP,YQ=PP,QQ=AP,XQ=LP;function IP(e,[t,n]){return Math.min(n,Math.max(t,e))}var e3="DropdownMenu",[JQ,B8e]=ai(e3,[pP]),Yn=pP(),[eX,jP]=JQ(e3),DP=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,u=Yn(t),f=v.useRef(null),[h=!1,d]=Ko({prop:i,defaultProp:o,onChange:s});return m.jsx(eX,{scope:t,triggerId:jd(),triggerRef:f,contentId:jd(),open:h,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(g=>!g),[d]),modal:a,children:m.jsx(DQ,{...u,open:h,onOpenChange:d,dir:r,modal:a,children:n})})};DP.displayName=e3;var FP="DropdownMenuTrigger",zP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=jP(FP,n),s=Yn(n);return m.jsx(FQ,{asChild:!0,...s,children:m.jsx(mt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:kh(t,o.triggerRef),onPointerDown:Oe(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:Oe(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});zP.displayName=FP;var tX="DropdownMenuPortal",WP=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Yn(t);return m.jsx(zQ,{...r,...n})};WP.displayName=tX;var UP="DropdownMenuContent",BP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=jP(UP,n),o=Yn(n),s=v.useRef(!1);return m.jsx(WQ,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,a=>{var u;s.current||(u=i.triggerRef.current)==null||u.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,a=>{const u=a.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;(!i.modal||h)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});BP.displayName=UP;var nX="DropdownMenuGroup",rX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(UQ,{...i,...r,ref:t})});rX.displayName=nX;var iX="DropdownMenuLabel",oX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(BQ,{...i,...r,ref:t})});oX.displayName=iX;var sX="DropdownMenuItem",VP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(VQ,{...i,...r,ref:t})});VP.displayName=sX;var aX="DropdownMenuCheckboxItem",lX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(HQ,{...i,...r,ref:t})});lX.displayName=aX;var uX="DropdownMenuRadioGroup",cX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(GQ,{...i,...r,ref:t})});cX.displayName=uX;var fX="DropdownMenuRadioItem",dX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(qQ,{...i,...r,ref:t})});dX.displayName=fX;var hX="DropdownMenuItemIndicator",pX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(ZQ,{...i,...r,ref:t})});pX.displayName=hX;var mX="DropdownMenuSeparator",gX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(KQ,{...i,...r,ref:t})});gX.displayName=mX;var vX="DropdownMenuArrow",yX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(YQ,{...i,...r,ref:t})});yX.displayName=vX;var _X="DropdownMenuSubTrigger",xX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(QQ,{...i,...r,ref:t})});xX.displayName=_X;var bX="DropdownMenuSubContent",wX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(XQ,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wX.displayName=bX;var SX=DP,CX=zP,kX=WP,TX=BP,EX=VP;const HP=v.forwardRef(({className:e,...t},n)=>v.createElement(WS,{...t,ref:n,className:zt("rt-IconButton",e)}));HP.displayName="IconButton";var t3="Popover",[GP,V8e]=ai(t3,[Ec]),Ah=Ec(),[RX,sa]=GP(t3),qP=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,a=Ah(t),u=v.useRef(null),[f,h]=v.useState(!1),[d=!1,g]=Ko({prop:r,defaultProp:i,onChange:o});return m.jsx($S,{...a,children:m.jsx(RX,{scope:t,contentId:jd(),triggerRef:u,open:d,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(y=>!y),[g]),hasCustomAnchor:f,onCustomAnchorAdd:v.useCallback(()=>h(!0),[]),onCustomAnchorRemove:v.useCallback(()=>h(!1),[]),modal:s,children:n})})};qP.displayName=t3;var ZP="PopoverAnchor",MX=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=sa(ZP,n),o=Ah(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return v.useEffect(()=>(s(),()=>a()),[s,a]),m.jsx(sv,{...o,...r,ref:t})});MX.displayName=ZP;var KP="PopoverTrigger",YP=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=sa(KP,n),o=Ah(n),s=jt(t,i.triggerRef),a=m.jsx(mt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":nO(i.open),...r,ref:s,onClick:Oe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:m.jsx(sv,{asChild:!0,...o,children:a})});YP.displayName=KP;var n3="PopoverPortal",[PX,OX]=GP(n3,{forceMount:void 0}),QP=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=sa(n3,t);return m.jsx(PX,{scope:t,forceMount:n,children:m.jsx(ao,{present:n||o.open,children:m.jsx(ev,{asChild:!0,container:i,children:r})})})};QP.displayName=n3;var ic="PopoverContent",XP=v.forwardRef((e,t)=>{const n=OX(ic,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=sa(ic,e.__scopePopover);return m.jsx(ao,{present:r||o.open,children:o.modal?m.jsx(AX,{...i,ref:t}):m.jsx($X,{...i,ref:t})})});XP.displayName=ic;var AX=v.forwardRef((e,t)=>{const n=sa(ic,e.__scopePopover),r=v.useRef(null),i=jt(t,r),o=v.useRef(!1);return v.useEffect(()=>{const s=r.current;if(s)return kM(s)},[]),m.jsx(xS,{as:Hn,allowPinchZoom:!0,children:m.jsx(JP,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,f=a.button===2||u;o.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),$X=v.forwardRef((e,t)=>{const n=sa(ic,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return m.jsx(JP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),JP=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,...d}=e,g=sa(ic,n),y=Ah(n);return gM(),m.jsx(_S,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:m.jsx(Jg,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>g.onOpenChange(!1),children:m.jsx(LS,{"data-state":nO(g.open),role:"dialog",id:g.contentId,...y,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),eO="PopoverClose",tO=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=sa(eO,n);return m.jsx(mt.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>i.onOpenChange(!1))})});tO.displayName=eO;var LX="PopoverArrow",NX=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ah(n);return m.jsx(NS,{...i,...r,ref:t})});NX.displayName=LX;function nO(e){return e?"open":"closed"}var IX=qP,jX=YP,DX=QP,FX=XP,zX=tO;const WX=["1","2","3","4"],UX={...lo,size:{type:"enum",className:"rt-r-size",values:WX,default:"2",responsive:!0},width:Ws.width,minWidth:Ws.minWidth,maxWidth:{...Ws.maxWidth,default:"480px"},...bS},rO=e=>v.createElement(IX,{...e});rO.displayName="Popover.Root";const iO=v.forwardRef(({children:e,...t},n)=>v.createElement(jX,{...t,ref:n,asChild:!0},zS(e)));iO.displayName="Popover.Trigger";const oO=v.forwardRef((e,t)=>{const{className:n,forceMount:r,container:i,...o}=Gn(e,UX);return v.createElement(DX,{container:i,forceMount:r},v.createElement(cv,{asChild:!0},v.createElement(FX,{align:"start",sideOffset:8,collisionPadding:10,...o,ref:t,className:zt("rt-PopperContent","rt-PopoverContent",n)})))});oO.displayName="Popover.Content";const BX=v.forwardRef(({children:e,...t},n)=>v.createElement(zX,{...t,ref:n,asChild:!0},zS(e)));BX.displayName="Popover.Close";var r3="Progress",i3=100,[VX,H8e]=ai(r3),[HX,GX]=VX(r3),sO=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=qX,...s}=e;(i||i===0)&&!r8(i)&&console.error(ZX(`${i}`,"Progress"));const a=r8(i)?i:i3;r!==null&&!i8(r,a)&&console.error(KX(`${r}`,"Progress"));const u=i8(r,a)?r:null,f=G0(u)?o(u,a):void 0;return m.jsx(HX,{scope:n,value:u,max:a,children:m.jsx(mt.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":G0(u)?u:void 0,"aria-valuetext":f,role:"progressbar","data-state":uO(u,a),"data-value":u??void 0,"data-max":a,...s,ref:t})})});sO.displayName=r3;var aO="ProgressIndicator",lO=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=GX(aO,n);return m.jsx(mt.div,{"data-state":uO(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});lO.displayName=aO;function qX(e,t){return`${Math.round(e/t*100)}%`}function uO(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function G0(e){return typeof e=="number"}function r8(e){return G0(e)&&!isNaN(e)&&e>0}function i8(e,t){return G0(e)&&!isNaN(e)&&e<=t&&e>=0}function ZX(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${i3}\`.`}function KX(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: +`)},yq=0,Kl=[];function _q(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(yq++)[0],o=v.useState(xM)[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=WZ([e.lockRef.current],(e.shards||[]).map(V6),!0).filter(Boolean);return x.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(x,C){if("touches"in x&&x.touches.length===2)return!s.current.allowPinchZoom;var _=dm(x),w=n.current,k="deltaX"in x?x.deltaX:w[0]-_[0],E="deltaY"in x?x.deltaY:w[1]-_[1],R,A=x.target,$=Math.abs(k)>Math.abs(E)?"h":"v";if("touches"in x&&$==="h"&&A.type==="range")return!1;var N=U6($,A);if(!N)return!0;if(N?R=$:(R=$==="v"?"h":"v",N=U6($,A)),!N)return!1;if(!r.current&&"changedTouches"in x&&(k||E)&&(r.current=R),!R)return!0;var z=r.current||R;return mq(z,C,x,z==="h"?k:E,!0)},[]),u=v.useCallback(function(x){var C=x;if(!(!Kl.length||Kl[Kl.length-1]!==o)){var _="deltaY"in C?B6(C):dm(C),w=t.current.filter(function(R){return R.name===C.type&&(R.target===C.target||C.target===R.shadowParent)&&gq(R.delta,_)})[0];if(w&&w.should){C.cancelable&&C.preventDefault();return}if(!w){var k=(s.current.shards||[]).map(V6).filter(Boolean).filter(function(R){return R.contains(C.target)}),E=k.length>0?a(C,k[0]):!s.current.noIsolation;E&&C.cancelable&&C.preventDefault()}}},[]),f=v.useCallback(function(x,C,_,w){var k={name:x,delta:C,target:_,should:w,shadowParent:xq(_)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(E){return E!==k})},1)},[]),h=v.useCallback(function(x){n.current=dm(x),r.current=void 0},[]),d=v.useCallback(function(x){f(x.type,B6(x),x.target,a(x,e.lockRef.current))},[]),g=v.useCallback(function(x){f(x.type,dm(x),x.target,a(x,e.lockRef.current))},[]);v.useEffect(function(){return Kl.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",u,ql),document.addEventListener("touchmove",u,ql),document.addEventListener("touchstart",h,ql),function(){Kl=Kl.filter(function(x){return x!==o}),document.removeEventListener("wheel",u,ql),document.removeEventListener("touchmove",u,ql),document.removeEventListener("touchstart",h,ql)}},[]);var y=e.removeScrollBar,b=e.inert;return v.createElement(v.Fragment,null,b?v.createElement(o,{styles:vq(i)}):null,y?v.createElement(lq,{gapMode:e.gapMode}):null)}function xq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const bq=YZ(_M,_q);var xS=v.forwardRef(function(e,t){return v.createElement(tv,Yi({},e,{ref:t,sideCar:bq}))});xS.classNames=tv.classNames;var wq=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Yl=new WeakMap,hm=new WeakMap,pm={},q_=0,CM=function(e){return e&&(e.host||CM(e.parentNode))},Sq=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=CM(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Cq=function(e,t,n,r){var i=Sq(t,Array.isArray(e)?e:[e]);pm[n]||(pm[n]=new WeakMap);var o=pm[n],s=[],a=new Set,u=new Set(i),f=function(d){!d||a.has(d)||(a.add(d),f(d.parentNode))};i.forEach(f);var h=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(g){if(a.has(g))h(g);else try{var y=g.getAttribute(r),b=y!==null&&y!=="false",x=(Yl.get(g)||0)+1,C=(o.get(g)||0)+1;Yl.set(g,x),o.set(g,C),s.push(g),x===1&&b&&hm.set(g,!0),C===1&&g.setAttribute(n,"true"),b||g.setAttribute(r,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return h(t),a.clear(),q_++,function(){s.forEach(function(d){var g=Yl.get(d)-1,y=o.get(d)-1;Yl.set(d,g),o.set(d,y),g||(hm.has(d)||d.removeAttribute(r),hm.delete(d)),y||d.removeAttribute(n)}),q_--,q_||(Yl=new WeakMap,Yl=new WeakMap,hm=new WeakMap,pm={})}},kM=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=wq(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Cq(r,i,n,"aria-hidden")):function(){return null}};const lo={asChild:{type:"boolean"}},Us={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}},bS={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}},wS=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],kq=["auto","gray","mauve","slate","sage","olive","sand"],Th={color:{type:"enum",values:wS,default:void 0}},Tq={color:{type:"enum",values:wS,default:""}},nv={highContrast:{type:"boolean",className:"rt-high-contrast",default:void 0}},Eq=["normal","start","end","both"],Rq={trim:{type:"enum",className:"rt-r-lt",values:Eq,responsive:!0}},Mq=["left","center","right"],Pq={align:{type:"enum",className:"rt-r-ta",values:Mq,responsive:!0}},Oq=["wrap","nowrap","pretty","balance"],Aq={wrap:{type:"enum",className:"rt-r-tw",values:Oq,responsive:!0}},$q={truncate:{type:"boolean",className:"rt-truncate"}},Lq=["light","regular","medium","bold"],Nq={weight:{type:"enum",className:"rt-r-weight",values:Lq,responsive:!0}},SS=["initial","xs","sm","md","lg","xl"];function TM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ld(e){return typeof e=="object"&&Object.keys(e).some(t=>SS.includes(t))}function Iq({className:e,customProperties:t,...n}){const r=EM({allowArbitraryValues:!0,className:e,...n}),i=jq({customProperties:t,...n});return[r,i]}function EM({allowArbitraryValues:e,value:t,className:n,propValues:r,parseValue:i=o=>o}){const o=[];if(t){if(typeof t=="string"&&r.includes(t))return H6(n,t,i);if(ld(t)){const s=t;for(const a in s){if(!TM(s,a)||!SS.includes(a))continue;const u=s[a];if(u!==void 0){if(r.includes(u)){const f=H6(n,u,i),h=a==="initial"?f:`${a}:${f}`;o.push(h)}else if(e){const f=a==="initial"?n:`${a}:${n}`;o.push(f)}}}return o.join(" ")}if(e)return n}}function H6(e,t,n){const r=e?"-":"",i=n(t),o=i==null?void 0:i.startsWith("-"),s=o?"-":"",a=o?i==null?void 0:i.substring(1):i;return`${s}${e}${r}${a}`}function jq({customProperties:e,value:t,propValues:n,parseValue:r=i=>i}){let i={};if(!(!t||typeof t=="string"&&n.includes(t))){if(typeof t=="string"&&(i=Object.fromEntries(e.map(o=>[o,t]))),ld(t)){const o=t;for(const s in o){if(!TM(o,s)||!SS.includes(s))continue;const a=o[s];if(!n.includes(a))for(const u of e)i={[s==="initial"?u:`${u}-${s}`]:a,...i}}}for(const o in i){const s=i[o];s!==void 0&&(i[o]=r(s))}return i}}function eb(...e){let t={};for(const n of e)n&&(t={...t,...n});return Object.keys(t).length?t:void 0}function Dq(...e){return Object.assign({},...e)}function Gn(e,...t){let n,r;const i={...e},o=Dq(...t);for(const s in o){let a=i[s];const u=o[s];if(u.default!==void 0&&a===void 0&&(a=u.default),u.type==="enum"&&![u.default,...u.values].includes(a)&&!ld(a)&&(a=u.default),i[s]=a,"className"in u&&u.className){delete i[s];const f="responsive"in u;if(!a||ld(a)&&!f)continue;if(ld(a)&&(u.default!==void 0&&a.initial===void 0&&(a.initial=u.default),u.type==="enum"&&([u.default,...u.values].includes(a.initial)||(a.initial=u.default))),u.type==="enum"){const h=EM({allowArbitraryValues:!1,value:a,className:u.className,propValues:u.values,parseValue:u.parseValue});n=zt(n,h);continue}if(u.type==="string"||u.type==="enum | string"){const h=u.type==="string"?[]:u.values,[d,g]=Iq({className:u.className,customProperties:u.customProperties,propValues:h,parseValue:u.parseValue,value:a});r=eb(r,g),n=zt(n,d);continue}if(u.type==="boolean"&&a){n=zt(n,u.className);continue}}}return i.className=zt(n,e.className),i.style=eb(r,e.style),i}const ba=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Fi={m:{type:"enum | string",values:ba,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:ba,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:ba,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:ba,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:ba,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:ba,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:ba,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}},Fq=["span","div","label","p"],zq=["1","2","3","4","5","6","7","8","9"],Wq={as:{type:"enum",values:Fq,default:"span"},...lo,size:{type:"enum",className:"rt-r-size",values:zq,responsive:!0},...Nq,...Pq,...Rq,...$q,...Aq,...Th,...nv},ae=v.forwardRef((e,t)=>{const{children:n,className:r,asChild:i,as:o="span",color:s,...a}=Gn(e,Wq,Fi);return v.createElement(Hn,{"data-accent-color":s,...a,ref:t,className:zt("rt-Text",r)},i?n:v.createElement(o,null,n))});ae.displayName="Text";const Uq=["top","right","bottom","left"],Ks=Math.min,Sr=Math.max,F0=Math.round,mm=Math.floor,Ys=e=>({x:e,y:e}),Bq={left:"right",right:"left",bottom:"top",top:"bottom"},Vq={start:"end",end:"start"};function tb(e,t,n){return Sr(e,Ks(t,n))}function Uo(e,t){return typeof e=="function"?e(t):e}function Bo(e){return e.split("-")[0]}function kc(e){return e.split("-")[1]}function CS(e){return e==="x"?"y":"x"}function kS(e){return e==="y"?"height":"width"}function Qs(e){return["top","bottom"].includes(Bo(e))?"y":"x"}function TS(e){return CS(Qs(e))}function Hq(e,t,n){n===void 0&&(n=!1);const r=kc(e),i=TS(e),o=kS(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=z0(s)),[s,z0(s)]}function Gq(e){const t=z0(e);return[nb(e),t,nb(t)]}function nb(e){return e.replace(/start|end/g,t=>Vq[t])}function Zq(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:s;default:return[]}}function qq(e,t,n,r){const i=kc(e);let o=Zq(Bo(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(nb)))),o}function z0(e){return e.replace(/left|right|bottom|top/g,t=>Bq[t])}function Kq(e){return{top:0,right:0,bottom:0,left:0,...e}}function RM(e){return typeof e!="number"?Kq(e):{top:e,right:e,bottom:e,left:e}}function W0(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function G6(e,t,n){let{reference:r,floating:i}=e;const o=Qs(t),s=TS(t),a=kS(s),u=Bo(t),f=o==="y",h=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let y;switch(u){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:d};break;case"left":y={x:r.x-i.width,y:d};break;default:y={x:r.x,y:r.y}}switch(kc(t)){case"start":y[s]-=g*(n&&f?-1:1);break;case"end":y[s]+=g*(n&&f?-1:1);break}return y}const Yq=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:d}=G6(f,r,u),g=r,y={},b=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:u}=t,{element:f,padding:h=0}=Uo(e,t)||{};if(f==null)return{};const d=RM(h),g={x:n,y:r},y=TS(i),b=kS(y),x=await s.getDimensions(f),C=y==="y",_=C?"top":"left",w=C?"bottom":"right",k=C?"clientHeight":"clientWidth",E=o.reference[b]+o.reference[y]-g[y]-o.floating[b],R=g[y]-o.reference[y],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let $=A?A[k]:0;(!$||!await(s.isElement==null?void 0:s.isElement(A)))&&($=a.floating[k]||o.floating[b]);const N=E/2-R/2,z=$/2-x[b]/2-1,I=Ks(d[_],z),B=Ks(d[w],z),ee=I,Q=$-x[b]-B,U=$/2-x[b]/2+N,Y=tb(ee,U,Q),D=!u.arrow&&kc(i)!=null&&U!==Y&&o.reference[b]/2-(UU<=0)){var B,ee;const U=(((B=o.flip)==null?void 0:B.index)||0)+1,Y=$[U];if(Y)return{data:{index:U,overflows:I},reset:{placement:Y}};let D=(ee=I.filter(H=>H.overflows[0]<=0).sort((H,O)=>H.overflows[1]-O.overflows[1])[0])==null?void 0:ee.placement;if(!D)switch(y){case"bestFit":{var Q;const H=(Q=I.filter(O=>{if(A){const L=Qs(O.placement);return L===w||L==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(L=>L>0).reduce((L,V)=>L+V,0)]).sort((O,L)=>O[1]-L[1])[0])==null?void 0:Q[0];H&&(D=H);break}case"initialPlacement":D=a;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function Z6(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function q6(e){return Uq.some(t=>e[t]>=0)}const Jq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Uo(e,t);switch(r){case"referenceHidden":{const o=await Dd(t,{...i,elementContext:"reference"}),s=Z6(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:q6(s)}}}case"escaped":{const o=await Dd(t,{...i,altBoundary:!0}),s=Z6(o,n.floating);return{data:{escapedOffsets:s,escaped:q6(s)}}}default:return{}}}}};async function eK(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Bo(n),a=kc(n),u=Qs(n)==="y",f=["left","top"].includes(s)?-1:1,h=o&&u?-1:1,d=Uo(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(y=a==="end"?b*-1:b),u?{x:y*h,y:g*f}:{x:g*f,y:y*h}}const tK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,u=await eK(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:s}}}}},nK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:C=>{let{x:_,y:w}=C;return{x:_,y:w}}},...u}=Uo(e,t),f={x:n,y:r},h=await Dd(t,u),d=Qs(Bo(i)),g=CS(d);let y=f[g],b=f[d];if(o){const C=g==="y"?"top":"left",_=g==="y"?"bottom":"right",w=y+h[C],k=y-h[_];y=tb(w,y,k)}if(s){const C=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=b+h[C],k=b-h[_];b=tb(w,b,k)}const x=a.fn({...t,[g]:y,[d]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:o,[d]:s}}}}}},rK=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=Uo(e,t),h={x:n,y:r},d=Qs(i),g=CS(d);let y=h[g],b=h[d];const x=Uo(a,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const k=g==="y"?"height":"width",E=o.reference[g]-o.floating[k]+C.mainAxis,R=o.reference[g]+o.reference[k]-C.mainAxis;yR&&(y=R)}if(f){var _,w;const k=g==="y"?"width":"height",E=["top","left"].includes(Bo(i)),R=o.reference[d]-o.floating[k]+(E&&((_=s.offset)==null?void 0:_[d])||0)+(E?0:C.crossAxis),A=o.reference[d]+o.reference[k]+(E?0:((w=s.offset)==null?void 0:w[d])||0)-(E?C.crossAxis:0);bA&&(b=A)}return{[g]:y,[d]:b}}}},iK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:u=()=>{},...f}=Uo(e,t),h=await Dd(t,f),d=Bo(i),g=kc(i),y=Qs(i)==="y",{width:b,height:x}=o.floating;let C,_;d==="top"||d==="bottom"?(C=d,_=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(_=d,C=g==="end"?"top":"bottom");const w=x-h.top-h.bottom,k=b-h.left-h.right,E=Ks(x-h[C],w),R=Ks(b-h[_],k),A=!t.middlewareData.shift;let $=E,N=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=w),A&&!g){const I=Sr(h.left,0),B=Sr(h.right,0),ee=Sr(h.top,0),Q=Sr(h.bottom,0);y?N=b-2*(I!==0||B!==0?I+B:Sr(h.left,h.right)):$=x-2*(ee!==0||Q!==0?ee+Q:Sr(h.top,h.bottom))}await u({...t,availableWidth:N,availableHeight:$});const z=await s.getDimensions(a.floating);return b!==z.width||x!==z.height?{reset:{rects:!0}}:{}}}};function rv(){return typeof window<"u"}function Tc(e){return MM(e)?(e.nodeName||"").toLowerCase():"#document"}function Er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uo(e){var t;return(t=(MM(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function MM(e){return rv()?e instanceof Node||e instanceof Er(e).Node:!1}function $i(e){return rv()?e instanceof Element||e instanceof Er(e).Element:!1}function no(e){return rv()?e instanceof HTMLElement||e instanceof Er(e).HTMLElement:!1}function K6(e){return!rv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Er(e).ShadowRoot}function Eh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Li(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function oK(e){return["table","td","th"].includes(Tc(e))}function iv(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ES(e){const t=RS(),n=$i(e)?Li(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function sK(e){let t=Xs(e);for(;no(t)&&!nc(t);){if(ES(t))return t;if(iv(t))return null;t=Xs(t)}return null}function RS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nc(e){return["html","body","#document"].includes(Tc(e))}function Li(e){return Er(e).getComputedStyle(e)}function ov(e){return $i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xs(e){if(Tc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||K6(e)&&e.host||uo(e);return K6(t)?t.host:t}function PM(e){const t=Xs(e);return nc(t)?e.ownerDocument?e.ownerDocument.body:e.body:no(t)&&Eh(t)?t:PM(t)}function Fd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=PM(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Er(i);if(o){const a=rb(s);return t.concat(s,s.visualViewport||[],Eh(i)?i:[],a&&n?Fd(a):[])}return t.concat(i,Fd(i,[],n))}function rb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function OM(e){const t=Li(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=no(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=F0(n)!==o||F0(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function MS(e){return $i(e)?e:e.contextElement}function Iu(e){const t=MS(e);if(!no(t))return Ys(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=OM(t);let s=(o?F0(n.width):n.width)/r,a=(o?F0(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const aK=Ys(0);function AM(e){const t=Er(e);return!RS()||!t.visualViewport?aK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Er(e)?!1:t}function el(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=MS(e);let s=Ys(1);t&&(r?$i(r)&&(s=Iu(r)):s=Iu(e));const a=lK(o,n,r)?AM(o):Ys(0);let u=(i.left+a.x)/s.x,f=(i.top+a.y)/s.y,h=i.width/s.x,d=i.height/s.y;if(o){const g=Er(o),y=r&&$i(r)?Er(r):r;let b=g,x=rb(b);for(;x&&r&&y!==b;){const C=Iu(x),_=x.getBoundingClientRect(),w=Li(x),k=_.left+(x.clientLeft+parseFloat(w.paddingLeft))*C.x,E=_.top+(x.clientTop+parseFloat(w.paddingTop))*C.y;u*=C.x,f*=C.y,h*=C.x,d*=C.y,u+=k,f+=E,b=Er(x),x=rb(b)}}return W0({width:h,height:d,x:u,y:f})}function uK(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=uo(r),a=t?iv(t.floating):!1;if(r===s||a&&o)return n;let u={scrollLeft:0,scrollTop:0},f=Ys(1);const h=Ys(0),d=no(r);if((d||!d&&!o)&&((Tc(r)!=="body"||Eh(s))&&(u=ov(r)),no(r))){const g=el(r);f=Iu(r),h.x=g.x+r.clientLeft,h.y=g.y+r.clientTop}return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x,y:n.y*f.y-u.scrollTop*f.y+h.y}}function cK(e){return Array.from(e.getClientRects())}function ib(e,t){const n=ov(e).scrollLeft;return t?t.left+n:el(uo(e)).left+n}function fK(e){const t=uo(e),n=ov(e),r=e.ownerDocument.body,i=Sr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Sr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ib(e);const a=-n.scrollTop;return Li(r).direction==="rtl"&&(s+=Sr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}function dK(e,t){const n=Er(e),r=uo(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;const f=RS();(!f||f&&t==="fixed")&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a,y:u}}function hK(e,t){const n=el(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=no(e)?Iu(e):Ys(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,u=i*o.x,f=r*o.y;return{width:s,height:a,x:u,y:f}}function Y6(e,t,n){let r;if(t==="viewport")r=dK(e,n);else if(t==="document")r=fK(uo(e));else if($i(t))r=hK(t,n);else{const i=AM(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return W0(r)}function $M(e,t){const n=Xs(e);return n===t||!$i(n)||nc(n)?!1:Li(n).position==="fixed"||$M(n,t)}function pK(e,t){const n=t.get(e);if(n)return n;let r=Fd(e,[],!1).filter(a=>$i(a)&&Tc(a)!=="body"),i=null;const o=Li(e).position==="fixed";let s=o?Xs(e):e;for(;$i(s)&&!nc(s);){const a=Li(s),u=ES(s);!u&&a.position==="fixed"&&(i=null),(o?!u&&!i:!u&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Eh(s)&&!u&&$M(e,s))?r=r.filter(h=>h!==s):i=a,s=Xs(s)}return t.set(e,r),r}function mK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?iv(t)?[]:pK(t,this._c):[].concat(n),r],a=s[0],u=s.reduce((f,h)=>{const d=Y6(t,h,i);return f.top=Sr(d.top,f.top),f.right=Ks(d.right,f.right),f.bottom=Ks(d.bottom,f.bottom),f.left=Sr(d.left,f.left),f},Y6(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function gK(e){const{width:t,height:n}=OM(e);return{width:t,height:n}}function vK(e,t,n){const r=no(t),i=uo(t),o=n==="fixed",s=el(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const u=Ys(0);if(r||!r&&!o)if((Tc(t)!=="body"||Eh(i))&&(a=ov(t)),r){const y=el(t,!0,o,t);u.x=y.x+t.clientLeft,u.y=y.y+t.clientTop}else i&&(u.x=ib(i));let f=0,h=0;if(i&&!r&&!o){const y=i.getBoundingClientRect();h=y.top+a.scrollTop,f=y.left+a.scrollLeft-ib(i,y)}const d=s.left+a.scrollLeft-u.x-f,g=s.top+a.scrollTop-u.y-h;return{x:d,y:g,width:s.width,height:s.height}}function K_(e){return Li(e).position==="static"}function Q6(e,t){if(!no(e)||Li(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return uo(e)===n&&(n=n.ownerDocument.body),n}function LM(e,t){const n=Er(e);if(iv(e))return n;if(!no(e)){let i=Xs(e);for(;i&&!nc(i);){if($i(i)&&!K_(i))return i;i=Xs(i)}return n}let r=Q6(e,t);for(;r&&oK(r)&&K_(r);)r=Q6(r,t);return r&&nc(r)&&K_(r)&&!ES(r)?n:r||sK(e)||n}const yK=async function(e){const t=this.getOffsetParent||LM,n=this.getDimensions,r=await n(e.floating);return{reference:vK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _K(e){return Li(e).direction==="rtl"}const xK={convertOffsetParentRelativeRectToViewportRelativeRect:uK,getDocumentElement:uo,getClippingRect:mK,getOffsetParent:LM,getElementRects:yK,getClientRects:cK,getDimensions:gK,getScale:Iu,isElement:$i,isRTL:_K};function bK(e,t){let n=null,r;const i=uo(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),o();const{left:f,top:h,width:d,height:g}=e.getBoundingClientRect();if(a||t(),!d||!g)return;const y=mm(h),b=mm(i.clientWidth-(f+d)),x=mm(i.clientHeight-(h+g)),C=mm(f),w={rootMargin:-y+"px "+-b+"px "+-x+"px "+-C+"px",threshold:Sr(0,Ks(1,u))||1};let k=!0;function E(R){const A=R[0].intersectionRatio;if(A!==u){if(!k)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(E,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),o}function wK(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=MS(e),h=i||o?[...f?Fd(f):[],...Fd(t)]:[];h.forEach(_=>{i&&_.addEventListener("scroll",n,{passive:!0}),o&&_.addEventListener("resize",n)});const d=f&&a?bK(f,n):null;let g=-1,y=null;s&&(y=new ResizeObserver(_=>{let[w]=_;w&&w.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!u&&y.observe(f),y.observe(t));let b,x=u?el(e):null;u&&C();function C(){const _=el(e);x&&(_.x!==x.x||_.y!==x.y||_.width!==x.width||_.height!==x.height)&&n(),x=_,b=requestAnimationFrame(C)}return n(),()=>{var _;h.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(_=y)==null||_.disconnect(),y=null,u&&cancelAnimationFrame(b)}}const SK=tK,CK=nK,kK=Xq,TK=iK,EK=Jq,X6=Qq,RK=rK,MK=(e,t,n)=>{const r=new Map,i={platform:xK,...n},o={...i.platform,_c:r};return Yq(e,t,{...i,platform:o})};var t0=typeof document<"u"?v.useLayoutEffect:v.useEffect;function U0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!U0(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!U0(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function NM(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function J6(e,t){const n=NM(e);return Math.round(t*n)/n}function Y_(e){const t=v.useRef(e);return t0(()=>{t.current=e}),t}function PK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:u,open:f}=e,[h,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=v.useState(r);U0(g,r)||y(r);const[b,x]=v.useState(null),[C,_]=v.useState(null),w=v.useCallback(O=>{O!==A.current&&(A.current=O,x(O))},[]),k=v.useCallback(O=>{O!==$.current&&($.current=O,_(O))},[]),E=o||b,R=s||C,A=v.useRef(null),$=v.useRef(null),N=v.useRef(h),z=u!=null,I=Y_(u),B=Y_(i),ee=Y_(f),Q=v.useCallback(()=>{if(!A.current||!$.current)return;const O={placement:t,strategy:n,middleware:g};B.current&&(O.platform=B.current),MK(A.current,$.current,O).then(L=>{const V={...L,isPositioned:ee.current!==!1};U.current&&!U0(N.current,V)&&(N.current=V,pl.flushSync(()=>{d(V)}))})},[g,t,n,B,ee]);t0(()=>{f===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[f]);const U=v.useRef(!1);t0(()=>(U.current=!0,()=>{U.current=!1}),[]),t0(()=>{if(E&&(A.current=E),R&&($.current=R),E&&R){if(I.current)return I.current(E,R,Q);Q()}},[E,R,Q,I,z]);const Y=v.useMemo(()=>({reference:A,floating:$,setReference:w,setFloating:k}),[w,k]),D=v.useMemo(()=>({reference:E,floating:R}),[E,R]),H=v.useMemo(()=>{const O={position:n,left:0,top:0};if(!D.floating)return O;const L=J6(D.floating,h.x),V=J6(D.floating,h.y);return a?{...O,transform:"translate("+L+"px, "+V+"px)",...NM(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:V}},[n,a,D.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:Q,refs:Y,elements:D,floatingStyles:H}),[h,Q,Y,D,H])}const OK=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?X6({element:r.current,padding:i}).fn(n):{}:r?X6({element:r,padding:i}).fn(n):{}}}},AK=(e,t)=>({...SK(e),options:[e,t]}),$K=(e,t)=>({...CK(e),options:[e,t]}),LK=(e,t)=>({...RK(e),options:[e,t]}),NK=(e,t)=>({...kK(e),options:[e,t]}),IK=(e,t)=>({...TK(e),options:[e,t]}),jK=(e,t)=>({...EK(e),options:[e,t]}),DK=(e,t)=>({...OK(e),options:[e,t]});var FK="Arrow",IM=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return m.jsx(mt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});IM.displayName=FK;var zK=IM;function PS(e){const[t,n]=v.useState(void 0);return Ja(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const u=o.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,a=f.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var OS="Popper",[jM,Ec]=ai(OS),[WK,DM]=jM(OS),FM=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return m.jsx(WK,{scope:t,anchor:r,onAnchorChange:i,children:n})};FM.displayName=OS;var zM="PopperAnchor",WM=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=DM(zM,n),s=v.useRef(null),a=jt(t,s);return v.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:m.jsx(mt.div,{...i,ref:a})});WM.displayName=zM;var AS="PopperContent",[UK,BK]=jM(AS),UM=v.forwardRef((e,t)=>{var Me,$e,ne,_e,ke,oe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:b,...x}=e,C=DM(AS,n),[_,w]=v.useState(null),k=jt(t,We=>w(We)),[E,R]=v.useState(null),A=PS(E),$=(A==null?void 0:A.width)??0,N=(A==null?void 0:A.height)??0,z=r+(o!=="center"?"-"+o:""),I=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},B=Array.isArray(f)?f:[f],ee=B.length>0,Q={padding:I,boundary:B.filter(HK),altBoundary:ee},{refs:U,floatingStyles:Y,placement:D,isPositioned:H,middlewareData:O}=PK({strategy:"fixed",placement:z,whileElementsMounted:(...We)=>wK(...We,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[AK({mainAxis:i+N,alignmentAxis:s}),u&&$K({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?LK():void 0,...Q}),u&&NK({...Q}),IK({...Q,apply:({elements:We,rects:xe,availableWidth:Ie,availableHeight:kt})=>{const{width:gt,height:gn}=xe.reference,vn=We.floating.style;vn.setProperty("--radix-popper-available-width",`${Ie}px`),vn.setProperty("--radix-popper-available-height",`${kt}px`),vn.setProperty("--radix-popper-anchor-width",`${gt}px`),vn.setProperty("--radix-popper-anchor-height",`${gn}px`)}}),E&&DK({element:E,padding:a}),GK({arrowWidth:$,arrowHeight:N}),g&&jK({strategy:"referenceHidden",...Q})]}),[L,V]=HM(D),K=Ai(b);Ja(()=>{H&&(K==null||K())},[H,K]);const q=(Me=O.arrow)==null?void 0:Me.x,de=($e=O.arrow)==null?void 0:$e.y,Ee=((ne=O.arrow)==null?void 0:ne.centerOffset)!==0,[ye,we]=v.useState();return Ja(()=>{_&&we(window.getComputedStyle(_).zIndex)},[_]),m.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(_e=O.transformOrigin)==null?void 0:_e.x,(ke=O.transformOrigin)==null?void 0:ke.y].join(" "),...((oe=O.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(UK,{scope:n,placedSide:L,onArrowChange:R,arrowX:q,arrowY:de,shouldHideArrow:Ee,children:m.jsx(mt.div,{"data-side":L,"data-align":V,...x,ref:k,style:{...x.style,animation:H?void 0:"none"}})})})});UM.displayName=AS;var BM="PopperArrow",VK={top:"bottom",right:"left",bottom:"top",left:"right"},VM=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=BK(BM,r),s=VK[o.placedSide];return m.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:m.jsx(zK,{...i,ref:n,style:{...i.style,display:"block"}})})});VM.displayName=BM;function HK(e){return e!==null}var GK=e=>({name:"transformOrigin",options:e,fn(t){var C,_,w;const{placement:n,rects:r,middlewareData:i}=t,s=((C=i.arrow)==null?void 0:C.centerOffset)!==0,a=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[f,h]=HM(n),d={start:"0%",center:"50%",end:"100%"}[h],g=(((_=i.arrow)==null?void 0:_.x)??0)+a/2,y=(((w=i.arrow)==null?void 0:w.y)??0)+u/2;let b="",x="";return f==="bottom"?(b=s?d:`${g}px`,x=`${-u}px`):f==="top"?(b=s?d:`${g}px`,x=`${r.floating.height+u}px`):f==="right"?(b=`${-u}px`,x=s?d:`${y}px`):f==="left"&&(b=`${r.floating.width+u}px`,x=s?d:`${y}px`),{data:{x:b,y:x}}}});function HM(e){const[t,n="center"]=e.split("-");return[t,n]}var $S=FM,sv=WM,LS=UM,NS=VM,[av,Z8e]=ai("Tooltip",[Ec]),lv=Ec(),GM="TooltipProvider",ZK=700,ob="tooltip.open",[qK,IS]=av(GM),ZM=e=>{const{__scopeTooltip:t,delayDuration:n=ZK,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[s,a]=v.useState(!0),u=v.useRef(!1),f=v.useRef(0);return v.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),m.jsx(qK,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(f.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(h=>{u.current=h},[]),disableHoverableContent:i,children:o})};ZM.displayName=GM;var uv="Tooltip",[KK,Rh]=av(uv),qM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,u=IS(uv,e.__scopeTooltip),f=lv(t),[h,d]=v.useState(null),g=jd(),y=v.useRef(0),b=s??u.disableHoverableContent,x=a??u.delayDuration,C=v.useRef(!1),[_=!1,w]=Yo({prop:r,defaultProp:i,onChange:$=>{$?(u.onOpen(),document.dispatchEvent(new CustomEvent(ob))):u.onClose(),o==null||o($)}}),k=v.useMemo(()=>_?C.current?"delayed-open":"instant-open":"closed",[_]),E=v.useCallback(()=>{window.clearTimeout(y.current),C.current=!1,w(!0)},[w]),R=v.useCallback(()=>{window.clearTimeout(y.current),w(!1)},[w]),A=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,w(!0)},x)},[x,w]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),m.jsx($S,{...f,children:m.jsx(KK,{scope:t,contentId:g,open:_,stateAttribute:k,trigger:h,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayed?A():E()},[u.isOpenDelayed,A,E]),onTriggerLeave:v.useCallback(()=>{b?R():window.clearTimeout(y.current)},[R,b]),onOpen:E,onClose:R,disableHoverableContent:b,children:n})})};qM.displayName=uv;var sb="TooltipTrigger",KM=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Rh(sb,n),o=IS(sb,n),s=lv(n),a=v.useRef(null),u=jt(t,a,i.onTriggerChange),f=v.useRef(!1),h=v.useRef(!1),d=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(sv,{asChild:!0,...s,children:m.jsx(mt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Oe(e.onPointerMove,g=>{g.pointerType!=="touch"&&!h.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:Oe(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:Oe(e.onPointerDown,()=>{f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Oe(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Oe(e.onBlur,i.onClose),onClick:Oe(e.onClick,i.onClose)})})});KM.displayName=sb;var jS="TooltipPortal",[YK,QK]=av(jS,{forceMount:void 0}),YM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Rh(jS,t);return m.jsx(YK,{scope:t,forceMount:n,children:m.jsx(ao,{present:n||o.open,children:m.jsx(ev,{asChild:!0,container:i,children:r})})})};YM.displayName=jS;var rc="TooltipContent",QM=v.forwardRef((e,t)=>{const n=QK(rc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=Rh(rc,e.__scopeTooltip);return m.jsx(ao,{present:r||s.open,children:s.disableHoverableContent?m.jsx(XM,{side:i,...o,ref:t}):m.jsx(XK,{side:i,...o,ref:t})})}),XK=v.forwardRef((e,t)=>{const n=Rh(rc,e.__scopeTooltip),r=IS(rc,e.__scopeTooltip),i=v.useRef(null),o=jt(t,i),[s,a]=v.useState(null),{trigger:u,onClose:f}=n,h=i.current,{onPointerInTransitChange:d}=r,g=v.useCallback(()=>{a(null),d(!1)},[d]),y=v.useCallback((b,x)=>{const C=b.currentTarget,_={x:b.clientX,y:b.clientY},w=tY(_,C.getBoundingClientRect()),k=nY(_,w),E=rY(x.getBoundingClientRect()),R=oY([...k,...E]);a(R),d(!0)},[d]);return v.useEffect(()=>()=>g(),[g]),v.useEffect(()=>{if(u&&h){const b=C=>y(C,h),x=C=>y(C,u);return u.addEventListener("pointerleave",b),h.addEventListener("pointerleave",x),()=>{u.removeEventListener("pointerleave",b),h.removeEventListener("pointerleave",x)}}},[u,h,y,g]),v.useEffect(()=>{if(s){const b=x=>{const C=x.target,_={x:x.clientX,y:x.clientY},w=(u==null?void 0:u.contains(C))||(h==null?void 0:h.contains(C)),k=!iY(_,s);w?g():k&&(g(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,h,s,f,g]),m.jsx(XM,{...e,ref:o})}),[JK,eY]=av(uv,{isInside:!1}),XM=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,u=Rh(rc,n),f=lv(n),{onClose:h}=u;return v.useEffect(()=>(document.addEventListener(ob,h),()=>document.removeEventListener(ob,h)),[h]),v.useEffect(()=>{if(u.trigger){const d=g=>{const y=g.target;y!=null&&y.contains(u.trigger)&&h()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,h]),m.jsx(Jg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:h,children:m.jsxs(LS,{"data-state":u.stateAttribute,...f,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(cM,{children:r}),m.jsx(JK,{scope:n,isInside:!0,children:m.jsx(gZ,{id:u.contentId,role:"tooltip",children:i||r})})]})})});QM.displayName=rc;var JM="TooltipArrow",eP=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=lv(n);return eY(JM,n).isInside?null:m.jsx(NS,{...i,...r,ref:t})});eP.displayName=JM;function tY(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function nY(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function rY(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function iY(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;or!=h>r&&n<(f-a)*(r-u)/(h-u)+a&&(i=!i)}return i}function oY(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),sY(t)}function sY(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var aY=ZM,lY=qM,uY=KM,cY=YM,fY=QM,dY=eP,tP=v.createContext(void 0),hY=e=>{const{dir:t,children:n}=e;return m.jsx(tP.Provider,{value:t,children:n})};function Mh(e){const t=v.useContext(tP);return e||t||"ltr"}function pY(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}const nP=["none","small","medium","large","full"],DS={radius:{type:"enum",values:nP,default:void 0}},mY=["inherit","light","dark"],gY=["solid","translucent"],vY=["90%","95%","100%","105%","110%"],br={...lo,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:mY,default:"inherit"},accentColor:{type:"enum",values:wS,default:"indigo"},grayColor:{type:"enum",values:kq,default:"auto"},panelBackground:{type:"enum",values:gY,default:"translucent"},radius:{type:"enum",values:nP,default:"medium"},scaling:{type:"enum",values:vY,default:"100%"}},Ql=()=>{},ab=v.createContext(void 0),cv=v.forwardRef((e,t)=>v.useContext(ab)===void 0?v.createElement(aY,{delayDuration:200},v.createElement(hY,{dir:"ltr"},v.createElement(rP,{...e,ref:t}))):v.createElement(FS,{...e,ref:t}));cv.displayName="Theme";const rP=v.forwardRef((e,t)=>{const{appearance:n=br.appearance.default,accentColor:r=br.accentColor.default,grayColor:i=br.grayColor.default,panelBackground:o=br.panelBackground.default,radius:s=br.radius.default,scaling:a=br.scaling.default,hasBackground:u=br.hasBackground.default,...f}=e,[h,d]=v.useState(n);v.useEffect(()=>d(n),[n]);const[g,y]=v.useState(r);v.useEffect(()=>y(r),[r]);const[b,x]=v.useState(i);v.useEffect(()=>x(i),[i]);const[C,_]=v.useState(o);v.useEffect(()=>_(o),[o]);const[w,k]=v.useState(s);v.useEffect(()=>k(s),[s]);const[E,R]=v.useState(a);return v.useEffect(()=>R(a),[a]),v.createElement(FS,{...f,ref:t,isRoot:!0,hasBackground:u,appearance:h,accentColor:g,grayColor:b,panelBackground:C,radius:w,scaling:E,onAppearanceChange:d,onAccentColorChange:y,onGrayColorChange:x,onPanelBackgroundChange:_,onRadiusChange:k,onScalingChange:R})});rP.displayName="ThemeRoot";const FS=v.forwardRef((e,t)=>{const n=v.useContext(ab),{asChild:r,isRoot:i,hasBackground:o,appearance:s=(n==null?void 0:n.appearance)??br.appearance.default,accentColor:a=(n==null?void 0:n.accentColor)??br.accentColor.default,grayColor:u=(n==null?void 0:n.resolvedGrayColor)??br.grayColor.default,panelBackground:f=(n==null?void 0:n.panelBackground)??br.panelBackground.default,radius:h=(n==null?void 0:n.radius)??br.radius.default,scaling:d=(n==null?void 0:n.scaling)??br.scaling.default,onAppearanceChange:g=Ql,onAccentColorChange:y=Ql,onGrayColorChange:b=Ql,onPanelBackgroundChange:x=Ql,onRadiusChange:C=Ql,onScalingChange:_=Ql,...w}=e,k=r?Hn:"div",E=u==="auto"?pY(a):u,R=e.appearance==="light"||e.appearance==="dark",A=o===void 0?i||R:o;return v.createElement(ab.Provider,{value:v.useMemo(()=>({appearance:s,accentColor:a,grayColor:u,resolvedGrayColor:E,panelBackground:f,radius:h,scaling:d,onAppearanceChange:g,onAccentColorChange:y,onGrayColorChange:b,onPanelBackgroundChange:x,onRadiusChange:C,onScalingChange:_}),[s,a,u,E,f,h,d,g,y,b,x,C,_])},v.createElement(k,{"data-is-root-theme":i?"true":"false","data-accent-color":a,"data-gray-color":E,"data-has-background":A?"true":"false","data-panel-background":f,"data-radius":h,"data-scaling":d,ref:t,...w,className:zt("radix-themes",{light:s==="light",dark:s==="dark"},w.className)}))});FS.displayName="ThemeImpl";const zS=e=>{if(!v.isValidElement(e))throw Error(`Expected a single React Element child, but got: ${v.Children.toArray(e).map(t=>typeof t=="object"&&"type"in t&&typeof t.type=="string"?t.type:typeof t).join(", ")}`);return e};function yY(e,t){const{asChild:n,children:r}=e;if(!n)return typeof t=="function"?t(r):t;const i=v.Children.only(r);return v.cloneElement(i,{children:typeof t=="function"?t(i.props.children):t})}const _Y=["div","span"],xY=["none","inline","inline-block","block"],bY={as:{type:"enum",values:_Y,default:"div"},...lo,display:{type:"enum",className:"rt-r-display",values:xY,responsive:!0}},wa=["0","1","2","3","4","5","6","7","8","9"],n0={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:wa,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:wa,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:wa,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:wa,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:wa,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:wa,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:wa,responsive:!0}},Q_=["visible","hidden","clip","scroll","auto"],wY=["static","relative","absolute","fixed","sticky"],Ef=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],SY=["0","1"],CY=["0","1"],fv={...n0,...Us,...bS,position:{type:"enum",className:"rt-r-position",values:wY,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:Ef,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:Ef,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:Ef,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:Ef,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:Ef,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:Q_,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:Q_,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:Q_,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:SY,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:CY,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0}},fn=v.forwardRef((e,t)=>{const{className:n,asChild:r,as:i="div",...o}=Gn(e,bY,fv,Fi);return v.createElement(r?Hn:i,{...o,ref:t,className:zt("rt-Box",n)})});fn.displayName="Box";const kY=["1","2","3","4"],TY=["classic","solid","soft","surface","outline","ghost"],e8={...lo,size:{type:"enum",className:"rt-r-size",values:kY,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:TY,default:"solid"},...Tq,...nv,...DS,loading:{type:"boolean",className:"rt-loading",default:!1}},X_=["0","1","2","3","4","5","6","7","8","9"],iP={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:X_,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:X_,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:X_,responsive:!0}},EY=["div","span"],RY=["none","inline-flex","flex"],MY=["row","column","row-reverse","column-reverse"],PY=["start","center","end","baseline","stretch"],OY=["start","center","end","between"],AY=["nowrap","wrap","wrap-reverse"],oP={as:{type:"enum",values:EY,default:"div"},...lo,display:{type:"enum",className:"rt-r-display",values:RY,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:MY,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:PY,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:OY,parseValue:$Y,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:AY,responsive:!0},...iP};function $Y(e){return e==="between"?"space-between":e}const ge=v.forwardRef((e,t)=>{const{className:n,asChild:r,as:i="div",...o}=Gn(e,oP,fv,Fi);return v.createElement(r?Hn:i,{...o,ref:t,className:zt("rt-Flex",n)})});ge.displayName="Flex";const LY=["1","2","3"],NY={size:{type:"enum",className:"rt-r-size",values:LY,default:"2",responsive:!0},loading:{type:"boolean",default:!0}},dv=v.forwardRef((e,t)=>{const{className:n,children:r,loading:i,...o}=Gn(e,NY,Fi);if(!i)return r;const s=v.createElement("span",{...o,ref:t,className:zt("rt-Spinner",n)},v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}));return r===void 0?s:v.createElement(ge,{asChild:!0,position:"relative",align:"center",justify:"center"},v.createElement("span",null,v.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},r),v.createElement(ge,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,s))))});dv.displayName="Spinner";function IY(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r)]))}function jY(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}const WS=v.forwardRef((e,t)=>{const{size:n=e8.size.default}=e,{className:r,children:i,asChild:o,color:s,radius:a,disabled:u=e.loading,...f}=Gn(e,e8,Fi);return v.createElement(o?Hn:"button",{"data-disabled":u||void 0,"data-accent-color":s,"data-radius":a,...f,ref:t,className:zt("rt-reset","rt-BaseButton",r),disabled:u},e.loading?v.createElement(v.Fragment,null,v.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},i),v.createElement(yS,null,i),v.createElement(ge,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,v.createElement(dv,{size:IY(n,jY)})))):i)});WS.displayName="BaseButton";const oi=v.forwardRef(({className:e,...t},n)=>v.createElement(WS,{...t,ref:n,className:zt("rt-Button",e)}));oi.displayName="Button";const DY=["1","2","3","4","5"],FY=["surface","classic","ghost"],zY={...lo,size:{type:"enum",className:"rt-r-size",values:DY,default:"1",responsive:!0},variant:{type:"enum",className:"rt-variant",values:FY,default:"surface"}},sP=v.forwardRef((e,t)=>{const{asChild:n,className:r,...i}=Gn(e,zY,Fi);return v.createElement(n?Hn:"div",{ref:t,...i,className:zt("rt-reset","rt-BaseCard","rt-Card",r)})});sP.displayName="Card";function aP(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function US(e){const t=e+"CollectionProvider",[n,r]=ai(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:b,children:x}=y,C=nn.useRef(null),_=nn.useRef(new Map).current;return m.jsx(i,{scope:b,itemMap:_,collectionRef:C,children:x})};s.displayName=t;const a=e+"CollectionSlot",u=nn.forwardRef((y,b)=>{const{scope:x,children:C}=y,_=o(a,x),w=jt(b,_.collectionRef);return m.jsx(Hn,{ref:w,children:C})});u.displayName=a;const f=e+"CollectionItemSlot",h="data-radix-collection-item",d=nn.forwardRef((y,b)=>{const{scope:x,children:C,..._}=y,w=nn.useRef(null),k=jt(b,w),E=o(f,x);return nn.useEffect(()=>(E.itemMap.set(w,{ref:w,..._}),()=>void E.itemMap.delete(w))),m.jsx(Hn,{[h]:"",ref:k,children:C})});d.displayName=f;function g(y){const b=o(e+"CollectionConsumer",y);return nn.useCallback(()=>{const C=b.collectionRef.current;if(!C)return[];const _=Array.from(C.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((E,R)=>_.indexOf(E.ref.current)-_.indexOf(R.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:d},g,r]}var J_="rovingFocusGroup.onEntryFocus",WY={bubbles:!1,cancelable:!0},hv="RovingFocusGroup",[lb,lP,UY]=US(hv),[BY,Rc]=ai(hv,[UY]),[VY,HY]=BY(hv),uP=v.forwardRef((e,t)=>m.jsx(lb.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(lb.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(GY,{...e,ref:t})})}));uP.displayName=hv;var GY=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...d}=e,g=v.useRef(null),y=jt(t,g),b=Mh(o),[x=null,C]=Yo({prop:s,defaultProp:a,onChange:u}),[_,w]=v.useState(!1),k=Ai(f),E=lP(n),R=v.useRef(!1),[A,$]=v.useState(0);return v.useEffect(()=>{const N=g.current;if(N)return N.addEventListener(J_,k),()=>N.removeEventListener(J_,k)},[k]),m.jsx(VY,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:x,onItemFocus:v.useCallback(N=>C(N),[C]),onItemShiftTab:v.useCallback(()=>w(!0),[]),onFocusableItemAdd:v.useCallback(()=>$(N=>N+1),[]),onFocusableItemRemove:v.useCallback(()=>$(N=>N-1),[]),children:m.jsx(mt.div,{tabIndex:_||A===0?-1:0,"data-orientation":r,...d,ref:y,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{R.current=!0}),onFocus:Oe(e.onFocus,N=>{const z=!R.current;if(N.target===N.currentTarget&&z&&!_){const I=new CustomEvent(J_,WY);if(N.currentTarget.dispatchEvent(I),!I.defaultPrevented){const B=E().filter(D=>D.focusable),ee=B.find(D=>D.active),Q=B.find(D=>D.id===x),Y=[ee,Q,...B].filter(Boolean).map(D=>D.ref.current);dP(Y,h)}}R.current=!1}),onBlur:Oe(e.onBlur,()=>w(!1))})})}),cP="RovingFocusGroupItem",fP=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...s}=e,a=jd(),u=o||a,f=HY(cP,n),h=f.currentTabStopId===u,d=lP(n),{onFocusableItemAdd:g,onFocusableItemRemove:y}=f;return v.useEffect(()=>{if(r)return g(),()=>y()},[r,g,y]),m.jsx(lb.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:m.jsx(mt.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:Oe(e.onMouseDown,b=>{r?f.onItemFocus(u):b.preventDefault()}),onFocus:Oe(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Oe(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){f.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const x=KY(b,f.orientation,f.dir);if(x!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let _=d().filter(w=>w.focusable).map(w=>w.ref.current);if(x==="last")_.reverse();else if(x==="prev"||x==="next"){x==="prev"&&_.reverse();const w=_.indexOf(b.currentTarget);_=f.loop?YY(_,w+1):_.slice(w+1)}setTimeout(()=>dP(_))}})})})});fP.displayName=cP;var ZY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function KY(e,t,n){const r=qY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return ZY[r]}function dP(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function YY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BS=uP,VS=fP;const QY=["div","span"],XY=["none","inline-grid","grid"],JY=["1","2","3","4","5","6","7","8","9"],eQ=["1","2","3","4","5","6","7","8","9"],tQ=["row","column","dense","row-dense","column-dense"],nQ=["start","center","end","baseline","stretch"],rQ=["start","center","end","between"],B0={as:{type:"enum",values:QY,default:"div"},...lo,display:{type:"enum",className:"rt-r-display",values:XY,responsive:!0},areas:{type:"string",className:"rt-r-gta",customProperties:["--grid-template-areas"],responsive:!0},columns:{type:"enum | string",className:"rt-r-gtc",customProperties:["--grid-template-columns"],values:JY,parseValue:t8,responsive:!0},rows:{type:"enum | string",className:"rt-r-gtr",customProperties:["--grid-template-rows"],values:eQ,parseValue:t8,responsive:!0},flow:{type:"enum",className:"rt-r-gaf",values:tQ,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:nQ,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:rQ,parseValue:iQ,responsive:!0},...iP};function t8(e){return B0.columns.values.includes(e)?e:e!=null&&e.match(/^\d+$/)?`repeat(${e}, minmax(0, 1fr))`:e}function iQ(e){return e==="between"?"space-between":e}const HS=v.forwardRef((e,t)=>{const{className:n,asChild:r,as:i="div",...o}=Gn(e,B0,fv,Fi);return v.createElement(r?Hn:i,{...o,ref:t,className:zt("rt-Grid",n)})});HS.displayName="Grid";const oQ=["1","2","3","4"],sQ=["none","initial"],aQ=["left","center","right"],lQ={...lo,size:{type:"enum",className:"rt-r-size",values:oQ,default:"4",responsive:!0},display:{type:"enum",className:"rt-r-display",values:sQ,parseValue:uQ,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:aQ,parseValue:cQ,responsive:!0}};function uQ(e){return e==="initial"?"flex":e}function cQ(e){return e==="left"?"start":e==="right"?"end":e}const GS=v.forwardRef(({width:e,minWidth:t,maxWidth:n,height:r,minHeight:i,maxHeight:o,...s},a)=>{const{asChild:u,children:f,className:h,...d}=Gn(s,lQ,fv,Fi),{className:g,style:y}=Gn({width:e,minWidth:t,maxWidth:n,height:r,minHeight:i,maxHeight:o},Us,bS);return v.createElement(u?Hn:"div",{...d,ref:a,className:zt("rt-Container",h)},yY({asChild:u,children:f},b=>v.createElement("div",{className:zt("rt-ContainerInner",g),style:y},b)))});GS.displayName="Container";var ub=["Enter"," "],fQ=["ArrowDown","PageUp","Home"],hP=["ArrowUp","PageDown","End"],dQ=[...fQ,...hP],hQ={ltr:[...ub,"ArrowRight"],rtl:[...ub,"ArrowLeft"]},pQ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ph="Menu",[zd,mQ,gQ]=US(Ph),[ml,pP]=ai(Ph,[gQ,Ec,Rc]),pv=Ec(),mP=Rc(),[vQ,gl]=ml(Ph),[yQ,Oh]=ml(Ph),gP=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,a=pv(t),[u,f]=v.useState(null),h=v.useRef(!1),d=Ai(o),g=Mh(i);return v.useEffect(()=>{const y=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),m.jsx($S,{...a,children:m.jsx(vQ,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:f,children:m.jsx(yQ,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:h,dir:g,modal:s,children:r})})})};gP.displayName=Ph;var _Q="MenuAnchor",ZS=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=pv(n);return m.jsx(sv,{...i,...r,ref:t})});ZS.displayName=_Q;var qS="MenuPortal",[xQ,vP]=ml(qS,{forceMount:void 0}),yP=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=gl(qS,t);return m.jsx(xQ,{scope:t,forceMount:n,children:m.jsx(ao,{present:n||o.open,children:m.jsx(ev,{asChild:!0,container:i,children:r})})})};yP.displayName=qS;var ti="MenuContent",[bQ,KS]=ml(ti),_P=v.forwardRef((e,t)=>{const n=vP(ti,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=gl(ti,e.__scopeMenu),s=Oh(ti,e.__scopeMenu);return m.jsx(zd.Provider,{scope:e.__scopeMenu,children:m.jsx(ao,{present:r||o.open,children:m.jsx(zd.Slot,{scope:e.__scopeMenu,children:s.modal?m.jsx(wQ,{...i,ref:t}):m.jsx(SQ,{...i,ref:t})})})})}),wQ=v.forwardRef((e,t)=>{const n=gl(ti,e.__scopeMenu),r=v.useRef(null),i=jt(t,r);return v.useEffect(()=>{const o=r.current;if(o)return kM(o)},[]),m.jsx(YS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),SQ=v.forwardRef((e,t)=>{const n=gl(ti,e.__scopeMenu);return m.jsx(YS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),YS=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,onDismiss:y,disableOutsideScroll:b,...x}=e,C=gl(ti,n),_=Oh(ti,n),w=pv(n),k=mP(n),E=mQ(n),[R,A]=v.useState(null),$=v.useRef(null),N=jt(t,$,C.onContentChange),z=v.useRef(0),I=v.useRef(""),B=v.useRef(0),ee=v.useRef(null),Q=v.useRef("right"),U=v.useRef(0),Y=b?xS:v.Fragment,D=b?{as:Hn,allowPinchZoom:!0}:void 0,H=L=>{var Me,$e;const V=I.current+L,K=E().filter(ne=>!ne.disabled),q=document.activeElement,de=(Me=K.find(ne=>ne.ref.current===q))==null?void 0:Me.textValue,Ee=K.map(ne=>ne.textValue),ye=NQ(Ee,V,de),we=($e=K.find(ne=>ne.textValue===ye))==null?void 0:$e.ref.current;(function ne(_e){I.current=_e,window.clearTimeout(z.current),_e!==""&&(z.current=window.setTimeout(()=>ne(""),1e3))})(V),we&&setTimeout(()=>we.focus())};v.useEffect(()=>()=>window.clearTimeout(z.current),[]),gM();const O=v.useCallback(L=>{var K,q;return Q.current===((K=ee.current)==null?void 0:K.side)&&jQ(L,(q=ee.current)==null?void 0:q.area)},[]);return m.jsx(bQ,{scope:n,searchRef:I,onItemEnter:v.useCallback(L=>{O(L)&&L.preventDefault()},[O]),onItemLeave:v.useCallback(L=>{var V;O(L)||((V=$.current)==null||V.focus(),A(null))},[O]),onTriggerLeave:v.useCallback(L=>{O(L)&&L.preventDefault()},[O]),pointerGraceTimerRef:B,onPointerGraceIntentChange:v.useCallback(L=>{ee.current=L},[]),children:m.jsx(Y,{...D,children:m.jsx(_S,{asChild:!0,trapped:i,onMountAutoFocus:Oe(o,L=>{var V;L.preventDefault(),(V=$.current)==null||V.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:m.jsx(Jg,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,onDismiss:y,children:m.jsx(BS,{asChild:!0,...k,dir:_.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:A,onEntryFocus:Oe(u,L=>{_.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(LS,{role:"menu","aria-orientation":"vertical","data-state":NP(C.open),"data-radix-menu-content":"",dir:_.dir,...w,...x,ref:N,style:{outline:"none",...x.style},onKeyDown:Oe(x.onKeyDown,L=>{const K=L.target.closest("[data-radix-menu-content]")===L.currentTarget,q=L.ctrlKey||L.altKey||L.metaKey,de=L.key.length===1;K&&(L.key==="Tab"&&L.preventDefault(),!q&&de&&H(L.key));const Ee=$.current;if(L.target!==Ee||!dQ.includes(L.key))return;L.preventDefault();const we=E().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);hP.includes(L.key)&&we.reverse(),$Q(we)}),onBlur:Oe(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(z.current),I.current="")}),onPointerMove:Oe(e.onPointerMove,Wd(L=>{const V=L.target,K=U.current!==L.clientX;if(L.currentTarget.contains(V)&&K){const q=L.clientX>U.current?"right":"left";Q.current=q,U.current=L.clientX}}))})})})})})})});_P.displayName=ti;var CQ="MenuGroup",QS=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(mt.div,{role:"group",...r,ref:t})});QS.displayName=CQ;var kQ="MenuLabel",xP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(mt.div,{...r,ref:t})});xP.displayName=kQ;var V0="MenuItem",n8="menu.itemSelect",mv=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=v.useRef(null),s=Oh(V0,e.__scopeMenu),a=KS(V0,e.__scopeMenu),u=jt(t,o),f=v.useRef(!1),h=()=>{const d=o.current;if(!n&&d){const g=new CustomEvent(n8,{bubbles:!0,cancelable:!0});d.addEventListener(n8,y=>r==null?void 0:r(y),{once:!0}),fM(d,g),g.defaultPrevented?f.current=!1:s.onClose()}};return m.jsx(bP,{...i,ref:u,disabled:n,onClick:Oe(e.onClick,h),onPointerDown:d=>{var g;(g=e.onPointerDown)==null||g.call(e,d),f.current=!0},onPointerUp:Oe(e.onPointerUp,d=>{var g;f.current||(g=d.currentTarget)==null||g.click()}),onKeyDown:Oe(e.onKeyDown,d=>{const g=a.searchRef.current!=="";n||g&&d.key===" "||ub.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});mv.displayName=V0;var bP=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=KS(V0,n),a=mP(n),u=v.useRef(null),f=jt(t,u),[h,d]=v.useState(!1),[g,y]=v.useState("");return v.useEffect(()=>{const b=u.current;b&&y((b.textContent??"").trim())},[o.children]),m.jsx(zd.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:m.jsx(VS,{asChild:!0,...a,focusable:!r,children:m.jsx(mt.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:Oe(e.onPointerMove,Wd(b=>{r?s.onItemLeave(b):(s.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(e.onPointerLeave,Wd(b=>s.onItemLeave(b))),onFocus:Oe(e.onFocus,()=>d(!0)),onBlur:Oe(e.onBlur,()=>d(!1))})})})}),TQ="MenuCheckboxItem",wP=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return m.jsx(EP,{scope:e.__scopeMenu,checked:n,children:m.jsx(mv,{role:"menuitemcheckbox","aria-checked":H0(n)?"mixed":n,...i,ref:t,"data-state":JS(n),onSelect:Oe(i.onSelect,()=>r==null?void 0:r(H0(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wP.displayName=TQ;var SP="MenuRadioGroup",[EQ,RQ]=ml(SP,{value:void 0,onValueChange:()=>{}}),CP=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Ai(r);return m.jsx(EQ,{scope:e.__scopeMenu,value:n,onValueChange:o,children:m.jsx(QS,{...i,ref:t})})});CP.displayName=SP;var kP="MenuRadioItem",TP=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=RQ(kP,e.__scopeMenu),o=n===i.value;return m.jsx(EP,{scope:e.__scopeMenu,checked:o,children:m.jsx(mv,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":JS(o),onSelect:Oe(r.onSelect,()=>{var s;return(s=i.onValueChange)==null?void 0:s.call(i,n)},{checkForDefaultPrevented:!1})})})});TP.displayName=kP;var XS="MenuItemIndicator",[EP,MQ]=ml(XS,{checked:!1}),RP=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=MQ(XS,n);return m.jsx(ao,{present:r||H0(o.checked)||o.checked===!0,children:m.jsx(mt.span,{...i,ref:t,"data-state":JS(o.checked)})})});RP.displayName=XS;var PQ="MenuSeparator",MP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(mt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});MP.displayName=PQ;var OQ="MenuArrow",PP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=pv(n);return m.jsx(NS,{...i,...r,ref:t})});PP.displayName=OQ;var AQ="MenuSub",[q8e,OP]=ml(AQ),Hf="MenuSubTrigger",AP=v.forwardRef((e,t)=>{const n=gl(Hf,e.__scopeMenu),r=Oh(Hf,e.__scopeMenu),i=OP(Hf,e.__scopeMenu),o=KS(Hf,e.__scopeMenu),s=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=o,f={__scopeMenu:e.__scopeMenu},h=v.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return v.useEffect(()=>h,[h]),v.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),u(null)}},[a,u]),m.jsx(ZS,{asChild:!0,...f,children:m.jsx(bP,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":NP(n.open),...e,ref:kh(t,i.onTriggerChange),onClick:d=>{var g;(g=e.onClick)==null||g.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,Wd(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:Oe(e.onPointerLeave,Wd(d=>{var y,b;h();const g=(y=n.content)==null?void 0:y.getBoundingClientRect();if(g){const x=(b=n.content)==null?void 0:b.dataset.side,C=x==="right",_=C?-5:5,w=g[C?"left":"right"],k=g[C?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+_,y:d.clientY},{x:w,y:g.top},{x:k,y:g.top},{x:k,y:g.bottom},{x:w,y:g.bottom}],side:x}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,d=>{var y;const g=o.searchRef.current!=="";e.disabled||g&&d.key===" "||hQ[r.dir].includes(d.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),d.preventDefault())})})})});AP.displayName=Hf;var $P="MenuSubContent",LP=v.forwardRef((e,t)=>{const n=vP(ti,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=gl(ti,e.__scopeMenu),s=Oh(ti,e.__scopeMenu),a=OP($P,e.__scopeMenu),u=v.useRef(null),f=jt(t,u);return m.jsx(zd.Provider,{scope:e.__scopeMenu,children:m.jsx(ao,{present:r||o.open,children:m.jsx(zd.Slot,{scope:e.__scopeMenu,children:m.jsx(YS,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:f,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var d;s.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,h=>{h.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,h=>{s.onClose(),h.preventDefault()}),onKeyDown:Oe(e.onKeyDown,h=>{var y;const d=h.currentTarget.contains(h.target),g=pQ[s.dir].includes(h.key);d&&g&&(o.onOpenChange(!1),(y=a.trigger)==null||y.focus(),h.preventDefault())})})})})})});LP.displayName=$P;function NP(e){return e?"open":"closed"}function H0(e){return e==="indeterminate"}function JS(e){return H0(e)?"indeterminate":e?"checked":"unchecked"}function $Q(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function NQ(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=LQ(e,Math.max(o,0));i.length===1&&(s=s.filter(f=>f!==n));const u=s.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function IQ(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;or!=h>r&&n<(f-a)*(r-u)/(h-u)+a&&(i=!i)}return i}function jQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return IQ(n,t)}function Wd(e){return t=>t.pointerType==="mouse"?e(t):void 0}var DQ=gP,FQ=ZS,zQ=yP,WQ=_P,UQ=QS,BQ=xP,VQ=mv,HQ=wP,GQ=CP,ZQ=TP,qQ=RP,KQ=MP,YQ=PP,QQ=AP,XQ=LP;function IP(e,[t,n]){return Math.min(n,Math.max(t,e))}var e3="DropdownMenu",[JQ,K8e]=ai(e3,[pP]),Yn=pP(),[eX,jP]=JQ(e3),DP=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,u=Yn(t),f=v.useRef(null),[h=!1,d]=Yo({prop:i,defaultProp:o,onChange:s});return m.jsx(eX,{scope:t,triggerId:jd(),triggerRef:f,contentId:jd(),open:h,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(g=>!g),[d]),modal:a,children:m.jsx(DQ,{...u,open:h,onOpenChange:d,dir:r,modal:a,children:n})})};DP.displayName=e3;var FP="DropdownMenuTrigger",zP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=jP(FP,n),s=Yn(n);return m.jsx(FQ,{asChild:!0,...s,children:m.jsx(mt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:kh(t,o.triggerRef),onPointerDown:Oe(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:Oe(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});zP.displayName=FP;var tX="DropdownMenuPortal",WP=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Yn(t);return m.jsx(zQ,{...r,...n})};WP.displayName=tX;var UP="DropdownMenuContent",BP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=jP(UP,n),o=Yn(n),s=v.useRef(!1);return m.jsx(WQ,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,a=>{var u;s.current||(u=i.triggerRef.current)==null||u.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,a=>{const u=a.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;(!i.modal||h)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});BP.displayName=UP;var nX="DropdownMenuGroup",rX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(UQ,{...i,...r,ref:t})});rX.displayName=nX;var iX="DropdownMenuLabel",oX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(BQ,{...i,...r,ref:t})});oX.displayName=iX;var sX="DropdownMenuItem",VP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(VQ,{...i,...r,ref:t})});VP.displayName=sX;var aX="DropdownMenuCheckboxItem",lX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(HQ,{...i,...r,ref:t})});lX.displayName=aX;var uX="DropdownMenuRadioGroup",cX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(GQ,{...i,...r,ref:t})});cX.displayName=uX;var fX="DropdownMenuRadioItem",dX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(ZQ,{...i,...r,ref:t})});dX.displayName=fX;var hX="DropdownMenuItemIndicator",pX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(qQ,{...i,...r,ref:t})});pX.displayName=hX;var mX="DropdownMenuSeparator",gX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(KQ,{...i,...r,ref:t})});gX.displayName=mX;var vX="DropdownMenuArrow",yX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(YQ,{...i,...r,ref:t})});yX.displayName=vX;var _X="DropdownMenuSubTrigger",xX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(QQ,{...i,...r,ref:t})});xX.displayName=_X;var bX="DropdownMenuSubContent",wX=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Yn(n);return m.jsx(XQ,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wX.displayName=bX;var SX=DP,CX=zP,kX=WP,TX=BP,EX=VP;const HP=v.forwardRef(({className:e,...t},n)=>v.createElement(WS,{...t,ref:n,className:zt("rt-IconButton",e)}));HP.displayName="IconButton";var t3="Popover",[GP,Y8e]=ai(t3,[Ec]),Ah=Ec(),[RX,aa]=GP(t3),ZP=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,a=Ah(t),u=v.useRef(null),[f,h]=v.useState(!1),[d=!1,g]=Yo({prop:r,defaultProp:i,onChange:o});return m.jsx($S,{...a,children:m.jsx(RX,{scope:t,contentId:jd(),triggerRef:u,open:d,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(y=>!y),[g]),hasCustomAnchor:f,onCustomAnchorAdd:v.useCallback(()=>h(!0),[]),onCustomAnchorRemove:v.useCallback(()=>h(!1),[]),modal:s,children:n})})};ZP.displayName=t3;var qP="PopoverAnchor",MX=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=aa(qP,n),o=Ah(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return v.useEffect(()=>(s(),()=>a()),[s,a]),m.jsx(sv,{...o,...r,ref:t})});MX.displayName=qP;var KP="PopoverTrigger",YP=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=aa(KP,n),o=Ah(n),s=jt(t,i.triggerRef),a=m.jsx(mt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":nO(i.open),...r,ref:s,onClick:Oe(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:m.jsx(sv,{asChild:!0,...o,children:a})});YP.displayName=KP;var n3="PopoverPortal",[PX,OX]=GP(n3,{forceMount:void 0}),QP=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=aa(n3,t);return m.jsx(PX,{scope:t,forceMount:n,children:m.jsx(ao,{present:n||o.open,children:m.jsx(ev,{asChild:!0,container:i,children:r})})})};QP.displayName=n3;var ic="PopoverContent",XP=v.forwardRef((e,t)=>{const n=OX(ic,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=aa(ic,e.__scopePopover);return m.jsx(ao,{present:r||o.open,children:o.modal?m.jsx(AX,{...i,ref:t}):m.jsx($X,{...i,ref:t})})});XP.displayName=ic;var AX=v.forwardRef((e,t)=>{const n=aa(ic,e.__scopePopover),r=v.useRef(null),i=jt(t,r),o=v.useRef(!1);return v.useEffect(()=>{const s=r.current;if(s)return kM(s)},[]),m.jsx(xS,{as:Hn,allowPinchZoom:!0,children:m.jsx(JP,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,f=a.button===2||u;o.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),$X=v.forwardRef((e,t)=>{const n=aa(ic,e.__scopePopover),r=v.useRef(!1),i=v.useRef(!1);return m.jsx(JP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),JP=v.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,...d}=e,g=aa(ic,n),y=Ah(n);return gM(),m.jsx(_S,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:m.jsx(Jg,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>g.onOpenChange(!1),children:m.jsx(LS,{"data-state":nO(g.open),role:"dialog",id:g.contentId,...y,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),eO="PopoverClose",tO=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=aa(eO,n);return m.jsx(mt.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>i.onOpenChange(!1))})});tO.displayName=eO;var LX="PopoverArrow",NX=v.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ah(n);return m.jsx(NS,{...i,...r,ref:t})});NX.displayName=LX;function nO(e){return e?"open":"closed"}var IX=ZP,jX=YP,DX=QP,FX=XP,zX=tO;const WX=["1","2","3","4"],UX={...lo,size:{type:"enum",className:"rt-r-size",values:WX,default:"2",responsive:!0},width:Us.width,minWidth:Us.minWidth,maxWidth:{...Us.maxWidth,default:"480px"},...bS},rO=e=>v.createElement(IX,{...e});rO.displayName="Popover.Root";const iO=v.forwardRef(({children:e,...t},n)=>v.createElement(jX,{...t,ref:n,asChild:!0},zS(e)));iO.displayName="Popover.Trigger";const oO=v.forwardRef((e,t)=>{const{className:n,forceMount:r,container:i,...o}=Gn(e,UX);return v.createElement(DX,{container:i,forceMount:r},v.createElement(cv,{asChild:!0},v.createElement(FX,{align:"start",sideOffset:8,collisionPadding:10,...o,ref:t,className:zt("rt-PopperContent","rt-PopoverContent",n)})))});oO.displayName="Popover.Content";const BX=v.forwardRef(({children:e,...t},n)=>v.createElement(zX,{...t,ref:n,asChild:!0},zS(e)));BX.displayName="Popover.Close";var r3="Progress",i3=100,[VX,Q8e]=ai(r3),[HX,GX]=VX(r3),sO=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=ZX,...s}=e;(i||i===0)&&!r8(i)&&console.error(qX(`${i}`,"Progress"));const a=r8(i)?i:i3;r!==null&&!i8(r,a)&&console.error(KX(`${r}`,"Progress"));const u=i8(r,a)?r:null,f=G0(u)?o(u,a):void 0;return m.jsx(HX,{scope:n,value:u,max:a,children:m.jsx(mt.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":G0(u)?u:void 0,"aria-valuetext":f,role:"progressbar","data-state":uO(u,a),"data-value":u??void 0,"data-max":a,...s,ref:t})})});sO.displayName=r3;var aO="ProgressIndicator",lO=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=GX(aO,n);return m.jsx(mt.div,{"data-state":uO(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});lO.displayName=aO;function ZX(e,t){return`${Math.round(e/t*100)}%`}function uO(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function G0(e){return typeof e=="number"}function r8(e){return G0(e)&&!isNaN(e)&&e>0}function i8(e,t){return G0(e)&&!isNaN(e)&&e<=t&&e>=0}function qX(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${i3}\`.`}function KX(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${i3} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var YX=sO,QX=lO;const XX=["1","2","3"],JX=["classic","surface","soft"],eJ={size:{type:"enum",className:"rt-r-size",values:XX,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:JX,default:"surface"},...Th,...nv,...DS,duration:{type:"string"}},$h=v.forwardRef((e,t)=>{const{className:n,style:r,color:i,radius:o,duration:s,...a}=Gn(e,eJ,Fi);return v.createElement(YX,{"data-accent-color":i,"data-radius":o,ref:t,className:zt("rt-ProgressRoot",n),style:eb({"--progress-duration":"value"in a?void 0:s,"--progress-value":"value"in a?a.value:void 0,"--progress-max":"max"in a?a.max:void 0},r),...a,asChild:!1},v.createElement(QX,{className:"rt-ProgressIndicator"}))});$h.displayName="Progress";var o3="Radio",[tJ,cO]=ai(o3),[nJ,rJ]=tJ(o3),fO=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:u,...f}=e,[h,d]=v.useState(null),g=jt(t,x=>d(x)),y=v.useRef(!1),b=h?!!h.closest("form"):!0;return m.jsxs(nJ,{scope:n,checked:i,disabled:s,children:[m.jsx(mt.button,{type:"button",role:"radio","aria-checked":i,"data-state":pO(i),"data-disabled":s?"":void 0,disabled:s,value:a,...f,ref:g,onClick:Oe(e.onClick,x=>{i||u==null||u(),b&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),b&&m.jsx(iJ,{control:h,bubbles:!y.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}})]})});fO.displayName=o3;var dO="RadioIndicator",hO=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=rJ(dO,n);return m.jsx(ao,{present:r||o.checked,children:m.jsx(mt.span,{"data-state":pO(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});hO.displayName=dO;var iJ=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=v.useRef(null),s=aP(n),a=PS(t);return v.useEffect(()=>{const u=o.current,f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&d){const g=new Event("click",{bubbles:r});d.call(u,n),u.dispatchEvent(g)}},[s,n,r]),m.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function pO(e){return e?"checked":"unchecked"}var oJ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],s3="RadioGroup",[sJ,G8e]=ai(s3,[Rc,cO]),mO=Rc(),gO=cO(),[aJ,lJ]=sJ(s3),vO=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:u,dir:f,loop:h=!0,onValueChange:d,...g}=e,y=mO(n),b=Mh(f),[x,C]=Ko({prop:o,defaultProp:i,onChange:d});return m.jsx(aJ,{scope:n,name:r,required:s,disabled:a,value:x,onValueChange:C,children:m.jsx(BS,{asChild:!0,...y,orientation:u,dir:b,loop:h,children:m.jsx(mt.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":a?"":void 0,dir:b,...g,ref:t})})})});vO.displayName=s3;var yO="RadioGroupItem",_O=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=lJ(yO,n),s=o.disabled||r,a=mO(n),u=gO(n),f=v.useRef(null),h=jt(t,f),d=o.value===i.value,g=v.useRef(!1);return v.useEffect(()=>{const y=x=>{oJ.includes(x.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",b)}},[]),m.jsx(VS,{asChild:!0,...a,focusable:!s,active:d,children:m.jsx(fO,{disabled:s,required:o.required,checked:d,...u,...i,name:o.name,ref:h,onCheck:()=>o.onValueChange(i.value),onKeyDown:Oe(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:Oe(i.onFocus,()=>{var y;g.current&&((y=f.current)==null||y.click())})})})});_O.displayName=yO;var uJ="RadioGroupIndicator",cJ=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=gO(n);return m.jsx(hO,{...i,...r,ref:t})});cJ.displayName=uJ;var fJ=vO,dJ=_O;const hJ=["1","2","3"],pJ=["surface","classic"],mJ={...lo,size:{type:"enum",className:"rt-r-size",values:hJ,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:pJ,default:"surface"},...Th,...nv,columns:{...B0.columns,default:"repeat(auto-fit, minmax(160px, 1fr))"},gap:{...B0.gap,default:"4"}},a3=v.forwardRef((e,t)=>{const{className:n,color:r,...i}=Gn(e,mJ,Fi);return v.createElement(HS,{asChild:!0},v.createElement(fJ,{"data-accent-color":r,...i,ref:t,className:zt("rt-RadioCardsRoot",n)}))});a3.displayName="RadioCards.Root";const xO=v.forwardRef(({className:e,...t},n)=>v.createElement(dJ,{...t,asChild:!1,ref:n,className:zt("rt-reset","rt-BaseCard","rt-RadioCardsItem",e)}));xO.displayName="RadioCards.Item";const Mc=v.forwardRef(({className:e,children:t,...n},r)=>v.createElement(Hn,{...n,ref:r,className:zt("rt-reset",e)},zS(t)));Mc.displayName="Reset";var gJ="Toggle",l3=v.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:i,...o}=e,[s=!1,a]=Ko({prop:n,onChange:i,defaultProp:r});return m.jsx(mt.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Oe(e.onClick,()=>{e.disabled||a(!s)})})});l3.displayName=gJ;var bO=l3,Pc="ToggleGroup",[wO,q8e]=ai(Pc,[Rc]),SO=Rc(),u3=nn.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return m.jsx(vJ,{...i,ref:t})}if(n==="multiple"){const i=r;return m.jsx(yJ,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Pc}\``)});u3.displayName=Pc;var[CO,kO]=wO(Pc),vJ=nn.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,a]=Ko({prop:n,defaultProp:r,onChange:i});return m.jsx(CO,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:a,onItemDeactivate:nn.useCallback(()=>a(""),[a]),children:m.jsx(TO,{...o,ref:t})})}),yJ=nn.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s=[],a]=Ko({prop:n,defaultProp:r,onChange:i}),u=nn.useCallback(h=>a((d=[])=>[...d,h]),[a]),f=nn.useCallback(h=>a((d=[])=>d.filter(g=>g!==h)),[a]);return m.jsx(CO,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:f,children:m.jsx(TO,{...o,ref:t})})});u3.displayName=Pc;var[_J,xJ]=wO(Pc),TO=nn.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:a=!0,...u}=e,f=SO(n),h=Mh(s),d={role:"group",dir:h,...u};return m.jsx(_J,{scope:n,rovingFocus:i,disabled:r,children:i?m.jsx(BS,{asChild:!0,...f,orientation:o,dir:h,loop:a,children:m.jsx(mt.div,{...d,ref:t})}):m.jsx(mt.div,{...d,ref:t})})}),q0="ToggleGroupItem",EO=nn.forwardRef((e,t)=>{const n=kO(q0,e.__scopeToggleGroup),r=xJ(q0,e.__scopeToggleGroup),i=SO(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,a={...e,pressed:o,disabled:s},u=nn.useRef(null);return r.rovingFocus?m.jsx(VS,{asChild:!0,...i,focusable:!s,active:o,ref:u,children:m.jsx(o8,{...a,ref:t})}):m.jsx(o8,{...a,ref:t})});EO.displayName=q0;var o8=nn.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=kO(q0,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=o.type==="single"?s:void 0;return m.jsx(l3,{...a,...i,ref:t,onPressedChange:u=>{u?o.onItemActivate(r):o.onItemDeactivate(r)}})}),bJ=u3,e2=EO,RO=["PageUp","PageDown"],MO=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],PO={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Oc="Slider",[cb,wJ,SJ]=US(Oc),[OO,Z8e]=ai(Oc,[SJ]),[CJ,gv]=OO(Oc),AO=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:f=[r],value:h,onValueChange:d=()=>{},onValueCommit:g=()=>{},inverted:y=!1,...b}=e,x=v.useRef(new Set),C=v.useRef(0),w=s==="horizontal"?kJ:TJ,[k=[],E]=Ko({prop:h,defaultProp:f,onChange:N=>{var ee;(ee=[...x.current][C.current])==null||ee.focus(),d(N)}}),R=v.useRef(k);function A(N){const B=AJ(k,N);F(N,B)}function $(N){F(N,C.current)}function I(){const N=R.current[C.current];k[C.current]!==N&&g(k)}function F(N,B,{commit:ee}={commit:!1}){const Q=IJ(o),U=jJ(Math.round((N-r)/o)*o+r,Q),Y=IP(U,[r,i]);E((D=[])=>{const H=PJ(D,Y,B);if(NJ(H,u*o)){C.current=H.indexOf(Y);const O=String(H)!==String(D);return O&&ee&&g(H),O?H:D}else return D})}return m.jsx(CJ,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:C,thumbs:x.current,values:k,orientation:s,children:m.jsx(cb.Provider,{scope:e.__scopeSlider,children:m.jsx(cb.Slot,{scope:e.__scopeSlider,children:m.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...b,ref:t,onPointerDown:Oe(b.onPointerDown,()=>{a||(R.current=k)}),min:r,max:i,inverted:y,onSlideStart:a?void 0:A,onSlideMove:a?void 0:$,onSlideEnd:a?void 0:I,onHomeKeyDown:()=>!a&&F(r,0,{commit:!0}),onEndKeyDown:()=>!a&&F(i,k.length-1,{commit:!0}),onStepKeyDown:({event:N,direction:B})=>{if(!a){const U=RO.includes(N.key)||N.shiftKey&&MO.includes(N.key)?10:1,Y=C.current,D=k[Y],H=o*U*B;F(D+H,Y,{commit:!0})}}})})})})});AO.displayName=Oc;var[$O,LO]=OO(Oc,{startEdge:"left",endEdge:"right",size:"width",direction:1}),kJ=v.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:o,onSlideStart:s,onSlideMove:a,onSlideEnd:u,onStepKeyDown:f,...h}=e,[d,g]=v.useState(null),y=jt(t,k=>g(k)),b=v.useRef(),x=Mh(i),C=x==="ltr",_=C&&!o||!C&&o;function w(k){const E=b.current||d.getBoundingClientRect(),R=[0,E.width],$=c3(R,_?[n,r]:[r,n]);return b.current=E,$(k-E.left)}return m.jsx($O,{scope:e.__scopeSlider,startEdge:_?"left":"right",endEdge:_?"right":"left",direction:_?1:-1,size:"width",children:m.jsx(NO,{dir:x,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:k=>{const E=w(k.clientX);s==null||s(E)},onSlideMove:k=>{const E=w(k.clientX);a==null||a(E)},onSlideEnd:()=>{b.current=void 0,u==null||u()},onStepKeyDown:k=>{const R=PO[_?"from-left":"from-right"].includes(k.key);f==null||f({event:k,direction:R?-1:1})}})})}),TJ=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:a,onStepKeyDown:u,...f}=e,h=v.useRef(null),d=jt(t,h),g=v.useRef(),y=!i;function b(x){const C=g.current||h.current.getBoundingClientRect(),_=[0,C.height],k=c3(_,y?[r,n]:[n,r]);return g.current=C,k(x-C.top)}return m.jsx($O,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:m.jsx(NO,{"data-orientation":"vertical",...f,ref:d,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:x=>{const C=b(x.clientY);o==null||o(C)},onSlideMove:x=>{const C=b(x.clientY);s==null||s(C)},onSlideEnd:()=>{g.current=void 0,a==null||a()},onStepKeyDown:x=>{const _=PO[y?"from-bottom":"from-top"].includes(x.key);u==null||u({event:x,direction:_?-1:1})}})})}),NO=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:u,...f}=e,h=gv(Oc,n);return m.jsx(mt.span,{...f,ref:t,onKeyDown:Oe(e.onKeyDown,d=>{d.key==="Home"?(s(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):RO.concat(MO).includes(d.key)&&(u(d),d.preventDefault())}),onPointerDown:Oe(e.onPointerDown,d=>{const g=d.target;g.setPointerCapture(d.pointerId),d.preventDefault(),h.thumbs.has(g)?g.focus():r(d)}),onPointerMove:Oe(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:Oe(e.onPointerUp,d=>{const g=d.target;g.hasPointerCapture(d.pointerId)&&(g.releasePointerCapture(d.pointerId),o(d))})})}),IO="SliderTrack",jO=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=gv(IO,n);return m.jsx(mt.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});jO.displayName=IO;var fb="SliderRange",EJ=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=gv(fb,n),o=LO(fb,n),s=v.useRef(null),a=jt(t,s),u=i.values.length,f=i.values.map(g=>FO(g,i.min,i.max)),h=u>1?Math.min(...f):0,d=100-Math.max(...f);return m.jsx(mt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...e.style,[o.startEdge]:h+"%",[o.endEdge]:d+"%"}})});EJ.displayName=fb;var db="SliderThumb",DO=v.forwardRef((e,t)=>{const n=wJ(e.__scopeSlider),[r,i]=v.useState(null),o=jt(t,a=>i(a)),s=v.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return m.jsx(RJ,{...e,ref:o,index:s})}),RJ=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...o}=e,s=gv(db,n),a=LO(db,n),[u,f]=v.useState(null),h=jt(t,w=>f(w)),d=u?!!u.closest("form"):!0,g=PS(u),y=s.values[r],b=y===void 0?0:FO(y,s.min,s.max),x=OJ(r,s.values.length),C=g==null?void 0:g[a.size],_=C?$J(C,b,a.direction):0;return v.useEffect(()=>{if(u)return s.thumbs.add(u),()=>{s.thumbs.delete(u)}},[u,s.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${b}% + ${_}px)`},children:[m.jsx(cb.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(mt.span,{role:"slider","aria-label":e["aria-label"]||x,"aria-valuemin":s.min,"aria-valuenow":y,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...o,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Oe(e.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),d&&m.jsx(MJ,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),value:y},r)]})});DO.displayName=db;var MJ=e=>{const{value:t,...n}=e,r=v.useRef(null),i=aP(t);return v.useEffect(()=>{const o=r.current,s=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(s,"value").set;if(i!==t&&u){const f=new Event("input",{bubbles:!0});u.call(o,t),o.dispatchEvent(f)}},[i,t]),m.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function PJ(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,o)=>i-o)}function FO(e,t,n){const o=100/(n-t)*(e-t);return IP(o,[0,100])}function OJ(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function AJ(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function $J(e,t,n){const r=e/2,o=c3([0,50],[0,r]);return(r-o(t)*n)*n}function LJ(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function NJ(e,t){if(t>0){const n=LJ(e);return Math.min(...n)>=t}return!0}function c3(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function IJ(e){return(String(e).split(".")[1]||"").length}function jJ(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var DJ=AO,FJ=jO,zJ=DO;const WJ=["1","2","3"],UJ=["classic","surface","soft"],BJ={size:{type:"enum",className:"rt-r-size",values:WJ,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:UJ,default:"surface"},...Th,...DS},VJ=["left","right"],HJ={side:{type:"enum",values:VJ},...Th,gap:oP.gap,px:n0.px,pl:n0.pl,pr:n0.pr},zO=v.forwardRef((e,t)=>{const n=v.useRef(null),{children:r,className:i,color:o,radius:s,style:a,...u}=Gn(e,BJ,Fi);return v.createElement("div",{"data-accent-color":o,"data-radius":s,style:a,className:zt("rt-TextFieldRoot",i),onPointerDown:f=>{const h=f.target;if(h.closest("input, button, a"))return;const d=n.current;if(!d)return;const g=h.closest(` +Defaulting to \`null\`.`}var YX=sO,QX=lO;const XX=["1","2","3"],JX=["classic","surface","soft"],eJ={size:{type:"enum",className:"rt-r-size",values:XX,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:JX,default:"surface"},...Th,...nv,...DS,duration:{type:"string"}},$h=v.forwardRef((e,t)=>{const{className:n,style:r,color:i,radius:o,duration:s,...a}=Gn(e,eJ,Fi);return v.createElement(YX,{"data-accent-color":i,"data-radius":o,ref:t,className:zt("rt-ProgressRoot",n),style:eb({"--progress-duration":"value"in a?void 0:s,"--progress-value":"value"in a?a.value:void 0,"--progress-max":"max"in a?a.max:void 0},r),...a,asChild:!1},v.createElement(QX,{className:"rt-ProgressIndicator"}))});$h.displayName="Progress";var o3="Radio",[tJ,cO]=ai(o3),[nJ,rJ]=tJ(o3),fO=v.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:i=!1,required:o,disabled:s,value:a="on",onCheck:u,...f}=e,[h,d]=v.useState(null),g=jt(t,x=>d(x)),y=v.useRef(!1),b=h?!!h.closest("form"):!0;return m.jsxs(nJ,{scope:n,checked:i,disabled:s,children:[m.jsx(mt.button,{type:"button",role:"radio","aria-checked":i,"data-state":pO(i),"data-disabled":s?"":void 0,disabled:s,value:a,...f,ref:g,onClick:Oe(e.onClick,x=>{i||u==null||u(),b&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),b&&m.jsx(iJ,{control:h,bubbles:!y.current,name:r,value:a,checked:i,required:o,disabled:s,style:{transform:"translateX(-100%)"}})]})});fO.displayName=o3;var dO="RadioIndicator",hO=v.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=rJ(dO,n);return m.jsx(ao,{present:r||o.checked,children:m.jsx(mt.span,{"data-state":pO(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t})})});hO.displayName=dO;var iJ=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=v.useRef(null),s=aP(n),a=PS(t);return v.useEffect(()=>{const u=o.current,f=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&d){const g=new Event("click",{bubbles:r});d.call(u,n),u.dispatchEvent(g)}},[s,n,r]),m.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function pO(e){return e?"checked":"unchecked"}var oJ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],s3="RadioGroup",[sJ,X8e]=ai(s3,[Rc,cO]),mO=Rc(),gO=cO(),[aJ,lJ]=sJ(s3),vO=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:i,value:o,required:s=!1,disabled:a=!1,orientation:u,dir:f,loop:h=!0,onValueChange:d,...g}=e,y=mO(n),b=Mh(f),[x,C]=Yo({prop:o,defaultProp:i,onChange:d});return m.jsx(aJ,{scope:n,name:r,required:s,disabled:a,value:x,onValueChange:C,children:m.jsx(BS,{asChild:!0,...y,orientation:u,dir:b,loop:h,children:m.jsx(mt.div,{role:"radiogroup","aria-required":s,"aria-orientation":u,"data-disabled":a?"":void 0,dir:b,...g,ref:t})})})});vO.displayName=s3;var yO="RadioGroupItem",_O=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=lJ(yO,n),s=o.disabled||r,a=mO(n),u=gO(n),f=v.useRef(null),h=jt(t,f),d=o.value===i.value,g=v.useRef(!1);return v.useEffect(()=>{const y=x=>{oJ.includes(x.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",b)}},[]),m.jsx(VS,{asChild:!0,...a,focusable:!s,active:d,children:m.jsx(fO,{disabled:s,required:o.required,checked:d,...u,...i,name:o.name,ref:h,onCheck:()=>o.onValueChange(i.value),onKeyDown:Oe(y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:Oe(i.onFocus,()=>{var y;g.current&&((y=f.current)==null||y.click())})})})});_O.displayName=yO;var uJ="RadioGroupIndicator",cJ=v.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=gO(n);return m.jsx(hO,{...i,...r,ref:t})});cJ.displayName=uJ;var fJ=vO,dJ=_O;const hJ=["1","2","3"],pJ=["surface","classic"],mJ={...lo,size:{type:"enum",className:"rt-r-size",values:hJ,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:pJ,default:"surface"},...Th,...nv,columns:{...B0.columns,default:"repeat(auto-fit, minmax(160px, 1fr))"},gap:{...B0.gap,default:"4"}},a3=v.forwardRef((e,t)=>{const{className:n,color:r,...i}=Gn(e,mJ,Fi);return v.createElement(HS,{asChild:!0},v.createElement(fJ,{"data-accent-color":r,...i,ref:t,className:zt("rt-RadioCardsRoot",n)}))});a3.displayName="RadioCards.Root";const xO=v.forwardRef(({className:e,...t},n)=>v.createElement(dJ,{...t,asChild:!1,ref:n,className:zt("rt-reset","rt-BaseCard","rt-RadioCardsItem",e)}));xO.displayName="RadioCards.Item";const Mc=v.forwardRef(({className:e,children:t,...n},r)=>v.createElement(Hn,{...n,ref:r,className:zt("rt-reset",e)},zS(t)));Mc.displayName="Reset";var gJ="Toggle",l3=v.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:i,...o}=e,[s=!1,a]=Yo({prop:n,onChange:i,defaultProp:r});return m.jsx(mt.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...o,ref:t,onClick:Oe(e.onClick,()=>{e.disabled||a(!s)})})});l3.displayName=gJ;var bO=l3,Pc="ToggleGroup",[wO,J8e]=ai(Pc,[Rc]),SO=Rc(),u3=nn.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return m.jsx(vJ,{...i,ref:t})}if(n==="multiple"){const i=r;return m.jsx(yJ,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Pc}\``)});u3.displayName=Pc;var[CO,kO]=wO(Pc),vJ=nn.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s,a]=Yo({prop:n,defaultProp:r,onChange:i});return m.jsx(CO,{scope:e.__scopeToggleGroup,type:"single",value:s?[s]:[],onItemActivate:a,onItemDeactivate:nn.useCallback(()=>a(""),[a]),children:m.jsx(TO,{...o,ref:t})})}),yJ=nn.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=e,[s=[],a]=Yo({prop:n,defaultProp:r,onChange:i}),u=nn.useCallback(h=>a((d=[])=>[...d,h]),[a]),f=nn.useCallback(h=>a((d=[])=>d.filter(g=>g!==h)),[a]);return m.jsx(CO,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:f,children:m.jsx(TO,{...o,ref:t})})});u3.displayName=Pc;var[_J,xJ]=wO(Pc),TO=nn.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:o,dir:s,loop:a=!0,...u}=e,f=SO(n),h=Mh(s),d={role:"group",dir:h,...u};return m.jsx(_J,{scope:n,rovingFocus:i,disabled:r,children:i?m.jsx(BS,{asChild:!0,...f,orientation:o,dir:h,loop:a,children:m.jsx(mt.div,{...d,ref:t})}):m.jsx(mt.div,{...d,ref:t})})}),Z0="ToggleGroupItem",EO=nn.forwardRef((e,t)=>{const n=kO(Z0,e.__scopeToggleGroup),r=xJ(Z0,e.__scopeToggleGroup),i=SO(e.__scopeToggleGroup),o=n.value.includes(e.value),s=r.disabled||e.disabled,a={...e,pressed:o,disabled:s},u=nn.useRef(null);return r.rovingFocus?m.jsx(VS,{asChild:!0,...i,focusable:!s,active:o,ref:u,children:m.jsx(o8,{...a,ref:t})}):m.jsx(o8,{...a,ref:t})});EO.displayName=Z0;var o8=nn.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,o=kO(Z0,n),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},a=o.type==="single"?s:void 0;return m.jsx(l3,{...a,...i,ref:t,onPressedChange:u=>{u?o.onItemActivate(r):o.onItemDeactivate(r)}})}),bJ=u3,e2=EO,RO=["PageUp","PageDown"],MO=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],PO={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Oc="Slider",[cb,wJ,SJ]=US(Oc),[OO,eTe]=ai(Oc,[SJ]),[CJ,gv]=OO(Oc),AO=v.forwardRef((e,t)=>{const{name:n,min:r=0,max:i=100,step:o=1,orientation:s="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:f=[r],value:h,onValueChange:d=()=>{},onValueCommit:g=()=>{},inverted:y=!1,...b}=e,x=v.useRef(new Set),C=v.useRef(0),w=s==="horizontal"?kJ:TJ,[k=[],E]=Yo({prop:h,defaultProp:f,onChange:I=>{var ee;(ee=[...x.current][C.current])==null||ee.focus(),d(I)}}),R=v.useRef(k);function A(I){const B=AJ(k,I);z(I,B)}function $(I){z(I,C.current)}function N(){const I=R.current[C.current];k[C.current]!==I&&g(k)}function z(I,B,{commit:ee}={commit:!1}){const Q=IJ(o),U=jJ(Math.round((I-r)/o)*o+r,Q),Y=IP(U,[r,i]);E((D=[])=>{const H=PJ(D,Y,B);if(NJ(H,u*o)){C.current=H.indexOf(Y);const O=String(H)!==String(D);return O&&ee&&g(H),O?H:D}else return D})}return m.jsx(CJ,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:C,thumbs:x.current,values:k,orientation:s,children:m.jsx(cb.Provider,{scope:e.__scopeSlider,children:m.jsx(cb.Slot,{scope:e.__scopeSlider,children:m.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...b,ref:t,onPointerDown:Oe(b.onPointerDown,()=>{a||(R.current=k)}),min:r,max:i,inverted:y,onSlideStart:a?void 0:A,onSlideMove:a?void 0:$,onSlideEnd:a?void 0:N,onHomeKeyDown:()=>!a&&z(r,0,{commit:!0}),onEndKeyDown:()=>!a&&z(i,k.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:B})=>{if(!a){const U=RO.includes(I.key)||I.shiftKey&&MO.includes(I.key)?10:1,Y=C.current,D=k[Y],H=o*U*B;z(D+H,Y,{commit:!0})}}})})})})});AO.displayName=Oc;var[$O,LO]=OO(Oc,{startEdge:"left",endEdge:"right",size:"width",direction:1}),kJ=v.forwardRef((e,t)=>{const{min:n,max:r,dir:i,inverted:o,onSlideStart:s,onSlideMove:a,onSlideEnd:u,onStepKeyDown:f,...h}=e,[d,g]=v.useState(null),y=jt(t,k=>g(k)),b=v.useRef(),x=Mh(i),C=x==="ltr",_=C&&!o||!C&&o;function w(k){const E=b.current||d.getBoundingClientRect(),R=[0,E.width],$=c3(R,_?[n,r]:[r,n]);return b.current=E,$(k-E.left)}return m.jsx($O,{scope:e.__scopeSlider,startEdge:_?"left":"right",endEdge:_?"right":"left",direction:_?1:-1,size:"width",children:m.jsx(NO,{dir:x,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:k=>{const E=w(k.clientX);s==null||s(E)},onSlideMove:k=>{const E=w(k.clientX);a==null||a(E)},onSlideEnd:()=>{b.current=void 0,u==null||u()},onStepKeyDown:k=>{const R=PO[_?"from-left":"from-right"].includes(k.key);f==null||f({event:k,direction:R?-1:1})}})})}),TJ=v.forwardRef((e,t)=>{const{min:n,max:r,inverted:i,onSlideStart:o,onSlideMove:s,onSlideEnd:a,onStepKeyDown:u,...f}=e,h=v.useRef(null),d=jt(t,h),g=v.useRef(),y=!i;function b(x){const C=g.current||h.current.getBoundingClientRect(),_=[0,C.height],k=c3(_,y?[r,n]:[n,r]);return g.current=C,k(x-C.top)}return m.jsx($O,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:m.jsx(NO,{"data-orientation":"vertical",...f,ref:d,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:x=>{const C=b(x.clientY);o==null||o(C)},onSlideMove:x=>{const C=b(x.clientY);s==null||s(C)},onSlideEnd:()=>{g.current=void 0,a==null||a()},onStepKeyDown:x=>{const _=PO[y?"from-bottom":"from-top"].includes(x.key);u==null||u({event:x,direction:_?-1:1})}})})}),NO=v.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:o,onHomeKeyDown:s,onEndKeyDown:a,onStepKeyDown:u,...f}=e,h=gv(Oc,n);return m.jsx(mt.span,{...f,ref:t,onKeyDown:Oe(e.onKeyDown,d=>{d.key==="Home"?(s(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):RO.concat(MO).includes(d.key)&&(u(d),d.preventDefault())}),onPointerDown:Oe(e.onPointerDown,d=>{const g=d.target;g.setPointerCapture(d.pointerId),d.preventDefault(),h.thumbs.has(g)?g.focus():r(d)}),onPointerMove:Oe(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&i(d)}),onPointerUp:Oe(e.onPointerUp,d=>{const g=d.target;g.hasPointerCapture(d.pointerId)&&(g.releasePointerCapture(d.pointerId),o(d))})})}),IO="SliderTrack",jO=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=gv(IO,n);return m.jsx(mt.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:t})});jO.displayName=IO;var fb="SliderRange",EJ=v.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,i=gv(fb,n),o=LO(fb,n),s=v.useRef(null),a=jt(t,s),u=i.values.length,f=i.values.map(g=>FO(g,i.min,i.max)),h=u>1?Math.min(...f):0,d=100-Math.max(...f);return m.jsx(mt.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...e.style,[o.startEdge]:h+"%",[o.endEdge]:d+"%"}})});EJ.displayName=fb;var db="SliderThumb",DO=v.forwardRef((e,t)=>{const n=wJ(e.__scopeSlider),[r,i]=v.useState(null),o=jt(t,a=>i(a)),s=v.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return m.jsx(RJ,{...e,ref:o,index:s})}),RJ=v.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:i,...o}=e,s=gv(db,n),a=LO(db,n),[u,f]=v.useState(null),h=jt(t,w=>f(w)),d=u?!!u.closest("form"):!0,g=PS(u),y=s.values[r],b=y===void 0?0:FO(y,s.min,s.max),x=OJ(r,s.values.length),C=g==null?void 0:g[a.size],_=C?$J(C,b,a.direction):0;return v.useEffect(()=>{if(u)return s.thumbs.add(u),()=>{s.thumbs.delete(u)}},[u,s.thumbs]),m.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${b}% + ${_}px)`},children:[m.jsx(cb.ItemSlot,{scope:e.__scopeSlider,children:m.jsx(mt.span,{role:"slider","aria-label":e["aria-label"]||x,"aria-valuemin":s.min,"aria-valuenow":y,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...o,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Oe(e.onFocus,()=>{s.valueIndexToChangeRef.current=r})})}),d&&m.jsx(MJ,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),value:y},r)]})});DO.displayName=db;var MJ=e=>{const{value:t,...n}=e,r=v.useRef(null),i=aP(t);return v.useEffect(()=>{const o=r.current,s=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(s,"value").set;if(i!==t&&u){const f=new Event("input",{bubbles:!0});u.call(o,t),o.dispatchEvent(f)}},[i,t]),m.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function PJ(e=[],t,n){const r=[...e];return r[n]=t,r.sort((i,o)=>i-o)}function FO(e,t,n){const o=100/(n-t)*(e-t);return IP(o,[0,100])}function OJ(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function AJ(e,t){if(e.length===1)return 0;const n=e.map(i=>Math.abs(i-t)),r=Math.min(...n);return n.indexOf(r)}function $J(e,t,n){const r=e/2,o=c3([0,50],[0,r]);return(r-o(t)*n)*n}function LJ(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function NJ(e,t){if(t>0){const n=LJ(e);return Math.min(...n)>=t}return!0}function c3(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function IJ(e){return(String(e).split(".")[1]||"").length}function jJ(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var DJ=AO,FJ=jO,zJ=DO;const WJ=["1","2","3"],UJ=["classic","surface","soft"],BJ={size:{type:"enum",className:"rt-r-size",values:WJ,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:UJ,default:"surface"},...Th,...DS},VJ=["left","right"],HJ={side:{type:"enum",values:VJ},...Th,gap:oP.gap,px:n0.px,pl:n0.pl,pr:n0.pr},zO=v.forwardRef((e,t)=>{const n=v.useRef(null),{children:r,className:i,color:o,radius:s,style:a,...u}=Gn(e,BJ,Fi);return v.createElement("div",{"data-accent-color":o,"data-radius":s,style:a,className:zt("rt-TextFieldRoot",i),onPointerDown:f=>{const h=f.target;if(h.closest("input, button, a"))return;const d=n.current;if(!d)return;const g=h.closest(` .rt-TextFieldSlot[data-side='right'], .rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left']) - `)?d.value.length:0;requestAnimationFrame(()=>{try{d.setSelectionRange(g,g)}catch{}d.focus()})}},v.createElement("input",{spellCheck:"false",...u,ref:kh(n,t),className:"rt-reset rt-TextFieldInput"}),r)});zO.displayName="TextField.Root";const hb=v.forwardRef((e,t)=>{const{className:n,color:r,side:i,...o}=Gn(e,HJ);return v.createElement("div",{"data-accent-color":r,"data-side":i,...o,ref:t,className:zt("rt-TextFieldSlot",n)})});hb.displayName="TextField.Slot";const GJ={content:{type:"ReactNode",required:!0},width:Ws.width,minWidth:Ws.minWidth,maxWidth:{...Ws.maxWidth,default:"360px"}},pn=v.forwardRef((e,t)=>{const{children:n,className:r,open:i,defaultOpen:o,onOpenChange:s,delayDuration:a,disableHoverableContent:u,content:f,container:h,forceMount:d,...g}=Gn(e,GJ),y={open:i,defaultOpen:o,onOpenChange:s,delayDuration:a,disableHoverableContent:u};return v.createElement(lY,{...y},v.createElement(uY,{asChild:!0},n),v.createElement(cY,{container:h,forceMount:d},v.createElement(cv,{asChild:!0},v.createElement(fY,{sideOffset:4,collisionPadding:10,...g,asChild:!1,ref:t,className:zt("rt-TooltipContent",r)},v.createElement(ae,{as:"p",className:"rt-TooltipText",size:"1"},f),v.createElement(dY,{className:"rt-TooltipArrow"})))))});pn.displayName="Tooltip";const s8="pushstate",a8="popstate",WO="beforeunload",UO=e=>(e.preventDefault(),e.returnValue=""),qJ=()=>{removeEventListener(WO,UO,{capture:!0})};function BO(e){let t=e.getLocation();const n=new Set;let r=[];const i=()=>{t=e.getLocation(),n.forEach(s=>s())},o=async(s,a)=>{var u;if(!((a==null?void 0:a.ignoreBlocker)??!1)&&typeof document<"u"&&r.length){for(const h of r)if(!await h()){(u=e.onBlocked)==null||u.call(e,i);return}}s()};return{get location(){return t},subscribers:n,subscribe:s=>(n.add(s),()=>{n.delete(s)}),push:(s,a,u)=>{a=ud(a),o(()=>{e.pushState(s,a),i()},u)},replace:(s,a,u)=>{a=ud(a),o(()=>{e.replaceState(s,a),i()},u)},go:(s,a)=>{o(()=>{e.go(s),i()},a)},back:s=>{o(()=>{e.back(),i()},s)},forward:s=>{o(()=>{e.forward(),i()},s)},createHref:s=>e.createHref(s),block:s=>(r.push(s),r.length===1&&addEventListener(WO,UO,{capture:!0}),()=>{r=r.filter(a=>a!==s),r.length||qJ()}),flush:()=>{var s;return(s=e.flush)==null?void 0:s.call(e)},destroy:()=>{var s;return(s=e.destroy)==null?void 0:s.call(e)},notify:i}}function ud(e){return e||(e={}),{...e,key:VO()}}function ZJ(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState,i=x=>x,o=()=>Z0(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);let s=o(),a;const u=()=>s;let f,h;const d=()=>{f&&(b._ignoreSubscribers=!0,(f.isPush?t.history.pushState:t.history.replaceState)(f.state,"",f.href),b._ignoreSubscribers=!1,f=void 0,h=void 0,a=void 0)},g=(x,C,_)=>{const w=i(C);h||(a=s),s=Z0(C,_),f={href:w,state:_,isPush:(f==null?void 0:f.isPush)||x==="push"},h||(h=Promise.resolve().then(()=>d()))},y=()=>{s=o(),b.notify()},b=BO({getLocation:u,pushState:(x,C)=>g("push",x,C),replaceState:(x,C)=>g("replace",x,C),back:()=>t.history.back(),forward:()=>t.history.forward(),go:x=>t.history.go(x),createHref:x=>i(x),flush:d,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(s8,y),t.removeEventListener(a8,y)},onBlocked:x=>{a&&s!==a&&(s=a,x())}});return t.addEventListener(s8,y),t.addEventListener(a8,y),t.history.pushState=function(...x){const C=n.apply(t.history,x);return b._ignoreSubscribers||y(),C},t.history.replaceState=function(...x){const C=r.apply(t.history,x);return b._ignoreSubscribers||y(),C},b}function KJ(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex??t.length-1,r={key:VO()};return BO({getLocation:()=>Z0(t[n],r),pushState:(o,s)=>{r=s,t.splice,n{r=s,t[n]=o},back:()=>{r=ud(r),n=Math.max(n-1,0)},forward:()=>{r=ud(r),n=Math.min(n+1,t.length-1)},go:o=>{r=ud(r),n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function Z0(e,t){const n=e.indexOf("#"),r=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{}}}function VO(){return(Math.random()+1).toString(36).substring(7)}var YJ="Invariant failed";function rr(e,t){if(!e)throw new Error(YJ)}const t2=v.createContext(null);function HO(){return typeof document>"u"?t2:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=t2,t2)}function aa(e){const t=v.useContext(HO());return e==null||e.warn,t}var GO={exports:{}},qO={},ZO={exports:{}},KO={};/** + `)?d.value.length:0;requestAnimationFrame(()=>{try{d.setSelectionRange(g,g)}catch{}d.focus()})}},v.createElement("input",{spellCheck:"false",...u,ref:kh(n,t),className:"rt-reset rt-TextFieldInput"}),r)});zO.displayName="TextField.Root";const hb=v.forwardRef((e,t)=>{const{className:n,color:r,side:i,...o}=Gn(e,HJ);return v.createElement("div",{"data-accent-color":r,"data-side":i,...o,ref:t,className:zt("rt-TextFieldSlot",n)})});hb.displayName="TextField.Slot";const GJ={content:{type:"ReactNode",required:!0},width:Us.width,minWidth:Us.minWidth,maxWidth:{...Us.maxWidth,default:"360px"}},cn=v.forwardRef((e,t)=>{const{children:n,className:r,open:i,defaultOpen:o,onOpenChange:s,delayDuration:a,disableHoverableContent:u,content:f,container:h,forceMount:d,...g}=Gn(e,GJ),y={open:i,defaultOpen:o,onOpenChange:s,delayDuration:a,disableHoverableContent:u};return v.createElement(lY,{...y},v.createElement(uY,{asChild:!0},n),v.createElement(cY,{container:h,forceMount:d},v.createElement(cv,{asChild:!0},v.createElement(fY,{sideOffset:4,collisionPadding:10,...g,asChild:!1,ref:t,className:zt("rt-TooltipContent",r)},v.createElement(ae,{as:"p",className:"rt-TooltipText",size:"1"},f),v.createElement(dY,{className:"rt-TooltipArrow"})))))});cn.displayName="Tooltip";const s8="pushstate",a8="popstate",WO="beforeunload",UO=e=>(e.preventDefault(),e.returnValue=""),ZJ=()=>{removeEventListener(WO,UO,{capture:!0})};function BO(e){let t=e.getLocation();const n=new Set;let r=[];const i=()=>{t=e.getLocation(),n.forEach(s=>s())},o=async(s,a)=>{var u;if(!((a==null?void 0:a.ignoreBlocker)??!1)&&typeof document<"u"&&r.length){for(const h of r)if(!await h()){(u=e.onBlocked)==null||u.call(e,i);return}}s()};return{get location(){return t},subscribers:n,subscribe:s=>(n.add(s),()=>{n.delete(s)}),push:(s,a,u)=>{a=ud(a),o(()=>{e.pushState(s,a),i()},u)},replace:(s,a,u)=>{a=ud(a),o(()=>{e.replaceState(s,a),i()},u)},go:(s,a)=>{o(()=>{e.go(s),i()},a)},back:s=>{o(()=>{e.back(),i()},s)},forward:s=>{o(()=>{e.forward(),i()},s)},createHref:s=>e.createHref(s),block:s=>(r.push(s),r.length===1&&addEventListener(WO,UO,{capture:!0}),()=>{r=r.filter(a=>a!==s),r.length||ZJ()}),flush:()=>{var s;return(s=e.flush)==null?void 0:s.call(e)},destroy:()=>{var s;return(s=e.destroy)==null?void 0:s.call(e)},notify:i}}function ud(e){return e||(e={}),{...e,key:VO()}}function qJ(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState,i=x=>x,o=()=>q0(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);let s=o(),a;const u=()=>s;let f,h;const d=()=>{f&&(b._ignoreSubscribers=!0,(f.isPush?t.history.pushState:t.history.replaceState)(f.state,"",f.href),b._ignoreSubscribers=!1,f=void 0,h=void 0,a=void 0)},g=(x,C,_)=>{const w=i(C);h||(a=s),s=q0(C,_),f={href:w,state:_,isPush:(f==null?void 0:f.isPush)||x==="push"},h||(h=Promise.resolve().then(()=>d()))},y=()=>{s=o(),b.notify()},b=BO({getLocation:u,pushState:(x,C)=>g("push",x,C),replaceState:(x,C)=>g("replace",x,C),back:()=>t.history.back(),forward:()=>t.history.forward(),go:x=>t.history.go(x),createHref:x=>i(x),flush:d,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(s8,y),t.removeEventListener(a8,y)},onBlocked:x=>{a&&s!==a&&(s=a,x())}});return t.addEventListener(s8,y),t.addEventListener(a8,y),t.history.pushState=function(...x){const C=n.apply(t.history,x);return b._ignoreSubscribers||y(),C},t.history.replaceState=function(...x){const C=r.apply(t.history,x);return b._ignoreSubscribers||y(),C},b}function KJ(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex??t.length-1,r={key:VO()};return BO({getLocation:()=>q0(t[n],r),pushState:(o,s)=>{r=s,t.splice,n{r=s,t[n]=o},back:()=>{r=ud(r),n=Math.max(n-1,0)},forward:()=>{r=ud(r),n=Math.min(n+1,t.length-1)},go:o=>{r=ud(r),n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function q0(e,t){const n=e.indexOf("#"),r=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{}}}function VO(){return(Math.random()+1).toString(36).substring(7)}var YJ="Invariant failed";function rr(e,t){if(!e)throw new Error(YJ)}const t2=v.createContext(null);function HO(){return typeof document>"u"?t2:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=t2,t2)}function la(e){const t=v.useContext(HO());return e==null||e.warn,t}var GO={exports:{}},ZO={},qO={exports:{}},KO={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -98,7 +98,7 @@ Defaulting to \`null\`.`}var YX=sO,QX=lO;const XX=["1","2","3"],JX=["classic","s * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var oc=v;function QJ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XJ=typeof Object.is=="function"?Object.is:QJ,JJ=oc.useState,eee=oc.useEffect,tee=oc.useLayoutEffect,nee=oc.useDebugValue;function ree(e,t){var n=t(),r=JJ({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return tee(function(){i.value=n,i.getSnapshot=t,n2(i)&&o({inst:i})},[e,n,t]),eee(function(){return n2(i)&&o({inst:i}),e(function(){n2(i)&&o({inst:i})})},[e]),nee(n),n}function n2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!XJ(e,n)}catch{return!0}}function iee(e,t){return t()}var oee=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?iee:ree;KO.useSyncExternalStore=oc.useSyncExternalStore!==void 0?oc.useSyncExternalStore:oee;ZO.exports=KO;var see=ZO.exports;/** + */var oc=v;function QJ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XJ=typeof Object.is=="function"?Object.is:QJ,JJ=oc.useState,eee=oc.useEffect,tee=oc.useLayoutEffect,nee=oc.useDebugValue;function ree(e,t){var n=t(),r=JJ({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return tee(function(){i.value=n,i.getSnapshot=t,n2(i)&&o({inst:i})},[e,n,t]),eee(function(){return n2(i)&&o({inst:i}),e(function(){n2(i)&&o({inst:i})})},[e]),nee(n),n}function n2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!XJ(e,n)}catch{return!0}}function iee(e,t){return t()}var oee=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?iee:ree;KO.useSyncExternalStore=oc.useSyncExternalStore!==void 0?oc.useSyncExternalStore:oee;qO.exports=KO;var see=qO.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -106,19 +106,19 @@ Defaulting to \`null\`.`}var YX=sO,QX=lO;const XX=["1","2","3"],JX=["classic","s * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var vv=v,aee=see;function lee(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uee=typeof Object.is=="function"?Object.is:lee,cee=aee.useSyncExternalStore,fee=vv.useRef,dee=vv.useEffect,hee=vv.useMemo,pee=vv.useDebugValue;qO.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=fee(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=hee(function(){function u(y){if(!f){if(f=!0,h=y,y=r(y),i!==void 0&&s.hasValue){var b=s.value;if(i(b,y))return d=b}return d=y}if(b=d,uee(h,y))return b;var x=r(y);return i!==void 0&&i(b,x)?b:(h=y,d=x)}var f=!1,h,d,g=n===void 0?null:n;return[function(){return u(t())},g===null?void 0:function(){return u(g())}]},[t,n,r,i]);var a=cee(e,o[0],o[1]);return dee(function(){s.hasValue=!0,s.value=a},[a]),pee(a),a};GO.exports=qO;var mee=GO.exports;class gee{constructor(t,n){this.listeners=new Set,this._batching=!1,this._flushing=0,this.subscribe=r=>{var i,o;this.listeners.add(r);const s=(o=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:o.call(i,r,this);return()=>{this.listeners.delete(r),s==null||s()}},this.setState=r=>{var i,o,s;const a=this.state;this.state=(i=this.options)!=null&&i.updateFn?this.options.updateFn(a)(r):r(a),(s=(o=this.options)==null?void 0:o.onUpdate)==null||s.call(o),this._flush()},this._flush=()=>{if(this._batching)return;const r=++this._flushing;this.listeners.forEach(i=>{this._flushing===r&&i()})},this.batch=r=>{if(this._batching)return r();this._batching=!0,r(),this._batching=!1,this._flush()},this.state=t,this.options=n}}function vee(e,t=n=>n){return mee.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,yee)}function yee(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r{t.substring(0,1)==="?"&&(t=t.substring(1));const n=xee(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function Cee(e,t){function n(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(typeof r=="string"&&typeof t=="function")try{return t(r),e(r)}catch{}return r}return r=>{r={...r},Object.keys(r).forEach(o=>{const s=r[o];typeof s>"u"||s===void 0?delete r[o]:r[o]=n(s)});const i=_ee(r).toString();return i?`?${i}`:""}}function cd(e){return e[e.length-1]}function kee(e){return typeof e=="function"}function ku(e,t){return kee(e)?e(t):e}function fd(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function su(e,t){if(e===t)return e;const n=t,r=c8(e)&&c8(n);if(r||sc(e)&&sc(n)){const i=r?e:Object.keys(e),o=i.length,s=r?n:Object.keys(n),a=s.length,u=r?[]:{};let f=0;for(let h=0;h"u")return!0;const n=t.prototype;return!(!u8(n)||!n.hasOwnProperty("isPrototypeOf"))}function u8(e){return Object.prototype.toString.call(e)==="[object Object]"}function c8(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ju(e,t,n=!1){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(sc(e)&&sc(t)){const r=Object.keys(e).filter(o=>e[o]!==void 0),i=Object.keys(t).filter(o=>t[o]!==void 0);return!n&&r.length!==i.length?!1:!i.some(o=>!(o in e)||!ju(e[o],t[o],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((r,i)=>!ju(r,t[i],n)):!1}const r2=typeof window<"u"?v.useLayoutEffect:v.useEffect;function au(e){let t,n;const r=new Promise((i,o)=>{t=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function f8(e){const t=v.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Tee(e,t,n={},r={}){const i=v.useRef(typeof IntersectionObserver=="function"),o=v.useRef(null);return v.useEffect(()=>{if(!(!e.current||!i.current||r.disabled))return o.current=new IntersectionObserver(([s])=>{t(s)},n),o.current.observe(e.current),()=>{var s;(s=o.current)==null||s.disconnect()}},[t,n,r.disabled,e]),o.current}function Eee(e){const t=v.useRef(null);return v.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t}function Us(e){return yv(e.filter(t=>t!==void 0).join("/"))}function yv(e){return e.replace(/\/{2,}/g,"/")}function f3(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ia(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Ree(e){return Ia(f3(e))}function K0(e,t){return e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Mee(e,t,n){return K0(e,n)===K0(t,n)}function Pee({basepath:e,base:t,to:n,trailingSlash:r="never"}){var i,o;t=Y0(e,t),n=Y0(e,n);let s=ac(t);const a=ac(n);s.length>1&&((i=cd(s))==null?void 0:i.value)==="/"&&s.pop(),a.forEach((f,h)=>{f.value==="/"?h?h===a.length-1&&s.push(f):s=[f]:f.value===".."?s.pop():f.value==="."||s.push(f)}),s.length>1&&(((o=cd(s))==null?void 0:o.value)==="/"?r==="never"&&s.pop():r==="always"&&s.push({type:"pathname",value:"/"}));const u=Us([e,...s.map(f=>f.value)]);return yv(u)}function ac(e){if(!e)return[];e=yv(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(r=>r==="$"||r==="*"?{type:"wildcard",value:r}:r.charAt(0)==="$"?{type:"param",value:r}:{type:"pathname",value:decodeURI(r)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function i2({path:e,params:t,leaveWildcards:n,leaveParams:r}){const i=ac(e),o={};for(const[s,a]of Object.entries(t)){const u=typeof a=="string";["*","_splat"].includes(s)?o[s]=u?encodeURI(a):a:o[s]=u?encodeURIComponent(a):a}return Us(i.map(s=>{if(s.type==="wildcard"){const a=o._splat;return n?`${s.value}${a??""}`:a}if(s.type==="param"){if(r){const a=o[s.value];return`${s.value}${a??""}`}return o[s.value.substring(1)]??"undefined"}return s.value}))}function gm(e,t,n){const r=Oee(e,t,n);if(!(n.to&&!r))return r??{}}function Y0(e,t){switch(!0){case e==="/":return t;case t===e:return"";case t.length{for(let u=0;u=i.length-1,g=u>=o.length-1;if(h){if(h.type==="wildcard"){const y=decodeURI(Us(i.slice(u).map(b=>b.value)));return s["*"]=y,s._splat=y,!0}if(h.type==="pathname"){if(h.value==="/"&&!(f!=null&&f.value))return!0;if(f){if(n.caseSensitive){if(h.value!==f.value)return!1}else if(h.value.toLowerCase()!==f.value.toLowerCase())return!1}}if(!f)return!1;if(h.type==="param"){if(f.value==="/")return!1;f.value.charAt(0)!=="$"&&(s[h.value.substring(1)]=decodeURIComponent(f.value))}}if(!d&&g)return s["**"]=Us(i.slice(u+1).map(y=>y.value)),!!n.fuzzy&&(h==null?void 0:h.value)!=="/"}return!0})()?s:void 0}function Ra(e){return!!(e!=null&&e.isRedirect)}function d8(e){return!!(e!=null&&e.isRedirect)&&e.href}function d3(e){const t=e.errorComponent??_v;return m.jsx(Aee,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?v.createElement(t,{error:n,reset:r}):e.children})}class Aee extends v.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function _v({error:e}){const[t,n]=v.useState(!1);return m.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[m.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),m.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),m.jsx("div",{style:{height:".25rem"}}),t?m.jsx("div",{children:m.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?m.jsx("code",{children:e.message}):null})}):null]})}function dr(e){const t=aa({warn:(e==null?void 0:e.router)===void 0});return vee(((e==null?void 0:e.router)||t).__store,e==null?void 0:e.select)}function qi(e){return!!(e!=null&&e.isNotFound)}function $ee(e){const t=dr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return m.jsx(d3,{getResetKey:()=>t,onCatch:(n,r)=>{var i;if(qi(n))(i=e.onCatch)==null||i.call(e,n,r);else throw n},errorComponent:({error:n})=>{var r;return(r=e.fallback)==null?void 0:r.call(e,n)},children:e.children})}function Lee(){return m.jsx("p",{children:"Not Found"})}const Nee={stringify:e=>JSON.stringify(e,function(n,r){const i=this[n],o=h8.find(s=>s.stringifyCondition(i));return o?o.stringify(i):r}),parse:e=>JSON.parse(e,function(n,r){const i=this[n],o=h8.find(s=>s.parseCondition(i));return o?o.parse(i):r})},h8=[{stringifyCondition:e=>e instanceof Date,stringify:e=>({$date:e.toISOString()}),parseCondition:e=>sc(e)&&e.$date,parse:e=>new Date(e.$date)},{stringifyCondition:e=>e===void 0,stringify:()=>({$undefined:""}),parseCondition:e=>sc(e)&&e.$undefined==="",parse:()=>{}}],YO=["component","errorComponent","pendingComponent","notFoundComponent"];function Iee(e){var t;for(const n of YO)if((t=e.options[n])!=null&&t.preload)return!0;return!1}function jee(e){return new Dee(e)}class Dee{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.subscribers=new Set,this.startReactTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options;this.options={...this.options,...n},this.isServer=this.options.isServer??typeof document>"u",(!this.basepath||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${Ree(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?KJ({initialEntries:[this.basepath||"/"]}):ZJ()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new gee(Wee(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(i=>!["redirected"].includes(i.status))}}}))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n);const r=s=>{s.forEach((a,u)=>{a.init({originalIndex:u});const f=this.routesById[a.id];if(rr(!f,`Duplicate routes found with id: ${String(a.id)}`),this.routesById[a.id]=a,!a.isRoot&&a.path){const d=Ia(a.fullPath);(!this.routesByPath[d]||a.fullPath.endsWith("/"))&&(this.routesByPath[d]=a)}const h=a.children;h!=null&&h.length&&r(h)})};r([this.routeTree]);const i=[];Object.values(this.routesById).forEach((s,a)=>{var u;if(s.isRoot||!s.path)return;const f=f3(s.fullPath),h=ac(f);for(;h.length>1&&((u=h[0])==null?void 0:u.value)==="/";)h.shift();const d=h.map(g=>g.value==="/"?.75:g.type==="param"?.5:g.type==="wildcard"?.25:1);i.push({child:s,trimmed:f,parsed:h,index:a,scores:d})}),this.flatRoutes=i.sort((s,a)=>{const u=Math.min(s.scores.length,a.scores.length);for(let f=0;fa.parsed[f].value?1:-1;return s.index-a.index}).map((s,a)=>(s.child.rank=a,s.child))},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=n=>{const r=({pathname:a,search:u,hash:f,state:h})=>{const d=this.options.parseSearch(u),g=this.options.stringifySearch(d);return{pathname:a,searchStr:g,search:su(n==null?void 0:n.search,d),hash:f.split("#").reverse()[0]??"",href:`${a}${g}${f}`,state:su(n==null?void 0:n.state,h)}},i=r(this.history.location),{__tempLocation:o,__tempKey:s}=i.state;if(o&&(!s||s===this.tempLocationKey)){const a=r(o);return a.state.key=i.state.key,delete a.state.__tempLocation,{...a,maskedLocation:i}}return i},this.resolvePathWithBase=(n,r)=>Pee({basepath:this.basepath,base:n,to:yv(r),trailingSlash:this.options.trailingSlash}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=n=>{const r=(o={},s)=>{var a,u,f,h,d;const g=o._fromLocation?this.matchRoutes(o._fromLocation):this.state.matches,y=o.from!=null?g.find(Y=>gm(this.basepath,Ia(Y.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,b=(y==null?void 0:y.pathname)||this.latestLocation.pathname;rr(o.from==null||y!=null,"Could not find match for from: "+o.from);const x=(a=this.state.pendingMatches)!=null&&a.length?(u=cd(this.state.pendingMatches))==null?void 0:u.search:((f=cd(g))==null?void 0:f.search)||this.latestLocation.search,C=s==null?void 0:s.filter(Y=>g.find(D=>D.routeId===Y.routeId)),_=this.routesById[(h=C==null?void 0:C.find(Y=>Y.pathname===b))==null?void 0:h.routeId];let w=o.to?this.resolvePathWithBase(b,`${o.to}`):this.resolvePathWithBase(b,(_==null?void 0:_.to)??b);const k={...(d=cd(g))==null?void 0:d.params};let E=(o.params??!0)===!0?k:{...k,...ku(o.params,k)};Object.keys(E).length>0&&(s==null||s.map(Y=>{var D;const H=this.looseRoutesById[Y.routeId];return((D=H==null?void 0:H.options.params)==null?void 0:D.stringify)??H.options.stringifyParams}).filter(Boolean).forEach(Y=>{E={...E,...Y(E)}})),w=i2({path:w,params:E??{},leaveWildcards:!1,leaveParams:n.leaveParams});const R=(C==null?void 0:C.map(Y=>this.looseRoutesById[Y.routeId].options.preSearchFilters??[]).flat().filter(Boolean))??[],A=(C==null?void 0:C.map(Y=>this.looseRoutesById[Y.routeId].options.postSearchFilters??[]).flat().filter(Boolean))??[],$=R.length?R.reduce((Y,D)=>D(Y),x):x,I=o.search===!0?$:o.search?ku(o.search,$):R.length?$:{},F=A.length?A.reduce((Y,D)=>D(Y),I):I,N=su(x,F),B=this.options.stringifySearch(N),ee=o.hash===!0?this.latestLocation.hash:o.hash?ku(o.hash,this.latestLocation.hash):void 0,Q=ee?`#${ee}`:"";let U=o.state===!0?this.latestLocation.state:o.state?ku(o.state,this.latestLocation.state):{};return U=su(this.latestLocation.state,U),{pathname:w,search:N,searchStr:B,state:U,hash:ee??"",href:`${w}${B}${Q}`,unmaskOnReload:o.unmaskOnReload}},i=(o={},s)=>{var a;const u=r(o);let f=s?r(s):void 0;if(!f){let b={};const x=(a=this.options.routeMasks)==null?void 0:a.find(C=>{const _=gm(this.basepath,u.pathname,{to:C.from,caseSensitive:!1,fuzzy:!1});return _?(b=_,!0):!1});if(x){const{from:C,..._}=x;s={...fd(n,["from"]),..._,params:b},f=r(s)}}const h=this.matchRoutes(u),d=f?this.matchRoutes(f):void 0,g=f?r(s,d):void 0,y=r(o,h);return g&&(y.maskedLocation=g),y};return n.mask?i(n,{...fd(n,["from"]),...n.mask}):i(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...i})=>{const o=()=>{i.state.key=this.latestLocation.state.key;const u=ju(i.state,this.latestLocation.state);return delete i.state.key,u},s=this.latestLocation.href===i.href,a=this.commitLocationPromise;if(this.commitLocationPromise=au(()=>{a==null||a.resolve()}),s&&o())this.load();else{let{maskedLocation:u,...f}=i;u&&(f={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](f.href,f.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,viewTransition:i,ignoreBlocker:o,...s}={})=>{const a=s.href;if(a){const f=Z0(a,{});s.to=f.pathname,s.search=this.options.parseSearch(f.search),s.hash=f.hash}const u=this.buildLocation(s);return this.commitLocation({...u,viewTransition:i,replace:n,resetScroll:r,ignoreBlocker:o})},this.navigate=({to:n,...r})=>{const i=String(n);let o;try{new URL(`${i}`),o=!0}catch{}return rr(!o),this.buildAndCommitLocation({...r,to:n})},this.load=async()=>{this.latestLocation=this.parseLocation(this.latestLocation);let n,r,i;for(i=new Promise(o=>{this.startReactTransition(async()=>{var s;try{const a=this.latestLocation,u=this.state.resolvedLocation,f=u.href!==a.href;this.cancelMatches();let h;this.__store.batch(()=>{h=this.matchRoutes(a),this.__store.setState(d=>({...d,status:"pending",isLoading:!0,location:a,pendingMatches:h,cachedMatches:d.cachedMatches.filter(g=>!h.find(y=>y.id===g.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",fromLocation:u,toLocation:a,pathChanged:f}),this.emit({type:"onBeforeLoad",fromLocation:u,toLocation:a,pathChanged:f}),await this.loadMatches({matches:h,location:a,onReady:async()=>{this.startViewTransition(async()=>{let d,g,y;this.__store.batch(()=>{this.__store.setState(b=>{const x=b.matches,C=b.pendingMatches||b.matches;return d=x.filter(_=>!C.find(w=>w.id===_.id)),g=C.filter(_=>!x.find(w=>w.id===_.id)),y=x.filter(_=>C.find(w=>w.id===_.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:C,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...d.filter(_=>_.status!=="error")]}}),this.cleanCache()}),[[d,"onLeave"],[g,"onEnter"],[y,"onStay"]].forEach(([b,x])=>{b.forEach(C=>{var _,w;(w=(_=this.looseRoutesById[C.routeId].options)[x])==null||w.call(_,C)})})})}})}catch(a){d8(a)?(n=a,this.isServer||this.navigate({...a,replace:!0,ignoreBlocker:!0})):qi(a)&&(r=a),this.__store.setState(u=>({...u,statusCode:n?n.statusCode:r?404:u.matches.some(f=>f.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===i&&((s=this.commitLocationPromise)==null||s.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"?document.startViewTransition(n):n()},this.updateMatch=(n,r)=>{var i;let o;const s=(i=this.state.pendingMatches)==null?void 0:i.find(f=>f.id===n),a=this.state.matches.find(f=>f.id===n),u=s?"pendingMatches":a?"matches":"cachedMatches";return this.__store.setState(f=>{var h;return{...f,[u]:(h=f[u])==null?void 0:h.map(d=>d.id===n?o=r(d):d)}}),o},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(r=>r.id===n),this.loadMatches=async({location:n,matches:r,preload:i,onReady:o,updateMatch:s=this.updateMatch})=>{let a,u=!1;const f=async()=>{u||(u=!0,await(o==null?void 0:o()))};!this.isServer&&!this.state.matches.length&&f();const h=(d,g)=>{var y,b,x;if(d8(g))throw g;if(Ra(g)||qi(g)){if(s(d.id,C=>({...C,status:Ra(g)?"redirected":qi(g)?"notFound":"error",isFetching:!1,error:g,beforeLoadPromise:void 0,loaderPromise:void 0})),g.routeId||(g.routeId=d.routeId),(y=d.beforeLoadPromise)==null||y.resolve(),(b=d.loaderPromise)==null||b.resolve(),(x=d.loadPromise)==null||x.resolve(),Ra(g))throw u=!0,g=this.resolveRedirect({...g,_fromLocation:n}),g;if(qi(g))throw this._handleNotFound(r,g,{updateMatch:s}),g}};try{await new Promise((d,g)=>{(async()=>{var y,b,x;try{const C=(k,E,R)=>{var A,$;const{id:I,routeId:F}=r[k],N=this.looseRoutesById[F];if(E instanceof Promise)throw E;E.routerCode=R,a=a??k,h(this.getMatch(I),E);try{($=(A=N.options).onError)==null||$.call(A,E)}catch(B){E=B,h(this.getMatch(I),E)}s(I,B=>{var ee;return(ee=B.beforeLoadPromise)==null||ee.resolve(),{...B,error:E,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[k,{id:E,routeId:R}]of r.entries()){const A=this.getMatch(E),$=(y=r[k-1])==null?void 0:y.id,I=this.looseRoutesById[R],F=I.options.pendingMs??this.options.defaultPendingMs,N=!!(o&&!this.isServer&&!i&&(I.options.loader||I.options.beforeLoad)&&typeof F=="number"&&F!==1/0&&(I.options.pendingComponent??this.options.defaultPendingComponent));if(A.beforeLoadPromise||A.loaderPromise)N&&setTimeout(()=>{try{f()}catch{}},F),await A.beforeLoadPromise;else{try{s(E,Z=>({...Z,loadPromise:au(()=>{var de;(de=Z.loadPromise)==null||de.resolve()}),beforeLoadPromise:au()}));const B=new AbortController;let ee;N&&(ee=setTimeout(()=>{try{f()}catch{}},F));const{paramsError:Q,searchError:U}=this.getMatch(E);Q&&C(k,Q,"PARSE_PARAMS"),U&&C(k,U,"VALIDATE_SEARCH");const Y=()=>$?this.getMatch($).context:this.options.context??{};s(E,Z=>({...Z,isFetching:"beforeLoad",fetchCount:Z.fetchCount+1,abortController:B,pendingTimeout:ee,context:{...Y(),...Z.__routeContext,...Z.__beforeLoadContext}}));const{search:D,params:H,context:O,cause:L}=this.getMatch(E),V={search:D,abortController:B,params:H,preload:!!i,context:O,location:n,navigate:Z=>this.navigate({...Z,_fromLocation:n}),buildLocation:this.buildLocation,cause:i?"preload":L,matches:r};let K=await((x=(b=I.options).beforeLoad)==null?void 0:x.call(b,V))??{};this.serializeLoaderData&&(K=this.serializeLoaderData("__beforeLoadContext",K,{router:this,match:this.getMatch(E)})),(Ra(K)||qi(K))&&C(k,K,"BEFORE_LOAD"),s(E,Z=>({...Z,__beforeLoadContext:K,context:{...Y(),...Z.__routeContext,...K},abortController:B}))}catch(B){C(k,B,"BEFORE_LOAD")}s(E,B=>{var ee;return(ee=B.beforeLoadPromise)==null||ee.resolve(),{...B,beforeLoadPromise:void 0,isFetching:!1}})}}const _=r.slice(0,a),w=[];_.forEach(({id:k,routeId:E},R)=>{w.push((async()=>{const{loaderPromise:A}=this.getMatch(k);let $=!1;if(A)await A;else{const I=w[R-1],F=this.looseRoutesById[E],N=()=>{const{params:V,loaderDeps:K,abortController:Z,context:de,cause:Ee}=this.getMatch(k);return{params:V,deps:K,preload:!!i,parentMatchPromise:I,abortController:Z,context:de,location:n,navigate:ve=>this.navigate({...ve,_fromLocation:n}),cause:i?"preload":Ee,route:F}},B=Date.now()-this.getMatch(k).updatedAt,ee=i?F.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:F.options.staleTime??this.options.defaultStaleTime??0,Q=F.options.shouldReload,U=typeof Q=="function"?Q(N()):Q;s(k,V=>({...V,loaderPromise:au(),preload:!!i&&!this.state.matches.find(K=>K.id===k)}));const Y=async()=>{var V,K,Z,de,Ee,ve,we,Me;try{const $e=async()=>{const ne=this.getMatch(k);ne.minPendingPromise&&await ne.minPendingPromise};try{F._lazyPromise=F._lazyPromise||(F.lazyFn?F.lazyFn().then(We=>{Object.assign(F.options,We.options)}):Promise.resolve());const ne=this.getMatch(k).componentsPromise||F._lazyPromise.then(()=>Promise.all(YO.map(async We=>{const _e=F.options[We];_e!=null&&_e.preload&&await _e.preload()})));s(k,We=>({...We,isFetching:"loader",componentsPromise:ne}));let ye=await((K=(V=F.options).loader)==null?void 0:K.call(V,N()));this.serializeLoaderData&&(ye=this.serializeLoaderData("loaderData",ye,{router:this,match:this.getMatch(k)})),h(this.getMatch(k),ye),await F._lazyPromise,await $e();const ke=(de=(Z=F.options).meta)==null?void 0:de.call(Z,{matches:r,match:this.getMatch(k),params:this.getMatch(k).params,loaderData:ye}),oe=(ve=(Ee=F.options).headers)==null?void 0:ve.call(Ee,{loaderData:ye});s(k,We=>({...We,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:ye,meta:ke,headers:oe}))}catch(ne){let ye=ne;await $e(),h(this.getMatch(k),ne);try{(Me=(we=F.options).onError)==null||Me.call(we,ne)}catch(ke){ye=ke,h(this.getMatch(k),ke)}s(k,ke=>({...ke,error:ye,status:"error",isFetching:!1}))}await this.getMatch(k).componentsPromise}catch($e){h(this.getMatch(k),$e)}},{status:D,invalid:H}=this.getMatch(k);$=D==="success"&&(H||(U??B>ee)),i&&F.options.preload===!1||($?(async()=>{try{await Y()}catch{}})():D!=="success"&&await Y());const{loaderPromise:O,loadPromise:L}=this.getMatch(k);O==null||O.resolve(),L==null||L.resolve()}s(k,I=>({...I,isFetching:$?I.isFetching:!1,loaderPromise:void 0}))})())}),await Promise.all(w),d()}catch(C){g(C)}})()}),await f()}catch(d){if(Ra(d)||qi(d))throw qi(d)&&!i&&await f(),d}return r},this.invalidate=()=>{const n=r=>({...r,invalid:!0,...r.status==="error"?{status:"pending",error:void 0}:{}});return this.__store.setState(r=>{var i;return{...r,matches:r.matches.map(n),cachedMatches:r.cachedMatches.map(n),pendingMatches:(i=r.pendingMatches)==null?void 0:i.map(n)}}),this.load()},this.resolveRedirect=n=>{const r=n;return r.href||(r.href=this.buildLocation(r).href),r},this.cleanCache=()=>{this.__store.setState(n=>({...n,cachedMatches:n.cachedMatches.filter(r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!1;const o=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return r.status!=="error"&&Date.now()-r.updatedAt{const r=this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0});const o=Object.fromEntries([...this.state.matches,...this.state.pendingMatches??[],...this.state.cachedMatches].map(a=>[a.id,!0]));this.__store.batch(()=>{i.forEach(a=>{o[a.id]||this.__store.setState(u=>({...u,cachedMatches:[...u.cachedMatches,a]}))})});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id));try{return i=await this.loadMatches({matches:i,location:r,preload:!0,updateMatch:(a,u)=>{s.has(a)?i=i.map(f=>f.id===a?u(f):f):this.updateMatch(a,u)}}),i}catch(a){if(Ra(a))return await this.preloadRoute({...a,_fromLocation:r});console.error(a);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation,u=gm(this.basepath,a.pathname,{...r,to:o.pathname});return!u||n.params&&!ju(u,n.params,!0)?!1:u&&((r==null?void 0:r.includeSearch)??!0)?ju(a.search,o.search,!0)?u:!1:u},this.dehydrate=()=>{var n;const r=((n=this.options.errorSerializer)==null?void 0:n.serialize)??Uee;return{state:{dehydratedMatches:this.state.matches.map(i=>({...fd(i,["id","status","updatedAt"]),error:i.error?{data:r(i.error),__isServerError:!0}:void 0}))},manifest:this.manifest}},this.hydrate=()=>{var n,r,i;let o;typeof document<"u"&&(o=this.options.transformer.parse((n=window.__TSR__)==null?void 0:n.dehydrated)),rr(o),this.dehydratedData=o.payload,(i=(r=this.options).hydrate)==null||i.call(r,o.payload);const s=o.router.state,a=this.matchRoutes(this.state.location).map(u=>{const f=s.dehydratedMatches.find(h=>h.id===u.id);return rr(f,`Could not find a client-side match for dehydrated match with id: ${u.id}!`),{...u,...f}});this.__store.setState(u=>({...u,matches:a})),this.manifest=o.router.manifest},this.injectedHtml=[],this.injectHtml=n=>{const r=()=>(this.injectedHtml=this.injectedHtml.filter(i=>i!==r),n);this.injectedHtml.push(r)},this.streamedKeys=new Set,this.getStreamedValue=n=>{var r;if(this.isServer)return;const i=(r=window.__TSR__)==null?void 0:r.streamedValues[n];if(i)return i.parsed||(i.parsed=this.options.transformer.parse(i.value)),i.parsed},this.streamValue=(n,r)=>{var i;this.streamedKeys.has(n),this.streamedKeys.add(n);const o=`__TSR__.streamedValues['${n}'] = { value: ${(i=this.serializer)==null?void 0:i.call(this,this.options.transformer.stringify(r))}}`;this.injectHtml(` - + +
diff --git a/src/app/fdctl/run/tiles/fd_resolv.c b/src/app/fdctl/run/tiles/fd_resolv.c index 7c95c12e49..90a9c594d5 100644 --- a/src/app/fdctl/run/tiles/fd_resolv.c +++ b/src/app/fdctl/run/tiles/fd_resolv.c @@ -4,6 +4,7 @@ #include "../../../../disco/bank/fd_bank_abi.h" #include "../../../../flamenco/types/fd_types.h" #include "../../../../flamenco/runtime/fd_system_ids.h" +#include "../../../../flamenco/runtime/fd_system_ids_pp.h" #define FD_RESOLV_IN_KIND_FRAGMENT (0) #define FD_RESOLV_IN_KIND_BANK (1) @@ -23,10 +24,25 @@ typedef struct blockhash_map blockhash_map_t; static const blockhash_t null_blockhash = { 0 }; +/* The blockhash ring holds recent blockhashes, so we can identify when + a transaction arrives, what slot it will expire (and can no longer be + packed) in. This is useful so we don't send transactions to pack + that are no longer packable. + + Unfortunately, poorly written transaction senders frequently send + transactions from millions of slots ago, so we need a large ring to + be able to determine and evict these. The highest practically useful + value here is around 22, which works out to 19 days of blockhash + history. Beyond this, the validator is likely to be restarted, and + lose the history anyway. */ + +#define BLOCKHASH_LG_RING_CNT 22UL +#define BLOCKHASH_RING_LEN (1UL<metrics.blockhash_expired ); - FD_MCNT_SET( RESOLV, BLOCKHASH_UNKNOWN, ctx->metrics.blockhash_unknown ); FD_MCNT_ENUM_COPY( RESOLV, LUT_RESOLVED, ctx->metrics.lut ); + FD_MCNT_ENUM_COPY( RESOLV, STASH_OPERATION, ctx->metrics.stash ); } static int @@ -151,6 +220,79 @@ during_frag( fd_resolv_ctx_t * ctx, } } +static inline int +publish_txn( fd_resolv_ctx_t * ctx, + fd_stem_context_t * stem, + fd_stashed_txn_m_t const * stashed ) { + fd_txn_m_t * txnm = (fd_txn_m_t *)fd_chunk_to_laddr( ctx->out_mem, ctx->out_chunk ); + fd_txn_t const * txnt = fd_txn_m_txn_t( txnm ); + + fd_memcpy( txnm, stashed->_, fd_txn_m_realized_footprint( txnm, 0 ) ); + txnm->reference_slot = ctx->flushing_slot; + + if( FD_UNLIKELY( txnt->addr_table_adtl_cnt ) ) { + if( FD_UNLIKELY( !ctx->root_bank ) ) { + FD_MCNT_INC( RESOLV, NO_BANK_DROP, 1 ); + return 0; + } else { + int result = fd_bank_abi_resolve_address_lookup_tables( ctx->root_bank, 0, ctx->root_slot, txnt, fd_txn_m_payload( txnm ), fd_txn_m_alut( txnm ) ); + /* result is in [-5, 0]. We want to map -5 to 0, -4 to 1, etc. */ + ctx->metrics.lut[ (ulong)((long)FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_CNT+result-1L) ]++; + + if( FD_UNLIKELY( result!=FD_BANK_ABI_TXN_INIT_SUCCESS ) ) return 0; + } + } + + ulong realized_sz = fd_txn_m_realized_footprint( txnm, 1 ); + ulong tspub = fd_frag_meta_ts_comp( fd_tickcount() ); + fd_stem_publish( stem, 0UL, txnm->reference_slot, ctx->out_chunk, realized_sz, 0UL, 0UL, tspub ); + ctx->out_chunk = fd_dcache_compact_next( ctx->out_chunk, realized_sz, ctx->out_chunk0, ctx->out_wmark ); + + return 1; +} + +static inline void +after_credit( fd_resolv_ctx_t * ctx, + fd_stem_context_t * stem, + int * opt_poll_in, + int * charge_busy ) { + if( FD_LIKELY( ctx->flush_pool_idx==ULONG_MAX ) ) return; + + *charge_busy = 1; + *opt_poll_in = 0; + + ulong next = map_chain_idx_next_const( ctx->flush_pool_idx, ULONG_MAX, ctx->pool ); + map_chain_idx_remove_fast( ctx->map_chain, ctx->flush_pool_idx, ctx->pool ); + if( FD_LIKELY( publish_txn( ctx, stem, pool_ele( ctx->pool, ctx->flush_pool_idx ) ) ) ) { + ctx->metrics.stash[ FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_PUBLISHED_IDX ]++; + } else { + ctx->metrics.stash[ FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_REMOVED_IDX ]++; + } + lru_list_idx_remove( ctx->lru_list, ctx->flush_pool_idx, ctx->pool ); + pool_idx_release( ctx->pool, ctx->flush_pool_idx ); + ctx->flush_pool_idx = next; +} + +/* Returns 0 if not a durable nonce transaction and 1 if it may be a + durable nonce transaction */ + +FD_FN_PURE static inline int +fd_resolv_is_durable_nonce( fd_txn_t const * txn, + uchar const * payload ) { + if( FD_UNLIKELY( txn->instr_cnt==0 ) ) return 0; + + fd_txn_instr_t const * ix0 = &txn->instr[ 0 ]; + fd_acct_addr_t const * prog0 = fd_txn_get_acct_addrs( txn, payload ) + ix0->program_id; + /* First instruction must be SystemProgram nonceAdvance instruction */ + fd_acct_addr_t const system_program[1] = { { { SYS_PROG_ID } } }; + if( FD_LIKELY( memcmp( prog0, system_program, sizeof(fd_acct_addr_t) ) ) ) return 0; + + /* one byte instruction with the only byte being 4 */ + if( FD_UNLIKELY( (ix0->data_sz!=1) | (ix0->acct_cnt!=3) ) ) return 0; + + return payload[ ix0->data_off ]==4; +} + static inline void after_frag( fd_resolv_ctx_t * ctx, ulong in_idx, @@ -176,15 +318,19 @@ after_frag( fd_resolv_ctx_t * ctx, case 1: { fd_completed_bank_t * frag = (fd_completed_bank_t *)ctx->_bank_msg; - blockhash_map_t * entry = map_query( ctx->blockhash_map, ctx->blockhash_ring[ ctx->blockhash_ring_idx%4096UL ], NULL ); + blockhash_map_t * entry = map_query( ctx->blockhash_map, ctx->blockhash_ring[ ctx->blockhash_ring_idx%BLOCKHASH_RING_LEN ], NULL ); if( FD_LIKELY( entry ) ) map_remove( ctx->blockhash_map, entry ); - memcpy( ctx->blockhash_ring[ ctx->blockhash_ring_idx%4096UL ].b, frag->hash, 32UL ); + memcpy( ctx->blockhash_ring[ ctx->blockhash_ring_idx%BLOCKHASH_RING_LEN ].b, frag->hash, 32UL ); ctx->blockhash_ring_idx++; blockhash_map_t * blockhash = map_insert( ctx->blockhash_map, *(blockhash_t *)frag->hash ); blockhash->slot = frag->slot; + uchar * hash = frag->hash; + ctx->flush_pool_idx = map_chain_idx_query( ctx->map_chain, &hash, ULONG_MAX, ctx->pool ); + ctx->flushing_slot = frag->slot; + ctx->completed_slot = frag->slot; break; } @@ -197,17 +343,28 @@ after_frag( fd_resolv_ctx_t * ctx, fd_txn_m_t * txnm = (fd_txn_m_t *)fd_chunk_to_laddr( ctx->out_mem, ctx->out_chunk ); fd_txn_t const * txnt = fd_txn_m_txn_t( txnm ); - /* If we can't find the recent blockhash ... it means one of three things, + /* If we find the recent blockhash, life is simple. We drop + transactions that couldn't possibly execute any more, and forward + to pack ones that could. + + If we can't find the recent blockhash ... it means one of four + things, + + (1) The blockhash is really old (more than 19 days) or just + non-existent. + (2) The blockhash is not that old, but was created before this + validator was started. + (3) It's really new (we haven't seen the bank yet). + (4) It's a durable nonce transaction, or part of a bundle (just let + it pass). - (1) It's really old (more than 28 minutes) or just non-existent. - (2) It's really new (we haven't seen the bank yet). - (3) It's a durable nonce transaction (just let it pass). + For durable nonce transactions, there isn't much we can do except + pass them along and see if they execute. - We want to assume case (2) for now, because we don't want to drop - early incoming votes and things if we don't yet know the bank. If - there's a lot of spam coming in with old blockhashes, we can - introduce a holding area here to keep them until we know if they - are valid or not. */ + For the other three cases ... we don't want to flood pack with what + might be junk transactions, so we accumulate them into a local + buffer. If we later see the blockhash come to exist, we forward any + buffered transactions to back. */ txnm->reference_slot = ctx->completed_slot; blockhash_map_t const * blockhash = map_query_const( ctx->blockhash_map, *(blockhash_t*)( fd_txn_m_payload( txnm )+txnt->recent_blockhash_off ), NULL ); @@ -217,8 +374,38 @@ after_frag( fd_resolv_ctx_t * ctx, ctx->metrics.blockhash_expired++; return; } - } else { - ctx->metrics.blockhash_unknown++; + } + + int is_bundle_member = 0; /* TODO */ + int is_durable_nonce = fd_resolv_is_durable_nonce( txnt, fd_txn_m_payload( txnm ) ); + + if( FD_UNLIKELY( !is_bundle_member && !is_durable_nonce && !blockhash ) ) { + ulong pool_idx; + if( FD_UNLIKELY( !pool_free( ctx->pool ) ) ) { + pool_idx = lru_list_idx_pop_tail( ctx->lru_list, ctx->pool ); + map_chain_idx_remove_fast( ctx->map_chain, pool_idx, ctx->pool ); + ctx->metrics.stash[ FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_OVERRUN_IDX ]++; + } else { + pool_idx = pool_idx_acquire( ctx->pool ); + } + + fd_stashed_txn_m_t * stash_txn = pool_ele( ctx->pool, pool_idx ); + /* There's a compiler bug in GCC version 12 (at least 12.1, 12.3 and + 12.4) that cause it to think stash_txn is a null pointer. It + then complains that the memcpy is bad and refuses to compile the + memcpy below. It is possible for pool_ele to return NULL, but + that can't happen because if pool_free is 0, then all the pool + elements must be in the LRU list, so idx_pop_tail won't return + IDX_NULL; and if pool_free returns non-zero, then + pool_idx_acquire won't return POOL_IDX_NULL. */ + FD_COMPILER_FORGET( stash_txn ); + fd_memcpy( stash_txn->_, txnm, fd_txn_m_realized_footprint( txnm, 0 ) ); + stash_txn->blockhash = fd_txn_m_payload( (fd_txn_m_t *)(stash_txn->_) ) + txnt->recent_blockhash_off; + ctx->metrics.stash[ FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_INSERTED_IDX ]++; + + lru_list_idx_push_head( ctx->lru_list, pool_idx, ctx->pool ); + + return; } if( FD_UNLIKELY( txnt->addr_table_adtl_cnt ) ) { @@ -254,6 +441,16 @@ unprivileged_init( fd_topo_t * topo, ctx->completed_slot = 0UL; ctx->blockhash_ring_idx = 0UL; + ctx->flush_pool_idx = ULONG_MAX; + + ctx->pool = pool_join( pool_new( FD_SCRATCH_ALLOC_APPEND( l, pool_align(), pool_footprint( 1UL<<16UL ) ), 1UL<<16UL ) ); + FD_TEST( ctx->pool ); + + ctx->map_chain = map_chain_join( map_chain_new( FD_SCRATCH_ALLOC_APPEND( l, map_chain_align(), map_chain_footprint( 8192ULL ) ), 8192UL , 0UL ) ); + FD_TEST( ctx->map_chain ); + + FD_TEST( ctx->lru_list==lru_list_join( lru_list_new( ctx->lru_list ) ) ); + if( FD_LIKELY( !tile->kind_id ) ) _fd_ext_resolv_tile_cnt = ctx->round_robin_cnt; ctx->root_bank = NULL; @@ -294,6 +491,7 @@ unprivileged_init( fd_topo_t * topo, #define STEM_CALLBACK_CONTEXT_ALIGN alignof(fd_resolv_ctx_t) #define STEM_CALLBACK_METRICS_WRITE metrics_write +#define STEM_CALLBACK_AFTER_CREDIT after_credit #define STEM_CALLBACK_BEFORE_FRAG before_frag #define STEM_CALLBACK_DURING_FRAG during_frag #define STEM_CALLBACK_AFTER_FRAG after_frag diff --git a/src/app/fdctl/run/tiles/generated/http_import_dist.c b/src/app/fdctl/run/tiles/generated/http_import_dist.c index ff74757614..9705b91f36 100644 --- a/src/app/fdctl/run/tiles/generated/http_import_dist.c +++ b/src/app/fdctl/run/tiles/generated/http_import_dist.c @@ -3,9 +3,9 @@ FD_IMPORT_BINARY( file0, "src/app/fdctl/dist/assets/firedancer-D_J0EzUc.svg" ); FD_IMPORT_BINARY( file1, "src/app/fdctl/dist/assets/firedancer_logo-CrgwxzPk.svg" ); -FD_IMPORT_BINARY( file2, "src/app/fdctl/dist/assets/index-Cpm7kmGE.js" ); -FD_IMPORT_BINARY( file3, "src/app/fdctl/dist/assets/index-DmEXEFlt.css" ); -FD_IMPORT_BINARY( file4, "src/app/fdctl/dist/assets/index-DpcOWpAi.js" ); +FD_IMPORT_BINARY( file2, "src/app/fdctl/dist/assets/index-BRCbiG6W.js" ); +FD_IMPORT_BINARY( file3, "src/app/fdctl/dist/assets/index-DLZ3eixO.css" ); +FD_IMPORT_BINARY( file4, "src/app/fdctl/dist/assets/index-DVbm1KUU.js" ); FD_IMPORT_BINARY( file5, "src/app/fdctl/dist/assets/index-Dz6VwGqc.css" ); FD_IMPORT_BINARY( file6, "src/app/fdctl/dist/assets/inter-tight-latin-400-normal-BW_APOAv.woff" ); FD_IMPORT_BINARY( file7, "src/app/fdctl/dist/assets/inter-tight-latin-400-normal-CjmW70MP.woff2" ); @@ -25,17 +25,17 @@ fd_http_static_file_t STATIC_FILES[] = { .data_len = &file1_sz, }, { - .name = "/assets/index-Cpm7kmGE.js", + .name = "/assets/index-BRCbiG6W.js", .data = file2, .data_len = &file2_sz, }, { - .name = "/assets/index-DmEXEFlt.css", + .name = "/assets/index-DLZ3eixO.css", .data = file3, .data_len = &file3_sz, }, { - .name = "/assets/index-DpcOWpAi.js", + .name = "/assets/index-DVbm1KUU.js", .data = file4, .data_len = &file4_sz, }, diff --git a/src/disco/gui/fd_gui.c b/src/disco/gui/fd_gui.c index 377254d311..4a047932e6 100644 --- a/src/disco/gui/fd_gui.c +++ b/src/disco/gui/fd_gui.c @@ -283,18 +283,29 @@ fd_gui_txn_waterfall_snap( fd_gui_t * gui, + pack_metrics[ MIDX( COUNTER, PACK, TRANSACTION_DROPPED_FROM_EXTRA ) ]; cur->out.pack_retained += fd_ulong_if( inserted_to_extra>=inserted_from_extra, inserted_to_extra-inserted_from_extra, 0UL ); - cur->out.resolv_failed = 0UL; + cur->out.resolv_lut_failed = 0UL; + cur->out.resolv_expired = 0UL; + cur->out.resolv_ancient = 0UL; + cur->out.resolv_no_ledger = 0UL; + cur->out.resolv_retained = 0UL; for( ulong i=0UL; isummary.resolv_tile_cnt; i++ ) { fd_topo_tile_t const * resolv = &topo->tiles[ fd_topo_find_tile( topo, "resolv", i ) ]; volatile ulong const * resolv_metrics = fd_metrics_tile( resolv->metrics ); - cur->out.resolv_failed += resolv_metrics[ MIDX( COUNTER, RESOLV, NO_BANK_DROP ) ] + - resolv_metrics[ MIDX( COUNTER, RESOLV, BLOCKHASH_EXPIRED ) ]; - cur->out.resolv_failed += resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_ACCOUNT_NOT_FOUND ) ] - + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_INVALID_ACCOUNT_OWNER ) ] - + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_INVALID_ACCOUNT_DATA ) ] - + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_ACCOUNT_UNINITIALIZED ) ] - + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_INVALID_LOOKUP_INDEX ) ]; + cur->out.resolv_no_ledger += resolv_metrics[ MIDX( COUNTER, RESOLV, NO_BANK_DROP ) ]; + cur->out.resolv_expired += resolv_metrics[ MIDX( COUNTER, RESOLV, BLOCKHASH_EXPIRED ) ]; + cur->out.resolv_lut_failed += resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_ACCOUNT_NOT_FOUND ) ] + + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_INVALID_ACCOUNT_OWNER ) ] + + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_INVALID_ACCOUNT_DATA ) ] + + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_ACCOUNT_UNINITIALIZED ) ] + + resolv_metrics[ MIDX( COUNTER, RESOLV, LUT_RESOLVED_INVALID_LOOKUP_INDEX ) ]; + cur->out.resolv_ancient += resolv_metrics[ MIDX( COUNTER, RESOLV, STASH_OPERATION_OVERRUN ) ]; + + ulong inserted_to_resolv = resolv_metrics[ MIDX( COUNTER, RESOLV, STASH_OPERATION_INSERTED ) ]; + ulong removed_from_resolv = resolv_metrics[ MIDX( COUNTER, RESOLV, STASH_OPERATION_OVERRUN ) ] + + resolv_metrics[ MIDX( COUNTER, RESOLV, STASH_OPERATION_PUBLISHED ) ] + + resolv_metrics[ MIDX( COUNTER, RESOLV, STASH_OPERATION_REMOVED ) ]; + cur->out.resolv_retained += fd_ulong_if( inserted_to_resolv>=removed_from_resolv, inserted_to_resolv-removed_from_resolv, 0UL ); } diff --git a/src/disco/gui/fd_gui.h b/src/disco/gui/fd_gui.h index d636c88af8..28668f80e6 100644 --- a/src/disco/gui/fd_gui.h +++ b/src/disco/gui/fd_gui.h @@ -104,7 +104,11 @@ struct fd_gui_txn_waterfall { ulong verify_failed; ulong verify_duplicate; ulong dedup_duplicate; - ulong resolv_failed; + ulong resolv_lut_failed; + ulong resolv_expired; + ulong resolv_ancient; + ulong resolv_no_ledger; + ulong resolv_retained; ulong pack_invalid; ulong pack_expired; ulong pack_retained; diff --git a/src/disco/gui/fd_gui_printf.c b/src/disco/gui/fd_gui_printf.c index dab8db0a01..6b1f87a880 100644 --- a/src/disco/gui/fd_gui_printf.c +++ b/src/disco/gui/fd_gui_printf.c @@ -480,10 +480,11 @@ fd_gui_printf_waterfall( fd_gui_t * gui, fd_gui_txn_waterfall_t const * cur ) { jsonp_open_object( gui, "waterfall" ); jsonp_open_object( gui, "in" ); - jsonp_ulong( gui, "retained", prev->out.pack_retained ); - jsonp_ulong( gui, "quic", cur->in.quic - prev->in.quic ); - jsonp_ulong( gui, "udp", cur->in.udp - prev->in.udp ); - jsonp_ulong( gui, "gossip", cur->in.gossip - prev->in.gossip ); + jsonp_ulong( gui, "pack_retained", prev->out.pack_retained ); + jsonp_ulong( gui, "resolv_retained", prev->out.resolv_retained ); + jsonp_ulong( gui, "quic", cur->in.quic - prev->in.quic ); + jsonp_ulong( gui, "udp", cur->in.udp - prev->in.udp ); + jsonp_ulong( gui, "gossip", cur->in.gossip - prev->in.gossip ); jsonp_close_object( gui ); jsonp_open_object( gui, "out" ); @@ -498,7 +499,11 @@ fd_gui_printf_waterfall( fd_gui_t * gui, jsonp_ulong( gui, "verify_failed", cur->out.verify_failed - prev->out.verify_failed ); jsonp_ulong( gui, "verify_duplicate", cur->out.verify_duplicate - prev->out.verify_duplicate ); jsonp_ulong( gui, "dedup_duplicate", cur->out.dedup_duplicate - prev->out.dedup_duplicate ); - jsonp_ulong( gui, "resolv_failed", cur->out.resolv_failed - prev->out.resolv_failed ); + jsonp_ulong( gui, "resolv_lut_failed", cur->out.resolv_lut_failed - prev->out.resolv_lut_failed ); + jsonp_ulong( gui, "resolv_expired", cur->out.resolv_expired - prev->out.resolv_expired ); + jsonp_ulong( gui, "resolv_ancient", cur->out.resolv_ancient - prev->out.resolv_ancient ); + jsonp_ulong( gui, "resolv_no_ledger", cur->out.resolv_no_ledger - prev->out.resolv_no_ledger ); + jsonp_ulong( gui, "resolv_retained", cur->out.resolv_retained ); jsonp_ulong( gui, "pack_invalid", cur->out.pack_invalid - prev->out.pack_invalid ); jsonp_ulong( gui, "pack_expired", cur->out.pack_expired - prev->out.pack_expired ); jsonp_ulong( gui, "pack_retained", cur->out.pack_retained ); diff --git a/src/disco/metrics/generated/fd_metrics_enums.h b/src/disco/metrics/generated/fd_metrics_enums.h index 9f8b4984f5..48d935e817 100644 --- a/src/disco/metrics/generated/fd_metrics_enums.h +++ b/src/disco/metrics/generated/fd_metrics_enums.h @@ -120,6 +120,16 @@ #define FD_METRICS_ENUM_LUT_RESOLVE_RESULT_V_SUCCESS_IDX 5 #define FD_METRICS_ENUM_LUT_RESOLVE_RESULT_V_SUCCESS_NAME "success" +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_NAME "resolve_stash_operation" +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_INSERTED_IDX 0 +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_INSERTED_NAME "inserted" +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_OVERRUN_IDX 1 +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_OVERRUN_NAME "overrun" +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_PUBLISHED_IDX 2 +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_PUBLISHED_NAME "published" +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_REMOVED_IDX 3 +#define FD_METRICS_ENUM_RESOLVE_STASH_OPERATION_V_REMOVED_NAME "removed" + #define FD_METRICS_ENUM_PACK_TXN_INSERT_RETURN_NAME "pack_txn_insert_return" #define FD_METRICS_ENUM_PACK_TXN_INSERT_RETURN_V_BUNDLE_BLACKLIST_IDX 0 #define FD_METRICS_ENUM_PACK_TXN_INSERT_RETURN_V_BUNDLE_BLACKLIST_NAME "bundle_blacklist" diff --git a/src/disco/metrics/generated/fd_metrics_resolv.c b/src/disco/metrics/generated/fd_metrics_resolv.c index b379ad2213..1d808ddf04 100644 --- a/src/disco/metrics/generated/fd_metrics_resolv.c +++ b/src/disco/metrics/generated/fd_metrics_resolv.c @@ -3,6 +3,10 @@ const fd_metrics_meta_t FD_METRICS_RESOLV[FD_METRICS_RESOLV_TOTAL] = { DECLARE_METRIC( RESOLV_NO_BANK_DROP, COUNTER ), + DECLARE_METRIC_ENUM( RESOLV_STASH_OPERATION, COUNTER, RESOLVE_STASH_OPERATION, INSERTED ), + DECLARE_METRIC_ENUM( RESOLV_STASH_OPERATION, COUNTER, RESOLVE_STASH_OPERATION, OVERRUN ), + DECLARE_METRIC_ENUM( RESOLV_STASH_OPERATION, COUNTER, RESOLVE_STASH_OPERATION, PUBLISHED ), + DECLARE_METRIC_ENUM( RESOLV_STASH_OPERATION, COUNTER, RESOLVE_STASH_OPERATION, REMOVED ), DECLARE_METRIC_ENUM( RESOLV_LUT_RESOLVED, COUNTER, LUT_RESOLVE_RESULT, INVALID_LOOKUP_INDEX ), DECLARE_METRIC_ENUM( RESOLV_LUT_RESOLVED, COUNTER, LUT_RESOLVE_RESULT, ACCOUNT_UNINITIALIZED ), DECLARE_METRIC_ENUM( RESOLV_LUT_RESOLVED, COUNTER, LUT_RESOLVE_RESULT, INVALID_ACCOUNT_DATA ), @@ -10,5 +14,4 @@ const fd_metrics_meta_t FD_METRICS_RESOLV[FD_METRICS_RESOLV_TOTAL] = { DECLARE_METRIC_ENUM( RESOLV_LUT_RESOLVED, COUNTER, LUT_RESOLVE_RESULT, ACCOUNT_NOT_FOUND ), DECLARE_METRIC_ENUM( RESOLV_LUT_RESOLVED, COUNTER, LUT_RESOLVE_RESULT, SUCCESS ), DECLARE_METRIC( RESOLV_BLOCKHASH_EXPIRED, COUNTER ), - DECLARE_METRIC( RESOLV_BLOCKHASH_UNKNOWN, COUNTER ), }; diff --git a/src/disco/metrics/generated/fd_metrics_resolv.h b/src/disco/metrics/generated/fd_metrics_resolv.h index c9b086c766..69d463c7b9 100644 --- a/src/disco/metrics/generated/fd_metrics_resolv.h +++ b/src/disco/metrics/generated/fd_metrics_resolv.h @@ -9,31 +9,37 @@ #define FD_METRICS_COUNTER_RESOLV_NO_BANK_DROP_DESC "Count of transactions dropped because the bank was not available" #define FD_METRICS_COUNTER_RESOLV_NO_BANK_DROP_CVT (FD_METRICS_CONVERTER_NONE) -#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_OFF (17UL) +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_OFF (17UL) +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_NAME "resolv_stash_operation" +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_DESC "Count of operations that happened on the transaction stash" +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_CVT (FD_METRICS_CONVERTER_NONE) +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_CNT (4UL) + +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_INSERTED_OFF (17UL) +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_OVERRUN_OFF (18UL) +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_PUBLISHED_OFF (19UL) +#define FD_METRICS_COUNTER_RESOLV_STASH_OPERATION_REMOVED_OFF (20UL) + +#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_OFF (21UL) #define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_NAME "resolv_lut_resolved" #define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_DESC "Count of address lookup tables resolved" #define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_CVT (FD_METRICS_CONVERTER_NONE) #define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_CNT (6UL) -#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_INVALID_LOOKUP_INDEX_OFF (17UL) -#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_ACCOUNT_UNINITIALIZED_OFF (18UL) -#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_INVALID_ACCOUNT_DATA_OFF (19UL) -#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_INVALID_ACCOUNT_OWNER_OFF (20UL) -#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_ACCOUNT_NOT_FOUND_OFF (21UL) -#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_SUCCESS_OFF (22UL) +#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_INVALID_LOOKUP_INDEX_OFF (21UL) +#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_ACCOUNT_UNINITIALIZED_OFF (22UL) +#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_INVALID_ACCOUNT_DATA_OFF (23UL) +#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_INVALID_ACCOUNT_OWNER_OFF (24UL) +#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_ACCOUNT_NOT_FOUND_OFF (25UL) +#define FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_SUCCESS_OFF (26UL) -#define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_EXPIRED_OFF (23UL) +#define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_EXPIRED_OFF (27UL) #define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_EXPIRED_NAME "resolv_blockhash_expired" #define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_EXPIRED_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_EXPIRED_DESC "Count of transactions that failed to resolve because the blockhash was expired" #define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_EXPIRED_CVT (FD_METRICS_CONVERTER_NONE) -#define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_UNKNOWN_OFF (24UL) -#define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_UNKNOWN_NAME "resolv_blockhash_unknown" -#define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_UNKNOWN_TYPE (FD_METRICS_TYPE_COUNTER) -#define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_UNKNOWN_DESC "Count of transactions with an unknown blockhash. These may be very recent, very old, nonces, or bogus." -#define FD_METRICS_COUNTER_RESOLV_BLOCKHASH_UNKNOWN_CVT (FD_METRICS_CONVERTER_NONE) - -#define FD_METRICS_RESOLV_TOTAL (9UL) +#define FD_METRICS_RESOLV_TOTAL (12UL) extern const fd_metrics_meta_t FD_METRICS_RESOLV[FD_METRICS_RESOLV_TOTAL]; diff --git a/src/disco/metrics/metrics.xml b/src/disco/metrics/metrics.xml index 51d88afd6f..ac51fe12c7 100644 --- a/src/disco/metrics/metrics.xml +++ b/src/disco/metrics/metrics.xml @@ -196,11 +196,18 @@ metric introduced. + + + + + + + + -