diffhub 0.1.2 → 0.1.4
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/web/.next/BUILD_ID +1 -1
- package/.next/standalone/apps/web/.next/build-manifest.json +3 -3
- package/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
- package/.next/standalone/apps/web/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/_not-found.rsc +11 -11
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/api/comments/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/comments/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/diff/route.js +3 -2
- package/.next/standalone/apps/web/.next/server/app/api/diff/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/discard/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/discard/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/file/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/file/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/files/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/files/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/open/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/api/open/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js +1 -1
- package/.next/standalone/apps/web/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/index.html +1 -1
- package/.next/standalone/apps/web/.next/server/app/index.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/standalone/apps/web/.next/server/app/index.segments/_full.segment.rsc +12 -12
- package/.next/standalone/apps/web/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/apps/web/.next/server/app/index.segments/_index.segment.rsc +6 -6
- package/.next/standalone/apps/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/apps/web/.next/server/app/page/react-loadable-manifest.json +1 -2
- package/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/[externals]_shiki_wasm_0~fgmgp._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__01.zj5h._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0tbrp5x._.js +13 -0
- package/.next/standalone/apps/web/.next/server/chunks/_0r24f4c._.js +69 -0
- package/.next/standalone/apps/web/.next/server/chunks/node_modules_@pierre_theme_dist_pierre-dark_mjs_0ojo3_n._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/node_modules_@pierre_theme_dist_pierre-light_mjs_0pw9wwg._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/0fuv_@swc_helpers_cjs__interop_require_default_cjs_0ghzfn9._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0bit3~x._.js +3 -0
- package/.next/standalone/apps/web/.next/server/chunks/ssr/{_0qo42r0._.js → _0m1v4-9._.js} +2 -2
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_0oc3qg_._.js +3 -3
- package/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/apps/web/.next/server/pages/404.html +1 -1
- package/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
- package/.next/standalone/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/apps/web/.next/static/chunks/01f1ms~jsc5vh.js +138 -0
- package/.next/standalone/apps/web/.next/static/chunks/0b4pujbysgmxg.js +16 -0
- package/.next/standalone/apps/web/.next/static/chunks/0c7yx0ttmhb4s.js +63 -0
- package/.next/standalone/apps/web/.next/static/chunks/0ogqv_xj2r0c6.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/0qp8t.3t~v6um.js +1 -0
- package/.next/standalone/apps/web/.next/static/chunks/130i667qy-j80.css +3 -0
- package/.next/standalone/apps/web/package.json +1 -1
- package/bin/diffhub.mjs +25 -1
- package/package.json +1 -1
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0gf_xk6._.js +0 -13
- package/.next/standalone/apps/web/.next/server/chunks/[root-of-the-server]__0t.tl18._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0jit913._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0v19a7g._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/_0f40lcw._.js +0 -3
- package/.next/standalone/apps/web/.next/server/chunks/ssr/node_modules_0v8w2j~._.js +0 -70
- package/.next/standalone/apps/web/.next/static/chunks/00zp83w4g1v1r.js +0 -16
- package/.next/standalone/apps/web/.next/static/chunks/042ip11u2i2z6.js +0 -138
- package/.next/standalone/apps/web/.next/static/chunks/07ndp5x2cvqo..css +0 -3
- package/.next/standalone/apps/web/.next/static/chunks/085s9eg867ha-.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0_vmme_k_ff_u.js +0 -67
- package/.next/standalone/apps/web/.next/static/chunks/0ap~_hc7r17_6.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0nt5-rwas5thn.js +0 -67
- package/.next/standalone/apps/web/.next/static/chunks/0p~3-4_.v0cft.js +0 -1
- package/.next/standalone/apps/web/.next/static/chunks/0wx-2dr44ql-g.js +0 -1
- /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → AIw7gAubH_UEr9lUympAt}/_buildManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → AIw7gAubH_UEr9lUympAt}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/apps/web/.next/static/{mAVCL4HCmtJwT35feBPdK → AIw7gAubH_UEr9lUympAt}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55838,(e,t,r)=>{"use strict";var n=e.r(14499),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(14499),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)},95936,(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(90482);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}},53254,(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}})},80883,(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(81099),o=e.r(72280),i=e.r(11268),l=e.r(53254),s=e.r(5051);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)})})}},19525,(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(81099),o=e.r(14499),i=e.r(95936),l=e.r(80883);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}},85869,(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(73355)._(e.r(19525));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)},33357,e=>{"use strict";let t,r,n;var o,i,l,s,a,c,u,d,f,p,m,h,g=e.i(81099),v=e.i(13171),b=e.i(14499);function x(e,t){let r=b.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:n=2,...o},i)=>b.createElement(t,{ref:i,width:r,height:r,strokeWidth:n,color:e,...o}));return r.displayName=e,r}let y=x("CopySimpleIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("rect",{width:11,height:11,x:9,y:9,stroke:"currentColor",strokeWidth:2,rx:2}),b.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=x("CheckIcon",(0,b.forwardRef)((e,t)=>b.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},b.createElement("path",{d:"M20 6 9 17l-5-5"})))),k=x("ChevronDownIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6 9.5 6 6 6-6"})))),S=x("SunIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),E=x("MoonIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),C=x("SplitIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),R=x("ArrowRightIcon",(0,b.forwardRef)((e,t)=>b.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},b.createElement("path",{d:"M5 12h14M12 5l7 7-7 7"}))));var j=e.i(63178);function M(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}let T={};function O(e,t,r,n,o){let i={...L(e,T)};return t&&(i=P(i,t)),r&&(i=P(i,r)),n&&(i=P(i,n)),o&&(i=P(i,o)),i}function P(e,t){return N(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]=M(e.style,n);break;case"className":e[r]=I(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){A(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 N(e){return"function"==typeof e}function L(e,t){return N(e)?e(t):e??T}function A(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function I(e,t){return t?e?t+" "+e:t:e}e.i(24062);let z=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.`},D={};function _(e,t){let r=b.useRef(D);return r.current===D&&(r.current=e(t)),r}function $(e,t,r,n){var o,i,l,s,a;let c=_(V).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)&&W(c,[e,t,r,n]),c.callback}function V(){return{callback:null,cleanup:null,refs:[]}}function W(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 H=parseInt(b.version,10);function B(e){if(!b.isValidElement(e))return null;let t=e.props;return(H>=19?t?.ref:e.ref)??null}function F(){}let U=Object.freeze([]),q=Object.freeze({});function K(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=q,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):q,g=f?M(h,Array.isArray(u)?function(e){if(0===e.length)return T;if(1===e.length)return L(e[0],T);let t={...L(e[0],T)};for(let r=1;r<e.length;r+=1)t=P(t,e[r]);return t}(u):u)??q:q;if("u">typeof document)if(f)if(Array.isArray(c)){let e;r=[g.ref,B(s),...c],n=e=_(V).current,o=r,(n.refs.length!==o.length||n.refs.some((e,t)=>e!==o[t]))&&W(e,r),g.ref=e.callback}else g.ref=$(g.ref,B(s),c);else $(null,null);return f?(void 0!==p&&(g.className=I(g.className,p)),void 0!==m&&(g.style=M(g.style,m)),g):q}(t,r);return!1===r.enabled?null:function(e,t,r,n){if(t){if("function"==typeof t)return t(r,n);let e=O(r,t.props);e.ref=r.ref;let o=t;return o?.$$typeof===X&&(o=b.Children.toArray(t)[0]),b.cloneElement(o,e)}if(e&&"string"==typeof e){var o,i;return o=e,i=r,"button"===o?(0,b.createElement)("button",{type:"button",...i,key:i.key}):"img"===o?(0,b.createElement)("img",{alt:"",...i,key:i.key}):b.createElement(o,i)}throw Error(z(8))}(e,n,o,r.state??q)}let X=Symbol.for("react.lazy");function Y(e){return K(e.defaultTagName??"div",e,e)}function G(){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 Z=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,J=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return G(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=Z(t)||Z(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 G(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)},Q=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ee=[],et=(e,t,r)=>{if(0==e.length-t)return r.classGroupId;let n=e[t],o=r.nextPart.get(n);if(o){let r=et(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}},er=(e,t)=>{let r=Q();for(let n in e)en(e[n],r,n,t);return r},en=(e,t,r,n)=>{let o=e.length;for(let i=0;i<o;i++)eo(e[i],t,r,n)},eo=(e,t,r,n)=>{"string"==typeof e?ei(e,t,r):"function"==typeof e?el(e,t,r,n):es(e,t,r,n)},ei=(e,t,r)=>{(""===e?t:ea(t,e)).classGroupId=r},el=(e,t,r,n)=>{ec(e)?en(e(n),t,r,n):(null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:r,validator:e}))},es=(e,t,r,n)=>{let o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){let[i,l]=o[e];en(l,ea(t,i),r,n)}},ea=(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=Q(),r.nextPart.set(t,o)),r=o}return r},ec=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,eu=[],ed=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),ef=/\s+/,ep=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=ep(e[n]))&&(r&&(r+=" "),r+=t);return r},em=[],eh=e=>{let t=t=>t[e]||em;return t.isThemeGetter=!0,t},eg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ev=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eb=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ey=/\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$/,ew=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ek=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,eE=e=>eb.test(e),eC=e=>!!e&&!Number.isNaN(Number(e)),eR=e=>!!e&&Number.isInteger(Number(e)),ej=e=>e.endsWith("%")&&eC(e.slice(0,-1)),eM=e=>ex.test(e),eT=()=>!0,eO=e=>ey.test(e)&&!ew.test(e),eP=()=>!1,eN=e=>ek.test(e),eL=e=>eS.test(e),eA=e=>!ez(e)&&!eF(e),eI=e=>eJ(e,e2,eP),ez=e=>eg.test(e),eD=e=>eJ(e,e5,eO),e_=e=>eJ(e,e3,eC),e$=e=>eJ(e,e7,eT),eV=e=>eJ(e,e4,eP),eW=e=>eJ(e,e0,eP),eH=e=>eJ(e,e1,eL),eB=e=>eJ(e,e6,eN),eF=e=>ev.test(e),eU=e=>eQ(e,e5),eq=e=>eQ(e,e4),eK=e=>eQ(e,e0),eX=e=>eQ(e,e2),eY=e=>eQ(e,e1),eG=e=>eQ(e,e6,!0),eZ=e=>eQ(e,e7,!0),eJ=(e,t,r)=>{let n=eg.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},eQ=(e,t,r=!1)=>{let n=ev.exec(e);return!!n&&(n[1]?t(n[1]):r)},e0=e=>"position"===e||"percentage"===e,e1=e=>"image"===e||"url"===e,e2=e=>"length"===e||"size"===e||"bg-size"===e,e5=e=>"length"===e,e3=e=>"number"===e,e4=e=>"family-name"===e,e7=e=>"number"===e||"weight"===e,e6=e=>"shadow"===e,e8=((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(ef),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(":"),v=d?g+"!":g,b=v+h;if(l.indexOf(b)>-1)continue;l.push(b);let x=o(h,m);for(let e=0;e<x.length;++e){let t=x[e];l.push(v+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),ed(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)):ed(eu,!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 er(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 et(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||ee}return r[e]||ee}}})(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=ep(t))&&(o&&(o+=" "),o+=r);return o})(...e))})(()=>{let e=eh("color"),t=eh("font"),r=eh("text"),n=eh("font-weight"),o=eh("tracking"),i=eh("leading"),l=eh("breakpoint"),s=eh("container"),a=eh("spacing"),c=eh("radius"),u=eh("shadow"),d=eh("inset-shadow"),f=eh("text-shadow"),p=eh("drop-shadow"),m=eh("blur"),h=eh("perspective"),g=eh("aspect"),v=eh("ease"),b=eh("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,ez],k=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],E=()=>[eF,ez,a],C=()=>[eE,"full","auto",...E()],R=()=>[eR,"none","subgrid",eF,ez],j=()=>["auto",{span:["full",eR,eF,ez]},eR,eF,ez],M=()=>[eR,"auto",eF,ez],T=()=>["auto","min","max","fr",eF,ez],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...E()],L=()=>[eE,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],A=()=>[eE,"screen","full","dvw","lvw","svw","min","max","fit",...E()],I=()=>[eE,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],z=()=>[e,eF,ez],D=()=>[...y(),eK,eW,{position:[eF,ez]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",eX,eI,{size:[eF,ez]}],V=()=>[ej,eU,eD],W=()=>["","none","full",c,eF,ez],H=()=>["",eC,eU,eD],B=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[eC,ej,eK,eW],q=()=>["","none",m,eF,ez],K=()=>["none",eC,eF,ez],X=()=>["none",eC,eF,ez],Y=()=>[eC,eF,ez],G=()=>[eE,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[eM],breakpoint:[eM],color:[eT],container:[eM],"drop-shadow":[eM],ease:["in","out","in-out"],font:[eA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[eM],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[eM],shadow:[eM],spacing:["px",eC],text:[eM],"text-shadow":[eM],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",eE,ez,eF,g]}],container:["container"],columns:[{columns:[eC,ez,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:[eR,"auto",eF,ez]}],basis:[{basis:[eE,"full","auto",s,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[eC,eE,"auto","initial","none",ez]}],grow:[{grow:["",eC,eF,ez]}],shrink:[{shrink:["",eC,eF,ez]}],order:[{order:[eR,"first","last","none",eF,ez]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":T()}],"auto-rows":[{"auto-rows":T()}],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:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"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,eU,eD]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,eZ,e$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ej,ez]}],"font-family":[{font:[eq,eV,t]}],"font-features":[{"font-features":[ez]}],"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,ez]}],"line-clamp":[{"line-clamp":[eC,"none",eF,e_]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",eF,ez]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",eF,ez]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[eC,"from-font","auto",eF,eD]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[eC,"auto",eF,ez]}],"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,ez]}],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,ez]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},eR,eF,ez],radial:["",eF,ez],conic:[eR,eF,ez]},eY,eH]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"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:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[eC,eF,ez]}],"outline-w":[{outline:["",eC,eU,eD]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,eG,eB]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",d,eG,eB]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[eC,eD]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",f,eG,eB]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[eC,eF,ez]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"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":[eC]}],"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":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"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":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"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":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"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":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"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":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"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":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"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":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[eF,ez]}],"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":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":[eC]}],"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":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",eF,ez]}],filter:[{filter:["","none",eF,ez]}],blur:[{blur:q()}],brightness:[{brightness:[eC,eF,ez]}],contrast:[{contrast:[eC,eF,ez]}],"drop-shadow":[{"drop-shadow":["","none",p,eG,eB]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",eC,eF,ez]}],"hue-rotate":[{"hue-rotate":[eC,eF,ez]}],invert:[{invert:["",eC,eF,ez]}],saturate:[{saturate:[eC,eF,ez]}],sepia:[{sepia:["",eC,eF,ez]}],"backdrop-filter":[{"backdrop-filter":["","none",eF,ez]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[eC,eF,ez]}],"backdrop-contrast":[{"backdrop-contrast":[eC,eF,ez]}],"backdrop-grayscale":[{"backdrop-grayscale":["",eC,eF,ez]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[eC,eF,ez]}],"backdrop-invert":[{"backdrop-invert":["",eC,eF,ez]}],"backdrop-opacity":[{"backdrop-opacity":[eC,eF,ez]}],"backdrop-saturate":[{"backdrop-saturate":[eC,eF,ez]}],"backdrop-sepia":[{"backdrop-sepia":["",eC,eF,ez]}],"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,ez]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[eC,"initial",eF,ez]}],ease:[{ease:["linear","initial",v,eF,ez]}],delay:[{delay:[eC,eF,ez]}],animate:[{animate:["none",b,eF,ez]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,eF,ez]}],"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,ez,"","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:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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,ez]}],"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,ez]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[eC,eU,eD,e_]}],stroke:[{stroke:["none",...z()]}],"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"]}}),e9=J("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"}}}),te=e=>{let t,r,n,o,i,l,s,a,c,u=(0,v.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=Y,o="button",i=O({className:((...e)=>e8(G(e)))(e9({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)},tt=[{label:"All changes",value:"all"},{label:"Uncommitted changes",value:"uncommitted"}],tr=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,m,h,x,M,T,O,P,N,L,A,I,z,D,_,$,V,W,H=(0,v.c)(78),{branch:B,baseBranch:F,insertions:U,deletions:q,fileCount:K,refreshing:X,lastUpdated:Y,comments:Z,diffMode:J,onDiffModeChange:Q,ignoreWhitespace:ee,onIgnoreWhitespaceChange:et,layout:er,onLayoutChange:en}=e,[eo,ei]=(0,b.useState)(!1),[el,es]=(0,b.useState)(!1),[ea,ec]=(0,b.useState)(!1),eu=(0,b.useRef)(null),{resolvedTheme:ed,setTheme:ef}=(0,j.useTheme)();H[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{ec(!0)},r=[],H[0]=t,H[1]=r):(t=H[0],r=H[1]),(0,b.useEffect)(t,r);let ep=(0,b.useRef)(null);H[2]!==Z?(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")}`})(Z);await navigator.clipboard.writeText(e),ep.current&&clearTimeout(ep.current),ei(!0),ep.current=setTimeout(()=>ei(!1),2e3)}catch{}},H[2]=Z,H[3]=n):n=H[3];let em=n;H[4]!==el?(o=()=>{if(!el)return;let e=e=>{eu.current&&!eu.current.contains(e.target)&&es(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},i=[el],H[4]=el,H[5]=o,H[6]=i):(o=H[5],i=H[6]),(0,b.useEffect)(o,i),H[7]!==B?(l=(0,g.jsx)("span",{className:"rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs font-medium text-foreground",children:B}),H[7]=B,H[8]=l):l=H[8],H[9]===Symbol.for("react.memo_cache_sentinel")?(s=(0,g.jsx)(R,{size:12,className:"text-muted-foreground/50 shrink-0"}),H[9]=s):s=H[9],H[10]!==F?(a=(0,g.jsx)("span",{className:"rounded-md border border-border bg-background px-2.5 py-1 font-mono text-xs text-muted-foreground",children:F}),H[10]=F,H[11]=a):a=H[11],H[12]!==l||H[13]!==a?(c=(0,g.jsxs)("div",{className:"flex items-center gap-1.5",children:[l,s,a]}),H[12]=l,H[13]=a,H[14]=c):c=H[14];let eh=1===K?"file":"files";H[15]!==K||H[16]!==eh?(u=(0,g.jsxs)("span",{className:"text-xs font-mono text-muted-foreground",children:[K," ",eh]}),H[15]=K,H[16]=eh,H[17]=u):u=H[17],H[18]!==U?(d=U>0&&(0,g.jsxs)("span",{className:"text-xs font-mono text-diff-green",children:["+",U]}),H[18]=U,H[19]=d):d=H[19],H[20]!==q?(f=q>0&&(0,g.jsxs)("span",{className:"text-xs font-mono text-destructive",children:["−",q]}),H[20]=q,H[21]=f):f=H[21],H[22]!==u||H[23]!==d||H[24]!==f?(p=(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[u,d,f]}),H[22]=u,H[23]=d,H[24]=f,H[25]=p):p=H[25],H[26]===Symbol.for("react.memo_cache_sentinel")?(m=(0,g.jsx)("div",{className:"flex-1"}),H[26]=m):m=H[26],H[27]!==Y||H[28]!==X?(h=Y&&(0,g.jsx)("span",{className:((...e)=>e8(G(e)))("size-1.5 rounded-full bg-diff-green mx-1.5",X&&"animate-pulse")}),H[27]=Y,H[28]=X,H[29]=h):h=H[29],H[30]===Symbol.for("react.memo_cache_sentinel")?(x=()=>es(tn),H[30]=x):x=H[30];let eg="uncommitted"===J?"Uncommitted":"All changes",ev=el&&"rotate-180";H[31]!==ev?(M=((...e)=>e8(G(e)))("transition-transform duration-150",ev),H[31]=ev,H[32]=M):M=H[32],H[33]!==M?(T=(0,g.jsx)(k,{size:10,className:M}),H[33]=M,H[34]=T):T=H[34],H[35]!==eg||H[36]!==T?(O=(0,g.jsxs)(te,{variant:"ghost",size:"xs",onClick:x,className:"text-muted-foreground hover:text-foreground hover:bg-secondary gap-1",children:[eg,T]}),H[35]=eg,H[36]=T,H[37]=O):O=H[37],H[38]!==J||H[39]!==el||H[40]!==Q?(P=el&&(0,g.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:tt.map(e=>{let{value:t,label:r}=e;return(0,g.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:()=>{Q(t),es(!1)},children:[(0,g.jsx)("span",{className:((...e)=>e8(G(e)))("text-foreground",J===t&&"font-medium"),children:r}),J===t&&(0,g.jsx)(w,{size:14,className:"text-diff-green shrink-0"})]},t)})}),H[38]=J,H[39]=el,H[40]=Q,H[41]=P):P=H[41],H[42]!==O||H[43]!==P?(N=(0,g.jsxs)("div",{className:"relative",ref:eu,children:[O,P]}),H[42]=O,H[43]=P,H[44]=N):N=H[44];let eb=ee?"secondary":"ghost";H[45]!==ee||H[46]!==et?(L=()=>et(!ee),H[45]=ee,H[46]=et,H[47]=L):L=H[47];let ex=ee?"Show whitespace changes":"Ignore whitespace changes";H[48]!==eb||H[49]!==L||H[50]!==ex?(A=(0,g.jsx)(te,{variant:eb,size:"xs",onClick:L,className:"text-muted-foreground hover:text-foreground",title:ex,children:"Ignore whitespace"}),H[48]=eb,H[49]=L,H[50]=ex,H[51]=A):A=H[51],H[52]!==Z.length||H[53]!==eo||H[54]!==em?(I=Z.length>0&&(0,g.jsxs)(te,{variant:"ghost",size:"xs",onClick:em,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:"Copy all comments as AI prompt",children:[eo?(0,g.jsx)(w,{"data-icon":"inline-start"}):(0,g.jsx)(y,{"data-icon":"inline-start"}),eo?"Copied!":`Copy ${Z.length} comment${1===Z.length?"":"s"}`]}),H[52]=Z.length,H[53]=eo,H[54]=em,H[55]=I):I=H[55],H[56]!==er||H[57]!==en?(z=()=>en("split"===er?"stacked":"split"),H[56]=er,H[57]=en,H[58]=z):z=H[58];let ey="split"===er?"Switch to unified view (S)":"Switch to split view (S)";return H[59]===Symbol.for("react.memo_cache_sentinel")?(D=(0,g.jsx)(C,{size:14}),H[59]=D):D=H[59],H[60]!==z||H[61]!==ey?(_=(0,g.jsx)(te,{variant:"ghost",size:"icon-xs",onClick:z,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:ey,children:D}),H[60]=z,H[61]=ey,H[62]=_):_=H[62],H[63]!==ea||H[64]!==ed||H[65]!==ef?($=ea&&(0,g.jsx)(te,{variant:"ghost",size:"icon-xs",onClick:()=>ef("dark"===ed?"light":"dark"),className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:"dark"===ed?"Switch to light mode":"Switch to dark mode",children:"dark"===ed?(0,g.jsx)(S,{size:14}):(0,g.jsx)(E,{size:14})}),H[63]=ea,H[64]=ed,H[65]=ef,H[66]=$):$=H[66],H[67]!==h||H[68]!==N||H[69]!==A||H[70]!==I||H[71]!==_||H[72]!==$?(V=(0,g.jsxs)("div",{className:"flex items-center gap-0.5",children:[h,N,A,I,_,$]}),H[67]=h,H[68]=N,H[69]=A,H[70]=I,H[71]=_,H[72]=$,H[73]=V):V=H[73],H[74]!==p||H[75]!==V||H[76]!==c?(W=(0,g.jsxs)("header",{className:"flex items-center gap-2 border-b border-border bg-card px-4 py-2.5 text-sm",children:[c,p,m,V]}),H[74]=p,H[75]=V,H[76]=c,H[77]=W):W=H[77],W};function tn(e){return!e}let to=x("BubbleDotsIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"}),b.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"})))),ti=x("Folder1Icon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),tl=x("FolderOpenIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4.4408 19h13.5888a2 2 0 0 0 1.909-1.4035l1.6557-5.2982c.2012-.644-.2799-1.2983-.9545-1.2983H20M4.4408 19a1.441 1.441 0 0 0 1.3751-1.011l1.7455-5.5856A2 2 0 0 1 9.4704 11H20M4.4408 19C3.645 19 3 18.3549 3 17.5592V7c0-1.6569 1.3431-3 3-3h2.3945a3 3 0 0 1 2.4961 1.3359l.5157.7735A2 2 0 0 0 13.0704 7H18c1.1046 0 2 .8954 2 2v2"})))),ts=x("MagnifyingGlassIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),ta=e=>{let t,r,n,o,i=(0,v.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,g.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,g.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},tc=e=>{let t,r,n,o,i=(0,v.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,g.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,g.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},tu=e=>{let t,r,n,o,i=(0,v.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,g.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,g.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},td=x("CodeLinesIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5h10m5 0h3M3 12h5m5 0h8M3 19h7m5 0h6"})))),tf=x("CodeBracketsIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m10 20 4-16m4 4 1.9775 1.7578c1.3425 1.1934 1.3425 3.2911 0 4.4845L18 16M6 16l-1.9775-1.7577c-1.3425-1.1934-1.3425-3.2911 0-4.4845L6 8"})))),tp=x("ArrowUndoDownIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"m6.4998 19-2.9394-2.9393c-.5857-.5858-.5857-1.5356 0-2.1214L6.4998 11m-2.5 4h12.5c2.4853 0 4.5-2.0147 4.5-4.5s-2.0147-4.5-4.5-4.5h-4.5"})))),tm=[{icon:tl,key:"finder",label:"Finder"},{icon:td,key:"zed",label:"Zed"},{icon:td,key:"vscode",label:"VS Code"},{icon:td,key:"xcode",label:"Xcode"},{icon:tf,key:"ghostty",label:"Ghostty"},{icon:tf,key:"terminal",label:"Terminal"}],th=({x:e,y:t,filePath:r,repoPath:n,onClose:o,onDiscard:i})=>{let l=(0,b.useRef)(null),[s,a]=(0,b.useState)(!1),[c,u]=(0,b.useState)(!1);(0,b.useEffect)(()=>{let e=e=>{l.current&&!l.current.contains(e.target)&&o()},t=e=>{"Escape"===e.key&&o()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[o]);let d=async e=>{let t=`${n}/${r}`;try{await fetch("/api/open",{body:JSON.stringify({app:e,path:t}),headers:{"Content-Type":"application/json"},method:"POST"})}catch{}o()},f=async()=>{if(i&&!c){u(!0);try{await i(),o()}finally{u(!1)}}},p=async()=>{let e=`${n}/${r}`;try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>{a(!1),o()},1200)}catch{o()}},m={left:Math.min(e,window.innerWidth-200),position:"fixed",top:Math.min(t,window.innerHeight-300),zIndex:1e3};return(0,g.jsxs)("div",{ref:l,style:m,className:"diffhub-menu-animate min-w-[160px] rounded-lg border border-border bg-popover shadow-xl dark:shadow-none py-1 text-sm",children:[(0,g.jsx)("div",{className:"px-3 py-1.5 text-xs text-muted-foreground border-b border-border mb-1 font-mono truncate max-w-[200px]",children:r.split("/").pop()}),tm.map(({key:e,label:t,icon:r})=>(0,g.jsxs)("button",{type:"button",onClick:()=>d(e),className:"flex w-full items-center gap-2.5 px-3 py-1.5 text-foreground hover:bg-secondary transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",children:[(0,g.jsx)(r,{size:14,className:"text-muted-foreground"}),t]},e)),(0,g.jsxs)("div",{className:"border-t border-border mt-1 pt-1",children:[(0,g.jsxs)("button",{type:"button",onClick:p,className:"flex w-full items-center gap-2.5 px-3 py-1.5 text-foreground hover:bg-secondary transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",children:[s?(0,g.jsx)(w,{size:14,className:"text-diff-green"}):(0,g.jsx)(y,{size:14,className:"text-muted-foreground"}),s?"Copied!":"Copy path"]}),i&&(0,g.jsxs)("button",{type:"button",onClick:f,disabled:c,className:"flex w-full items-center gap-2.5 px-3 py-1.5 text-destructive hover:bg-destructive/10 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50 disabled:opacity-50",children:[(0,g.jsx)(tp,{size:14,className:c?"animate-spin":""}),"Discard changes"]})]})]})};x("SidebarSimpleLeftSquareIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7c0-1.6569 1.3431-3 3-3h10c1.6569 0 3 1.3431 3 3v10c0 1.6569-1.3431 3-3 3H7c-1.6569 0-3-1.3431-3-3zM9 5v14"})))),e.s([],19485),e.i(19485);let tg=b[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],tv=tg&&tg!==b.useLayoutEffect?tg:e=>e();function tb(e){let t=_(tx).current;return t.next=e,tv(t.effect),t.trampoline}function tx(){let e={next:void 0,callback:ty,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function ty(){}let tw=((o={}).disabled="data-disabled",o.valid="data-valid",o.invalid="data-invalid",o.touched="data-touched",o.dirty="data-dirty",o.filled="data-filled",o.focused="data-focused",o),tk={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},tS={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},tE={disabled:!1,...tS},tC={valid:e=>null===e?null:e?{[tw.valid]:""}:{[tw.invalid]:""}},tR=b.createContext({invalid:void 0,name:void 0,validityData:{state:tk,errors:[],error:"",value:"",initialValue:null},setValidityData:F,disabled:void 0,touched:tS.touched,setTouched:F,dirty:tS.dirty,setDirty:F,filled:tS.filled,setFilled:F,focused:tS.focused,setFocused:F,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:tE,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=q)=>e,getInputValidationProps:(e=q)=>e,inputRef:{current:null},commit:async()=>{}}});function tj(e=!0){let t=b.useContext(tR);if(t.setValidityData===F&&!e)throw Error(z(28));return t}let tM=b.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0}),tT=b.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:F,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function tO(){return b.useContext(tT)}let tP={...b},tN=0,tL=tP.useId;function tA(e,t){if(void 0!==tL){let r=tL();return e??(t?`${t}-${r}`:r)}return function(e,t="mui"){let[r,n]=b.useState(e),o=e||r;return b.useEffect(()=>{null==r&&(tN+=1,n(`${t}-${tN}`))},[r,t]),o}(e,t)}function tI(e){return tA(e,"base-ui")}let tz=b.createContext({controlId:void 0,registerControlId:F,labelId:void 0,setLabelId:F,messageIds:[],setMessageIds:F,getDescriptionProps:e=>e});function tD(){return b.useContext(tz)}let t_=function(e){let t=tI(),r=void 0===e.controlId?t:e.controlId,[n,o]=b.useState(r),[i,l]=b.useState(e.labelId),[s,a]=b.useState([]),c=_(()=>new Map),{messageIds:u}=tD(),d=tb((e,t)=>{let r=c.current;void 0===t?r.delete(e):(r.set(e,t),o(e=>{let t;if(0!==r.size){for(let n of r.values()){if(void 0!==e&&n===e)return e;void 0===t&&(t=n)}return t}}))}),f=b.useCallback(e=>O({"aria-describedby":u.concat(s).join(" ")||void 0},e),[u,s]),p=b.useMemo(()=>({controlId:n,registerControlId:d,labelId:i,setLabelId:l,messageIds:s,setMessageIds:a,getDescriptionProps:f}),[n,d,i,l,s,a,f]);return(0,g.jsx)(tz.Provider,{value:p,children:e.children})},t$=[];function tV(e){b.useEffect(e,t$)}class tW{static create(){return new tW}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 tH(){let e=_(tW.create).current;return tV(e.disposeEffect),e}function tB(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}let tF=Object.keys(tk),tU=b.forwardRef(function(e,t){let{errors:r,validationMode:n,submitAttemptedRef:o}=tO(),{render:i,className:l,validate:s,validationDebounceTime:a=0,validationMode:c=n,name:u,disabled:d=!1,invalid:f,dirty:p,touched:m,actionsRef:h,...v}=e,{disabled:x}=function(e=!1){let t=b.useContext(tM);if(!t&&!e)throw Error(z(86));return t}(),y=tb(s||(()=>null)),w=x||d,[k,S]=b.useState(!1),[E,C]=b.useState(!1),[R,j]=b.useState(!1),[M,T]=b.useState(!1),P=p??E,N=m??k,L=b.useRef(!1),A=tb(e=>{void 0===p&&(e&&(L.current=!0),C(e))}),I=tb(e=>{void 0===m&&S(e)}),D=tb(()=>"onChange"===c||"onSubmit"===c&&o.current),_=!!u&&Object.hasOwn(r,u)&&void 0!==r[u],$=!0===f||_,[V,W]=b.useState({state:tk,error:"",errors:[],value:null,initialValue:null}),H=!$&&V.state.valid,B=b.useMemo(()=>({disabled:w,touched:N,dirty:P,valid:H,filled:R,focused:M}),[w,N,P,H,R,M]),F=function(e){let{formRef:t,clearErrors:r}=tO(),{setValidityData:n,validate:o,validityData:i,validationDebounceTime:l,invalid:s,markedDirtyRef:a,state:c,name:u,shouldValidateOnChange:d}=e,{controlId:f,getDescriptionProps:p}=tD(),m=tH(),h=b.useRef(null),g=tb(async(e,r=!1)=>{let l,u=h.current;if(!u)return;if(r){if(!1!==c.valid)return;let r=u.validity;if(!r.valueMissing){let r={value:e,state:{...tk,valid:!0},error:"",errors:[],initialValue:i.initialValue};if(u.setCustomValidity(""),f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...tB(r,!1)})}n(r);return}let o=tF.reduce((e,t)=>(e[t]=r[t],e),{});if(!o.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let r of tF)"valid"!==r&&("valueMissing"===r&&(t=e[r]),e[r]&&(t=!1));return t}(o))return}m.clear();let p=null,g=[],v=function(e){let t=tF.reduce((t,r)=>(t[r]=e.validity[r],t),{}),r=!1;for(let e of tF)if("valid"!==e){if("valueMissing"===e&&t[e])r=!0;else if(t[e])return t}return r&&!a.current&&(t.valid=!0,t.valueMissing=!1),t}(u),b=d();if(u.validationMessage&&!b)l=u.validationMessage,g=[u.validationMessage];else{let r=o(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));null!==(p="object"==typeof r&&null!==r&&"then"in r?await r:r)?(v.valid=!1,v.customError=!0,Array.isArray(p)?(g=p,u.setCustomValidity(p.join("\n"))):p&&(g=[p],u.setCustomValidity(p))):b&&(u.setCustomValidity(""),v.customError=!1,u.validationMessage?(l=u.validationMessage,g=[u.validationMessage]):u.validity.valid&&!v.valid&&(v.valid=!0))}let x={value:e,state:v,error:l??(Array.isArray(p)?p[0]:p??""),errors:g,initialValue:i.initialValue};if(f){let e=t.current.fields.get(f);e&&t.current.fields.set(f,{...e,...tB(x,s)})}n(x)}),v=b.useCallback((e={})=>O(p,!1===c.valid?{"aria-invalid":!0}:q,e),[p,c.valid]),x=b.useCallback((e={})=>O({onChange(e){if(e.nativeEvent.defaultPrevented)return;if(r(u),!d())return void g(e.currentTarget.value,!0);let t=e.currentTarget;""===t.value?g(t.value):(m.clear(),l?m.start(l,()=>{g(t.value)}):g(t.value))}},v(e)),[v,r,u,m,g,l,d]);return b.useMemo(()=>({getValidationProps:v,getInputValidationProps:x,inputRef:h,commit:g}),[v,x,g])}({setValidityData:W,validate:y,validityData:V,validationDebounceTime:a,invalid:$,markedDirtyRef:L,state:B,name:u,shouldValidateOnChange:D}),U=b.useCallback(()=>{L.current=!0,F.commit(V.value)},[F,V]);b.useImperativeHandle(h,()=>({validate:U}),[U]);let X=b.useMemo(()=>({invalid:$,name:u,validityData:V,setValidityData:W,disabled:w,touched:N,setTouched:I,dirty:P,setDirty:A,filled:R,setFilled:j,focused:M,setFocused:T,validate:y,validationMode:c,validationDebounceTime:a,shouldValidateOnChange:D,state:B,markedDirtyRef:L,validation:F}),[$,u,V,w,N,I,P,A,R,j,M,T,y,c,a,D,B,F]),Y=K("div",e,{ref:t,state:B,props:v,stateAttributesMapping:tC});return(0,g.jsx)(tR.Provider,{value:X,children:Y})}),tq=b.forwardRef(function(e,t){return(0,g.jsx)(t_,{children:(0,g.jsx)(tU,{...e,ref:t})})});function tK(){return"u">typeof window}function tX(e){return tZ(e)?(e.nodeName||"").toLowerCase():"#document"}function tY(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function tG(e){var t;return null==(t=(tZ(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function tZ(e){return!!tK()&&(e instanceof Node||e instanceof tY(e).Node)}function tJ(e){return!!tK()&&(e instanceof Element||e instanceof tY(e).Element)}function tQ(e){return!!tK()&&(e instanceof HTMLElement||e instanceof tY(e).HTMLElement)}function t0(e){return!(!tK()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof tY(e).ShadowRoot)}function t1(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=t9(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&"inline"!==o&&"contents"!==o}function t2(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let t5=/transform|translate|scale|rotate|perspective|filter/,t3=/paint|layout|strict|content/,t4=e=>!!e&&"none"!==e;function t7(e){let t=tJ(e)?t9(e):e;return t4(t.transform)||t4(t.translate)||t4(t.scale)||t4(t.rotate)||t4(t.perspective)||!t6()&&(t4(t.backdropFilter)||t4(t.filter))||t5.test(t.willChange||"")||t3.test(t.contain||"")}function t6(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function t8(e){return/^(html|body|#document)$/.test(tX(e))}function t9(e){return tY(e).getComputedStyle(e)}function re(e){return tJ(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rt(e){if("html"===tX(e))return e;let t=e.assignedSlot||e.parentNode||t0(e)&&e.host||tG(e);return t0(t)?t.host:t}function rr(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=rt(t);return t8(r)?t.ownerDocument?t.ownerDocument.body:t.body:tQ(r)&&t1(r)?r:e(r)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),l=tY(o);if(!i)return t.concat(o,rr(o,[],r));{let e=rn(l);return t.concat(l,l.visualViewport||[],t1(o)?o:[],e&&r?rr(e):[])}}function rn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ro(e){return e?.ownerDocument||document}let ri="u">typeof navigator,rl=function(){if(!ri)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),rs=function(){if(!ri)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}(),ra=function(){if(!ri)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}(),rc="u">typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter:none"),ru="MacIntel"===rl.platform&&rl.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(rl.platform);ri&&/firefox/i.test(ra);let rd=ri&&/apple/i.test(navigator.vendor);ri&&/Edg/i.test(ra);let rf=ri&&/android/i.test(rs)||/android/i.test(ra),rp=ri&&rs.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,rm=ra.includes("jsdom/"),rh="data-base-ui-focusable",rg="active",rv="selected",rb="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function rx(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ry(e,t){if(!e||!t)return!1;let r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&t0(r)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function rw(e,t){if(!tJ(e))return!1;if(t.hasElement(e))return!e.hasAttribute("data-trigger-disabled");for(let[,r]of t.entries())if(ry(r,e))return!r.hasAttribute("data-trigger-disabled");return!1}function rk(e){return"composedPath"in e?e.composedPath()[0]:e.target}function rS(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function rE(e){return tQ(e)&&e.matches(rb)}function rC(e){return!!e&&"combobox"===e.getAttribute("role")&&rE(e)}function rR(e){return e?e.hasAttribute(rh)?e:e.querySelector(`[${rh}]`)||e:null}let rj="u">typeof document?b.useLayoutEffect:()=>{},rM=b.forwardRef(function(e,t){let{render:r,className:n,id:o,nativeLabel:i=!0,...l}=e,s=tj(!1),{labelId:a}=tD(),c=b.useRef(null),u=function(e={}){let t,{id:r,fallbackControlId:n,native:o=!1,setLabelId:i,focusControl:l}=e,{controlId:s,setLabelId:a}=tD(),c=tb(e=>{a(e),i?.(e)}),u=(rj(()=>(c(t),()=>{c(void 0)}),[t=tI(r),c]),t),d=s??n;function f(e){let t=rk(e.nativeEvent);t?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),o||function(e){if(l)return l(e,d);if(!d)return;let t=ro(e.currentTarget).getElementById(d);tQ(t)&&t.focus({focusVisible:!0})}(e))}return o?{id:u,htmlFor:d??void 0,onMouseDown:f}:{id:u,onClick:f,onPointerDown(e){e.preventDefault()}}}({id:a??o,native:i});return K("label",e,{ref:[t,c],state:s.state,props:[u,l],stateAttributesMapping:tC})});var rT=e.i(72280);let rO=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 rP{static create(){return new rP}static request(e){return rO.request(e)}static cancel(e){return rO.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=rO.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(rO.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}function rN(){let e=_(rP.create).current;return tV(e.disposeEffect),e}function rL(e){return null==e?e:"current"in e?e.current:e}let rA=((i={}).startingStyle="data-starting-style",i.endingStyle="data-ending-style",i),rI={[rA.startingStyle]:""},rz={[rA.endingStyle]:""},rD={transitionStatus:e=>"starting"===e?rI:"ending"===e?rz:null};function r_(e,t=!1,r=!0){let n=rN();return tb((o,i=null)=>{function l(){rT.flushSync(o)}n.cancel();let s=rL(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=rA.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 r$(e){let{enabled:t=!0,open:r,ref:n,onComplete:o}=e,i=tb(o),l=r_(n,r,!1);b.useEffect(()=>{if(!t)return;let e=new AbortController;return l(i,e.signal),()=>{e.abort()}},[t,r,i,l])}function rV(e,t=!1,r=!1){let[n,o]=b.useState(e&&t?"idle":void 0),[i,l]=b.useState(e);return e&&!i&&(l(!0),o("starting")),e||!i||"ending"===n||r||o("ending"),e||i||"ending"!==n||o(void 0),rj(()=>{if(!e&&i&&"ending"!==n&&r){let e=rP.request(()=>{o("ending")});return()=>{rP.cancel(e)}}},[e,i,n,r]),rj(()=>{if(!e||t)return;let r=rP.request(()=>{o(void 0)});return()=>{rP.cancel(r)}},[t,e]),rj(()=>{if(!e||!t)return;e&&i&&"idle"!==n&&o("starting");let r=rP.request(()=>{o("idle")});return()=>{rP.cancel(r)}},[t,e,i,o,n]),b.useMemo(()=>({mounted:i,setMounted:l,transitionStatus:n}),[i,n])}let rW={...tC,...rD},rH=b.forwardRef(function(e,t){let{render:r,id:n,className:o,match:i,...l}=e,s=tI(n),{validityData:a,state:c,name:u}=tj(!1),{setMessageIds:d}=tD(),{errors:f}=tO(),p=u?f[u]:null,m=!1,{mounted:h,transitionStatus:v,setMounted:x}=rV(m=!!p||!0===i||(i?!!a.state[i]:!1===a.state.valid));rj(()=>{if(m&&s)return d(e=>e.concat(s)),()=>{d(e=>e.filter(e=>e!==s))}},[m,s,d]);let y=b.useRef(null),[w,k]=b.useState(null),[S,E]=b.useState(null),C=p||(a.errors.length>1?(0,g.jsx)("ul",{children:a.errors.map(e=>(0,g.jsx)("li",{children:e},e))}):a.error),R=a.error;null!=p?R=Array.isArray(p)?JSON.stringify(p):p:a.errors.length>1&&(R=JSON.stringify(a.errors)),m&&R!==S&&(E(R),k(C)),r$({open:m,ref:y,onComplete(){m||x(!1)}});let j=K("div",e,{ref:[t,y],state:{...c,transitionStatus:v},props:[{id:s,children:m?C:w},l],stateAttributesMapping:rW,enabled:h});return h?j:null}),rB=b.forwardRef(function(e,t){let{render:r,id:n,className:o,...i}=e,l=tI(n),s=tj(!1),{setMessageIds:a}=tD();return rj(()=>{if(l)return a(e=>e.concat(l)),()=>{a(e=>e.filter(e=>e!==l))}},[l,a]),K("p",e,{ref:t,state:s.state,props:[{id:l},i],stateAttributesMapping:tC})});function rF({controlled:e,default:t,name:r,state:n="value"}){let{current:o}=b.useRef(void 0!==e),[i,l]=b.useState(t),s=b.useCallback(e=>{o||l(e)},[]);return[o?e:i,s]}function rU(e,t,r,n){let o=!1,i=!1,l=n??q;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 rq=e.i(16162),rq=rq;let rK=b.forwardRef(function(e,t){let{render:r,className:n,id:o,name:i,value:l,disabled:s=!1,onValueChange:a,defaultValue:c,autoFocus:u=!1,...d}=e,{state:f,name:p,disabled:m,setTouched:h,setDirty:g,validityData:v,setFocused:x,setFilled:y,validationMode:w,validation:k}=tj(),S=m||s,E=p??i,C={...f,disabled:S},{labelId:R}=tD(),j=function(e={}){let{id:t,implicit:r=!1,controlRef:n}=e,{controlId:o,registerControlId:i}=tD(),l=tI(t),s=r?o:void 0,a=_(()=>Symbol("labelable-control")),c=b.useRef(!1),u=b.useRef(null!=t),d=tb(()=>{c.current&&i!==F&&(c.current=!1,i(a.current,void 0))});return rj(()=>{let e;if(i!==F){if(r){let r=n?.current;e=tJ(r)&&null!=r.closest("label")?t??null:s??l}else if(null!=t)u.current=!0,e=t;else{if(!u.current)return void d();e=l}if(void 0===e)return void d();c.current=!0,i(a.current,e)}},[t,n,s,i,r,l,a,d]),b.useEffect(()=>d,[d]),o??l}({id:o});rj(()=>{let e=null!=l;k.inputRef.current?.value||e&&""!==l?y(!0):e&&""===l&&y(!1)},[k.inputRef,y,l]);let M=b.useRef(null);rj(()=>{u&&M.current===rx(ro(M.current))&&x(!0)},[u,x]);let[T]=rF({controlled:l,default:c,name:"FieldControl",state:"value"}),O=void 0!==l,P=O?T:void 0;return!function(e){let{enabled:t=!0,value:r,id:n,name:o,controlRef:i,commit:l}=e,{formRef:s}=tO(),{invalid:a,markedDirtyRef:c,validityData:u,setValidityData:d}=tj(),f=tb(e.getValue);rj(()=>{if(!t)return;let e=r;void 0===e&&(e=f()),null===u.initialValue&&null!==e&&d(t=>({...t,initialValue:e}))},[t,d,r,u.initialValue,f]),rj(()=>{t&&n&&s.current.fields.set(n,{getValue:f,name:o,controlRef:i,validityData:tB(u,a),validate(e=!0){let t=r;void 0===t&&(t=f()),c.current=!0,e?rT.flushSync(()=>l(t)):l(t)}})},[l,i,t,s,f,n,a,c,o,u,r]),rj(()=>{let e=s.current.fields;return()=>{n&&e.delete(n)}},[s,n])}({id:j,name:E,commit:k.commit,value:P,getValue:()=>k.inputRef.current?.value,controlRef:k.inputRef}),K("input",e,{ref:[t,M],state:C,props:[{id:j,disabled:S,name:E,ref:k.inputRef,"aria-labelledby":R,autoFocus:u,...O?{value:P}:{defaultValue:c},onChange(e){let t=e.currentTarget.value;a?.(t,rU(rq.none,e.nativeEvent)),g(t!==v.initialValue),y(""!==t)},onFocus(){x(!0)},onBlur(e){h(!0),x(!1),"onBlur"===w&&k.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(h(!0),k.commit(e.currentTarget.value))}},k.getInputValidationProps(),d],stateAttributesMapping:tC})}),rX=b.createContext({disabled:!1}),rY=b.createContext(void 0),rG=b.forwardRef(function(e,t){let{render:r,className:n,disabled:o=!1,...i}=e,{state:l,disabled:s}=tj(!1),a=s||o,c=function(e=!0){let t=b.useContext(rY);if(void 0===t&&!e)throw Error(z(3));return t}(),u=c?.parent.id,d=c?.allValues!==void 0,f=b.useMemo(()=>({disabled:a}),[a]),p=K("div",e,{ref:t,state:l,props:i,stateAttributesMapping:tC});return(0,g.jsx)(t_,{controlId:d?u:void 0,children:(0,g.jsx)(rX.Provider,{value:f,children:p})})});e.s(["Control",0,rK,"Description",0,rB,"Error",0,rH,"Item",0,rG,"Label",0,rM,"Root",0,tq,"Validity",0,function(e){let{children:t}=e,{validityData:r,invalid:n}=tj(!1),o=b.useMemo(()=>tB(r,n),[r,n]),{transitionStatus:i}=rV(!1===o.state.valid),l=b.useMemo(()=>({...o,validity:o.state,transitionStatus:i}),[o,i]);return(0,g.jsx)(b.Fragment,{children:t(l)})}],71975),e.i(71975),e.s([],75704),e.i(75704);let rZ=b.createContext(void 0);function rJ(e){let t=b.useContext(rZ);if(!1===e&&void 0===t)throw Error(z(27));return t}let rQ=((l={}).open="data-open",l.closed="data-closed",l[l.startingStyle=rA.startingStyle]="startingStyle",l[l.endingStyle=rA.endingStyle]="endingStyle",l.anchorHidden="data-anchor-hidden",l.side="data-side",l.align="data-align",l),r0=((s={}).popupOpen="data-popup-open",s.pressed="data-pressed",s),r1={[r0.popupOpen]:""};r0.popupOpen,r0.pressed;let r2={[rQ.open]:""},r5={[rQ.closed]:""},r3={[rQ.anchorHidden]:""},r4={open:e=>e?r1:null},r7={open:e=>e?r2:r5,anchorHidden:e=>e?r3:null},r6={...r7,...rD},r8=b.forwardRef(function(e,t){let{render:r,className:n,forceRender:o=!1,...i}=e,{store:l}=rJ(),s=l.useState("open"),a=l.useState("nested"),c=l.useState("mounted");return K("div",e,{state:{open:s,transitionStatus:l.useState("transitionStatus")},ref:[l.context.backdropRef,t],stateAttributesMapping:r6,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:o||!a})}),r9=b.createContext(void 0);function ne(e=!1){let t=b.useContext(r9);if(void 0===t&&!e)throw Error(z(16));return t}function nt(e={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:n=0,native:o=!0,composite:i}=e,l=b.useRef(null),s=ne(!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:b.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=b.useCallback(()=>{let e=l.current;nr(e)&&a&&t&&void 0===c.disabled&&e.disabled&&(e.disabled=!1)},[t,c.disabled,a]);return rj(u,[u]),{getButtonProps:b.useCallback((e={})=>{let{onClick:r,onMouseDown:n,onKeyUp:i,onKeyDown:l,onPointerDown:s,...u}=e;return O({type:o?"button":void 0,onClick(e){t?e.preventDefault():r?.(e)},onMouseDown(e){t||n?.(e)},onKeyDown(e){var n;if(t||(A(e),l?.(e),e.baseUIHandlerPrevented))return;let i=e.target===e.currentTarget,s=e.currentTarget,c=nr(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||((A(e),i?.(e),e.target===e.currentTarget&&o&&a&&nr(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:tb(e=>{l.current=e,u()})}}function nr(e){return tQ(e)&&"BUTTON"===e.tagName}var rq=rq;let nn=b.forwardRef(function(e,t){let{render:r,className:n,disabled:o=!1,nativeButton:i=!0,...l}=e,{store:s}=rJ(),a=s.useState("open"),{getButtonProps:c,buttonRef:u}=nt({disabled:o,native:i});return K("button",e,{state:{disabled:o},ref:[t,u],props:[{onClick:function(e){a&&s.setOpen(!1,rU(rq.closePress,e.nativeEvent))}},l,c]})}),no=b.forwardRef(function(e,t){let{render:r,className:n,id:o,...i}=e,{store:l}=rJ(),s=tI(o);return l.useSyncedValueWithCleanup("descriptionElementId",s),K("p",e,{ref:t,props:[{id:s},i]})});var ni='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] *)',nl="u"<typeof Element,ns=nl?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,na=!nl&&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},nc=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]"):nc(e.parentNode))},nu=function(e){var t,r=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===r||"true"===r},nd=function(e,t,r){if(nc(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(ni));return t&&ns.call(e,ni)&&n.unshift(e),n=n.filter(r)},nf=function(e,t,r){for(var n=[],o=Array.from(e);o.length;){var i=o.shift();if(!nc(i,!1))if("SLOT"===i.tagName){var l=i.assignedElements(),s=nf(l.length?l:i.children,!0,r);r.flatten?n.push.apply(n,s):n.push({scopeParent:i,candidates:s})}else{ns.call(i,ni)&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var a=i.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(i),c=!nc(a,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(a&&c){var u=nf(!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},np=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},nm=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||nu(e))&&!np(e)?0:e.tabIndex},nh=function(e,t){var r=nm(e);return r<0&&t&&!np(e)?0:r},ng=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},nv=function(e){return"INPUT"===e.tagName},nb=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},nx=function(e){if(!e.name)return!0;var t,r=e.form||na(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=nb(t,e.form);return!o||o===e},ny=function(e){return nv(e)&&"radio"===e.type&&!nx(e)},nw=function(e){var t,r,n,o,i,l,s,a=e&&na(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=na(c))?void 0:i.host)&&null!=(s=l.ownerDocument)&&s.contains(c));return u},nk=function(e){var t=e.getBoundingClientRect(),r=t.width,n=t.height;return 0===r&&0===n},nS=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=ns.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ns.call(o,"details:not([open]) *"))return!0;if(r&&"full"!==r&&"full-native"!==r&&"legacy-full"!==r){if("non-zero-area"===r)return nk(e)}else{if("function"==typeof n){for(var i=e;e;){var l=e.parentElement,s=na(e);if(l&&!l.shadowRoot&&!0===n(l))return nk(e);e=e.assignedSlot?e.assignedSlot:l||s===e.ownerDocument?l:s.host}e=i}if(nw(e))return!e.getClientRects().length;if("legacy-full"!==r)return!0}return!1},nE=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!!ns.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1},nC=function(e,t){return!(t.disabled||nv(t)&&"hidden"===t.type||nS(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||nE(t))},nR=function(e,t){return!(ny(t)||0>nm(t))&&!!nC(e,t)},nj=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},nM=function(e){var t=[],r=[];return e.forEach(function(e,n){var o=!!e.scopeParent,i=o?e.scopeParent:e,l=nh(i,o),s=o?nM(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(ng).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},nT=function(e,t){return nM((t=t||{}).getShadowRoot?nf([e],t.includeContainer,{filter:nR.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:nj}):nd(e,t.includeContainer,nR.bind(null,t)))},nO=function(e,t){return(t=t||{}).getShadowRoot?nf([e],t.includeContainer,{filter:nC.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):nd(e,t.includeContainer,nC.bind(null,t))},nP=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==ns.call(e,ni)&&nR(t,e)};function nN(e){let t=_(nL,e).current;return t.next=e,rj(t.effect),t}function nL(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let nA={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},nI={...nA,position:"fixed",top:0,left:0};({...nA,position:"absolute"});let nz=b.forwardRef(function(e,t){let[r,n]=b.useState();return rj(()=>{rd&&n("button")},[]),(0,g.jsx)("span",{...e,ref:t,style:nI,"aria-hidden":!r||void 0,tabIndex:0,role:r,"data-base-ui-focus-guard":""})});function nD(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function n_(e){let t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}function n$(e,t,r=!0){return e.filter(e=>e.parentId===t&&(!r||e.context?.open)).flatMap(t=>[t,...n$(e,t.id,r)])}function nV(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 nW=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function nH(e,t){let r=nT(e,nW()),n=r.length;if(0===n)return;let o=rx(ro(e)),i=r.indexOf(o);return r[-1===i?1===t?0:n-1:i+t]}function nB(e){return nH(ro(e).body,1)||e}function nF(e){return nH(ro(e).body,-1)||e}function nU(e,t){let r=t||e.currentTarget,n=e.relatedTarget;return!n||!ry(r,n)}function nq(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 rq=rq;function nK(e){return`data-base-ui-${e}`}let nX=0;function nY(e,t={}){let{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(nX);let i=()=>e?.focus({preventScroll:r});o?i():nX=requestAnimationFrame(i)}let nG={inert:new WeakMap,"aria-hidden":new WeakMap},nZ="data-base-ui-inert",nJ={inert:new WeakSet,"aria-hidden":new WeakSet},nQ=new WeakMap,n0=0,n1=(e,t)=>t.map(t=>{if(e.contains(t))return t;let r=function e(t){return t?t0(t)?t.host:e(t.parentNode):null}(t);return e.contains(r)?r:null}).filter(e=>null!=e),n2=e=>{let t=new Set;return e.forEach(e=>{let r=e;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},n5=(e,t,r)=>{let n=[],o=e=>{!e||r.has(e)||Array.from(e.children).forEach(e=>{"script"!==tX(e)&&(t.has(e)?o(e):n.push(e))})};return o(e),n};function n3(e,t={}){let{ariaHidden:r=!1,inert:n=!1,mark:o=!0,markerIgnoreElements:i=[]}=t,l=ro(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=n1(t,e),u=new Set(o?n1(t,i):[]),d=o?n5(t,n2(c),new Set(c)).filter(e=>!u.has(e)):[],f=[],p=[];if(l){let e=nG[l],r=nJ[l];a=r,s=e;let n=n1(t,Array.from(t.querySelectorAll("[aria-live]"))),o=c.concat(n);n5(t,n2(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=(nQ.get(e)||0)+1;nQ.set(e,t),p.push(e),1===t&&e.setAttribute(nZ,"")}),n0+=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=(nQ.get(e)||0)-1;nQ.set(e,t),t||e.removeAttribute(nZ)}),(n0-=1)||(nG.inert=new WeakMap,nG["aria-hidden"]=new WeakMap,nJ.inert=new WeakSet,nJ["aria-hidden"]=new WeakSet,nQ=new WeakMap)}}(e,l,r,n,{mark:o,markerIgnoreElements:i})}var rq=rq;let n4={style:{transition:"none"}},n7="data-base-ui-click-trigger",n6={fallbackAxisSide:"end"},n8={clipPath:"inset(50%)",position:"fixed",top:0,left:0},n9=b.createContext(null),oe=nK("portal");function ot(e={}){let{ref:t,container:r,componentProps:n=q,elementProps:o}=e,i=tA(),l=b.useContext(n9),s=l?.portalNode,[a,c]=b.useState(null),[u,d]=b.useState(null),f=tb(e=>{null!==e&&d(e)}),p=b.useRef(null);rj(()=>{if(null===r){p.current&&(p.current=null,d(null),c(null));return}if(null==i)return;let e=(r&&(tZ(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=K("div",n,{ref:[t,f],props:[{id:i,[oe]:""},o]});return{portalNode:u,portalSubtree:a&&m?rT.createPortal(m,a):null}}let or=b.forwardRef(function(e,t){let{children:r,container:n,className:o,render:i,renderGuards:l,...s}=e,{portalNode:a,portalSubtree:c}=ot({container:n,ref:t,componentProps:e,elementProps:s}),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),p=b.useRef(null),[m,h]=b.useState(null),v=m?.modal,x=m?.open,y="boolean"==typeof l?l:!!m&&!m.modal&&m.open&&!!a;b.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&&nU(e)&&("focusin"===e.type?nq:function(e){nT(e,nW()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})})(a)}},[a,v]),b.useEffect(()=>{a&&!x&&nq(a)},[x,a]);let w=b.useMemo(()=>({beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:f,afterInsideRef:p,portalNode:a,setFocusManagerState:h}),[a]);return(0,g.jsxs)(b.Fragment,{children:[c,(0,g.jsxs)(n9.Provider,{value:w,children:[y&&a&&(0,g.jsx)(nz,{"data-type":"outside",ref:u,onFocus:e=>{if(nU(e,a))f.current?.focus();else{let e=nF(m?m.domReference:null);e?.focus()}}}),y&&a&&(0,g.jsx)("span",{"aria-owns":a.id,style:n8}),a&&rT.createPortal(r,a),y&&a&&(0,g.jsx)(nz,{"data-type":"outside",ref:d,onFocus:e=>{if(nU(e,a))p.current?.focus();else{let t=nB(m?m.domReference:null);t?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,rU(rq.focusOut,e.nativeEvent))}}})]})]})}),on=b.createContext(null),oo=b.createContext(null),oi=()=>b.useContext(on)?.id||null,ol=e=>{let t=b.useContext(oo);return e??t},os=[];function oa(){os=os.filter(e=>e.deref()?.isConnected)}function oc(){return oa(),os[os.length-1]?.deref()}function ou(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;let r=nW(),n=nO(e,r).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return nP(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 od(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:m}=e,h="rootStore"in t?t.rootStore:t,v=h.useState("open"),x=h.useState("domReferenceElement"),y=h.useState("floatingElement"),{events:w,dataRef:k}=h.context,S=tb(()=>k.current.floatingContext?.nodeId),E=!1===o,C=rC(x)&&E,R=b.useRef(["content"]),j=nN(o),M=nN(i),T=nN(c),O=ol(p),P=b.useContext(n9),N=b.useRef(!1),L=b.useRef(!1),A=b.useRef(!1),I=b.useRef(-1),z=b.useRef(""),D=b.useRef(""),_=b.useRef(null),V=b.useRef(null),W=$(_,f,P?.beforeInsideRef),H=$(V,P?.afterInsideRef),B=tH(),F=tH(),U=rN(),q=null!=P,K=rR(y),X=tb((e=K)=>e?nT(e,nW()):[]),Y=tb(()=>m?.().filter(e=>null!=e)??[]),G=tb(e=>{let t=X(e);return R.current.map(()=>t).filter(Boolean).flat()});b.useEffect(()=>{if(n||!s)return;function e(e){"Tab"===e.key&&ry(K,rx(ro(K)))&&0===X().length&&!C&&(e.preventDefault(),e.stopPropagation())}let t=ro(K);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[n,x,K,s,R,C,X,G]),b.useEffect(()=>{if(n||!v)return;let e=ro(K);function t(){A.current=!1}function r(e){let t=rk(e),r=Y();A.current=!(ry(y,t)||ry(x,t)||ry(P?.portalNode,t)||r.some(e=>e===t||ry(e,t))),D.current=e.pointerType||"keyboard",t?.closest(`[${n7}]`)&&(L.current=!0)}function o(){D.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]),b.useEffect(()=>{if(n||!a)return;let e=ro(K);function t(){L.current=!0,F.start(0,()=>{L.current=!1})}function r(e){let t=rk(e),r=X().indexOf(t);-1!==r&&(I.current=r)}function o(t){let r=t.relatedTarget,n=t.currentTarget,o=rk(t);queueMicrotask(()=>{var i;let a=S(),c=h.context.triggerElements,f=Y(),p=r?.hasAttribute(nK("focus-guard"))&&[_.current,V.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,rL(d),rL(u)].includes(r),m=!(ry(x,r)||ry(y,r)||ry(r,y)||ry(P?.portalNode,r)||f.some(e=>e===r||ry(e,r))||null!=r&&c.hasElement(r)||c.hasMatchingElement(e=>ry(e,r))||p||O&&(n$(O.nodesRef.current,a).find(e=>ry(e.context?.elements.floating,r)||ry(e.context?.elements.domReference,r))||nV(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,rR(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(n===x&&K&&ou(K,R),l&&n!==x&&!((i=o)&&i.isConnected&&("function"==typeof i.checkVisibility?i.checkVisibility():"none"!==t9(i).display))&&rx(e)===e.body){if(tQ(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;tQ(r)&&r.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(C||!s)&&r&&m&&!L.current&&(C||r!==oc())&&(N.current=!0,h.setOpen(!1,rU(rq.focusOut,t)))})}function i(){A.current||(k.current.insideReactTree=!0,B.start(0,()=>{k.current.insideReactTree=!1}))}let c=tQ(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,h,a,l,X,C,S,R,k,B,F,U,u,d,Y]),b.useEffect(()=>{if(n||!y||!v)return;let e=Array.from(P?.portalNode?.querySelectorAll(`[${nK("portal")}]`)||[]),t=O?nV(O.nodesRef.current,S()):[],r=t.find(e=>rC(e.context?.elements.domReference||null))?.context?.elements.domReference,o=n3([y,...e,_.current,V.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...Y(),r,rL(d),rL(u),C?x:null].filter(e=>null!=e),{ariaHidden:s||C,mark:!1}),i=n3([y,...e].filter(e=>null!=e));return()=>{i(),o()}},[v,n,x,y,s,R,P,C,O,S,u,d,Y]),rj(()=>{if(!v||n||!tQ(K))return;let e=rx(ro(K));queueMicrotask(()=>{let t,r=G(K),n=j.current,o="function"==typeof n?n(T.current||""):n;void 0===o||!1===o||(t=(t=!0===o||null===o?r[0]||K:rL(o))||r[0]||K,ry(K,e)||nY(t,{preventScroll:t===K}))})},[n,v,K,E,G,j,T]),rj(()=>{var e;if(n||!K)return;let t=ro(K);function r(e){var t,r,n,o;let i;if(e.open||(t=e.nativeEvent,r=D.current,i=tY(t.target),z.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===rq.triggerHover&&"mouseleave"===e.nativeEvent.type&&(N.current=!0),e.reason===rq.outsidePress)if(e.nested)N.current=!1;else if((""===(n=e.nativeEvent).pointerType&&n.isTrusted?0:rf&&n.pointerType?"click"!==n.type||1!==n.buttons:0!==n.detail||n.pointerType)&&(o=e.nativeEvent,rm?1:(rf||0!==o.width||0!==o.height)&&(!rf||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?N.current=!1:N.current=!0}else N.current=!1}return e=rx(t),oa(),e&&"body"!==tX(e)&&(os.push(new WeakRef(e)),os.length>20&&(os=os.slice(-20))),w.on("openchange",r),()=>{w.off("openchange",r);let e=rx(t),n=Y(),o=ry(y,e)||n.some(t=>t===e||ry(t,e))||O&&n$(O.nodesRef.current,S(),!1).some(t=>ry(t.context?.elements.floating,e)),i=function(){let e=M.current,t="function"==typeof e?e(z.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){let e=x||oc();return e&&e.isConnected?e:null}let r=x||oc();return rL(t)||r||null}();queueMicrotask(()=>{let r=function(e){if(!e)return null;let t=nW();return nP(e,t)?e:nT(e,t)[0]||e}(i),n="boolean"!=typeof M.current;M.current&&!N.current&&tQ(r)&&(n||r===e||e===t.body||o)&&r.focus({preventScroll:!0}),N.current=!1})}},[n,y,K,M,k,w,O,x,S,Y]),rj(()=>{if(!rc||v||!y)return;let e=rx(ro(y));tQ(e)&&rE(e)&&ry(y,e)&&e.blur()},[v,y]),rj(()=>{if(!n&&P)return P.setFocusManagerState({modal:s,closeOnFocusOut:a,open:v,onOpenChange:h.setOpen,domReference:x}),()=>{P.setFocusManagerState(null)}},[n,P,s,v,h,a,x]),rj(()=>{if(!n&&K)return ou(K,R),()=>{queueMicrotask(oa)}},[n,K,R]);let Z=!n&&(!s||!C)&&(q||s);return(0,g.jsxs)(b.Fragment,{children:[Z&&(0,g.jsx)(nz,{"data-type":"inside",ref:W,onFocus:e=>{if(s){let e=G();nY(e[e.length-1])}else if(P?.portalNode)if(N.current=!1,nU(e,P.portalNode)){let e=nB(x);e?.focus()}else rL(d??P.beforeOutsideRef)?.focus()}}),r,Z&&(0,g.jsx)(nz,{"data-type":"inside",ref:H,onFocus:e=>{if(s)nY(G()[0]);else if(P?.portalNode)if(a&&(N.current=!0),nU(e,P.portalNode)){let e=nF(x);e?.focus()}else rL(u??P.afterOutsideRef)?.focus()}})]})}let of=((a={}).nestedDialogs="--nested-dialogs",a),op=((c={})[c.open=rQ.open]="open",c[c.closed=rQ.closed]="closed",c[c.startingStyle=rQ.startingStyle]="startingStyle",c[c.endingStyle=rQ.endingStyle]="endingStyle",c.nested="data-nested",c.nestedDialogOpen="data-nested-dialog-open",c),om=b.createContext(void 0);function oh(){let e=b.useContext(om);if(void 0===e)throw Error(z(26));return e}let og="ArrowUp",ov="ArrowDown",ob="ArrowLeft",ox="ArrowRight";[...new Set([...new Set([ob,ox]),...new Set([og,ov])])];let oy=new Set([og,ov,ob,ox,"Home","End"]),ow={...r7,...rD,nestedDialogOpen:e=>e?{[op.nestedDialogOpen]:""}:null},ok=b.forwardRef(function(e,t){let{className:r,finalFocus:n,initialFocus:o,render:i,...l}=e,{store:s}=rJ(),a=s.useState("descriptionElementId"),c=s.useState("disablePointerDismissal"),u=s.useState("floatingRootContext"),d=s.useState("popupProps"),f=s.useState("modal"),p=s.useState("mounted"),m=s.useState("nested"),h=s.useState("nestedOpenDialogCount"),v=s.useState("open"),b=s.useState("openMethod"),x=s.useState("titleElementId"),y=s.useState("transitionStatus"),w=s.useState("role");oh(),r$({open:v,ref:s.context.popupRef,onComplete(){v&&s.context.onOpenChangeComplete?.(!0)}});let k=void 0===o?function(e){return"touch"!==e||s.context.popupRef.current}:o,S=K("div",e,{state:{open:v,nested:m,transitionStatus:y,nestedDialogOpen:h>0},props:[d,{"aria-labelledby":x??void 0,"aria-describedby":a??void 0,role:w,tabIndex:-1,hidden:!p,onKeyDown(e){oy.has(e.key)&&e.stopPropagation()},style:{[of.nestedDialogs]:h}},l],ref:[t,s.context.popupRef,s.useStateSetter("popupElement")],stateAttributesMapping:ow});return(0,g.jsx)(od,{context:u,openInteractionType:b,disabled:!p,closeOnFocusOut:!c,initialFocus:k,returnFocus:n,modal:!1!==f,restoreFocus:"popup",children:S})});function oS(e){return H>=19?e:e?"true":void 0}let oE=b.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,g.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:r}})}),oC=b.forwardRef(function(e,t){let{keepMounted:r=!1,...n}=e,{store:o}=rJ(),i=o.useState("mounted"),l=o.useState("modal"),s=o.useState("open");return i||r?(0,g.jsx)(om.Provider,{value:r,children:(0,g.jsxs)(or,{ref:t,...n,children:[i&&!0===l&&(0,g.jsx)(oE,{ref:o.context.internalBackdropRef,inert:oS(!s)}),e.children]})}):null});function oR(e){let t=b.useRef(!0);t.current&&(t.current=!1,e())}let oj={},oM={},oT="";class oO{lockCount=0;restore=null;timeoutLock=tW.create();timeoutUnlock=tW.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=ro(e).documentElement,s=tY(l).getComputedStyle(l).overflowY;if("hidden"===s||"clip"===s){this.restore=F;return}let a=ru||!function(e){if("u"<typeof document)return!1;let t=ro(e);return tY(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=a?(r=(t=ro(e)).documentElement,n=t.body,i={overflowY:(o=t1(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=ro(e),r=t.documentElement,n=t.body,o=tY(r),i=0,l=0,s=!1,a=rP.create();if(rc&&(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,oj={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},oT=r.style.scrollBehavior,oM={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),v=parseFloat(a.marginLeft)+parseFloat(a.marginRight),b=t1(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=ro(e),r=t.documentElement,n=t.body,o=t1(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,b.style.overflowY="hidden",b.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:v||m?`calc(100vw - ${v+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,oj),Object.assign(n.style,oM),s||(r.scrollTop=i,r.scrollLeft=l,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=oT)}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 oP=new oO;var rq=rq;let oN={intentional:"onClick",sloppy:"onPointerDown"};function oL(){return!1}function oA(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=oL,referencePressEvent:d="sloppy",bubbles:f,externalTree:p}=t,m=ol(p),h=tb("function"==typeof a?a:()=>!1),g="function"==typeof a?h:a,v=!1!==g,x=tb(()=>c),y=b.useRef(!1),w=b.useRef(!1),k=b.useRef(!1),{escapeKey:S,outsidePress:E}={escapeKey:"boolean"==typeof f?f:f?.escapeKey??!1,outsidePress:"boolean"==typeof f?f:f?.outsidePress??!0},C=b.useRef(null),R=tH(),j=tH(),M=tb(()=>{j.clear(),i.current.insideReactTree=!1}),T=b.useRef(!1),O=b.useRef(""),P=tb(u),N=tb(e=>{if(!n||!l||!s||"Escape"!==e.key||T.current)return;let t=i.current.floatingContext?.nodeId,o=m?n$(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=rU(rq.escapeKey,a);r.setOpen(!1,c),S||c.isPropagationAllowed||e.stopPropagation()}),L=tb(()=>{i.current.insideReactTree=!0,j.start(0,M)});b.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=E;let e=new tW,t=new tW;function a(){e.clear(),T.current=!0}function c(){e.start(5*!!t6(),()=>{T.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&&n$(m.nodesRef.current,t).some(t=>rS(e,t.context?.elements.floating));return rS(e,r.select("floatingElement"))||rS(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 M();let o=rk(e),l=`[${nK("inert")}]`,s=Array.from(ro(r.select("floatingElement")).querySelectorAll(l)),a=tJ(o)?o.getRootNode():null;t0(a)&&(s=s.concat(Array.from(a.querySelectorAll(l))));let c=r.context.triggerElements;if(o&&(c.hasElement(o)||c.hasMatchingElement(e=>ry(e,o))))return;let u=tJ(o)?o:null;for(;u&&!t8(u);){let e=rt(u);if(t8(e)||!tJ(e))break;u=e}if(s.length&&tJ(o)&&!o.matches("html,body")&&!ry(o,r.select("floatingElement"))&&s.every(e=>!ry(u,e)))return;if(tQ(o)&&!("touches"in e)){let t=t8(o),r=t9(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 g&&!g(e))return;let d=i.current.floatingContext?.nodeId,h=m?n$(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,rU(rq.outsidePress,e)),M()}function b(e){O.current="touch";let t=rk(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!r.select("open")||!l||rS(e,r.select("floatingElement"))||rS(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},R.start(1e3,()=>{C.current&&(C.current.dismissOnTouchEnd=!1,C.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,n)})}function j(e){if(R.clear(),"pointerdown"===e.type&&(O.current=e.pointerType),"mousedown"===e.type&&C.current&&!C.current.dismissOnMouseDown)return;let t=rk(e);t?.addEventListener(e.type,function n(){if("pointerdown"===e.type)"sloppy"!==f()||"touch"===e.pointerType||!r.select("open")||!l||rS(e,r.select("floatingElement"))||rS(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 g||g(e))&&(t.clear(),k.current=!0,M()))}}function L(e){let t=rk(e);t?.addEventListener(e.type,function n(){!function(e){if("sloppy"!==f()||!C.current||rS(e,r.select("floatingElement"))||rS(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),R.clear(),C.current=null)}(e),t?.removeEventListener(e.type,n)})}function A(e){let t=rk(e);t?.addEventListener(e.type,function n(){"sloppy"!==f()||!C.current||rS(e,r.select("floatingElement"))||rS(e,r.select("domReferenceElement"))||(C.current.dismissOnTouchEnd&&h(e),R.clear(),C.current=null),t?.removeEventListener(e.type,n)})}let I=ro(o);return s&&(I.addEventListener("keydown",N),I.addEventListener("compositionstart",a),I.addEventListener("compositionend",c)),v&&(I.addEventListener("click",j,!0),I.addEventListener("pointerdown",j,!0),I.addEventListener("pointerup",P,!0),I.addEventListener("pointercancel",P,!0),I.addEventListener("mousedown",j,!0),I.addEventListener("mouseup",P,!0),I.addEventListener("touchstart",b,!0),I.addEventListener("touchmove",L,!0),I.addEventListener("touchend",A,!0)),()=>{s&&(I.removeEventListener("keydown",N),I.removeEventListener("compositionstart",a),I.removeEventListener("compositionend",c)),v&&(I.removeEventListener("click",j,!0),I.removeEventListener("pointerdown",j,!0),I.removeEventListener("pointerup",P,!0),I.removeEventListener("pointercancel",P,!0),I.removeEventListener("mousedown",j,!0),I.removeEventListener("mouseup",P,!0),I.removeEventListener("touchstart",b,!0),I.removeEventListener("touchmove",L,!0),I.removeEventListener("touchend",A,!0)),e.clear(),t.clear(),d(),k.current=!1}},[i,o,s,v,g,n,l,S,E,N,M,x,m,r,R]),b.useEffect(M,[g,M]);let A=b.useMemo(()=>({onKeyDown:N,[oN[d]]:e=>{P()&&r.setOpen(!1,rU(rq.triggerPress,e.nativeEvent))},..."intentional"!==d&&{onClick(e){P()&&r.setOpen(!1,rU(rq.triggerPress,e.nativeEvent))}}}),[N,r,d,P]),I=tb(e=>{if(!n||!l||0!==e.button)return;let t=rk(e.nativeEvent);ry(r.select("floatingElement"),t)&&(y.current||(y.current=!0,w.current=!1))}),z=tb(e=>{!n||!l||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(w.current=!0)}),D=b.useMemo(()=>({onKeyDown:N,onPointerDown:z,onMouseDown:z,onClickCapture:L,onMouseDownCapture(e){L(),I(e)},onPointerDownCapture(e){L(),I(e)},onMouseUpCapture:L,onTouchEndCapture:L,onTouchMoveCapture:L}),[N,L,I,z]);return b.useMemo(()=>l?{reference:A,floating:D,trigger:A}:{},[l,A,D])}function oI(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=b.useCallback(t=>oz(t,e,"reference"),t),l=b.useCallback(t=>oz(t,e,"floating"),r),s=b.useCallback(t=>oz(t,e,"item"),n),a=b.useCallback(t=>oz(t,e,"trigger"),o);return b.useMemo(()=>({getReferenceProps:i,getFloatingProps:l,getItemProps:s,getTriggerProps:a}),[i,l,s,a])}function oz(e,t,r){let n=new Map,o="item"===r,i={};for(let t in"floating"===r&&(i.tabIndex=-1,i[rh]=""),e)o&&e&&(t===rg||t===rv)||(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)&&oD(i,s,o,n)}return oD(i,e,o,n),i}function oD(e,t,r,n){for(let o in t){let i=t[o];r&&(o===rg||o===rv)||(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 o_=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);var o$=Symbol("NOT_FOUND"),oV=e=>Array.isArray(e)?e:[e],oW=0,oH=class{revision=oW;_value;_lastValue;_isEqual=oB;constructor(e,t=oB){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++oW)}};function oB(e,t){return e===t}function oF(e){return e instanceof oH||console.warn("Not a valid cell! ",e),e.value}var oU=(e,t)=>!1;function oq(){return function(e=oB){return new oH(null,e)}(oU)}var oK=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=oq()),oF(t)};Symbol();var oX=0,oY=Object.getPrototypeOf({}),oG=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,oZ);tag=oq();tags={};children={};collectionTag=null;id=oX++},oZ={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in oY)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 oJ(o):new oG(o)),r.tag&&oF(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=oq()).value=n),oF(r),n}})(),ownKeys:e=>(oK(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},oJ=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],oQ);tag=oq();tags={};children={};collectionTag=null;id=oX++},oQ={get:([e],t)=>("length"===t&&oK(e),oZ.get(e,t)),ownKeys:([e])=>oZ.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>oZ.getOwnPropertyDescriptor(e,t),has:([e],t)=>oZ.has(e,t)},o0=(e,t)=>e===t,o1="u">typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function o2(){return{s:0,v:void 0,o:null,p:null}}function o5(e,t={}){let r,n=o2(),{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=o2(),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=o2(),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 o1(t):t}return a.s=1,a.v=t,t}return l.clearCache=()=>{n=o2(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function o3(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=o5,argsMemoizeOptions:d=[],devModeChecks:f={}}={...r,...l},p=oV(c),m=oV(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 o4=o3(o5),o7=Object.assign((e,t=o4)=>{!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:()=>o7});o3({memoize:function(e,t){let r,{equalityCheck:n=o0,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:o$,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 o$}return{get:n,put:function(t,o){n(t)===o$&&(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===o$){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 o6=(e,t,r,n,o,i,...l)=>{let s;if(l.length>0)throw Error(z(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 o8=e.i(2239),o9=e.i(30224);let ie=[];function it(e){let t=(t,n)=>{let o,i=_(ir).current;try{for(let e of(r=i,ie))e.before(i);for(let r of(o=e(t,n),ie))r.after(i);i.didInitialize=!0}finally{r=void 0}return o};return t.displayName=e.displayName||e.name,t}function ir(){return{didInitialize:!1}}let io=H>=19?function(e,t,n,o,i){let l,s=r;if(!s){let r;return r=b.useCallback(()=>t(e.getSnapshot(),n,o,i),[e,t,n,o,i]),(0,o8.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,o9.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,r,n,o))};ie.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,o8.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});class ii{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 io(this,e,t,r,n)}}class il extends ii{constructor(e,t={},r){super(e),this.context=t,this.selectors=r}useSyncedValue(e,t){b.useDebugValue(e),rj(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let r=this;rj(()=>(r.state[e]!==t&&r.set(e,t),()=>{r.set(e,void 0)}),[r,e,t])}useSyncedValues(e){let t=this;rj(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){b.useDebugValue(e);let r=void 0!==t;rj(()=>{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 b.useDebugValue(e),io(this,this.selectors[e],t,r,n)}useContextCallback(e,t){b.useDebugValue(e);let r=tb(t??F);this.context[e]=r}useStateSetter(e){let t=b.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 is={open:o6(e=>e.open),domReferenceElement:o6(e=>e.domReferenceElement),referenceElement:o6(e=>e.positionReference??e.referenceElement),floatingElement:o6(e=>e.floatingElement),floatingId:o6(e=>e.floatingId)};class ia extends il{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},is)}setOpen=(e,t)=>{if((!e||!this.state.open||n_(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 ic(e){let{popupStore:t,noEmit:r=!1,treatPopupAsFloatingElement:n=!1,onOpenChange:o}=e,i=tA(),l=null!=oi(),s=t.useState("open"),a=t.useState("activeTriggerElement"),c=t.useState(n?"popupElement":"positionerElement"),u=t.context.triggerElements,d=_(()=>new ia({open:s,referenceElement:a,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:i,nested:l,noEmit:r})).current;return rj(()=>{let e={open:s,floatingId:i,referenceElement:a,floatingElement:c};tJ(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 rq=rq;function iu(e,t,r,n){let o,i,l=r.useState("isMountedByTrigger",e),s=(o=b.useRef(null),i=b.useRef(null),b.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=tb(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 rj(()=>{l&&r.update({activeTriggerElement:t.current,...n})},[l,r,t,...Object.values(n)]),{registerTrigger:a,isMountedByThisTrigger:l}}function id(e){let t=e.useState("open");rj(()=>{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 ip(e,t,r){let{mounted:n,setMounted:o,transitionStatus:i}=rV(e);t.useSyncedValues({mounted:n,transitionStatus:i});let l=tb(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)});return r$({enabled:!t.useState("preventUnmountingOnClose"),open:e,ref:t.context.popupRef,onComplete(){e||l()}}),{forceUnmount:l,transitionStatus:i}}class im{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 ih(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new ia({open:!1,floatingElement:null,referenceElement:null,triggerElements:new im,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:q,inactiveTriggerProps:q,popupProps:q}}let ig=o6(e=>e.triggerIdProp??e.activeTriggerId),iv={open:o6(e=>e.openProp??e.open),mounted:o6(e=>e.mounted),transitionStatus:o6(e=>e.transitionStatus),floatingRootContext:o6(e=>e.floatingRootContext),preventUnmountingOnClose:o6(e=>e.preventUnmountingOnClose),payload:o6(e=>e.payload),activeTriggerId:ig,activeTriggerElement:o6(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:o6((e,t)=>void 0!==t&&ig(e)===t),isOpenedByTrigger:o6((e,t)=>void 0!==t&&ig(e)===t&&e.open),isMountedByTrigger:o6((e,t)=>void 0!==t&&ig(e)===t&&e.mounted),triggerProps:o6((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:o6(e=>e.popupProps),popupElement:o6(e=>e.popupElement),positionerElement:o6(e=>e.positionerElement)},ib={...iv,modal:o6(e=>e.modal),nested:o6(e=>e.nested),nestedOpenDialogCount:o6(e=>e.nestedOpenDialogCount),disablePointerDismissal:o6(e=>e.disablePointerDismissal),openMethod:o6(e=>e.openMethod),descriptionElementId:o6(e=>e.descriptionElementId),titleElementId:o6(e=>e.titleElementId),viewportElement:o6(e=>e.viewportElement),role:o6(e=>e.role)};class ix extends il{constructor(e){super(function(e={}){return{...ih(),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:b.createRef(),backdropRef:b.createRef(),internalBackdropRef:b.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new im,onOpenChange:void 0,onOpenChangeComplete:void 0},ib)}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 iy=((u={})[u.open=rQ.open]="open",u[u.closed=rQ.closed]="closed",u[u.startingStyle=rQ.startingStyle]="startingStyle",u[u.endingStyle=rQ.endingStyle]="endingStyle",u.nested="data-nested",u.nestedDialogOpen="data-nested-dialog-open",u),iw={...r7,...rD,nested:e=>e?{[iy.nested]:""}:null,nestedDialogOpen:e=>e?{[iy.nestedDialogOpen]:""}:null},ik=b.forwardRef(function(e,t){let{className:r,render:n,children:o,...i}=e,l=oh(),{store:s}=rJ(),a=s.useState("open"),c=s.useState("nested"),u=s.useState("transitionStatus"),d=s.useState("nestedOpenDialogCount"),f=s.useState("mounted");return K("div",e,{enabled:l||f,state:{open:a,nested:c,transitionStatus:u,nestedDialogOpen:d>0},ref:[t,s.useStateSetter("viewportElement")],stateAttributesMapping:iw,props:[{role:"presentation",hidden:!f,style:{pointerEvents:a?void 0:"none"},children:o},i]})}),iS=b.forwardRef(function(e,t){let{render:r,className:n,id:o,...i}=e,{store:l}=rJ(),s=tI(o);return l.useSyncedValueWithCleanup("titleElementId",s),K("h2",e,{ref:t,props:[{id:s},i]})});var rq=rq;let iE=b.forwardRef(function(e,t){let{render:r,className:n,disabled:o=!1,nativeButton:i=!0,id:l,payload:s,handle:a,...c}=e,u=rJ(!0),d=a?.store??u?.store;if(!d)throw Error(z(79));let f=tI(l),p=d.useState("floatingRootContext"),m=d.useState("isOpenedByTrigger",f),h=b.useRef(null),{registerTrigger:g,isMountedByThisTrigger:v}=iu(f,h,d,{payload:s}),{getButtonProps:x,buttonRef:y}=nt({disabled:o,native:i}),w=oI([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=rq.triggerPress}=t,d=b.useRef(void 0),f=rN(),p=tH(),m=b.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||nD(t,!0)&&s)return;let h=n.current.openEvent,g=h?.type,v=r.select("domReferenceElement")!==e.currentTarget,b=m&&v||!(m&&l&&(!h||!a||"click"===g||"mousedown"===g));if(rE(o.target)){let e=rU(u,o,o.target);b&&"touch"===t&&c>0?p.start(c,()=>{r.setOpen(!0,e)}):r.setOpen(b,e);return}let x=e.currentTarget;f.request(()=>{let e=rU(u,o,x);b&&"touch"===t&&c>0?p.start(c,()=>{r.setOpen(!0,e)}):r.setOpen(b,e)})},onClick(e){if("mousedown-only"===i)return;let t=d.current;if("mousedown"===i&&t){d.current=void 0;return}if(nD(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||n_(f))),g=rU(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 b.useMemo(()=>o?{reference:m}:q,[o,m])}(p,{enabled:null!=p})]),k=d.useState("triggerProps",v);return K("button",e,{state:{disabled:o,open:m},ref:[y,t,g,h],props:[w.getReferenceProps(),k,{[n7]:"",id:f},c,x],stateAttributesMapping:r4})});var rq=rq;class iC{constructor(e){this.store=e??new ix}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,rU(rq.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,rU(rq.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,rU(rq.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Backdrop",0,r8,"Close",0,nn,"Description",0,no,"Handle",0,iC,"Popup",0,ok,"Portal",0,oC,"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=rJ(!0),p=!!f,m=_(()=>c?.store??new ix({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:l,nested:p})).current;oR(()=>{void 0===r&&!1===m.state.open&&!0===n&&m.update({open:!0,activeTriggerId:d})}),m.useControlledProp("openProp",r),m.useControlledProp("triggerIdProp",u),m.useSyncedValues({disablePointerDismissal:l,nested:p,modal:s}),m.useContextCallback("onOpenChange",o),m.useContextCallback("onOpenChangeComplete",i);let h=m.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]=b.useState(null),s=tb((t,r)=>{e||l(r||(ru?"touch":""))});t=b.useRef(e),rj(()=>{t.current!==e&&r(t.current)},[e,r=tb(t=>{t&&!e&&l(null)})]),rj(()=>{t.current=e},[e]);let{onClick:a,onPointerDown:c}=(n=b.useRef(""),o=b.useCallback(e=>{e.defaultPrevented||(n.current=e.pointerType,s(e,e.pointerType))},[s]),{onClick:b.useCallback(e=>{0===e.detail?s(e,"keyboard"):(s(e,"pointerType"in e?e.pointerType:n.current),n.current="")},[s]),onPointerDown:o});return b.useMemo(()=>({openMethod:i,triggerProps:{onClick:a,onPointerDown:c}}),[i,a,c])}(o);id(t);let{forceUnmount:u}=ip(o,t),d=tb(e=>{let r=rU(e);return r.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},r}),f=b.useCallback(()=>{t.setOpen(!1,d(rq.imperativeAction))},[t,d]);b.useImperativeHandle(n,()=>({unmount:u,close:f}),[u,f]);let p=ic({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,h]=b.useState(0),g=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=tA(),c=i?.id||a,u=b.useMemo(()=>rR(l)?.id||o,[l,o]),d=o_.get(s)??s,f=null!=oi(),p=b.useMemo(()=>"tooltip"===d||"label"===s?q:{"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=b.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=b.useMemo(()=>{let e={id:u,...d&&{role:d}};return"tooltip"===d||"label"===s?e:{...e,..."menu"===d&&{"aria-labelledby":c}}},[d,u,c,s]),g=b.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 b.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}(p),x=oA(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=rk(e);return!!g&&!i&&(!l||!t.context.internalBackdropRef.current&&!t.context.backdropRef.current||t.context.internalBackdropRef.current===r||t.context.backdropRef.current===r||ry(r,s)&&!r?.hasAttribute("data-base-ui-portal"))},escapeKey:g});!function(e=!0,t=null){rj(()=>{if(e)return oP.acquire(t)},[e,t])}(o&&!0===l,s);let{getReferenceProps:y,getFloatingProps:w,getTriggerProps:k}=oI([v,x]);t.useContextCallback("onNestedDialogOpen",e=>{h(e+1)}),t.useContextCallback("onNestedDialogClose",()=>{h(0)}),b.useEffect(()=>(r?.onNestedDialogOpen&&o&&r.onNestedDialogOpen(m),r?.onNestedDialogClose&&!o&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&o&&r.onNestedDialogClose()}),[o,r,m]);let S=b.useMemo(()=>y(c),[y,c]),E=b.useMemo(()=>k(c),[k,c]),C=b.useMemo(()=>w(),[w]);t.useSyncedValues({openMethod:a,activeTriggerProps:S,inactiveTriggerProps:E,popupProps:C,floatingRootContext:p,nestedOpenDialogCount:m})}({store:m,actionsRef:a,parentContext:f?.store.context,onOpenChange:o,triggerIdProp:u});let v=b.useMemo(()=>({store:m}),[m]);return(0,g.jsx)(rZ.Provider,{value:v,children:"function"==typeof t?t({payload:h}):t})},"Title",0,iS,"Trigger",0,iE,"Viewport",0,ik,"createHandle",0,function(){return new iC}],87913);var iR=e.i(87913),iR=iR;let ij=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),iM=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 iT={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 iO=(0,b.createContext)({}),iP=(0,b.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,b.useContext)(iO)??{},m=n??d?24*Number(r??u)/Number(t??c):r??u;return(0,b.createElement)("svg",{ref:a,...iT,width:t??c??iT.width,height:t??c??iT.height,stroke:e??f,strokeWidth:m,className:ij("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,b.createElement)(e,t)),...Array.isArray(i)?i:[i]])}),iN=(d=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],(n=(0,b.forwardRef)(({className:e,...t},r)=>(0,b.createElement)(iP,{ref:r,iconNode:d,className:ij(`lucide-${iM("x").replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,"lucide-x",e),...t}))).displayName=iM("x"),n),iL=e=>{let t,r,n=(0,v.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(r=(0,g.jsx)(iR.Root,{"data-slot":"sheet",...t}),n[2]=t,n[3]=r):r=n[3],r},iA=e=>{let t,r,n=(0,v.c)(4);return n[0]!==e?({...t}=e,n[0]=e,n[1]=t):t=n[1],n[2]!==t?(r=(0,g.jsx)(iR.Portal,{"data-slot":"sheet-portal",...t}),n[2]=t,n[3]=r):r=n[3],r},iI=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.jsx)(iR.Backdrop,{"data-slot":"sheet-overlay",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},iz=e=>{let t,r,n,o,i,l,s,a,c,u=(0,v.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,g.jsx)(iI,{}),u[6]=l):l=u[6],u[7]!==r?(s=((...e)=>e8(G(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,g.jsxs)(iR.Close,{"data-slot":"sheet-close",render:(0,g.jsx)(te,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,g.jsx)(iN,{}),(0,g.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,g.jsxs)(iA,{children:[l,(0,g.jsxs)(iR.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},iD=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.jsx)("div",{"data-slot":"sheet-header",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},i_=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.jsx)(iR.Title,{"data-slot":"sheet-title",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},i$=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(e)))("text-sm text-muted-foreground",t),i[3]=t,i[4]=n):n=i[4],i[5]!==r||i[6]!==n?(o=(0,g.jsx)(iR.Description,{"data-slot":"sheet-description",className:n,...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o};e.s([],13136),e.i(13136);let iV=b.createContext(void 0);function iW(e){let t=b.useContext(iV);if(void 0===t&&!e)throw Error(z(72));return t}function iH(e){return null!=e&&null!=e.clientX}var rq=rq;let iB={...iv,disabled:o6(e=>e.disabled),instantType:o6(e=>e.instantType),isInstantPhase:o6(e=>e.isInstantPhase),trackCursorAxis:o6(e=>e.trackCursorAxis),disableHoverablePopup:o6(e=>e.disableHoverablePopup),lastOpenChangeReason:o6(e=>e.openChangeReason),closeOnClick:o6(e=>e.closeOnClick),closeDelay:o6(e=>e.closeDelay),hasViewport:o6(e=>e.hasViewport)};class iF extends il{constructor(e){super({...ih(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:b.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new im},iB)}setOpen=(e,t)=>{let r=t.reason,n=r===rq.triggerHover,o=e&&r===rq.triggerFocus,i=!e&&(r===rq.triggerPress||r===rq.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===rq.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?rT.flushSync(l):l()};static useStore(e,t){let r=_(()=>new iF(t)).current,n=e??r,o=ic({popupStore:n,onOpenChange:n.setOpen});return n.state.floatingRootContext=o,n}}var rq=rq;let iU=it(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=iF.useStore(c?.store,{open:r,openProp:n,activeTriggerId:d,triggerIdProp:u});oR(()=>{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 m=p.useState("open"),h=!t&&m,v=p.useState("activeTriggerId"),x=p.useState("payload");p.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:o}),rj(()=>{m&&t&&p.setOpen(!1,rU(rq.disabled))},[m,t,p]),p.useSyncedValue("disabled",t),id(p);let{forceUnmount:y,transitionStatus:w}=ip(h,p),k=p.useState("isInstantPhase"),S=p.useState("instantType"),E=p.useState("lastOpenChangeReason"),C=b.useRef(null);rj(()=>{"ending"===w&&E===rq.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]),rj(()=>{h&&null==v&&p.set("payload",void 0)},[p,v,h]);let R=b.useCallback(()=>{var e;let t;p.setOpen(!1,(e=p,(t=rU(rq.imperativeAction)).preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},t))},[p]);b.useImperativeHandle(l,()=>({unmount:y,close:R}),[y,R]);let j=p.useState("floatingRootContext"),{getReferenceProps:M,getFloatingProps:T,getTriggerProps:O}=oI([oA(j,{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=b.useRef(!1),u=b.useRef(null),[d,f]=b.useState(),[p,m]=b.useState([]),h=tb((e,t,n)=>{if(!c.current&&(!l.current.openEvent||iH(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}}}))}}),g=tb(e=>{n?u.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),v=nD(d)?o:n,x=b.useCallback(()=>{if(!v||!s)return;let e=tY(o);function t(r){ry(o,rk(r))?(e.removeEventListener("mousemove",t),u.current=null):h(r.clientX,r.clientY)}if(!l.current.openEvent||iH(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]);b.useEffect(()=>x(),[x,p]),b.useEffect(()=>{s&&!o&&(c.current=!1)},[s,o]),b.useEffect(()=>{!s&&n&&(c.current=!0)},[s,n]);let y=b.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return b.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}(j,{enabled:!t&&"none"!==i,axis:"none"===i?void 0:i})]),P=b.useMemo(()=>M(),[M]),N=b.useMemo(()=>O(),[O]),L=b.useMemo(()=>T(),[T]);return p.useSyncedValues({activeTriggerProps:P,inactiveTriggerProps:N,popupProps:L}),(0,g.jsx)(iV.Provider,{value:p,children:"function"==typeof f?f({payload:x}):f})}),iq=b.createContext(void 0),iK=.1*.1;function iX(e,t,r,n,o,i){return n>=t!=i>=t&&e<=(o-r)*(t-n)/(i-n)+r}function iY(e,t,r,n,o,i,l,s,a,c){let u=!1;return iX(e,t,r,n,o,i)&&(u=!u),iX(e,t,o,i,l,s)&&(u=!u),iX(e,t,l,s,a,c)&&(u=!u),iX(e,t,a,c,r,n)&&(u=!u),u}function iG(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 iZ(e,t,r){let n=null==r||nD(r)?"function"==typeof e?e():e:0;return"number"==typeof n?n:n?.[t]}function iJ(e){return"function"==typeof e?e():e}function iQ(e,t){return t||"click"===e||"mousedown"===e}var rq=rq;let i0=b.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new tW,currentIdRef:{current:null},currentContextRef:{current:null}});function i1(e){let{children:t,delay:r,timeoutMs:n=0}=e,o=b.useRef(r),i=b.useRef(r),l=b.useRef(null),s=b.useRef(null),a=tH();return(0,g.jsx)(i0.Provider,{value:b.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:i,currentIdRef:l,timeoutMs:n,currentContextRef:s,timeout:a}),[n,a]),children:t})}var rq=rq;let i2=rp&&rd;var rq=rq;let i5=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${rb}`;class i3{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 tW,this.restTimeout=new tW,this.handleCloseOptions=void 0}static create(){return new i3}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function i4(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 i7(e){let t=_(i3.create).current,r=e.context.dataRef.current;return r.hoverInteractionState||(r.hoverInteractionState=t),tV(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}let i6={current:null},i8=((f={})[f.popupOpen=r0.popupOpen]="popupOpen",f.triggerDisabled="data-trigger-disabled",f),i9=(p=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=iW(!0),p=o?.store??f;if(!p)throw Error(z(82));let m=tI(u),h=p.useState("isTriggerActive",m),g=p.useState("isOpenedByTrigger",m),v=p.useState("floatingRootContext"),x=b.useRef(null),y=s??600,w=c??0,{registerTrigger:k,isMountedByThisTrigger:S}=iu(m,x,p,{payload:i,closeOnClick:a,closeDelay:w}),E=b.useContext(iq),{delayRef:C,isInstantPhase:R,hasProvider:j}=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}=b.useContext(i0),[f,p]=b.useState(!1);return rj(()=>{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]),rj(()=>{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:iZ(a.current,"close")},null!==t&&t!==n?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,rU(rq.none))):(p(!1),e?.setIsInstantPhase(!1))},[o,n,r,i,l,s,a,c,d]),rj(()=>()=>{c.current=null},[c]),b.useMemo(()=>({hasProvider:u,delayRef:l,isInstantPhase:f}),[u,l,f])}(v,{open:g});p.useSyncedValue("isInstantPhase",R);let M=p.useState("disabled"),T=l??M,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=i6,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m}=t,h=ol(f),g=i7(r),v=nN(s),x=nN(l),y=nN(c),w=nN(i);p&&(g.handleCloseOptions=v.current?.__options);let k=tb(()=>iQ(n.current.openEvent?.type,g.interactedInside)),S=tb(e=>rw(e,r.context.triggerElements)),E=tb((e,t,n)=>{let o=r.context.triggerElements;return o.hasElement(t)?!e||!ry(e,t):!!tJ(n)&&o.hasMatchingElement(e=>ry(e,n))&&(!e||!ry(e,n))}),C=b.useCallback((e,t=!0)=>{let n=iZ(x.current,"close",g.pointerType);n?g.openChangeTimeout.start(n,()=>{r.setOpen(!1,rU(rq.triggerHover,e)),h?.events.emit("floating.closed",e)}):t&&(g.openChangeTimeout.clear(),r.setOpen(!1,rU(rq.triggerHover,e)),h?.events.emit("floating.closed",e))},[x,r,g,h]),R=tb(()=>{g.handler&&(ro(r.select("domReferenceElement")).removeEventListener("mousemove",g.handler),g.handler=void 0)});b.useEffect(()=>R,[R]);let j=tb(()=>{i4(g)});return b.useEffect(()=>{if(i)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open||(R(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}},[i,o,g,R]),b.useEffect(()=>{if(!i)return;let e=d.current??(p?r.select("domReferenceElement"):null);if(tJ(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(g.openChangeTimeout.clear(),g.blockMouseMove=!1,a&&!nD(g.pointerType)||iJ(y.current)>0&&!iZ(x.current,"open"))return;let t=iZ(x.current,"open",g.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,rU(rq.triggerHover,e,n)):t?g.openChangeTimeout.start(t,()=>{s&&r.setOpen(!0,rU(rq.triggerHover,e,n))}):s&&r.setOpen(!0,rU(rq.triggerHover,e,n))}function o(e){if(k())return void j();R();let t=ro(r.select("domReferenceElement"));g.restTimeout.clear(),g.restTimeoutPending=!1;let o=n.current.floatingContext??m?.();if(!S(e.relatedTarget)){if(v.current&&o){r.select("open")||g.openChangeTimeout.clear();let n=d.current;g.handler=v.current({...o,tree:h,x:e.clientX,y:e.clientY,onClose(){j(),R(),w.current&&!k()&&n===r.select("domReferenceElement")&&C(e,!0)}}),t.addEventListener("mousemove",g.handler),g.handler(e);return}"touch"===g.pointerType&&ry(r.select("floatingElement"),e.relatedTarget)||C(e)}}},[R,j,n,x,C,r,i,v,g,p,E,k,S,a,u,y,d,h,w,m]),b.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&&!nD(g.pointerType))return;let s=iJ(y.current);function c(){if(g.restTimeoutPending=!1,k())return;let e=r.select("open");g.blockMouseMove||e&&!l||r.setOpen(!0,rU(rq.triggerHover,t,n))}(!i||l)&&0!==s&&(!l&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(g.restTimeout.clear(),"touch"===g.pointerType?rT.flushSync(()=>{c()}):l&&i?c():(g.restTimeoutPending=!0,g.restTimeout.start(s,c))))}};function e(e){g.pointerType=e.pointerType}},[i,g,k,E,a,r,y])}(v,{enabled:!T,mouseOnly:!0,move:!1,handleClose:p.useState("disableHoverablePopup")||"both"===O?null:function(e={}){let{blockPointerEvents:t=!1}=e,r=new tW,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,v=rk(n),b="mouseleave"===n.type,x=ry(m,v),y=ry(p,v);if(x&&(c=!0,!b))return;if(y&&(c=!1,!b)){c=!0;return}if(b&&tJ(n.relatedTarget)&&ry(m,n.relatedTarget))return;function w(){return!!(s&&n$(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,R=t>E.bottom-E.height/2,j=E.width>S.width,M=E.height>S.height,T=(j?S:E).left,O=(j?S:E).right,P=(M?S:E).top,N=(M?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=iG(h,g,T,S.top+1,O,E.bottom-1);break;case"bottom":L=iG(h,g,T,E.top+1,O,S.bottom-1);break;case"left":L=iG(h,g,E.right-1,N,S.left+1,P);break;case"right":L=iG(h,g,S.right-1,N,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))||!b&&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*iK}(h,g))return void k();let A=!1;switch(a){case"top":{let r=j?.25:2,n=t+.5+1,o=C||j?E.bottom-.5:E.top,i=C?j?E.bottom-.5:E.top:E.bottom-.5;A=iY(h,g,j||C?e+r:e-r,n,j?e-r:C?e+r:e-r,n,E.left,o,E.right,i);break}case"bottom":{let r=j?.25:2,n=t-.5,o=C||j?E.top+.5:E.bottom,i=C?j?E.top+.5:E.bottom:E.top+.5;A=iY(h,g,j||C?e+r:e-r,n,j?e-r:C?e+r:e-r,n,E.left,o,E.right,i);break}case"left":{let r=M?.25:2,n=e+.5+1,o=R||M?E.right-.5:E.left,i=R?M?E.right-.5:E.left:E.right-.5;A=iY(h,g,o,E.top,i,E.bottom,n,M||R?t+r:t-r,n,M?t-r:R?t+r:t-r);break}case"right":{let r=M?.25:2,n=e-.5,o=R||M?E.left+.5:E.right,i=R?M?E.left+.5:E.right:E.left+.5;A=iY(h,g,n,M||R?t+r:t-r,n,M?t-r:R?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 j&&(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&&j&&(t=e),{close:t}},triggerElementRef:x,isActiveTrigger:h});return K("button",e,{state:{open:g},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=b.useRef(!1),a=b.useRef(null),c=tH(),u=b.useRef(!0);b.useEffect(()=>{let e=r.select("domReferenceElement");if(!i)return;let t=tY(e);function n(){let e=r.select("domReferenceElement");!r.select("open")&&tQ(e)&&e===rx(ro(e))&&(s.current=!0)}function o(){u.current=!0}function l(){u.current=!1}return t.addEventListener("blur",n),i2&&(t.addEventListener("keydown",o,!0),t.addEventListener("pointerdown",l,!0)),()=>{t.removeEventListener("blur",n),i2&&(t.removeEventListener("keydown",o,!0),t.removeEventListener("pointerdown",l,!0))}},[r,i]),b.useEffect(()=>{if(i)return n.on("openchange",e),()=>{n.off("openchange",e)};function e(e){if(e.reason===rq.triggerPress||e.reason===rq.escapeKey){let e=r.select("domReferenceElement");tJ(e)&&(a.current=e,s.current=!0)}}},[n,i,r]);let d=b.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=rk(e.nativeEvent);if(tJ(n)){if(i2&&!e.relatedTarget){if(!u.current&&!rE(n))return}else if(!function(e){if(!e||rm)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(n))return}let o=rw(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,rU(rq.triggerFocus,i,d)):c.start(f,()=>{s.current||r.setOpen(!0,rU(rq.triggerFocus,i,d))})},onBlur(e){s.current=!1,a.current=null;let t=e.relatedTarget,n=e.nativeEvent,i=tJ(t)&&t.hasAttribute(nK("focus-guard"))&&"outside"===t.getAttribute("data-type");c.start(0,()=>{let e=r.select("domReferenceElement"),l=rx(e?e.ownerDocument:document);!t&&l===e||ry(o.current.floatingContext?.refs.floating.current,l)||ry(e,l)||i||rw(t??l,r.context.triggerElements)||r.setOpen(!1,rU(rq.triggerFocus,n))})}}),[o,r,c,l]);return b.useMemo(()=>i?{reference:d,trigger:d}:{},[i,d])}(v,{enabled:!T}).reference,p.useState("triggerProps",S),{onPointerDown(){p.set("closeOnClick",a)},id:m,[i8.triggerDisabled]:T?"":void 0},d],stateAttributesMapping:r4})},b.forwardRef(it(p))),le=b.createContext(void 0),lt=b.forwardRef(function(e,t){let{children:r,container:n,className:o,render:i,...l}=e,{portalNode:s,portalSubtree:a}=ot({container:n,ref:t,componentProps:e,elementProps:l});return a||s?(0,g.jsxs)(b.Fragment,{children:[a,s&&rT.createPortal(r,s)]}):null}),lr=b.forwardRef(function(e,t){let{keepMounted:r=!1,...n}=e;return iW().useState("mounted")||r?(0,g.jsx)(le.Provider,{value:r,children:(0,g.jsx)(lt,{ref:t,...n})}):null}),ln=b.createContext(void 0);function lo(){let e=b.useContext(ln);if(void 0===e)throw Error(z(71));return e}let li=["top","right","bottom","left"],ll=Math.min,ls=Math.max,la=Math.round,lc=Math.floor,lu=e=>({x:e,y:e}),ld={left:"right",right:"left",bottom:"top",top:"bottom"};function lf(e,t){return"function"==typeof e?e(t):e}function lp(e){return e.split("-")[0]}function lm(e){return e.split("-")[1]}function lh(e){return"x"===e?"y":"x"}function lg(e){return"y"===e?"height":"width"}function lv(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function lb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let lx=["left","right"],ly=["right","left"],lw=["top","bottom"],lk=["bottom","top"];function lS(e){let t=lp(e);return ld[t]+e.slice(t.length)}function lE(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function lC(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 lR(e,t,r){let n,{reference:o,floating:i}=e,l=lv(t),s=lh(lv(t)),a=lg(s),c=lp(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(lm(t)){case"start":n[s]-=p*(r&&u?-1:1);break;case"end":n[s]+=p*(r&&u?-1:1)}return n}async function lj(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}=lf(t,e),m=lE(p),h=s[f?"floating"===d?"reference":"floating":d],g=lC(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})),v="floating"===d?{x:n,y:o,width:l.floating.width,height:l.floating.height}:l.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),x=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},y=lC(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:a}):v);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 lM=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l}=r,s=l.detectOverflow?l:{...l,detectOverflow:lj},a=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=lR(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:v}=h,{x:b,y:x,data:y,reset:w}=await v({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=b?b: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}=lR(c,f,a)),r=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}};function lT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lO(e){return li.some(t=>e[t]>=0)}let lP=new Set(["left","top"]);async function lN(e,t){let{placement:r,platform:n,elements:o}=e,i=await (null==n.isRTL?void 0:n.isRTL(o.floating)),l=lp(r),s=lm(r),a="y"===lv(r),c=lP.has(l)?-1:1,u=i&&a?-1:1,d=lf(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 lL(e){let t=t9(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=tQ(e),i=o?e.offsetWidth:r,l=o?e.offsetHeight:n,s=la(r)!==i||la(n)!==l;return s&&(r=i,n=l),{width:r,height:n,$:s}}function lA(e){return tJ(e)?e:e.contextElement}function lI(e){let t=lA(e);if(!tQ(t))return lu(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=lL(t),l=(i?la(r.width):r.width)/n,s=(i?la(r.height):r.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}let lz=lu(0);function lD(e){let t=tY(e);return t6()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lz}function l_(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),l=lA(e),s=lu(1);t&&(n?tJ(n)&&(s=lI(n)):s=lI(e));let a=(void 0===(o=r)&&(o=!1),n&&(!o||n===tY(l))&&o)?lD(l):lu(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=tY(l),t=n&&tJ(n)?tY(n):n,r=e,o=rn(r);for(;o&&n&&t!==r;){let e=lI(o),t=o.getBoundingClientRect(),n=t9(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=rn(r=tY(o))}}return lC({width:d,height:f,x:c,y:u})}function l$(e,t){let r=re(e).scrollLeft;return t?t.left+r:l_(tG(e)).left+r}function lV(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-l$(e,r),y:r.top+t.scrollTop}}function lW(e,t,r){var n;let o;if("viewport"===t)o=function(e,t){let r=tY(e),n=tG(e),o=r.visualViewport,i=n.clientWidth,l=n.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;let e=t6();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,a=o.offsetTop)}let c=l$(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=tG(e),t=tG(n),r=re(n),i=n.ownerDocument.body,l=ls(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=ls(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),a=-r.scrollLeft+l$(n),c=-r.scrollTop,"rtl"===t9(i).direction&&(a+=ls(t.clientWidth,i.clientWidth)-l),o={width:l,height:s,x:a,y:c}}else if(tJ(t)){let e,n,i,l,s,a;n=(e=l_(t,!0,"fixed"===r)).top+t.clientTop,i=e.left+t.clientLeft,l=tQ(t)?lI(t):lu(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=lD(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return lC(o)}function lH(e){return"static"===t9(e).position}function lB(e,t){if(!tQ(e)||"fixed"===t9(e).position)return null;if(t)return t(e);let r=e.offsetParent;return tG(e)===r&&(r=r.ownerDocument.body),r}function lF(e,t){var r;let n=tY(e);if(t2(e))return n;if(!tQ(e)){let t=rt(e);for(;t&&!t8(t);){if(tJ(t)&&!lH(t))return t;t=rt(t)}return n}let o=lB(e,t);for(;o&&(r=o,/^(table|td|th)$/.test(tX(r)))&&lH(o);)o=lB(o,t);return o&&t8(o)&&lH(o)&&!t7(o)?n:o||function(e){let t=rt(e);for(;tQ(t)&&!t8(t);){if(t7(t))return t;if(t2(t))break;t=rt(t)}return null}(e)||n}let lU=async function(e){let t=this.getOffsetParent||lF,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=tQ(t),o=tG(t),i="fixed"===r,l=l_(e,!0,i,t),s={scrollLeft:0,scrollTop:0},a=lu(0);if(n||!n&&!i)if(("body"!==tX(t)||t1(o))&&(s=re(t)),n){let e=l_(t,!0,i,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=l$(o));i&&!n&&o&&(a.x=l$(o));let c=!o||n||i?lu(0):lV(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}}},lq={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i="fixed"===o,l=tG(n),s=!!t&&t2(t.floating);if(n===l||s&&i)return r;let a={scrollLeft:0,scrollTop:0},c=lu(1),u=lu(0),d=tQ(n);if((d||!d&&!i)&&(("body"!==tX(n)||t1(l))&&(a=re(n)),d)){let e=l_(n);c=lI(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}let f=!l||d||i?lu(0):lV(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:tG,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[..."clippingAncestors"===r?t2(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=rr(e,[],!1).filter(e=>tJ(e)&&"body"!==tX(e)),o=null,i="fixed"===t9(e).position,l=i?rt(e):e;for(;tJ(l)&&!t8(l);){let t=t9(l),r=t7(l);r||"fixed"!==t.position||(o=null),(i?r||o:!(!r&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||t1(l)&&!r&&function e(t,r){let n=rt(t);return!(n===r||!tJ(n)||t8(n))&&("fixed"===t9(n).position||e(n,r))}(e,l)))?o=t:n=n.filter(e=>e!==l),l=rt(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=lW(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=lW(t,i[e],o);s=ls(r.top,s),a=ll(r.right,a),c=ll(r.bottom,c),u=ls(r.left,u)}return{width:a-u,height:c-s,x:u,y:s}},getOffsetParent:lF,getElementRects:lU,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=lL(e);return{width:t,height:r}},getScale:lI,isElement:tJ,isRTL:function(e){return"rtl"===t9(e).direction}};function lK(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function lX(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=lA(e),d=i||l?[...u?rr(u):[],...t?rr(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=tG(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:-lc(d)+"px "+-lc(o.clientWidth-(u+f))+"px "+-lc(o.clientHeight-(d+p))+"px "+-lc(u)+"px",threshold:ls(0,ll(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||lK(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?l_(e):null;return c&&function t(){let n=l_(e);h&&!lK(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 lY="u">typeof document?b.useLayoutEffect:function(){};function lG(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(!lG(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)&&!lG(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function lZ(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lJ(e,t){let r=lZ(e);return Math.round(t*r)/r}function lQ(e){let t=b.useRef(e);return lY(()=>{t.current=e}),t}let l0=b.createContext(void 0);function l1(){let e=b.useContext(l0);return e?.direction??"ltr"}let l2={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}=lf(n,e);switch(o){case"referenceHidden":{let n=lT(await r.detectOverflow(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:lO(n)}}}case"escaped":{let n=lT(await r.detectOverflow(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:lO(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}}}},l5={sideX:"left",sideY:"top"},l3={name:"adaptiveOrigin",async fn(e){let{x:t,y:r,rects:{floating:n},elements:{floating:o},platform:i,strategy:l,placement:s}=e,a=tY(o),c=a.getComputedStyle(o);if("0s"===c.transitionDuration||""===c.transitionDuration)return{x:t,y:r,data:l5};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=ro(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await i.isElement?.(u)&&(d=await i.getDimensions(u));let f=lp(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":l5.sideX,sideY:"top"===f?"bottom":l5.sideY}}}};function l4(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 l7(e,t,r){let{rects:n,placement:o}=e;return{side:l4(t,lp(o),r),align:lm(o)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function l6(e){return null!=e&&"current"in e}function l8(e){return"starting"===e?n4:q}let l9=b.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:m=!1,collisionAvoidance:h=n6,...v}=e,x=iW(),y=function(){let e=b.useContext(le);if(void 0===e)throw Error(z(70));return e}(),w=x.useState("open"),k=x.useState("mounted"),S=x.useState("trackCursorAxis"),E=x.useState("disableHoverablePopup"),C=x.useState("floatingRootContext"),R=x.useState("instantType"),j=x.useState("transitionStatus"),M=function(e){var t,r,n,o,i,l,s,a,c,u,d,f,p,m;let h,g,v,x,{anchor:y,positionMethod:w="absolute",side:k="bottom",sideOffset:S=0,align:E="center",alignOffset:C=0,collisionBoundary:R,collisionPadding:j=5,sticky:M=!1,arrowPadding:T=5,disableAnchorTracking:O=!1,keepMounted:P=!1,floatingRootContext:N,mounted:L,collisionAvoidance:A,shiftCrossAxis:I=!1,nodeId:z,adaptiveOrigin:D,lazyFlip:$=!1,externalTree:V}=e,[W,H]=b.useState(null);L||null===W||H(null);let B=A.side||"flip",F=A.align||"flip",U=A.fallbackAxisSide||"end",q="function"==typeof y?y:void 0,K=tb(q),X=q?K:y,Y=nN(y),G="rtl"===l1(),Z=W||({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=j,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"===R?"clippingAncestors":R,padding:Q},ei=b.useRef(null),el=nN(S),es=nN(C),ea=[(t=e=>{let t=l7(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 lN(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"===F&&"shift"!==B,eu=!ec&&(M||I||"shift"===B),ed="none"===B?null:{name:(g={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"===B,crossAxis:"flip"===F&&"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:v,elements:b}=e,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...C}=lf(l,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let R=lp(p),j=lv(g),M=lp(g)===g,T=await (null==v.isRTL?void 0:v.isRTL(b.floating)),O=w||(M||!E?[lS(g)]:(u=lS(g),[lb(g),u,lb(u)])),P="none"!==S;!w&&P&&O.push(...(d=lm(g),f=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?ly:lx;return t?lx:ly;case"left":case"right":return t?lw:lk;default:return[]}}(lp(g),"start"===S,T),d&&(f=f.map(e=>e+"-"+d),E&&(f=f.concat(f.map(lb)))),f));let N=[g,...O],L=await v.detectOverflow(e,C),A=[],I=(null==(r=m.flip)?void 0:r.overflows)||[];if(x&&A.push(L[R]),y){let e,t,r,n,o=(s=p,a=h,void 0===(c=T)&&(c=!1),e=lm(s),r=lg(t=lh(lv(s))),n="x"===t?e===(c?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[r]>a.floating[r]&&(n=lS(n)),[n,lS(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=N[e];if(t&&("alignment"!==y||j===lv(t)||I.every(e=>lv(e.placement)!==j||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=lv(e.placement);return t===j||"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:g.fn,options:[o,i]},ef=ec?null:(s=e=>{var t,r,n;let o=ro(e.elements.floating).documentElement;return{...eo,rootBoundary:I?{x:0,y:0,width:o.clientWidth,height:o.clientHeight}:void 0,mainAxis:"none"!==F,crossAxis:eu,limiter:M||I?void 0:{fn:(void 0===(n=t=e=>{if(!ei.current)return{};let{width:t,height:r}=ei.current.getBoundingClientRect(),n=lv(lp(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}=lf(n,e),u={x:t,y:r},d=lv(o),f=lh(d),p=u[f],m=u[d],h=lf(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 v,b;let e="y"===f?"width":"height",t=lP.has(lp(o)),r=i.reference[d]-i.floating[e]+(t&&(null==(v=l.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),n=i.reference[d]+i.reference[e]+(t?0:(null==(b=l.offset)?void 0:b[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,M,I,Q,F],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}=lf(c,e),u={x:t,y:r},d=await o.detectOverflow(e,a),f=lv(lp(n)),p=lh(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=ls(r,ll(m,n))}if(l){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=h+d[e],n=h-d[t];h=ls(r,ll(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"===B||"shift"===F||"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}=lf(f,e),d=await s.detectOverflow(e,u),p=lp(i),m=lm(i),h="y"===lv(i),{width:g,height:v}=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 b=v-d.top-d.bottom,x=g-d.left-d.right,y=ll(v-d[n],b),w=ll(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=b),k&&!m){let e=ls(d.left,0),t=ls(d.right,0),r=ls(d.top,0),n=ls(d.bottom,0);h?E=g-2*(0!==e||0!==t?e+t:ls(d.left,d.right)):S=v-2*(0!==r||0!==n?r+n:ls(d.top,d.bottom))}await c({...e,availableWidth:E,availableHeight:S});let C=await s.getDimensions(a.floating);return g!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}).name,fn:x.fn,options:[u,d]},(p=()=>({element:ei.current||document.createElement("div"),padding:T,offsetParent:"floating"}),m=[T],{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"}=lf(p,e)||{};if(null==a)return{};let d=lE(c),f={x:t,y:r},m=lh(lv(n)),h=lg(m),g=await i.getDimensions(a),v="y"===m,b=v?"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[b]||o.floating[h];k&&await i.isElement?.(w)||(k=l.floating[b]||o.floating[h]);let S=k/2-g[h]/2-1,E=Math.min(d[v?"top":"left"],S),C=Math.min(d[v?"bottom":"right"],S),R=k-g[h]-C,j=k/2-g[h]/2+(x/2-y/2),M=ls(E,ll(j,R)),T=!s.arrow&&null!=lm(n)&&j!==M&&o.reference[h]/2-(j<E?E:C)-g[h]/2<0,O=T?j<E?j-E:j-R:0;return{[m]:f[m]+O,data:{[m]:M,centerOffset:j-M-O,...T&&{alignmentOffset:O}},reset:T}},options:[p,m]}),{name:"transformOrigin",fn(e){let{elements:t,middlewareData:r,placement:n,rects:o,y:i}=e,l=lp(n),s=lv(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,v="function"==typeof S?S(l7(e,k,G)):S,b=h>v,x={top:`${p}px calc(100% + ${v}px)`,bottom:`${p}px ${-v}px`,left:`calc(100% + ${v}px) ${m}px`,right:`${-v}px ${m}px`}[l],y=`${p}px ${o.reference.y+g-i}px`;return t.floating.style.setProperty("--transform-origin",eu&&"y"===s&&b?y:x),{}}},l2,D),rj(()=>{!L&&N&&N.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[L,N]);let ep=b.useMemo(()=>({elementResize:!O&&"u">typeof ResizeObserver,layoutShift:!O&&"u">typeof IntersectionObserver}),[O]),{refs:em,elements:eh,x:eg,y:ev,middlewareData:eb,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=tA(),i=null!=oi(),l=_(()=>new ia({open:t,onOpenChange:r,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:new im,floatingId:o,nested:i,noEmit:!1})).current;return rj(()=>{let e={open:t,floatingId:o};void 0!==n.reference&&(e.referenceElement=n.reference,e.domReferenceElement=tJ(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]=b.useState(null),a=b.useRef(null),c=ol(r);rj(()=>{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]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(n);lG(f,n)||p(n);let[m,h]=b.useState(null),[g,v]=b.useState(null),x=b.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=b.useCallback(e=>{e!==E.current&&(E.current=e,v(e))},[]),w=i||m,k=l||g,S=b.useRef(null),E=b.useRef(null),C=b.useRef(u),R=null!=a,j=lQ(a),M=lQ(o),T=lQ(c),O=b.useCallback(()=>{var e,n;let o,i,l;if(!S.current||!E.current)return;let s={placement:t,strategy:r,middleware:f};M.current&&(s.platform=M.current),(e=S.current,n=E.current,o=new Map,l={...(i={platform:lq,...s}).platform,_c:o},lM(e,n,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==T.current};P.current&&!lG(C.current,t)&&(C.current=t,rT.flushSync(()=>{d(t)}))})},[f,t,r,M,T]);lY(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let P=b.useRef(!1);lY(()=>(P.current=!0,()=>{P.current=!1}),[]),lY(()=>{if(w&&(S.current=w),k&&(E.current=k),w&&k){if(j.current)return j.current(w,k,O);O()}},[w,k,O,j,R]);let N=b.useMemo(()=>({reference:S,floating:E,setReference:x,setFloating:y}),[x,y]),L=b.useMemo(()=>({reference:w,floating:k}),[w,k]),A=b.useMemo(()=>{let e={position:r,left:0,top:0};if(!L.floating)return e;let t=lJ(L.floating,u.x),n=lJ(L.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...lZ(L.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,L.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:O,refs:N,elements:L,floatingStyles:A}),[u,O,N,L,A])}({...e,elements:{...i,...l&&{reference:l}}}),d=b.useCallback(e=>{let t=tJ(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=b.useState(null),[m,h]=b.useState(null);o.useSyncedValue("referenceElement",f),o.useSyncedValue("domReferenceElement",tJ(f)?f:null),o.useSyncedValue("floatingElement",m);let g=b.useCallback(e=>{(tJ(e)||null===e)&&(a.current=e,p(e)),(tJ(u.refs.reference.current)||null===u.refs.reference.current||null!==e&&!tJ(e))&&u.refs.setReference(e)},[u.refs,p]),v=b.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),x=b.useMemo(()=>({...u.refs,setReference:g,setFloating:v,setPositionReference:d,domReference:a}),[u.refs,g,v,d]),y=b.useMemo(()=>({...u.elements,domReference:i.domReference}),[u.elements,i.domReference]),w=o.useState("open"),k=o.useState("floatingId"),S=b.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 rj(()=>{o.context.dataRef.current.floatingContext=S;let e=c?.nodesRef.current.find(e=>e.id===t);e&&(e.context=S)}),b.useMemo(()=>({...u,context:S,refs:x,elements:y,rootStore:o}),[u,x,y,S,o])}({rootContext:N,placement:J,middleware:ea,strategy:w,whileElementsMounted:P?void 0:(...e)=>lX(...e,ep),nodeId:z,externalTree:V}),{sideX:eE,sideY:eC}=eb.adaptiveOrigin||l5,eR=ek?w:"fixed",ej=b.useMemo(()=>{let e=D?{position:eR,[eE]:eg,[eC]:ev}:{position:eR,...eS};return ek||(e.opacity=0),e},[D,eR,eE,eg,eC,ev,eS,ek]),eM=b.useRef(null);rj(()=>{if(!L)return;let e=Y.current,t="function"==typeof e?e():e,r=(l6(t)?t.current:t)||null;r!==eM.current&&(em.setPositionReference(r),eM.current=r)},[L,em,X,Y]),b.useEffect(()=>{if(!L)return;let e=Y.current;"function"!=typeof e&&l6(e)&&e.current!==eM.current&&(em.setPositionReference(e.current),eM.current=e.current)},[L,em,X,Y]),b.useEffect(()=>{if(P&&L&&eh.domReference&&eh.floating)return lX(eh.domReference,eh.floating,ex,ep)},[P,L,eh,ex,ep]);let eT=lp(ey),eO=l4(k,eT,G),eP=lm(ey)||"center",eN=!!eb.hide?.referenceHidden;rj(()=>{$&&L&&ek&&H(eT)},[$,L,ek,eT]);let eL=b.useMemo(()=>({position:"absolute",top:eb.arrow?.y,left:eb.arrow?.x}),[eb.arrow]),eA=eb.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:ej,arrowStyles:eL,arrowRef:ei,arrowUncentered:eA,side:eO,align:eP,physicalSide:eT,anchorHidden:eN,refs:em,context:ew,isPositioned:ek,update:ex}),[ej,eL,ei,eA,eO,eP,eT,eN,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:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:x.useState("hasViewport")?l3:void 0}),T=b.useMemo(()=>{let e={};return(!w||"both"===S||E)&&(e.pointerEvents="none"),{role:"presentation",hidden:!k,style:{...M.positionerStyles,...e}}},[w,S,E,k,M.positionerStyles]),O=b.useMemo(()=>({open:w,side:M.side,align:M.align,anchorHidden:M.anchorHidden,instant:"none"!==S?"tracking-cursor":R}),[w,M.side,M.align,M.anchorHidden,S,R]),P=b.useMemo(()=>({...O,arrowRef:M.arrowRef,arrowStyles:M.arrowStyles,arrowUncentered:M.arrowUncentered}),[O,M.arrowRef,M.arrowStyles,M.arrowUncentered]),N=K("div",e,{state:O,props:[T,l8(j),v],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:r7});return(0,g.jsx)(ln.Provider,{value:P,children:N})});var rq=rq;let se={...r7,...rD},st=b.forwardRef(function(e,t){let{className:r,render:n,...o}=e,i=iW(),{side:l,align:s}=lo(),a=i.useState("open"),c=i.useState("instantType"),u=i.useState("transitionStatus"),d=i.useState("popupProps"),f=i.useState("floatingRootContext");return r$({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=i7(r),u=ol(),d=oi(),f=tb(()=>iQ(l.current.openEvent?.type,c.interactedInside)),p=tb(()=>{let e=l.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=tb(e=>rw(e,r.context.triggerElements)),h=b.useCallback(e=>{let t=iZ(a,"close",c.pointerType),n=()=>{r.setOpen(!1,rU(rq.triggerHover,e)),u?.events.emit("floating.closed",e)};t?c.openChangeTimeout.start(t,n):(c.openChangeTimeout.clear(),n())},[a,r,c,u]),g=tb(()=>{i4(c)}),v=tb(e=>{let t=rk(e);if(!(t&&t.closest(i5))){c.interactedInside=!1;return}c.interactedInside=t?.closest("[aria-haspopup]")!=null});rj(()=>{n||(c.pointerType=void 0,c.restTimeoutPending=!1,c.interactedInside=!1,g())},[n,c,g]),b.useEffect(()=>g,[g]),rj(()=>{if(s&&n&&c.handleCloseOptions?.blockPointerEvents&&p()&&tJ(i)&&o){let e=ro(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;i4(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}),()=>{g()}}},[s,n,i,o,c,p,u,d,g]);let x=tH();b.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),g()}function t(e){if(u&&d&&n$(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);g(),f()||h(e)}}function n(e){u&&d&&!(n$(u.nodesRef.current,d).length>0)&&x.start(0,()=>{u.events.off("floating.closed",n),r.setOpen(!1,rU(rq.triggerHover,e)),u.events.emit("floating.closed",e)})}},[s,o,r,l,f,m,h,g,v,c,u,d,x])}(f,{enabled:!i.useState("disabled"),closeDelay:i.useState("closeDelay")}),K("div",e,{state:{open:a,side:l,align:s,instant:c,transitionStatus:u},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[d,l8(u),o],stateAttributesMapping:se})}),sr=b.forwardRef(function(e,t){let{className:r,render:n,...o}=e,i=iW().useState("instantType"),{open:l,arrowRef:s,side:a,align:c,arrowUncentered:u,arrowStyles:d}=lo();return K("div",e,{state:{open:l,side:a,align:c,uncentered:u,instant:i},ref:[t,s],props:[{style:d,"aria-hidden":!0},o],stateAttributesMapping:r7})}),sn=((m={}).popupWidth="--popup-width",m.popupHeight="--popup-height",m);function so(e){let t=t9(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=tQ(e),i=o?e.offsetWidth:r,l=o?e.offsetHeight:n;return(la(r)!==i||la(n)!==l)&&(r=i,n=l),{width:r,height:n}}let si=()=>!0;function sl(e,t,r){let n=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,n)}}function ss(e,t){let r=[];for(let[n,o]of Object.entries(t))r.push(sl(e,n,o));return r.length?()=>{r.forEach(e=>e())}:F}function sa(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 sc(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 su={activationDirection:e=>e?{"data-activation-direction":e}:null},sd=b.forwardRef(function(e,t){let{render:r,className:n,children:o,...i}=e,l=iW(),s=lo(),a=l.useState("instantType"),{children:c,state:u}=function(e){let t,{store:r,side:n,cssVars:o,children:i}=e,l=l1(),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"),m=function(e){let[t,r]=b.useState({current:e,previous:null});return e!==t.current&&r({current:e,previous:t.current}),t.previous}(c?s:null),h=function(e,t){let[r,n]=b.useState(0),o=b.useRef(e),i=b.useRef(t),l=b.useRef(!1);return rj(()=>{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=b.useRef(null),[x,y]=b.useState(null),[w,k]=b.useState(null),S=b.useRef(null),E=b.useRef(null),C=r_(S,!0,!1),R=rN(),[j,M]=b.useState(null),[T,O]=b.useState(!1);rj(()=>(r.set("hasViewport",!0),()=>{r.set("hasViewport",!1)}),[r]);let P=tb(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),E.current?.style.setProperty("display","none")}),N=tb(e=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),E.current?.style.removeProperty("display"),e&&M(e)}),L=b.useRef(null);rj(()=>{var e,t;let r,n,o,i;s&&m&&s!==m&&L.current!==s&&v.current&&(y(v.current),O(!0),k((e=m,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})),R.request(()=>{rT.flushSync(()=>{O(!1)}),C(()=>{y(null),M(null),v.current=null})}),L.current=s)},[s,m,x,C,R]),rj(()=>{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,g.jsxs)(b.Fragment,{children:[(0,g.jsx)("div",{"data-previous":!0,inert:oS(!0),ref:E,style:{...j?{[o.popupWidth]:`${j.width}px`,[o.popupHeight]:`${j.height}px`}:null,position:"absolute"},"data-ending-style":T?void 0:""},"previous"),(0,g.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":T?"":void 0,children:i},h)]}):(0,g.jsx)("div",{"data-current":!0,ref:S,children:i},h),rj(()=>{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=si,onMeasureLayout:l,onMeasureLayoutComplete:s,side:a,direction:c}=e,u=r_(t,!0,!1),d=rN(),f=b.useRef(null),p=b.useRef(null),m=b.useRef(!0),h=b.useRef(F),g=tb(l),v=tb(s),x=b.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"}:q},[a,c]);rj(()=>{if(!o||!i()||"function"!=typeof ResizeObserver){h.current=F,m.current=!0,f.current=null,p.current=null;return}if(!t||!r)return;h.current=ss(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),sa(t,"auto");let n=sl(t,"position","static"),l=sl(t,"transform","none"),s=sl(t,"scale","1"),a=ss(r,{"--available-width":"max-content","--available-height":"max-content"});function c(){n(),l(),a(),s()}if(g?.(),m.current||null===f.current){sc(r,"max-content");let n=so(t);return f.current=n,sc(r,n),c(),v?.(null,n),m.current=!1,()=>{e.disconnect(),h.current(),h.current=F}}sa(t,"auto"),sc(r,"max-content");let b=f.current??p.current,y=so(t);if(f.current=y,!b)return sc(r,y),c(),v?.(null,y),()=>{e.disconnect(),d.cancel(),h.current(),h.current=F};sa(t,b),c(),v?.(b,y),sc(r,y);let w=new AbortController;return d.request(()=>{sa(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=F}},[n,t,r,u,d,i,o,g,v,x])}({popupElement:f,positionerElement:p,mounted:d,content:u,onMeasureLayout:P,onMeasureLayoutComplete:N,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:sn,children:o});return K("div",e,{state:{activationDirection:u.activationDirection,transitioning:u.transitioning,instant:a},ref:t,props:[i,{children:c}],stateAttributesMapping:su})});var rq=rq;class sf{constructor(){this.store=new iF}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error(z(81,e));this.store.setOpen(!0,rU(rq.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,rU(rq.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,sr,"Handle",0,sf,"Popup",0,st,"Portal",0,lr,"Positioner",0,l9,"Provider",0,function(e){let{delay:t,closeDelay:r,timeout:n=400}=e,o=b.useMemo(()=>({delay:t,closeDelay:r}),[t,r]),i=b.useMemo(()=>({open:t,close:r}),[t,r]);return(0,g.jsx)(iq.Provider,{value:o,children:(0,g.jsx)(i1,{delay:i,timeoutMs:n,children:e.children})})},"Root",0,iU,"Trigger",0,i9,"Viewport",0,sd,"createHandle",0,function(){return new sf}],27486);var sp=e.i(27486),sp=sp;let sm=e=>{let t,r,n,o=(0,v.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,g.jsx)(sp.Provider,{"data-slot":"tooltip-provider",delay:i,...t}),o[3]=i,o[4]=t,o[5]=n):n=o[5],n},sh=(0,b.createContext)(null),sg=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,m,h,x,y=(0,v.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,v.c)(2),[n,o]=(0,b.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,b.useEffect)(e,t),!!n})(),[S,E]=(0,b.useState)(!1),[C,R]=(0,b.useState)(w),j=n??C;y[8]!==j||y[9]!==i?(a=e=>{let t="function"==typeof e?e(j):e;i?i(t):R(t),cookieStore.set({expires:Date.now()+6048e5,name:"sidebar_state",path:"/",value:String(t)})},y[8]=j,y[9]=i,y[10]=a):a=y[10];let M=a;y[11]!==k||y[12]!==M?(c=()=>k?E(sw):M(sk),y[11]=k,y[12]=M,y[13]=c):c=y[13];let T=c;y[14]!==T?(u=()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),T())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},d=[T],y[14]=T,y[15]=u,y[16]=d):(u=y[15],d=y[16]),(0,b.useEffect)(u,d);let O=j?"expanded":"collapsed";y[17]!==k||y[18]!==j||y[19]!==S||y[20]!==M||y[21]!==O||y[22]!==T?(f={isMobile:k,open:j,openMobile:S,setOpen:M,setOpenMobile:E,state:O,toggleSidebar:T},y[17]=k,y[18]=j,y[19]=S,y[20]=M,y[21]=O,y[22]=T,y[23]=f):f=y[23];let P=f;y[24]!==r?(p=((...e)=>e8(G(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?(m={"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...l},y[26]=l,y[27]=m):m=y[27];let N=m;return y[28]!==t||y[29]!==o||y[30]!==p||y[31]!==N?(h=(0,g.jsx)(sm,{delay:0,children:(0,g.jsx)("div",{className:p,"data-slot":"sidebar-wrapper",style:N,...o,children:t})}),y[28]=t,y[29]=o,y[30]=p,y[31]=N,y[32]=h):h=y[32],y[33]!==P||y[34]!==h?(x=(0,g.jsx)(sh.Provider,{value:P,children:h}),y[33]=P,y[34]=h,y[35]=x):x=y[35],x},sv=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p=(0,v.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 m=void 0===o?"left":o,h=void 0===i?"sidebar":i,x=void 0===l?"offcanvas":l,{isMobile:y,state:w,openMobile:k,setOpenMobile:S}=(()=>{let e=(0,b.useContext)(sh);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)=>e8(G(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,g.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,g.jsxs)(iD,{className:"sr-only",children:[(0,g.jsx)(i_,{children:"Sidebar"}),(0,g.jsx)(i$,{children:"Displays the mobile sidebar."})]}),p[14]=r):r=p[14],p[15]!==t?(o=(0,g.jsx)("div",{className:"flex h-full w-full flex-col",children:t}),p[15]=t,p[16]=o):o=p[16],p[17]!==m||p[18]!==o?(i=(0,g.jsxs)(iz,{className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar","data-slot":"sidebar",side:m,style:e,children:[r,o]}),p[17]=m,p[18]=o,p[19]=i):i=p[19],p[20]!==k||p[21]!==n||p[22]!==S||p[23]!==i?(l=(0,g.jsx)(iL,{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"===h||"inset"===h?"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)=>e8(G(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,g.jsx)("div",{className:s,"data-slot":"sidebar-gap"}),p[27]=s,p[28]=a):a=p[28];let R="left"===m?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",j="floating"===h||"inset"===h?"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]!==R||p[31]!==j?(c=((...e)=>e8(G(e)))("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",R,j,r),p[29]=r,p[30]=R,p[31]=j,p[32]=c):c=p[32],p[33]!==t?(u=(0,g.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,g.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]!==m||p[40]!==w||p[41]!==d||p[42]!==E||p[43]!==a||p[44]!==h?(f=(0,g.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":E,"data-side":m,"data-slot":"sidebar","data-state":w,"data-variant":h,children:[a,d]}),p[39]=m,p[40]=w,p[41]=d,p[42]=E,p[43]=a,p[44]=h,p[45]=f):f=p[45],f},sb=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.jsx)("main",{className:n,"data-slot":"sidebar-inset",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sx=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.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},sy=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.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 sw(e){return!e}function sk(e){return!e}J("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active]:bg-sidebar-accent data-[active]:font-medium data-[active]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-8 text-sm",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!",sm:"h-7 text-xs"},variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"}}});let sS=e=>e.map(e=>{if("file"===e.type)return e;let t=sS(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}}),sE=(0,b.memo)(function(e){let t,r,n,o,i,l,s,a,c=(0,v.c)(26),{node:u,depth:d,isSelected:f,isViewed:p,commentCount:m,onSelect:h,onContextMenu:b}=e,x=16*d+8,{insertions:y,deletions:w}=u.fileStat,k=ta;y>0&&0===w?k=tc:w>0&&0===y&&(k=tu);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=f?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",C=p&&"opacity-50";return c[0]!==E||c[1]!==C?(t=((...e)=>e8(G(e)))("flex w-full cursor-pointer items-center gap-1.5 py-1 text-left transition-colors",E,C),c[0]=E,c[1]=C,c[2]=t):t=c[2],c[3]!==x?(r={containIntrinsicBlockSize:"26px",contentVisibility:"auto",paddingLeft:x,paddingRight:8},c[3]=x,c[4]=r):r=c[4],c[5]!==u.path||c[6]!==h?(n=()=>h(u.path),c[5]=u.path,c[6]=h,c[7]=n):n=c[7],c[8]!==u.path||c[9]!==b?(o=e=>{e.preventDefault(),b(e.clientX,e.clientY,u.path)},c[8]=u.path,c[9]=b,c[10]=o):o=c[10],c[11]!==k||c[12]!==S?(i=(0,g.jsx)(k,{size:14,className:S}),c[11]=k,c[12]=S,c[13]=i):i=c[13],c[14]!==u.name?(l=(0,g.jsx)("span",{className:"flex-1 truncate text-[12px] leading-tight",children:u.name}),c[14]=u.name,c[15]=l):l=c[15],c[16]!==m?(s=m>0&&(0,g.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-sidebar-foreground/50",children:[(0,g.jsx)(to,{size:10}),m]}),c[16]=m,c[17]=s):s=c[17],c[18]!==t||c[19]!==r||c[20]!==n||c[21]!==o||c[22]!==i||c[23]!==l||c[24]!==s?(a=(0,g.jsxs)("button",{type:"button",className:t,style:r,onClick:n,onContextMenu:o,children:[i,l,s]}),c[18]=t,c[19]=r,c[20]=n,c[21]=o,c[22]=i,c[23]=l,c[24]=s,c[25]=a):a=c[25],a}),sC=(0,b.memo)(function(e){let t,r,n,o,i,l,s,a,c,u,d,f,p=(0,v.c)(38),{node:m,depth:h,isCollapsed:x,onToggle:y,children:w}=e,k=16*h+8;if(p[0]!==k||p[1]!==x||p[2]!==m.name||p[3]!==m.path||p[4]!==y){let e=m.name.split("/");n="button",o=!x,i="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",p[13]!==k?(l={paddingLeft:k,paddingRight:8},p[13]=k,p[14]=l):l=p[14],p[15]!==m.path||p[16]!==y?(s=()=>y(m.path),p[15]=m.path,p[16]=y,p[17]=s):s=p[17],p[18]!==x?(a=x?(0,g.jsx)(ti,{size:12,className:"shrink-0 text-sidebar-foreground/50"}):(0,g.jsx)(tl,{size:12,className:"shrink-0 text-sidebar-foreground/50"}),p[18]=x,p[19]=a):a=p[19],t="truncate text-[12px] text-sidebar-foreground/70",r=e.map((t,r)=>(0,g.jsxs)(b.Fragment,{children:[t,r<e.length-1&&(0,g.jsx)("span",{className:"text-sidebar-foreground/30",children:"/"})]},r)),p[0]=k,p[1]=x,p[2]=m.name,p[3]=m.path,p[4]=y,p[5]=t,p[6]=r,p[7]=n,p[8]=o,p[9]=i,p[10]=l,p[11]=s,p[12]=a}else t=p[5],r=p[6],n=p[7],o=p[8],i=p[9],l=p[10],s=p[11],a=p[12];return p[20]!==t||p[21]!==r?(c=(0,g.jsx)("span",{className:t,children:r}),p[20]=t,p[21]=r,p[22]=c):c=p[22],p[23]!==n||p[24]!==o||p[25]!==i||p[26]!==l||p[27]!==s||p[28]!==a||p[29]!==c?(u=(0,g.jsxs)("button",{type:n,"aria-expanded":o,className:i,style:l,onClick:s,children:[a,c]}),p[23]=n,p[24]=o,p[25]=i,p[26]=l,p[27]=s,p[28]=a,p[29]=c,p[30]=u):u=p[30],p[31]!==w||p[32]!==k||p[33]!==x?(d=!x&&(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsx)("div",{className:"pointer-events-none absolute inset-y-0 border-l border-sidebar-border/60",style:{left:k+6}}),w]}),p[31]=w,p[32]=k,p[33]=x,p[34]=d):d=p[34],p[35]!==u||p[36]!==d?(f=(0,g.jsxs)(g.Fragment,{children:[u,d]}),p[35]=u,p[36]=d,p[37]=f):f=p[37],f}),sR=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,m,h,x,y,w,k,S,E,C,R=(0,v.c)(75),{files:j,selectedFile:M,onSelectFile:T,comments:O,repoPath:P,filterQuery:N,onFilterChange:L,viewedFiles:A,isLoading:I}=e,z=void 0!==I&&I,[D,_]=(0,b.useState)(null);R[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Set,R[0]=t):t=R[0];let[$,V]=(0,b.useState)(t),[W,H]=(0,b.useState)(256),B=(0,b.useRef)(null);R[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{let e=e=>{B.current&&H(Math.max(8,B.current.startWidth+e.clientX-B.current.startX))},t=()=>{B.current&&(B.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},n=[],R[1]=r,R[2]=n):(r=R[1],n=R[2]),(0,b.useEffect)(r,n),R[3]!==W?(o=e=>{e.preventDefault(),B.current={startWidth:W,startX:e.clientX},document.body.style.cursor="col-resize",document.body.style.userSelect="none"},R[3]=W,R[4]=o):o=R[4];let F=o;R[5]!==j||R[6]!==N?(i=N?j.filter(e=>e.file.toLowerCase().includes(N.toLowerCase())):j,R[5]=j,R[6]=N,R[7]=i):i=R[7];let U=i;R[8]!==U?(l=U.length>500?U.slice(0,500):U,R[8]=U,R[9]=l):l=R[9];let q=l;R[10]!==q?(s=sS((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)),R[10]=q,R[11]=s):s=R[11];let K=s;if(R[12]!==O){for(let e of(a=new Map,O))a.set(e.file,(a.get(e.file)??0)+1);R[12]=O,R[13]=a}else a=R[13];let X=a;R[14]===Symbol.for("react.memo_cache_sentinel")?(c=e=>{V(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},R[14]=c):c=R[14];let Y=c;R[15]===Symbol.for("react.memo_cache_sentinel")?(u=(e,t,r)=>{_({file:r,x:e,y:t})},R[15]=u):u=R[15];let G=u;if(R[16]!==$||R[17]!==X||R[18]!==N||R[19]!==U||R[20]!==z||R[21]!==L||R[22]!==T||R[23]!==M||R[24]!==W||R[25]!==K||R[26]!==A){let e,t,r,n,o,i=(e,t)=>e.map(e=>"folder"===e.type?(0,g.jsx)(sC,{node:e,depth:t,isCollapsed:$.has(e.path),onToggle:Y,children:i(e.children,t+1)},e.path):(0,g.jsx)(sE,{node:e,depth:t,isSelected:M===e.path,isViewed:A.has(e.path),commentCount:X.get(e.path)??0,onSelect:T,onContextMenu:G},e.path));f=sv,h="none",x="relative overflow-hidden border-r border-sidebar-border";let l=`${W}px`;R[35]!==l?(e={"--sidebar-width":l},R[35]=l,R[36]=e):e=R[36],y=e,R[37]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsx)(ts,{size:12,className:"pointer-events-none absolute left-2.5 text-sidebar-foreground/40"}),R[37]=t):t=R[37],R[38]!==L?(r=e=>L(e.target.value),R[38]=L,R[39]=r):r=R[39],R[40]!==N||R[41]!==r?(n=(0,g.jsx)("input",{type:"text",value:N,onChange:r,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"}),R[40]=N,R[41]=r,R[42]=n):n=R[42],R[43]!==N||R[44]!==L?(o=N&&(0,g.jsx)("button",{type:"button",onClick:()=>L(""),"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:"×"}),R[43]=N,R[44]=L,R[45]=o):o=R[45],R[46]!==n||R[47]!==o?(w=(0,g.jsx)(sx,{className:"border-b border-sidebar-border h-[53px] flex-row items-center py-0 px-2",children:(0,g.jsxs)("div",{className:"relative flex w-full items-center",children:[t,n,o]})}),R[46]=n,R[47]=o,R[48]=w):w=R[48],d=sy,p="gap-0 py-1";e:{let e;if(z){let e;R[49]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:(0,g.jsx)("p",{className:"animate-pulse text-xs text-sidebar-foreground/50",children:"Loading…"})}),R[49]=e):e=R[49],m=e;break e}if(0===U.length){let e,t,r;R[50]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)("p",{className:"text-xs text-sidebar-foreground/50",children:"No changes"}),R[50]=e):e=R[50],R[51]!==N?(t=N&&(0,g.jsxs)("p",{className:"text-[10px] text-sidebar-foreground/30",children:["No files match “",N,"”"]}),R[51]=N,R[52]=t):t=R[52],R[53]!==t?(r=(0,g.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[e,t]}),R[53]=t,R[54]=r):r=R[54],m=r;break e}R[55]!==U.length?(e=U.length>500&&(0,g.jsxs)("p",{className:"px-3 py-2 text-[10px] text-sidebar-foreground/40",children:["Showing ",500," of ",U.length," files"]}),R[55]=U.length,R[56]=e):e=R[56],m=(0,g.jsxs)(g.Fragment,{children:[i(K,0),e]})}R[16]=$,R[17]=X,R[18]=N,R[19]=U,R[20]=z,R[21]=L,R[22]=T,R[23]=M,R[24]=W,R[25]=K,R[26]=A,R[27]=d,R[28]=f,R[29]=p,R[30]=m,R[31]=h,R[32]=x,R[33]=y,R[34]=w}else d=R[27],f=R[28],p=R[29],m=R[30],h=R[31],x=R[32],y=R[33],w=R[34];return R[57]!==d||R[58]!==p||R[59]!==m?(k=(0,g.jsx)(d,{className:p,children:m}),R[57]=d,R[58]=p,R[59]=m,R[60]=k):k=R[60],R[61]!==D||R[62]!==P?(S=D&&(0,g.jsx)(th,{x:D.x,y:D.y,filePath:D.file,repoPath:P,onClose:()=>_(null)}),R[61]=D,R[62]=P,R[63]=S):S=R[63],R[64]!==F?(E=(0,g.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:F}),R[64]=F,R[65]=E):E=R[65],R[66]!==f||R[67]!==h||R[68]!==x||R[69]!==y||R[70]!==w||R[71]!==k||R[72]!==S||R[73]!==E?(C=(0,g.jsxs)(f,{collapsible:h,className:x,style:y,children:[w,k,S,E]}),R[66]=f,R[67]=h,R[68]=x,R[69]=y,R[70]=w,R[71]=k,R[72]=S,R[73]=E,R[74]=C):C=R[74],C};var sj=e.i(85869);let sM=x("DotGrid1x3HorizontalIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13c.5523 0 1-.4477 1-1s-.4477-1-1-1-1 .4477-1 1 .4477 1 1 1M20 13c.5523 0 1-.4477 1-1s-.4477-1-1-1-1 .4477-1 1 .4477 1 1 1M4 13c.5523 0 1-.4477 1-1s-.4477-1-1-1-1 .4477-1 1 .4477 1 1 1"})))),sT=x("EyeOpenIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.0001 12c0 1.6569-1.3431 3-3 3s-3-1.3431-3-3 1.3431-3 3-3 3 1.3431 3 3"}),b.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21.2246 10.6522c-4.8152-7.5363-13.6338-7.5362-18.449.0001a2.508 2.508 0 0 0 0 2.6955c4.8152 7.5363 13.6338 7.5362 18.449-.0001a2.508 2.508 0 0 0 0-2.6955"})))),sO=x("EyeSlashIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("path",{fill:"currentColor",d:"M10.6069 4.095c-.5472.0748-.9301.579-.8553 1.1263.0749.5471.5791.93 1.1263.8552zm10.6194 6.56-.8428.5383zM19.518 14.02c-.3443.4319-.2732 1.061.1586 1.4053.4319.3442 1.0611.2732 1.4053-.1587zm1.7085-.6754.8428.5382zM3.707 2.2929c-.3905-.3905-1.0237-.3905-1.4142 0s-.3905 1.0237 0 1.4142zM20.2928 21.707c.3905.3905 1.0237.3905 1.4142 0s.3905-1.0237 0-1.4142zM2.7734 10.6553l.8428.5382zm4.4159-3.1742c.4627-.3016.5933-.9211.2917-1.3838-.3015-.4627-.921-.5933-1.3838-.2918zM2.774 13.3457l.8427-.5383zm15.1285 4.8487c.4627-.3016.5933-.9211.2917-1.3838-.3015-.4627-.9211-.5933-1.3838-.2918zM10.8779 6.0765c3.3628-.46 6.9749 1.1542 9.5056 5.1168l1.6856-1.0765c-2.8778-4.506-7.2009-6.6047-11.4622-6.0218zm10.204 9.1901c.345-.4328.6747-.8942.9874-1.3838l-1.6856-1.0765c-.2763.4326-.5655.837-.8657 1.2137zm-.6984-4.0733a1.498 1.498 0 0 1 .0002 1.613l1.6856 1.0765a3.498 3.498 0 0 0-.0002-3.766zM11.9999 14c-1.1046 0-2-.8954-2-2h-2c0 2.2091 1.7909 4 4 4zM2.2928 3.7071l6.8787 6.8787 1.4142-1.4142L3.707 2.2929zM9.9999 12c0-.5526.2228-1.0512.5858-1.4142L9.1715 9.1716C8.4487 9.8943 7.9999 10.8957 7.9999 12zm-.8284-1.4142 4.2426 4.2426 1.4142-1.4142-4.2426-4.2426zm4.2426 4.2426 6.8787 6.8787 1.4142-1.4142-6.8787-6.8787zm0-1.4142A1.99 1.99 0 0 1 11.9999 14v2c1.1043 0 2.1057-.4488 2.8284-1.1716zM2.2928 3.7072l18 17.9999 1.4142-1.4142-18-18zm1.3234 7.4863c1.041-1.63 2.2662-2.8607 3.573-3.7124l-1.092-1.6756c-1.5678 1.0219-2.988 2.466-4.1666 4.3115zm-1.685 2.6905c1.9687 3.0821 4.6123 5.0432 7.4735 5.7838 2.8658.7418 5.8728.2374 8.4979-1.4734l-1.0921-1.6756c-2.1739 1.4169-4.6053 1.808-6.9046 1.2128-2.3038-.5963-4.552-2.2046-6.289-4.9242zm-.0006-3.767a3.5 3.5 0 0 0 .0007 3.767l1.6855-1.0766a1.499 1.499 0 0 1-.0006-1.6139z"})))),sP=b.createContext(void 0),sN=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),sL=((h={})[h.None=0]="None",h[h.GuessFromOrder=1]="GuessFromOrder",h);function sA(e){let{render:t,className:r,state:n=q,props:o=U,refs:i=U,metadata:l,stateAttributesMapping:s,tag:a="div",...c}=e,{compositeProps:u,compositeRef:d}=function(e={}){let{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:n}=ne(),{ref:o,index:i}=function(e={}){let{label:t,metadata:r,textRef:n,indexGuessBehavior:o,index:i}=e,{register:l,unregister:s,subscribeMapChange:a,elementsRef:c,labelsRef:u,nextIndexRef:d}=b.useContext(sN),f=b.useRef(-1),[p,m]=b.useState(i??(o===sL.GuessFromOrder?()=>{if(-1===f.current){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=b.useRef(null),g=b.useCallback(e=>{if(h.current=e,-1!==p&&null!==e&&(c.current[p]=e,u)){let r=void 0!==t;u.current[p]=r?t:n?.current?.textContent??e.textContent}},[p,c,u,t,n]);return rj(()=>{if(null!=i)return;let e=h.current;if(e)return l(e,r),()=>{s(e)}},[i,l,s,r]),rj(()=>{if(null==i)return a(e=>{let t=h.current?e.get(h.current)?.index:null;null!=t&&m(t)})},[i,a,m]),b.useMemo(()=>({ref:g,index:p}),[p,g])}(e),l=r===i,s=b.useRef(null),a=$(o,s);return{compositeProps:b.useMemo(()=>({tabIndex:l?0:-1,onFocus(){n(i)},onMouseMove(){let e=s.current;if(!t||!e)return;let r=e.hasAttribute("disabled")||"true"===e.ariaDisabled;l||r||e.focus()}}),[l,n,i,t]),compositeRef:a,index:i}}({metadata:l});return K(a,e,{state:n,ref:[...i,d],props:[u,...o,c],stateAttributesMapping:s})}var rq=rq;let sI=b.forwardRef(function(e,t){let{className:r,defaultPressed:n=!1,disabled:o=!1,form:i,onPressedChange:l,pressed:s,render:a,type:c,value:u,nativeButton:d=!0,...f}=e,p=tI(u||void 0),m=function(e=!0){let t=b.useContext(sP);if(void 0===t&&!e)throw Error(z(7));return t}(),h=m?.value??[],v=m?void 0:n,x=(o||m?.disabled)??!1,[y,w]=rF({controlled:m?void 0!==p&&h.indexOf(p)>-1:s,default:v,name:"Toggle",state:"pressed"}),k=tb((e,t)=>{p&&m?.setGroupValue?.(p,e,t),l?.(e,t)}),{getButtonProps:S,buttonRef:E}=nt({disabled:x,native:d}),C={disabled:x,pressed:y},R=[E,t],j=[{"aria-pressed":y,onClick(e){let t=!y,r=rU(rq.none,e.nativeEvent);k(t,r),r.isCanceled||w(t)}},f,S],M=K("button",e,{enabled:!m,state:C,ref:R,props:j});return m?(0,g.jsx)(sA,{tag:"button",render:a,className:r,state:C,refs:R,props:j}):M}),sz=J("inline-flex shrink-0 select-none items-center justify-center rounded-lg border border-transparent outline-none transition-[color,background-color,border-color,box-shadow,opacity] 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:opacity-45 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",{defaultVariants:{size:"icon-xs",variant:"ghost"},variants:{size:{"icon-sm":"size-9 rounded-[min(var(--radius-md),12px)]","icon-xs":"size-8 rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3"},variant:{ghost:"hover:bg-muted hover:text-foreground data-[pressed]:bg-muted data-[pressed]:text-foreground"}}}),sD=e=>{let t,r,n,o,i,l,s=(0,v.c)(12);return s[0]!==e?({className:t,variant:o,size:n,...r}=e,s[0]=e,s[1]=t,s[2]=r,s[3]=n,s[4]=o):(t=s[1],r=s[2],n=s[3],o=s[4]),s[5]!==t||s[6]!==n||s[7]!==o?(i=((...e)=>e8(G(e)))(sz({className:t,size:n,variant:o})),s[5]=t,s[6]=n,s[7]=o,s[8]=i):i=s[8],s[9]!==r||s[10]!==i?(l=(0,g.jsx)(sI,{className:i,...r}),s[9]=r,s[10]=i,s[11]=l):l=s[11],l},s_=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,m,h,x,y,w,k=(0,v.c)(48),{file:S,insertions:E,deletions:C,commentCount:R,repoPath:j,viewed:M,onToggleViewed:T,onDiscard:O}=e,[P,N]=(0,b.useState)(null),L=(0,b.useRef)(null);k[0]!==S?(r=-1===(t=S.lastIndexOf("/"))?"":S.slice(0,t),k[0]=S,k[1]=t,k[2]=r):(t=k[1],r=k[2]);let A=r;k[3]!==S||k[4]!==t?(n=-1===t?S:S.slice(t+1),k[3]=S,k[4]=t,k[5]=n):n=k[5];let I=n;k[6]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{let e=L.current?.getBoundingClientRect();e&&N({x:e.left,y:e.bottom+4})},k[6]=o):o=k[6];let z=o;k[7]!==A?(i=A&&(0,g.jsxs)("span",{className:"text-muted-foreground truncate shrink",children:[A,"/"]}),k[7]=A,k[8]=i):i=k[8],k[9]!==I?(l=(0,g.jsx)("span",{className:"text-foreground font-medium shrink-0",children:I}),k[9]=I,k[10]=l):l=k[10],k[11]!==i||k[12]!==l?(s=(0,g.jsxs)("div",{className:"flex items-baseline gap-0 min-w-0",children:[i,l]}),k[11]=i,k[12]=l,k[13]=s):s=k[13],k[14]!==E?(a=E>0&&(0,g.jsxs)("span",{className:"font-mono text-[12px] text-diff-green",children:["+",E]}),k[14]=E,k[15]=a):a=k[15],k[16]!==C?(c=C>0&&(0,g.jsxs)("span",{className:"font-mono text-[12px] text-destructive",children:["−",C]}),k[16]=C,k[17]=c):c=k[17],k[18]!==a||k[19]!==c?(u=(0,g.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[a,c]}),k[18]=a,k[19]=c,k[20]=u):u=k[20],k[21]!==s||k[22]!==u?(d=(0,g.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1 text-[13px]",children:[s,u]}),k[21]=s,k[22]=u,k[23]=d):d=k[23],k[24]!==R?(f=R>0&&(0,g.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,g.jsx)(to,{size:10}),R]}),k[24]=R,k[25]=f):f=k[25],k[26]===Symbol.for("react.memo_cache_sentinel")?(p=(0,g.jsx)(te,{ref:L,variant:"ghost",size:"icon-xs",onClick:z,className:"text-muted-foreground hover:text-foreground hover:bg-secondary",title:"Open in…",children:(0,g.jsx)(sM,{})}),k[26]=p):p=k[26];let D=M?"text-ring hover:text-ring/80":"text-muted-foreground hover:text-foreground";k[27]!==D?(m=((...e)=>e8(G(e)))(D),k[27]=D,k[28]=m):m=k[28];let _=M?"Mark as not viewed":"Mark as viewed",$=M?"Mark as not viewed":"Mark as viewed";return k[29]!==M?(h=M?(0,g.jsx)(sT,{}):(0,g.jsx)(sO,{}),k[29]=M,k[30]=h):h=k[30],k[31]!==T||k[32]!==m||k[33]!==_||k[34]!==$||k[35]!==h||k[36]!==M?(x=(0,g.jsx)(sD,{pressed:M,onPressedChange:T,className:m,title:_,"aria-label":$,children:h}),k[31]=T,k[32]=m,k[33]=_,k[34]=$,k[35]=h,k[36]=M,k[37]=x):x=k[37],k[38]!==P||k[39]!==S||k[40]!==O||k[41]!==j?(y=P&&(0,g.jsx)(th,{x:P.x,y:P.y,filePath:S,repoPath:j,onClose:()=>N(null),onDiscard:O}),k[38]=P,k[39]=S,k[40]=O,k[41]=j,k[42]=y):y=k[42],k[43]!==d||k[44]!==f||k[45]!==x||k[46]!==y?(w=(0,g.jsxs)("div",{className:"flex items-center gap-2 px-3 h-9 border-b border-border bg-card sticky top-0 z-10",children:[d,f,p,x,y]}),k[43]=d,k[44]=f,k[45]=x,k[46]=y,k[47]=w):w=k[47],w},s$=x("BranchIcon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.createElement("circle",{cx:6.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),b.createElement("circle",{cx:6.5,cy:18,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),b.createElement("circle",{cx:17.5,cy:6,r:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}),b.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"})))),sV=x("TrashCan2Icon",(0,b.forwardRef)((e,t)=>b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e},b.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"})))),sW=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.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,v.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)=>e8(G(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,g.jsx)("div",{className:n,"data-slot":"empty-header",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sB=J("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"}}}),sF=e=>{let t,r,n,o,i,l=(0,v.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)=>e8(G(e)))(sB({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,g.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},sU=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.jsx)("div",{className:n,"data-slot":"empty-title",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sq=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.jsx)("div",{className:n,"data-slot":"empty-description",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sK=e=>{let t,r,n,o,i=(0,v.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)=>e8(G(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,g.jsx)("div",{className:n,"data-slot":"empty-content",...r}),i[5]=r,i[6]=n,i[7]=o):o=i[7],o},sX=e=>{let t,r,n,o,i,l=(0,v.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)=>e8(G(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,g.jsx)("kbd",{className:o,...n,children:t}),l[6]=t,l[7]=n,l[8]=o,l[9]=i):i=l[9],i},sY={"[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"}},sG=()=>{let e,t,r,n,o,i,l,s,a,c,u,d=(0,v.c)(11);return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[t,(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[n,(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-destructive/5",children:[i,(0,g.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,g.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,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3",children:[s,(0,g.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,g.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,g.jsxs)("div",{className:"animate-pulse",children:[e,(0,g.jsxs)("div",{children:[r,o,l,a,(0,g.jsxs)("div",{className:"flex h-[22px] items-center gap-3 px-3 bg-diff-green/5",children:[c,(0,g.jsx)("div",{className:"h-2 rounded bg-diff-green/15",style:{width:"91%"}})]})]})]}),d[10]=u):u=d[10],u},sZ=(0,sj.default)(()=>e.A(15910).then(e=>({default:e.PatchDiff})),{loadableGenerated:{modules:[1980]},loading:()=>(0,g.jsx)(sG,{}),ssr:!1}),sJ=e=>{let t,r,n,o,i,l,s,a,c,u=(0,v.c)(24),{onSubmit:d,onCancel:f}=e,[p,m]=(0,b.useState)("");u[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>m(e.target.value),u[0]=t):t=u[0],u[1]!==p||u[2]!==f||u[3]!==d?(r=e=>{("Enter"===e.key&&e.metaKey||"Return"===e.key)&&p.trim()&&d(p.trim(),""),"Escape"===e.key&&f()},u[1]=p,u[2]=f,u[3]=d,u[4]=r):r=u[4],u[5]!==p||u[6]!==r?(n=(0,g.jsx)("textarea",{autoFocus:!0,value:p,onChange:t,placeholder:"Add a comment for the AI",rows:3,onKeyDown:r,className:"w-full resize-none rounded border-0 bg-transparent px-0 py-0 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"}),u[5]=p,u[6]=r,u[7]=n):n=u[7],u[8]!==f?(o=(0,g.jsx)(te,{variant:"ghost",size:"sm",onClick:f,children:"Cancel"}),u[8]=f,u[9]=o):o=u[9],u[10]!==p?(i=p.trim(),u[10]=p,u[11]=i):i=u[11];let h=!i;return u[12]!==p||u[13]!==d?(l=()=>p.trim()&&d(p.trim(),""),u[12]=p,u[13]=d,u[14]=l):l=u[14],u[15]!==h||u[16]!==l?(s=(0,g.jsx)(te,{size:"sm",disabled:h,onClick:l,children:"Comment ↵"}),u[15]=h,u[16]=l,u[17]=s):s=u[17],u[18]!==o||u[19]!==s?(a=(0,g.jsxs)("div",{className:"mt-2 flex justify-end gap-2",children:[o,s]}),u[18]=o,u[19]=s,u[20]=a):a=u[20],u[21]!==n||u[22]!==a?(c=(0,g.jsxs)("div",{className:"my-1 mx-4 rounded-md border border-border bg-background p-3 shadow-lg dark:shadow-none",children:[n,a]}),u[21]=n,u[22]=a,u[23]=c):c=u[23],c},sQ=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,m,h,x=(0,v.c)(39),{comment:k,onDelete:S}=e,[E,C]=(0,b.useState)(!1);x[0]!==k.body||x[1]!==k.tag?(t=()=>{let e=k.tag?`${k.tag} ${k.body}`:k.body;navigator.clipboard.writeText(e).catch(s2),C(!0),setTimeout(()=>C(!1),1500)},x[0]=k.body,x[1]=k.tag,x[2]=t):t=x[2];let R=t,j=k.tag?sY[k.tag]?.border??"border-l-ring/40":"border-l-ring/40";x[3]!==j?(r=((...e)=>e8(G(e)))("group my-1 mx-4 rounded-md border border-border bg-card shadow-sm dark:shadow-none overflow-hidden border-l-2",j),x[3]=j,x[4]=r):r=x[4],x[5]!==k.tag?(n=k.tag&&(0,g.jsx)("span",{className:((...e)=>e8(G(e)))("shrink-0 mt-0.5 text-[11px]",sY[k.tag]?.text??"text-muted-foreground"),children:k.tag}),x[5]=k.tag,x[6]=n):n=x[6],x[7]!==k.body?(o=(0,g.jsx)("p",{className:"flex-1 text-sm text-foreground leading-relaxed",children:k.body}),x[7]=k.body,x[8]=o):o=x[8];let M=E?"Copied!":"Copy comment",T=E?"text-diff-green":"text-muted-foreground hover:text-foreground hover:bg-secondary";return x[9]!==T?(i=((...e)=>e8(G(e)))("rounded p-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring/50",T),x[9]=T,x[10]=i):i=x[10],x[11]!==E?(l=E?(0,g.jsx)(w,{size:12}):(0,g.jsx)(y,{size:12}),x[11]=E,x[12]=l):l=x[12],x[13]!==R||x[14]!==M||x[15]!==i||x[16]!==l?(s=(0,g.jsx)("button",{type:"button",onClick:R,title:M,className:i,children:l}),x[13]=R,x[14]=M,x[15]=i,x[16]=l,x[17]=s):s=x[17],x[18]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.jsx)(sV,{size:12}),x[18]=a):a=x[18],x[19]!==S?(c=(0,g.jsx)("button",{type:"button",onClick:S,title:"Delete comment","aria-label":"Delete comment",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",children:a}),x[19]=S,x[20]=c):c=x[20],x[21]!==c||x[22]!==s?(u=(0,g.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[s,c]}),x[21]=c,x[22]=s,x[23]=u):u=x[23],x[24]!==u||x[25]!==n||x[26]!==o?(d=(0,g.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2.5",children:[n,o,u]}),x[24]=u,x[25]=n,x[26]=o,x[27]=d):d=x[27],x[28]!==k.lineNumber?(f=(0,g.jsxs)("span",{children:["L",k.lineNumber]}),x[28]=k.lineNumber,x[29]=f):f=x[29],x[30]!==k.createdAt?(p=k.createdAt&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("span",{children:"·"}),(0,g.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`})(k.createdAt)})]}),x[30]=k.createdAt,x[31]=p):p=x[31],x[32]!==f||x[33]!==p?(m=(0,g.jsxs)("div",{className:"border-t border-border/40 px-3 py-1 flex items-center gap-2 text-[10px] text-muted-foreground/60",children:[f,p]}),x[32]=f,x[33]=p,x[34]=m):m=x[34],x[35]!==d||x[36]!==m||x[37]!==r?(h=(0,g.jsxs)("div",{className:r,children:[d,m]}),x[35]=d,x[36]=m,x[37]=r,x[38]=h):h=x[38],h},s0=e=>{let t,r,n,o,i,l,s,a,c,u,d,f,p,m=(0,v.c)(49),{file:h,filePatch:x,layout:y,prerenderedHTML:w,comments:k,fileStat:S,viewed:E,onToggleViewed:C,repoPath:R,onAddComment:M,onDeleteComment:T,onDiscard:O}=e,{resolvedTheme:P}=(0,j.useTheme)(),[N,L]=(0,b.useState)(null);if(m[0]!==k||m[1]!==h){let e;m[3]!==h?(e=e=>e.file===h,m[3]=h,m[4]=e):e=m[4],t=k.filter(e),m[0]=k,m[1]=h,m[2]=t}else t=m[2];let A=t;m[5]!==N||m[6]!==h||m[7]!==A?(r=A.map(s5),N&&r.push({lineNumber:N.lineNumber,metadata:{file:h,type:"input"},side:N.side}),m[5]=N,m[6]=h,m[7]=A,m[8]=r):r=m[8];let I=r;m[9]!==h||m[10]!==M||m[11]!==T?(n=e=>{let t=e.metadata;return t?"input"===t.type?(0,g.jsx)(sJ,{onSubmit:async(t,r)=>{await M(h,e.lineNumber,e.side,t,r),L(null)},onCancel:()=>L(null)}):"comment"===t.type?(0,g.jsx)(sQ,{comment:t.comment,onDelete:()=>T(t.comment.id)}):null:null},m[9]=h,m[10]=M,m[11]=T,m[12]=n):n=m[12];let z=n;m[13]===Symbol.for("react.memo_cache_sentinel")?(o=e=>(0,g.jsx)("button",{type:"button",className:"diffhub-gutter-btn",title:"Add comment for AI",onClick:()=>{let t=e();t&&L({lineNumber:t.lineNumber,side:t.side})},children:"+"}),m[13]=o):o=m[13];let D=o,_=S?.insertions??0,$=S?.deletions??0;m[14]!==h||m[15]!==O?(i=O?()=>O(h):void 0,m[14]=h,m[15]=O,m[16]=i):i=m[16],m[17]!==h||m[18]!==A.length||m[19]!==C||m[20]!==R||m[21]!==_||m[22]!==$||m[23]!==i||m[24]!==E?(l=(0,g.jsx)(s_,{file:h,insertions:_,deletions:$,commentCount:A.length,repoPath:R,viewed:E,onToggleViewed:C,onDiscard:i}),m[17]=h,m[18]=A.length,m[19]=C,m[20]=R,m[21]=_,m[22]=$,m[23]=i,m[24]=E,m[25]=l):l=m[25];let V=E&&"opacity-60";m[26]!==V?(s=((...e)=>e8(G(e)))("transition-opacity duration-200",V),m[26]=V,m[27]=s):s=m[27];let W=`${h}:${y}:${P}`,H=w?.["light"===P?"light":"dark"],B="light"===P?"light":"dark";m[28]!==B?(a={"--diffs-addition-color-override":"var(--diff-green)",colorScheme:B},m[28]=B,m[29]=a):a=m[29];let F=a,U="split"===y?"split":"unified";m[30]===Symbol.for("react.memo_cache_sentinel")?(c={dark:"github-dark",light:"github-light"},m[30]=c):c=m[30];let q="light"===P?"light":"dark";return m[31]!==U||m[32]!==q?(u={diffStyle:U,disableFileHeader:!0,disableLineNumbers:!1,enableGutterUtility:!0,expansionLineCount:20,hunkSeparators:"line-info",lineDiffType:"char",lineHoverHighlight:"line",maxLineDiffLength:500,overflow:"scroll",theme:c,themeType:q,unsafeCSS:"[data-diff-span] { border-radius: 0; }"},m[31]=U,m[32]=q,m[33]=u):u=m[33],m[34]!==x||m[35]!==I||m[36]!==z||m[37]!==W||m[38]!==H||m[39]!==F||m[40]!==u?(d=(0,g.jsx)(sZ,{patch:x,prerenderedHTML:H,disableWorkerPool:!0,style:F,options:u,lineAnnotations:I,renderAnnotation:z,renderGutterUtility:D},W),m[34]=x,m[35]=I,m[36]=z,m[37]=W,m[38]=H,m[39]=F,m[40]=u,m[41]=d):d=m[41],m[42]!==d||m[43]!==s?(f=(0,g.jsx)("div",{className:s,children:d}),m[42]=d,m[43]=s,m[44]=f):f=m[44],m[45]!==h||m[46]!==f||m[47]!==l?(p=(0,g.jsxs)("div",{"data-filename":h,className:"border-b border-border font-sans",children:[l,f]}),m[45]=h,m[46]=f,m[47]=l,m[48]=p):p=m[48],p},s1=e=>{let t,r,n,o,i,l,s=(0,v.c)(29),{patch:a,prerenderedHTML:c,layout:u,comments:d,onAddComment:f,onDeleteComment:p,selectedFileId:m,fileStats:h,viewedFiles:b,onToggleViewed:x,repoPath:y,onDiscard:w}=e;if(s[0]!==h){for(let e of(t=new Map,h))t.set(e.file,e);s[0]=h,s[1]=t}else t=s[1];let k=t;if(s[2]!==a||s[3]!==m){let e;r=m??(e=a.match(/^diff --git a\/(.+?) b\//m),e?.[1]??null),s[2]=a,s[3]=m,s[4]=r}else r=s[4];let S=r;if(!a||!S){let e,t;return s[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsxs)(sH,{children:[(0,g.jsx)(sF,{variant:"icon",children:(0,g.jsx)(s$,{})}),(0,g.jsx)(sU,{children:"No changes"}),(0,g.jsx)(sq,{children:"The working tree is clean relative to the base branch"})]}),s[5]=e):e=s[5],s[6]===Symbol.for("react.memo_cache_sentinel")?(t=(0,g.jsxs)(sW,{className:"h-full",children:[e,(0,g.jsx)(sK,{children:(0,g.jsxs)("p",{className:"text-xs text-muted-foreground/60",children:["Press ",(0,g.jsx)(sX,{children:"r"})," to refresh"]})})]}),s[6]=t):t=s[6],t}let E=c?.[u];return s[7]!==S||s[8]!==k?(n=k.get(S),s[7]=S,s[8]=k,s[9]=n):n=s[9],s[10]!==S||s[11]!==b?(o=b.has(S),s[10]=S,s[11]=b,s[12]=o):o=s[12],s[13]!==S||s[14]!==x?(i=()=>x(S),s[13]=S,s[14]=x,s[15]=i):i=s[15],s[16]!==d||s[17]!==S||s[18]!==u||s[19]!==f||s[20]!==p||s[21]!==w||s[22]!==a||s[23]!==y||s[24]!==E||s[25]!==n||s[26]!==o||s[27]!==i?(l=(0,g.jsx)("div",{className:"h-full overflow-auto",id:"diff-container",children:(0,g.jsx)(s0,{file:S,filePatch:a,layout:u,prerenderedHTML:E,comments:d,fileStat:n,viewed:o,onToggleViewed:i,repoPath:y,onAddComment:f,onDeleteComment:p,onDiscard:w})}),s[16]=d,s[17]=S,s[18]=u,s[19]=f,s[20]=p,s[21]=w,s[22]=a,s[23]=y,s[24]=E,s[25]=n,s[26]=o,s[27]=i,s[28]=l):l=s[28],l};function s2(){}function s5(e){return{lineNumber:e.lineNumber,metadata:{comment:e,type:"comment"},side:e.side??"right"}}let s3=e=>{let t,r=(0,v.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,g.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,g.jsx)("div",{className:i,children:n})}),r[0]=i,r[1]=n,r[2]=t):t=r[2],t},s4=e=>{let t,r=(0,v.c)(16),{filesData:n,deferredFileDiff:o,fileDiffPending:i,layout:l,comments:s,onAddComment:a,onDeleteComment:c,selectedFile:u,viewedFiles:d,onToggleViewed:f,repoPath:p,onDiscard:m}=e;if(null===n){let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(s3,{text:"Loading diff…",pulse:!0}),r[0]=e):e=r[0],e}if(0===n.files.length){let e;return r[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(s3,{text:"No changes"}),r[1]=e):e=r[1],e}if(!o||i){let e;return r[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.jsx)(s3,{text:"Loading diff…",pulse:!0}),r[2]=e):e=r[2],e}return r[3]!==s||r[4]!==o.patch||r[5]!==o.prerenderedHTML||r[6]!==n.files||r[7]!==l||r[8]!==a||r[9]!==c||r[10]!==m||r[11]!==f||r[12]!==p||r[13]!==u||r[14]!==d?(t=(0,g.jsx)(s1,{patch:o.patch,prerenderedHTML:o.prerenderedHTML,layout:l,comments:s,onAddComment:a,onDeleteComment:c,selectedFileId:u,fileStats:n.files,viewedFiles:d,onToggleViewed:f,repoPath:p,onDiscard:m}),r[3]=s,r[4]=o.patch,r[5]=o.prerenderedHTML,r[6]=n.files,r[7]=l,r[8]=a,r[9]=c,r[10]=m,r[11]=f,r[12]=p,r[13]=u,r[14]=d,r[15]=t):t=r[15],t};e.s(["DiffApp",0,({repoPath:e})=>{let[t,r]=(0,b.useState)(null),[n,o]=(0,b.useState)([]),[i,l]=(0,b.useState)(null),s=(0,b.useRef)(null),[a,c]=(0,b.useState)(null),u=(0,b.useRef)(new Map),[d,f]=(0,b.useState)("split"),[p,m]=(0,b.useState)(""),[h,v]=(0,b.useState)(!1),[x,y]=(0,b.useState)(null),[w,k]=(0,b.useState)(null),[S,E]=(0,b.useState)("all"),C=(0,b.useRef)("all"),[R,j]=(0,b.useState)(!1),M=(0,b.useRef)(!1),T=(0,b.useRef)(null),O=(0,b.useRef)(!1),P=(0,b.useRef)(0),[N,L]=(0,b.useTransition)(),[A,I]=(0,b.useState)(()=>{try{let t=localStorage.getItem(`diffhub-viewed:${e}`);return t?new Set(JSON.parse(t)):new Set}catch{return new Set}}),z=(0,b.useCallback)(t=>{I(r=>{let n=new Set(r);n.has(t)?n.delete(t):n.add(t);try{localStorage.setItem(`diffhub-viewed:${e}`,JSON.stringify([...n]))}catch{}return n})},[e]),D=(0,b.useDeferredValue)(a),_=(0,b.useCallback)(e=>{let t=new URLSearchParams;e&&t.set("file",e),"uncommitted"===C.current&&t.set("mode","uncommitted"),M.current&&t.set("ws","ignore");let r=t.toString();return r?`?${r}`:""},[]),$=(0,b.useCallback)(async e=>{var t;let r;P.current+=1;let n=P.current,o=(t=u.current,(r=t.get(e))?(t.delete(e),t.set(e,r),r):null);if(o){if(s.current!==e||n!==P.current)return;L(()=>c(o));return}try{let t=await fetch(`/api/diff${_(e)}`);if(!t.ok)return;let r=await t.json();if(s.current!==e||n!==P.current)return;L(()=>{((e,t,r)=>{if(e.has(t)&&e.delete(t),e.set(t,r),e.size<=50)return;let n=e.keys().next().value;n&&e.delete(n)})(u.current,e,r),c(r)})}catch{}},[_,L]),V=(0,b.useCallback)(e=>{s.current=e,(0,b.startTransition)(()=>l(e)),$(e)},[$]),W=(0,b.useCallback)(e=>{if(0===e.files.length){s.current=null,P.current+=1,(0,b.startTransition)(()=>{l(null),c(null)}),T.current=e.fingerprint;return}if(!s.current){let t=e.files[0].file;s.current=t,(0,b.startTransition)(()=>l(t)),$(t)}let t=s.current;if(t&&!e.files.some(e=>e.file===t)){let t=e.files[0]?.file??null;s.current=t,P.current+=1,(0,b.startTransition)(()=>{l(t),c(null)}),t&&$(t)}if(e.fingerprint===T.current)return;T.current=e.fingerprint,P.current+=1,u.current.clear();let r=s.current;r&&$(r)},[$]),H=(0,b.useCallback)(()=>{P.current+=1,u.current.clear(),T.current=null},[]),B=(0,b.useCallback)(async(e=!1)=>{if(!O.current){O.current=!0,e||v(!0),k(null);try{let[e,t]=await Promise.all([fetch(`/api/files${_()}`),fetch("/api/comments")]);if(!e.ok){let t=await e.json().catch(()=>({error:"Network error"}));k(t.error??"Failed to load files");return}let[n,i]=await Promise.all([e.json(),t.json()]);(0,b.startTransition)(()=>{r(n),o(i)}),y(new Date),W(n)}catch(e){k(e instanceof Error?e.message:String(e))}finally{e||v(!1),O.current=!1}}},[_,W]);(0,b.useEffect)(()=>{B()},[B]),(0,b.useEffect)(()=>{let e=setInterval(()=>B(!0),5e3);return()=>clearInterval(e)},[B]),(0,b.useEffect)(()=>{let e=e=>{if(!(e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLInputElement)&&("s"!==e.key||e.metaKey||e.ctrlKey||f(e=>"split"===e?"stacked":"split"),"/"!==e.key||e.metaKey||e.ctrlKey||(e.preventDefault(),document.querySelector('input[placeholder="Filter files…"]')?.focus()),"v"!==e.key||e.metaKey||e.ctrlKey||!i||z(i),"r"!==e.key||e.metaKey||e.ctrlKey||B(),"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&&V(o.file)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,i,z,B,V]);let F=(0,b.useCallback)(e=>{C.current=e,E(e),H(),B(!1)},[H,B]),U=(0,b.useCallback)(e=>{M.current=e,j(e),H(),B(!1)},[H,B]),q=(0,b.useCallback)(async(e,t,r,n,i)=>{let l=await fetch("/api/comments",{body:JSON.stringify({body:n,file:e,lineNumber:t,side:r,tag:i}),headers:{"Content-Type":"application/json"},method:"POST"});if(l.ok){let e=await l.json();o(t=>[...t,e])}},[]),K=(0,b.useCallback)(async e=>{await fetch(`/api/comments?id=${e}`,{method:"DELETE"}),o(t=>t.filter(t=>t.id!==e))},[]),X=(0,b.useCallback)(async e=>{(await fetch("/api/discard",{body:JSON.stringify({file:e}),headers:{"Content-Type":"application/json"},method:"POST"})).ok&&(u.current.delete(e),await B(!1))},[B]);return w?(0,g.jsx)(sg,{className:"h-svh",children:(0,g.jsxs)(sb,{className:"flex flex-col h-svh items-center justify-center gap-4",children:[(0,g.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,g.jsx)("p",{className:"font-semibold mb-1",children:"Failed to load diff"}),(0,g.jsx)("p",{className:"text-xs opacity-80",children:w})]}),(0,g.jsx)(te,{variant:"outline",onClick:()=>B(),children:"Retry"})]})}):(0,g.jsxs)(sg,{className:"h-svh",children:[(0,g.jsx)(sR,{files:t?.files??[],selectedFile:i,onSelectFile:V,comments:n,repoPath:e,filterQuery:p,onFilterChange:m,viewedFiles:A,isLoading:null===t}),(0,g.jsxs)(sb,{className:"flex flex-col h-svh overflow-hidden",children:[(0,g.jsx)(tr,{branch:t?.branch??"…",baseBranch:t?.baseBranch??"main",insertions:t?.insertions??0,deletions:t?.deletions??0,fileCount:t?.files.length??0,refreshing:h,lastUpdated:x,comments:n,diffMode:S,onDiffModeChange:F,ignoreWhitespace:R,onIgnoreWhitespaceChange:U,layout:d,onLayoutChange:f}),(0,g.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,g.jsx)(s4,{filesData:t,deferredFileDiff:D,fileDiffPending:N,layout:d,comments:n,onAddComment:q,onDeleteComment:K,selectedFile:i,viewedFiles:A,onToggleViewed:z,repoPath:e,onDiscard:"uncommitted"===S?X:void 0})})]})]})}],33357)}]);
|