diffhub 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/apps/cli/.next/BUILD_ID +1 -1
- package/.next/standalone/apps/cli/.next/build-manifest.json +3 -3
- package/.next/standalone/apps/cli/.next/prerender-manifest.json +3 -3
- package/.next/standalone/apps/cli/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/comments/route.js +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/comments/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/diff/route.js +2 -2
- package/.next/standalone/apps/cli/.next/server/app/api/diff/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/discard/route.js +2 -2
- package/.next/standalone/apps/cli/.next/server/app/api/discard/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/file/route.js +2 -2
- package/.next/standalone/apps/cli/.next/server/app/api/file/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/files/route.js +2 -2
- package/.next/standalone/apps/cli/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/health/route.js +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/api/watch/route.js +4 -2
- package/.next/standalone/apps/cli/.next/server/app/api/watch/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/standalone/apps/cli/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/index.html +1 -1
- package/.next/standalone/apps/cli/.next/server/app/index.rsc +2 -2
- package/.next/standalone/apps/cli/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/apps/cli/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/standalone/apps/cli/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/apps/cli/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/apps/cli/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0445hvm._.js +4 -0
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__09_abus._.js +4 -0
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0at8r5u._.js +4 -0
- package/.next/standalone/apps/cli/.next/server/chunks/{[root-of-the-server]__02a~ovr._.js → [root-of-the-server]__0s9hhma._.js} +1 -1
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0v8~v3g._.js +4 -0
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0w.ks1~._.js +4 -0
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__11j~5mn._.js +3 -0
- package/.next/standalone/apps/cli/.next/server/chunks/_07nb1lf._.js +4 -4
- package/.next/standalone/apps/cli/.next/server/chunks/_0~2y9d0._.js +3 -0
- package/.next/standalone/apps/cli/.next/server/chunks/ssr/{[root-of-the-server]__0..1fdc._.js → [root-of-the-server]__0e8_2~5._.js} +2 -2
- package/.next/standalone/apps/cli/.next/server/chunks/ssr/_07okxca._.js +5 -5
- package/.next/standalone/apps/cli/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/apps/cli/.next/server/pages/404.html +1 -1
- package/.next/standalone/apps/cli/.next/server/pages/500.html +1 -1
- package/.next/standalone/apps/cli/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/apps/cli/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/apps/cli/.next/static/chunks/0o7sp50v_8vvk.js +44 -0
- package/.next/standalone/apps/cli/package.json +1 -1
- package/package.json +1 -1
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__05wbal-._.js +0 -4
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__07xhws9._.js +0 -4
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0f1w275._.js +0 -4
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0f2zsso._.js +0 -4
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0nnjixg._.js +0 -4
- package/.next/standalone/apps/cli/.next/server/chunks/[root-of-the-server]__0op9af~._.js +0 -3
- package/.next/standalone/apps/cli/.next/static/chunks/12fiag_-67~os.js +0 -44
- /package/.next/standalone/apps/cli/.next/static/{m8XYYfcJFa8f3kjQKIQgd → teviHPRd1fKZyDaVtw6AK}/_buildManifest.js +0 -0
- /package/.next/standalone/apps/cli/.next/static/{m8XYYfcJFa8f3kjQKIQgd → teviHPRd1fKZyDaVtw6AK}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/apps/cli/.next/static/{m8XYYfcJFa8f3kjQKIQgd → teviHPRd1fKZyDaVtw6AK}/_ssgManifest.js +0 -0
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55838,(e,t,r)=>{"use strict";var n=e.r(71645),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,l=n.useEffect,s=n.useLayoutEffect,a=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,u=n[1];return s(function(){o.value=r,o.getSnapshot=t,c(o)&&u({inst:o})},[e,r,t]),l(function(){return c(o)&&u({inst:o}),e(function(){c(o)&&u({inst:o})})},[e]),a(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},2239,(e,t,r)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,r)=>{"use strict";var n=e.r(71645),o=e.r(2239),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=o.useSyncExternalStore,s=n.useRef,a=n.useEffect,c=n.useMemo,u=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=l(e,(d=c(function(){function e(e){if(!a){if(a=!0,l=e,e=n(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,i(l,e))return t;var r=n(e);return void 0!==o&&o(t,r)?(l=e,t):(l=e,s=r)}var l,s,a=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,o]))[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}},30224,(e,t,r)=>{"use strict";t.exports=e.r(52822)},67585,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(32061);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},52157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return a}});let n=e.r(43476),o=e.r(74080),i=e.r(63599),l=e.r(9885),s=e.r(43369);function a({moduleIds:e}){if("u">typeof window)return null;let t=i.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,s.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(43476),o=e.r(71645),i=e.r(67585),l=e.r(52157);function s(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},c=function(e){let t={...a,...e},r=(0,o.lazy)(()=>t.loader().then(s)),c=t.loading;function u(e){let s=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,u=a?o.Suspense:o.Fragment,d=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(u,{...a?{fallback:s}:{},children:d})}return u.displayName="LoadableComponent",u}},70703,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(55682)._(e.r(69093));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},93190,e=>{"use strict";let t,r,n;var o,i,l,s,a,c,u,d,f,p,m=e.i(43476),h=e.i(932),g=e.i(71645);function b(e,t){let r=g.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:n=2,...o},i)=>g.createElement(t,{ref:i,width:r,height:r,strokeWidth:n,color:e,...o}));return r.displayName=e,r}let v=b("CheckIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-check",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{d:"M20 6 9 17l-5-5"})))),x=b("ChevronDownIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9.5 6 6 6-6"})))),y=b("CopySimpleIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("rect",{width:11,height:11,x:9,y:9,stroke:"currentColor",strokeWidth:2,rx:2}),g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15H4c-1.1046 0-2-.8954-2-2V4c0-1.1046.8954-2 2-2h9c1.1046 0 2 .8954 2 2v1"})))),w=b("SunIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3V2m0 20v-1m6.3598-15.36.71-.71M4.9302 19.07l.71-.71M21 12h1M2 12h1m15.3598 6.36.71.71M4.9302 4.93l.71.71m9.8953 2.8245c1.9527 1.9526 1.9527 5.1184 0 7.071-1.9526 1.9527-5.1184 1.9527-7.071 0-1.9526-1.9526-1.9526-5.1184 0-7.071s5.1184-1.9526 7.071 0"})))),k=b("MoonIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.9638 12.7674c-1.1277.7773-2.4945 1.2324-3.9677 1.2324-3.866 0-7-3.1341-7-7 0-1.4731.455-2.84 1.2322-3.9676C6.6191 3.4228 3 7.2877 3 11.998c0 4.9695 4.0286 8.9981 8.9981 8.9981 4.7103 0 8.5753-3.6193 8.9657-8.2286"})))),S=b("SplitIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v18M8 5H6C4.3431 5 3 6.3431 3 8v8c0 1.6569 1.3431 3 3 3h2m8 0h2c1.6569 0 3-1.3431 3-3V8c0-1.6569-1.3431-3-3-3h-2"})))),E=b("ArrowRightIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,className:"lucide lucide-arrow-right",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{d:"M5 12h14M12 5l7 7-7 7"}))));var C=e.i(63178);function j(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}let R={};function T(e,t,r,n,o){let i={...P(e,R)};return t&&(i=N(i,t)),r&&(i=N(i,r)),n&&(i=N(i,n)),o&&(i=N(i,o)),i}function N(e,t){return O(t)?t(e):function(e,t){if(!t)return e;for(let r in t){let n=t[r];switch(r){case"style":e[r]=j(e.style,n);break;case"className":e[r]=L(e.className,n);break;default:!function(e,t){let r=e.charCodeAt(0),n=e.charCodeAt(1),o=e.charCodeAt(2);return 111===r&&110===n&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}(r,n)?e[r]=n:e[r]=function(e,t){return t?e?r=>{var n;if(null!=(n=r)&&"object"==typeof n&&"nativeEvent"in n){M(r);let n=t(r);return r.baseUIHandlerPrevented||e?.(r),n}let o=t(r);return e?.(r),o}:t:e}(e[r],n)}}return e}(e,t)}function O(e){return"function"==typeof e}function P(e,t){return O(e)?e(t):e??R}function M(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function L(e,t){return t?e?t+" "+e:t:e}e.i(47167);let A=function(e,...t){let r=new URL("https://base-ui.com/production-error");return r.searchParams.set("code",e.toString()),t.forEach(e=>r.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${r} for the full message.`},I={};function D(e,t){let r=g.useRef(I);return r.current===I&&(r.current=e(t)),r}function z(e,t,r,n){var o,i,l,s,a;let c=D(_).current;return o=c,i=e,l=t,s=r,a=n,(o.refs[0]!==i||o.refs[1]!==l||o.refs[2]!==s||o.refs[3]!==a)&&$(c,[e,t,r,n]),c.callback}function _(){return{callback:null,cleanup:null,refs:[]}}function $(e,t){if(e.refs=t,t.every(e=>null==e)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=r){let n=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let o=t[e];if(null!=o)switch(typeof o){case"function":{let t=o(r);"function"==typeof t&&(n[e]=t);break}case"object":o.current=r}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let r=t[e];if(null!=r)switch(typeof r){case"function":{let t=n[e];"function"==typeof t?t():r(null);break}case"object":r.current=null}}}}}}let B=parseInt(g.version,10);function F(e){if(!g.isValidElement(e))return null;let t=e.props;return(B>=19?t?.ref:e.ref)??null}function H(){}Object.freeze([]);let W=Object.freeze({});function V(e,t,r={}){let n=t.render,o=function(e,t={}){var r,n,o;let{className:i,style:l,render:s}=e,{state:a=W,ref:c,props:u,stateAttributesMapping:d,enabled:f=!0}=t,p=f?"function"==typeof i?i(a):i:void 0,m=f?"function"==typeof l?l(a):l:void 0,h=f?function(e,t){let r={};for(let n in e){let o=e[n];if(t?.hasOwnProperty(n)){let e=t[n](o);null!=e&&Object.assign(r,e);continue}!0===o?r[`data-${n.toLowerCase()}`]="":o&&(r[`data-${n.toLowerCase()}`]=o.toString())}return r}(a,d):W,g=f?j(h,Array.isArray(u)?function(e){if(0===e.length)return R;if(1===e.length)return P(e[0],R);let t={...P(e[0],R)};for(let r=1;r<e.length;r+=1)t=N(t,e[r]);return t}(u):u)??W:W;if("u">typeof document)if(f)if(Array.isArray(c)){let e;r=[g.ref,F(s),...c],n=e=D(_).current,o=r,(n.refs.length!==o.length||n.refs.some((e,t)=>e!==o[t]))&&$(e,r),g.ref=e.callback}else g.ref=z(g.ref,F(s),c);else z(null,null);return f?(void 0!==p&&(g.className=L(g.className,p)),void 0!==m&&(g.style=j(g.style,m)),g):W}(t,r);return!1===r.enabled?null:function(e,t,r,n){if(t){if("function"==typeof t)return t(r,n);let e=T(r,t.props);e.ref=r.ref;let o=t;return o?.$$typeof===U&&(o=g.Children.toArray(t)[0]),g.cloneElement(o,e)}if(e&&"string"==typeof e){var o,i;return o=e,i=r,"button"===o?(0,g.createElement)("button",{type:"button",...i,key:i.key}):"img"===o?(0,g.createElement)("img",{alt:"",...i,key:i.key}):g.createElement(o,i)}throw Error(A(8))}(e,n,o,r.state??W)}let U=Symbol.for("react.lazy");function q(e){return V(e.defaultTagName??"div",e,e)}function K(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n}let X=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Y=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return K(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;let l=X(t)||X(n);return o[e][l]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return K(e,l,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...s}[t]):({...i,...s})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)},G=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Z=[],J=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],o=r.nextPart.get(n);if(o){let r=J(e,t+1,o);if(r)return r}let i=r.validators;if(null===i)return;let l=0===t?e.join("-"):e.slice(t).join("-"),s=i.length;for(let e=0;e<s;e++){let t=i[e];if(t.validator(l))return t.classGroupId}},Q=(e,t)=>{let r=G();for(let n in e)ee(e[n],r,n,t);return r},ee=(e,t,r,n)=>{let o=e.length;for(let i=0;i<o;i++)et(e[i],t,r,n)},et=(e,t,r,n)=>{"string"==typeof e?er(e,t,r):"function"==typeof e?en(e,t,r,n):eo(e,t,r,n)},er=(e,t,r)=>{(""===e?t:ei(t,e)).classGroupId=r},en=(e,t,r,n)=>{el(e)?ee(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},eo=(e,t,r,n)=>{let o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){let[i,l]=o[e];ee(l,ei(t,i),r,n)}},ei=(e,t)=>{let r=e,n=t.split("-"),o=n.length;for(let e=0;e<o;e++){let t=n[e],o=r.nextPart.get(t);o||(o=G(),r.nextPart.set(t,o)),r=o}return r},el=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,es=[],ea=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),ec=/\s+/,eu=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=eu(e[n]))&&(r&&(r+=" "),r+=t);return r},ed=[],ef=e=>{let t=t=>t[e]||ed;return t.isThemeGetter=!0,t},ep=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,em=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ev=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ey=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ew=e=>eh.test(e),ek=e=>!!e&&!Number.isNaN(Number(e)),eS=e=>!!e&&Number.isInteger(Number(e)),eE=e=>e.endsWith("%")&&ek(e.slice(0,-1)),eC=e=>eg.test(e),ej=()=>!0,eR=e=>eb.test(e)&&!ev.test(e),eT=()=>!1,eN=e=>ex.test(e),eO=e=>ey.test(e),eP=e=>!eL(e)&&!eF(e),eM=e=>eY(e,eQ,eT),eL=e=>ep.test(e),eA=e=>eY(e,e0,eR),eI=e=>eY(e,e1,ek),eD=e=>eY(e,e5,ej),ez=e=>eY(e,e2,eT),e_=e=>eY(e,eZ,eT),e$=e=>eY(e,eJ,eO),eB=e=>eY(e,e3,eN),eF=e=>em.test(e),eH=e=>eG(e,e0),eW=e=>eG(e,e2),eV=e=>eG(e,eZ),eU=e=>eG(e,eQ),eq=e=>eG(e,eJ),eK=e=>eG(e,e3,!0),eX=e=>eG(e,e5,!0),eY=(e,t,r)=>{let n=ep.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},eG=(e,t,r=!1)=>{let n=em.exec(e);return!!n&&(n[1]?t(n[1]):r)},eZ=e=>"position"===e||"percentage"===e,eJ=e=>"image"===e||"url"===e,eQ=e=>"length"===e||"size"===e||"bg-size"===e,e0=e=>"length"===e,e1=e=>"number"===e,e2=e=>"family-name"===e,e5=e=>"number"===e||"weight"===e,e3=e=>"shadow"===e,e4=((e,...t)=>{let r,n,o,i,l=e=>{let t=n(e);if(t)return t;let i=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,l=[],s=e.trim().split(ec),a="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(t);if(c){a=t+(a.length>0?" "+a:a);continue}let m=!!p,h=n(m?f.substring(0,p):f);if(!h){if(!m||!(h=n(f))){a=t+(a.length>0?" "+a:a);continue}m=!1}let g=0===u.length?"":1===u.length?u[0]:i(u).join(":"),b=d?g+"!":g,v=b+h;if(l.indexOf(v)>-1)continue;l.push(v);let x=o(h,m);for(let e=0;e<x.length;++e){let t=x[e];l.push(b+t)}a=t+(a.length>0?" "+a:a)}return a})(e,r);return o(e,i),i};return i=s=>{var a;let c;return n=(r={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null),o=(o,i)=>{r[o]=i,++t>e&&(t=0,n=r,r=Object.create(null))};return{get(e){let t=r[e];return void 0!==t?t:void 0!==(t=n[e])?(o(e,t),t):void 0},set(e,t){e in r?r[e]=t:o(e,t)}}})((a=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,o=0,i=0,l=e.length;for(let s=0;s<l;s++){let l=e[s];if(0===n&&0===o){if(":"===l){r.push(e.slice(i,s)),i=s+1;continue}if("/"===l){t=s;continue}}"["===l?n++:"]"===l?n--:"("===l?o++:")"===l&&o--}let s=0===r.length?e:e.slice(i),a=s,c=!1;return s.endsWith("!")?(a=s.slice(0,-1),c=!0):s.startsWith("!")&&(a=s.slice(1),c=!0),ea(r,c,a,t&&t>i?t-i:void 0)};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.slice(e.length)):ea(es,!1,t,void 0,!0)}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(a),sortModifiers:(c=new Map,a.orderSensitiveModifiers.forEach((e,t)=>{c.set(e,1e6+t)}),e=>{let t=[],r=[];for(let n=0;n<e.length;n++){let o=e[n],i="["===o[0],l=c.has(o);i||l?(r.length>0&&(r.sort(),t.push(...r),r=[]),t.push(o)):r.push(o)}return r.length>0&&(r.sort(),t.push(...r)),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e;return Q(r,t)})(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]")){var r;let t,n,o;return -1===(r=e).slice(1,-1).indexOf(":")?void 0:(n=(t=r.slice(1,-1)).indexOf(":"),(o=t.slice(0,n))?"arbitrary.."+o:void 0)}let n=e.split("-"),o=+(""===n[0]&&n.length>1);return J(n,o,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],o=r[e];if(t){if(o){let e=Array(o.length+t.length);for(let t=0;t<o.length;t++)e[t]=o[t];for(let r=0;r<t.length;r++)e[o.length+r]=t[r];return e}return t}return o||Z}return r[e]||Z}}})(a)}).cache.get,o=r.cache.set,i=l,l(s)},(...e)=>i(((...e)=>{let t,r,n=0,o="";for(;n<e.length;)(t=e[n++])&&(r=eu(t))&&(o&&(o+=" "),o+=r);return o})(...e))})(()=>{let e=ef("color"),t=ef("font"),r=ef("text"),n=ef("font-weight"),o=ef("tracking"),i=ef("leading"),l=ef("breakpoint"),s=ef("container"),a=ef("spacing"),c=ef("radius"),u=ef("shadow"),d=ef("inset-shadow"),f=ef("text-shadow"),p=ef("drop-shadow"),m=ef("blur"),h=ef("perspective"),g=ef("aspect"),b=ef("ease"),v=ef("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...y(),eF,eL],k=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],E=()=>[eF,eL,a],C=()=>[ew,"full","auto",...E()],j=()=>[eS,"none","subgrid",eF,eL],R=()=>["auto",{span:["full",eS,eF,eL]},eS,eF,eL],T=()=>[eS,"auto",eF,eL],N=()=>["auto","min","max","fr",eF,eL],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...E()],L=()=>[ew,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],A=()=>[ew,"screen","full","dvw","lvw","svw","min","max","fit",...E()],I=()=>[ew,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],D=()=>[e,eF,eL],z=()=>[...y(),eV,e_,{position:[eF,eL]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",eU,eM,{size:[eF,eL]}],B=()=>[eE,eH,eA],F=()=>["","none","full",c,eF,eL],H=()=>["",ek,eH,eA],W=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[ek,eE,eV,e_],q=()=>["","none",m,eF,eL],K=()=>["none",ek,eF,eL],X=()=>["none",ek,eF,eL],Y=()=>[ek,eF,eL],G=()=>[ew,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[eC],breakpoint:[eC],color:[ej],container:[eC],"drop-shadow":[eC],ease:["in","out","in-out"],font:[eP],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[eC],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[eC],shadow:[eC],spacing:["px",ek],text:[eC],"text-shadow":[eC],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ew,eL,eF,g]}],container:["container"],columns:[{columns:[ek,eL,eF,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{"inset-s":C(),start:C()}],end:[{"inset-e":C(),end:C()}],"inset-bs":[{"inset-bs":C()}],"inset-be":[{"inset-be":C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[eS,"auto",eF,eL]}],basis:[{basis:[ew,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ek,ew,"auto","initial","none",eL]}],grow:[{grow:["",ek,eF,eL]}],shrink:[{shrink:["",ek,eF,eL]}],order:[{order:[eS,"first","last","none",eF,eL]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...A()]}],"min-inline-size":[{"min-inline":["auto",...A()]}],"max-inline-size":[{"max-inline":["none",...A()]}],"block-size":[{block:["auto",...I()]}],"min-block-size":[{"min-block":["auto",...I()]}],"max-block-size":[{"max-block":["none",...I()]}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",r,eH,eA]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,eX,eD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eE,eL]}],"font-family":[{font:[eW,ez,t]}],"font-features":[{"font-features":[eL]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,eF,eL]}],"line-clamp":[{"line-clamp":[ek,"none",eF,eI]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",eF,eL]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",eF,eL]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[ek,"from-font","auto",eF,eA]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[ek,"auto",eF,eL]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",eF,eL]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",eF,eL]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},eS,eF,eL],radial:["",eF,eL],conic:[eS,eF,eL]},eq,e$]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-bs":[{"border-bs":H()}],"border-w-be":[{"border-be":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ek,eF,eL]}],"outline-w":[{outline:["",ek,eH,eA]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",u,eK,eB]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",d,eK,eB]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[ek,eA]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",f,eK,eB]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[ek,eF,eL]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ek]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[eF,eL]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ek]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",eF,eL]}],filter:[{filter:["","none",eF,eL]}],blur:[{blur:q()}],brightness:[{brightness:[ek,eF,eL]}],contrast:[{contrast:[ek,eF,eL]}],"drop-shadow":[{"drop-shadow":["","none",p,eK,eB]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",ek,eF,eL]}],"hue-rotate":[{"hue-rotate":[ek,eF,eL]}],invert:[{invert:["",ek,eF,eL]}],saturate:[{saturate:[ek,eF,eL]}],sepia:[{sepia:["",ek,eF,eL]}],"backdrop-filter":[{"backdrop-filter":["","none",eF,eL]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[ek,eF,eL]}],"backdrop-contrast":[{"backdrop-contrast":[ek,eF,eL]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ek,eF,eL]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ek,eF,eL]}],"backdrop-invert":[{"backdrop-invert":["",ek,eF,eL]}],"backdrop-opacity":[{"backdrop-opacity":[ek,eF,eL]}],"backdrop-saturate":[{"backdrop-saturate":[ek,eF,eL]}],"backdrop-sepia":[{"backdrop-sepia":["",ek,eF,eL]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",eF,eL]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ek,"initial",eF,eL]}],ease:[{ease:["linear","initial",b,eF,eL]}],delay:[{delay:[ek,eF,eL]}],animate:[{animate:["none",v,eF,eL]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,eF,eL]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[eF,eL,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",eF,eL]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",eF,eL]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[ek,eH,eA,eI]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),e7=(e,t=4)=>{let r=e.split("/");if(r.length<=t)return e;let n=r.at(-1)??"",o=r.at(-2)??"";return`${r[0]}/…/${o}/${n}`},e6=Y("group/button inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-lg border border-transparent bg-clip-padding font-sans font-medium text-sm outline-none transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-out focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-45 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-45 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-10 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",icon:"size-10","icon-lg":"size-11","icon-sm":"size-9 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),12px)]","icon-xs":"size-8 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3",input:"h-[var(--field-height)] gap-2 rounded-[var(--field-radius)] px-[var(--field-padding-x)] py-[var(--field-padding-y)]","input-sm":"h-[var(--field-height-sm)] gap-2 rounded-[var(--field-radius)] px-[var(--field-padding-x)] py-[var(--field-padding-y)]",lg:"h-11 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3.5 has-data-[icon=inline-start]:pl-3.5",sm:"h-9 gap-1 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-8 gap-1 in-data-[slot=button-group]:rounded-lg rounded-[min(var(--radius-md),10px)] px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/95 aria-pressed:bg-primary/95",destructive:"bg-red-600 text-white hover:bg-red-700 focus-visible:border-red-600 focus-visible:ring-red-500/30 active:bg-red-800 aria-pressed:bg-red-800 dark:bg-red-500 dark:aria-pressed:bg-red-300 dark:active:bg-red-300 dark:hover:bg-red-400",destructiveSecondary:"border-red-200 text-red-700 hover:bg-red-50 active:bg-red-100 aria-pressed:bg-red-100 dark:border-red-800 dark:text-red-300 dark:aria-pressed:bg-red-950 dark:active:bg-red-950 dark:hover:bg-red-950/60",ghost:"hover:bg-muted hover:text-foreground active:bg-muted/80 aria-expanded:bg-muted aria-pressed:bg-muted/80 dark:aria-pressed:bg-muted/60 dark:active:bg-muted/60 dark:hover:bg-muted/50",input:"border-input bg-card font-normal font-sans text-base text-foreground leading-snug shadow-input hover:border-input-hover focus-visible:ring-2 focus-visible:ring-ring/15 focus-visible:ring-offset-1 focus-visible:ring-offset-background active:border-input-hover/80 aria-pressed:border-input-hover aria-invalid:border-destructive-foreground data-[placeholder]:text-placeholder-foreground",link:"text-primary underline-offset-4 hover:underline active:opacity-80 aria-pressed:underline aria-pressed:opacity-80",outline:"border-border bg-background hover:bg-muted hover:text-foreground active:bg-muted/80 aria-expanded:bg-muted aria-pressed:bg-muted/80 dark:border-input dark:bg-input/30 dark:aria-pressed:bg-input/60 dark:active:bg-input/60 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 active:bg-secondary/75 aria-expanded:bg-secondary aria-pressed:bg-secondary/75",success:"bg-green-600 text-white hover:bg-green-700 focus-visible:border-green-600 focus-visible:ring-green-500/30 active:bg-green-800 aria-pressed:bg-green-800 dark:bg-green-500 dark:aria-pressed:bg-green-300 dark:active:bg-green-300 dark:hover:bg-green-400",successSecondary:"border-green-200 text-green-700 hover:bg-green-50 active:bg-green-100 aria-pressed:bg-green-100 dark:border-green-800 dark:text-green-300 dark:aria-pressed:bg-green-950 dark:active:bg-green-950 dark:hover:bg-green-950/60",warning:"bg-yellow-600 text-white hover:bg-yellow-700 focus-visible:border-yellow-600 focus-visible:ring-yellow-500/30 active:bg-yellow-800 aria-pressed:bg-yellow-800 dark:bg-yellow-500 dark:text-yellow-950 dark:aria-pressed:bg-yellow-300 dark:active:bg-yellow-300 dark:hover:bg-yellow-400",warningSecondary:"border-yellow-200 text-yellow-700 hover:bg-yellow-50 active:bg-yellow-100 aria-pressed:bg-yellow-100 dark:border-yellow-800 dark:text-yellow-300 dark:aria-pressed:bg-yellow-950 dark:active:bg-yellow-950 dark:hover:bg-yellow-950/60"}}}),e8=e=>{let t,r,n,o,i,l,s,a,c,u=(0,h.c)(16);if(u[0]!==e){let{className:a,variant:c,size:d,asChild:f,children:p,...m}=e;r=p,s=void 0===c?"default":c,n=void 0===d?"default":d,t=void 0!==f&&f,l=q,o="button",i=T({className:((...e)=>e4(K(e)))(e6({className:a,size:n,variant:s}))},t?m:{...m,children:r}),u[0]=e,u[1]=t,u[2]=r,u[3]=n,u[4]=o,u[5]=i,u[6]=l,u[7]=s}else t=u[1],r=u[2],n=u[3],o=u[4],i=u[5],l=u[6],s=u[7];let d=t?r:void 0;return u[8]!==n||u[9]!==s?(a={size:n,slot:"button",variant:s},u[8]=n,u[9]=s,u[10]=a):a=u[10],u[11]!==o||u[12]!==i||u[13]!==d||u[14]!==a?(c={defaultTagName:o,props:i,render:d,state:a},u[11]=o,u[12]=i,u[13]=d,u[14]=a,u[15]=c):c=u[15],l(c)};e.s([],13136),e.i(13136);let e9=[];function te(e){let t=(t,n)=>{let o,i=D(tt).current;try{for(let e of(r=i,e9))e.before(i);for(let r of(o=e(t,n),e9))r.after(i);i.didInitialize=!0}finally{r=void 0}return o};return t.displayName=e.displayName||e.name,t}function tt(){return{didInitialize:!1}}function tr(e){let t=g.useRef(!0);t.current&&(t.current=!1,e())}let tn="u">typeof document?g.useLayoutEffect:()=>{},to=g.createContext(void 0);function ti(e){let t=g.useContext(to);if(void 0===t&&!e)throw Error(A(72));return t}function tl(){return"u">typeof window}function ts(e){return tu(e)?(e.nodeName||"").toLowerCase():"#document"}function ta(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tc(e){var t;return null==(t=(tu(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function tu(e){return!!tl()&&(e instanceof Node||e instanceof ta(e).Node)}function td(e){return!!tl()&&(e instanceof Element||e instanceof ta(e).Element)}function tf(e){return!!tl()&&(e instanceof HTMLElement||e instanceof ta(e).HTMLElement)}function tp(e){return!(!tl()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ta(e).ShadowRoot)}function tm(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=tk(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&"inline"!==o&&"contents"!==o}function th(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let tg=/transform|translate|scale|rotate|perspective|filter/,tb=/paint|layout|strict|content/,tv=e=>!!e&&"none"!==e;function tx(e){let t=td(e)?tk(e):e;return tv(t.transform)||tv(t.translate)||tv(t.scale)||tv(t.rotate)||tv(t.perspective)||!ty()&&(tv(t.backdropFilter)||tv(t.filter))||tg.test(t.willChange||"")||tb.test(t.contain||"")}function ty(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function tw(e){return/^(html|body|#document)$/.test(ts(e))}function tk(e){return ta(e).getComputedStyle(e)}function tS(e){return td(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tE(e){if("html"===ts(e))return e;let t=e.assignedSlot||e.parentNode||tp(e)&&e.host||tc(e);return tp(t)?t.host:t}function tC(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=tE(t);return tw(r)?t.ownerDocument?t.ownerDocument.body:t.body:tf(r)&&tm(r)?r:e(r)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),l=ta(o);if(!i)return t.concat(o,tC(o,[],r));{let e=tj(l);return t.concat(l,l.visualViewport||[],tm(o)?o:[],e&&r?tC(e):[])}}function tj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}let tR=g[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],tT=tR&&tR!==g.useLayoutEffect?tR:e=>e();function tN(e){let t=D(tO).current;return t.next=e,tT(t.effect),t.trampoline}function tO(){let e={next:void 0,callback:tP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function tP(){}let tM="u">typeof navigator,tL=function(){if(!tM)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),tA=function(){if(!tM)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}(),tI=function(){if(!tM)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}(),tD="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),tz="MacIntel"===tL.platform&&tL.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(tL.platform);tM&&/firefox/i.test(tI);let t_=tM&&/apple/i.test(navigator.vendor);tM&&/Edg/i.test(tI);let t$=tM&&/android/i.test(tA)||/android/i.test(tI),tB=tM&&tA.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,tF=tI.includes("jsdom/"),tH="data-base-ui-focusable",tW="active",tV="selected",tU="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function tq(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function tK(e,t){if(!e||!t)return!1;let r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&tp(r)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function tX(e,t){if(!td(e))return!1;if(t.hasElement(e))return!e.hasAttribute("data-trigger-disabled");for(let[,r]of t.entries())if(tK(r,e))return!r.hasAttribute("data-trigger-disabled");return!1}function tY(e){return"composedPath"in e?e.composedPath()[0]:e.target}function tG(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function tZ(e){return tf(e)&&e.matches(tU)}function tJ(e){return!!e&&"combobox"===e.getAttribute("role")&&tZ(e)}function tQ(e){return e?e.hasAttribute(tH)?e:e.querySelector(`[${tH}]`)||e:null}function t0(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function t1(e){let t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}function t2(e){return null!=e&&null!=e.clientX}let t5=[];function t3(e){g.useEffect(e,t5)}class t4{static create(){return new t4}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function t7(){let e=D(t4.create).current;return t3(e.disposeEffect),e}function t6(e){return e?.ownerDocument||document}function t8(e,t,r=!0){return e.filter(e=>e.parentId===t&&(!r||e.context?.open)).flatMap(t=>[t,...t8(e,t.id,r)])}function t9(e,t){let r=[],n=e.find(e=>e.id===t)?.parentId;for(;n;){let t=e.find(e=>e.id===n);n=t?.parentId,t&&(r=r.concat(t))}return r}let re=g.createContext(null),rt=g.createContext(null),rr=()=>g.useContext(re)?.id||null,rn=e=>{let t=g.useContext(rt);return e??t};function ro(e,t,r,n){let o=!1,i=!1,l=n??W;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:r,...l}}e.s(["cancelOpen",0,"cancel-open","chipRemovePress",0,"chip-remove-press","clearPress",0,"clear-press","closePress",0,"close-press","closeWatcher",0,"close-watcher","decrementPress",0,"decrement-press","disabled",0,"disabled","drag",0,"drag","escapeKey",0,"escape-key","focusOut",0,"focus-out","imperativeAction",0,"imperative-action","incrementPress",0,"increment-press","inputBlur",0,"input-blur","inputChange",0,"input-change","inputClear",0,"input-clear","inputPaste",0,"input-paste","inputPress",0,"input-press","itemPress",0,"item-press","keyboard",0,"keyboard","linkPress",0,"link-press","listNavigation",0,"list-navigation","none",0,"none","outsidePress",0,"outside-press","pointer",0,"pointer","scrub",0,"scrub","siblingOpen",0,"sibling-open","swipe",0,"swipe","trackPress",0,"track-press","triggerFocus",0,"trigger-focus","triggerHover",0,"trigger-hover","triggerPress",0,"trigger-press","wheel",0,"wheel","windowResize",0,"window-resize"],16162);var ri=e.i(16162),ri=ri;function rl(e){return`data-base-ui-${e}`}let rs={intentional:"onClick",sloppy:"onPointerDown"};function ra(){return!1}function rc(e,t={}){let r="rootStore"in e?e.rootStore:e,n=r.useState("open"),o=r.useState("floatingElement"),{dataRef:i}=r.context,{enabled:l=!0,escapeKey:s=!0,outsidePress:a=!0,outsidePressEvent:c="sloppy",referencePress:u=ra,referencePressEvent:d="sloppy",bubbles:f,externalTree:p}=t,m=rn(p),h=tN("function"==typeof a?a:()=>!1),b="function"==typeof a?h:a,v=!1!==b,x=tN(()=>c),y=g.useRef(!1),w=g.useRef(!1),k=g.useRef(!1),{escapeKey:S,outsidePress:E}={escapeKey:"boolean"==typeof f?f:f?.escapeKey??!1,outsidePress:"boolean"==typeof f?f:f?.outsidePress??!0},C=g.useRef(null),j=t7(),R=t7(),T=tN(()=>{R.clear(),i.current.insideReactTree=!1}),N=g.useRef(!1),O=g.useRef(""),P=tN(u),M=tN(e=>{if(!n||!l||!s||"Escape"!==e.key||N.current)return;let t=i.current.floatingContext?.nodeId,o=m?t8(m.nodesRef.current,t):[];if(!S&&o.length>0){let e=!0;if(o.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let a="nativeEvent"in e?e.nativeEvent:e,c=ro(ri.escapeKey,a);r.setOpen(!1,c),S||c.isPropagationAllowed||e.stopPropagation()}),L=tN(()=>{i.current.insideReactTree=!0,R.start(0,T)});g.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=E;let e=new t4,t=new t4;function a(){e.clear(),N.current=!0}function c(){e.start(5*!!ty(),()=>{N.current=!1})}function u(){k.current=!0,t.start(0,()=>{k.current=!1})}function d(){y.current=!1,w.current=!1}function f(){let e=O.current,t=x(),r="function"==typeof t?t():t;return"string"==typeof r?r:r["pen"!==e&&e?e:"mouse"]}function p(e){let t=i.current.floatingContext?.nodeId,n=m&&t8(m.nodesRef.current,t).some(t=>tG(e,t.context?.elements.floating));return tG(e,r.select("floatingElement"))||tG(e,r.select("domReferenceElement"))||n}function h(e){let n;if("intentional"===(n=f())&&"click"!==e.type||"sloppy"===n&&"click"===e.type||i.current.insideReactTree)return void T();let o=tY(e),l=`[${rl("inert")}]`,s=Array.from(t6(r.select("floatingElement")).querySelectorAll(l)),a=td(o)?o.getRootNode():null;tp(a)&&(s=s.concat(Array.from(a.querySelectorAll(l))));let c=r.context.triggerElements;if(o&&(c.hasElement(o)||c.hasMatchingElement(e=>tK(e,o))))return;let u=td(o)?o:null;for(;u&&!tw(u);){let e=tE(u);if(tw(e)||!td(e))break;u=e}if(s.length&&td(o)&&!o.matches("html,body")&&!tK(o,r.select("floatingElement"))&&s.every(e=>!tK(u,e)))return;if(tf(o)&&!("touches"in e)){let t=tw(o),r=tk(o),n=/auto|scroll/,i=t||n.test(r.overflowX),l=t||n.test(r.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,a=l&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,c="rtl"===r.direction,u=a&&(c?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}if(p(e))return;if("intentional"===f()&&k.current){t.clear(),k.current=!1;return}if("function"==typeof b&&!b(e))return;let d=i.current.floatingContext?.nodeId,h=m?t8(m.nodesRef.current,d):[];if(h.length>0){let e=!0;if(h.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r.setOpen(!1,ro(ri.outsidePress,e)),T()}function g(e){O.current="touch";let t=tY(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!r.select("open")||!l||tG(e,r.select("floatingElement"))||tG(e,r.select("domReferenceElement")))return;let t=e.touches[0];t&&(C.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},j.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,n)})}function R(e){if(j.clear(),"pointerdown"===e.type&&(O.current=e.pointerType),"mousedown"===e.type&&C.current&&!C.current.dismissOnMouseDown)return;let t=tY(e);t?.addEventListener(e.type,function n(){if("pointerdown"===e.type)"sloppy"!==f()||"touch"===e.pointerType||!r.select("open")||!l||tG(e,r.select("floatingElement"))||tG(e,r.select("domReferenceElement"))||h(e);else h(e);t?.removeEventListener(e.type,n)})}function P(e){if(!y.current)return;let r=w.current;if(d(),"intentional"===f()){if("pointercancel"===e.type){r&&u();return}p(e)||(r?u():("function"!=typeof b||b(e))&&(t.clear(),k.current=!0,T()))}}function L(e){let t=tY(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!C.current||tG(e,r.select("floatingElement"))||tG(e,r.select("domReferenceElement")))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-C.current.startX),o=Math.abs(t.clientY-C.current.startY),i=Math.sqrt(n*n+o*o);i>5&&(C.current.dismissOnTouchEnd=!0),i>10&&(h(e),j.clear(),C.current=null)}(e),t?.removeEventListener(e.type,n)})}function A(e){let t=tY(e);t?.addEventListener(e.type,function n(){"sloppy"!==f()||!C.current||tG(e,r.select("floatingElement"))||tG(e,r.select("domReferenceElement"))||(C.current.dismissOnTouchEnd&&h(e),j.clear(),C.current=null),t?.removeEventListener(e.type,n)})}let I=t6(o);return s&&(I.addEventListener("keydown",M),I.addEventListener("compositionstart",a),I.addEventListener("compositionend",c)),v&&(I.addEventListener("click",R,!0),I.addEventListener("pointerdown",R,!0),I.addEventListener("pointerup",P,!0),I.addEventListener("pointercancel",P,!0),I.addEventListener("mousedown",R,!0),I.addEventListener("mouseup",P,!0),I.addEventListener("touchstart",g,!0),I.addEventListener("touchmove",L,!0),I.addEventListener("touchend",A,!0)),()=>{s&&(I.removeEventListener("keydown",M),I.removeEventListener("compositionstart",a),I.removeEventListener("compositionend",c)),v&&(I.removeEventListener("click",R,!0),I.removeEventListener("pointerdown",R,!0),I.removeEventListener("pointerup",P,!0),I.removeEventListener("pointercancel",P,!0),I.removeEventListener("mousedown",R,!0),I.removeEventListener("mouseup",P,!0),I.removeEventListener("touchstart",g,!0),I.removeEventListener("touchmove",L,!0),I.removeEventListener("touchend",A,!0)),e.clear(),t.clear(),d(),k.current=!1}},[i,o,s,v,b,n,l,S,E,M,T,x,m,r,j]),g.useEffect(T,[b,T]);let A=g.useMemo(()=>({onKeyDown:M,[rs[d]]:e=>{P()&&r.setOpen(!1,ro(ri.triggerPress,e.nativeEvent))},..."intentional"!==d&&{onClick(e){P()&&r.setOpen(!1,ro(ri.triggerPress,e.nativeEvent))}}}),[M,r,d,P]),I=tN(e=>{if(!n||!l||0!==e.button)return;let t=tY(e.nativeEvent);tK(r.select("floatingElement"),t)&&(y.current||(y.current=!0,w.current=!1))}),D=tN(e=>{!n||!l||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(w.current=!0)}),z=g.useMemo(()=>({onKeyDown:M,onPointerDown:D,onMouseDown:D,onClickCapture:L,onMouseDownCapture(e){L(),I(e)},onPointerDownCapture(e){L(),I(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[M,L,I,D]);return g.useMemo(()=>l?{reference:A,floating:z,trigger:A}:{},[l,A,z])}function ru(e=[]){let t=e.map(e=>e?.reference),r=e.map(e=>e?.floating),n=e.map(e=>e?.item),o=e.map(e=>e?.trigger),i=g.useCallback(t=>rd(t,e,"reference"),t),l=g.useCallback(t=>rd(t,e,"floating"),r),s=g.useCallback(t=>rd(t,e,"item"),n),a=g.useCallback(t=>rd(t,e,"trigger"),o);return g.useMemo(()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:s,getTriggerProps:a}),[i,l,s,a])}function rd(e,t,r){let n=new Map,o="item"===r,i={};for(let t in"floating"===r&&(i.tabIndex=-1,i[tH]=""),e)o&&e&&(t===tW||t===tV)||(i[t]=e[t]);for(let l=0;l<t.length;l+=1){let s,a=t[l]?.[r];(s="function"==typeof a?e?a(e):null:a)&&rf(i,s,o,n)}return rf(i,e,o,n),i}function rf(e,t,r,n){for(let o in t){let i=t[o];r&&(o===tW||o===tV)||(o.startsWith("on")?(n.has(o)||n.set(o,[]),"function"==typeof i&&(n.get(o)?.push(i),e[o]=(...e)=>n.get(o)?.map(t=>t(...e)).find(e=>void 0!==e))):e[o]=i)}}let rp=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class rm{static create(){return new rm}static request(e){return rp.request(e)}static cancel(e){return rp.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=rp.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(rp.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}function rh(){let e=D(rm.create).current;return t3(e.disposeEffect),e}var rg=e.i(74080);function rb(e){return null==e?e:"current"in e?e.current:e}let rv=((o={}).startingStyle="data-starting-style",o.endingStyle="data-ending-style",o),rx={[rv.startingStyle]:""},ry={[rv.endingStyle]:""},rw={transitionStatus:e=>"starting"===e?rx:"ending"===e?ry:null};function rk(e,t=!1,r=!0){let n=rh();return tN((o,i=null)=>{function l(){rg.flushSync(o)}n.cancel();let s=rb(e);if(null!=s)if("function"!=typeof s.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{function a(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{i?.aborted||l()}).catch(()=>{let e=s.getAnimations();if(r){if(i?.aborted)return;l()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&a()})}if(t)return void function(){let e=rv.startingStyle;if(!s.hasAttribute(e))return n.request(a);let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),a())});t.observe(s,{attributes:!0,attributeFilter:[e]}),i?.addEventListener("abort",()=>t.disconnect(),{once:!0})}();n.request(a)}})}function rS(e){let{enabled:t=!0,open:r,ref:n,onComplete:o}=e,i=tN(o),l=rk(n,r,!1);g.useEffect(()=>{if(!t)return;let e=new AbortController;return l(i,e.signal),()=>{e.abort()}},[t,r,i,l])}function rE(e,t,r,n){let o,i,l=r.useState("isMountedByTrigger",e),s=(o=g.useRef(null),i=g.useRef(null),g.useCallback(t=>{if(void 0!==e){if(null!==o.current){let e=o.current,t=i.current,n=r.context.triggerElements.getById(e);t&&n===t&&r.context.triggerElements.delete(e),o.current=null,i.current=null}null!==t&&(o.current=e,i.current=t,r.context.triggerElements.add(e,t))}},[r,e])),a=tN(t=>{if(s(t),!t||!r.select("open"))return;let o=r.select("activeTriggerId");o===e?r.update({activeTriggerElement:t,...n}):null==o&&r.update({activeTriggerId:e,activeTriggerElement:t,...n})});return tn(()=>{l&&r.update({activeTriggerElement:t.current,...n})},[l,r,t,...Object.values(n)]),{registerTrigger:a,isMountedByThisTrigger:l}}function rC(e){let t=e.useState("open");tn(()=>{if(t&&!e.select("activeTriggerId")&&1===e.context.triggerElements.size){let t=e.context.triggerElements.entries().next();if(!t.done){let[r,n]=t.value;e.update({activeTriggerId:r,activeTriggerElement:n})}}},[t,e])}function rj(e,t,r){let{mounted:n,setMounted:o,transitionStatus:i}=function(e,t=!1,r=!1){let[n,o]=g.useState(e&&t?"idle":void 0),[i,l]=g.useState(e);return e&&!i&&(l(!0),o("starting")),e||!i||"ending"===n||r||o("ending"),e||i||"ending"!==n||o(void 0),tn(()=>{if(!e&&i&&"ending"!==n&&r){let e=rm.request(()=>{o("ending")});return()=>{rm.cancel(e)}}},[e,i,n,r]),tn(()=>{if(!e||t)return;let r=rm.request(()=>{o(void 0)});return()=>{rm.cancel(r)}},[t,e]),tn(()=>{if(!e||!t)return;e&&i&&"idle"!==n&&o("starting");let r=rm.request(()=>{o("idle")});return()=>{rm.cancel(r)}},[t,e,i,o,n]),g.useMemo(()=>({mounted:i,setMounted:l,transitionStatus:n}),[i,n])}(e);t.useSyncedValues({mounted:n,transitionStatus:i});let l=tN(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)});return rS({enabled:!t.useState("preventUnmountingOnClose"),open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:i}}var rR=Symbol("NOT_FOUND"),rT=e=>Array.isArray(e)?e:[e],rN=0,rO=class{revision=rN;_value;_lastValue;_isEqual=rP;constructor(e,t=rP){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++rN)}};function rP(e,t){return e===t}function rM(e){return e instanceof rO||console.warn("Not a valid cell! ",e),e.value}var rL=(e,t)=>!1;function rA(){return function(e=rP){return new rO(null,e)}(rL)}var rI=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=rA()),rM(t)};Symbol();var rD=0,rz=Object.getPrototypeOf({}),r_=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,r$);tag=rA();tags={};children={};collectionTag=null;id=rD++},r$={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in rz)return n;if("object"==typeof n&&null!==n){var o;let r=e.children[t];return void 0===r&&(r=e.children[t]=Array.isArray(o=n)?new rB(o):new r_(o)),r.tag&&rM(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=rA()).value=n),rM(r),n}})(),ownKeys:e=>(rI(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},rB=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],rF);tag=rA();tags={};children={};collectionTag=null;id=rD++},rF={get:([e],t)=>("length"===t&&rI(e),r$.get(e,t)),ownKeys:([e])=>r$.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>r$.getOwnPropertyDescriptor(e,t),has:([e],t)=>r$.has(e,t)},rH=(e,t)=>e===t,rW="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function rV(){return{s:0,v:void 0,o:null,p:null}}function rU(e,t={}){let r,n=rV(),{resultEqualityCheck:o}=t,i=0;function l(){let t,l=n,{length:s}=arguments;for(let e=0;e<s;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=l.o;null===e&&(l.o=e=new WeakMap);let r=e.get(t);void 0===r?(l=rV(),e.set(t,l)):l=r}else{let e=l.p;null===e&&(l.p=e=new Map);let r=e.get(t);void 0===r?(l=rV(),e.set(t,l)):l=r}}let a=l;if(1===l.s)t=l.v;else if(t=e.apply(null,arguments),i++,o){let e=r?.deref?.()??r;null!=e&&o(e,t)&&(t=e,0!==i&&i--),r="object"==typeof t&&null!==t||"function"==typeof t?new rW(t):t}return a.s=1,a.v=t,t}return l.clearCache=()=>{n=rV(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function rq(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,n=(...e)=>{let t,n,o=0,i=0,l={},s=e.pop();"object"==typeof s&&(l=s,s=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let{memoize:a,memoizeOptions:c=[],argsMemoize:u=rU,argsMemoizeOptions:d=[],devModeChecks:f={}}={...r,...l},p=rT(c),m=rT(d),h=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),g=a(function(){return o++,s.apply(null,arguments)},...p);return Object.assign(u(function(){i++;let e=function(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}(h,arguments);return n=g.apply(null,e)},...m),{resultFunc:s,memoizedResultFunc:g,dependencies:h,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>n,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:a,argsMemoize:u})};return Object.assign(n,{withTypes:()=>n}),n}var rK=rq(rU),rX=Object.assign((e,t=rK)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>rX});rq({memoize:function(e,t){let r,{equalityCheck:n=rH,maxSize:o=1,resultEqualityCheck:i}="object"==typeof t?t:{equalityCheck:t},l=function(e,t){if(null===e||null===t||e.length!==t.length)return!1;let{length:r}=e;for(let o=0;o<r;o++)if(!n(e[o],t[o]))return!1;return!0},s=0,a=o<=1?{get:e=>r&&l(r.key,e)?r.value:rR,put(e,t){r={key:e,value:t}},getEntries:()=>r?[r]:[],clear(){r=void 0}}:function(e,t){let r=[];function n(e){let n=r.findIndex(r=>t(e,r.key));if(n>-1){let e=r[n];return n>0&&(r.splice(n,1),r.unshift(e)),e.value}return rR}return{get:n,put:function(t,o){n(t)===rR&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(o,l);function c(){let t=a.get(arguments);if(t===rR){if(t=e.apply(null,arguments),s++,i){let e=a.getEntries().find(e=>i(e.value,t));e&&(t=e.value,0!==s&&s--)}a.put(arguments,t)}return t}return c.clearCache=()=>{a.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c},memoizeOptions:{maxSize:1,equalityCheck:Object.is}});let rY=(e,t,r,n,o,i,...l)=>{let s;if(l.length>0)throw Error(A(1));if(e&&t&&r&&n&&o&&i)s=(l,s,a,c)=>i(e(l,s,a,c),t(l,s,a,c),r(l,s,a,c),n(l,s,a,c),o(l,s,a,c),s,a,c);else if(e&&t&&r&&n&&o)s=(i,l,s,a)=>o(e(i,l,s,a),t(i,l,s,a),r(i,l,s,a),n(i,l,s,a),l,s,a);else if(e&&t&&r&&n)s=(o,i,l,s)=>n(e(o,i,l,s),t(o,i,l,s),r(o,i,l,s),i,l,s);else if(e&&t&&r)s=(n,o,i,l)=>r(e(n,o,i,l),t(n,o,i,l),o,i,l);else if(e&&t)s=(r,n,o,i)=>t(e(r,n,o,i),n,o,i);else if(e)s=e;else throw Error("Missing arguments");return s};var rG=e.i(2239),rZ=e.i(30224);let rJ=B>=19?function(e,t,n,o,i){let l,s=r;if(!s){let r;return r=g.useCallback(()=>t(e.getSnapshot(),n,o,i),[e,t,n,o,i]),(0,rG.useSyncExternalStore)(e.subscribe,r,r)}let a=s.syncIndex;return s.syncIndex+=1,s.didInitialize?(l=s.syncHooks[a]).store===e&&l.selector===t&&Object.is(l.a1,n)&&Object.is(l.a2,o)&&Object.is(l.a3,i)||(l.store!==e&&(s.didChangeStore=!0),l.store=e,l.selector=t,l.a1=n,l.a2=o,l.a3=i,l.didChange=!0):(l={store:e,selector:t,a1:n,a2:o,a3:i,value:t(e.getSnapshot(),n,o,i),didChange:!1},s.syncHooks.push(l)),l.value}:function(e,t,r,n,o){return(0,rZ.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,r,n,o))};e9.push({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let r=0;r<e.syncHooks.length;r+=1){let n=e.syncHooks[r],o=n.selector(n.store.state,n.a1,n.a2,n.a3);(n.didChange||!Object.is(n.value,o))&&(t=!0,n.value=o,n.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let r=new Set;for(let t of e.syncHooks)r.add(t.store);let n=[];for(let e of r)n.push(e.subscribe(t));return()=>{for(let e of n)e()}}),(0,rG.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});class rQ{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let r of this.listeners){if(t!==this.updateTick)return;r(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,r,n){return rJ(this,e,t,r,n)}}class r0 extends rQ{constructor(e,t={},r){super(e),this.context=t,this.selectors=r}useSyncedValue(e,t){g.useDebugValue(e),tn(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let r=this;tn(()=>(r.state[e]!==t&&r.set(e,t),()=>{r.set(e,void 0)}),[r,e,t])}useSyncedValues(e){let t=this;tn(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){g.useDebugValue(e);let r=void 0!==t;tn(()=>{r&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,r])}select(e,t,r,n){return(0,this.selectors[e])(this.state,t,r,n)}useState(e,t,r,n){return g.useDebugValue(e),rJ(this,this.selectors[e],t,r,n)}useContextCallback(e,t){g.useDebugValue(e);let r=tN(t??H);this.context[e]=r}useStateSetter(e){let t=g.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let r,n=(r="function"==typeof e?e:this.selectors[e])(this.state);return t(n,n,this),this.subscribe(e=>{let o=r(e);if(!Object.is(n,o)){let e=n;n=o,t(o,e,this)}})}}let r1={...g},r2=0,r5=r1.useId;function r3(e,t){if(void 0!==r5){let r=r5();return e??(t?`${t}-${r}`:r)}return function(e,t="mui"){let[r,n]=g.useState(e),o=e||r;return g.useEffect(()=>{null==r&&(r2+=1,n(`${t}-${r2}`))},[r,t]),o}(e,t)}let r4={open:rY(e=>e.open),domReferenceElement:rY(e=>e.domReferenceElement),referenceElement:rY(e=>e.positionReference??e.referenceElement),floatingElement:rY(e=>e.floatingElement),floatingId:rY(e=>e.floatingId)};class r7 extends r0{constructor(e){const{nested:t,noEmit:r,onOpenChange:n,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:n,dataRef:{current:{}},events:function(){let e=new Map;return{emit(t,r){e.get(t)?.forEach(e=>e(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){e.get(t)?.delete(r)}}}(),nested:t,noEmit:r,triggerElements:o},r4)}setOpen=(e,t)=>{if((!e||!this.state.open||t1(t.event))&&(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){let r={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(e,t)}}function r6(e){let{popupStore:t,noEmit:r=!1,treatPopupAsFloatingElement:n=!1,onOpenChange:o}=e,i=r3(),l=null!=rr(),s=t.useState("open"),a=t.useState("activeTriggerElement"),c=t.useState(n?"popupElement":"positionerElement"),u=t.context.triggerElements,d=D(()=>new r7({open:s,referenceElement:a,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:i,nested:l,noEmit:r})).current;return tn(()=>{let e={open:s,floatingId:i,referenceElement:a,floatingElement:c};td(a)&&(e.domReferenceElement=a),d.state.positionReference===d.state.referenceElement&&(e.positionReference=a),d.update(e)},[s,i,a,c,d]),d.context.onOpenChange=o,d.context.nested=l,d.context.noEmit=r,d}var ri=ri;class r8{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let r=this.idMap.get(e);r!==t&&(void 0!==r&&this.elementsSet.delete(r),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function r9(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new r7({open:!1,floatingElement:null,referenceElement:null,triggerElements:new r8,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0}),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:W,inactiveTriggerProps:W,popupProps:W}}let ne=rY(e=>e.triggerIdProp??e.activeTriggerId),nt={open:rY(e=>e.openProp??e.open),mounted:rY(e=>e.mounted),transitionStatus:rY(e=>e.transitionStatus),floatingRootContext:rY(e=>e.floatingRootContext),preventUnmountingOnClose:rY(e=>e.preventUnmountingOnClose),payload:rY(e=>e.payload),activeTriggerId:ne,activeTriggerElement:rY(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:rY((e,t)=>void 0!==t&&ne(e)===t),isOpenedByTrigger:rY((e,t)=>void 0!==t&&ne(e)===t&&e.open),isMountedByTrigger:rY((e,t)=>void 0!==t&&ne(e)===t&&e.mounted),triggerProps:rY((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:rY(e=>e.popupProps),popupElement:rY(e=>e.popupElement),positionerElement:rY(e=>e.positionerElement)},nr={...nt,disabled:rY(e=>e.disabled),instantType:rY(e=>e.instantType),isInstantPhase:rY(e=>e.isInstantPhase),trackCursorAxis:rY(e=>e.trackCursorAxis),disableHoverablePopup:rY(e=>e.disableHoverablePopup),lastOpenChangeReason:rY(e=>e.openChangeReason),closeOnClick:rY(e=>e.closeOnClick),closeDelay:rY(e=>e.closeDelay),hasViewport:rY(e=>e.hasViewport)};class nn extends r0{constructor(e){super({...r9(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:g.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new r8},nr)}setOpen=(e,t)=>{let r=t.reason,n=r===ri.triggerHover,o=e&&r===ri.triggerFocus,i=!e&&(r===ri.triggerPress||r===ri.escapeKey);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let l=()=>{let n={open:e,openChangeReason:r};o?n.instantType="focus":i?n.instantType="dismiss":r===ri.triggerHover&&(n.instantType=void 0);let l=t.trigger?.id??null;(l||e)&&(n.activeTriggerId=l,n.activeTriggerElement=t.trigger??null),this.update(n)};n?rg.flushSync(l):l()};static useStore(e,t){let r=D(()=>new nn(t)).current,n=e??r,o=r6({popupStore:n,onOpenChange:n.setOpen});return n.state.floatingRootContext=o,n}}var ri=ri;let no=te(function(e){let{disabled:t=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:o=!1,trackCursorAxis:i="none",actionsRef:l,onOpenChange:s,onOpenChangeComplete:a,handle:c,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=nn.useStore(c?.store,{open:r,openProp:n,activeTriggerId:d,triggerIdProp:u});tr(()=>{void 0===n&&!1===p.state.open&&!0===r&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp("openProp",n),p.useControlledProp("triggerIdProp",u),p.useContextCallback("onOpenChange",s),p.useContextCallback("onOpenChangeComplete",a);let h=p.useState("open"),b=!t&&h,v=p.useState("activeTriggerId"),x=p.useState("payload");p.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:o}),tn(()=>{h&&t&&p.setOpen(!1,ro(ri.disabled))},[h,t,p]),p.useSyncedValue("disabled",t),rC(p);let{forceUnmount:y,transitionStatus:w}=rj(b,p),k=p.useState("isInstantPhase"),S=p.useState("instantType"),E=p.useState("lastOpenChangeReason"),C=g.useRef(null);tn(()=>{"ending"===w&&E===ri.none||"ending"!==w&&k?("delay"!==S&&(C.current=S),p.set("instantType","delay")):null!==C.current&&(p.set("instantType",C.current),C.current=null)},[w,k,E,S,p]),tn(()=>{b&&null==v&&p.set("payload",void 0)},[p,v,b]);let j=g.useCallback(()=>{var e;let t;p.setOpen(!1,(e=p,(t=ro(ri.imperativeAction)).preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},t))},[p]);g.useImperativeHandle(l,()=>({unmount:y,close:j}),[y,j]);let R=p.useState("floatingRootContext"),{getReferenceProps:T,getFloatingProps:N,getTriggerProps:O}=ru([rc(R,{enabled:!t,referencePress:()=>p.select("closeOnClick")}),function(e,t={}){let r="rootStore"in e?e.rootStore:e,n=r.useState("open"),o=r.useState("floatingElement"),i=r.useState("domReferenceElement"),l=r.context.dataRef,{enabled:s=!0,axis:a="both"}=t,c=g.useRef(!1),u=g.useRef(null),[d,f]=g.useState(),[p,m]=g.useState([]),h=tN((e,t,n)=>{if(!c.current&&(!l.current.openEvent||t2(l.current.openEvent))){var o,s;let c,u,f;r.set("positionReference",(o=n??i,s={x:e,y:t,axis:a,dataRef:l,pointerType:d},c=null,u=null,f=!1,{contextElement:o||void 0,getBoundingClientRect(){let e=o?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===s.axis||"both"===s.axis,r="y"===s.axis||"both"===s.axis,n=["mouseenter","mousemove"].includes(s.dataRef.current.openEvent?.type||"")&&"touch"!==s.pointerType,i=e.width,l=e.height,a=e.x,d=e.y;return null==c&&s.x&&t&&(c=e.x-s.x),null==u&&s.y&&r&&(u=e.y-s.y),a-=c||0,d-=u||0,i=0,l=0,!f||n?(i="y"===s.axis?e.width:0,l="x"===s.axis?e.height:0,a=t&&null!=s.x?s.x:a,d=r&&null!=s.y?s.y:d):f&&!n&&(l="x"===s.axis?e.height:l,i="y"===s.axis?e.width:i),f=!0,{width:i,height:l,x:a,y:d,top:d,right:a+i,bottom:d+l,left:a}}}))}}),b=tN(e=>{n?u.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),v=t0(d)?o:n,x=g.useCallback(()=>{if(!v||!s)return;let e=ta(o);function t(r){tK(o,tY(r))?(e.removeEventListener("mousemove",t),u.current=null):h(r.clientX,r.clientY)}if(!l.current.openEvent||t2(l.current.openEvent)){e.addEventListener("mousemove",t);let r=()=>{e.removeEventListener("mousemove",t),u.current=null};return u.current=r,r}r.set("positionReference",i)},[v,s,o,l,i,r,h]);g.useEffect(()=>x(),[x,p]),g.useEffect(()=>{s&&!o&&(c.current=!1)},[s,o]),g.useEffect(()=>{!s&&n&&(c.current=!0)},[s,n]);let y=g.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:b,onMouseEnter:b}},[b]);return g.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}(R,{enabled:!t&&"none"!==i,axis:"none"===i?void 0:i})]),P=g.useMemo(()=>T(),[T]),M=g.useMemo(()=>O(),[O]),L=g.useMemo(()=>N(),[N]);return p.useSyncedValues({activeTriggerProps:P,inactiveTriggerProps:M,popupProps:L}),(0,m.jsx)(to.Provider,{value:p,children:"function"==typeof f?f({payload:x}):f})}),ni=((i={}).open="data-open",i.closed="data-closed",i[i.startingStyle=rv.startingStyle]="startingStyle",i[i.endingStyle=rv.endingStyle]="endingStyle",i.anchorHidden="data-anchor-hidden",i.side="data-side",i.align="data-align",i),nl=((l={}).popupOpen="data-popup-open",l.pressed="data-pressed",l),ns={[nl.popupOpen]:""};nl.popupOpen,nl.pressed;let na={[ni.open]:""},nc={[ni.closed]:""},nu={[ni.anchorHidden]:""},nd={open:e=>e?ns:null},nf={open:e=>e?na:nc,anchorHidden:e=>e?nu:null};function np(e){return r3(e,"base-ui")}let nm=g.createContext(void 0),nh=.1*.1;function ng(e,t,r,n,o,i){return n>=t!=i>=t&&e<=(o-r)*(t-n)/(i-n)+r}function nb(e,t,r,n,o,i,l,s,a,c){let u=!1;return ng(e,t,r,n,o,i)&&(u=!u),ng(e,t,o,i,l,s)&&(u=!u),ng(e,t,l,s,a,c)&&(u=!u),ng(e,t,a,c,r,n)&&(u=!u),u}function nv(e,t,r,n,o,i){let l=Math.min(r,o),s=Math.max(r,o),a=Math.min(n,i),c=Math.max(n,i);return e>=l&&e<=s&&t>=a&&t<=c}function nx(e,t,r){let n=null==r||t0(r)?"function"==typeof e?e():e:0;return"number"==typeof n?n:n?.[t]}function ny(e){return"function"==typeof e?e():e}function nw(e,t){return t||"click"===e||"mousedown"===e}var ri=ri;let nk=g.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new t4,currentIdRef:{current:null},currentContextRef:{current:null}});function nS(e){let{children:t,delay:r,timeoutMs:n=0}=e,o=g.useRef(r),i=g.useRef(r),l=g.useRef(null),s=g.useRef(null),a=t7();return(0,m.jsx)(nk.Provider,{value:g.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:i,currentIdRef:l,timeoutMs:n,currentContextRef:s,timeout:a}),[n,a]),children:t})}var ri=ri;let nE=tB&&t_;function nC(e){let t=D(nj,e).current;return t.next=e,tn(t.effect),t}function nj(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var ri=ri;let nR=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${tU}`;class nT{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new t4,this.restTimeout=new t4,this.handleCloseOptions=void 0}static create(){return new nT}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function nN(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function nO(e){let t=D(nT.create).current,r=e.context.dataRef.current;return r.hoverInteractionState||(r.hoverInteractionState=t),t3(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}let nP={current:null},nM=((s={})[s.popupOpen=nl.popupOpen]="popupOpen",s.triggerDisabled="data-trigger-disabled",s),nL=(a=function(e,t){let{className:r,render:n,handle:o,payload:i,disabled:l,delay:s,closeOnClick:a=!0,closeDelay:c,id:u,...d}=e,f=ti(!0),p=o?.store??f;if(!p)throw Error(A(82));let m=np(u),h=p.useState("isTriggerActive",m),b=p.useState("isOpenedByTrigger",m),v=p.useState("floatingRootContext"),x=g.useRef(null),y=s??600,w=c??0,{registerTrigger:k,isMountedByThisTrigger:S}=rE(m,x,p,{payload:i,closeOnClick:a,closeDelay:w}),E=g.useContext(nm),{delayRef:C,isInstantPhase:j,hasProvider:R}=function(e,t={open:!1}){let r="rootStore"in e?e.rootStore:e,n=r.useState("floatingId"),{open:o}=t,{currentIdRef:i,delayRef:l,timeoutMs:s,initialDelayRef:a,currentContextRef:c,hasProvider:u,timeout:d}=g.useContext(nk),[f,p]=g.useState(!1);return tn(()=>{function e(){p(!1),c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,l.current=a.current}if(i.current&&!o&&i.current===n){if(p(!1),s)return d.start(s,()=>{r.select("open")||i.current&&i.current!==n||e()}),()=>{d.clear()};e()}},[o,n,i,l,s,a,c,d,r]),tn(()=>{if(!o)return;let e=c.current,t=i.current;d.clear(),c.current={onOpenChange:r.setOpen,setIsInstantPhase:p},i.current=n,l.current={open:0,close:nx(a.current,"close")},null!==t&&t!==n?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,ro(ri.none))):(p(!1),e?.setIsInstantPhase(!1))},[o,n,r,i,l,s,a,c,d]),tn(()=>()=>{c.current=null},[c]),g.useMemo(()=>({hasProvider:u,delayRef:l,isInstantPhase:f}),[u,l,f])}(v,{open:b});p.useSyncedValue("isInstantPhase",j);let T=p.useState("disabled"),N=l??T,O=p.useState("trackCursorAxis"),P=function(e,t={}){let r="rootStore"in e?e.rootStore:e,{dataRef:n,events:o}=r.context,{enabled:i=!0,delay:l=0,handleClose:s=null,mouseOnly:a=!1,restMs:c=0,move:u=!0,triggerElementRef:d=nP,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=rn(f),b=nO(r),v=nC(s),x=nC(l),y=nC(c),w=nC(i);p&&(b.handleCloseOptions=v.current?.__options);let k=tN(()=>nw(n.current.openEvent?.type,b.interactedInside)),S=tN(e=>tX(e,r.context.triggerElements)),E=tN((e,t,n)=>{let o=r.context.triggerElements;return o.hasElement(t)?!e||!tK(e,t):!!td(n)&&o.hasMatchingElement(e=>tK(e,n))&&(!e||!tK(e,n))}),C=g.useCallback((e,t=!0)=>{let n=nx(x.current,"close",b.pointerType);n?b.openChangeTimeout.start(n,()=>{r.setOpen(!1,ro(ri.triggerHover,e)),h?.events.emit("floating.closed",e)}):t&&(b.openChangeTimeout.clear(),r.setOpen(!1,ro(ri.triggerHover,e)),h?.events.emit("floating.closed",e))},[x,r,b,h]),j=tN(()=>{b.handler&&(t6(r.select("domReferenceElement")).removeEventListener("mousemove",b.handler),b.handler=void 0)});g.useEffect(()=>j,[j]);let R=tN(()=>{nN(b)});return g.useEffect(()=>{if(i)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open||(j(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}},[i,o,b,j]),g.useEffect(()=>{if(!i)return;let e=d.current??(p?r.select("domReferenceElement"):null);if(td(e))return u&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",o),()=>{u&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",o)};function t(e){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,a&&!t0(b.pointerType)||ny(y.current)>0&&!nx(x.current,"open"))return;let t=nx(x.current,"open",b.pointerType),n=e.currentTarget??null,o=r.select("domReferenceElement"),i=null!=n&&E(o,n,e.target),l=r.select("open"),s=!l||i;i&&l?r.setOpen(!0,ro(ri.triggerHover,e,n)):t?b.openChangeTimeout.start(t,()=>{s&&r.setOpen(!0,ro(ri.triggerHover,e,n))}):s&&r.setOpen(!0,ro(ri.triggerHover,e,n))}function o(e){if(k())return void R();j();let t=t6(r.select("domReferenceElement"));b.restTimeout.clear(),b.restTimeoutPending=!1;let o=n.current.floatingContext??m?.();if(!S(e.relatedTarget)){if(v.current&&o){r.select("open")||b.openChangeTimeout.clear();let n=d.current;b.handler=v.current({...o,tree:h,x:e.clientX,y:e.clientY,onClose(){R(),j(),w.current&&!k()&&n===r.select("domReferenceElement")&&C(e,!0)}}),t.addEventListener("mousemove",b.handler),b.handler(e);return}"touch"===b.pointerType&&tK(r.select("floatingElement"),e.relatedTarget)||C(e)}}},[j,R,n,x,C,r,i,v,b,p,E,k,S,a,u,y,d,h,w,m]),g.useMemo(()=>{if(i)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,o=r.select("domReferenceElement"),i=r.select("open"),l=E(o,n,e.target);if(a&&!t0(b.pointerType))return;let s=ny(y.current);function c(){if(b.restTimeoutPending=!1,k())return;let e=r.select("open");b.blockMouseMove||e&&!l||r.setOpen(!0,ro(ri.triggerHover,t,n))}(!i||l)&&0!==s&&(!l&&b.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(b.restTimeout.clear(),"touch"===b.pointerType?rg.flushSync(()=>{c()}):l&&i?c():(b.restTimeoutPending=!0,b.restTimeout.start(s,c))))}};function e(e){b.pointerType=e.pointerType}},[i,b,k,E,a,r,y])}(v,{enabled:!N,mouseOnly:!0,move:!1,handleClose:p.useState("disableHoverablePopup")||"both"===O?null:function(e={}){let{blockPointerEvents:t=!1}=e,r=new t4,n=({x:e,y:t,placement:n,elements:o,onClose:i,nodeId:l,tree:s})=>{let a=n?.split("-")[0],c=!1,u=null,d=null,f="u">typeof performance?performance.now():0;return function(n){r.clear();let p=o.domReference,m=o.floating;if(!p||!m||null==a||null==e||null==t)return;let{clientX:h,clientY:g}=n,b=tY(n),v="mouseleave"===n.type,x=tK(m,b),y=tK(p,b);if(x&&(c=!0,!v))return;if(y&&(c=!1,!v)){c=!0;return}if(v&&td(n.relatedTarget)&&tK(m,n.relatedTarget))return;function w(){return!!(s&&t8(s.nodesRef.current,l).length>0)}function k(){w()||(r.clear(),i())}if(w())return;let S=p.getBoundingClientRect(),E=m.getBoundingClientRect(),C=e>E.right-E.width/2,j=t>E.bottom-E.height/2,R=E.width>S.width,T=E.height>S.height,N=(R?S:E).left,O=(R?S:E).right,P=(T?S:E).top,M=(T?S:E).bottom;if("top"===a&&t>=S.bottom-1||"bottom"===a&&t<=S.top+1||"left"===a&&e>=S.right-1||"right"===a&&e<=S.left+1)return void k();let L=!1;switch(a){case"top":L=nv(h,g,N,S.top+1,O,E.bottom-1);break;case"bottom":L=nv(h,g,N,E.top+1,O,S.bottom-1);break;case"left":L=nv(h,g,E.right-1,M,S.left+1,P);break;case"right":L=nv(h,g,S.right-1,M,E.left+1,P)}if(L)return;if(c&&(!(h>=S.x)||!(h<=S.x+S.width)||!(g>=S.y)||!(g<=S.y+S.height))||!v&&function(e,t){let r=performance.now(),n=r-f;if(null===u||null===d||0===n)return u=e,d=t,f=r,!1;let o=e-u,i=t-d;return u=e,d=t,f=r,o*o+i*i<n*n*nh}(h,g))return void k();let A=!1;switch(a){case"top":{let r=R?.25:2,n=t+.5+1,o=C||R?E.bottom-.5:E.top,i=C?R?E.bottom-.5:E.top:E.bottom-.5;A=nb(h,g,R||C?e+r:e-r,n,R?e-r:C?e+r:e-r,n,E.left,o,E.right,i);break}case"bottom":{let r=R?.25:2,n=t-.5,o=C||R?E.top+.5:E.bottom,i=C?R?E.top+.5:E.bottom:E.top+.5;A=nb(h,g,R||C?e+r:e-r,n,R?e-r:C?e+r:e-r,n,E.left,o,E.right,i);break}case"left":{let r=T?.25:2,n=e+.5+1,o=j||T?E.right-.5:E.left,i=j?T?E.right-.5:E.left:E.right-.5;A=nb(h,g,o,E.top,i,E.bottom,n,T||j?t+r:t-r,n,T?t-r:j?t+r:t-r);break}case"right":{let r=T?.25:2,n=e-.5,o=j||T?E.left+.5:E.right,i=j?T?E.left+.5:E.right:E.left+.5;A=nb(h,g,n,T||j?t+r:t-r,n,T?t-r:j?t+r:t-r,o,E.top,i,E.bottom)}}A?c||r.start(40,k):k()}};return n.__options={blockPointerEvents:t},n}(),restMs(){let e=E?.delay,t="object"==typeof C.current?C.current.open:void 0,r=y;return R&&(r=0!==t?s??e??y:0),r},delay(){let e="object"==typeof C.current?C.current.close:void 0,t=w;return null==c&&R&&(t=e),{close:t}},triggerElementRef:x,isActiveTrigger:h});return V("button",e,{state:{open:b},ref:[t,k,x],props:[P,function(e,t={}){let r="rootStore"in e?e.rootStore:e,{events:n,dataRef:o}=r.context,{enabled:i=!0,delay:l}=t,s=g.useRef(!1),a=g.useRef(null),c=t7(),u=g.useRef(!0);g.useEffect(()=>{let e=r.select("domReferenceElement");if(!i)return;let t=ta(e);function n(){let e=r.select("domReferenceElement");!r.select("open")&&tf(e)&&e===tq(t6(e))&&(s.current=!0)}function o(){u.current=!0}function l(){u.current=!1}return t.addEventListener("blur",n),nE&&(t.addEventListener("keydown",o,!0),t.addEventListener("pointerdown",l,!0)),()=>{t.removeEventListener("blur",n),nE&&(t.removeEventListener("keydown",o,!0),t.removeEventListener("pointerdown",l,!0))}},[r,i]),g.useEffect(()=>{if(i)return n.on("openchange",e),()=>{n.off("openchange",e)};function e(e){if(e.reason===ri.triggerPress||e.reason===ri.escapeKey){let e=r.select("domReferenceElement");td(e)&&(a.current=e,s.current=!0)}}},[n,i,r]);let d=g.useMemo(()=>({onMouseLeave(){s.current=!1,a.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(a.current===t)return;s.current=!1,a.current=null}let n=tY(e.nativeEvent);if(td(n)){if(nE&&!e.relatedTarget){if(!u.current&&!tZ(n))return}else if(!function(e){if(!e||tF)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(n))return}let o=tX(e.relatedTarget,r.context.triggerElements),{nativeEvent:i,currentTarget:d}=e,f="function"==typeof l?l():l;r.select("open")&&o||0===f||void 0===f?r.setOpen(!0,ro(ri.triggerFocus,i,d)):c.start(f,()=>{s.current||r.setOpen(!0,ro(ri.triggerFocus,i,d))})},onBlur(e){s.current=!1,a.current=null;let t=e.relatedTarget,n=e.nativeEvent,i=td(t)&&t.hasAttribute(rl("focus-guard"))&&"outside"===t.getAttribute("data-type");c.start(0,()=>{let e=r.select("domReferenceElement"),l=tq(e?e.ownerDocument:document);!t&&l===e||tK(o.current.floatingContext?.refs.floating.current,l)||tK(e,l)||i||tX(t??l,r.context.triggerElements)||r.setOpen(!1,ro(ri.triggerFocus,n))})}}),[o,r,c,l]);return g.useMemo(()=>i?{reference:d,trigger:d}:{},[i,d])}(v,{enabled:!N}).reference,p.useState("triggerProps",S),{onPointerDown(){p.set("closeOnClick",a)},id:m,[nM.triggerDisabled]:N?"":void 0},d],stateAttributesMapping:nd})},g.forwardRef(te(a))),nA=g.createContext(void 0),nI={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},nD={...nI,position:"fixed",top:0,left:0};({...nI,position:"absolute"});let nz=g.forwardRef(function(e,t){let[r,n]=g.useState();return tn(()=>{t_&&n("button")},[]),(0,m.jsx)("span",{...e,ref:t,style:nD,"aria-hidden":!r||void 0,tabIndex:0,role:r,"data-base-ui-focus-guard":""})});var n_='input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[href]:not([inert]):not([inert] *),button:not([inert]):not([inert] *),[tabindex]:not(slot):not([inert]):not([inert] *),audio[controls]:not([inert]):not([inert] *),video[controls]:not([inert]):not([inert] *),[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *),details>summary:first-of-type:not([inert]):not([inert] *),details:not([inert]):not([inert] *)',n$="u"<typeof Element,nB=n$?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,nF=!n$&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},nH=function(e,t){void 0===t&&(t=!0);var r,n=null==e||null==(r=e.getAttribute)?void 0:r.call(e,"inert");return""===n||"true"===n||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):nH(e.parentNode))},nW=function(e){var t,r=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===r||"true"===r},nV=function(e,t,r){if(nH(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(n_));return t&&nB.call(e,n_)&&n.unshift(e),n=n.filter(r)},nU=function(e,t,r){for(var n=[],o=Array.from(e);o.length;){var i=o.shift();if(!nH(i,!1))if("SLOT"===i.tagName){var l=i.assignedElements(),s=nU(l.length?l:i.children,!0,r);r.flatten?n.push.apply(n,s):n.push({scopeParent:i,candidates:s})}else{nB.call(i,n_)&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var a=i.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(i),c=!nH(a,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(a&&c){var u=nU(!0===a?i.children:a.children,!0,r);r.flatten?n.push.apply(n,u):n.push({scopeParent:i,candidates:u})}else o.unshift.apply(o,i.children)}}return n},nq=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},nK=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||nW(e))&&!nq(e)?0:e.tabIndex},nX=function(e,t){var r=nK(e);return r<0&&t&&!nq(e)?0:r},nY=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},nG=function(e){return"INPUT"===e.tagName},nZ=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},nJ=function(e){if(!e.name)return!0;var t,r=e.form||nF(e),n=function(e){return r.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("u">typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=nZ(t,e.form);return!o||o===e},nQ=function(e){return nG(e)&&"radio"===e.type&&!nJ(e)},n0=function(e){var t,r,n,o,i,l,s,a=e&&nF(e),c=null==(t=a)?void 0:t.host,u=!1;if(a&&a!==e)for(u=!!(null!=(r=c)&&null!=(n=r.ownerDocument)&&n.contains(c)||null!=e&&null!=(o=e.ownerDocument)&&o.contains(e));!u&&c;)u=!!(null!=(l=c=null==(i=a=nF(c))?void 0:i.host)&&null!=(s=l.ownerDocument)&&s.contains(c));return u},n1=function(e){var t=e.getBoundingClientRect(),r=t.width,n=t.height;return 0===r&&0===n},n2=function(e,t){var r=t.displayCheck,n=t.getShadowRoot;if("full-native"===r&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=nB.call(e,"details>summary:first-of-type")?e.parentElement:e;if(nB.call(o,"details:not([open]) *"))return!0;if(r&&"full"!==r&&"full-native"!==r&&"legacy-full"!==r){if("non-zero-area"===r)return n1(e)}else{if("function"==typeof n){for(var i=e;e;){var l=e.parentElement,s=nF(e);if(l&&!l.shadowRoot&&!0===n(l))return n1(e);e=e.assignedSlot?e.assignedSlot:l||s===e.ownerDocument?l:s.host}e=i}if(n0(e))return!e.getClientRects().length;if("legacy-full"!==r)return!0}return!1},n5=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var r=0;r<t.children.length;r++){var n=t.children.item(r);if("LEGEND"===n.tagName)return!!nB.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1},n3=function(e,t){return!(t.disabled||nG(t)&&"hidden"===t.type||n2(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||n5(t))},n4=function(e,t){return!(nQ(t)||0>nK(t))&&!!n3(e,t)},n7=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},n6=function(e){var t=[],r=[];return e.forEach(function(e,n){var o=!!e.scopeParent,i=o?e.scopeParent:e,l=nX(i,o),s=o?n6(e.candidates):i;0===l?o?t.push.apply(t,s):t.push(i):r.push({documentOrder:n,tabIndex:l,item:e,isScope:o,content:s})}),r.sort(nY).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},n8=function(e,t){return n6((t=t||{}).getShadowRoot?nU([e],t.includeContainer,{filter:n4.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:n7}):nV(e,t.includeContainer,n4.bind(null,t)))},n9=function(e,t){return(t=t||{}).getShadowRoot?nU([e],t.includeContainer,{filter:n3.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):nV(e,t.includeContainer,n3.bind(null,t))},oe=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==nB.call(e,n_)&&n4(t,e)};let ot=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function or(e,t){let r=n8(e,ot()),n=r.length;if(0===n)return;let o=tq(t6(e)),i=r.indexOf(o);return r[-1===i?1===t?0:n-1:i+t]}function on(e){return or(t6(e).body,1)||e}function oo(e){return or(t6(e).body,-1)||e}function oi(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!tK(r,n)}function ol(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}var ri=ri;let os={style:{transition:"none"}},oa="data-base-ui-click-trigger",oc={fallbackAxisSide:"end"},ou={clipPath:"inset(50%)",position:"fixed",top:0,left:0},od=g.createContext(null),of=rl("portal");function op(e={}){let{ref:t,container:r,componentProps:n=W,elementProps:o}=e,i=r3(),l=g.useContext(od),s=l?.portalNode,[a,c]=g.useState(null),[u,d]=g.useState(null),f=tN(e=>{null!==e&&d(e)}),p=g.useRef(null);tn(()=>{if(null===r){p.current&&(p.current=null,d(null),c(null));return}if(null==i)return;let e=(r&&(tu(r)?r:r.current))??s??document.body;if(null==e){p.current&&(p.current=null,d(null),c(null));return}p.current!==e&&(p.current=e,d(null),c(e))},[r,s,i]);let m=V("div",n,{ref:[t,f],props:[{id:i,[of]:""},o]});return{portalNode:u,portalSubtree:a&&m?rg.createPortal(m,a):null}}let om=g.forwardRef(function(e,t){let{children:r,container:n,className:o,render:i,renderGuards:l,...s}=e,{portalNode:a,portalSubtree:c}=op({container:n,ref:t,componentProps:e,elementProps:s}),u=g.useRef(null),d=g.useRef(null),f=g.useRef(null),p=g.useRef(null),[h,b]=g.useState(null),v=h?.modal,x=h?.open,y="boolean"==typeof l?l:!!h&&!h.modal&&h.open&&!!a;g.useEffect(()=>{if(a&&!v)return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){a&&e.relatedTarget&&oi(e)&&("focusin"===e.type?ol:function(e){n8(e,ot()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(a)}},[a,v]),g.useEffect(()=>{a&&!x&&ol(a)},[x,a]);let w=g.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:a,setFocusManagerState:b}),[a]);return(0,m.jsxs)(g.Fragment,{children:[c,(0,m.jsxs)(od.Provider,{value:w,children:[y&&a&&(0,m.jsx)(nz,{"data-type":"outside",ref:u,onFocus:e=>{if(oi(e,a))f.current?.focus();else{let e=oo(h?h.domReference:null);e?.focus()}}}),y&&a&&(0,m.jsx)("span",{"aria-owns":a.id,style:ou}),a&&rg.createPortal(r,a),y&&a&&(0,m.jsx)(nz,{"data-type":"outside",ref:d,onFocus:e=>{if(oi(e,a))p.current?.focus();else{let t=on(h?h.domReference:null);t?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,ro(ri.focusOut,e.nativeEvent))}}})]})]})}),oh=g.forwardRef(function(e,t){let{children:r,container:n,className:o,render:i,...l}=e,{portalNode:s,portalSubtree:a}=op({container:n,ref:t,componentProps:e,elementProps:l});return a||s?(0,m.jsxs)(g.Fragment,{children:[a,s&&rg.createPortal(r,s)]}):null}),og=g.forwardRef(function(e,t){let{keepMounted:r=!1,...n}=e;return ti().useState("mounted")||r?(0,m.jsx)(nA.Provider,{value:r,children:(0,m.jsx)(oh,{ref:t,...n})}):null}),ob=g.createContext(void 0);function ov(){let e=g.useContext(ob);if(void 0===e)throw Error(A(71));return e}let ox=["top","right","bottom","left"],oy=Math.min,ow=Math.max,ok=Math.round,oS=Math.floor,oE=e=>({x:e,y:e}),oC={left:"right",right:"left",bottom:"top",top:"bottom"};function oj(e,t){return"function"==typeof e?e(t):e}function oR(e){return e.split("-")[0]}function oT(e){return e.split("-")[1]}function oN(e){return"x"===e?"y":"x"}function oO(e){return"y"===e?"height":"width"}function oP(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function oM(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let oL=["left","right"],oA=["right","left"],oI=["top","bottom"],oD=["bottom","top"];function oz(e){let t=oR(e);return oC[t]+e.slice(t.length)}function o_(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function o$(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function oB(e,t,r){let n,{reference:o,floating:i}=e,l=oP(t),s=oN(oP(t)),a=oO(s),c=oR(t),u="y"===l,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,p=o[a]/2-i[a]/2;switch(c){case"top":n={x:d,y:o.y-i.height};break;case"bottom":n={x:d,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:f};break;case"left":n={x:o.x-i.width,y:f};break;default:n={x:o.x,y:o.y}}switch(oT(t)){case"start":n[s]-=p*(r&&u?-1:1);break;case"end":n[s]+=p*(r&&u?-1:1)}return n}async function oF(e,t){var r;void 0===t&&(t={});let{x:n,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=oj(t,e),m=o_(p),h=s[f?"floating"===d?"reference":"floating":d],g=o$(await i.getClippingRect({element:null==(r=await (null==i.isElement?void 0:i.isElement(h)))||r?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),b="floating"===d?{x:n,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await (null==i.isElement?void 0:i.isElement(v))&&await (null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},y=o$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:v,strategy:a}):b);return{top:(g.top-y.top+m.top)/x.y,bottom:(y.bottom-g.bottom+m.bottom)/x.y,left:(g.left-y.left+m.left)/x.x,right:(y.right-g.right+m.right)/x.x}}let oH=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l}=r,s=l.detectOverflow?l:{...l,detectOverflow:oF},a=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=oB(c,n,a),f=n,p=0,m={};for(let r=0;r<i.length;r++){let h=i[r];if(!h)continue;let{name:g,fn:b}=h,{x:v,y:x,data:y,reset:w}=await b({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=x?x:d,m[g]={...m[g],...y},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=oB(c,f,a)),r=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};function oW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oV(e){return ox.some(t=>e[t]>=0)}let oU=new Set(["left","top"]);async function oq(e,t){let{placement:r,platform:n,elements:o}=e,i=await (null==n.isRTL?void 0:n.isRTL(o.floating)),l=oR(r),s=oT(r),a="y"===oP(r),c=oU.has(l)?-1:1,u=i&&a?-1:1,d=oj(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),a?{x:p*u,y:f*c}:{x:f*c,y:p*u}}function oK(e){let t=tk(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=tf(e),i=o?e.offsetWidth:r,l=o?e.offsetHeight:n,s=ok(r)!==i||ok(n)!==l;return s&&(r=i,n=l),{width:r,height:n,$:s}}function oX(e){return td(e)?e:e.contextElement}function oY(e){let t=oX(e);if(!tf(t))return oE(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=oK(t),l=(i?ok(r.width):r.width)/n,s=(i?ok(r.height):r.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}let oG=oE(0);function oZ(e){let t=ta(e);return ty()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:oG}function oJ(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),l=oX(e),s=oE(1);t&&(n?td(n)&&(s=oY(n)):s=oY(e));let a=(void 0===(o=r)&&(o=!1),n&&(!o||n===ta(l))&&o)?oZ(l):oE(0),c=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(l){let e=ta(l),t=n&&td(n)?ta(n):n,r=e,o=tj(r);for(;o&&n&&t!==r;){let e=oY(o),t=o.getBoundingClientRect(),n=tk(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=i,u+=l,o=tj(r=ta(o))}}return o$({width:d,height:f,x:c,y:u})}function oQ(e,t){let r=tS(e).scrollLeft;return t?t.left+r:oJ(tc(e)).left+r}function o0(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-oQ(e,r),y:r.top+t.scrollTop}}function o1(e,t,r){var n;let o;if("viewport"===t)o=function(e,t){let r=ta(e),n=tc(e),o=r.visualViewport,i=n.clientWidth,l=n.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;let e=ty();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}let c=oQ(n);if(c<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,l=Math.abs(n.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:s,y:a}}(e,r);else if("document"===t){let t,r,i,l,s,a,c;n=tc(e),t=tc(n),r=tS(n),i=n.ownerDocument.body,l=ow(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=ow(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-r.scrollLeft+oQ(n),c=-r.scrollTop,"rtl"===tk(i).direction&&(a+=ow(t.clientWidth,i.clientWidth)-l),o={width:l,height:s,x:a,y:c}}else if(td(t)){let e,n,i,l,s,a;n=(e=oJ(t,!0,"fixed"===r)).top+t.clientTop,i=e.left+t.clientLeft,l=tf(t)?oY(t):oE(1),s=t.clientWidth*l.x,a=t.clientHeight*l.y,o={width:s,height:a,x:i*l.x,y:n*l.y}}else{let r=oZ(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return o$(o)}function o2(e){return"static"===tk(e).position}function o5(e,t){if(!tf(e)||"fixed"===tk(e).position)return null;if(t)return t(e);let r=e.offsetParent;return tc(e)===r&&(r=r.ownerDocument.body),r}function o3(e,t){var r;let n=ta(e);if(th(e))return n;if(!tf(e)){let t=tE(e);for(;t&&!tw(t);){if(td(t)&&!o2(t))return t;t=tE(t)}return n}let o=o5(e,t);for(;o&&(r=o,/^(table|td|th)$/.test(ts(r)))&&o2(o);)o=o5(o,t);return o&&tw(o)&&o2(o)&&!tx(o)?n:o||function(e){let t=tE(e);for(;tf(t)&&!tw(t);){if(tx(t))return t;if(th(t))break;t=tE(t)}return null}(e)||n}let o4=async function(e){let t=this.getOffsetParent||o3,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=tf(t),o=tc(t),i="fixed"===r,l=oJ(e,!0,i,t),s={scrollLeft:0,scrollTop:0},a=oE(0);if(n||!n&&!i)if(("body"!==ts(t)||tm(o))&&(s=tS(t)),n){let e=oJ(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=oQ(o));i&&!n&&o&&(a.x=oQ(o));let c=!o||n||i?oE(0):o0(o,s);return{x:l.left+s.scrollLeft-a.x-c.x,y:l.top+s.scrollTop-a.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},o7={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i="fixed"===o,l=tc(n),s=!!t&&th(t.floating);if(n===l||s&&i)return r;let a={scrollLeft:0,scrollTop:0},c=oE(1),u=oE(0),d=tf(n);if((d||!d&&!i)&&(("body"!==ts(n)||tm(l))&&(a=tS(n)),d)){let e=oJ(n);c=oY(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}let f=!l||d||i?oE(0):o0(l,a);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-a.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-a.scrollTop*c.y+u.y+f.y}},getDocumentElement:tc,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[..."clippingAncestors"===r?th(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=tC(e,[],!1).filter(e=>td(e)&&"body"!==ts(e)),o=null,i="fixed"===tk(e).position,l=i?tE(e):e;for(;td(l)&&!tw(l);){let t=tk(l),r=tx(l);r||"fixed"!==t.position||(o=null),(i?r||o:!(!r&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||tm(l)&&!r&&function e(t,r){let n=tE(t);return!(n===r||!td(n)||tw(n))&&("fixed"===tk(n).position||e(n,r))}(e,l)))?o=t:n=n.filter(e=>e!==l),l=tE(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=o1(t,i[0],o),s=l.top,a=l.right,c=l.bottom,u=l.left;for(let e=1;e<i.length;e++){let r=o1(t,i[e],o);s=ow(r.top,s),a=oy(r.right,a),c=oy(r.bottom,c),u=ow(r.left,u)}return{width:a-u,height:c-s,x:u,y:s}},getOffsetParent:o3,getElementRects:o4,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=oK(e);return{width:t,height:r}},getScale:oY,isElement:td,isRTL:function(e){return"rtl"===tk(e).direction}};function o6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o8(e,t,r,n){let o;void 0===n&&(n={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=n,u=oX(e),d=i||l?[...u?tC(u):[],...t?tC(t):[]]:[];d.forEach(e=>{i&&e.addEventListener("scroll",r,{passive:!0}),l&&e.addEventListener("resize",r)});let f=u&&a?function(e,t){let r,n=null,o=tc(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function l(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;let m={rootMargin:-oS(d)+"px "+-oS(o.clientWidth-(u+f))+"px "+-oS(o.clientHeight-(d+p))+"px "+-oS(u)+"px",threshold:ow(0,oy(1,a))||1},h=!0;function g(t){let n=t[0].intersectionRatio;if(n!==a){if(!h)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==n||o6(c,e.getBoundingClientRect())||l(),h=!1}try{n=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}(!0),i}(u,r):null,p=-1,m=null;s&&(m=new ResizeObserver(e=>{let[n]=e;n&&n.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),r()}),u&&!c&&m.observe(u),t&&m.observe(t));let h=c?oJ(e):null;return c&&function t(){let n=oJ(e);h&&!o6(h,n)&&r(),h=n,o=requestAnimationFrame(t)}(),r(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",r),l&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(o)}}var o9="u">typeof document?g.useLayoutEffect:function(){};function ie(e,t){let r,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!ie(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!ie(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function it(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ir(e,t){let r=it(e);return Math.round(t*r)/r}function io(e){let t=g.useRef(e);return o9(()=>{t.current=e}),t}let ii=g.createContext(void 0);function il(){let e=g.useContext(ii);return e?.direction??"ltr"}let is={name:"hide",async fn(e){var t,r,n;let o,{width:i,height:l,x:s,y:a}=e.rects.reference,c=await (void 0===(n=t)&&(n={}),{name:(o={name:"hide",options:n,async fn(e){let{rects:t,platform:r}=e,{strategy:o="referenceHidden",...i}=oj(n,e);switch(o){case"referenceHidden":{let n=oW(await r.detectOverflow(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:oV(n)}}}case"escaped":{let n=oW(await r.detectOverflow(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:oV(n)}}}default:return{}}}}).name,fn:o.fn,options:[t,r]}).fn(e);return{data:{referenceHidden:c.data?.referenceHidden||0===i&&0===l&&0===s&&0===a}}}},ia={sideX:"left",sideY:"top"},ic={name:"adaptiveOrigin",async fn(e){let{x:t,y:r,rects:{floating:n},elements:{floating:o},platform:i,strategy:l,placement:s}=e,a=ta(o),c=a.getComputedStyle(o);if("0s"===c.transitionDuration||""===c.transitionDuration)return{x:t,y:r,data:ia};let u=await i.getOffsetParent?.(o),d={width:0,height:0};if("fixed"===l&&a?.visualViewport)d={width:a.visualViewport.width,height:a.visualViewport.height};else if(u===a){let e=t6(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await i.isElement?.(u)&&(d=await i.getDimensions(u));let f=oR(s),p=t,m=r;return"left"===f&&(p=d.width-(t+n.width)),"top"===f&&(m=d.height-(r+n.height)),{x:p,y:m,data:{sideX:"left"===f?"right":ia.sideX,sideY:"top"===f?"bottom":ia.sideY}}}};function iu(e,t,r){let n="inline-start"===e||"inline-end"===e;return({top:"top",right:n?r?"inline-start":"inline-end":"right",bottom:"bottom",left:n?r?"inline-end":"inline-start":"left"})[t]}function id(e,t,r){let{rects:n,placement:o}=e;return{side:iu(t,oR(o),r),align:oT(o)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function ip(e){return null!=e&&"current"in e}function im(e){return"starting"===e?os:W}let ih=g.forwardRef(function(e,t){let{render:r,className:n,anchor:o,positionMethod:i="absolute",side:l="top",align:s="center",sideOffset:a=0,alignOffset:c=0,collisionBoundary:u="clipping-ancestors",collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:h=!1,collisionAvoidance:b=oc,...v}=e,x=ti(),y=function(){let e=g.useContext(nA);if(void 0===e)throw Error(A(70));return e}(),w=x.useState("open"),k=x.useState("mounted"),S=x.useState("trackCursorAxis"),E=x.useState("disableHoverablePopup"),C=x.useState("floatingRootContext"),j=x.useState("instantType"),R=x.useState("transitionStatus"),T=function(e){var t,r,n,o,i,l,s,a,c,u,d,f,p,m;let h,b,v,x,{anchor:y,positionMethod:w="absolute",side:k="bottom",sideOffset:S=0,align:E="center",alignOffset:C=0,collisionBoundary:j,collisionPadding:R=5,sticky:T=!1,arrowPadding:N=5,disableAnchorTracking:O=!1,keepMounted:P=!1,floatingRootContext:M,mounted:L,collisionAvoidance:A,shiftCrossAxis:I=!1,nodeId:z,adaptiveOrigin:_,lazyFlip:$=!1,externalTree:B}=e,[F,H]=g.useState(null);L||null===F||H(null);let W=A.side||"flip",V=A.align||"flip",U=A.fallbackAxisSide||"end",q="function"==typeof y?y:void 0,K=tN(q),X=q?K:y,Y=nC(y),G="rtl"===il(),Z=F||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":G?"left":"right","inline-start":G?"right":"left"})[k],J="center"===E?Z:`${Z}-${E}`,Q=R,ee=+("bottom"===k),et=+("top"===k),er=+("right"===k),en=+("left"===k);"number"==typeof Q?Q={top:Q+ee,right:Q+en,bottom:Q+et,left:Q+er}:Q&&(Q={top:(Q.top||0)+ee,right:(Q.right||0)+en,bottom:(Q.bottom||0)+et,left:(Q.left||0)+er});let eo={boundary:"clipping-ancestors"===j?"clippingAncestors":j,padding:Q},ei=g.useRef(null),el=nC(S),es=nC(C),ea=[(t=e=>{let t=id(e,k,G),r="function"==typeof el.current?el.current(t):el.current,n="function"==typeof es.current?es.current(t):es.current;return{mainAxis:r,crossAxis:n,alignmentAxis:n}},r=["function"!=typeof S?S:0,"function"!=typeof C?C:0,G,k],void 0===(n=t)&&(n=0),{name:(h={name:"offset",options:n,async fn(e){var t,r;let{x:o,y:i,placement:l,middlewareData:s}=e,a=await oq(e,n);return l===(null==(t=s.offset)?void 0:t.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}).name,fn:h.fn,options:[t,r]})],ec="none"===V&&"shift"!==W,eu=!ec&&(T||I||"shift"===W),ed="none"===W?null:{name:(b={name:"flip",options:l=o={...eo,padding:{top:Q.top+1,right:Q.right+1,bottom:Q.bottom+1,left:Q.left+1},mainAxis:!I&&"flip"===W,crossAxis:"flip"===V&&"alignment",fallbackAxisSideDirection:U},async fn(e){var t,r,n,o,i,s,a,c;let u,d,f,{placement:p,middlewareData:m,rects:h,initialPlacement:g,platform:b,elements:v}=e,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...C}=oj(l,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let j=oR(p),R=oP(g),T=oR(g)===g,N=await (null==b.isRTL?void 0:b.isRTL(v.floating)),O=w||(T||!E?[oz(g)]:(u=oz(g),[oM(g),u,oM(u)])),P="none"!==S;!w&&P&&O.push(...(d=oT(g),f=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?oA:oL;return t?oL:oA;case"left":case"right":return t?oI:oD;default:return[]}}(oR(g),"start"===S,N),d&&(f=f.map(e=>e+"-"+d),E&&(f=f.concat(f.map(oM)))),f));let M=[g,...O],L=await b.detectOverflow(e,C),A=[],I=(null==(r=m.flip)?void 0:r.overflows)||[];if(x&&A.push(L[j]),y){let e,t,r,n,o=(s=p,a=h,void 0===(c=N)&&(c=!1),e=oT(s),r=oO(t=oN(oP(s))),n="x"===t?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[r]>a.floating[r]&&(n=oz(n)),[n,oz(n)]);A.push(L[o[0]],L[o[1]])}if(I=[...I,{placement:p,overflows:A}],!A.every(e=>e<=0)){let e=((null==(n=m.flip)?void 0:n.index)||0)+1,t=M[e];if(t&&("alignment"!==y||R===oP(t)||I.every(e=>oP(e.placement)!==R||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let r=null==(o=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(k){case"bestFit":{let e=null==(i=I.filter(e=>{if(P){let t=oP(e.placement);return t===R||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(r=e);break}case"initialPlacement":r=g}if(p!==r)return{reset:{placement:r}}}return{}}}).name,fn:b.fn,options:[o,i]},ef=ec?null:(s=e=>{var t,r,n;let o=t6(e.elements.floating).documentElement;return{...eo,rootBoundary:I?{x:0,y:0,width:o.clientWidth,height:o.clientHeight}:void 0,mainAxis:"none"!==V,crossAxis:eu,limiter:T||I?void 0:{fn:(void 0===(n=t=e=>{if(!ei.current)return{};let{width:t,height:r}=ei.current.getBoundingClientRect(),n=oP(oR(e.placement)),o="y"===n?Q.left+Q.right:Q.top+Q.bottom;return{offset:("y"===n?t:r)/2+o/2}})&&(n={}),{options:n,fn(e){let{x:t,y:r,placement:o,rects:i,middlewareData:l}=e,{offset:s=0,mainAxis:a=!0,crossAxis:c=!0}=oj(n,e),u={x:t,y:r},d=oP(o),f=oN(d),p=u[f],m=u[d],h=oj(s,e),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){let e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,r=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>r&&(p=r)}if(c){var b,v;let e="y"===f?"width":"height",t=oU.has(oR(o)),r=i.reference[d]-i.floating[e]+(t&&(null==(b=l.offset)?void 0:b[d])||0)+(t?0:g.crossAxis),n=i.reference[d]+i.reference[e]+(t?0:(null==(v=l.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);m<r?m=r:m>n&&(m=n)}return{[f]:p,[d]:m}}}).fn,options:[t,r]}}},a=[eo,T,I,Q,V],void 0===(c=s)&&(c={}),{name:(v={name:"shift",options:c,async fn(e){let{x:t,y:r,placement:n,platform:o}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...a}=oj(c,e),u={x:t,y:r},d=await o.detectOverflow(e,a),f=oP(oR(n)),p=oN(f),m=u[p],h=u[f];if(i){let e="y"===p?"top":"left",t="y"===p?"bottom":"right",r=m+d[e],n=m-d[t];m=ow(r,oy(m,n))}if(l){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=h+d[e],n=h-d[t];h=ow(r,oy(h,n))}let g=s.fn({...e,[p]:m,[f]:h});return{...g,data:{x:g.x-t,y:g.y-r,enabled:{[p]:i,[f]:l}}}}}).name,fn:v.fn,options:[s,a]});"shift"===W||"shift"===V||"center"===E?ea.push(ef,ed):ea.push(ed,ef),ea.push({name:(x={name:"size",options:f=u={...eo,apply({elements:{floating:e},availableWidth:t,availableHeight:r,rects:n}){let o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${r}px`);let i=window.devicePixelRatio||1,{x:l,y:s,width:a,height:c}=n.reference,u=(Math.round((l+a)*i)-Math.round(l*i))/i,d=(Math.round((s+c)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${u}px`),o.setProperty("--anchor-height",`${d}px`)}},async fn(e){var t,r;let n,o,{placement:i,rects:l,platform:s,elements:a}=e,{apply:c=()=>{},...u}=oj(f,e),d=await s.detectOverflow(e,u),p=oR(i),m=oT(i),h="y"===oP(i),{width:g,height:b}=l.floating;"top"===p||"bottom"===p?(n=p,o=m===(await (null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(o=p,n="end"===m?"top":"bottom");let v=b-d.top-d.bottom,x=g-d.left-d.right,y=oy(b-d[n],v),w=oy(g-d[o],x),k=!e.middlewareData.shift,S=y,E=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(E=x),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(S=v),k&&!m){let e=ow(d.left,0),t=ow(d.right,0),r=ow(d.top,0),n=ow(d.bottom,0);h?E=g-2*(0!==e||0!==t?e+t:ow(d.left,d.right)):S=b-2*(0!==r||0!==n?r+n:ow(d.top,d.bottom))}await c({...e,availableWidth:E,availableHeight:S});let C=await s.getDimensions(a.floating);return g!==C.width||b!==C.height?{reset:{rects:!0}}:{}}}).name,fn:x.fn,options:[u,d]},(p=()=>({element:ei.current||document.createElement("div"),padding:N,offsetParent:"floating"}),m=[N],{name:"arrow",options:p,async fn(e){let{x:t,y:r,placement:n,rects:o,platform:i,elements:l,middlewareData:s}=e,{element:a,padding:c=0,offsetParent:u="real"}=oj(p,e)||{};if(null==a)return{};let d=o_(c),f={x:t,y:r},m=oN(oP(n)),h=oO(m),g=await i.getDimensions(a),b="y"===m,v=b?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[m]-f[m]-o.floating[h],y=f[m]-o.reference[m],w="real"===u?await i.getOffsetParent?.(a):l.floating,k=l.floating[v]||o.floating[h];k&&await i.isElement?.(w)||(k=l.floating[v]||o.floating[h]);let S=k/2-g[h]/2-1,E=Math.min(d[b?"top":"left"],S),C=Math.min(d[b?"bottom":"right"],S),j=k-g[h]-C,R=k/2-g[h]/2+(x/2-y/2),T=ow(E,oy(R,j)),N=!s.arrow&&null!=oT(n)&&R!==T&&o.reference[h]/2-(R<E?E:C)-g[h]/2<0,O=N?R<E?R-E:R-j:0;return{[m]:f[m]+O,data:{[m]:T,centerOffset:R-T-O,...N&&{alignmentOffset:O}},reset:N}},options:[p,m]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:r,placement:n,rects:o,y:i}=e,l=oR(n),s=oP(l),a=ei.current,c=r.arrow?.x||0,u=r.arrow?.y||0,d=a?.clientWidth||0,f=a?.clientHeight||0,p=c+d/2,m=u+f/2,h=Math.abs(r.shift?.y||0),g=o.reference.height/2,b="function"==typeof S?S(id(e,k,G)):S,v=h>b,x={top:`${p}px calc(100% + ${b}px)`,bottom:`${p}px ${-b}px`,left:`calc(100% + ${b}px) ${m}px`,right:`${-b}px ${m}px`}[l],y=`${p}px ${o.reference.y+g-i}px`;return t.floating.style.setProperty("--transform-origin",eu&&"y"===s&&v?y:x),{}}},is,_),tn(()=>{!L&&M&&M.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[L,M]);let ep=g.useMemo(()=>({elementResize:!O&&"u">typeof ResizeObserver,layoutShift:!O&&"u">typeof IntersectionObserver}),[O]),{refs:em,elements:eh,x:eg,y:eb,middlewareData:ev,update:ex,placement:ey,context:ew,isPositioned:ek,floatingStyles:eS}=function(e={}){let{nodeId:t,externalTree:r}=e,n=function(e){let{open:t=!1,onOpenChange:r,elements:n={}}=e,o=r3(),i=null!=rr(),l=D(()=>new r7({open:t,onOpenChange:r,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:new r8,floatingId:o,nested:i,noEmit:!1})).current;return tn(()=>{let e={open:t,floatingId:o};void 0!==n.reference&&(e.referenceElement=n.reference,e.domReferenceElement=td(n.reference)?n.reference:null),void 0!==n.floating&&(e.floatingElement=n.floating),l.update(e)},[t,o,n.reference,n.floating,l]),l.context.onOpenChange=r,l.context.nested=i,l.context.noEmit=!1,l}(e),o=e.rootContext||n,i={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[l,s]=g.useState(null),a=g.useRef(null),c=rn(r);tn(()=>{i.domReference&&(a.current=i.domReference)},[i.domReference]);let u=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:c}=e,[u,d]=g.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=g.useState(n);ie(f,n)||p(n);let[m,h]=g.useState(null),[b,v]=g.useState(null),x=g.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=g.useCallback(e=>{e!==E.current&&(E.current=e,v(e))},[]),w=i||m,k=l||b,S=g.useRef(null),E=g.useRef(null),C=g.useRef(u),j=null!=a,R=io(a),T=io(o),N=io(c),O=g.useCallback(()=>{var e,n;let o,i,l;if(!S.current||!E.current)return;let s={placement:t,strategy:r,middleware:f};T.current&&(s.platform=T.current),(e=S.current,n=E.current,o=new Map,l={...(i={platform:o7,...s}).platform,_c:o},oH(e,n,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==N.current};P.current&&!ie(C.current,t)&&(C.current=t,rg.flushSync(()=>{d(t)}))})},[f,t,r,T,N]);o9(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let P=g.useRef(!1);o9(()=>(P.current=!0,()=>{P.current=!1}),[]),o9(()=>{if(w&&(S.current=w),k&&(E.current=k),w&&k){if(R.current)return R.current(w,k,O);O()}},[w,k,O,R,j]);let M=g.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:y}),[x,y]),L=g.useMemo(()=>({reference:w,floating:k}),[w,k]),A=g.useMemo(()=>{let e={position:r,left:0,top:0};if(!L.floating)return e;let t=ir(L.floating,u.x),n=ir(L.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...it(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,L.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:O,refs:M,elements:L,floatingStyles:A}),[u,O,M,L,A])}({...e,elements:{...i,...l&&{reference:l}}}),d=g.useCallback(e=>{let t=td(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=g.useState(null),[m,h]=g.useState(null);o.useSyncedValue("referenceElement",f),o.useSyncedValue("domReferenceElement",td(f)?f:null),o.useSyncedValue("floatingElement",m);let b=g.useCallback(e=>{(td(e)||null===e)&&(a.current=e,p(e)),(td(u.refs.reference.current)||null===u.refs.reference.current||null!==e&&!td(e))&&u.refs.setReference(e)},[u.refs,p]),v=g.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),x=g.useMemo(()=>({...u.refs,setReference:b,setFloating:v,setPositionReference:d,domReference:a}),[u.refs,b,v,d]),y=g.useMemo(()=>({...u.elements,domReference:i.domReference}),[u.elements,i.domReference]),w=o.useState("open"),k=o.useState("floatingId"),S=g.useMemo(()=>({...u,dataRef:o.context.dataRef,open:w,onOpenChange:o.setOpen,events:o.context.events,floatingId:k,refs:x,elements:y,nodeId:t,rootStore:o}),[u,x,y,t,o,w,k]);return tn(()=>{o.context.dataRef.current.floatingContext=S;let e=c?.nodesRef.current.find(e=>e.id===t);e&&(e.context=S)}),g.useMemo(()=>({...u,context:S,refs:x,elements:y,rootStore:o}),[u,x,y,S,o])}({rootContext:M,placement:J,middleware:ea,strategy:w,whileElementsMounted:P?void 0:(...e)=>o8(...e,ep),nodeId:z,externalTree:B}),{sideX:eE,sideY:eC}=ev.adaptiveOrigin||ia,ej=ek?w:"fixed",eR=g.useMemo(()=>{let e=_?{position:ej,[eE]:eg,[eC]:eb}:{position:ej,...eS};return ek||(e.opacity=0),e},[_,ej,eE,eg,eC,eb,eS,ek]),eT=g.useRef(null);tn(()=>{if(!L)return;let e=Y.current,t="function"==typeof e?e():e,r=(ip(t)?t.current:t)||null;r!==eT.current&&(em.setPositionReference(r),eT.current=r)},[L,em,X,Y]),g.useEffect(()=>{if(!L)return;let e=Y.current;"function"!=typeof e&&ip(e)&&e.current!==eT.current&&(em.setPositionReference(e.current),eT.current=e.current)},[L,em,X,Y]),g.useEffect(()=>{if(P&&L&&eh.domReference&&eh.floating)return o8(eh.domReference,eh.floating,ex,ep)},[P,L,eh,ex,ep]);let eN=oR(ey),eO=iu(k,eN,G),eP=oT(ey)||"center",eM=!!ev.hide?.referenceHidden;tn(()=>{$&&L&&ek&&H(eN)},[$,L,ek,eN]);let eL=g.useMemo(()=>({position:"absolute",top:ev.arrow?.y,left:ev.arrow?.x}),[ev.arrow]),eA=ev.arrow?.centerOffset!==0;return g.useMemo(()=>({positionerStyles:eR,arrowStyles:eL,arrowRef:ei,arrowUncentered:eA,side:eO,align:eP,physicalSide:eN,anchorHidden:eM,refs:em,context:ew,isPositioned:ek,update:ex}),[eR,eL,ei,eA,eO,eP,eN,eM,em,ew,ek,ex])}({anchor:o,positionMethod:i,floatingRootContext:C,mounted:k,side:l,sideOffset:a,align:s,alignOffset:c,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:h,keepMounted:y,collisionAvoidance:b,adaptiveOrigin:x.useState("hasViewport")?ic:void 0}),N=g.useMemo(()=>{let e={};return(!w||"both"===S||E)&&(e.pointerEvents="none"),{role:"presentation",hidden:!k,style:{...T.positionerStyles,...e}}},[w,S,E,k,T.positionerStyles]),O=g.useMemo(()=>({open:w,side:T.side,align:T.align,anchorHidden:T.anchorHidden,instant:"none"!==S?"tracking-cursor":j}),[w,T.side,T.align,T.anchorHidden,S,j]),P=g.useMemo(()=>({...O,arrowRef:T.arrowRef,arrowStyles:T.arrowStyles,arrowUncentered:T.arrowUncentered}),[O,T.arrowRef,T.arrowStyles,T.arrowUncentered]),M=V("div",e,{state:O,props:[N,im(R),v],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:nf});return(0,m.jsx)(ob.Provider,{value:P,children:M})});var ri=ri;let ig={...nf,...rw},ib=g.forwardRef(function(e,t){let{className:r,render:n,...o}=e,i=ti(),{side:l,align:s}=ov(),a=i.useState("open"),c=i.useState("instantType"),u=i.useState("transitionStatus"),d=i.useState("popupProps"),f=i.useState("floatingRootContext");return rS({open:a,ref:i.context.popupRef,onComplete(){a&&i.context.onOpenChangeComplete?.(!0)}}),!function(e,t={}){let r="rootStore"in e?e.rootStore:e,n=r.useState("open"),o=r.useState("floatingElement"),i=r.useState("domReferenceElement"),{dataRef:l}=r.context,{enabled:s=!0,closeDelay:a=0}=t,c=nO(r),u=rn(),d=rr(),f=tN(()=>nw(l.current.openEvent?.type,c.interactedInside)),p=tN(()=>{let e=l.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=tN(e=>tX(e,r.context.triggerElements)),h=g.useCallback(e=>{let t=nx(a,"close",c.pointerType),n=()=>{r.setOpen(!1,ro(ri.triggerHover,e)),u?.events.emit("floating.closed",e)};t?c.openChangeTimeout.start(t,n):(c.openChangeTimeout.clear(),n())},[a,r,c,u]),b=tN(()=>{nN(c)}),v=tN(e=>{let t=tY(e);if(!(t&&t.closest(nR))){c.interactedInside=!1;return}c.interactedInside=t?.closest("[aria-haspopup]")!=null});tn(()=>{n||(c.pointerType=void 0,c.restTimeoutPending=!1,c.interactedInside=!1,b())},[n,c,b]),g.useEffect(()=>b,[b]),tn(()=>{if(s&&n&&c.handleCloseOptions?.blockPointerEvents&&p()&&td(i)&&o){let e=t6(o),t=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;t&&(t.style.pointerEvents="");let r=c.handleCloseOptions?.getScope?.()??c.pointerEventsScopeElement??t??i.closest("[data-rootownerid]")??e.body;return!function(e,t){let{scopeElement:r,referenceElement:n,floatingElement:o}=t;nN(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=n,e.pointerEventsFloatingElement=o,r.style.pointerEvents="none",n.style.pointerEvents="auto",o.style.pointerEvents="auto"}(c,{scopeElement:r,referenceElement:i,floatingElement:o}),()=>{b()}}},[s,n,i,o,c,p,u,d,b]);let x=t7();g.useEffect(()=>{if(s)return o&&(o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),o.addEventListener("pointerdown",v,!0)),()=>{o&&(o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),o.removeEventListener("pointerdown",v,!0)),u?.events.off("floating.closed",n)};function e(){c.openChangeTimeout.clear(),x.clear(),u?.events.off("floating.closed",n),b()}function t(e){if(u&&d&&t8(u.nodesRef.current,d).length>0)return void u.events.on("floating.closed",n);if(!m(e.relatedTarget)){if(c.handler)return void c.handler(e);b(),f()||h(e)}}function n(e){u&&d&&!(t8(u.nodesRef.current,d).length>0)&&x.start(0,()=>{u.events.off("floating.closed",n),r.setOpen(!1,ro(ri.triggerHover,e)),u.events.emit("floating.closed",e)})}},[s,o,r,l,f,m,h,b,v,c,u,d,x])}(f,{enabled:!i.useState("disabled"),closeDelay:i.useState("closeDelay")}),V("div",e,{state:{open:a,side:l,align:s,instant:c,transitionStatus:u},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[d,im(u),o],stateAttributesMapping:ig})}),iv=g.forwardRef(function(e,t){let{className:r,render:n,...o}=e,i=ti().useState("instantType"),{open:l,arrowRef:s,side:a,align:c,arrowUncentered:u,arrowStyles:d}=ov();return V("div",e,{state:{open:l,side:a,align:c,uncentered:u,instant:i},ref:[t,s],props:[{style:d,"aria-hidden":!0},o],stateAttributesMapping:nf})}),ix=((c={}).popupWidth="--popup-width",c.popupHeight="--popup-height",c);function iy(e){return B>=19?e:e?"true":void 0}function iw(e){let t=tk(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=tf(e),i=o?e.offsetWidth:r,l=o?e.offsetHeight:n;return(ok(r)!==i||ok(n)!==l)&&(r=i,n=l),{width:r,height:n}}let ik=()=>!0;function iS(e,t,r){let n=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,n)}}function iE(e,t){let r=[];for(let[n,o]of Object.entries(t))r.push(iS(e,n,o));return r.length?()=>{r.forEach(e=>e())}:H}function iC(e,t){let r="auto"===t?"auto":`${t.width}px`,n="auto"===t?"auto":`${t.height}px`;e.style.setProperty("--popup-width",r),e.style.setProperty("--popup-height",n)}function ij(e,t){let r="max-content"===t?"max-content":`${t.width}px`,n="max-content"===t?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",r),e.style.setProperty("--positioner-height",n)}let iR={activationDirection:e=>e?{"data-activation-direction":e}:null},iT=g.forwardRef(function(e,t){let{render:r,className:n,children:o,...i}=e,l=ti(),s=ov(),a=l.useState("instantType"),{children:c,state:u}=function(e){let t,{store:r,side:n,cssVars:o,children:i}=e,l=il(),s=r.useState("activeTriggerElement"),a=r.useState("activeTriggerId"),c=r.useState("open"),u=r.useState("payload"),d=r.useState("mounted"),f=r.useState("popupElement"),p=r.useState("positionerElement"),h=function(e){let[t,r]=g.useState({current:e,previous:null});return e!==t.current&&r({current:e,previous:t.current}),t.previous}(c?s:null),b=function(e,t){let[r,n]=g.useState(0),o=g.useRef(e),i=g.useRef(t),l=g.useRef(!1);return tn(()=>{let r=o.current,s=t!==i.current;e!==r?(n(e=>e+1),l.current=!s):l.current&&s&&(n(e=>e+1),l.current=!1),o.current=e,i.current=t},[e,t]),`${e??"current"}-${r}`}(a,u),v=g.useRef(null),[x,y]=g.useState(null),[w,k]=g.useState(null),S=g.useRef(null),E=g.useRef(null),C=rk(S,!0,!1),j=rh(),[R,T]=g.useState(null),[N,O]=g.useState(!1);tn(()=>(r.set("hasViewport",!0),()=>{r.set("hasViewport",!1)}),[r]);let P=tN(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),E.current?.style.setProperty("display","none")}),M=tN(e=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),E.current?.style.removeProperty("display"),e&&T(e)}),L=g.useRef(null);tn(()=>{var e,t;let r,n,o,i;s&&h&&s!==h&&L.current!==s&&v.current&&(y(v.current),O(!0),k((e=h,t=s,r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),o={x:r.left+r.width/2,y:r.top+r.height/2},{horizontal:(i={x:n.left+n.width/2,y:n.top+n.height/2}).x-o.x,vertical:i.y-o.y})),j.request(()=>{rg.flushSync(()=>{O(!1)}),C(()=>{y(null),T(null),v.current=null})}),L.current=s)},[s,h,x,C,j]),tn(()=>{let e=S.current;if(!e)return;let t=document.createElement("div");for(let r of Array.from(e.childNodes))t.appendChild(r.cloneNode(!0));v.current=t});let A=null!=x;return t=A?(0,m.jsxs)(g.Fragment,{children:[(0,m.jsx)("div",{"data-previous":!0,inert:iy(!0),ref:E,style:{...R?{[o.popupWidth]:`${R.width}px`,[o.popupHeight]:`${R.height}px`}:null,position:"absolute"},"data-ending-style":N?void 0:""},"previous"),(0,m.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":N?"":void 0,children:i},b)]}):(0,m.jsx)("div",{"data-current":!0,ref:S,children:i},b),tn(()=>{let e=E.current;e&&x&&e.replaceChildren(...Array.from(x.childNodes))},[x]),!function(e){let{popupElement:t,positionerElement:r,content:n,mounted:o,enabled:i=ik,onMeasureLayout:l,onMeasureLayoutComplete:s,side:a,direction:c}=e,u=rk(t,!0,!1),d=rh(),f=g.useRef(null),p=g.useRef(null),m=g.useRef(!0),h=g.useRef(H),b=tN(l),v=tN(s),x=g.useMemo(()=>{let e="top"===a,t="left"===a;return"rtl"===c?(e=e||"inline-end"===a,t=t||"inline-end"===a):(e=e||"inline-start"===a,t=t||"inline-start"===a),e?{position:"absolute",["top"===a?"bottom":"top"]:"0",[t?"right":"left"]:"0"}:W},[a,c]);tn(()=>{if(!o||!i()||"function"!=typeof ResizeObserver){h.current=H,m.current=!0,f.current=null,p.current=null;return}if(!t||!r)return;h.current=iE(t,x);let e=new ResizeObserver(e=>{let t=e[0];t&&(p.current={width:Math.ceil(t.borderBoxSize[0].inlineSize),height:Math.ceil(t.borderBoxSize[0].blockSize)})});e.observe(t),iC(t,"auto");let n=iS(t,"position","static"),l=iS(t,"transform","none"),s=iS(t,"scale","1"),a=iE(r,{"--available-width":"max-content","--available-height":"max-content"});function c(){n(),l(),a(),s()}if(b?.(),m.current||null===f.current){ij(r,"max-content");let n=iw(t);return f.current=n,ij(r,n),c(),v?.(null,n),m.current=!1,()=>{e.disconnect(),h.current(),h.current=H}}iC(t,"auto"),ij(r,"max-content");let g=f.current??p.current,y=iw(t);if(f.current=y,!g)return ij(r,y),c(),v?.(null,y),()=>{e.disconnect(),d.cancel(),h.current(),h.current=H};iC(t,g),c(),v?.(g,y),ij(r,y);let w=new AbortController;return d.request(()=>{iC(t,y),u(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},w.signal)}),()=>{e.disconnect(),w.abort(),d.cancel(),h.current(),h.current=H}},[n,t,r,u,d,i,o,b,v,x])}({popupElement:f,positionerElement:p,mounted:d,content:u,onMeasureLayout:P,onMeasureLayoutComplete:M,side:n,direction:l}),{children:t,state:{activationDirection:function(e){if(e){var t,r;return`${(t=e.horizontal)>5?"right":t<-5?"left":""} ${(r=e.vertical)>5?"down":r<-5?"up":""}`}}(w),transitioning:A}}}({store:l,side:s.side,cssVars:ix,children:o});return V("div",e,{state:{activationDirection:u.activationDirection,transitioning:u.transitioning,instant:a},ref:t,props:[i,{children:c}],stateAttributesMapping:iR})});var ri=ri;class iN{constructor(){this.store=new nn}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error(A(81,e));this.store.setOpen(!0,ro(ri.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,ro(ri.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,iv,"Handle",0,iN,"Popup",0,ib,"Portal",0,og,"Positioner",0,ih,"Provider",0,function(e){let{delay:t,closeDelay:r,timeout:n=400}=e,o=g.useMemo(()=>({delay:t,closeDelay:r}),[t,r]),i=g.useMemo(()=>({open:t,close:r}),[t,r]);return(0,m.jsx)(nm.Provider,{value:o,children:(0,m.jsx)(nS,{delay:i,timeoutMs:n,children:e.children})})},"Root",0,no,"Trigger",0,nL,"Viewport",0,iT,"createHandle",0,function(){return new iN}],27486);var iO=e.i(27486),iO=iO;let iP=e=>{let t,r,n,o=(0,h.c)(6);o[0]!==e?({delay:r,...t}=e,o[0]=e,o[1]=t,o[2]=r):(t=o[1],r=o[2]);let i=void 0===r?0:r;return o[3]!==i||o[4]!==t?(n=(0,m.jsx)(iO.Provider,{"data-slot":"tooltip-provider",delay:i,...t}),o[3]=i,o[4]=t,o[5]=n):n=o[5],n},iM=e=>{let t,r,n=(0,h.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(r=(0,m.jsx)(iO.Root,{"data-slot":"tooltip",...t}),n[2]=t,n[3]=r):r=n[3],r},iL=e=>{let t,r,n=(0,h.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(r=(0,m.jsx)(iO.Trigger,{"data-slot":"tooltip-trigger",...t}),n[2]=t,n[3]=r):r=n[3],r},iA=e=>{let t,r,n,o,i,l,s,a,c,u,d,f=(0,h.c)(21);f[0]!==e?({className:r,side:o,sideOffset:i,align:l,alignOffset:s,children:t,...n}=e,f[0]=e,f[1]=t,f[2]=r,f[3]=n,f[4]=o,f[5]=i,f[6]=l,f[7]=s):(t=f[1],r=f[2],n=f[3],o=f[4],i=f[5],l=f[6],s=f[7]);let p=void 0===o?"top":o,g=void 0===i?4:i,b=void 0===l?"center":l,v=void 0===s?0:s;return f[8]!==r?(a=((...e)=>e4(K(e)))("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),f[8]=r,f[9]=a):a=f[9],f[10]===Symbol.for("react.memo_cache_sentinel")?(c=(0,m.jsx)(iO.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"}),f[10]=c):c=f[10],f[11]!==t||f[12]!==n||f[13]!==a?(u=(0,m.jsxs)(iO.Popup,{"data-slot":"tooltip-content",className:a,...n,children:[t,c]}),f[11]=t,f[12]=n,f[13]=a,f[14]=u):u=f[14],f[15]!==b||f[16]!==v||f[17]!==p||f[18]!==g||f[19]!==u?(d=(0,m.jsx)(iO.Portal,{children:(0,m.jsx)(iO.Positioner,{align:b,alignOffset:v,side:p,sideOffset:g,className:"isolate z-50",children:u})}),f[15]=b,f[16]=v,f[17]=p,f[18]=g,f[19]=u,f[20]=d):d=f[20],d},iI=[{label:"All",value:"all"},{label:"Uncommitted changes",value:"uncommitted"}],iD=(e,t=24)=>{if(e.length<=t)return e;let r=Math.floor((t-1)/2);return`${e.slice(0,r)}…${e.slice(-r)}`},iz=e=>{let t,r,n=(0,h.c)(5),{syncNotice:o}=e;if(!o)return null;if(n[0]!==o.tone){var i;t=((...e)=>e4(K(e)))("rounded-full border px-2 py-1 text-[11px] leading-none","destructive"===(i=o.tone)?"border-destructive/30 bg-destructive/10 text-destructive":"warning"===i?"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400":"border-border bg-muted/40 text-muted-foreground"),n[0]=o.tone,n[1]=t}else t=n[1];return n[2]!==o.label||n[3]!==t?(r=(0,m.jsx)("div",{className:t,children:o.label}),n[2]=o.label,n[3]=t,n[4]=r):r=n[4],r},i_=()=>null,i$=e=>{var t;let r,n,o,i,l,s,a,c,u,d,f,p,b,j,R,T,N,O,P,M,L,A,I,D,z,_,$,B,F,H,W,V,U,q,X,Y,G,Z,J=(0,h.c)(137),{branch:Q,baseBranch:ee,refreshing:et,fileWatchState:er,syncNotice:en,comments:eo,diffMode:ei,onDiffModeChange:el,layout:es,onLayoutChange:ea}=e,[ec,eu]=(0,g.useState)(!1),[ed,ef]=(0,g.useState)(null),[ep,em]=(0,g.useState)(!1),eh=(0,g.useSyncExternalStore)(iB,iF,iH),eg=(0,g.useRef)(null),{resolvedTheme:eb,setTheme:ev}=(0,C.useTheme)(),ex=(0,g.useRef)(null),ey=(0,g.useRef)(null);J[0]===Symbol.for("react.memo_cache_sentinel")?(r=async(e,t)=>{try{await navigator.clipboard.writeText(e),ey.current&&clearTimeout(ey.current),ef(t),ey.current=setTimeout(()=>ef(null),1500)}catch{}},J[0]=r):r=J[0];let ew=r;J[1]!==eo?(n=async()=>{try{let e=(e=>{if(0===e.length)return"No comments.";let t=e.map(e=>{let t=e.tag?`${e.tag} `:"",r=e.lineNumber>0?`:${e.lineNumber}`:"";return`- ${t}**${e.file}${r}**: ${e.body}`});return`## Code Review Comments
|
|
2
|
-
|
|
3
|
-
Please address the following:
|
|
4
|
-
|
|
5
|
-
${t.join("\n")}`})(eo);await navigator.clipboard.writeText(e),ex.current&&clearTimeout(ex.current),eu(!0),ex.current=setTimeout(()=>eu(!1),2e3)}catch{}},J[1]=eo,J[2]=n):n=J[2];let ek=n;if(J[3]===Symbol.for("react.memo_cache_sentinel")?(o=()=>em(!1),J[3]=o):o=J[3],t=o,(Z=(0,h.c)(5))[0]!==eg||Z[1]!==t||Z[2]!==ep?(Y=()=>{if(!ep)return;let e=e=>{eg.current&&!eg.current.contains(e.target)&&t()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},G=[eg,t,ep],Z[0]=eg,Z[1]=t,Z[2]=ep,Z[3]=Y,Z[4]=G):(Y=Z[3],G=Z[4]),(0,g.useEffect)(Y,G),J[4]!==ee||J[5]!==Q||J[6]!==ed||J[7]!==er||J[8]!==et){let e,t,r,n,o,h,g,x,y,w,k,S,C,R,T,N,O,P,M,L,A,{className:I,label:D}="connecting"===er?{className:"bg-muted-foreground/50",label:"Connecting"}:"live"===er?{className:"bg-diff-green",label:"Live"}:{className:"bg-amber-500",label:"Polling"};j=D,s=iP,a=400,f="flex h-[52px] items-center gap-2 border-b border-border bg-card px-4 text-sm",J[20]!==Q?(e=(0,m.jsx)("button",{type:"button",onClick:()=>ew(Q,"branch"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-secondary"}),J[20]=Q,J[21]=e):e=J[21];let z="branch"===ed?"opacity-0":"opacity-100";J[22]!==z?(t=((...e)=>e4(K(e)))("transition-opacity duration-150",z),J[22]=z,J[23]=t):t=J[23],J[24]!==Q?(r=iD(Q),J[24]=Q,J[25]=r):r=J[25],J[26]!==t||J[27]!==r?(n=(0,m.jsx)("span",{className:t,children:r}),J[26]=t,J[27]=r,J[28]=n):n=J[28];let _="branch"===ed?"opacity-100":"opacity-0";J[29]!==_?(o=((...e)=>e4(K(e)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150",_),J[29]=_,J[30]=o):o=J[30],J[31]===Symbol.for("react.memo_cache_sentinel")?(h=(0,m.jsx)(v,{size:14}),J[31]=h):h=J[31],J[32]!==o?(g=(0,m.jsx)("span",{className:o,children:h}),J[32]=o,J[33]=g):g=J[33],J[34]!==e||J[35]!==n||J[36]!==g?(x=(0,m.jsxs)(iL,{render:e,children:[n,g]}),J[34]=e,J[35]=n,J[36]=g,J[37]=x):x=J[37];let $="branch"===ed?"Copied!":"Click to copy";J[38]!==$?(y=(0,m.jsx)(iA,{side:"bottom",children:$}),J[38]=$,J[39]=y):y=J[39],J[40]!==x||J[41]!==y?(w=(0,m.jsxs)(iM,{children:[x,y]}),J[40]=x,J[41]=y,J[42]=w):w=J[42],J[43]===Symbol.for("react.memo_cache_sentinel")?(k=(0,m.jsx)(E,{size:12,className:"text-muted-foreground/50 shrink-0"}),J[43]=k):k=J[43],J[44]!==ee?(S=(0,m.jsx)("button",{type:"button",onClick:()=>ew(ee,"base"),className:"relative whitespace-nowrap rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground cursor-pointer hover:bg-secondary"}),J[44]=ee,J[45]=S):S=J[45];let B="base"===ed?"opacity-0":"opacity-100";J[46]!==B?(C=((...e)=>e4(K(e)))("transition-opacity duration-150",B),J[46]=B,J[47]=C):C=J[47],J[48]!==ee?(R=iD(ee),J[48]=ee,J[49]=R):R=J[49],J[50]!==C||J[51]!==R?(T=(0,m.jsx)("span",{className:C,children:R}),J[50]=C,J[51]=R,J[52]=T):T=J[52];let F="base"===ed?"opacity-100":"opacity-0";J[53]!==F?(N=((...e)=>e4(K(e)))("absolute inset-0 flex items-center justify-center text-diff-green transition-opacity duration-150",F),J[53]=F,J[54]=N):N=J[54],J[55]===Symbol.for("react.memo_cache_sentinel")?(O=(0,m.jsx)(v,{size:14}),J[55]=O):O=J[55],J[56]!==N?(P=(0,m.jsx)("span",{className:N,children:O}),J[56]=N,J[57]=P):P=J[57],J[58]!==S||J[59]!==T||J[60]!==P?(M=(0,m.jsxs)(iL,{render:S,children:[T,P]}),J[58]=S,J[59]=T,J[60]=P,J[61]=M):M=J[61];let H="base"===ed?"Copied!":"Click to copy";J[62]!==H?(L=(0,m.jsx)(iA,{side:"bottom",children:H}),J[62]=H,J[63]=L):L=J[63],J[64]!==M||J[65]!==L?(A=(0,m.jsxs)(iM,{children:[M,L]}),J[64]=M,J[65]=L,J[66]=A):A=J[66],J[67]!==w||J[68]!==A?(p=(0,m.jsxs)("div",{className:"flex items-center gap-1.5",children:[w,k,A]}),J[67]=w,J[68]=A,J[69]=p):p=J[69],J[70]===Symbol.for("react.memo_cache_sentinel")?(b=(0,m.jsx)("div",{className:"flex-1"}),J[70]=b):b=J[70],d="flex items-center gap-0.5",l=iM,i=iL,J[71]===Symbol.for("react.memo_cache_sentinel")?(u=(0,m.jsx)("div",{className:"flex items-center pr-1.5"}),J[71]=u):u=J[71],c=((...e)=>e4(K(e)))("mx-1 size-1.5 rounded-full",I,et&&"animate-pulse"),J[4]=ee,J[5]=Q,J[6]=ed,J[7]=er,J[8]=et,J[9]=i,J[10]=l,J[11]=s,J[12]=a,J[13]=c,J[14]=u,J[15]=d,J[16]=f,J[17]=p,J[18]=b,J[19]=j}else i=J[9],l=J[10],s=J[11],a=J[12],c=J[13],u=J[14],d=J[15],f=J[16],p=J[17],b=J[18],j=J[19];J[72]!==c?(R=(0,m.jsx)("span",{className:c}),J[72]=c,J[73]=R):R=J[73],J[74]!==i||J[75]!==R||J[76]!==u?(T=(0,m.jsx)(i,{render:u,children:R}),J[74]=i,J[75]=R,J[76]=u,J[77]=T):T=J[77],J[78]!==j?(N=(0,m.jsx)(iA,{side:"bottom",children:j}),J[78]=j,J[79]=N):N=J[79],J[80]!==l||J[81]!==T||J[82]!==N?(O=(0,m.jsxs)(l,{children:[T,N]}),J[80]=l,J[81]=T,J[82]=N,J[83]=O):O=J[83],J[84]!==en?(P=(0,m.jsx)(iz,{syncNotice:en}),J[84]=en,J[85]=P):P=J[85],J[86]===Symbol.for("react.memo_cache_sentinel")?(M=()=>em(iW),J[86]=M):M=J[86];let eS="uncommitted"===ei?"Uncommitted":"All",eE=ep&&"rotate-180";J[87]!==eE?(L=((...e)=>e4(K(e)))("transition-transform duration-150",eE),J[87]=eE,J[88]=L):L=J[88],J[89]!==L?(A=(0,m.jsx)(x,{size:10,className:L}),J[89]=L,J[90]=A):A=J[90],J[91]!==eS||J[92]!==A?(I=(0,m.jsxs)(e8,{variant:"ghost",size:"xs",onClick:M,className:"text-muted-foreground hover:text-foreground hover:bg-secondary gap-1",children:[eS,A]}),J[91]=eS,J[92]=A,J[93]=I):I=J[93],J[94]!==ei||J[95]!==ep||J[96]!==el?(D=ep&&(0,m.jsx)("div",{className:"absolute right-0 top-full mt-1 z-50 min-w-[200px] rounded-lg border border-border bg-card shadow-lg dark:shadow-none py-1 overflow-hidden",children:iI.map(e=>{let{value:t,label:r}=e;return(0,m.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-sm text-left hover:bg-secondary/50 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",onClick:()=>{el(t),em(!1)},children:[(0,m.jsx)("span",{className:((...e)=>e4(K(e)))("text-foreground",ei===t&&"font-medium"),children:r}),ei===t&&(0,m.jsx)(v,{size:14,className:"text-diff-green shrink-0"})]},t)})}),J[94]=ei,J[95]=ep,J[96]=el,J[97]=D):D=J[97],J[98]!==I||J[99]!==D?(z=(0,m.jsxs)("div",{className:"relative",ref:eg,children:[I,D]}),J[98]=I,J[99]=D,J[100]=z):z=J[100],J[101]!==eo.length||J[102]!==ec||J[103]!==ek?(_=eo.length>0&&(0,m.jsxs)(iM,{children:[(0,m.jsxs)(iL,{render:(0,m.jsx)(e8,{variant:"ghost",size:"xs",onClick:ek,className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:[ec?(0,m.jsx)(v,{"data-icon":"inline-start"}):(0,m.jsx)(y,{"data-icon":"inline-start"}),ec?"Copied!":`Copy ${eo.length} comment${1===eo.length?"":"s"}`]}),(0,m.jsx)(iA,{side:"bottom",children:"Copy all comments as AI prompt"})]}),J[101]=eo.length,J[102]=ec,J[103]=ek,J[104]=_):_=J[104],J[105]!==es||J[106]!==ea?($=(0,m.jsx)(e8,{variant:"ghost",size:"icon-xs",onClick:()=>ea("split"===es?"stacked":"split"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),J[105]=es,J[106]=ea,J[107]=$):$=J[107],J[108]===Symbol.for("react.memo_cache_sentinel")?(B=(0,m.jsx)(S,{size:14}),J[108]=B):B=J[108],J[109]!==$?(F=(0,m.jsx)(iL,{render:$,children:B}),J[109]=$,J[110]=F):F=J[110];let eC="split"===es?"Switch to unified view (S)":"Switch to split view (S)";return J[111]!==eC?(H=(0,m.jsx)(iA,{side:"bottom",children:eC}),J[111]=eC,J[112]=H):H=J[112],J[113]!==F||J[114]!==H?(W=(0,m.jsxs)(iM,{children:[F,H]}),J[113]=F,J[114]=H,J[115]=W):W=J[115],J[116]!==eh||J[117]!==eb||J[118]!==ev?(V=eh&&(0,m.jsxs)(iM,{children:[(0,m.jsx)(iL,{render:(0,m.jsx)(e8,{variant:"ghost",size:"icon-xs",onClick:()=>ev("dark"===eb?"light":"dark"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary"}),children:"dark"===eb?(0,m.jsx)(w,{size:14}):(0,m.jsx)(k,{size:14})}),(0,m.jsx)(iA,{side:"bottom",children:"dark"===eb?"Switch to light mode":"Switch to dark mode"})]}),J[116]=eh,J[117]=eb,J[118]=ev,J[119]=V):V=J[119],J[120]!==O||J[121]!==P||J[122]!==z||J[123]!==_||J[124]!==W||J[125]!==V||J[126]!==d?(U=(0,m.jsxs)("div",{className:d,children:[O,P,z,_,W,V]}),J[120]=O,J[121]=P,J[122]=z,J[123]=_,J[124]=W,J[125]=V,J[126]=d,J[127]=U):U=J[127],J[128]!==U||J[129]!==f||J[130]!==p||J[131]!==b?(q=(0,m.jsxs)("header",{className:f,children:[p,b,U]}),J[128]=U,J[129]=f,J[130]=p,J[131]=b,J[132]=q):q=J[132],J[133]!==s||J[134]!==a||J[135]!==q?(X=(0,m.jsx)(s,{delay:a,children:q}),J[133]=s,J[134]=a,J[135]=q,J[136]=X):X=J[136],X};function iB(){return i_}function iF(){return!0}function iH(){return!1}function iW(e){return!e}let iV=b("BubbleDotsIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinejoin:"round",strokeWidth:2,d:"M4.002 7c0-1.6568 1.3431-3 3-3h9.9999c1.6569 0 3.0001 1.3431 3.0001 3v8.0358c0 1.6568-1.3432 3-3 3h-1.6263a1 1 0 0 0-.638.2299l-2.74 2.2701-2.7037-2.2664a1 1 0 0 0-.6424-.2336H7.0019c-1.6568 0-3-1.3432-3-3z"}),g.createElement("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:.75,d:"M6.875 11.25a.875.875 0 1 0 1.75 0 .875.875 0 0 0-1.75 0Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Zm4.25 0a.875.875 0 1 0 1.7501-.0001.875.875 0 0 0-1.7501.0001Z"})))),iU=b("Folder1Icon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v9c0 1.6569 1.3431 3 3 3h12c1.6569 0 3-1.3431 3-3v-6c0-1.6569-1.3431-3-3-3h-4.9296a2 2 0 0 1-1.6641-.8906l-.8126-1.2188A2 2 0 0 0 8.9297 4H6C4.3431 4 3 5.3431 3 7"})))),iq=b("FolderOpenFilledIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 3C3.7909 3 2 4.7909 2 7v10.5592C2 18.9072 3.0928 20 4.4408 20H18.045a3.0002 3.0002 0 0 0 2.8487-2.1052l1.6557-5.2983c.3657-1.1701-.3952-2.3574-1.5494-2.5647V9c0-1.6569-1.3431-3-3-3h-4.9296a1 1 0 0 1-.8321-.4453l-.5157-.7735A4 4 0 0 0 8.3945 3zm13 7V9c0-.5523-.4477-1-1-1h-4.9296a3 3 0 0 1-2.4962-1.3359l-.5157-.7735A2 2 0 0 0 8.3945 5H6c-1.1046 0-2 .8954-2 2v10.5592a.4407.4407 0 0 0 .8615.1315l1.7454-5.5855A3 3 0 0 1 9.4704 10z",clipRule:"evenodd"})))),iK=b("MagnifyingGlassIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,d:"m20 20-3.95-3.95M18 11c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7Z"})))),iX=e=>{let t,r,n,o,i=(0,h.c)(7);i[0]!==e?({size:r,...t}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]);let l=void 0===r?16:r;return i[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,m.jsx)("path",{d:"M1 1.75C1 .784 1.784 0 2.75 0h7.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16H2.75A1.75 1.75 0 0 1 1 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073ZM8 3.25a.75.75 0 0 1 .75.75v1.5h1.5a.75.75 0 0 1 0 1.5h-1.5v1.5a.75.75 0 0 1-1.5 0V7h-1.5a.75.75 0 0 1 0-1.5h1.5V4A.75.75 0 0 1 8 3.25Zm-3 8a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"}),i[3]=n):n=i[3],i[4]!==t||i[5]!==l?(o=(0,m.jsx)("svg",{viewBox:"0 0 16 16",width:l,height:l,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:n}),i[4]=t,i[5]=l,i[6]=o):o=i[6],o},iY=e=>{let t,r,n,o,i=(0,h.c)(7);i[0]!==e?({size:r,...t}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]);let l=void 0===r?16:r;return i[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,m.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.48 3.758a.75.75 0 0 1 .755.745l.01 1.497h1.497a.75.75 0 0 1 0 1.5H9v1.507a.75.75 0 0 1-1.5 0V9.005l-1.502.01a.75.75 0 0 1-.01-1.5l1.507-.01-.01-1.492a.75.75 0 0 1 .745-.755Z"}),i[3]=n):n=i[3],i[4]!==t||i[5]!==l?(o=(0,m.jsx)("svg",{viewBox:"0 0 16 16",width:l,height:l,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:n}),i[4]=t,i[5]=l,i[6]=o):o=i[6],o},iG=e=>{let t,r,n,o,i=(0,h.c)(7);i[0]!==e?({size:r,...t}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]);let l=void 0===r?16:r;return i[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,m.jsx)("path",{d:"M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V4.664a.25.25 0 0 0-.073-.177l-2.914-2.914a.25.25 0 0 0-.177-.073Zm4.5 6h2.242a.75.75 0 0 1 0 1.5h-2.24l-2.254.015a.75.75 0 0 1-.01-1.5Z"}),i[3]=n):n=i[3],i[4]!==t||i[5]!==l?(o=(0,m.jsx)("svg",{viewBox:"0 0 16 16",width:l,height:l,fill:"currentColor","aria-hidden":"true",focusable:"false",...t,children:n}),i[4]=t,i[5]=l,i[6]=o):o=i[6],o};e.s([],75704),e.i(75704);let iZ=g.createContext(void 0);function iJ(e){let t=g.useContext(iZ);if(!1===e&&void 0===t)throw Error(A(27));return t}let iQ={...nf,...rw},i0=g.forwardRef(function(e,t){let{render:r,className:n,forceRender:o=!1,...i}=e,{store:l}=iJ(),s=l.useState("open"),a=l.useState("nested"),c=l.useState("mounted");return V("div",e,{state:{open:s,transitionStatus:l.useState("transitionStatus")},ref:[l.context.backdropRef,t],stateAttributesMapping:iQ,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:o||!a})}),i1=g.createContext(void 0);function i2(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:n=0,native:o=!0,composite:i}=e,l=g.useRef(null),s=function(e=!1){let t=g.useContext(i1);if(void 0===t&&!e)throw Error(A(16));return t}(!0),a=i??void 0!==s,{props:c}=function(e){let{focusableWhenDisabled:t,disabled:r,composite:n=!1,tabIndex:o=0,isNativeButton:i}=e,l=n&&!1!==t,s=n&&!1===t;return{props:g.useMemo(()=>{let e={onKeyDown(e){r&&t&&"Tab"!==e.key&&e.preventDefault()}};return n||(e.tabIndex=o,!i&&r&&(e.tabIndex=t?o:-1)),(i&&(t||l)||!i&&r)&&(e["aria-disabled"]=r),i&&(!t||s)&&(e.disabled=r),e},[n,r,t,l,s,i,o])}}({focusableWhenDisabled:r,disabled:t,composite:a,tabIndex:n,isNativeButton:o}),u=g.useCallback(()=>{let e=l.current;i5(e)&&a&&t&&void 0===c.disabled&&e.disabled&&(e.disabled=!1)},[t,c.disabled,a]);return tn(u,[u]),{getButtonProps:g.useCallback((e={})=>{let{onClick:r,onMouseDown:n,onKeyUp:i,onKeyDown:l,onPointerDown:s,...u}=e;return T({type:o?"button":void 0,onClick(e){t?e.preventDefault():r?.(e)},onMouseDown(e){t||n?.(e)},onKeyDown(e){var n;if(t||(M(e),l?.(e),e.baseUIHandlerPrevented))return;let i=e.target===e.currentTarget,s=e.currentTarget,c=i5(s),u=!o&&(n=s,!!(n?.tagName==="A"&&n?.href)),d=i&&(o?c:!u),f="Enter"===e.key,p=" "===e.key,m=s.getAttribute("role"),h=m?.startsWith("menuitem")||"option"===m||"gridcell"===m;if(i&&a&&p){if(e.defaultPrevented&&h)return;e.preventDefault(),u||o&&c?(s.click(),e.preventBaseUIHandler()):d&&(r?.(e),e.preventBaseUIHandler());return}d&&(!o&&(p||f)&&e.preventDefault(),!o&&f&&r?.(e))},onKeyUp(e){t||((M(e),i?.(e),e.target===e.currentTarget&&o&&a&&i5(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||o||a||" "!==e.key||r?.(e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},o?void 0:{role:"button"},c,u)},[t,c,a,o]),buttonRef:tN(e=>{l.current=e,u()})}}function i5(e){return tf(e)&&"BUTTON"===e.tagName}var ri=ri;let i3=g.forwardRef(function(e,t){let{render:r,className:n,disabled:o=!1,nativeButton:i=!0,...l}=e,{store:s}=iJ(),a=s.useState("open"),{getButtonProps:c,buttonRef:u}=i2({disabled:o,native:i});return V("button",e,{state:{disabled:o},ref:[t,u],props:[{onClick:function(e){a&&s.setOpen(!1,ro(ri.closePress,e.nativeEvent))}},l,c]})}),i4=g.forwardRef(function(e,t){let{render:r,className:n,id:o,...i}=e,{store:l}=iJ(),s=np(o);return l.useSyncedValueWithCleanup("descriptionElementId",s),V("p",e,{ref:t,props:[{id:s},i]})});var ri=ri;let i7=0;function i6(e,t={}){let{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(i7);let i=()=>e?.focus({preventScroll:r});o?i():i7=requestAnimationFrame(i)}let i8={inert:new WeakMap,"aria-hidden":new WeakMap},i9="data-base-ui-inert",le={inert:new WeakSet,"aria-hidden":new WeakSet},lt=new WeakMap,lr=0,ln=(e,t)=>t.map(t=>{if(e.contains(t))return t;let r=function e(t){return t?tp(t)?t.host:e(t.parentNode):null}(t);return e.contains(r)?r:null}).filter(e=>null!=e),lo=e=>{let t=new Set;return e.forEach(e=>{let r=e;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},li=(e,t,r)=>{let n=[],o=e=>{!e||r.has(e)||Array.from(e.children).forEach(e=>{"script"!==ts(e)&&(t.has(e)?o(e):n.push(e))})};return o(e),n};function ll(e,t={}){let{ariaHidden:r=!1,inert:n=!1,mark:o=!0,markerIgnoreElements:i=[]}=t,l=t6(e[0]).body;return function(e,t,r,n,{mark:o=!0,markerIgnoreElements:i=[]}){let l=n?"inert":r?"aria-hidden":null,s=null,a=null,c=ln(t,e),u=new Set(o?ln(t,i):[]),d=o?li(t,lo(c),new Set(c)).filter(e=>!u.has(e)):[],f=[],p=[];if(l){let e=i8[l],r=le[l];a=r,s=e;let n=ln(t,Array.from(t.querySelectorAll("[aria-live]"))),o=c.concat(n);li(t,lo(o),new Set(o)).forEach(t=>{let n=t.getAttribute(l),o=null!==n&&"false"!==n,i=(e.get(t)||0)+1;e.set(t,i),f.push(t),1===i&&o&&r.add(t),o||t.setAttribute(l,"inert"===l?"":"true")})}return o&&d.forEach(e=>{let t=(lt.get(e)||0)+1;lt.set(e,t),p.push(e),1===t&&e.setAttribute(i9,"")}),lr+=1,()=>{s&&f.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!a?.has(e)&&l&&e.removeAttribute(l),a?.delete(e))}),o&&p.forEach(e=>{let t=(lt.get(e)||0)-1;lt.set(e,t),t||e.removeAttribute(i9)}),(lr-=1)||(i8.inert=new WeakMap,i8["aria-hidden"]=new WeakMap,le.inert=new WeakSet,le["aria-hidden"]=new WeakSet,lt=new WeakMap)}}(e,l,r,n,{mark:o,markerIgnoreElements:i})}let ls=[];function la(){ls=ls.filter(e=>e.deref()?.isConnected)}function lc(){return la(),ls[ls.length-1]?.deref()}function lu(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;let r=ot(),n=n9(e,r).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return oe(e,r)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||0===n.length?"0"!==o&&e.setAttribute("tabindex","0"):("-1"!==o||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function ld(e){let{context:t,children:r,disabled:n=!1,initialFocus:o=!0,returnFocus:i=!0,restoreFocus:l=!1,modal:s=!0,closeOnFocusOut:a=!0,openInteractionType:c="",nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:h}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),x=b.useState("domReferenceElement"),y=b.useState("floatingElement"),{events:w,dataRef:k}=b.context,S=tN(()=>k.current.floatingContext?.nodeId),E=!1===o,C=tJ(x)&&E,j=g.useRef(["content"]),R=nC(o),T=nC(i),N=nC(c),O=rn(p),P=g.useContext(od),M=g.useRef(!1),L=g.useRef(!1),A=g.useRef(!1),I=g.useRef(-1),D=g.useRef(""),_=g.useRef(""),$=g.useRef(null),B=g.useRef(null),F=z($,f,P?.beforeInsideRef),H=z(B,P?.afterInsideRef),W=t7(),V=t7(),U=rh(),q=null!=P,K=tQ(y),X=tN((e=K)=>e?n8(e,ot()):[]),Y=tN(()=>h?.().filter(e=>null!=e)??[]),G=tN(e=>{let t=X(e);return j.current.map(()=>t).filter(Boolean).flat()});g.useEffect(()=>{if(n||!s)return;function e(e){"Tab"===e.key&&tK(K,tq(t6(K)))&&0===X().length&&!C&&(e.preventDefault(),e.stopPropagation())}let t=t6(K);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[n,x,K,s,j,C,X,G]),g.useEffect(()=>{if(n||!v)return;let e=t6(K);function t(){A.current=!1}function r(e){let t=tY(e),r=Y();A.current=!(tK(y,t)||tK(x,t)||tK(P?.portalNode,t)||r.some(e=>e===t||tK(e,t))),_.current=e.pointerType||"keyboard",t?.closest(`[${oa}]`)&&(L.current=!0)}function o(){_.current="keyboard"}return e.addEventListener("pointerdown",r,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",o,!0),()=>{e.removeEventListener("pointerdown",r,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",o,!0)}},[n,y,x,K,v,P,Y]),g.useEffect(()=>{if(n||!a)return;let e=t6(K);function t(){L.current=!0,V.start(0,()=>{L.current=!1})}function r(e){let t=tY(e),r=X().indexOf(t);-1!==r&&(I.current=r)}function o(t){let r=t.relatedTarget,n=t.currentTarget,o=tY(t);queueMicrotask(()=>{var i;let a=S(),c=b.context.triggerElements,f=Y(),p=r?.hasAttribute(rl("focus-guard"))&&[$.current,B.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,rb(d),rb(u)].includes(r),m=!(tK(x,r)||tK(y,r)||tK(r,y)||tK(P?.portalNode,r)||f.some(e=>e===r||tK(e,r))||null!=r&&c.hasElement(r)||c.hasMatchingElement(e=>tK(e,r))||p||O&&(t8(O.nodesRef.current,a).find(e=>tK(e.context?.elements.floating,r)||tK(e.context?.elements.domReference,r))||t9(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,tQ(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(n===x&&K&&lu(K,j),l&&n!==x&&!((i=o)&&i.isConnected&&("function"==typeof i.checkVisibility?i.checkVisibility():"none"!==tk(i).display))&&tq(e)===e.body){if(tf(K)&&(K.focus(),"popup"===l))return void U.request(()=>{K.focus()});let e=I.current,t=X(),r=t[e]||t[t.length-1]||K;tf(r)&&r.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(C||!s)&&r&&m&&!L.current&&(C||r!==lc())&&(M.current=!0,b.setOpen(!1,ro(ri.focusOut,t)))})}function i(){A.current||(k.current.insideReactTree=!0,W.start(0,()=>{k.current.insideReactTree=!1}))}let c=tf(x)?x:null,f=[];if(y||c)return c&&(c.addEventListener("focusout",o),c.addEventListener("pointerdown",t),f.push(()=>{c.removeEventListener("focusout",o),c.removeEventListener("pointerdown",t)})),y&&(y.addEventListener("focusin",r),y.addEventListener("focusout",o),P&&(y.addEventListener("focusout",i,!0),f.push(()=>{y.removeEventListener("focusout",i,!0)})),f.push(()=>{y.removeEventListener("focusin",r),y.removeEventListener("focusout",o)})),()=>{f.forEach(e=>{e()})}},[n,x,y,K,s,O,P,b,a,l,X,C,S,j,k,W,V,U,u,d,Y]),g.useEffect(()=>{if(n||!y||!v)return;let e=Array.from(P?.portalNode?.querySelectorAll(`[${rl("portal")}]`)||[]),t=O?t9(O.nodesRef.current,S()):[],r=t.find(e=>tJ(e.context?.elements.domReference||null))?.context?.elements.domReference,o=ll([y,...e,$.current,B.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...Y(),r,rb(d),rb(u),C?x:null].filter(e=>null!=e),{ariaHidden:s||C,mark:!1}),i=ll([y,...e].filter(e=>null!=e));return()=>{i(),o()}},[v,n,x,y,s,j,P,C,O,S,u,d,Y]),tn(()=>{if(!v||n||!tf(K))return;let e=tq(t6(K));queueMicrotask(()=>{let t,r=G(K),n=R.current,o="function"==typeof n?n(N.current||""):n;void 0===o||!1===o||(t=(t=!0===o||null===o?r[0]||K:rb(o))||r[0]||K,tK(K,e)||i6(t,{preventScroll:t===K}))})},[n,v,K,E,G,R,N]),tn(()=>{var e;if(n||!K)return;let t=t6(K);function r(e){var t,r,n,o;let i;if(e.open||(t=e.nativeEvent,r=_.current,i=ta(t.target),D.current=t instanceof i.KeyboardEvent?"keyboard":t instanceof i.FocusEvent?r||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof i.MouseEvent?r||(0===t.detail?"keyboard":"mouse"):""),e.reason===ri.triggerHover&&"mouseleave"===e.nativeEvent.type&&(M.current=!0),e.reason===ri.outsidePress)if(e.nested)M.current=!1;else if((""===(n=e.nativeEvent).pointerType&&n.isTrusted?0:t$&&n.pointerType?"click"!==n.type||1!==n.buttons:0!==n.detail||n.pointerType)&&(o=e.nativeEvent,tF?1:(t$||0!==o.width||0!==o.height)&&(!t$||1!==o.width||1!==o.height||0!==o.pressure||0!==o.detail||"mouse"!==o.pointerType)&&(!(o.width<1)||!(o.height<1)||0!==o.pressure||0!==o.detail||"touch"!==o.pointerType))){let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}else M.current=!1}return e=tq(t),la(),e&&"body"!==ts(e)&&(ls.push(new WeakRef(e)),ls.length>20&&(ls=ls.slice(-20))),w.on("openchange",r),()=>{w.off("openchange",r);let e=tq(t),n=Y(),o=tK(y,e)||n.some(t=>t===e||tK(t,e))||O&&t8(O.nodesRef.current,S(),!1).some(t=>tK(t.context?.elements.floating,e)),i=function(){let e=T.current,t="function"==typeof e?e(D.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){let e=x||lc();return e&&e.isConnected?e:null}let r=x||lc();return rb(t)||r||null}();queueMicrotask(()=>{let r=function(e){if(!e)return null;let t=ot();return oe(e,t)?e:n8(e,t)[0]||e}(i),n="boolean"!=typeof T.current;T.current&&!M.current&&tf(r)&&(n||r===e||e===t.body||o)&&r.focus({preventScroll:!0}),M.current=!1})}},[n,y,K,T,k,w,O,x,S,Y]),tn(()=>{if(!tD||v||!y)return;let e=tq(t6(y));tf(e)&&tZ(e)&&tK(y,e)&&e.blur()},[v,y]),tn(()=>{if(!n&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:a,open:v,onOpenChange:b.setOpen,domReference:x}),()=>{P.setFocusManagerState(null)}},[n,P,s,v,b,a,x]),tn(()=>{if(!n&&K)return lu(K,j),()=>{queueMicrotask(la)}},[n,K,j]);let Z=!n&&(!s||!C)&&(q||s);return(0,m.jsxs)(g.Fragment,{children:[Z&&(0,m.jsx)(nz,{"data-type":"inside",ref:F,onFocus:e=>{if(s){let e=G();i6(e[e.length-1])}else if(P?.portalNode)if(M.current=!1,oi(e,P.portalNode)){let e=on(x);e?.focus()}else rb(d??P.beforeOutsideRef)?.focus()}}),r,Z&&(0,m.jsx)(nz,{"data-type":"inside",ref:H,onFocus:e=>{if(s)i6(G()[0]);else if(P?.portalNode)if(a&&(M.current=!0),oi(e,P.portalNode)){let e=oo(x);e?.focus()}else rb(u??P.afterOutsideRef)?.focus()}})]})}let lf=((u={}).nestedDialogs="--nested-dialogs",u),lp=((d={})[d.open=ni.open]="open",d[d.closed=ni.closed]="closed",d[d.startingStyle=ni.startingStyle]="startingStyle",d[d.endingStyle=ni.endingStyle]="endingStyle",d.nested="data-nested",d.nestedDialogOpen="data-nested-dialog-open",d),lm=g.createContext(void 0);function lh(){let e=g.useContext(lm);if(void 0===e)throw Error(A(26));return e}let lg="ArrowUp",lb="ArrowDown",lv="ArrowLeft",lx="ArrowRight";[...new Set([...new Set([lv,lx]),...new Set([lg,lb])])];let ly=new Set([lg,lb,lv,lx,"Home","End"]),lw={...nf,...rw,nestedDialogOpen:e=>e?{[lp.nestedDialogOpen]:""}:null},lk=g.forwardRef(function(e,t){let{className:r,finalFocus:n,initialFocus:o,render:i,...l}=e,{store:s}=iJ(),a=s.useState("descriptionElementId"),c=s.useState("disablePointerDismissal"),u=s.useState("floatingRootContext"),d=s.useState("popupProps"),f=s.useState("modal"),p=s.useState("mounted"),h=s.useState("nested"),g=s.useState("nestedOpenDialogCount"),b=s.useState("open"),v=s.useState("openMethod"),x=s.useState("titleElementId"),y=s.useState("transitionStatus"),w=s.useState("role");lh(),rS({open:b,ref:s.context.popupRef,onComplete(){b&&s.context.onOpenChangeComplete?.(!0)}});let k=void 0===o?function(e){return"touch"!==e||s.context.popupRef.current}:o,S=V("div",e,{state:{open:b,nested:h,transitionStatus:y,nestedDialogOpen:g>0},props:[d,{"aria-labelledby":x??void 0,"aria-describedby":a??void 0,role:w,tabIndex:-1,hidden:!p,onKeyDown(e){ly.has(e.key)&&e.stopPropagation()},style:{[lf.nestedDialogs]:g}},l],ref:[t,s.context.popupRef,s.useStateSetter("popupElement")],stateAttributesMapping:lw});return(0,m.jsx)(ld,{context:u,openInteractionType:v,disabled:!p,closeOnFocusOut:!c,initialFocus:k,returnFocus:n,modal:!1!==f,restoreFocus:"popup",children:S})}),lS=g.forwardRef(function(e,t){let r,{cutout:n,...o}=e;if(n){let e=n?.getBoundingClientRect();r=`polygon(
|
|
6
|
-
0% 0%,
|
|
7
|
-
100% 0%,
|
|
8
|
-
100% 100%,
|
|
9
|
-
0% 100%,
|
|
10
|
-
0% 0%,
|
|
11
|
-
${e.left}px ${e.top}px,
|
|
12
|
-
${e.left}px ${e.bottom}px,
|
|
13
|
-
${e.right}px ${e.bottom}px,
|
|
14
|
-
${e.right}px ${e.top}px,
|
|
15
|
-
${e.left}px ${e.top}px
|
|
16
|
-
)`}return(0,m.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:r}})}),lE=g.forwardRef(function(e,t){let{keepMounted:r=!1,...n}=e,{store:o}=iJ(),i=o.useState("mounted"),l=o.useState("modal"),s=o.useState("open");return i||r?(0,m.jsx)(lm.Provider,{value:r,children:(0,m.jsxs)(om,{ref:t,...n,children:[i&&!0===l&&(0,m.jsx)(lS,{ref:o.context.internalBackdropRef,inert:iy(!s)}),e.children]})}):null}),lC={},lj={},lR="";class lT{lockCount=0;restore=null;timeoutLock=t4.create();timeoutUnlock=t4.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){let t,r,n,o,i;if(0===this.lockCount||null!==this.restore)return;let l=t6(e).documentElement,s=ta(l).getComputedStyle(l).overflowY;if("hidden"===s||"clip"===s){this.restore=H;return}let a=tz||!function(e){if("u"<typeof document)return!1;let t=t6(e);return ta(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=a?(r=(t=t6(e)).documentElement,n=t.body,i={overflowY:(o=tm(r)?r:n).style.overflowY,overflowX:o.style.overflowX},Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}):function(e){let t=t6(e),r=t.documentElement,n=t.body,o=ta(r),i=0,l=0,s=!1,a=rm.create();if(tD&&(o.visualViewport?.scale??1)!==1)return()=>{};function c(){let t=o.getComputedStyle(r),a=o.getComputedStyle(n),c=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=r.scrollTop,l=r.scrollLeft,lC={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},lR=r.style.scrollBehavior,lj={position:n.style.position,height:n.style.height,width:n.style.width,boxSizing:n.style.boxSizing,overflowY:n.style.overflowY,overflowX:n.style.overflowX,scrollBehavior:n.style.scrollBehavior};let u=r.scrollHeight>r.clientHeight,d=r.scrollWidth>r.clientWidth,f="scroll"===t.overflowY||"scroll"===a.overflowY,p="scroll"===t.overflowX||"scroll"===a.overflowX,m=Math.max(0,o.innerWidth-n.clientWidth),h=Math.max(0,o.innerHeight-n.clientHeight),g=parseFloat(a.marginTop)+parseFloat(a.marginBottom),b=parseFloat(a.marginLeft)+parseFloat(a.marginRight),v=tm(r)?r:n;if(s=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=t6(e),r=t.documentElement,n=t.body,o=tm(r)?r:n,i=o.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";let s=o.offsetWidth;o.style.overflowY="hidden";let a=o.offsetWidth;return o.style.overflowY=i,r.style.scrollbarGutter=l,s===a}(e)){r.style.scrollbarGutter=c,v.style.overflowY="hidden",v.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:c,overflowY:"hidden",overflowX:"hidden"}),(u||f)&&(r.style.overflowY="scroll"),(d||p)&&(r.style.overflowX="scroll"),Object.assign(n.style,{position:"relative",height:g||h?`calc(100dvh - ${g+h}px)`:"100dvh",width:b||m?`calc(100vw - ${b+m}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),n.scrollTop=i,n.scrollLeft=l,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function u(){Object.assign(r.style,lC),Object.assign(n.style,lj),s||(r.scrollTop=i,r.scrollLeft=l,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=lR)}function d(){u(),a.request(c)}return c(),o.addEventListener("resize",d),()=>{a.cancel(),u(),"function"==typeof o.removeEventListener&&o.removeEventListener("resize",d)}}(e)}}let lN=new lT,lO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var ri=ri;let lP={...nt,modal:rY(e=>e.modal),nested:rY(e=>e.nested),nestedOpenDialogCount:rY(e=>e.nestedOpenDialogCount),disablePointerDismissal:rY(e=>e.disablePointerDismissal),openMethod:rY(e=>e.openMethod),descriptionElementId:rY(e=>e.descriptionElementId),titleElementId:rY(e=>e.titleElementId),viewportElement:rY(e=>e.viewportElement),role:rY(e=>e.role)};class lM extends r0{constructor(e){super(function(e={}){return{...r9(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}(e),{popupRef:g.createRef(),backdropRef:g.createRef(),internalBackdropRef:g.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new r8,onOpenChange:void 0,onOpenChangeComplete:void 0},lP)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let r={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",r);let n={open:e},o=t.trigger?.id??null;(o||e)&&(n.activeTriggerId=o,n.activeTriggerElement=t.trigger??null),this.update(n)}}let lL=((f={})[f.open=ni.open]="open",f[f.closed=ni.closed]="closed",f[f.startingStyle=ni.startingStyle]="startingStyle",f[f.endingStyle=ni.endingStyle]="endingStyle",f.nested="data-nested",f.nestedDialogOpen="data-nested-dialog-open",f),lA={...nf,...rw,nested:e=>e?{[lL.nested]:""}:null,nestedDialogOpen:e=>e?{[lL.nestedDialogOpen]:""}:null},lI=g.forwardRef(function(e,t){let{className:r,render:n,children:o,...i}=e,l=lh(),{store:s}=iJ(),a=s.useState("open"),c=s.useState("nested"),u=s.useState("transitionStatus"),d=s.useState("nestedOpenDialogCount"),f=s.useState("mounted");return V("div",e,{enabled:l||f,state:{open:a,nested:c,transitionStatus:u,nestedDialogOpen:d>0},ref:[t,s.useStateSetter("viewportElement")],stateAttributesMapping:lA,props:[{role:"presentation",hidden:!f,style:{pointerEvents:a?void 0:"none"},children:o},i]})}),lD=g.forwardRef(function(e,t){let{render:r,className:n,id:o,...i}=e,{store:l}=iJ(),s=np(o);return l.useSyncedValueWithCleanup("titleElementId",s),V("h2",e,{ref:t,props:[{id:s},i]})});var ri=ri;let lz=g.forwardRef(function(e,t){let{render:r,className:n,disabled:o=!1,nativeButton:i=!0,id:l,payload:s,handle:a,...c}=e,u=iJ(!0),d=a?.store??u?.store;if(!d)throw Error(A(79));let f=np(l),p=d.useState("floatingRootContext"),m=d.useState("isOpenedByTrigger",f),h=g.useRef(null),{registerTrigger:b,isMountedByThisTrigger:v}=rE(f,h,d,{payload:s}),{getButtonProps:x,buttonRef:y}=i2({disabled:o,native:i}),w=ru([function(e,t={}){let r="rootStore"in e?e.rootStore:e,n=r.context.dataRef,{enabled:o=!0,event:i="click",toggle:l=!0,ignoreMouse:s=!1,stickIfOpen:a=!0,touchOpenDelay:c=0,reason:u=ri.triggerPress}=t,d=g.useRef(void 0),f=rh(),p=t7(),m=g.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,o=e.nativeEvent,m=r.select("open");if(0!==e.button||"click"===i||t0(t,!0)&&s)return;let h=n.current.openEvent,g=h?.type,b=r.select("domReferenceElement")!==e.currentTarget,v=m&&b||!(m&&l&&(!h||!a||"click"===g||"mousedown"===g));if(tZ(o.target)){let e=ro(u,o,o.target);v&&"touch"===t&&c>0?p.start(c,()=>{r.setOpen(!0,e)}):r.setOpen(v,e);return}let x=e.currentTarget;f.request(()=>{let e=ro(u,o,x);v&&"touch"===t&&c>0?p.start(c,()=>{r.setOpen(!0,e)}):r.setOpen(v,e)})},onClick(e){if("mousedown-only"===i)return;let t=d.current;if("mousedown"===i&&t){d.current=void 0;return}if(t0(t,!0)&&s)return;let o=r.select("open"),f=n.current.openEvent,m=r.select("domReferenceElement")!==e.currentTarget,h=o&&m||!(o&&l&&(!f||!a||t1(f))),g=ro(u,e.nativeEvent,e.currentTarget);h&&"touch"===t&&c>0?p.start(c,()=>{r.setOpen(!0,g)}):r.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[n,i,s,r,a,l,f,p,c,u]);return g.useMemo(()=>o?{reference:m}:W,[o,m])}(p,{enabled:null!=p})]),k=d.useState("triggerProps",v);return V("button",e,{state:{disabled:o,open:m},ref:[y,t,b,h],props:[w.getReferenceProps(),k,{[oa]:"",id:f},c,x],stateAttributesMapping:nd})});var ri=ri;class l_{constructor(e){this.store=e??new lM}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,ro(ri.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,ro(ri.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,ro(ri.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Backdrop",0,i0,"Close",0,i3,"Description",0,i4,"Handle",0,l_,"Popup",0,lk,"Portal",0,lE,"Root",0,function(e){let{children:t,open:r,defaultOpen:n=!1,onOpenChange:o,onOpenChangeComplete:i,disablePointerDismissal:l=!1,modal:s=!0,actionsRef:a,handle:c,triggerId:u,defaultTriggerId:d=null}=e,f=iJ(!0),p=!!f,h=D(()=>c?.store??new lM({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:l,nested:p})).current;tr(()=>{void 0===r&&!1===h.state.open&&!0===n&&h.update({open:!0,activeTriggerId:d})}),h.useControlledProp("openProp",r),h.useControlledProp("triggerIdProp",u),h.useSyncedValues({disablePointerDismissal:l,nested:p,modal:s}),h.useContextCallback("onOpenChange",o),h.useContextCallback("onOpenChangeComplete",i);let b=h.useState("payload");!function(e){let{store:t,parentContext:r,actionsRef:n}=e,o=t.useState("open"),i=t.useState("disablePointerDismissal"),l=t.useState("modal"),s=t.useState("popupElement"),{openMethod:a,triggerProps:c}=function(e){let t,r,n,o,[i,l]=g.useState(null),s=tN((t,r)=>{e||l(r||(tz?"touch":""))});t=g.useRef(e),tn(()=>{t.current!==e&&r(t.current)},[e,r=tN(t=>{t&&!e&&l(null)})]),tn(()=>{t.current=e},[e]);let{onClick:a,onPointerDown:c}=(n=g.useRef(""),o=g.useCallback(e=>{e.defaultPrevented||(n.current=e.pointerType,s(e,e.pointerType))},[s]),{onClick:g.useCallback(e=>{0===e.detail?s(e,"keyboard"):(s(e,"pointerType"in e?e.pointerType:n.current),n.current="")},[s]),onPointerDown:o});return g.useMemo(()=>({openMethod:i,triggerProps:{onClick:a,onPointerDown:c}}),[i,a,c])}(o);rC(t);let{forceUnmount:u}=rj(o,t),d=tN(e=>{let r=ro(e);return r.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},r}),f=g.useCallback(()=>{t.setOpen(!1,d(ri.imperativeAction))},[t,d]);g.useImperativeHandle(n,()=>({unmount:u,close:f}),[u,f]);let p=r6({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=g.useState(0),b=0===m,v=function(e,t={}){let r="rootStore"in e?e.rootStore:e,n=r.useState("open"),o=r.useState("floatingId"),i=r.useState("domReferenceElement"),l=r.useState("floatingElement"),{role:s="dialog"}=t,a=r3(),c=i?.id||a,u=g.useMemo(()=>tQ(l)?.id||o,[l,o]),d=lO.get(s)??s,f=null!=rr(),p=g.useMemo(()=>"tooltip"===d||"label"===s?W:{"aria-haspopup":"alertdialog"===d?"dialog":d,"aria-expanded":"false",..."listbox"===d&&{role:"combobox"},..."menu"===d&&f&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[d,f,s]),m=g.useMemo(()=>"tooltip"===d||"label"===s?{[`aria-${"label"===s?"labelledby":"describedby"}`]:n?u:void 0}:{...p,"aria-expanded":n?"true":"false","aria-controls":n?u:void 0,..."menu"===d&&{id:c}},[d,u,n,c,s,p]),h=g.useMemo(()=>{let e={id:u,...d&&{role:d}};return"tooltip"===d||"label"===s?e:{...e,..."menu"===d&&{"aria-labelledby":c}}},[d,u,c,s]),b=g.useCallback(({active:e,selected:t})=>{let r={role:"option",...e&&{id:`${u}-fui-option`}};switch(s){case"select":case"combobox":return{...r,"aria-selected":t}}return{}},[u,s]);return g.useMemo(()=>({reference:m,floating:h,item:b,trigger:p}),[m,h,p,b])}(p),x=rc(p,{outsidePressEvent:()=>t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:"trap-focus"===l?"sloppy":"intentional",touch:"sloppy"},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||"button"in e&&0!==e.button||"touches"in e&&1!==e.touches.length)return!1;let r=tY(e);return!!b&&!i&&(!l||!t.context.internalBackdropRef.current&&!t.context.backdropRef.current||t.context.internalBackdropRef.current===r||t.context.backdropRef.current===r||tK(r,s)&&!r?.hasAttribute("data-base-ui-portal"))},escapeKey:b});!function(e=!0,t=null){tn(()=>{if(e)return lN.acquire(t)},[e,t])}(o&&!0===l,s);let{getReferenceProps:y,getFloatingProps:w,getTriggerProps:k}=ru([v,x]);t.useContextCallback("onNestedDialogOpen",e=>{h(e+1)}),t.useContextCallback("onNestedDialogClose",()=>{h(0)}),g.useEffect(()=>(r?.onNestedDialogOpen&&o&&r.onNestedDialogOpen(m),r?.onNestedDialogClose&&!o&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&o&&r.onNestedDialogClose()}),[o,r,m]);let S=g.useMemo(()=>y(c),[y,c]),E=g.useMemo(()=>k(c),[k,c]),C=g.useMemo(()=>w(),[w]);t.useSyncedValues({openMethod:a,activeTriggerProps:S,inactiveTriggerProps:E,popupProps:C,floatingRootContext:p,nestedOpenDialogCount:m})}({store:h,actionsRef:a,parentContext:f?.store.context,onOpenChange:o,triggerIdProp:u});let v=g.useMemo(()=>({store:h}),[h]);return(0,m.jsx)(iZ.Provider,{value:v,children:"function"==typeof t?t({payload:b}):t})},"Title",0,lD,"Trigger",0,lz,"Viewport",0,lI,"createHandle",0,function(){return new l_}],87913);var l$=e.i(87913),l$=l$;let lB=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),lF=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var lH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let lW=(0,g.createContext)({}),lV=(0,g.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:n,className:o="",children:i,iconNode:l,...s},a)=>{let{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:p=""}=(0,g.useContext)(lW)??{},m=n??d?24*Number(r??u)/Number(t??c):r??u;return(0,g.createElement)("svg",{ref:a,...lH,width:t??c??lH.width,height:t??c??lH.height,stroke:e??f,strokeWidth:m,className:lB("lucide",p,o),...!i&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(s)&&{"aria-hidden":"true"},...s},[...l.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(i)?i:[i]])}),lU=(p=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(n=(0,g.forwardRef)(({className:e,...t},r)=>(0,g.createElement)(lV,{ref:r,iconNode:p,className:lB(`lucide-${lF("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=lF("x"),n),lq=e=>{let t,r,n=(0,h.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(r=(0,m.jsx)(l$.Root,{"data-slot":"sheet",...t}),n[2]=t,n[3]=r):r=n[3],r},lK=e=>{let t,r,n=(0,h.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(r=(0,m.jsx)(l$.Portal,{"data-slot":"sheet-portal",...t}),n[2]=t,n[3]=r):r=n[3],r},lX=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)(l$.Backdrop,{"data-slot":"sheet-overlay",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},lY=e=>{let t,r,n,o,i,l,s,a,c,u=(0,h.c)(17);u[0]!==e?({className:r,children:t,side:o,showCloseButton:i,...n}=e,u[0]=e,u[1]=t,u[2]=r,u[3]=n,u[4]=o,u[5]=i):(t=u[1],r=u[2],n=u[3],o=u[4],i=u[5]);let d=void 0===o?"right":o,f=void 0===i||i;return u[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,m.jsx)(lX,{}),u[6]=l):l=u[6],u[7]!==r?(s=((...e)=>e4(K(e)))("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",r),u[7]=r,u[8]=s):s=u[8],u[9]!==f?(a=f&&(0,m.jsxs)(l$.Close,{"data-slot":"sheet-close",render:(0,m.jsx)(e8,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,m.jsx)(lU,{}),(0,m.jsx)("span",{className:"sr-only",children:"Close"})]}),u[9]=f,u[10]=a):a=u[10],u[11]!==t||u[12]!==n||u[13]!==d||u[14]!==s||u[15]!==a?(c=(0,m.jsxs)(lK,{children:[l,(0,m.jsxs)(l$.Popup,{"data-slot":"sheet-content","data-side":d,className:s,...n,children:[t,a]})]}),u[11]=t,u[12]=n,u[13]=d,u[14]=s,u[15]=a,u[16]=c):c=u[16],c},lG=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("flex flex-col gap-0.5 p-4",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{"data-slot":"sheet-header",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},lZ=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("font-heading text-base font-medium text-foreground",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)(l$.Title,{"data-slot":"sheet-title",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},lJ=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("text-sm text-muted-foreground",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)(l$.Description,{"data-slot":"sheet-description",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},lQ=(0,g.createContext)(null),l0=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,b,v,x,y=(0,h.c)(36);y[0]!==e?({defaultOpen:s,open:n,onOpenChange:i,className:r,style:l,children:t,...o}=e,y[0]=e,y[1]=t,y[2]=r,y[3]=n,y[4]=o,y[5]=i,y[6]=l,y[7]=s):(t=y[1],r=y[2],n=y[3],o=y[4],i=y[5],l=y[6],s=y[7]);let w=void 0===s||s,k=(()=>{let e,t,r=(0,h.c)(2),[n,o]=(0,g.useState)();return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=window.matchMedia("(max-width: 767px)"),t=()=>{o(window.innerWidth<768)};return e.addEventListener("change",t),o(window.innerWidth<768),()=>e.removeEventListener("change",t)},t=[],r[0]=e,r[1]=t):(e=r[0],t=r[1]),(0,g.useEffect)(e,t),!!n})(),[S,E]=(0,g.useState)(!1),[C,j]=(0,g.useState)(w),R=n??C;y[8]!==R||y[9]!==i?(a=e=>{let t="function"==typeof e?e(R):e;i?i(t):j(t),cookieStore.set({expires:Date.now()+6048e5,name:"sidebar_state",path:"/",value:String(t)})},y[8]=R,y[9]=i,y[10]=a):a=y[10];let T=a;y[11]!==k||y[12]!==T?(c=()=>k?E(l7):T(l6),y[11]=k,y[12]=T,y[13]=c):c=y[13];let N=c;y[14]!==N?(u=()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),N())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},d=[N],y[14]=N,y[15]=u,y[16]=d):(u=y[15],d=y[16]),(0,g.useEffect)(u,d);let O=R?"expanded":"collapsed";y[17]!==k||y[18]!==R||y[19]!==S||y[20]!==T||y[21]!==O||y[22]!==N?(f={isMobile:k,open:R,openMobile:S,setOpen:T,setOpenMobile:E,state:O,toggleSidebar:N},y[17]=k,y[18]=R,y[19]=S,y[20]=T,y[21]=O,y[22]=N,y[23]=f):f=y[23];let P=f;y[24]!==r?(p=((...e)=>e4(K(e)))("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),y[24]=r,y[25]=p):p=y[25],y[26]!==l?(b={"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...l},y[26]=l,y[27]=b):b=y[27];let M=b;return y[28]!==t||y[29]!==o||y[30]!==p||y[31]!==M?(v=(0,m.jsx)(iP,{delay:0,children:(0,m.jsx)("div",{className:p,"data-slot":"sidebar-wrapper",style:M,...o,children:t})}),y[28]=t,y[29]=o,y[30]=p,y[31]=M,y[32]=v):v=y[32],y[33]!==P||y[34]!==v?(x=(0,m.jsx)(lQ.Provider,{value:P,children:v}),y[33]=P,y[34]=v,y[35]=x):x=y[35],x},l1=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p=(0,h.c)(46);p[0]!==e?({side:o,variant:i,collapsible:l,className:r,children:t,...n}=e,p[0]=e,p[1]=t,p[2]=r,p[3]=n,p[4]=o,p[5]=i,p[6]=l):(t=p[1],r=p[2],n=p[3],o=p[4],i=p[5],l=p[6]);let b=void 0===o?"left":o,v=void 0===i?"sidebar":i,x=void 0===l?"offcanvas":l,{isMobile:y,state:w,openMobile:k,setOpenMobile:S}=(()=>{let e=(0,g.useContext)(lQ);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e})();if("none"===x){let e,o;return p[7]!==r?(e=((...e)=>e4(K(e)))("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),p[7]=r,p[8]=e):e=p[8],p[9]!==t||p[10]!==n||p[11]!==e?(o=(0,m.jsx)("div",{className:e,"data-slot":"sidebar",...n,children:t}),p[9]=t,p[10]=n,p[11]=e,p[12]=o):o=p[12],o}if(y){let e,r,o,i,l;return p[13]===Symbol.for("react.memo_cache_sentinel")?(e={"--sidebar-width":"18rem"},p[13]=e):e=p[13],p[14]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsxs)(lG,{className:"sr-only",children:[(0,m.jsx)(lZ,{children:"Sidebar"}),(0,m.jsx)(lJ,{children:"Displays the mobile sidebar."})]}),p[14]=r):r=p[14],p[15]!==t?(o=(0,m.jsx)("div",{className:"flex h-full w-full flex-col",children:t}),p[15]=t,p[16]=o):o=p[16],p[17]!==b||p[18]!==o?(i=(0,m.jsxs)(lY,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:b,style:e,children:[r,o]}),p[17]=b,p[18]=o,p[19]=i):i=p[19],p[20]!==k||p[21]!==n||p[22]!==S||p[23]!==i?(l=(0,m.jsx)(lq,{onOpenChange:S,open:k,...n,children:i}),p[20]=k,p[21]=n,p[22]=S,p[23]=i,p[24]=l):l=p[24],l}let E="collapsed"===w?x:"",C="floating"===v||"inset"===v?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";p[25]!==C?(s=((...e)=>e4(K(e)))("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",C),p[25]=C,p[26]=s):s=p[26],p[27]!==s?(a=(0,m.jsx)("div",{className:s,"data-slot":"sidebar-gap"}),p[27]=s,p[28]=a):a=p[28];let j="left"===b?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",R="floating"===v||"inset"===v?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";return p[29]!==r||p[30]!==j||p[31]!==R?(c=((...e)=>e4(K(e)))("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",j,R,r),p[29]=r,p[30]=j,p[31]=R,p[32]=c):c=p[32],p[33]!==t?(u=(0,m.jsx)("div",{className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm","data-sidebar":"sidebar","data-slot":"sidebar-inner",children:t}),p[33]=t,p[34]=u):u=p[34],p[35]!==n||p[36]!==c||p[37]!==u?(d=(0,m.jsx)("div",{className:c,"data-slot":"sidebar-container",...n,children:u}),p[35]=n,p[36]=c,p[37]=u,p[38]=d):d=p[38],p[39]!==b||p[40]!==w||p[41]!==d||p[42]!==E||p[43]!==a||p[44]!==v?(f=(0,m.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":E,"data-side":b,"data-slot":"sidebar","data-state":w,"data-variant":v,children:[a,d]}),p[39]=b,p[40]=w,p[41]=d,p[42]=E,p[43]=a,p[44]=v,p[45]=f):f=p[45],f},l2=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("main",{className:n,"data-slot":"sidebar-inset",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},l5=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("flex flex-col gap-2 p-2",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-sidebar":"header","data-slot":"sidebar-header",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},l3=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("flex flex-col gap-2 p-2",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-sidebar":"footer","data-slot":"sidebar-footer",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},l4=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-sidebar":"content","data-slot":"sidebar-content",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o};function l7(e){return!e}function l6(e){return!e}let l8="diffhub:file-tree:expand-all",l9="diffhub:file-tree:collapse-all",se=e=>e.map(e=>{if("file"===e.type)return e;let t=se(e.children);if(1===t.length&&"folder"===t[0].type){let r=t[0];return{...r,name:`${e.name}/${r.name}`}}return{...e,children:t}}),st=(e,t=[])=>{for(let r of e)"folder"===r.type&&(t.push(r.path),st(r.children,t));return t},sr=(0,g.memo)(function(e){let t,r,n,o,i,l,s,a,c,u,d=(0,h.c)(30),{node:f,depth:p,isSelected:g,commentCount:b,onNavigate:v}=e,x=16*p+8,{insertions:y,deletions:w}=f.fileStat,k=iX;y>0&&0===w?k=iY:w>0&&0===y&&(k=iG);let S="shrink-0 text-sidebar-foreground/40";y>0&&0===w?S="shrink-0 text-diff-green":w>0&&0===y&&(S="shrink-0 text-destructive");let E=g?"true":void 0,C=g?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground";d[0]!==C?(t=((...e)=>e4(K(e)))("flex w-full cursor-pointer items-center gap-1.5 py-1 text-left transition-colors",C),d[0]=C,d[1]=t):t=d[1];let j=g?"true":void 0;return d[2]!==x?(r={containIntrinsicBlockSize:"26px",contentVisibility:"auto",paddingLeft:x,paddingRight:8},d[2]=x,d[3]=r):r=d[3],d[4]!==f.path||d[5]!==v?(n=()=>v(f.path),d[4]=f.path,d[5]=v,d[6]=n):n=d[6],d[7]!==k||d[8]!==S?(o=(0,m.jsx)(k,{size:16,className:S}),d[7]=k,d[8]=S,d[9]=o):o=d[9],d[10]===Symbol.for("react.memo_cache_sentinel")?(i=(0,m.jsx)("span",{className:"flex-1 truncate text-[12px] leading-tight text-muted-foreground"}),d[10]=i):i=d[10],d[11]!==f.name?(l=(0,m.jsx)(iL,{render:i,children:f.name}),d[11]=f.name,d[12]=l):l=d[12],d[13]!==f.path?(s=(0,m.jsx)(iA,{side:"right",children:f.path}),d[13]=f.path,d[14]=s):s=d[14],d[15]!==s||d[16]!==l?(a=(0,m.jsxs)(iM,{children:[l,s]}),d[15]=s,d[16]=l,d[17]=a):a=d[17],d[18]!==b?(c=b>0&&(0,m.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-sidebar-foreground/50",children:[(0,m.jsx)(iV,{size:10}),b]}),d[18]=b,d[19]=c):c=d[19],d[20]!==f.path||d[21]!==E||d[22]!==a||d[23]!==c||d[24]!==t||d[25]!==j||d[26]!==r||d[27]!==n||d[28]!==o?(u=(0,m.jsxs)("button",{type:"button","aria-current":E,className:t,"data-file-path":f.path,"data-selected":j,style:r,onClick:n,children:[o,a,c]}),d[20]=f.path,d[21]=E,d[22]=a,d[23]=c,d[24]=t,d[25]=j,d[26]=r,d[27]=n,d[28]=o,d[29]=u):u=d[29],u}),sn=(0,g.memo)(function(e){let t,r,n,o,i,l,s,a,c,u,d,f,p,b,v,x,y,w=(0,h.c)(50),{node:k,depth:S,isCollapsed:E,onToggle:C,children:j}=e,R=16*S+8;if(w[0]!==R||w[1]!==E||w[2]!==k.name||w[3]!==k.path||w[4]!==C){let e=(d=e7(k.name)).split("/");i="button",l=!E,s="flex w-full items-center gap-1.5 py-1 text-left transition-colors hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",w[16]!==R?(a={paddingLeft:R,paddingRight:8},w[16]=R,w[17]=a):a=w[17],w[18]!==k.path||w[19]!==C?(c=()=>C(k.path),w[18]=k.path,w[19]=C,w[20]=c):c=w[20],w[21]!==E?(u=E?(0,m.jsx)(iU,{size:16,className:"shrink-0 text-sidebar-foreground/50"}):(0,m.jsx)(iq,{size:16,className:"shrink-0 text-sidebar-foreground/50"}),w[21]=E,w[22]=u):u=w[22],r=iM,t=iL,w[23]===Symbol.for("react.memo_cache_sentinel")?(n=(0,m.jsx)("span",{className:"truncate text-[12px] text-muted-foreground"}),w[23]=n):n=w[23],o=e.map((t,r)=>{let n=e.slice(0,r+1).join("/");return(0,m.jsxs)(g.Fragment,{children:[t,r<e.length-1&&(0,m.jsx)("span",{className:"text-sidebar-foreground/30",children:"/"})]},n)}),w[0]=R,w[1]=E,w[2]=k.name,w[3]=k.path,w[4]=C,w[5]=t,w[6]=r,w[7]=n,w[8]=o,w[9]=i,w[10]=l,w[11]=s,w[12]=a,w[13]=c,w[14]=u,w[15]=d}else t=w[5],r=w[6],n=w[7],o=w[8],i=w[9],l=w[10],s=w[11],a=w[12],c=w[13],u=w[14],d=w[15];return w[24]!==t||w[25]!==n||w[26]!==o?(f=(0,m.jsx)(t,{render:n,children:o}),w[24]=t,w[25]=n,w[26]=o,w[27]=f):f=w[27],w[28]!==k.name||w[29]!==d?(p=k.name!==d&&(0,m.jsx)(iA,{side:"right",children:k.name}),w[28]=k.name,w[29]=d,w[30]=p):p=w[30],w[31]!==r||w[32]!==p||w[33]!==f?(b=(0,m.jsxs)(r,{children:[f,p]}),w[31]=r,w[32]=p,w[33]=f,w[34]=b):b=w[34],w[35]!==b||w[36]!==i||w[37]!==l||w[38]!==s||w[39]!==a||w[40]!==c||w[41]!==u?(v=(0,m.jsxs)("button",{type:i,"aria-expanded":l,className:s,style:a,onClick:c,children:[u,b]}),w[35]=b,w[36]=i,w[37]=l,w[38]=s,w[39]=a,w[40]=c,w[41]=u,w[42]=v):v=w[42],w[43]!==j||w[44]!==R||w[45]!==E?(x=!E&&(0,m.jsxs)("div",{className:"relative",children:[(0,m.jsx)("div",{className:"pointer-events-none absolute inset-y-0 border-l border-sidebar-border/60",style:{left:R+8}}),j]}),w[43]=j,w[44]=R,w[45]=E,w[46]=x):x=w[46],w[47]!==v||w[48]!==x?(y=(0,m.jsxs)(m.Fragment,{children:[v,x]}),w[47]=v,w[48]=x,w[49]=y):y=w[49],y}),so=(0,g.memo)(function e({nodes:t,depth:r,selectedFile:n,commentsByFile:o,collapsedFolders:i,onToggleFolder:l,onNavigate:s}){return t.map(t=>"folder"===t.type?(0,m.jsx)(sn,{node:t,depth:r,isCollapsed:i.has(t.path),onToggle:l,children:(0,m.jsx)(e,{nodes:t.children,depth:r+1,selectedFile:n,commentsByFile:o,collapsedFolders:i,onToggleFolder:l,onNavigate:s})},t.path):(0,m.jsx)(sr,{node:t,depth:r,isSelected:n===t.path,commentCount:o.get(t.path)??0,onNavigate:s},t.path))}),si=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,b,v,x,y,w,k,S,E,C,j,R,T,N,O=(0,h.c)(67),{files:P,selectedFile:M,onSelectFile:L,comments:A,filterQuery:I,onFilterChange:D,isLoading:z,insertions:_,deletions:$}=e;O[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Set,O[0]=t):t=O[0];let[B,F]=(0,g.useState)(t),[H,W]=(0,g.useState)(256),V=(0,g.useRef)(null);O[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{let e=()=>{V.current=null,document.body.style.cursor="",document.body.style.userSelect=""},t=e=>{V.current&&W(Math.max(8,V.current.startWidth+e.clientX-V.current.startX))},r=()=>{V.current&&e()};return document.addEventListener("mousemove",t),document.addEventListener("mouseup",r),window.addEventListener("blur",r),()=>{e(),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r),window.removeEventListener("blur",r)}},n=[],O[1]=r,O[2]=n):(r=O[1],n=O[2]),(0,g.useEffect)(r,n),O[3]!==H?(o=e=>{e.preventDefault(),V.current={startWidth:H,startX:e.clientX},document.body.style.cursor="col-resize",document.body.style.userSelect="none"},O[3]=H,O[4]=o):o=O[4];let U=o;O[5]!==P||O[6]!==I?(i=I?P.filter(e=>e.file.toLowerCase().includes(I.toLowerCase())):P,O[5]=P,O[6]=I,O[7]=i):i=O[7];let q=i;O[8]!==q?(l=se((e=>{let t={files:[],folders:{}};for(let r of e){let e=r.file.split("/"),n=t;for(let t=0;t<e.length-1;t+=1){let r=e[t];n.folders[r]||(n.folders[r]={files:[],folders:{}}),n=n.folders[r]}n.files.push(r)}let r=(e,t,n)=>{let o=n?`${n}/${e}`:e,i=[];for(let[e,n]of Object.entries(t.folders).toSorted())i.push(r(e,n,o));for(let e of t.files){let t=e.file.split("/");i.push({fileStat:e,name:t.at(-1)??e.file,path:e.file,type:"file"})}return{children:i,name:e,path:o,type:"folder"}},n=[];for(let[e,o]of Object.entries(t.folders).toSorted())n.push(r(e,o,""));for(let e of t.files)n.push({fileStat:e,name:e.file,path:e.file,type:"file"});return n})(q)),O[8]=q,O[9]=l):l=O[9];let K=l;O[10]!==K?(s=st(K),O[10]=K,O[11]=s):s=O[11];let X=s;if(O[12]!==X?(c=()=>{let e=()=>{F(new Set)},t=()=>{F(new Set(X))};return window.addEventListener(l8,e),window.addEventListener(l9,t),()=>{window.removeEventListener(l8,e),window.removeEventListener(l9,t)}},a=[X],O[12]=X,O[13]=a,O[14]=c):(a=O[13],c=O[14]),(0,g.useEffect)(c,a),O[15]!==A){for(let e of(u=new Map,A))u.set(e.file,(u.get(e.file)??0)+1);O[15]=A,O[16]=u}else u=O[16];let Y=u;O[17]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{F(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},O[17]=d):d=O[17];let G=d;O[18]!==L?(f=e=>{let t=new CustomEvent("diffhub:file:navigate",{cancelable:!0,detail:{file:e,source:"sidebar"}});window.dispatchEvent(t)&&L(e,"auto")},O[18]=L,O[19]=f):f=O[19];let Z=f;if(void 0!==z&&z){let e;O[20]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:(0,m.jsx)("p",{className:"animate-pulse text-xs text-sidebar-foreground/50",children:"Loading…"})}),O[20]=e):e=O[20],p=e}else if(0===q.length){let e,t,r;O[21]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("p",{className:"text-xs text-sidebar-foreground/50",children:"No changes"}),O[21]=e):e=O[21],O[22]!==I?(t=I&&(0,m.jsxs)("p",{className:"text-[10px] text-sidebar-foreground/30",children:["No files match “",I,"”"]}),O[22]=I,O[23]=t):t=O[23],O[24]!==t?(r=(0,m.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[e,t]}),O[24]=t,O[25]=r):r=O[25],p=r}else{let e;O[26]!==B||O[27]!==Y||O[28]!==Z||O[29]!==M||O[30]!==K?(e=(0,m.jsx)(so,{nodes:K,depth:0,selectedFile:M,commentsByFile:Y,collapsedFolders:B,onToggleFolder:G,onNavigate:Z}),O[26]=B,O[27]=Y,O[28]=Z,O[29]=M,O[30]=K,O[31]=e):e=O[31],p=e}let J=`${H}px`;O[32]!==J?(b={"--sidebar-width":J},O[32]=J,O[33]=b):b=O[33];let Q=b;O[34]===Symbol.for("react.memo_cache_sentinel")?(v=(0,m.jsx)(iK,{size:12,className:"pointer-events-none absolute left-2.5 text-sidebar-foreground/40"}),O[34]=v):v=O[34],O[35]!==D?(x=e=>D(e.target.value),O[35]=D,O[36]=x):x=O[36],O[37]!==I||O[38]!==x?(y=(0,m.jsx)("input",{type:"text",value:I,onChange:x,placeholder:"Filter files…","aria-label":"Filter files",className:"w-full rounded-md border border-sidebar-border bg-sidebar-accent py-1.5 pl-7 pr-7 text-xs text-sidebar-foreground placeholder:text-sidebar-foreground/40 transition-colors focus:border-sidebar-ring/50 focus:outline-none"}),O[37]=I,O[38]=x,O[39]=y):y=O[39],O[40]!==I||O[41]!==D?(w=I&&(0,m.jsx)("button",{type:"button",onClick:()=>D(""),"aria-label":"Clear filter",className:"absolute right-2 text-sm leading-none text-sidebar-foreground/40 transition-colors hover:text-sidebar-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-sidebar-ring",children:"×"}),O[40]=I,O[41]=D,O[42]=w):w=O[42],O[43]!==y||O[44]!==w?(k=(0,m.jsx)(l5,{className:"border-b border-sidebar-border h-[52px] flex-row items-center py-0 px-2",children:(0,m.jsxs)("div",{className:"relative flex w-full items-center",children:[v,y,w]})}),O[43]=y,O[44]=w,O[45]=k):k=O[45],O[46]!==p?(S=(0,m.jsx)(l4,{className:"gap-0 py-1",children:p}),O[46]=p,O[47]=S):S=O[47];let ee=1===P.length?"file":"files";return O[48]!==P.length||O[49]!==ee?(E=(0,m.jsxs)("span",{children:[P.length," ",ee]}),O[48]=P.length,O[49]=ee,O[50]=E):E=O[50],O[51]!==_?(C=_>0&&(0,m.jsxs)("span",{className:"text-diff-green",children:["+",_]}),O[51]=_,O[52]=C):C=O[52],O[53]!==$?(j=$>0&&(0,m.jsxs)("span",{className:"text-destructive",children:["−",$]}),O[53]=$,O[54]=j):j=O[54],O[55]!==E||O[56]!==C||O[57]!==j?(R=(0,m.jsx)(l3,{className:"border-t border-sidebar-border px-3 py-2",children:(0,m.jsxs)("div",{className:"flex items-center gap-2 text-[12px] font-mono text-sidebar-foreground/60",children:[E,C,j]})}),O[55]=E,O[56]=C,O[57]=j,O[58]=R):R=O[58],O[59]!==U?(T=(0,m.jsx)("div",{"aria-hidden":!0,className:"absolute inset-y-0 right-0 z-20 w-[5px] cursor-col-resize after:absolute after:inset-y-0 after:left-1/2 after:-translate-x-1/2 after:w-px after:transition-colors hover:after:bg-sidebar-border",onMouseDown:U}),O[59]=U,O[60]=T):T=O[60],O[61]!==Q||O[62]!==k||O[63]!==S||O[64]!==R||O[65]!==T?(N=(0,m.jsx)(iP,{delay:400,children:(0,m.jsxs)(l1,{collapsible:"none",className:"sticky top-0 h-svh self-start overflow-hidden border-r border-sidebar-border",style:Q,children:[k,S,R,T]})}),O[61]=Q,O[62]=k,O[63]=S,O[64]=R,O[65]=T,O[66]=N):N=O[66],N};var sl=e.i(70703),ss=g;let sa={dark:{addition:"oklch(0.696 0.15 145)",deletion:"oklch(0.704 0.191 22.216)"},light:{addition:"oklch(0.696 0.17 145)",deletion:"oklch(0.577 0.245 27.325)"}},sc={dark:{additionBg:"rgba(74, 222, 128, 0.12)",additionBgNumber:"rgba(74, 222, 128, 0.18)",additionEmphasis:"rgba(74, 222, 128, 0.25)",deletionBg:"rgba(248, 113, 113, 0.12)",deletionBgNumber:"rgba(248, 113, 113, 0.18)",deletionEmphasis:"rgba(248, 113, 113, 0.25)"},light:{additionBg:"rgba(34, 197, 94, 0.08)",additionBgNumber:"rgba(34, 197, 94, 0.12)",additionEmphasis:"rgba(34, 197, 94, 0.20)",deletionBg:"rgba(239, 68, 68, 0.08)",deletionBgNumber:"rgba(239, 68, 68, 0.12)",deletionEmphasis:"rgba(239, 68, 68, 0.20)"}},su=e=>{let t,r,n,o,i,l,s,a,c=(0,h.c)(22),{value:u,label:d,copiedLabel:f,delay:p,className:b}=e,x=void 0===d?"Copy file path":d,w=void 0===f?"Copied!":f,k=void 0===p?400:p,[S,E]=(0,g.useState)(!1);c[0]!==u?(t=async()=>{try{await navigator.clipboard.writeText(u),E(!0),setTimeout(()=>E(!1),1500)}catch{}},c[0]=u,c[1]=t):t=c[1];let C=t,j=S?w:x,R=S?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary";c[2]!==b||c[3]!==R?(r=((...e)=>e4(K(e)))("size-6",R,b),c[2]=b,c[3]=R,c[4]=r):r=c[4],c[5]!==C||c[6]!==j||c[7]!==r?(n=(0,m.jsx)(e8,{variant:"ghost",size:"icon-xs",onClick:C,"aria-label":j,className:r}),c[5]=C,c[6]=j,c[7]=r,c[8]=n):n=c[8],c[9]!==S?(o=S?(0,m.jsx)(v,{size:12}):(0,m.jsx)(y,{size:12}),c[9]=S,c[10]=o):o=c[10],c[11]!==n||c[12]!==o?(i=(0,m.jsx)(iL,{render:n,children:o}),c[11]=n,c[12]=o,c[13]=i):i=c[13];let T=S?w:x;return c[14]!==T?(l=(0,m.jsx)(iA,{side:"bottom",children:T}),c[14]=T,c[15]=l):l=c[15],c[16]!==i||c[17]!==l?(s=(0,m.jsxs)(iM,{children:[i,l]}),c[16]=i,c[17]=l,c[18]=s):s=c[18],c[19]!==k||c[20]!==s?(a=(0,m.jsx)(iP,{delay:k,children:s}),c[19]=k,c[20]=s,c[21]=a):a=c[21],a},sd=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,g,b,v,y,w,k,S,E,C,j,R,T,N=(0,h.c)(64),{file:O,insertions:P,deletions:M,commentCount:L,repoPath:A,collapsed:I,active:D,onToggleCollapse:z,headingId:_,panelId:$}=e,B=void 0!==I&&I;if(N[0]!==O){let e=(n=e7(O)).lastIndexOf("/");t=-1===e?"":n.slice(0,e),r=-1===e?n:n.slice(e+1),N[0]=O,N[1]=t,N[2]=r,N[3]=n}else t=N[1],r=N[2],n=N[3];let F=r;N[4]!==O||N[5]!==z?(o=()=>{z?z():window.dispatchEvent(new CustomEvent("diffhub:file:toggle-collapse",{detail:{file:O}}))},N[4]=O,N[5]=z,N[6]=o):o=N[6];let H=o,W=void 0!==D&&D?"true":void 0,V=B?"collapsed":"expanded",U=!B,q=B?"Expand file section":"Collapse file section";N[7]!==H||N[8]!==$||N[9]!==U||N[10]!==q?(i=(0,m.jsx)(e8,{variant:"ghost",size:"icon-xs",onClick:H,"aria-expanded":U,"aria-controls":$,"aria-label":q,className:"text-muted-foreground hover:bg-transparent active:bg-transparent aria-expanded:bg-transparent"}),N[7]=H,N[8]=$,N[9]=U,N[10]=q,N[11]=i):i=N[11];let X=B&&"-rotate-90";N[12]!==X?(l=((...e)=>e4(K(e)))("transition-transform duration-150",X),N[12]=X,N[13]=l):l=N[13],N[14]!==l?(s=(0,m.jsx)(x,{size:14,className:l}),N[14]=l,N[15]=s):s=N[15],N[16]!==s||N[17]!==i?(a=(0,m.jsx)(iL,{render:i,children:s}),N[16]=s,N[17]=i,N[18]=a):a=N[18];let Y=B?"Expand file section":"Collapse file section";N[19]!==Y?(c=(0,m.jsx)(iA,{side:"bottom",children:Y}),N[19]=Y,N[20]=c):c=N[20],N[21]!==a||N[22]!==c?(u=(0,m.jsxs)(iM,{children:[a,c]}),N[21]=a,N[22]=c,N[23]=u):u=N[23],N[24]===Symbol.for("react.memo_cache_sentinel")?(d=(0,m.jsx)("span",{className:"flex min-w-0 items-center gap-1"}),N[24]=d):d=N[24],N[25]!==t?(f=t&&(0,m.jsxs)("span",{className:"text-muted-foreground truncate shrink",children:[t,"/"]}),N[25]=t,N[26]=f):f=N[26],N[27]!==F?(p=(0,m.jsx)("span",{className:"text-muted-foreground font-normal shrink-0",children:F}),N[27]=F,N[28]=p):p=N[28],N[29]!==f||N[30]!==p?(g=(0,m.jsxs)("span",{className:"flex min-w-0 items-baseline gap-0 font-mono",children:[f,p]}),N[29]=f,N[30]=p,N[31]=g):g=N[31];let G=`${A}/${O}`;return N[32]!==G?(b=(0,m.jsx)(su,{value:G}),N[32]=G,N[33]=b):b=N[33],N[34]!==g||N[35]!==b?(v=(0,m.jsxs)(iL,{render:d,children:[g,b]}),N[34]=g,N[35]=b,N[36]=v):v=N[36],N[37]!==O||N[38]!==n?(y=O!==n&&(0,m.jsx)(iA,{side:"bottom",children:O}),N[37]=O,N[38]=n,N[39]=y):y=N[39],N[40]!==v||N[41]!==y?(w=(0,m.jsxs)(iM,{children:[v,y]}),N[40]=v,N[41]=y,N[42]=w):w=N[42],N[43]!==P?(k=P>0&&(0,m.jsxs)("span",{className:"font-mono text-[12px] text-diff-green",children:["+",P]}),N[43]=P,N[44]=k):k=N[44],N[45]!==M?(S=M>0&&(0,m.jsxs)("span",{className:"font-mono text-[12px] text-destructive",children:["−",M]}),N[45]=M,N[46]=S):S=N[46],N[47]!==k||N[48]!==S?(E=(0,m.jsxs)("span",{className:"flex items-center gap-1 shrink-0",children:[k,S]}),N[47]=k,N[48]=S,N[49]=E):E=N[49],N[50]!==w||N[51]!==E?(C=(0,m.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[w,E]}),N[50]=w,N[51]=E,N[52]=C):C=N[52],N[53]!==_||N[54]!==u||N[55]!==C?(j=(0,m.jsxs)("h3",{id:_,className:"flex min-w-0 flex-1 items-center gap-2 text-[12px] font-normal",children:[u,C]}),N[53]=_,N[54]=u,N[55]=C,N[56]=j):j=N[56],N[57]!==L?(R=L>0&&(0,m.jsxs)("div",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded-full bg-diff-purple/10 text-diff-purple text-[10px] shrink-0",children:[(0,m.jsx)(iV,{size:10}),L]}),N[57]=L,N[58]=R):R=N[58],N[59]!==j||N[60]!==R||N[61]!==W||N[62]!==V?(T=(0,m.jsx)(iP,{delay:400,children:(0,m.jsxs)("div",{"data-active":W,"data-state":V,className:"flex items-center gap-2 px-3 h-9 border-b border-border bg-card sticky top-[52px] z-10",children:[j,R]})}),N[59]=j,N[60]=R,N[61]=W,N[62]=V,N[63]=T):T=N[63],T},sf=b("BranchIcon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("circle",{cx:6.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),g.createElement("circle",{cx:6.5,cy:18,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),g.createElement("circle",{cx:17.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6.5 8v8M17.5 8v1c0 1.6569-1.3431 3-3 3h-5c-1.6569 0-3 1.3431-3 3v1"})))),sp=b("TrashCan2Icon",(0,g.forwardRef)((e,t)=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},g.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 6v12c0 1.6569 1.3431 3 3 3h6c1.6569 0 3-1.3431 3-3V6M6 6h12M6 6H4m14 0h2M9 6c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-1 5v5m-4-5v5"})))),sm=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-slot":"empty",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sh=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("flex max-w-sm flex-col items-center gap-2 text-center",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-slot":"empty-header",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sg=Y("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}}}),sb=e=>{let t,r,n,o,i,l=(0,h.c)(11);l[0]!==e?({className:t,variant:n,...r}=e,l[0]=e,l[1]=t,l[2]=r,l[3]=n):(t=l[1],r=l[2],n=l[3]);let s=void 0===n?"default":n;return l[4]!==t||l[5]!==s?(o=((...e)=>e4(K(e)))(sg({className:t,variant:s})),l[4]=t,l[5]=s,l[6]=o):o=l[6],l[7]!==r||l[8]!==o||l[9]!==s?(i=(0,m.jsx)("div",{className:o,"data-slot":"empty-icon","data-variant":s,...r}),l[7]=r,l[8]=o,l[9]=s,l[10]=i):i=l[10],i},sv=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("font-medium text-lg tracking-tight",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-slot":"empty-title",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sx=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-slot":"empty-description",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sy=e=>{let t,r,n,o,i=(0,h.c)(8);return i[0]!==e?({className:t,...r}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]),i[3]!==t?(n=((...e)=>e4(K(e)))("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,m.jsx)("div",{className:n,"data-slot":"empty-content",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sw=e=>{let t,r,n,o,i,l=(0,h.c)(10);return l[0]!==e?({className:r,children:t,...n}=e,l[0]=e,l[1]=t,l[2]=r,l[3]=n):(t=l[1],r=l[2],n=l[3]),l[4]!==r?(o=((...e)=>e4(K(e)))("inline-flex h-5 items-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground",r),l[4]=r,l[5]=o):o=l[5],l[6]!==t||l[7]!==n||l[8]!==o?(i=(0,m.jsx)("kbd",{className:o,...n,children:t}),l[6]=t,l[7]=n,l[8]=o,l[9]=i):i=l[9],i},sk={"[must-fix]":{border:"border-l-destructive",text:"text-destructive"},"[nit]":{border:"border-l-muted-foreground/40",text:"text-muted-foreground"},"[question]":{border:"border-l-diff-purple",text:"text-diff-purple"},"[suggestion]":{border:"border-l-diff-green",text:"text-diff-green"}},sS=[],sE=null,sC=null,sj=0,sR=()=>{let e,t,r,n,o,i,l,s,a,c,u,d=(0,h.c)(11);return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("div",{className:"h-9 border-b border-border bg-card"}),d[0]=e):e=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),d[1]=t):t=d[1],d[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[t,(0,m.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"67%"}})]}),d[2]=r):r=d[2],d[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),d[3]=n):n=d[3],d[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[n,(0,m.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"82%"}})]}),d[4]=o):o=d[4],d[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-destructive/20"}),d[5]=i):i=d[5],d[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-destructive/5",children:[i,(0,m.jsx)("div",{className:"h-2 rounded bg-destructive/15",style:{width:"54%"}})]}),d[6]=l):l=d[6],d[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-muted"}),d[7]=s):s=d[7],d[8]===Symbol.for("react.memo_cache_sentinel")?(a=(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[s,(0,m.jsx)("div",{className:"h-2 rounded bg-muted",style:{width:"78%"}})]}),d[8]=a):a=d[8],d[9]===Symbol.for("react.memo_cache_sentinel")?(c=(0,m.jsx)("div",{className:"h-2 w-6 shrink-0 rounded bg-diff-green/20"}),d[9]=c):c=d[9],d[10]===Symbol.for("react.memo_cache_sentinel")?(u=(0,m.jsxs)("div",{className:"animate-pulse",children:[e,(0,m.jsxs)("div",{children:[r,o,l,a,(0,m.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[c,(0,m.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"91%"}})]})]})]}),d[10]=u):u=d[10],u},sT=e=>{let t,r,n,o,i=(0,h.c)(12),{onRender:l,variant:s,changes:a}=e,c="large"===s;i[0]!==l?(t=(0,m.jsx)(e8,{size:"sm",variant:"default",onClick:l,children:"Load diff"}),i[0]=l,i[1]=t):t=i[1];let u=c?"Large diffs are not rendered by default.":"Diff rendering is deferred until this file becomes active or visible.";return i[2]!==u?(r=(0,m.jsx)("p",{className:"text-sm text-muted-foreground",children:u}),i[2]=u,i[3]=r):r=i[3],i[4]!==a||i[5]!==c?(n=c&&void 0!==a?(0,m.jsxs)("p",{className:"text-xs text-muted-foreground/70",children:[a.toLocaleString()," changed lines"]}):null,i[4]=a,i[5]=c,i[6]=n):n=i[6],i[7]!==t||i[8]!==r||i[9]!==n||i[10]!==s?(o=(0,m.jsxs)("div",{className:"mx-4 my-4 flex flex-col items-center justify-center gap-2 rounded-md border border-dashed border-border bg-muted/20 p-6","data-testid":"deferred-diff-placeholder","data-variant":s,children:[t,r,n]}),i[7]=t,i[8]=r,i[9]=n,i[10]=s,i[11]=o):o=i[11],o};class sN extends ss.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("[diffhub] PatchDiff threw",{componentStack:t.componentStack,error:e.message,file:this.props.file})}render(){return this.state.error?(0,m.jsxs)("div",{className:"px-4 py-6 text-sm text-destructive",children:["Failed to render diff for this file: ",this.state.error.message]}):this.props.children}}let sO=(0,sl.default)(()=>e.A(15910).then(e=>({default:e.PatchDiff})).catch(e=>(console.error("[diffhub] Failed to load PatchDiff",e),{default:()=>(0,m.jsxs)("div",{className:"p-4 text-destructive text-sm",children:["Failed to load diff viewer: ",String(e)]})})),{loadableGenerated:{modules:[11251]},loading:()=>(0,m.jsx)(sR,{}),ssr:!1}),sP=e=>{let t,r,n,o,i,l,s,a,c,u,d,f=(0,h.c)(32),{onSubmit:p,onCancel:g}=e,[b,v]=(0,ss.useState)(""),[x,y]=(0,ss.useState)(null),[w,k]=(0,ss.useState)(!1);f[0]!==b||f[1]!==w||f[2]!==p?(t=async()=>{let e=b.trim();!e||w||(y(null),k(!0),await p(e,"").catch(s$)||y("Failed to save comment."),k(!1))},f[0]=b,f[1]=w,f[2]=p,f[3]=t):t=f[3];let S=t;f[4]===Symbol.for("react.memo_cache_sentinel")?(r=e=>v(e.target.value),f[4]=r):r=f[4],f[5]!==b||f[6]!==S||f[7]!==g?(n=e=>{("Enter"===e.key&&e.metaKey||"Return"===e.key)&&b.trim()&&S(),"Escape"===e.key&&g()},f[5]=b,f[6]=S,f[7]=g,f[8]=n):n=f[8],f[9]!==b||f[10]!==n?(o=(0,m.jsx)("textarea",{ref:s_,value:b,onChange:r,placeholder:"Add a comment for the AI",rows:3,onKeyDown:n,className:"w-full resize-none rounded border-0 bg-transparent px-0 py-0 font-sans text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"}),f[9]=b,f[10]=n,f[11]=o):o=f[11],f[12]!==g?(i=(0,m.jsx)(e8,{variant:"ghost",size:"sm",onClick:g,children:"Cancel"}),f[12]=g,f[13]=i):i=f[13],f[14]!==b||f[15]!==w?(l=!b.trim()||w,f[14]=b,f[15]=w,f[16]=l):l=f[16],f[17]!==S?(s=()=>void S(),f[17]=S,f[18]=s):s=f[18];let E=w?"Saving…":"Comment";return f[19]!==l||f[20]!==s||f[21]!==E?(a=(0,m.jsx)(e8,{size:"sm",disabled:l,onClick:s,children:E}),f[19]=l,f[20]=s,f[21]=E,f[22]=a):a=f[22],f[23]!==i||f[24]!==a?(c=(0,m.jsxs)("div",{className:"mt-2 flex justify-end gap-2",children:[i,a]}),f[23]=i,f[24]=a,f[25]=c):c=f[25],f[26]!==x?(u=x&&(0,m.jsx)("p",{className:"mt-2 text-xs text-destructive",children:x}),f[26]=x,f[27]=u):u=f[27],f[28]!==c||f[29]!==u||f[30]!==o?(d=(0,m.jsxs)("div",{className:"my-1 mx-4 rounded-md border border-border bg-background p-3 shadow-lg dark:shadow-none",children:[o,c,u]}),f[28]=c,f[29]=u,f[30]=o,f[31]=d):d=f[31],d},sM=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,g,b,x,w,k,S,E,C,j,R,T,N,O=(0,h.c)(60),{comment:P,onDelete:M}=e,[L,A]=(0,ss.useState)(!1),[I,D]=(0,ss.useState)(null),[z,_]=(0,ss.useState)(!1),$=(0,ss.useRef)(null);O[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>()=>{$.current&&(clearTimeout($.current),$.current=null)},r=[],O[0]=t,O[1]=r):(t=O[0],r=O[1]),(0,ss.useEffect)(t,r),O[2]!==P.body||O[3]!==P.tag?(n=async()=>{let e=P.tag?`${P.tag} ${P.body}`:P.body;try{await navigator.clipboard.writeText(e),$.current&&clearTimeout($.current),A(!0),$.current=setTimeout(()=>{A(!1),$.current=null},1500)}catch{}},O[2]=P.body,O[3]=P.tag,O[4]=n):n=O[4];let B=n;O[5]!==z||O[6]!==M?(o=async()=>{z||(D(null),_(!0),await M().catch(sB)||D("Failed to delete comment."),_(!1))},O[5]=z,O[6]=M,O[7]=o):o=O[7];let F=o,H=P.tag?sk[P.tag]?.border??"border-l-ring/40":"border-l-ring/40";O[8]!==H?(i=((...e)=>e4(K(e)))("group my-1 mx-4 rounded-md border border-border bg-card shadow-sm dark:shadow-none overflow-hidden border-l-2",H),O[8]=H,O[9]=i):i=O[9],O[10]!==P.tag?(l=P.tag&&(0,m.jsx)("span",{className:((...e)=>e4(K(e)))("shrink-0 mt-0.5 text-[11px]",sk[P.tag]?.text??"text-muted-foreground"),children:P.tag}),O[10]=P.tag,O[11]=l):l=O[11],O[12]!==P.body?(s=(0,m.jsx)("p",{className:"flex-1 text-sm text-foreground leading-relaxed",children:P.body}),O[12]=P.body,O[13]=s):s=O[13];let W=L?"Comment copied":"Copy comment",V=L?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary";O[14]!==V?(a=((...e)=>e4(K(e)))("rounded p-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",V),O[14]=V,O[15]=a):a=O[15],O[16]!==B||O[17]!==a||O[18]!==W?(c=(0,m.jsx)("button",{type:"button",onClick:B,"aria-label":W,className:a}),O[16]=B,O[17]=a,O[18]=W,O[19]=c):c=O[19],O[20]!==L?(u=L?(0,m.jsx)(v,{size:12}):(0,m.jsx)(y,{size:12}),O[20]=L,O[21]=u):u=O[21],O[22]!==c||O[23]!==u?(d=(0,m.jsx)(iL,{render:c,children:u}),O[22]=c,O[23]=u,O[24]=d):d=O[24];let U=L?"Copied!":"Copy comment";return O[25]!==U?(f=(0,m.jsx)(iA,{side:"top",children:U}),O[25]=U,O[26]=f):f=O[26],O[27]!==d||O[28]!==f?(p=(0,m.jsxs)(iM,{children:[d,f]}),O[27]=d,O[28]=f,O[29]=p):p=O[29],O[30]!==F||O[31]!==z?(g=(0,m.jsx)("button",{type:"button",onClick:F,"aria-label":"Delete comment",disabled:z,className:"rounded p-1 text-muted-foreground transition-colors hover:text-destructive hover:bg-destructive/10 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50"}),O[30]=F,O[31]=z,O[32]=g):g=O[32],O[33]===Symbol.for("react.memo_cache_sentinel")?(b=(0,m.jsx)(sp,{size:12}),O[33]=b):b=O[33],O[34]!==g?(x=(0,m.jsx)(iL,{render:g,children:b}),O[34]=g,O[35]=x):x=O[35],O[36]===Symbol.for("react.memo_cache_sentinel")?(w=(0,m.jsx)(iA,{side:"top",children:"Delete comment"}),O[36]=w):w=O[36],O[37]!==x?(k=(0,m.jsxs)(iM,{children:[x,w]}),O[37]=x,O[38]=k):k=O[38],O[39]!==p||O[40]!==k?(S=(0,m.jsx)(iP,{delay:400,children:(0,m.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[p,k]})}),O[39]=p,O[40]=k,O[41]=S):S=O[41],O[42]!==S||O[43]!==l||O[44]!==s?(E=(0,m.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2.5",children:[l,s,S]}),O[42]=S,O[43]=l,O[44]=s,O[45]=E):E=O[45],O[46]!==P.lineNumber?(C=(0,m.jsxs)("span",{children:["L",P.lineNumber]}),O[46]=P.lineNumber,O[47]=C):C=O[47],O[48]!==P.createdAt?(j=P.createdAt&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{children:"·"}),(0,m.jsx)("span",{children:(e=>{let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(t<60)return"just now";let r=Math.floor(t/60);if(r<60)return`${r}m ago`;let n=Math.floor(r/60);if(n<24)return`${n}h ago`;let o=Math.floor(n/24);return`${o}d ago`})(P.createdAt)})]}),O[48]=P.createdAt,O[49]=j):j=O[49],O[50]!==C||O[51]!==j?(R=(0,m.jsxs)("div",{className:"border-t border-border/40 px-3 py-1 flex items-center gap-2 text-[10px] text-muted-foreground/60",children:[C,j]}),O[50]=C,O[51]=j,O[52]=R):R=O[52],O[53]!==I?(T=I&&(0,m.jsx)("p",{className:"px-3 pb-2 text-xs text-destructive",children:I}),O[53]=I,O[54]=T):T=O[54],O[55]!==E||O[56]!==R||O[57]!==T||O[58]!==i?(N=(0,m.jsxs)("div",{className:i,children:[E,R,T]}),O[55]=E,O[56]=R,O[57]=T,O[58]=i,O[59]=N):N=O[59],N},sL=e=>`diff-${encodeURIComponent(e)}`,sA=(0,ss.memo)(function(e){let t,r,n=(0,h.c)(5),{getHoveredLine:o,onCommentTargetChange:i}=e;n[0]!==o||n[1]!==i?(t=()=>{let e=o();e&&i({lineNumber:e.lineNumber,side:e.side})},n[0]=o,n[1]=i,n[2]=t):t=n[2];let l=t;return n[3]!==l?(r=(0,m.jsx)("button",{type:"button",className:"diffhub-gutter-btn",title:"Add comment for AI",onClick:l,children:"+"}),n[3]=l,n[4]=r):r=n[4],r}),sI=(0,ss.memo)(function(e){let t,r,n,o,i,l,s,a=(0,h.c)(59),{file:c,filePatch:u,layout:d,prerenderedHTML:f,shouldRenderPatch:p,comments:g,fileStat:b,isLargeFile:v,collapsed:x,active:y,sectionId:w,onToggleCollapse:k,repoPath:S,commentTarget:E,onCommentTargetChange:j,onRenderPatch:R,onAddComment:T,onDeleteComment:N}=e,O=void 0!==y&&y,{resolvedTheme:P}=(0,C.useTheme)(),M=`${w}-header`,L=`${w}-panel`;a[0]!==E||a[1]!==c||a[2]!==g?(t=g.map(sF),E&&t.push({lineNumber:E.lineNumber,metadata:{file:c,type:"input"},side:E.side}),a[0]=E,a[1]=c,a[2]=g,a[3]=t):t=a[3];let A=t;a[4]!==c||a[5]!==T||a[6]!==j||a[7]!==N?(r=e=>{let t=e.metadata;return t?"input"===t.type?(0,m.jsx)(sP,{onSubmit:async(t,r)=>{let n=await T(c,e.lineNumber,e.side,t,r);return n&&j(null),n},onCancel:()=>j(null)}):"comment"===t.type?(0,m.jsx)(sM,{comment:t.comment,onDelete:()=>N(t.comment.id)}):null:null},a[4]=c,a[5]=T,a[6]=j,a[7]=N,a[8]=r):r=a[8];let I=r;a[9]!==j?(n=e=>(0,m.jsx)(sA,{getHoveredLine:e,onCommentTargetChange:j}),a[9]=j,a[10]=n):n=a[10];let D=n;a[11]!==R?(o=()=>{R()},a[11]=R,a[12]=o):o=a[12];let z=o,_=x&&null===E,$=null;if(!_)if(u)if(p){let e,t,r,n,o,i,l=f?.["light"===P?"light":"dark"],s="light"===P?"light":"dark";a[14]!==s?(e={colorScheme:s},a[14]=s,a[15]=e):e=a[15];let p="split"===d?"split":"unified";a[16]===Symbol.for("react.memo_cache_sentinel")?(t={dark:"github-dark",light:"github-light"},a[16]=t):t=a[16];let h="light"===P?"light":"dark",g=P??"dark";if(a[17]!==g){let e,t;e=sa[g],t=sc[g],r=`
|
|
17
|
-
[data-diff-span] { border-radius: 0; }
|
|
18
|
-
:host {
|
|
19
|
-
/* Base colors for additions/deletions */
|
|
20
|
-
--diffs-addition-color-override: ${e.addition};
|
|
21
|
-
--diffs-deletion-color-override: ${e.deletion};
|
|
22
|
-
|
|
23
|
-
/* Line background colors */
|
|
24
|
-
--diffs-bg-addition-override: ${t.additionBg};
|
|
25
|
-
--diffs-bg-deletion-override: ${t.deletionBg};
|
|
26
|
-
|
|
27
|
-
/* Line number background colors */
|
|
28
|
-
--diffs-bg-addition-number-override: ${t.additionBgNumber};
|
|
29
|
-
--diffs-bg-deletion-number-override: ${t.deletionBgNumber};
|
|
30
|
-
|
|
31
|
-
/* Character-level emphasis (inline diff highlights) */
|
|
32
|
-
--diffs-bg-addition-emphasis-override: ${t.additionEmphasis};
|
|
33
|
-
--diffs-bg-deletion-emphasis-override: ${t.deletionEmphasis};
|
|
34
|
-
|
|
35
|
-
/* Hover states */
|
|
36
|
-
--diffs-bg-addition-hover-override: ${t.additionEmphasis};
|
|
37
|
-
--diffs-bg-deletion-hover-override: ${t.deletionEmphasis};
|
|
38
|
-
|
|
39
|
-
/* Line number text colors */
|
|
40
|
-
--diffs-fg-number-addition-override: ${e.addition};
|
|
41
|
-
--diffs-fg-number-deletion-override: ${e.deletion};
|
|
42
|
-
}
|
|
43
|
-
`,a[17]=g,a[18]=r}else r=a[18];a[19]!==h||a[20]!==r||a[21]!==p?(n={diffStyle:p,disableFileHeader:!0,disableLineNumbers:!1,enableGutterUtility:!0,expansionLineCount:20,hunkSeparators:"line-info",lineDiffType:"word",lineHoverHighlight:"line",maxLineDiffLength:500,overflow:"wrap",theme:t,themeType:h,unsafeCSS:r},a[19]=h,a[20]=r,a[21]=p,a[22]=n):n=a[22],a[23]!==c||a[24]!==u||a[25]!==A||a[26]!==I||a[27]!==D||a[28]!==n||a[29]!==l||a[30]!==e?(o=(0,m.jsx)(sO,{patch:u,prerenderedHTML:l,disableWorkerPool:!0,style:e,options:n,lineAnnotations:A,renderAnnotation:I,renderGutterUtility:D},c),a[23]=c,a[24]=u,a[25]=A,a[26]=I,a[27]=D,a[28]=n,a[29]=l,a[30]=e,a[31]=o):o=a[31],a[32]!==c||a[33]!==o?(i=(0,m.jsx)(sN,{file:c,children:o}),a[32]=c,a[33]=o,a[34]=i):i=a[34],$=i}else{let e,t=v?"large":"auto",r=b?.changes;a[35]!==z||a[36]!==t||a[37]!==r?(e=(0,m.jsx)(sT,{onRender:z,variant:t,changes:r}),a[35]=z,a[36]=t,a[37]=r,a[38]=e):e=a[38],$=e}else{let e;a[13]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("div",{className:"px-4 py-6 text-sm text-muted-foreground",children:"No textual patch available for this file."}),a[13]=e):e=a[13],$=e}let B=b?.insertions??0,F=b?.deletions??0;return a[39]!==O||a[40]!==x||a[41]!==c||a[42]!==g.length||a[43]!==M||a[44]!==k||a[45]!==L||a[46]!==S||a[47]!==B||a[48]!==F?(i=(0,m.jsx)(sd,{file:c,insertions:B,deletions:F,commentCount:g.length,repoPath:S,collapsed:x,active:O,onToggleCollapse:k,headingId:M,panelId:L}),a[39]=O,a[40]=x,a[41]=c,a[42]=g.length,a[43]=M,a[44]=k,a[45]=L,a[46]=S,a[47]=B,a[48]=F,a[49]=i):i=a[49],a[50]!==M||a[51]!==_||a[52]!==$||a[53]!==L?(l=(0,m.jsx)("div",{id:L,role:"region","aria-labelledby":M,hidden:_,children:$}),a[50]=M,a[51]=_,a[52]=$,a[53]=L,a[54]=l):l=a[54],a[55]!==c||a[56]!==i||a[57]!==l?(s=(0,m.jsxs)("div",{"data-filename":c,className:"font-sans",children:[i,l]}),a[55]=c,a[56]=i,a[57]=l,a[58]=s):s=a[58],s}),sD=(0,ss.memo)(function(e){let t,r,n,o,i,l,s,a,c,u=(0,h.c)(33),{file:d,filePatch:f,layout:p,prerenderedHTML:g,deferPatchRendering:b,isLargeFile:v,comments:x,fileStat:y,collapsed:w,active:k,onToggleCollapse:S,onVisible:E,repoPath:C,onAddComment:j,onDeleteComment:R}=e,T=(0,ss.useRef)(null),[N,O]=(0,ss.useState)(null),P=b||v;u[0]!==k||u[1]!==P?(t=()=>!P||k,u[0]=k,u[1]=P,u[2]=t):t=u[2];let[M,L]=(0,ss.useState)(t);!M&&(k||null!==N)&&L(!0),u[3]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{L(!0)},u[3]=r):r=u[3];let A=r,I=M||!P,D=(0,ss.useRef)(E);u[4]!==E?(n=()=>{D.current=E},o=[E],u[4]=E,u[5]=n,u[6]=o):(n=u[5],o=u[6]),(0,ss.useEffect)(n,o),u[7]!==d?(i=()=>{let e=T.current;if(!e||"u"<typeof IntersectionObserver)return;let t=new IntersectionObserver(e=>{let[t]=e;if(t){var r;t.isIntersecting&&t.intersectionRatio>=.35&&(r=D.current,sE=d,sC=r,0===sj&&(sj=requestAnimationFrame(()=>{sj=0;let e=sE,t=sC;sE=null,sC=null,e&&t&&t(e)})))}},{rootMargin:"-52px 0px -55% 0px",threshold:[.35,.6]});return t.observe(e),()=>t.disconnect()},l=[d],u[7]=d,u[8]=i,u[9]=l):(i=u[8],l=u[9]),(0,ss.useEffect)(i,l),u[10]!==d?(s=sL(d),u[10]=d,u[11]=s):s=u[11];let z=s,_=g?.[p];return u[12]!==k||u[13]!==w||u[14]!==N||u[15]!==x||u[16]!==d||u[17]!==f||u[18]!==y||u[19]!==v||u[20]!==p||u[21]!==j||u[22]!==R||u[23]!==S||u[24]!==C||u[25]!==z||u[26]!==I||u[27]!==_?(a=(0,m.jsx)(sI,{file:d,filePatch:f,layout:p,prerenderedHTML:_,shouldRenderPatch:I,comments:x,fileStat:y,isLargeFile:v,collapsed:w,active:k,sectionId:z,onToggleCollapse:S,repoPath:C,commentTarget:N,onCommentTargetChange:O,onRenderPatch:A,onAddComment:j,onDeleteComment:R}),u[12]=k,u[13]=w,u[14]=N,u[15]=x,u[16]=d,u[17]=f,u[18]=y,u[19]=v,u[20]=p,u[21]=j,u[22]=R,u[23]=S,u[24]=C,u[25]=z,u[26]=I,u[27]=_,u[28]=a):a=u[28],u[29]!==d||u[30]!==z||u[31]!==a?(c=(0,m.jsx)("section",{ref:T,id:z,"data-file-section":d,className:"scroll-mt-[52px]",children:a}),u[29]=d,u[30]=z,u[31]=a,u[32]=c):c=u[32],c}),sz=e=>{let t,r,n,o,i,l,s,a=(0,h.c)(47),{patchesByFile:c,prerenderedHTMLByFile:u,layout:d,comments:f,onAddComment:p,onDeleteComment:g,activeFileId:b,fileStats:v,collapsedFiles:x,onToggleCollapse:y,onActiveFileChange:w,repoPath:k}=e;if(a[0]!==v){for(let e of(t=new Map,v))t.set(e.file,e);a[0]=v,a[1]=t}else t=a[1];let S=t;a[2]!==S||a[3]!==v||a[4]!==c?(r=(e=>{let t={files:[],folders:new Map};for(let r of e){let e=r.split("/"),n=t;for(let t=0;t<e.length-1;t+=1){let r=e[t];n.folders.has(r)||n.folders.set(r,{files:[],folders:new Map});let o=n.folders.get(r);o&&(n=o)}n.files.push(r)}let r=[],n=e=>{for(let[,t]of[...e.folders.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])))n(t);let t=[...e.files].toSorted((e,t)=>{let r=e.split("/").at(-1)??e,n=t.split("/").at(-1)??t;return r.localeCompare(n)});r.push(...t)};return n(t),r})([...v.map(sH),...Object.keys(c).filter(e=>!S.has(e))]),a[2]=S,a[3]=v,a[4]=c,a[5]=r):r=a[5];let E=r;if(a[6]!==f){for(let e of(n=new Map,f)){let t=n.get(e.file);t?t.push(e):n.set(e.file,[e])}a[6]=f,a[7]=n}else n=a[7];let C=n;a[8]!==E.length||a[9]!==u?(o=E.length>=24&&0===Object.keys(u??{}).length,a[8]=E.length,a[9]=u,a[10]=o):o=a[10];let j=o;if(a[11]!==y||a[12]!==E){for(let e of(i=new Map,E))i.set(e,()=>y(e));a[11]=y,a[12]=E,a[13]=i}else i=a[13];let R=i;if(0===E.length){let e,t;return a[14]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsxs)(sh,{children:[(0,m.jsx)(sb,{variant:"icon",children:(0,m.jsx)(sf,{})}),(0,m.jsx)(sv,{children:"No changes"}),(0,m.jsx)(sx,{children:"The working tree is clean relative to the base branch"})]}),a[14]=e):e=a[14],a[15]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.jsxs)(sm,{className:"h-full",children:[e,(0,m.jsx)(sy,{children:(0,m.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,m.jsx)(sw,{children:"r"})," to refresh"]})})]}),a[15]=t):t=a[15],t}if(a[16]!==b||a[17]!==x||a[18]!==C||a[19]!==j||a[20]!==S||a[21]!==d||a[22]!==w||a[23]!==p||a[24]!==g||a[25]!==E||a[26]!==c||a[27]!==u||a[28]!==k||a[29]!==R){let e;a[31]!==b||a[32]!==x||a[33]!==C||a[34]!==j||a[35]!==S||a[36]!==d||a[37]!==w||a[38]!==p||a[39]!==g||a[40]!==c||a[41]!==u||a[42]!==k||a[43]!==R?(e=e=>{var t;let r=S.get(e),n=c[e]??"",o=void 0!==r&&(t=n.length,!r.binary&&(r.changes>=500||void 0!==t&&t>=5e5));return(0,m.jsx)(sD,{file:e,filePatch:n,layout:d,prerenderedHTML:u?.[e],deferPatchRendering:j,isLargeFile:o,comments:C.get(e)??sS,fileStat:r,collapsed:x.has(e),active:b===e,onToggleCollapse:R.get(e),onVisible:w,repoPath:k,onAddComment:p,onDeleteComment:g},e)},a[31]=b,a[32]=x,a[33]=C,a[34]=j,a[35]=S,a[36]=d,a[37]=w,a[38]=p,a[39]=g,a[40]=c,a[41]=u,a[42]=k,a[43]=R,a[44]=e):e=a[44],l=E.map(e),a[16]=b,a[17]=x,a[18]=C,a[19]=j,a[20]=S,a[21]=d,a[22]=w,a[23]=p,a[24]=g,a[25]=E,a[26]=c,a[27]=u,a[28]=k,a[29]=R,a[30]=l}else l=a[30];return a[45]!==l?(s=(0,m.jsx)("div",{id:"diff-container",children:l}),a[45]=l,a[46]=s):s=a[46],s};function s_(e){e?.focus({preventScroll:!0})}function s$(){return!1}function sB(){return!1}function sF(e){return{lineNumber:e.lineNumber,metadata:{comment:e,type:"comment"},side:"left"===e.side?"deletions":"additions"}}function sH(e){return e.file}let sW=[1e3,2e3,5e3],sV=(e,t,r)=>{let[n,o]=(0,g.useState)(t);return(0,g.useEffect)(()=>{try{let t=localStorage.getItem(e);null!==t&&(!r||r.includes(t))&&o(t)}catch{}},[e,r]),[n,(0,g.useCallback)(t=>{o(r=>{let n="function"==typeof t?t(r):t;try{localStorage.setItem(e,n)}catch{}return n})},[e])]},sU=["split","stacked"],sq=["all","uncommitted"],sK=e=>{let t,r=(0,h.c)(3),{text:n,pulse:o}=e,i=`text-muted-foreground text-sm${void 0!==o&&o?" animate-pulse":""}`;return r[0]!==i||r[1]!==n?(t=(0,m.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,m.jsx)("div",{className:i,children:n})}),r[0]=i,r[1]=n,r[2]=t):t=r[2],t},sX=e=>{let t=sL(e);if(window.CSS?.escape)return`#${window.CSS.escape(t)}`;let r=t.replaceAll(/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g,"\\$&");return`#${r}`},sY=e=>{let t,r,n,o,i=(0,h.c)(10),{notice:l}=e,s="border-border bg-muted/40 text-muted-foreground";"destructive"===l.tone?s="border-destructive/30 bg-destructive/10 text-destructive":"warning"===l.tone&&(s="border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400");let a=`border-b px-4 py-2 text-xs ${s}`;return i[0]!==l.label?(t=(0,m.jsx)("span",{className:"font-medium",children:l.label}),i[0]=l.label,i[1]=t):t=i[1],i[2]!==l.detail?(r=l.detail&&(0,m.jsx)("span",{className:"text-xs opacity-80",children:l.detail}),i[2]=l.detail,i[3]=r):r=i[3],i[4]!==t||i[5]!==r?(n=(0,m.jsxs)("div",{className:"flex items-center gap-2",children:[t,r]}),i[4]=t,i[5]=r,i[6]=n):n=i[6],i[7]!==a||i[8]!==n?(o=(0,m.jsx)("div",{className:a,children:n}),i[7]=a,i[8]=n,i[9]=o):o=i[9],o},sG=e=>{let t,r,n,o=(0,h.c)(26),{filesData:i,deferredDiffData:l,diffError:s,syncNotice:a,layout:c,comments:u,onAddComment:d,onDeleteComment:f,selectedFile:p,collapsedFiles:g,onToggleCollapse:b,onActiveFileChange:v,repoPath:x,diffWatchdogTripped:y,onRetryDiff:w}=e;if(null===i){let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)(sK,{text:"Loading diff…",pulse:!0}),o[0]=e):e=o[0],e}if(0===i.files.length){let e;return o[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)(sK,{text:"No changes"}),o[1]=e):e=o[1],e}if(!l){let e;if(s){let e;return o[2]!==s?(e=(0,m.jsx)(sK,{text:s}),o[2]=s,o[3]=e):e=o[3],e}if(y){let e,t;return o[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)("div",{className:"text-muted-foreground text-sm",children:"Still loading the diff — the server hasn't responded."}),o[4]=e):e=o[4],o[5]!==w?(t=(0,m.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:[e,(0,m.jsx)(e8,{size:"sm",variant:"default",onClick:w,children:"Retry"})]}),o[5]=w,o[6]=t):t=o[6],t}return o[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,m.jsx)(sK,{text:"Loading diff…",pulse:!0}),o[7]=e):e=o[7],e}return o[8]!==a?(t=a&&(0,m.jsx)(sY,{notice:a}),o[8]=a,o[9]=t):t=o[9],o[10]!==g||o[11]!==u||o[12]!==l.patchesByFile||o[13]!==l.prerenderedHTMLByFile||o[14]!==i.files||o[15]!==c||o[16]!==v||o[17]!==d||o[18]!==f||o[19]!==b||o[20]!==x||o[21]!==p?(r=(0,m.jsx)(sz,{patchesByFile:l.patchesByFile,prerenderedHTMLByFile:l.prerenderedHTMLByFile,layout:c,comments:u,onAddComment:d,onDeleteComment:f,activeFileId:p,fileStats:i.files,collapsedFiles:g,onToggleCollapse:b,onActiveFileChange:v,repoPath:x}),o[10]=g,o[11]=u,o[12]=l.patchesByFile,o[13]=l.prerenderedHTMLByFile,o[14]=i.files,o[15]=c,o[16]=v,o[17]=d,o[18]=f,o[19]=b,o[20]=x,o[21]=p,o[22]=r):r=o[22],o[23]!==t||o[24]!==r?(n=(0,m.jsxs)(m.Fragment,{children:[t,r]}),o[23]=t,o[24]=r,o[25]=n):n=o[25],n};e.s(["DiffApp",0,({repoPath:e})=>{let[t,r]=(0,g.useState)(null),[n,o]=(0,g.useState)([]),[i,l]=(0,g.useState)(null),s=(0,g.useRef)(null),[a,c]=(0,g.useState)(null),[u,d]=sV("diffhub-layout","stacked",sU),[f,p]=(0,g.useState)(""),[h,b]=(0,g.useState)(!1),[v,x]=(0,g.useState)(null),[y,w]=(0,g.useState)(null),[k,S]=(0,g.useState)(!1),[E,C]=sV("diffhub-diffMode","all",sq),j=(0,g.useRef)(E),R=(0,g.useRef)(null),T=(0,g.useRef)(null),N=(0,g.useRef)(null),O=(0,g.useRef)(null),P=(0,g.useRef)(!1),M=(0,g.useRef)(!1),L=(0,g.useRef)(()=>Promise.resolve()),A=(0,g.useRef)(!1),I=(0,g.useRef)(!1),D=(0,g.useRef)(0),z=(0,g.useRef)(0),_=(0,g.useRef)(null),[$,B]=(0,g.useState)(!1),[,F]=(0,g.useTransition)(),[H,W]=(0,g.useState)(()=>new Set);(0,g.useEffect)(()=>{j.current=E},[E]),(0,g.useEffect)(()=>{W(new Set(((e,t)=>{try{let r=localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}})(`diffhub-collapsed:${e}`,[])))},[e]);let V=(0,g.useCallback)(t=>{W(r=>{let n=t(r);if(n===r)return r;try{localStorage.setItem(`diffhub-collapsed:${e}`,JSON.stringify([...n]))}catch{}return n})},[e]),U=(0,g.useCallback)(()=>{let e=new URLSearchParams;"uncommitted"===j.current&&e.set("mode","uncommitted");let t=e.toString();return t?`?${t}`:""},[]),q=(0,g.useCallback)(()=>{let e=new URLSearchParams;O.current&&e.set("generation",O.current),"uncommitted"===j.current&&e.set("mode","uncommitted");let t=e.toString();return t?`?${t}`:""},[]),K=(0,g.useCallback)(async e=>{let t=O.current,r=N.current;_.current=Date.now(),B(!1),w(null),console.info("[diffhub] fetchDiff start",{fingerprint:r,generation:t,mode:j.current,requestId:e});let n=new AbortController,o=setTimeout(()=>{n.abort(Error("Diff request timed out"))},15e3);try{var i,l;let o,s,a=await fetch(`/api/diff${q()}`,{signal:n.signal});if(!a.ok){let n=(await a.json().catch(()=>({error:"Failed to load diff"}))).error??`Failed to load diff (${a.status})`;console.error("[diffhub] fetchDiff non-ok response",{fingerprint:r,generation:t,mode:j.current,requestId:e,responseStatus:a.status,responseStatusText:a.statusText,serverError:n}),e===D.current&&w(n);return}let u=(i=await a.json(),l=r??"unknown",o=i.patchesByFile??Object.fromEntries((e=>{let t=new Map,r=/^diff --git a\/(.+?) b\/(.+)$/gm,n=[],o=r.exec(e);for(;o;)n.push({file:o[2],start:o.index}),o=r.exec(e);for(let[r,o]of n.entries()){let i=n[r+1]?.start??e.length,l=e.slice(o.start,i).trimEnd();t.set(o.file,l?`${l}
|
|
44
|
-
`:"")}return t})(i.patch??"")),{baseBranch:i.baseBranch,branch:i.branch,generation:i.generation,mergeBase:i.mergeBase,patchesByFile:o,prerenderedHTMLByFile:i.prerenderedHTMLByFile,reviewKeysByFile:i.reviewKeysByFile??(s=i.generation,Object.fromEntries(Object.entries(o).map(([e,t])=>[e,`${s}:${(e=>{let t=0;for(let r=0;r<e.length;r+=1)t=Math.trunc(Math.imul(31,t)+(e.codePointAt(r)??0));return Math.abs(t).toString(36)})(`${e}:${t}`)}`]))),sourceFingerprint:l});if(e!==D.current||r!==N.current||t!==O.current){console.info("[diffhub] fetchDiff response stale",{fingerprint:r,generation:t,latestRequestId:D.current,requestId:e}),null!==O.current&&(z.current+=1,z.current>=3&&(console.warn("[diffhub] fetchDiff stale-drop limit reached, invalidating",{drops:z.current}),z.current=0,D.current+=1,T.current=null,c(null)),I.current=!0);return}z.current=0,console.info("[diffhub] fetchDiff success",{fileCount:Object.keys(u.patchesByFile).length,fingerprint:r,generation:u.generation,requestId:e}),F(()=>c(u))}catch(n){console.error("[diffhub] fetchDiff threw",{error:n,fingerprint:r,generation:t,mode:j.current,requestId:e}),e===D.current&&w(n instanceof Error?n.message:String(n))}finally{clearTimeout(o)}},[q,F]),X=(0,g.useCallback)(async()=>{if(I.current=!0,!A.current){for(A.current=!0,S(!0);I.current;)I.current=!1,D.current+=1,await K(D.current);A.current=!1,S(!1)}},[K]),Y=(0,g.useRef)(a),G=(0,g.useRef)(y);(0,g.useEffect)(()=>{Y.current=a},[a]),(0,g.useEffect)(()=>{G.current=y},[y]);let Z=(0,g.useCallback)(e=>{if(N.current=e.fingerprint,O.current=e.generation,0===e.files.length){s.current=null,D.current+=1,(0,g.startTransition)(()=>{l(null),c(null)}),w(null),T.current=e.fingerprint;return}let t=s.current;t&&e.files.some(e=>e.file===t)||(s.current=t=e.files[0]?.file??null,(0,g.startTransition)(()=>l(t)));let r=e.fingerprint!==T.current,n=Y.current?.generation===e.generation;(r||!n||null!==G.current)&&(T.current=e.fingerprint,r&&(D.current+=1),X())},[X]),J=(0,g.useCallback)(()=>{D.current+=1,T.current=null,N.current=null,O.current=null,c(null),w(null)},[]),Q=(0,g.useCallback)(async(e=!1)=>{let t=()=>{e||b(!1),P.current=!1,M.current&&(M.current=!1,queueMicrotask(()=>{L.current(!0)}))};if(P.current){M.current=!0;return}P.current=!0,e||b(!0),x(null);let n=await Promise.all([fetch(`/api/files${U()}`),fetch("/api/comments").then(async e=>{if(!e.ok)throw Error(`Failed to load comments (${e.status})`);return await e.json()}).catch(e=>(console.error("[diffhub] comments refresh failed",{error:e}),null))]).catch(e=>(x(e instanceof Error?e.message:String(e)),null));if(!n)return void t();let[i,l]=n;if(!i.ok){x((await i.json().catch(()=>({error:"Network error"}))).error??"Failed to load files"),t();return}let s=await i.json();(0,g.startTransition)(()=>{r(s),null!==l&&o(l)}),Z(s),t()},[U,Z]);(0,g.useEffect)(()=>{L.current=Q},[Q]);let ee=(0,g.useRef)(!1),et=(0,g.useRef)(!1);(0,g.useEffect)(()=>{let e=null,t=()=>{ee.current=!0,e&&clearTimeout(e),e=setTimeout(()=>{ee.current=!1,et.current&&(et.current=!1,L.current(!0))},200)};return window.addEventListener("scroll",t,{passive:!0}),()=>{window.removeEventListener("scroll",t),e&&clearTimeout(e)}},[]);let er=(0,g.useCallback)(()=>{if(ee.current){et.current=!0;return}L.current(!0)},[]),en=(e=>{let[t,r]=(0,g.useState)("connecting"),n=(0,g.useEffectEvent)(e),o=(0,g.useRef)(null);return(0,g.useEffect)(()=>{let e=!1,t=0,i=null,l=new AbortController,s=async()=>{if(!e)try{let i=null===o.current?"":`?revision=${o.current}`,a=await fetch(`/api/watch${i}`,{cache:"no-store",signal:l.signal});if(e)return;if(!a.ok)throw Error(`Watch request failed with status ${a.status}`);let c=await a.json();if(e)return;t=0,r("live");let u=o.current;o.current=c.revision,c.changed&&null!==u&&c.revision!==u&&n(),e||queueMicrotask(()=>{e||s()})}catch(n){if(e||l.signal.aborted)return;if(console.error("[diffhub] file watch failed",{error:n,failureCount:t+=1}),t>10){console.error("[diffhub] file watch: max retries exceeded, stopping"),r("fallback");return}r(t>=sW.length?"fallback":"connecting"),i=setTimeout(()=>{i=null,e||s()},sW[Math.min(t-1,sW.length-1)])}};return r("connecting"),s(),()=>{e=!0,l.abort(),i&&clearTimeout(i)}},[]),t})(er),eo=(0,g.useCallback)(()=>{Q()},[Q]),ei=(0,g.useCallback)(()=>{B(!1),w(null),D.current+=1,T.current=null,c(null),X()},[X]);(0,g.useEffect)(()=>{Q()},[Q]),(0,g.useEffect)(()=>{let e=setInterval(er,"live"===en?3e4:5e3);return()=>clearInterval(e)},[en,er]),(0,g.useEffect)(()=>{if(!t||0===t.files.length||a||y)return void B(!1);let e=setTimeout(()=>B(!0),5e3);return()=>clearTimeout(e)},[t,a,y]);let el=(0,g.useCallback)((e,t=800)=>{R.current={file:e,until:Date.now()+t},s.current=e,(0,g.startTransition)(()=>l(e))},[]),es=(0,g.useCallback)((e,t="smooth")=>{el(e),V(t=>{if(t.has(e)){let r=new Set(t);return r.delete(e),r}return t});let r=e=>{e.scrollIntoView({behavior:t,block:"start"})},n=document.querySelector(sX(e));if(n)return void r(n);let o=document.querySelector("#diff-container");if(!o)return;let i=new MutationObserver(()=>{let t=document.querySelector(sX(e));t&&(i.disconnect(),r(t))});i.observe(o,{childList:!0,subtree:!0}),setTimeout(()=>i.disconnect(),5e3)},[el,V]),ea=(0,g.useCallback)(e=>{let t=R.current;if(t){if(Date.now()>t.until)R.current=null;else if(t.file!==e)return}s.current!==e&&(s.current=e,(0,g.startTransition)(()=>l(e)))},[]),ec=(0,g.useCallback)(e=>{el(e),V(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[el,V]),eu=(0,g.useCallback)(()=>{V(()=>new Set((t?.files??[]).map(e=>e.file)))},[t,V]),ed=(0,g.useCallback)(()=>{V(()=>new Set)},[V]);(0,g.useEffect)(()=>{let e=e=>{if(!(e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement)){if("s"!==e.key||e.metaKey||e.ctrlKey||d(e=>"split"===e?"stacked":"split"),"/"!==e.key&&"t"!==e.key.toLowerCase()||e.metaKey||e.ctrlKey||(e.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"c"===e.key.toLowerCase()&&!e.metaKey&&!e.ctrlKey&&i){if(e.shiftKey)return void eu();ec(i)}if("e"!==e.key.toLowerCase()||!e.shiftKey||e.metaKey||e.ctrlKey||ed(),"r"!==e.key||e.metaKey||e.ctrlKey||Q(),"j"===e.key||"k"===e.key){let r=t?.files??[];if(0===r.length)return;let n=r.findIndex(e=>e.file===i),o="j"===e.key?r[n+1]:r[n-1];o&&es(o.file)}}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[eu,ed,t,Q,es,i,d,ec]);let ef=(0,g.useCallback)(e=>{j.current=e,C(e),J(),Q(!1)},[J,Q,C]),ep=(0,g.useCallback)(async(e,t,r,n,i)=>{let l=await fetch("/api/comments",{body:JSON.stringify({body:n,file:e,lineNumber:t,side:"deletions"===r?"left":"right",tag:i}),headers:{"Content-Type":"application/json"},method:"POST"});if(!l.ok)return console.error("[diffhub] add comment failed",{error:(await l.json().catch(()=>({error:"Failed to save comment"}))).error??`Failed to save comment (${l.status})`}),!1;let s=await l.json();return o(e=>[...e,s]),!0},[]),em=(0,g.useCallback)(async e=>{let t=await fetch(`/api/comments?id=${e}`,{method:"DELETE"});return t.ok?(o(t=>t.filter(t=>t.id!==e)),!0):(console.error("[diffhub] delete comment failed",{error:(await t.json().catch(()=>({error:"Failed to delete comment"}))).error??`Failed to delete comment (${t.status})`}),!1)},[]),eh=v&&null!==t?{detail:v,label:"Background refresh failed",tone:"destructive"}:y&&a?{detail:y,label:"Diff refresh failed",tone:"destructive"}:"fallback"===en?{detail:"Live watch is unavailable, so the app is polling every 5 seconds",label:"Polling fallback",tone:"warning"}:null;return v&&null===t?(0,m.jsx)(l0,{className:"min-h-svh",children:(0,m.jsxs)(l2,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,m.jsxs)("div",{className:"rounded-lg border border-destructive/30 bg-destructive/10 px-6 py-4 text-sm text-destructive max-w-md text-center",children:[(0,m.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,m.jsx)("p",{className:"text-xs opacity-80",children:v})]}),(0,m.jsx)(e8,{variant:"outline",onClick:eo,children:"Retry"})]})}):(0,m.jsxs)(l0,{className:"min-h-svh",children:[(0,m.jsx)(si,{files:t?.files??[],selectedFile:i,onSelectFile:es,comments:n,filterQuery:f,onFilterChange:p,isLoading:null===t,insertions:t?.insertions??0,deletions:t?.deletions??0}),(0,m.jsxs)(l2,{className:"flex flex-col min-h-svh",children:[(0,m.jsx)("div",{className:"sticky top-0 z-20",children:(0,m.jsx)(i$,{branch:t?.branch??"…",baseBranch:t?.baseBranch??"main",refreshing:h||k,fileWatchState:en,comments:n,diffMode:E,onDiffModeChange:ef,layout:u,onLayoutChange:d,syncNotice:eh})}),(0,m.jsx)(sG,{filesData:t,deferredDiffData:a,diffError:y,syncNotice:eh,layout:u,comments:n,onAddComment:ep,onDeleteComment:em,selectedFile:i,collapsedFiles:H,onToggleCollapse:ec,onActiveFileChange:ea,repoPath:e,diffWatchdogTripped:$,onRetryDiff:ei})]})]})}],93190)}]);
|