shapewall 0.6.0 → 0.7.1

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.
Files changed (127) hide show
  1. package/CHANGELOG.md +267 -0
  2. package/README.md +39 -2
  3. package/THIRD_PARTY.md +15 -0
  4. package/dist/agent/package-lock.json +594 -2
  5. package/dist/client/assets/{BoardChat-DdwBcb2N.js → BoardChat-Bv4UDOjO.js} +1 -1
  6. package/dist/client/assets/{BuzzDialog-DpUcnU6S.js → BuzzDialog-DwEAN6va.js} +1 -1
  7. package/dist/client/assets/{ChecksPanel-CngYV4yz.js → ChecksPanel-C6r_Tc9g.js} +1 -1
  8. package/dist/client/assets/{History-CD0saQA5.js → History-ajFROfWC.js} +1 -1
  9. package/dist/client/assets/{LocalSettings-MZy2baig.js → LocalSettings-BSbmmpbN.js} +1 -1
  10. package/dist/client/assets/{Management-CSvZ-SHO.js → Management-mo8uv2qG.js} +1 -1
  11. package/dist/client/assets/{QuickConnect-foLh2QUm.js → QuickConnect-DlaijESK.js} +1 -1
  12. package/dist/client/assets/{ShareDialog-DPWDftoL.js → ShareDialog-CdLdd6WQ.js} +1 -1
  13. package/dist/client/assets/{app-update-dialog-CtiXpTRD.js → app-update-dialog-BHVNR5Cp.js} +1 -1
  14. package/dist/client/assets/{circle-x-CteRBtXC.js → circle-x-D5MkDLJk.js} +1 -1
  15. package/dist/client/assets/index-B4AoX3ZW.css +2 -0
  16. package/dist/client/assets/index-CQeHY7en.js +37 -0
  17. package/dist/client/assets/{play-BjRNIGSf.js → play--xrZ7VCR.js} +1 -1
  18. package/dist/client/assets/{refresh-cw-r_tZiFfB.js → refresh-cw-B-npxKae.js} +1 -1
  19. package/dist/client/assets/{ui-zQpn-PdL.js → ui-2lMx-4bc.js} +2 -2
  20. package/dist/client/build-info.json +1 -1
  21. package/dist/client/index.html +3 -3
  22. package/dist/client/sw.js +2 -2
  23. package/dist/console/assets/LocalAccountsApp-C1sCag6a.js +1 -0
  24. package/dist/console/assets/LocalConsole-LXQmzRFT.js +2 -0
  25. package/dist/console/assets/LocalUsage-Br3Ddp7_.js +1 -0
  26. package/dist/console/assets/app-update-dialog-CVniDJKA.js +1 -0
  27. package/dist/console/assets/app-version-CTHwlY6g.js +1 -0
  28. package/dist/console/assets/console-CMNNLtFw.js +11 -0
  29. package/dist/console/assets/console-sMMn_Rwc.css +2 -0
  30. package/dist/console/assets/local-agents-DwYJ9cPb.js +6 -0
  31. package/dist/console/assets/minus-887msXez.js +1 -0
  32. package/dist/console/assets/tailnet--wXsG3uh.js +2 -0
  33. package/dist/console/assets/theme-CPfJOmcz.js +1 -0
  34. package/dist/console/assets/ui-DnyJhoQU.js +41 -0
  35. package/dist/console/assets/usage-C5CJHejQ.js +5 -0
  36. package/dist/console/assets/usage-CIPWnHaS.css +1 -0
  37. package/dist/console/assets/usage-DjmUlnXL.js +56 -0
  38. package/dist/console/build-info.json +1 -1
  39. package/dist/console/console.html +8 -2
  40. package/docs/agent-hardening.md +31 -17
  41. package/docs/agents.md +35 -0
  42. package/docs/architecture.md +10 -4
  43. package/docs/deployment.md +39 -17
  44. package/docs/design-system.md +56 -7
  45. package/docs/hosted.md +1004 -43
  46. package/docs/images/board-overview.png +0 -0
  47. package/docs/images/journeys.png +0 -0
  48. package/docs/images/live-comment.png +0 -0
  49. package/docs/images/phone-comment.png +0 -0
  50. package/docs/images/phone-overview.png +0 -0
  51. package/docs/images/variant.png +0 -0
  52. package/docs/where-to-run.md +82 -1
  53. package/package.json +6 -1
  54. package/src/agent/backends/acp.js +224 -26
  55. package/src/agent/routes.js +21 -0
  56. package/src/agent/usage-log.js +251 -0
  57. package/src/cli/args.js +24 -0
  58. package/src/cli/help.js +37 -2
  59. package/src/cli/init.js +2 -1
  60. package/src/cli/serve.js +20 -5
  61. package/src/cli.js +8 -0
  62. package/src/hosted/access-cli.js +99 -1
  63. package/src/hosted/activity-core.js +232 -0
  64. package/src/hosted/activity.js +375 -0
  65. package/src/hosted/admin.js +80 -13
  66. package/src/hosted/agent-approvals.js +2 -2
  67. package/src/hosted/agent-routes.js +3 -3
  68. package/src/hosted/agents.js +11 -4
  69. package/src/hosted/app.js +89 -7
  70. package/src/hosted/auth-routes.js +156 -15
  71. package/src/hosted/auth.js +123 -20
  72. package/src/hosted/board-routes.js +3 -3
  73. package/src/hosted/chat-frames.js +5 -15
  74. package/src/hosted/chat-permissions.js +12 -0
  75. package/src/hosted/chat-routes.js +8 -8
  76. package/src/hosted/chat-store.js +20 -3
  77. package/src/hosted/comment-files.js +5 -2
  78. package/src/hosted/console-routes.js +111 -34
  79. package/src/hosted/db.js +130 -0
  80. package/src/hosted/device-routes.js +25 -3
  81. package/src/hosted/device.js +23 -4
  82. package/src/hosted/guards.js +337 -27
  83. package/src/hosted/http.js +6 -3
  84. package/src/hosted/membership.js +13 -2
  85. package/src/hosted/operator-access.js +418 -0
  86. package/src/hosted/operator.js +106 -2
  87. package/src/hosted/ops-cli.js +238 -3
  88. package/src/hosted/pages.js +2 -0
  89. package/src/hosted/passkey-policy.js +75 -0
  90. package/src/hosted/permissions.js +14 -6
  91. package/src/hosted/presence.js +14 -2
  92. package/src/hosted/projects.js +2 -1
  93. package/src/hosted/public.js +4 -4
  94. package/src/hosted/ratelimit.js +6 -0
  95. package/src/hosted/retention.js +18 -2
  96. package/src/hosted/server.js +123 -11
  97. package/src/hosted/shares.js +2 -2
  98. package/src/hosted/step-up-settings.js +68 -0
  99. package/src/hosted/step-up.js +135 -0
  100. package/src/hosted/tailnet-identity.js +24 -0
  101. package/src/hosted/tailnet-routes.js +342 -0
  102. package/src/hosted/tailnet.js +220 -0
  103. package/src/hosted/tailscale.js +75 -9
  104. package/src/hosted/tenancy.js +48 -1
  105. package/src/hosted/token-api.js +2 -2
  106. package/src/hosted/tokens.js +9 -2
  107. package/src/hosted/usage-core.js +624 -0
  108. package/src/hosted/usage-layout.js +724 -0
  109. package/src/hosted/usage-routes.js +375 -0
  110. package/src/hosted/usage-shape.js +256 -0
  111. package/src/hosted/usage.js +641 -0
  112. package/src/remote/agent-connect.js +37 -1
  113. package/src/remote/agent-link.js +2 -0
  114. package/src/remote/login.js +33 -8
  115. package/src/remote/share.js +1 -1
  116. package/src/remote/tailnet-cli.js +547 -0
  117. package/src/server/app.js +15 -0
  118. package/src/server/pairing-routes.js +34 -5
  119. package/src/server/tailscale.js +97 -4
  120. package/src/tailnet-proof.js +766 -0
  121. package/dist/client/assets/index-Cxz1UVcV.css +0 -2
  122. package/dist/client/assets/index-uUZVBYUS.js +0 -37
  123. package/dist/console/assets/LocalAccountsApp-DIdy1KnN.js +0 -1
  124. package/dist/console/assets/LocalConsole-DfcQztF-.js +0 -1
  125. package/dist/console/assets/app-update-dialog-ttl9lF5A.js +0 -1
  126. package/dist/console/assets/console-OqAjD0kV.js +0 -55
  127. package/dist/console/assets/console-kvjrAArQ.css +0 -2
@@ -1,4 +1,4 @@
1
- import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ee=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function te(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ne(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else te(ne.bind(null,e))}var re={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=re,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ne,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),a=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=i()})),o=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),s=t(((e,t)=>{t.exports=o()})),c=e(r(),1),l=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function u(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:l(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var d=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},f=e=>{let t=d(e);return t.charAt(0).toUpperCase()+t.slice(1)},p=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),m={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function h(e){return e!=null}function g(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??m.width,a=e.size??e.height??m.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?p(...c):p(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??m[`stroke-width`])*Number(e.size??e.width??m.width)/Number(t.size??t.width??m.width):t.strokeWidth??m[`stroke-width`];return[`svg`,{...Object.entries(m).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&h(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&h(t.width)&&{[r(`width`)]:t.width},...`height`in t&&h(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function _(e,t={}){return g(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var v=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},y=(0,c.createContext)({}),b=()=>(0,c.useContext)(y),x=(0,c.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},m)=>{let{size:h=24,strokeWidth:g=2,absoluteStrokeWidth:y=!1,nonScalingStroke:x=!1,color:S=`currentColor`,className:C=``}=b()??{},w=!!l||v(f),[T,E,D=[]]=_(d,{color:e??S,width:n??t??h,height:r??t??h,strokeWidth:i??g,absoluteStrokeWidth:a??y,nonScalingStroke:o??x,className:p(C,s),hasA11yProp:w,attributes:f});return(0,c.createElement)(T,{ref:m,...E},[...D.map(([e,t])=>(0,c.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function S(e,t=[],n=[]){let r=typeof e==`string`?u(e,t,n):e,i=(0,c.forwardRef)(({className:e,...t},n)=>(0,c.createElement)(x,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=f(r.name)),i}var C={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};C.node;var w=S(C),T={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};T.node;var E=S(T),D={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};D.node;var O=S(D),k={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};k.node;var A=S(k),j={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};j.node;var M=S(j),N=e(a(),1),P=s(),F=/(^|[^\w@.])@([a-z][\w.-]{0,39})/gi,I=/^[a-z][\w.-]{0,39}$/,ee=e=>e.replace(/[.-]+$/,``);function te(e){let t=[];if(typeof e!=`string`||!e.includes(`@`))return t;for(let n of e.matchAll(F)){let e=ee(n[2]).toLowerCase();e&&!t.includes(e)&&t.push(e)}return t}function ne(e){let t=te(e?.body);for(let n of Array.isArray(e?.replies)?e.replies:[])for(let e of te(n?.body))t.includes(e)||t.push(e);return t}function re(e){let t=[],n=typeof e==`string`?e:``,r=0;for(let e of n.matchAll(F)){let i=ee(e[2]);if(!i)continue;let a=e.index+e[1].length;a>r&&t.push({text:n.slice(r,a)}),t.push({text:`@${i}`,handle:i.toLowerCase()}),r=a+1+i.length}return r<n.length&&t.push({text:n.slice(r)}),t}function L(e){let t=String(e||``).normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/^[^a-z]+/,``).replace(/[.-]+$/,``).slice(0,40);return I.test(t)?ee(t):``}function R(e){let t=String(e||``).toLowerCase();return[`agent`,`ai`,`bot`].includes(t)||/-(agent|bot)$/.test(t)}function ie(e){let t=new Map,n=new Map,r=new Set,i=(e,n,r)=>{if(!e||e===`anonymous`)return;let i=t.get(e);i?r&&!i.known&&t.set(e,{...i,name:n||i.name,known:!0}):t.set(e,{handle:e,name:n||e,agent:R(e),known:r,aliases:[]})},a=(e,t)=>{let a=L(e),o=t?String(t).toLowerCase():a;i(o,e,!0),t&&r.add(o),t&&a&&a!==o&&!n.has(a)&&n.set(a,o)};i(`agent`,`Any coding agent`,!0);for(let t of Array.isArray(e)?e:[]){a(t.author,t.authorHandle);for(let e of t.replies||[])a(e.author,e.handle);for(let e of t.mentions||[])i(e,null,!1)}for(let[e,i]of n){if(r.has(e))continue;let n=t.get(i);n&&(n.aliases.includes(e)||n.aliases.push(e),t.delete(e))}return[...t.values()].sort((e,t)=>Number(e.agent)-Number(t.agent)||e.handle.localeCompare(t.handle))}function ae(e,t){let n=String(e||``).toLowerCase();return n?R(n)?!0:Array.isArray(t)&&t.some(e=>e.known&&(e.handle===n||(e.aliases||[]).includes(n))):!1}var z=[`👍`,`❤️`,`🎉`,`😄`,`👀`,`🚀`],oe={"👍":`thumbs up`,"❤️":`heart`,"🎉":`party`,"😄":`smile`,"👀":`eyes`,"🚀":`rocket`},se=e=>typeof e==`string`&&z.includes(e),ce=e=>typeof e==`string`?e.replace(/[\u0000-\u001f\u007f]+/g,` `).replace(/\s+/g,` `).trim().slice(0,80):``;function le(e){return!e||typeof e!=`object`?``:typeof e.user==`string`&&e.user?`u:${e.user}`:`n:${ce(e.name).toLowerCase()}`}function ue(e){let t=ce(e?.name);return t?{name:t,...typeof e.handle==`string`&&/^[a-z][\w.-]{0,39}$/.test(e.handle)?{handle:e.handle}:{},...typeof e.user==`string`&&e.user?{user:e.user.slice(0,80)}:{}}:null}function de(e){if(!Array.isArray(e))return[];let t=new Map;for(let n of e){if(!n||!se(n.emoji)||!Array.isArray(n.by))continue;let e=t.get(n.emoji)||[],r=new Set(e.map(le));for(let t of n.by){let n=ue(t);!n||r.has(le(n))||e.length>=200||(r.add(le(n)),e.push(n))}t.set(n.emoji,e)}return z.filter(e=>t.get(e)?.length).map(e=>({emoji:e,by:t.get(e)}))}function fe(e,t,n){if(!se(t))throw Object.assign(Error(`Reactions are ${z.join(` `)}.`),{code:`invalid_reaction`});let r=ue(n);if(!r)throw Object.assign(Error(`A reaction needs a name.`),{code:`invalid_reaction`});let i=le(r),a=de(e),o=a.find(e=>e.emoji===t),s=!!o?.by.some(e=>le(e)===i);if(!s&&(o?.by.length||0)>=200)throw Object.assign(Error(`That reaction is full.`),{code:`too_many_reactions`});return{reactions:de(s?a.map(e=>e.emoji===t?{...e,by:e.by.filter(e=>le(e)!==i)}:e):o?a.map(e=>e.emoji===t?{...e,by:[...e.by,r]}:e):[...a,{emoji:t,by:[r]}]),added:!s}}function pe(e){return de(e).map(e=>({emoji:e.emoji,count:e.by.length,by:e.by.map(e=>({name:e.name,...e.handle?{handle:e.handle}:{}}))}))}var me=String.raw`(?:#(?:[A-Za-z0-9_\u0080-￿-]|\\[0-9a-fA-F]{6} ?|\\[0-9a-fA-F]{1,5}(?![0-9a-fA-F]) ?|\\[^0-9a-fA-F\n\r\f])+|[a-z][a-z0-9-]{0,40}(?:\[(?:data-testid|aria-label)="(?:[^"\\\n]|\\.){0,200}"\]|:nth-of-type\([1-9][0-9]{0,4}\)))`;RegExp(`^${me}(?: > ${me}){0,79}$`);function he(e){let t=e?.drawing?.shapes;return Array.isArray(e?.images)&&e.images.length>0||(Array.isArray(t)?t.length>0:t>0)}function ge(e){let t=Array.isArray(e?.images)?e.images.length:0,n=he({drawing:e?.drawing}),r=[t===1?`image`:t?`${t} images`:``,n?`drawing`:``].filter(Boolean);return r.length?`(${r.join(` and `)})`:``}function _e(e){let t=typeof e?.body==`string`?e.body:``;return t.trim()?t:ge(e)}function ve(e){return e===`queued`||e===`working`?`done`:e===`needs-human`?null:e??null}var ye=5242880,be={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`,"image/gif":`gif`},xe=2e3,Se=60,Ce=200,we=500,Te=class extends Error{constructor(e,t,n){super(n),this.status=e,this.code=t}},Ee=e=>`shapewall-browser-comments:${window.location.pathname}:${e}`;function De(e){try{let t=JSON.parse(window.localStorage.getItem(Ee(e))||`null`);return t&&Array.isArray(t.comments)?t:null}catch{return null}}function Oe(e,t){try{window.localStorage.setItem(Ee(e),JSON.stringify(t))}catch{throw new Te(507,`storage_full`,`This browser would not save the comment (storage is full or blocked).`)}}async function ke(e,t){let n=De(e);if(n)return n;let r=await t(`data/boards/${e}/comments.json`),i=Array.isArray(r?.comments)?r.comments:[];return{nextId:Math.max(0,...i.map(e=>Number(e.id)||0))+1,comments:i}}function Ae(e){try{window.localStorage.removeItem(Ee(e))}catch{}}function je(e){let t=typeof e==`string`?e.trim():``;if(!t)throw new Te(400,`empty_body`,`Write something first.`);if(t.length>xe)throw new Te(400,`body_too_long`,`Comments are limited to ${xe} characters.`);return t}function Me(e,t){let n=ve(e.agentStatus);if(n===(e.agentStatus??null))return e;let r={...e,agentStatus:n,agentStatusAt:n?t:null};return delete r.agentBranch,r}var Ne=e=>(typeof e==`string`?e.replace(/\s+/g,` `).trim().slice(0,Se):``)||`anonymous`;function Pe(e){let t=(Array.isArray(e.replies)?e.replies:[]).map(e=>({...e,reactions:pe(e.reactions)}));return{...e,replies:t,reactions:pe(e.reactions),editedAt:typeof e.editedAt==`string`?e.editedAt:null,reopenCount:Number(e.reopenCount)>0?Number(e.reopenCount):0,reopenedAt:typeof e.reopenedAt==`string`?e.reopenedAt:null,mentions:ne({body:e.body,replies:t})}}function Fe(e){let t={};for(let n of e)t[n.pageId]=t[n.pageId]||{open:0,resolved:0},t[n.pageId][n.status]=(t[n.pageId][n.status]||0)+1;return t}async function Ie(e,t,n,r){let[i]=t.split(`?`),a=/^\/api\/boards\/([a-z0-9-]+)(\/comments(?:\/(\d+)(?:\/(resolve|reopen|replies|reactions))?)?)?$/.exec(i);if(!a)return;let[,o,s,c,l]=a;if(!s){if(e!==`GET`)return;let[t,n]=await Promise.all([r(`data/boards/${o}.json`),ke(o,r)]);return{...t,commentCounts:Fe(n.comments)}}let u=await ke(o,r),d=new Date().toISOString();if(!c){if(e===`GET`)return{comments:u.comments.map(Pe).sort((e,t)=>e.createdAt<t.createdAt?1:e.createdAt>t.createdAt?-1:t.id-e.id)};if(e!==`POST`)return;if(u.comments.length>=we)throw new Te(409,`too_many_comments`,`That is a lot of comments for a demo.`);let t=Number(n?.x),r=Number(n?.y);if(!Number.isFinite(t)||!Number.isFinite(r)||t<0||t>100||r<0||r>100)throw new Te(400,`invalid_position`,`The pin must sit on the page.`);let i={id:u.nextId,pageId:String(n?.pageId||``),viewport:String(n?.viewport||``),x:Math.round(t*100)/100,y:Math.round(r*100)/100,body:je(n?.body),author:Ne(n?.author),...n?.anchor&&typeof n.anchor==`object`?{anchor:n.anchor}:{},captureVersion:null,status:`open`,createdAt:d,updatedAt:d,resolvedAt:null,resolution:null,replies:[],agentStatus:null,agentStatusAt:null};return Oe(o,{nextId:u.nextId+1,comments:[...u.comments,i]}),{comment:Pe(i)}}let f=Number(c),p=u.comments.find(e=>e.id===f);if(!p)throw new Te(404,`unknown_comment`,`That comment does not exist.`);if(e===`DELETE`&&!l)return Oe(o,{...u,comments:u.comments.filter(e=>e.id!==f)}),{ok:!0};let m=null,h=null;if(e===`POST`&&(l===`resolve`||l===`reopen`)){let e=l===`resolve`,t=!e&&p.status===`resolved`;m={...p,status:e?`resolved`:`open`,resolvedAt:e?d:null},e?p.status!==`resolved`&&(m=Me(m,d)):m={...m,resolution:null,agentStatus:null,agentStatusAt:null},t&&(m={...m,reopenCount:(Number(p.reopenCount)||0)+1,reopenedAt:d})}else if(e===`POST`&&l===`replies`){let e=Array.isArray(p.replies)?p.replies:[];if(e.length>=Ce)throw new Te(409,`too_many_replies`,`A comment holds at most ${Ce} replies.`);h={id:Math.max(0,...e.map(e=>Number(e.id)||0))+1,author:Ne(n?.author),body:je(n?.body),createdAt:d},m={...p,replies:[...e,h]}}else if(e===`POST`&&l===`reactions`){let e=n?.replyId??null,t=Array.isArray(p.replies)?p.replies:[],r=e===null?p:t.find(t=>Number(t.id)===Number(e));if(!r)throw new Te(404,`unknown_reply`,`That reply does not exist.`);let i;try{i=fe(r.reactions,n?.emoji,{name:Ne(n?.author)})}catch(e){throw new Te(400,e.code||`invalid_reaction`,e.message)}let a=e===null?{...p,reactions:i.reactions}:{...p,replies:t.map(e=>e===r?{...e,reactions:i.reactions}:e)};return Oe(o,{...u,comments:u.comments.map(e=>e.id===f?a:e)}),{comment:Pe(a),added:i.added}}else if(e===`PATCH`&&!l){if(m={...p},n?.body!==void 0){let e=je(n.body);e!==p.body&&(m={...m,body:e,editedAt:d})}(n?.status===`open`||n?.status===`resolved`)&&n.status!==p.status&&(m.status=n.status,m.resolvedAt=n.status===`resolved`?d:null,n.status===`open`?(m.resolution=null,m.reopenCount=(Number(p.reopenCount)||0)+1,m.reopenedAt=d):m=Me(m,d))}else return;return m.updatedAt=d,Oe(o,{...u,comments:u.comments.map(e=>e.id===f?m:e)}),h?{comment:Pe(m),reply:h}:{comment:Pe(m)}}var Le=!1,Re=null,ze=new Set,Be=e=>(ze.add(e),()=>ze.delete(e)),Ve=()=>0;function He(){return(0,c.useSyncExternalStore)(Be,Ve,Ve),Re}var Ue=new Map,We=45e3,Ge=e=>typeof document<`u`&&!!document.querySelector(`meta[name="${e}"]`),Ke=Ge(`shapewall-static`),qe=Ke&&Ge(`shapewall-browser-comments`),Je=`shapewall-settings-token`,Ye=`X-Shapewall-Settings-Token`;function Xe(){if(typeof window>`u`||Ke)return null;try{let e=new URLSearchParams(window.location.hash.replace(/^#/,``)),t=e.get(`settings-token`);if(t){window.sessionStorage.setItem(Je,t),e.delete(`settings-token`);let n=e.toString();window.history.replaceState(window.history.state,``,`${window.location.pathname}${window.location.search}${n?`#${n}`:``}`)}return window.sessionStorage.getItem(Je)}catch{return null}}var Ze=Xe();typeof window<`u`&&!Ke&&window.addEventListener(`hashchange`,()=>{if(!new URLSearchParams(window.location.hash.replace(/^#/,``)).get(`settings-token`))return;let e=Xe();e&&!new URLSearchParams(window.location.hash.replace(/^#/,``)).has(`settings-token`)&&(Ze=e,window.location.reload())});function Qe(){Ze=null;try{window.sessionStorage.removeItem(Je)}catch{}}var $e=()=>Ze?{[Ye]:Ze}:{},et=(e,t)=>e===`/api/info`||e.startsWith(`/api/app-update`)||e.startsWith(`/api/agent/settings`)||e===`/api/agent/status`||e.startsWith(`/api/agent/feedback`)||e.startsWith(`/api/agent/branches`)||/^\/?api\/agent\/boards\//.test(e)&&e.includes(`/threads`)||/^\/?api\/agent\/boards\/[a-z0-9-]+\/batch(\/|$)/.test(e)||e.startsWith(`/api/devices`)||e.startsWith(`/api/share/`)||/^\/api\/boards\/[a-z0-9-]+\/checks\/run$/.test(e)||t!==`GET`&&e.startsWith(`/api/agent/boards/`)&&e.includes(`/threads/`);function tt(e){let[t,n=``]=e.split(`?`);if(t===`/api/info`)return`data/info.json`;if(t===`/api/boards`)return`data/boards.json`;let r=/^\/api\/boards\/([a-z0-9-]+)$/.exec(t);if(r)return`data/boards/${r[1]}.json`;if(r=/^\/api\/boards\/([a-z0-9-]+)\/checks$/.exec(t),r){let e=new URLSearchParams(n).get(`env`);return e&&/^[a-z0-9][a-z0-9-]{0,63}$/.test(e)?`data/boards/${r[1]}/checks-${e}.json`:`data/boards/${r[1]}/checks.json`}if(r=/^\/api\/boards\/([a-z0-9-]+)\/comments$/.exec(t),r)return`data/boards/${r[1]}/comments.json`;if(r=/^\/api\/boards\/([a-z0-9-]+)\/journeys$/.exec(t),r)return`data/boards/${r[1]}/journeys.json`;if(r=/^\/api\/boards\/([a-z0-9-]+)\/compare$/.exec(t),r){let e=new URLSearchParams(n),[t,i]=[e.get(`a`)||``,e.get(`b`)||``];if(/^[a-z0-9-]+$/.test(t)&&/^[a-z0-9-]+$/.test(i))return`data/boards/${r[1]}/compare/${t}_${i}.json`}return null}var nt=class extends Error{constructor(e,t,n,{details:r=null,retryAfter:i=null}={}){super(n),this.status=e,this.code=t,this.details=r,this.retryAfter=i}},rt=(e,t)=>new nt(e,t?.error?.code||`http_error`,t?.error?.message||`Request failed (${e})`,{details:t?.error?.details||null});async function it(e){let t=await fetch(e,{headers:{Accept:`application/json`},cache:`no-store`});if(!t.ok)throw new nt(t.status,`http_error`,`Request failed (${t.status})`);return t.json()}var at=1e3,ot=e=>new Promise(t=>setTimeout(t,e));async function st(e,t,n){for(let r=0;;r+=at)try{return await ct(e,t,n)}catch(t){if(e===`GET`||t?.status!==409||t.code!==`test_running`||r>=45e3)throw t;await ot(at)}}async function ct(e,t,n){if(qe){let r=await Ie(e,t,n,it);if(r!==void 0)return r}let r=Ke?tt(t):Ge(`shapewall-local-console`)?t:t.replace(/^\//,``);if(!r||Ke&&e!==`GET`)throw new nt(404,`static`,`Not available in a static export.`);let i=n===void 0?{Accept:`application/json`}:{Accept:`application/json`,"Content-Type":`application/json`};Ze&&et(t,e)&&(i[Ye]=Ze);let a=await fetch(r,{method:e,headers:i,body:n===void 0?void 0:JSON.stringify(n),cache:`no-store`}),o=null;try{o=await a.json()}catch{o=null}if(!a.ok)throw dt(a.status,o?.error?.code),rt(a.status,o);return o}var lt=`shapewall:access-lost`,ut={share_ended:`share`,signed_out:`signed_out`,unknown_workspace:`removed`,unknown_project:`removed`};function dt(e,t){if(Ke||typeof window>`u`)return;e===401&&t===`pairing_required`&&window.dispatchEvent(new CustomEvent(`shapewall:pairing-required`));let n=(e===401||e===404)&&ut[t];n&&window.dispatchEvent(new CustomEvent(lt,{detail:{kind:n}}))}var ft={get:e=>st(`GET`,e),post:(e,t={})=>st(`POST`,e,t),patch:(e,t={})=>st(`PATCH`,e,t),delete:e=>st(`DELETE`,e)},pt=encodeURIComponent;function mt(e,t,n,r){return Ke?`data/boards/${pt(e)}/${t}/${pt(n)}`:`api/boards/${pt(e)}/${t}/${pt(n)}?v=${pt(r||`0`)}`}function ht(e,t){return Ke?`data/boards/${pt(e)}/comment-files/${pt(t)}`:`api/boards/${pt(e)}/comment-files/${pt(t)}`}function gt(e,t,n,r){return Ke?`data/boards/${pt(e)}/${t}/${pt(n)}`:`api/boards/${pt(e)}/${t===`variants`?`variant-elements`:`elements`}/${pt(n)}?v=${pt(r||`0`)}`}function _t(e,t,n,r){return Ke?`data/boards/${pt(e)}/${t}/${pt(n)}`:`api/boards/${pt(e)}/${t===`variants`?`variant-live`:`live`}/${pt(n)}?v=${pt(r||`0`)}`}function vt(e,{pollMs:t=0}={}){let[n,r]=(0,c.useState)({data:null,error:null,loading:!0}),i=(0,c.useRef)(0),a=(0,c.useRef)(null),o=(0,c.useCallback)(async()=>{if(!e)return null;let t=++i.current;try{let n=await ft.get(e);if(t===i.current){let e=JSON.stringify(n),t=e===a.current;a.current=e,r(e=>t&&!e.error&&!e.loading?e:{data:n,error:null,loading:!1})}return n}catch(e){return t===i.current&&r(t=>({data:t.data,error:e,loading:!1})),null}},[e]);(0,c.useEffect)(()=>{a.current=null,r({data:null,error:null,loading:!0}),o()},[o]),(0,c.useEffect)(()=>{if(!t||!e)return;let n=window.setInterval(()=>{document.visibilityState===`visible`&&o()},t);return()=>window.clearInterval(n)},[t,o,e]);let s=(0,c.useCallback)(e=>{i.current+=1,a.current=null,r(t=>({...t,data:typeof e==`function`?e(t.data):e}))},[]);return{...n,refetch:o,setData:s}}function yt(e){let[t,n]=(0,c.useState)(e);return e&&!t&&n(!0),t||e}function bt(e){let t=(0,c.useCallback)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]);return(0,c.useSyncExternalStore)(t,()=>window.matchMedia(e).matches,()=>!1)}var xt=new Set,St=()=>xt.forEach(e=>e()),Ct=null,wt=typeof window<`u`?window.location.search:``;function Tt(e){wt=e,window.location.search!==e&&window.history.replaceState(window.history.state,``,`${window.location.pathname}${e}`),St()}function Et(e){if(kt>0){Ct={...Ct||{},...e};return}let t=new URLSearchParams(wt);for(let[n,r]of Object.entries(e))r==null||r===``?t.delete(n):t.set(n,String(r));let n=t.toString();Tt(n?`?${n}`:``)}function Dt(){let e=(0,c.useSyncExternalStore)(e=>(xt.add(e),()=>xt.delete(e)),()=>wt,()=>``);return[new URLSearchParams(e),(0,c.useCallback)(e=>Et(e),[])]}var Ot=[],kt=0,At=[],jt=0;function Mt(){jt===0&&(kt+=1,queueMicrotask(()=>{let e=jt;jt=0,window.history.go(-e)})),jt+=1}function Nt(e){e.pushed=!0,window.history.pushState({...window.history.state||{},shapewallOverlay:Ot.length},``,window.location.href)}typeof window<`u`&&window.addEventListener(`popstate`,()=>{if(Tt(wt),kt>0){if(--kt,kt===0){if(Ct){let e=Ct;Ct=null,Et(e)}let e=At;At=[];for(let t of e)Ot.includes(t)&&Nt(t);let t=Pt;Pt=[];for(let e of t)e()}return}let e=Ot.pop();e&&e.close()});var Pt=[];function Ft(e){let t=typeof e==`string`?()=>window.location.assign(e):e;setTimeout(()=>{kt>0||jt>0?Pt.push(t):t()},30)}function It(e,t){let n=(0,c.useRef)(t);(0,c.useEffect)(()=>{n.current=t}),(0,c.useEffect)(()=>{if(!e)return;let t={close:()=>n.current(),pushed:!1};return Ot.push(t),kt>0?At.push(t):Nt(t),()=>{let e=Ot.indexOf(t);e<0||(Ot.splice(e,1),t.pushed?Mt():At=At.filter(e=>e!==t))}},[e])}function Lt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Lt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Rt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Lt(e))&&(r&&(r+=` `),r+=t);return r}var zt=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Bt=(e,t)=>({classGroupId:e,validator:t}),Vt=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ht=`-`,Ut=[],Wt=`arbitrary..`,Gt=e=>{let t=Jt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return qt(e);let n=e.split(Ht);return Kt(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?zt(i,t):t:i||Ut}return n[e]||Ut}}},Kt=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Kt(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ht):e.slice(t).join(Ht),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},qt=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Wt+r:void 0})(),Jt=e=>{let{theme:t,classGroups:n}=e;return Yt(n,t)},Yt=(e,t)=>{let n=Vt();for(let r in e){let i=e[r];Xt(i,n,r,t)}return n},Xt=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Zt(i,t,n,r)}},Zt=(e,t,n,r)=>{typeof e==`string`?Qt(e,t,n):typeof e==`function`?$t(e,t,n,r):en(e,t,n,r)},Qt=(e,t,n)=>{let r=e===``?t:tn(t,e);r.classGroupId=n},$t=(e,t,n,r)=>{nn(e)?Xt(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(Bt(n,e)))},en=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Xt(o,tn(t,a),n,r)}},tn=(e,t)=>{let n=e,r=t.split(Ht),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Vt(),n.nextPart.set(t,i)),n=i}return n},nn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,rn=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},an=`!`,on=`:`,sn=[],cn=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ln=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===on){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(an)?(c=s.slice(0,-1),l=!0):s.startsWith(an)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return cn(t,l,c,u)};if(t){let e=t+on,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):cn(sn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},un=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},dn=e=>({cache:rn(e.cacheSize),parseClassName:ln(e),sortModifiers:un(e),postfixLookupClassGroupIds:fn(e),...Gt(e)}),fn=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},pn=/\s+/,mn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(pn),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+an:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},hn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=gn(n))&&(i&&(i+=` `),i+=r);return i},gn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=gn(e[r]))&&(n&&(n+=` `),n+=t);return n},_n=(e,...t)=>{let n,r,i,a,o=o=>(n=dn(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=mn(e,n);return i(e,a),a};return a=o,(...e)=>a(hn(...e))},vn=[],yn=e=>{let t=t=>t[e]||vn;return t.isThemeGetter=!0,t.themeKey=e,t},bn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Cn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wn=/\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$/,Tn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,En=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,On=e=>Sn.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),kn=e=>!!e&&Number.isInteger(Number(e)),An=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),jn=e=>Cn.test(e),Mn=()=>!0,Nn=e=>wn.test(e)&&!Tn.test(e),Pn=()=>!1,Fn=e=>En.test(e),In=e=>Dn.test(e),Ln=e=>!V(e)&&!H(e),Rn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),zn=e=>er(e,ir,Pn),V=e=>bn.test(e),Bn=e=>er(e,ar,Nn),Vn=e=>er(e,or,B),Hn=e=>er(e,cr,Mn),Un=e=>er(e,sr,Pn),Wn=e=>er(e,nr,Pn),Gn=e=>er(e,rr,In),Kn=e=>er(e,lr,Fn),H=e=>xn.test(e),qn=e=>tr(e,ar),Jn=e=>tr(e,sr),Yn=e=>tr(e,nr),Xn=e=>tr(e,ir),Zn=e=>tr(e,rr),Qn=e=>tr(e,lr,!0),$n=e=>tr(e,cr,!0),er=(e,t,n)=>{let r=bn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tr=(e,t,n=!1)=>{let r=xn.exec(e);return r?r[1]?t(r[1]):n:!1},nr=e=>e===`position`||e===`percentage`,rr=e=>e===`image`||e===`url`,ir=e=>e===`length`||e===`size`||e===`bg-size`,ar=e=>e===`length`,or=e=>e===`number`,sr=e=>e===`family-name`,cr=e=>e===`number`||e===`weight`,lr=e=>e===`shadow`,ur=()=>{let e=yn(`color`),t=yn(`font`),n=yn(`text`),r=yn(`font-weight`),i=yn(`tracking`),a=yn(`leading`),o=yn(`breakpoint`),s=yn(`container`),c=yn(`spacing`),l=yn(`radius`),u=yn(`shadow`),d=yn(`inset-shadow`),f=yn(`text-shadow`),p=yn(`drop-shadow`),m=yn(`blur`),h=yn(`perspective`),g=yn(`aspect`),_=yn(`ease`),v=yn(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[On,`full`,`auto`,...w()],E=()=>[kn,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,kn,H,V]},kn,H,V],O=()=>[kn,`auto`,H,V],k=()=>[`auto`,`min`,`max`,`fr`,H,V],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[On,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,On,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[On,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,H,V],ee=()=>[...b(),Yn,Wn,{position:[H,V]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Xn,zn,{size:[H,V]}],re=()=>[An,qn,Bn],L=()=>[``,`none`,`full`,l,H,V],R=()=>[``,B,qn,Bn],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[B,An,Yn,Wn],oe=()=>[``,`none`,m,H,V],se=()=>[`none`,B,H,V],ce=()=>[`none`,B,H,V],le=()=>[B,H,V],ue=()=>[On,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[jn],breakpoint:[jn],color:[Mn],container:[jn],"drop-shadow":[jn],ease:[`in`,`out`,`in-out`],font:[Ln],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[jn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[jn],shadow:[jn],spacing:[`px`,B],text:[jn],"text-shadow":[jn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,On,V,H,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,H,V]}],"container-named":[Rn],columns:[{columns:[B,`auto`,V,H,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[kn,`auto`,H,V]}],basis:[{basis:[On,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,On,`auto`,`initial`,`none`,V]}],grow:[{grow:[``,B,H,V]}],shrink:[{shrink:[``,B,H,V]}],order:[{order:[kn,`first`,`last`,`none`,H,V]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,qn,Bn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,$n,Hn]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,An,V]}],"font-family":[{font:[Jn,Un,t]}],"font-features":[{"font-features":[V]}],"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:[i,H,V]}],"line-clamp":[{"line-clamp":[B,`none`,H,Vn]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,H,Bn]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[B,`auto`,H,V]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[kn,H,V]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],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`,H,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},kn,H,V],radial:[``,H,V],conic:[``,kn,H,V]},Zn,Gn]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,H,V]}],"outline-w":[{outline:[``,B,qn,Bn]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,Qn,Kn]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Qn,Kn]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[B,Bn]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Qn,Kn]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[B,H,V]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"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":[B]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[B]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:oe()}],brightness:[{brightness:[B,H,V]}],contrast:[{contrast:[B,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Qn,Kn]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,B,H,V]}],"hue-rotate":[{"hue-rotate":[B,H,V]}],invert:[{invert:[``,B,H,V]}],saturate:[{saturate:[B,H,V]}],sepia:[{sepia:[``,B,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[B,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[B,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,B,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[B,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[B,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,H,V]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[B,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[kn,H,V]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,H,V]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,H,V]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[B,qn,Bn,Vn]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],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":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`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-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`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-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`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-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},dr=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(fr(e,`cacheSize`,t),fr(e,`prefix`,n),fr(e,`experimentalParseClassName`,r),pr(e.theme,a.theme),pr(e.classGroups,a.classGroups),pr(e.conflictingClassGroups,a.conflictingClassGroups),pr(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),fr(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),fr(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),mr(e.theme,i.theme),mr(e.classGroups,i.classGroups),mr(e.conflictingClassGroups,i.conflictingClassGroups),mr(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),hr(e,i,`postfixLookupClassGroups`),hr(e,i,`orderSensitiveModifiers`),e),fr=(e,t,n)=>{n!==void 0&&(e[t]=n)},pr=(e,t)=>{if(t)for(let n in t)fr(e,n,t[n])},mr=(e,t)=>{if(t)for(let n in t)hr(e,t,n)},hr=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},gr=((e,...t)=>typeof e==`function`?_n(ur,e,...t):_n(()=>dr(ur(),e),...t))({extend:{theme:{text:[`caption`,`ui`,`title`,`heading`,`display`],shadow:[`card`,`pop`,`lift`,`thumb`]}}});function U(...e){return gr(Rt(e))}var _r=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]],vr=null,yr=0;function br(e,t=Date.now()){let n=Date.parse(e||``),r=Number.isFinite(n)?n:null;r!==vr&&(vr=r,yr=r===null?0:Math.max(0,t-r))}function xr(e){let t=new Date(e).getTime();return Number.isFinite(t)?vr!==null&&t<=vr?t+yr:t:NaN}function Sr(e,t=Date.now()){let n=xr(e);if(!Number.isFinite(n))return``;let r=Math.round((n-t)/1e3),i=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,t]of _r)if(Math.abs(r)>=t)return i.format(Math.round(r/t),e);return`just now`}var Cr=`shapewall.author`;function wr(){try{return window.localStorage.getItem(Cr)||``}catch{return``}}function Tr(e){try{window.localStorage.setItem(Cr,e)}catch{}}var Er=new Map,Dr=new Set,Or=e=>String(e||``).trim().toLowerCase();function kr(e){let t=new Map;for(let n of e||[])n?.label&&(n.icon||n.logo||n.tint)&&t.set(Or(n.label),{icon:n.icon||null,tint:n.tint||null,logo:n.logo||null});if(!(t.size===Er.size&&[...t].every(([e,t])=>JSON.stringify(Er.get(e))===JSON.stringify(t)))){Er=t;for(let e of Dr)e()}}var Ar=new Map;function jr(e){let t=new Map;for(let n of e||[])n?.id&&t.set(n.id,{icon:n.icon||null,tint:n.tint||null,logo:n.logo||null,label:n.name||null});if(!(t.size===Ar.size&&[...t].every(([e,t])=>JSON.stringify(Ar.get(e))===JSON.stringify(t)))){Ar=t,Er=new Map(Er);for(let e of Dr)e()}}var Mr=e=>(Dr.add(e),()=>Dr.delete(e)),Nr=()=>Er;function Pr(e,t=null){let n=(0,c.useSyncExternalStore)(Mr,Nr,Nr),r=t?Ar.get(t):null;if(r)return{icon:r.icon,tint:r.tint,logo:r.logo};let i=n.get(Or(e));if(i)return i;for(let t of Ar.values())if(t.label&&Or(t.label)===Or(e))return{icon:t.icon,tint:t.tint,logo:t.logo};return null}var Fr=[`boxy`,`dot`,`cyclops`,`ghost`,`cat`,`owl`,`bear`,`alien`,`cloud`,`planet`,`hex`,`drop`],Ir=[`blue`,`violet`,`pink`,`amber`,`green`,`cyan`,`indigo`,`magenta`],Lr=/^upload:([0-9a-f]{32})$/,Rr=[[0,31],[127,159],[8203,8207],[8232,8238],[8288,8297],[65279,65279]],zr=e=>[...e].some(e=>Rr.some(([t,n])=>e.codePointAt(0)>=t&&e.codePointAt(0)<=n));function Br(e){if(e==null)return{name:null,problem:null};if(typeof e!=`string`)return{name:null,problem:`name: text, 1 to 40 characters`};if(zr(e))return{name:null,problem:`name: one line of plain text, without control characters`};let t=e.trim();return t?[...t].length>40?{name:null,problem:`name: at most 40 characters`}:{name:t,problem:null}:{name:null,problem:null}}var Vr=e=>typeof e==`string`&&Lr.test(e),Hr=e=>typeof e==`string`&&Lr.exec(e)?.[1]||null,Ur=`Simple Icons 16.37.0 (https://simpleicons.org), CC0 1.0`,Wr=[{id:`claude`,name:`Claude`,owner:`Anthropic, PBC`,agents:[`claude`],viewBox:`0 0 24 24`,path:`m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`,source:`${Ur}, icons/claude.svg`},{id:`openai`,name:`OpenAI`,owner:`OpenAI`,agents:[`codex`],viewBox:`0 0 24 24`,path:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,source:`Simple Icons 15.22.0 (https://simpleicons.org), CC0 1.0, icons/openai.svg`},{id:`goose`,name:`goose`,owner:`LF Projects, LLC`,agents:[`goose`],viewBox:`0 0 45 45`,path:`M43.2098 39.2492L39.8118 36.4522C37.9646 34.9318 36.3923 33.1051 35.1631 31.0529C33.4647 28.2172 31.1178 25.8243 28.3164 24.071L26.9482 23.2744C26.4794 22.9485 26.1525 22.4405 26.106 21.8675C26.0762 21.4981 26.1647 21.1678 26.3712 20.8771C27.0837 19.873 30.9617 15.6995 31.6365 15.1411C32.5056 14.4228 33.4739 13.8253 34.3724 13.1412C34.5001 13.0438 34.6283 12.9469 34.7545 12.8481C34.7589 12.8437 34.7653 12.8403 34.7692 12.8363C35.0574 12.6088 35.3295 12.3671 35.5458 12.0803C36.5993 10.8604 36.5783 9.82938 36.5783 9.82938C36.5783 9.82938 36.5793 9.8284 36.5798 9.82791C36.4677 9.5534 36.0645 8.69902 35.2449 8.29825C35.9696 8.28406 36.7872 8.55564 37.1582 8.91873C37.6039 8.21947 37.8922 7.76585 38.3404 7.00347C38.4471 6.82241 38.5038 6.48771 38.2998 6.30029C38.2998 6.30029 38.2988 6.30029 38.2978 6.30029C38.2978 6.30029 38.2978 6.29931 38.2978 6.29833C38.2939 6.29442 38.289 6.29148 38.2851 6.28757C38.2812 6.28365 38.2787 6.27925 38.2743 6.27485C38.2743 6.27485 38.2734 6.27485 38.2724 6.27485C38.2724 6.27485 38.2724 6.27387 38.2724 6.27289C38.2641 6.26457 38.2548 6.25821 38.246 6.25038C38.2406 6.245 38.2362 6.23864 38.2313 6.23276C38.2254 6.22787 38.219 6.22347 38.2137 6.21808C38.2053 6.20977 38.2 6.19949 38.1911 6.19166C38.1911 6.19166 38.1897 6.19117 38.1892 6.19166C38.1892 6.19166 38.1892 6.19068 38.1892 6.1897C38.1853 6.18579 38.1804 6.18285 38.1765 6.17894C38.1726 6.17502 38.1696 6.17013 38.1657 6.16621C38.1657 6.16621 38.1642 6.16572 38.1637 6.16621C38.1637 6.16621 38.1637 6.16524 38.1637 6.16426C37.9763 5.9602 37.6416 6.01697 37.4606 6.12364C36.4692 6.70693 35.5047 7.33475 34.6351 7.88525C34.6351 7.88525 33.6046 7.86372 32.3842 8.91775C32.097 9.13452 31.8552 9.4066 31.6282 9.69433C31.6238 9.69873 31.6199 9.7046 31.6164 9.70901C31.5171 9.83476 31.4202 9.96297 31.3233 10.0912C30.6387 10.9901 30.0417 11.958 29.3234 12.8271C28.7656 13.5023 24.5915 17.3798 23.5874 18.0923C23.2967 18.2988 22.9669 18.3879 22.597 18.3575C22.0245 18.3115 21.5161 17.9842 21.1902 17.5154L20.3935 16.1472C18.6402 13.3448 16.2474 10.9989 13.4117 9.30041C11.3594 8.0712 9.5332 6.49847 8.01234 4.65172L5.2153 1.25377C5.0773 1.08642 4.81306 1.11382 4.71422 1.30662C4.39615 1.92612 3.78888 3.23411 3.32353 4.99327C3.31227 5.03487 3.32206 5.07891 3.34946 5.11218C3.92786 5.81095 5.26717 7.35089 6.8624 8.65351C6.97348 8.74403 6.88246 8.92313 6.74447 8.88496C5.36846 8.51013 4.03062 7.90825 3.02944 7.39542C2.94772 7.35383 2.84887 7.4057 2.83713 7.49672C2.68152 8.74354 2.64139 10.1127 2.80581 11.5562C2.8107 11.6032 2.84055 11.6438 2.8841 11.6629C4.02572 12.1596 5.85143 12.8804 7.76816 13.3389C7.90713 13.3722 7.90273 13.5723 7.76229 13.5992C6.26982 13.8801 4.70688 13.9427 3.43656 13.9261C3.3475 13.9251 3.28193 14.0093 3.30591 14.0949C3.56085 14.9958 3.90632 15.9118 4.3619 16.8342C4.55029 17.2487 4.75532 17.6553 4.97504 18.0532C5.01271 18.1212 5.08562 18.1618 5.16343 18.1584C6.21207 18.107 7.47946 17.9964 8.75369 17.7713C8.97095 17.7331 9.08741 18.0189 8.90391 18.1417C8.03877 18.7201 7.11588 19.2183 6.25758 19.6283C6.14259 19.6836 6.1054 19.8304 6.18125 19.9327C6.69114 20.6236 7.25191 21.2774 7.86114 21.8866C7.86114 21.8866 10.8608 24.9763 10.9425 25.2185C12.6928 23.4261 15.5701 21.4394 18.7474 19.7047C14.4921 23.1672 12.1198 25.7235 10.9258 27.1758L10.0935 28.3439C9.66091 28.9507 9.2856 29.5951 8.97193 30.2709C7.92231 32.5292 6.19201 37.0966 6.19201 37.0966C6.0594 37.4543 6.16755 37.8072 6.39753 38.0371C6.40292 38.0425 6.4083 38.0479 6.41417 38.0528C6.41955 38.0582 6.42445 38.0641 6.42983 38.0694C6.66031 38.2999 7.01263 38.4076 7.37033 38.275C7.37033 38.275 11.9368 36.5447 14.1961 35.495C14.8719 35.1814 15.5168 34.8056 16.1231 34.3735L17.4095 33.457C18.0907 32.9715 19.0234 33.0489 19.615 33.6405L22.5804 36.6058C23.1896 37.2151 23.8433 37.7758 24.5343 38.2857C24.637 38.3611 24.7833 38.3244 24.8386 38.2094C25.2492 37.3516 25.7473 36.4277 26.3252 35.5631C26.4481 35.3796 26.7343 35.4965 26.6957 35.7133C26.4701 36.988 26.3605 38.2554 26.3086 39.3035C26.3047 39.3809 26.3458 39.4543 26.4138 39.4919C26.8112 39.7121 27.2178 39.9172 27.6327 40.1051C28.5551 40.5606 29.4717 40.9066 30.3721 41.1611C30.4577 41.185 30.5419 41.1195 30.5409 41.0304C30.5237 39.7596 30.5864 38.1967 30.8677 36.7047C30.8942 36.5638 31.0943 36.5593 31.1281 36.6988C31.5861 38.616 32.3069 40.4417 32.8041 41.5829C32.8231 41.6264 32.8633 41.6558 32.9107 41.6612C34.3543 41.8256 35.7234 41.7855 36.9703 41.6298C37.0618 41.6186 37.1136 41.5197 37.0715 41.4375C36.5587 40.4364 35.9568 39.0975 35.582 37.7225C35.5443 37.584 35.7229 37.4935 35.8135 37.6046C37.1161 39.1998 38.656 40.5391 39.3548 41.1175C39.3881 41.1449 39.4326 41.1542 39.4737 41.1434C41.2333 40.6786 42.5413 40.0713 43.1604 39.7528C43.3532 39.6539 43.3806 39.3897 43.2132 39.2517L43.2098 39.2492Z`,source:`github.com/aaif-goose/goose at 0c5b5e2f2e7933fca4de5377d239645dcbe4cbb3, documentation/static/img/goose.svg (Apache 2.0; LF Projects trademark policy)`},{id:`gemini`,name:`Google Gemini`,owner:`Google LLC`,agents:[`gemini`],viewBox:`0 0 24 24`,path:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,source:`${Ur}, icons/googlegemini.svg`}],Gr=e=>Wr.find(t=>t.id===e)||null,Kr=e=>Wr.find(t=>t.agents.includes(e))?.id||null;function qr(e){let t=Array.isArray(e?.profiles)?e.profiles:[],n=e?.profileId||`default`,r=t.find(e=>e.id==="default"),i=r?.sameAs||`default`,a=t.filter(e=>!(e.id==="default"&&e.sameAs)).map(e=>({id:e.id,label:e.label||(e.id==="default"?`Default connection`:e.id),configured:e.configured!==!1,state:e.configured===!1?`unavailable`:e.state||`ready`,loginHint:e.loginHint||null,line:typeof e.line==`string`&&e.line?e.line:null,isDefault:e.id===i,icon:e.icon||null,tint:e.tint||null,logo:e.logo||null})),o=n==="default"&&r?.sameAs?r.sameAs:n,s=a.some(e=>e.id===o);return{show:t.length>0&&(a.length>1||!s),value:o,known:s,options:a}}function Jr(e,t){let{value:n}=qr(e);return t===n?null:t}function Yr(e){let{value:t,options:n}=qr(e);return n.find(e=>e.id!==t&&e.configured)||null}var Xr={ready:`Ready`,login:`Not signed in`,starting:`Starting`,testing:`Testing the connection`,"not-responding":`Not responding`,unavailable:`Not set up`},Zr={ready:`bg-ok`,login:`bg-warn`,starting:`bg-accent motion-safe:animate-pulse`,testing:`bg-accent motion-safe:animate-pulse`,"not-responding":`bg-bad`,unavailable:`bg-faint`};function Qr(e){return e?`Sign in: ${String(e).split(/, or /)[0]}`:null}function $r(e){if(e?.line)return e.line;let t=Xr[e?.state]||Xr.ready;return e?.state===`login`&&e.loginHint?`${t}. ${Qr(e.loginHint)}`:t}function ei(e){let t=String(e||`?`).trim().split(/\s+/).filter(Boolean);if(!t.length)return`?`;if(t.length>1)return(t[0][0]+t[1][0]).toUpperCase();let n=t[0];return n[0].toUpperCase()+(n[1]||``).toLowerCase()}function ti(e){return`Switched to ${e}. It starts fresh and can read this chat.`}function ni(e){if(!e?.configured)return{name:null,options:[],defaultId:null};let t=Array.isArray(e.profiles)?e.profiles:[],{options:n}=qr({profileId:`default`,profiles:t}),r=n.filter(e=>e.configured),i=t.find(e=>e.id==="default")?.sameAs||`default`;return{name:e.label||r.find(e=>e.isDefault)?.label||null,options:r.length>1?r:[],defaultId:i}}function ri({threadProfile:e=`default`,wanted:t,defaultId:n}){let r=e=>e==="default"||e===n,i=e||`default`;return i===t||r(i)&&r(t)?null:t}function ii({again:e,name:t}){return e?`Fix again`:t?`Fix with ${t}`:`Fix with agent`}var ai=e=>hi[Ir.indexOf(e)]||null,oi={blue:`Blue`,violet:`Violet`,pink:`Pink`,amber:`Amber`,green:`Green`,cyan:`Cyan`,indigo:`Indigo`,magenta:`Magenta`},W=`#fff`,G=`currentColor`,si=(e=26)=>(0,P.jsx)(`path`,{d:`M16.5 ${e}q3.5 2.8 7 0`,fill:`none`,stroke:G,strokeWidth:`1.8`,strokeLinecap:`round`}),ci={boxy:{name:`Square robot`,tint:`blue`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 13V8`,stroke:W,strokeWidth:`2.4`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`20`,cy:`7`,r:`2.6`,fill:W}),(0,P.jsx)(`rect`,{x:`5.5`,y:`18.5`,width:`4`,height:`7`,rx:`2`,fill:W,opacity:`.75`}),(0,P.jsx)(`rect`,{x:`30.5`,y:`18.5`,width:`4`,height:`7`,rx:`2`,fill:W,opacity:`.75`}),(0,P.jsx)(`rect`,{x:`9`,y:`12.5`,width:`22`,height:`19`,rx:`5.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.5`,cy:`20.5`,r:`2.3`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.5`,cy:`20.5`,r:`2.3`,fill:G}),(0,P.jsx)(`rect`,{x:`15.5`,y:`25.5`,width:`9`,height:`2.2`,rx:`1.1`,fill:G})]})},dot:{name:`Round robot`,tint:`green`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M13.5 13.5 11 8.5M26.5 13.5 29 8.5`,stroke:W,strokeWidth:`2.2`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`10.6`,cy:`7.6`,r:`2.2`,fill:W}),(0,P.jsx)(`circle`,{cx:`29.4`,cy:`7.6`,r:`2.2`,fill:W}),(0,P.jsx)(`circle`,{cx:`20`,cy:`22`,r:`11.5`,fill:W}),(0,P.jsx)(`rect`,{x:`11.5`,y:`17`,width:`17`,height:`8`,rx:`4`,fill:G}),(0,P.jsx)(`circle`,{cx:`16.3`,cy:`21`,r:`1.7`,fill:W}),(0,P.jsx)(`circle`,{cx:`23.7`,cy:`21`,r:`1.7`,fill:W})]})},cyclops:{name:`One-eyed robot`,tint:`violet`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`rect`,{x:`8`,y:`8.5`,width:`24`,height:`24`,rx:`9`,fill:W}),(0,P.jsx)(`circle`,{cx:`20`,cy:`18.5`,r:`6.2`,fill:G}),(0,P.jsx)(`circle`,{cx:`20`,cy:`18.5`,r:`2.6`,fill:W}),(0,P.jsx)(`rect`,{x:`16`,y:`27.3`,width:`8`,height:`2`,rx:`1`,fill:G})]})},ghost:{name:`Ghost`,tint:`indigo`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M9 32V19a11 11 0 0 1 22 0v13l-3.7-3.2-3.6 3.2-3.7-3.2-3.7 3.2-3.6-3.2z`,fill:W}),(0,P.jsx)(`ellipse`,{cx:`15.8`,cy:`18.8`,rx:`2.2`,ry:`2.9`,fill:G}),(0,P.jsx)(`ellipse`,{cx:`24.2`,cy:`18.8`,rx:`2.2`,ry:`2.9`,fill:G})]})},cat:{name:`Cat`,tint:`amber`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M8.5 8.5 16 13.2h8l7.5-4.7V23a11.5 9.5 0 0 1-23 0z`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.3`,cy:`21`,r:`2.2`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.7`,cy:`21`,r:`2.2`,fill:G}),(0,P.jsx)(`path`,{d:`M18.3 25.2h3.4L20 27.2z`,fill:G})]})},owl:{name:`Owl`,tint:`cyan`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M9 9.5 15 13h10l6-3.5V22a11 11 0 0 1-22 0z`,fill:W}),(0,P.jsx)(`circle`,{cx:`15`,cy:`19.5`,r:`4.6`,fill:G}),(0,P.jsx)(`circle`,{cx:`25`,cy:`19.5`,r:`4.6`,fill:G}),(0,P.jsx)(`circle`,{cx:`15`,cy:`19.5`,r:`1.9`,fill:W}),(0,P.jsx)(`circle`,{cx:`25`,cy:`19.5`,r:`1.9`,fill:W}),(0,P.jsx)(`path`,{d:`M18.2 24.6h3.6L20 28z`,fill:G})]})},bear:{name:`Bear`,tint:`pink`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`circle`,{cx:`10.8`,cy:`12`,r:`4.6`,fill:W}),(0,P.jsx)(`circle`,{cx:`29.2`,cy:`12`,r:`4.6`,fill:W}),(0,P.jsx)(`circle`,{cx:`20`,cy:`21.5`,r:`11`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.3`,cy:`19.5`,r:`2`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.7`,cy:`19.5`,r:`2`,fill:G}),(0,P.jsx)(`ellipse`,{cx:`20`,cy:`25.6`,rx:`4.4`,ry:`3.2`,fill:G,opacity:`.28`}),(0,P.jsx)(`ellipse`,{cx:`20`,cy:`24.4`,rx:`1.9`,ry:`1.4`,fill:G})]})},alien:{name:`Alien`,tint:`green`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 7.5c7 0 11.5 4.6 11.5 11 0 7-6 14-11.5 14S8.5 25.5 8.5 18.5c0-6.4 4.5-11 11.5-11z`,fill:W}),(0,P.jsx)(`ellipse`,{cx:`14.9`,cy:`19`,rx:`2.9`,ry:`4.3`,transform:`rotate(-24 14.9 19)`,fill:G}),(0,P.jsx)(`ellipse`,{cx:`25.1`,cy:`19`,rx:`2.9`,ry:`4.3`,transform:`rotate(24 25.1 19)`,fill:G}),(0,P.jsx)(`rect`,{x:`18`,y:`27`,width:`4`,height:`1.8`,rx:`.9`,fill:G})]})},cloud:{name:`Cloud`,tint:`magenta`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`circle`,{cx:`13.5`,cy:`22.5`,r:`6.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`20.5`,cy:`17`,r:`8.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`27.5`,cy:`22`,r:`6.5`,fill:W}),(0,P.jsx)(`rect`,{x:`7`,y:`20.5`,width:`27`,height:`9`,rx:`4.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`16.5`,cy:`20.5`,r:`1.9`,fill:G}),(0,P.jsx)(`circle`,{cx:`24`,cy:`20.5`,r:`1.9`,fill:G}),(0,P.jsx)(`path`,{d:`M17 24.6q3.3 2.6 6.6 0`,fill:`none`,stroke:G,strokeWidth:`1.8`,strokeLinecap:`round`})]})},planet:{name:`Planet`,tint:`indigo`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`ellipse`,{cx:`20`,cy:`21`,rx:`15.5`,ry:`4.8`,transform:`rotate(-18 20 21)`,fill:`none`,stroke:W,strokeWidth:`2.4`,opacity:`.7`}),(0,P.jsx)(`circle`,{cx:`20`,cy:`20`,r:`9.5`,fill:W}),(0,P.jsx)(`path`,{d:`M5.6 25.7c3.2 1.4 10-.2 17.4-2.6 5.2-1.7 9.3-3.7 11.4-5.5`,fill:`none`,stroke:W,strokeWidth:`2.4`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`16.5`,cy:`17.3`,r:`1.8`,fill:G}),(0,P.jsx)(`circle`,{cx:`23.3`,cy:`16.3`,r:`1.8`,fill:G})]})},hex:{name:`Hexagon`,tint:`cyan`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 5.5 32.6 12.7v14.6L20 34.5 7.4 27.3V12.7z`,fill:W,stroke:W,strokeWidth:`2`,strokeLinejoin:`round`}),(0,P.jsx)(`circle`,{cx:`15.5`,cy:`18.5`,r:`2.2`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.5`,cy:`18.5`,r:`2.2`,fill:G}),si(24)]})},drop:{name:`Drop`,tint:`blue`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 5c5.5 7.3 11 11.7 11 18a11 11 0 0 1-22 0c0-6.3 5.5-10.7 11-18z`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.8`,cy:`21.5`,r:`2.1`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.2`,cy:`21.5`,r:`2.1`,fill:G}),si(26.5)]})}},li=Fr,ui=e=>{let t=Hr(e);return t?`api/agent/icons/${t}`:null},di={xs:`h-4 w-4 rounded-[4px] text-[8px]`,sm:`h-5 w-5 rounded-[5px] text-[9px]`,md:`h-7 w-7 rounded-md text-[11px]`,lg:`h-10 w-10 rounded-lg text-sm`,xl:`h-14 w-14 rounded-xl text-lg`};function fi({label:e,icon:t=null,tint:n=null,logo:r=null,size:i=`md`,round:a=!1,src:o=null,className:s,...c}){let l=U(`relative inline-flex shrink-0 items-center justify-center overflow-hidden select-none`,di[i],a&&`rounded-full`),u=o||ui(t),d=!u&&t?ci[t]:null,f=!u&&!d&&!t?Gr(r):null,p={"aria-hidden":`true`,"data-sw-agent-avatar":u?`upload`:d?t:f?`logo:${f.id}`:`initials`,...c};if(u)return(0,P.jsx)(`span`,{className:U(l,`bg-surface-2`,s),...p,children:(0,P.jsx)(`img`,{src:u,alt:``,className:`h-full w-full object-cover`,draggable:`false`})});if(d){let e=ai(n)||ai(d.tint);return(0,P.jsx)(`span`,{className:U(l,s),style:{background:e,color:e},...p,children:(0,P.jsx)(`svg`,{viewBox:`0 0 40 40`,className:`h-full w-full`,focusable:`false`,children:d.art})})}if(f)return(0,P.jsx)(`span`,{className:U(l,`border border-line bg-surface-2 text-fg`,s),...p,children:(0,P.jsx)(`svg`,{viewBox:f.viewBox,className:`h-[62%] w-[62%]`,fill:`currentColor`,focusable:`false`,children:(0,P.jsx)(`path`,{d:f.path})})});let m=ai(n);return(0,P.jsx)(`span`,{className:U(l,`font-semibold`,m?`text-white`:`border border-line bg-surface-2 text-fg`,s),style:m?{background:m}:void 0,...p,children:ei(e)})}var pi=e=>({icon:e?.icon||null,tint:e?.tint||null,logo:e?.logo||null});function mi(e){let t=String(e||`?`).replace(/\(guest\)/i,``).trim().split(/\s+/).filter(Boolean);return((t[0]?.[0]||`?`)+(t.length>1?t.at(-1)[0]:``)).toUpperCase()}var hi=[`#1d4ed8`,`#6d28d9`,`#be185d`,`#b45309`,`#047857`,`#0e7490`,`#4338ca`,`#a21caf`],gi=`#3f3f46`;function _i(e){let t=String(e||``).toLowerCase(),n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)>>>0;return hi[n%hi.length]}var vi={xs:`h-5 w-5 text-[9px]`,sm:`h-6 w-6 text-[10px]`,md:`h-7 w-7 text-[11px]`,lg:`h-9 w-9 text-xs`};function yi({name:e,src:t=null,className:n,person:r=!1,agent:i=!1,agentId:a=null,colorKey:o,color:s=null,size:c=`lg`}){return t&&!i?(0,P.jsx)(xi,{src:t,name:e,className:n,person:r,colorKey:o,size:c},t):i?(0,P.jsx)(bi,{name:e,agentId:a,className:n,size:c}):r?(0,P.jsx)(`span`,{className:U(`inline-flex shrink-0 items-center justify-center rounded-full font-semibold text-white select-none`,vi[c],n),style:{background:s||_i(o||e)},"aria-hidden":`true`,children:mi(e)}):(0,P.jsx)(`span`,{className:U(`inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent/15 text-xs font-semibold text-accent select-none`,n),"aria-hidden":`true`,children:mi(e)})}function bi({name:e,agentId:t,className:n,size:r}){let i=Pr(e,t);return i?(0,P.jsx)(fi,{label:e,...i,round:!0,className:U(vi[r],n)}):(0,P.jsx)(`span`,{className:U(`inline-flex shrink-0 items-center justify-center rounded-full font-semibold text-white select-none`,vi[r],n),style:{background:gi},"aria-hidden":`true`,children:(0,P.jsx)(w,{size:r===`xs`?11:13})})}function xi({src:e,name:t,className:n,person:r,colorKey:i,size:a}){let[o,s]=(0,c.useState)(!1);return o?(0,P.jsx)(yi,{name:t,className:n,person:r,colorKey:i,size:a}):(0,P.jsx)(`span`,{className:U(`inline-flex shrink-0 overflow-hidden rounded-full bg-surface-2`,r?vi[a]:`h-9 w-9`,n),"aria-hidden":`true`,children:(0,P.jsx)(`img`,{src:e,alt:``,className:`h-full w-full object-cover`,onError:()=>s(!0),"data-sw-avatar-image":!0})})}var Si=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Ci=Rt,wi=(e,t)=>n=>{if(t?.variants==null)return Ci(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Si(t)||Si(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Ci(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Ti=wi(`inline-flex shrink-0 items-center gap-1 font-medium whitespace-nowrap`,{variants:{tone:{neutral:`border-line bg-surface-2 text-muted`,accent:`border-accent/40 bg-accent/10 text-accent`,ok:`border-ok/40 bg-ok/10 text-fg`,warn:`border-warn/50 bg-warn/15 text-fg`,bad:`border-bad/40 bg-bad/10 text-bad`,solid:`border-transparent bg-accent text-accent-fg`},shape:{chip:`rounded-full border px-1.5 text-[10.5px] leading-4`,count:`h-5 rounded-full border-0 px-1.5 text-[10px] font-semibold`,tag:`rounded border-0 px-1 text-[10px] uppercase`}},defaultVariants:{tone:`neutral`,shape:`chip`}});function Ei({tone:e,shape:t,className:n,...r}){return(0,P.jsx)(`span`,{className:U(Ti({tone:e,shape:t}),n),...r})}function Di({className:e,...t}){return(0,P.jsx)(`span`,{className:U(`inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[9px] font-bold text-white`,e),...t})}var Oi=Object.defineProperty,ki=(e,t)=>Oi(e,`name`,{value:t,configurable:!0});function Ai(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ki(Ai,`setRef`);function ji(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ai(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ai(e[t],null)}}}}ki(ji,`composeRefs`);function K(...e){return c.useCallback(ji(...e),e)}ki(K,`useComposedRefs`);var Mi=Object.defineProperty,Ni=(e,t)=>Mi(e,`name`,{value:t,configurable:!0});function Pi(e){let t=c.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=Gi(r),c.Children.forEach(r,e=>{if(Vi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;Ui(n)&&typeof Yi==`function`;)n=Yi(n._payload);a=Ri(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=c.cloneElement(a,void 0,s):!o&&c.Children.count(r)===1&&c.isValidElement(r)&&(a=r);let l=a?Bi(a):void 0,u=K(n,l);if(!a){if(r||r===0)throw Error(o?Ji(e):qi(e));return r}let d=zi(i,a.props??{});return a.type!==c.Fragment&&(d.ref=n?u:l),c.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Ni(Pi,`createSlot`);var Fi=Pi(`Slot`),Ii=Symbol.for(`radix.slottable`);function Li(e){let t=Ni(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ii,t}Ni(Li,`createSlottable`);var Ri=Ni((e,t)=>`child`in e.props?c.isValidElement(t)?c.cloneElement(t,void 0,e.props.children(t.props.children)):null:c.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function zi(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Ki(a,i))}return{...e,...n}}Ni(zi,`mergeProps`);function Bi(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ni(Bi,`getElementRef`);function Vi(e){return c.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ii}Ni(Vi,`isSlottable`);var Hi=Symbol.for(`react.lazy`);function Ui(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Hi&&`_payload`in e&&Wi(e._payload)}Ni(Ui,`isLazyComponent`);function Wi(e){return typeof e==`object`&&!!e&&`then`in e}Ni(Wi,`isPromiseLike`);function Gi(e){let t=e;for(;Ui(t)&&typeof Yi==`function`;)t=Yi(t._payload);return t}Ni(Gi,`useUnwrappedLazy`);function Ki(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ni(Ki,`concatAriaDescribedby`);var qi=Ni(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Ji=Ni(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Yi=c.use,Xi=Object.defineProperty,Zi=(e,t)=>Xi(e,`name`,{value:t,configurable:!0}),q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Pi(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,P.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qi(e,t){e&&N.flushSync(()=>e.dispatchEvent(t))}Zi(Qi,`dispatchDiscreteCustomEvent`);var $i=Object.defineProperty,ea=(e,t)=>$i(e,`name`,{value:t,configurable:!0}),ta=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),na=c.forwardRef(ea(function(e,t){return(0,P.jsx)(q.span,{...e,ref:t,style:{...ta,...e.style}})},`VisuallyHidden`)),ra=Object.defineProperty,ia=(e,t)=>ra(e,`name`,{value:t,configurable:!0});function aa(e,t){let n=c.createContext(t);n.displayName=e+`Context`;let r=ia(e=>{let{children:t,...r}=e,i=c.useMemo(()=>r,Object.values(r));return(0,P.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=c.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return ia(i,`useContext`),[r,i]}ia(aa,`createContext`);function oa(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=ia(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,P.jsx)(s.Provider,{value:l,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return ia(s,`useContext`),[o,s]}ia(r,`createContext`);let i=ia(()=>{let t=n.map(e=>c.createContext(e));return ia(function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,sa(i,...t)]}ia(oa,`createContextScope`);function sa(...e){let t=e[0];if(e.length===1)return t;let n=ia(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return ia(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}ia(sa,`composeContextScopes`);var J=globalThis?.document?c.useLayoutEffect:()=>{},ca=Object.defineProperty,Y=(e,t)=>ca(e,`name`,{value:t,configurable:!0});function la(e){let t=e+`CollectionProvider`,[n,r]=oa(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Y(e=>{let{scope:t,children:n}=e,r=c.useRef(null),a=c.useRef(new Map).current;return(0,P.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,l=Pi(s),u=c.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=K(t,a(s,n).collectionRef);return(0,P.jsx)(l,{ref:i,children:r})});u.displayName=s;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=Pi(d),m=c.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=c.useRef(null),s=K(t,o),l=a(d,n);return c.useEffect(()=>(l.itemMap.set(o,{ref:o,...i}),()=>void l.itemMap.delete(o))),(0,P.jsx)(p,{[f]:``,ref:s,children:r})});m.displayName=d;function h(t){let n=a(e+`CollectionConsumer`,t);return c.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Y(h,`useCollection`),[{Provider:o,Slot:u,ItemSlot:m},h,r]}Y(la,`createCollection`);var ua=new WeakMap,da=class e extends Map{static{Y(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ua.set(this,!0)}set(e,t){return ua.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=ma(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=fa(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=fa(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return fa(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function fa(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=pa(e,t);return n===-1?void 0:e[n]}Y(fa,`at`);function pa(e,t){let n=e.length,r=ma(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Y(pa,`toSafeIndex`);function ma(e){return e!==e||e===0?0:Math.trunc(e)}Y(ma,`toSafeInteger`);function ha(e){let t=e+`CollectionProvider`,[n,r]=oa(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let l=Y(({state:e,...t})=>e?(0,P.jsx)(d,{...t,state:e}):(0,P.jsx)(u,{...t}),`CollectionProvider`);l.displayName=t;let u=Y(e=>{let t=v();return(0,P.jsx)(d,{...e,state:t})},`CollectionInit`);u.displayName=e+`CollectionInit`;let d=Y(e=>{let{scope:t,children:n,state:r}=e,a=c.useRef(null),[s,l]=c.useState(null),u=K(a,l),[d,f]=r,p=c.useRef(new da),m=c.useCallback(()=>{let e=p.current;return va(e)||e.sort(ya),e},[]);return c.useEffect(()=>{if(!s)return;let e=ba(()=>{f(e=>{let t=e.toSorted(ya);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,f]),(0,P.jsx)(i,{scope:t,collectionElementRef:u,collectionElementRefObject:a,getCollection:m,setCollection:f,registryRef:p,children:(0,P.jsx)(o,{scope:t,collectionElement:s,collection:d,children:n})})},`CollectionProviderImpl`);d.displayName=e+`CollectionProviderImpl`;let f=e+`CollectionSlot`,p=Pi(f),m=c.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=K(t,a(f,n).collectionElementRef);return(0,P.jsx)(p,{ref:i,children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=Pi(h),_=c.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=c.useRef(null),{setCollection:s,registryRef:l}=a(h,n),u=c.useRef(i);ga(u.current,i)||(u.current=i);let d=u.current,f=K(t,c.useCallback(e=>{let t=l.current;e?t.set(e,{...u.current,element:e}):o.current&&t.delete(o.current)},[l]),o);J(()=>{let e=o.current,t=l.current;e&&t.has(e)&&t.set(e,{...d,element:e})},[d,l]);let p=c.useRef(null);return c.useEffect(()=>{let e=o.current,t=p.current;((t?.element??null)!==e||e&&t?.itemData!==d)&&(p.current=e?{element:e,itemData:d}:null,s(n=>{let r=new da(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...d,element:e}),r.sort(ya)}))}),c.useEffect(()=>()=>{let e=p.current;p.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new da(t);return n.delete(e.element),n})},[s]),(0,P.jsx)(g,{"data-radix-collection-item":``,ref:f,children:r})});_.displayName=h;function v(){return c.useState(new da)}Y(v,`useInitCollection`);function y(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Y(y,`useCollection`);function b(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Y(b,`useGetCollection`),[{Provider:l,Slot:m,ItemSlot:_},{createCollectionScope:r,useCollection:y,useGetCollection:b,useInitCollection:v}]}Y(ha,`createCollection`);function ga(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Y(ga,`shallowEqual`);function _a(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Y(_a,`isElementPreceding`);function va(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Y(va,`isInDocumentOrder`);function ya(e,t){return!e[1].element||!t[1].element?0:_a(e[1].element,t[1].element)?-1:1}Y(ya,`sortByDocumentPosition`);function ba(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Y(ba,`getChildListObserver`);var xa=Object.defineProperty,Sa=(e,t)=>xa(e,`name`,{value:t,configurable:!0}),Ca=!!(typeof window<`u`&&window.document&&window.document.createElement);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return Sa(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Sa(X,`composeEventHandlers`);function wa(e){if(!Ca)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Sa(wa,`getOwnerWindow`);function Ta(e){if(!Ca)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Sa(Ta,`getOwnerDocument`);function Ea(e,t=!1){let{activeElement:n}=Ta(e);if(!n?.nodeName)return null;if(Da(n)&&n.contentDocument)return Ea(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ta(n).getElementById(e);if(t)return t}}return n}Sa(Ea,`getActiveElement`);function Da(e){return e.tagName===`IFRAME`}Sa(Da,`isFrame`);var Oa=Object.defineProperty,ka=(e,t)=>Oa(e,`name`,{value:t,configurable:!0}),Aa=c.useEffectEvent,ja=c.useInsertionEffect;function Ma(e){if(typeof Aa==`function`)return Aa(e);let t=c.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ja==`function`?ja(()=>{t.current=e}):J(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}ka(Ma,`useEffectEvent`);var Na=Object.defineProperty,Pa=(e,t)=>Na(e,`name`,{value:t,configurable:!0}),Fa=c.useInsertionEffect||J;function Ia({prop:e,defaultProp:t,onChange:n=Pa(()=>{},`onChange`),caller:r}){let[i,a,o]=La({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,c.useCallback(t=>{if(s){let n=Ra(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Pa(Ia,`useControllableState`);function La({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return Fa(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Pa(La,`useUncontrolledState`);function Ra(e){return typeof e==`function`}Pa(Ra,`isFunction`);var za=Symbol(`RADIX:SYNC_STATE`);function Ba(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,l=i!==void 0,u=Ma(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=c.useReducer((t,n)=>{if(n.type===za)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=c.useRef(m);c.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=c.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return c.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:za,state:i})},[i,f.state,l]),[g,p]}Pa(Ba,`useControllableStateReducer`);var Va=Object.defineProperty,Ha=(e,t)=>Va(e,`name`,{value:t,configurable:!0});function Ua(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}Ha(Ua,`useStateMachine`);var Wa=Ha(e=>{let{present:t,children:n}=e,r=Ga(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=qa(r.ref,Ya(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null},`Presence`);function Ga(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=Ua(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??Ja(r.current),o.current=void 0):a.current=`none`},[s]),J(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Ja(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),J(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Ha(a=>{let o=Ja(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Ha(e=>{e.target===t&&(a.current=Ja(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Ja(t)}else r.current=null;n(e)},[])}}Ha(Ga,`usePresence`);function Ka(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ha(Ka,`setRef`);function qa(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ka(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ka(n[e],null)}}},[])}Ha(qa,`useStableComposedRefs`);function Ja(e){return e?.animationName||`none`}Ha(Ja,`getAnimationName`);function Ya(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ha(Ya,`getElementRef`);var Xa=Object.defineProperty,Za=(e,t)=>Xa(e,`name`,{value:t,configurable:!0}),Qa=c.useId||(()=>void 0),$a=0;function eo(e){let[t,n]=c.useState(Qa());return J(()=>{e||n(e=>e??String($a++))},[e]),e||(t?`radix-${t}`:``)}Za(eo,`useId`);var to=Object.defineProperty,no=(e,t)=>to(e,`name`,{value:t,configurable:!0}),ro=`Collapsible`,[io,ao]=oa(ro),[oo,so]=io(ro),co=c.forwardRef(no(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,u]=Ia({prop:r,defaultProp:i??!1,onChange:o,caller:ro});return(0,P.jsx)(oo,{scope:n,disabled:a,contentId:eo(),open:l,onOpenToggle:c.useCallback(()=>u(e=>!e),[u]),children:(0,P.jsx)(q.div,{"data-state":ho(l),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),lo=`CollapsibleTrigger`,uo=c.forwardRef(no(function(e,t){let{__scopeCollapsible:n,...r}=e,i=so(lo,n);return(0,P.jsx)(q.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":ho(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:X(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),fo=`CollapsibleContent`,po=c.forwardRef(no(function(e,t){let{forceMount:n,...r}=e,i=so(fo,e.__scopeCollapsible);return(0,P.jsx)(Wa,{present:n||i.open,children:({present:e})=>(0,P.jsx)(mo,{...r,ref:t,present:e})})},`CollapsibleContent`)),mo=c.forwardRef(no(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=so(fo,n),[s,l]=c.useState(r),u=c.useRef(null),d=K(t,u),f=c.useRef(0),p=f.current,m=c.useRef(0),h=m.current,g=o.open||s,_=c.useRef(g),v=c.useRef(void 0);return c.useEffect(()=>{let e=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(e)},[]),J(()=>{let e=u.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();f.current=t.height,m.current=t.width,_.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),l(r)}},[o.open,r]),(0,P.jsx)(q.div,{"data-state":ho(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&i})},`CollapsibleContentImpl`));function ho(e){return e?`open`:`closed`}no(ho,`getState`);var go=Object.defineProperty,_o=(e,t)=>go(e,`name`,{value:t,configurable:!0}),vo={LTR:`ltr`,RTL:`rtl`},yo=c.createContext(void 0);function bo(e){let t=c.useContext(yo);return e||t||vo.LTR}_o(bo,`useDirection`);var xo=Object.defineProperty,So=(e,t)=>xo(e,`name`,{value:t,configurable:!0}),Co=c.useInsertionEffect;function wo(e){let t=c.useRef(e);return typeof Co==`function`?Co(()=>{t.current=e}):J(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}So(wo,`useCallbackRef`);var To=Object.defineProperty,Eo=(e,t)=>To(e,`name`,{value:t,configurable:!0}),Do=`dismissableLayer.update`,Oo=`dismissableLayer.pointerDownOutside`,ko=`dismissableLayer.focusOutside`,Ao,jo=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Mo=c.forwardRef(Eo(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,d=c.useContext(jo),[f,p]=c.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=c.useState({}),g=K(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=c.useRef(!1),w=Fo(e=>{a?.(e),s?.(e),e.defaultPrevented||l?.()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return S&&!t},[d.branches,S])}),T=Io(e=>{if(r&&C.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||l?.())},m),E=f?b===_.length-1:!1,D=wo(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return c.useEffect(()=>{if(E)return m.addEventListener(`keydown`,D,{capture:!0}),()=>m.removeEventListener(`keydown`,D,{capture:!0})},[m,E,D]),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ao=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Lo(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=Ao))}},[f,m,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Lo())},[f,d]),c.useEffect(()=>{let e=Eo(()=>h({}),`handleUpdate`);return document.addEventListener(Do,e),()=>document.removeEventListener(Do,e)},[]),(0,P.jsx)(q.div,{...u,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:X(e.onFocusCapture,T.onFocusCapture),onBlurCapture:X(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function No(){let e=c.useContext(jo),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Eo(No,`useDismissableLayerSurface`);var Po=Eo(()=>!0,`IS_TRUE`);function Fo(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Po}=t,s=wo(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}Eo(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}Eo(t,`isOutsideInteractionIntercepted`);function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}Eo(c,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}Eo(p,`handleInteractionBubble`);let m=Eo(a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||Ro(Oo,s,p,{discrete:!0})};if(Eo(c,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Eo(()=>l.current=!0,`onPointerDownCapture`)}}Eo(Fo,`usePointerDownOutside`);function Io(e,t=globalThis?.document){let n=wo(e),r=c.useRef(!1);return c.useEffect(()=>{let e=Eo(e=>{e.target&&!r.current&&Ro(ko,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Eo(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Eo(()=>r.current=!1,`onBlurCapture`)}}Eo(Io,`useFocusOutside`);function Lo(){let e=new CustomEvent(Do);document.dispatchEvent(e)}Eo(Lo,`dispatchUpdate`);function Ro(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Qi(i,a):i.dispatchEvent(a)}Eo(Ro,`handleAndDispatchCustomEvent`);var zo=Object.defineProperty,Z=(e,t)=>zo(e,`name`,{value:t,configurable:!0}),Bo=`focusScope.autoFocusOnMount`,Vo=`focusScope.autoFocusOnUnmount`,Ho={bubbles:!1,cancelable:!0},Uo=c.forwardRef(Z(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[l,u]=c.useState(null),d=wo(a),f=wo(o),p=c.useRef(null),m=K(t,u),h=c.useRef(i);c.useEffect(()=>{h.current=i});let g=c.useCallback(e=>e?l?.contains(e)?!0:!!h.current?.some(t=>t.contains(e)):!1,[l]),_=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(_.paused||!l)return;let t=e.target;g(t)?p.current=t:es(p.current,{select:!0})},t=function(e){if(_.paused||!l)return;let t=e.relatedTarget;t!==null&&(g(t)||es(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&es(l)};Z(e,`handleFocusIn`),Z(t,`handleFocusOut`),Z(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,_.paused,g]),c.useEffect(()=>{if(l){ts.add(_);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(Bo,Ho);l.addEventListener(Bo,d),l.dispatchEvent(t),t.defaultPrevented||(Jo(is(Xo(l)),{select:!0}),document.activeElement===e&&es(l))}return()=>{l.removeEventListener(Bo,d);let t=l.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(Vo,Ho);l.addEventListener(Vo,f),l.dispatchEvent(r),r.defaultPrevented||es(e??t.body,{select:!0}),l.removeEventListener(Vo,f),ts.remove(_)},0)}}},[l,d,f,_]);let v=c.useCallback(e=>{if(!n&&!r||_.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Yo(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&es(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&es(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,_.paused]);return(0,P.jsx)(q.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})},`FocusScope`)),Wo=c.createContext(null);function Go({registry:e,children:t}){return e?(0,P.jsx)(Wo.Provider,{value:e,children:t}):t}Z(Go,`FocusScopeBranchProvider`);function Ko(){let[e,t]=c.useState([]);return{nodes:e,registry:c.useMemo(()=>({add:Z(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:Z(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}Z(Ko,`useFocusScopeBranchRegistry`);function qo(e){let t=c.useContext(Wo);c.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}Z(qo,`useFocusScopeBranch`);function Jo(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(es(r,{select:t}),document.activeElement!==n)return}Z(Jo,`focusFirst`);function Yo(e){let t=Xo(e);return[Zo(t,e),Zo(t.reverse(),e)]}Z(Yo,`getTabbableEdges`);function Xo(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Z(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Z(Xo,`getTabbableCandidates`);function Zo(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Qo(r,{upTo:t})))return r}Z(Zo,`findVisible`);function Qo(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Z(Qo,`isHidden`);function $o(e){return e.tagName===`INPUT`&&typeof e.select==`function`}Z($o,`isSelectableInput`);function es(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&$o(e)&&t&&e.select()}}Z(es,`focus`);var ts=ns();function ns(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=rs(e,t),e.unshift(t)},remove(t){e=rs(e,t),e[0]?.resume()}}}Z(ns,`createFocusScopesStack`);function rs(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Z(rs,`arrayRemove`);function is(e){return e.filter(e=>e.tagName!==`A`)}Z(is,`removeLinks`);var as=Object.defineProperty,os=c.forwardRef(((e,t)=>as(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=c.useState(!1);J(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?N.createPortal((0,P.jsx)(q.div,{...r,ref:t}),o):null},`Portal`)),ss=Object.defineProperty,cs=(e,t)=>ss(e,`name`,{value:t,configurable:!0}),ls=0,us=null;function ds(e){return fs(),e.children}cs(ds,`FocusGuards`);function fs(){c.useEffect(()=>{us||={start:ps(),end:ps()};let{start:e,end:t}=us;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),ls++,()=>{ls===1&&(us?.start.remove(),us?.end.remove(),us=null),ls=Math.max(0,ls-1)}},[])}cs(fs,`useFocusGuards`);function ps(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}cs(ps,`createFocusGuard`);var ms=function(){return ms=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ms.apply(this,arguments)};function hs(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function gs(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var _s=`right-scroll-bar-position`,vs=`width-before-scroll-bar`,ys=`with-scroll-bars-hidden`,bs=`--removed-body-scroll-bar-size`;function xs(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ss(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Cs=typeof window<`u`?c.useLayoutEffect:c.useEffect,ws=new WeakMap;function Ts(e,t){var n=Ss(t||null,function(t){return e.forEach(function(e){return xs(e,t)})});return Cs(function(){var t=ws.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||xs(e,null)}),i.forEach(function(e){r.has(e)||xs(e,a)})}ws.set(n,e)},[e]),n}function Es(e){return e}function Ds(e,t){t===void 0&&(t=Es);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Os(e){e===void 0&&(e={});var t=Ds(null);return t.options=ms({async:!0,ssr:!1},e),t}var ks=function(e){var t=e.sideCar,n=hs(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,ms({},n))};ks.isSideCarExport=!0;function As(e,t){return e.useMedium(t),ks}var js=Os(),Ms=function(){},Ns=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Ms,onWheelCapture:Ms,onTouchMoveCapture:Ms}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=hs(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Ts([n,t]),w=ms(ms({},x),i);return c.createElement(c.Fragment,null,d&&c.createElement(S,{sideCar:js,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),ms(ms({},w),{ref:C})):c.createElement(y,ms({},w,{className:l,ref:C}),s))});Ns.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ns.classNames={fullWidth:vs,zeroRight:_s};var Ps=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Fs(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ps();return t&&e.setAttribute(`nonce`,t),e}function Is(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ls(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Rs=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fs())&&(Is(t,n),Ls(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zs=function(){var e=Rs();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bs=function(){var e=zs();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Vs={left:0,top:0,right:0,gap:0},Hs=function(e){return parseInt(e||``,10)||0},Us=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Hs(n),Hs(r),Hs(i)]},Ws=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Vs;var t=Us(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gs=Bs(),Ks=`data-scroll-locked`,qs=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
1
+ import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ee=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function te(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ne(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else te(ne.bind(null,e))}var re={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=re,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ne,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=te,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),a=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=i()})),o=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),s=t(((e,t)=>{t.exports=o()})),c=e(r(),1),l=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function u(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:l(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var d=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},f=e=>{let t=d(e);return t.charAt(0).toUpperCase()+t.slice(1)},p=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),m={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function h(e){return e!=null}function g(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??m.width,a=e.size??e.height??m.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?p(...c):p(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??m[`stroke-width`])*Number(e.size??e.width??m.width)/Number(t.size??t.width??m.width):t.strokeWidth??m[`stroke-width`];return[`svg`,{...Object.entries(m).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&h(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&h(t.width)&&{[r(`width`)]:t.width},...`height`in t&&h(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function _(e,t={}){return g(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var v=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},y=(0,c.createContext)({}),b=()=>(0,c.useContext)(y),x=(0,c.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},m)=>{let{size:h=24,strokeWidth:g=2,absoluteStrokeWidth:y=!1,nonScalingStroke:x=!1,color:S=`currentColor`,className:C=``}=b()??{},w=!!l||v(f),[T,E,D=[]]=_(d,{color:e??S,width:n??t??h,height:r??t??h,strokeWidth:i??g,absoluteStrokeWidth:a??y,nonScalingStroke:o??x,className:p(C,s),hasA11yProp:w,attributes:f});return(0,c.createElement)(T,{ref:m,...E},[...D.map(([e,t])=>(0,c.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function S(e,t=[],n=[]){let r=typeof e==`string`?u(e,t,n):e,i=(0,c.forwardRef)(({className:e,...t},n)=>(0,c.createElement)(x,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=f(r.name)),i}var C={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};C.node;var w=S(C),T={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};T.node;var E=S(T),D={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};D.node;var O=S(D),k={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};k.node;var A=S(k),j={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};j.node;var M=S(j),N=e(a(),1),P=s(),F=/(^|[^\w@.])@([a-z][\w.-]{0,39})/gi,I=/^[a-z][\w.-]{0,39}$/,ee=e=>e.replace(/[.-]+$/,``);function te(e){let t=[];if(typeof e!=`string`||!e.includes(`@`))return t;for(let n of e.matchAll(F)){let e=ee(n[2]).toLowerCase();e&&!t.includes(e)&&t.push(e)}return t}function ne(e){let t=te(e?.body);for(let n of Array.isArray(e?.replies)?e.replies:[])for(let e of te(n?.body))t.includes(e)||t.push(e);return t}function re(e){let t=[],n=typeof e==`string`?e:``,r=0;for(let e of n.matchAll(F)){let i=ee(e[2]);if(!i)continue;let a=e.index+e[1].length;a>r&&t.push({text:n.slice(r,a)}),t.push({text:`@${i}`,handle:i.toLowerCase()}),r=a+1+i.length}return r<n.length&&t.push({text:n.slice(r)}),t}function L(e){let t=String(e||``).normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/^[^a-z]+/,``).replace(/[.-]+$/,``).slice(0,40);return I.test(t)?ee(t):``}function R(e){let t=String(e||``).toLowerCase();return[`agent`,`ai`,`bot`].includes(t)||/-(agent|bot)$/.test(t)}function ie(e){let t=new Map,n=new Map,r=new Set,i=(e,n,r)=>{if(!e||e===`anonymous`)return;let i=t.get(e);i?r&&!i.known&&t.set(e,{...i,name:n||i.name,known:!0}):t.set(e,{handle:e,name:n||e,agent:R(e),known:r,aliases:[]})},a=(e,t)=>{let a=L(e),o=t?String(t).toLowerCase():a;i(o,e,!0),t&&r.add(o),t&&a&&a!==o&&!n.has(a)&&n.set(a,o)};i(`agent`,`Any coding agent`,!0);for(let t of Array.isArray(e)?e:[]){a(t.author,t.authorHandle);for(let e of t.replies||[])a(e.author,e.handle);for(let e of t.mentions||[])i(e,null,!1)}for(let[e,i]of n){if(r.has(e))continue;let n=t.get(i);n&&(n.aliases.includes(e)||n.aliases.push(e),t.delete(e))}return[...t.values()].sort((e,t)=>Number(e.agent)-Number(t.agent)||e.handle.localeCompare(t.handle))}function ae(e,t){let n=String(e||``).toLowerCase();return n?R(n)?!0:Array.isArray(t)&&t.some(e=>e.known&&(e.handle===n||(e.aliases||[]).includes(n))):!1}var z=[`👍`,`❤️`,`🎉`,`😄`,`👀`,`🚀`],oe={"👍":`thumbs up`,"❤️":`heart`,"🎉":`party`,"😄":`smile`,"👀":`eyes`,"🚀":`rocket`},se=e=>typeof e==`string`&&z.includes(e),ce=e=>typeof e==`string`?e.replace(/[\u0000-\u001f\u007f]+/g,` `).replace(/\s+/g,` `).trim().slice(0,80):``;function le(e){return!e||typeof e!=`object`?``:typeof e.user==`string`&&e.user?`u:${e.user}`:`n:${ce(e.name).toLowerCase()}`}function ue(e){let t=ce(e?.name);return t?{name:t,...typeof e.handle==`string`&&/^[a-z][\w.-]{0,39}$/.test(e.handle)?{handle:e.handle}:{},...typeof e.user==`string`&&e.user?{user:e.user.slice(0,80)}:{}}:null}function de(e){if(!Array.isArray(e))return[];let t=new Map;for(let n of e){if(!n||!se(n.emoji)||!Array.isArray(n.by))continue;let e=t.get(n.emoji)||[],r=new Set(e.map(le));for(let t of n.by){let n=ue(t);!n||r.has(le(n))||e.length>=200||(r.add(le(n)),e.push(n))}t.set(n.emoji,e)}return z.filter(e=>t.get(e)?.length).map(e=>({emoji:e,by:t.get(e)}))}function fe(e,t,n){if(!se(t))throw Object.assign(Error(`Reactions are ${z.join(` `)}.`),{code:`invalid_reaction`});let r=ue(n);if(!r)throw Object.assign(Error(`A reaction needs a name.`),{code:`invalid_reaction`});let i=le(r),a=de(e),o=a.find(e=>e.emoji===t),s=!!o?.by.some(e=>le(e)===i);if(!s&&(o?.by.length||0)>=200)throw Object.assign(Error(`That reaction is full.`),{code:`too_many_reactions`});return{reactions:de(s?a.map(e=>e.emoji===t?{...e,by:e.by.filter(e=>le(e)!==i)}:e):o?a.map(e=>e.emoji===t?{...e,by:[...e.by,r]}:e):[...a,{emoji:t,by:[r]}]),added:!s}}function pe(e){return de(e).map(e=>({emoji:e.emoji,count:e.by.length,by:e.by.map(e=>({name:e.name,...e.handle?{handle:e.handle}:{}}))}))}var me=String.raw`(?:#(?:[A-Za-z0-9_\u0080-￿-]|\\[0-9a-fA-F]{6} ?|\\[0-9a-fA-F]{1,5}(?![0-9a-fA-F]) ?|\\[^0-9a-fA-F\n\r\f])+|[a-z][a-z0-9-]{0,40}(?:\[(?:data-testid|aria-label)="(?:[^"\\\n]|\\.){0,200}"\]|:nth-of-type\([1-9][0-9]{0,4}\)))`;RegExp(`^${me}(?: > ${me}){0,79}$`);function he(e){let t=e?.drawing?.shapes;return Array.isArray(e?.images)&&e.images.length>0||(Array.isArray(t)?t.length>0:t>0)}function ge(e){let t=Array.isArray(e?.images)?e.images.length:0,n=he({drawing:e?.drawing}),r=[t===1?`image`:t?`${t} images`:``,n?`drawing`:``].filter(Boolean);return r.length?`(${r.join(` and `)})`:``}function _e(e){let t=typeof e?.body==`string`?e.body:``;return t.trim()?t:ge(e)}function ve(e){return e===`queued`||e===`working`?`done`:e===`needs-human`?null:e??null}var ye=5242880,be={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`,"image/gif":`gif`},xe=2e3,Se=60,Ce=200,we=500,Te=class extends Error{constructor(e,t,n){super(n),this.status=e,this.code=t}},Ee=e=>`shapewall-browser-comments:${window.location.pathname}:${e}`;function De(e){try{let t=JSON.parse(window.localStorage.getItem(Ee(e))||`null`);return t&&Array.isArray(t.comments)?t:null}catch{return null}}function Oe(e,t){try{window.localStorage.setItem(Ee(e),JSON.stringify(t))}catch{throw new Te(507,`storage_full`,`This browser would not save the comment (storage is full or blocked).`)}}async function ke(e,t){let n=De(e);if(n)return n;let r=await t(`data/boards/${e}/comments.json`),i=Array.isArray(r?.comments)?r.comments:[];return{nextId:Math.max(0,...i.map(e=>Number(e.id)||0))+1,comments:i}}function Ae(e){try{window.localStorage.removeItem(Ee(e))}catch{}}function je(e){let t=typeof e==`string`?e.trim():``;if(!t)throw new Te(400,`empty_body`,`Write something first.`);if(t.length>xe)throw new Te(400,`body_too_long`,`Comments are limited to ${xe} characters.`);return t}function Me(e,t){let n=ve(e.agentStatus);if(n===(e.agentStatus??null))return e;let r={...e,agentStatus:n,agentStatusAt:n?t:null};return delete r.agentBranch,r}var Ne=e=>(typeof e==`string`?e.replace(/\s+/g,` `).trim().slice(0,Se):``)||`anonymous`;function Pe(e){let t=(Array.isArray(e.replies)?e.replies:[]).map(e=>({...e,reactions:pe(e.reactions)}));return{...e,replies:t,reactions:pe(e.reactions),editedAt:typeof e.editedAt==`string`?e.editedAt:null,reopenCount:Number(e.reopenCount)>0?Number(e.reopenCount):0,reopenedAt:typeof e.reopenedAt==`string`?e.reopenedAt:null,mentions:ne({body:e.body,replies:t})}}function Fe(e){let t={};for(let n of e)t[n.pageId]=t[n.pageId]||{open:0,resolved:0},t[n.pageId][n.status]=(t[n.pageId][n.status]||0)+1;return t}async function Ie(e,t,n,r){let[i]=t.split(`?`),a=/^\/api\/boards\/([a-z0-9-]+)(\/comments(?:\/(\d+)(?:\/(resolve|reopen|replies|reactions))?)?)?$/.exec(i);if(!a)return;let[,o,s,c,l]=a;if(!s){if(e!==`GET`)return;let[t,n]=await Promise.all([r(`data/boards/${o}.json`),ke(o,r)]);return{...t,commentCounts:Fe(n.comments)}}let u=await ke(o,r),d=new Date().toISOString();if(!c){if(e===`GET`)return{comments:u.comments.map(Pe).sort((e,t)=>e.createdAt<t.createdAt?1:e.createdAt>t.createdAt?-1:t.id-e.id)};if(e!==`POST`)return;if(u.comments.length>=we)throw new Te(409,`too_many_comments`,`That is a lot of comments for a demo.`);let t=Number(n?.x),r=Number(n?.y);if(!Number.isFinite(t)||!Number.isFinite(r)||t<0||t>100||r<0||r>100)throw new Te(400,`invalid_position`,`The pin must sit on the page.`);let i={id:u.nextId,pageId:String(n?.pageId||``),viewport:String(n?.viewport||``),x:Math.round(t*100)/100,y:Math.round(r*100)/100,body:je(n?.body),author:Ne(n?.author),...n?.anchor&&typeof n.anchor==`object`?{anchor:n.anchor}:{},captureVersion:null,status:`open`,createdAt:d,updatedAt:d,resolvedAt:null,resolution:null,replies:[],agentStatus:null,agentStatusAt:null};return Oe(o,{nextId:u.nextId+1,comments:[...u.comments,i]}),{comment:Pe(i)}}let f=Number(c),p=u.comments.find(e=>e.id===f);if(!p)throw new Te(404,`unknown_comment`,`That comment does not exist.`);if(e===`DELETE`&&!l)return Oe(o,{...u,comments:u.comments.filter(e=>e.id!==f)}),{ok:!0};let m=null,h=null;if(e===`POST`&&(l===`resolve`||l===`reopen`)){let e=l===`resolve`,t=!e&&p.status===`resolved`;m={...p,status:e?`resolved`:`open`,resolvedAt:e?d:null},e?p.status!==`resolved`&&(m=Me(m,d)):m={...m,resolution:null,agentStatus:null,agentStatusAt:null},t&&(m={...m,reopenCount:(Number(p.reopenCount)||0)+1,reopenedAt:d})}else if(e===`POST`&&l===`replies`){let e=Array.isArray(p.replies)?p.replies:[];if(e.length>=Ce)throw new Te(409,`too_many_replies`,`A comment holds at most ${Ce} replies.`);h={id:Math.max(0,...e.map(e=>Number(e.id)||0))+1,author:Ne(n?.author),body:je(n?.body),createdAt:d},m={...p,replies:[...e,h]}}else if(e===`POST`&&l===`reactions`){let e=n?.replyId??null,t=Array.isArray(p.replies)?p.replies:[],r=e===null?p:t.find(t=>Number(t.id)===Number(e));if(!r)throw new Te(404,`unknown_reply`,`That reply does not exist.`);let i;try{i=fe(r.reactions,n?.emoji,{name:Ne(n?.author)})}catch(e){throw new Te(400,e.code||`invalid_reaction`,e.message)}let a=e===null?{...p,reactions:i.reactions}:{...p,replies:t.map(e=>e===r?{...e,reactions:i.reactions}:e)};return Oe(o,{...u,comments:u.comments.map(e=>e.id===f?a:e)}),{comment:Pe(a),added:i.added}}else if(e===`PATCH`&&!l){if(m={...p},n?.body!==void 0){let e=je(n.body);e!==p.body&&(m={...m,body:e,editedAt:d})}(n?.status===`open`||n?.status===`resolved`)&&n.status!==p.status&&(m.status=n.status,m.resolvedAt=n.status===`resolved`?d:null,n.status===`open`?(m.resolution=null,m.reopenCount=(Number(p.reopenCount)||0)+1,m.reopenedAt=d):m=Me(m,d))}else return;return m.updatedAt=d,Oe(o,{...u,comments:u.comments.map(e=>e.id===f?m:e)}),h?{comment:Pe(m),reply:h}:{comment:Pe(m)}}var Le=!1,Re=null,ze=new Set,Be=e=>(ze.add(e),()=>ze.delete(e)),Ve=()=>0;function He(){return(0,c.useSyncExternalStore)(Be,Ve,Ve),Re}var Ue=new Map,We=45e3,Ge=e=>typeof document<`u`&&!!document.querySelector(`meta[name="${e}"]`),Ke=Ge(`shapewall-static`),qe=Ke&&Ge(`shapewall-browser-comments`),Je=`shapewall-settings-token`,Ye=`X-Shapewall-Settings-Token`;function Xe(){if(typeof window>`u`||Ke)return null;try{let e=new URLSearchParams(window.location.hash.replace(/^#/,``)),t=e.get(`settings-token`);if(t){window.sessionStorage.setItem(Je,t),e.delete(`settings-token`);let n=e.toString();window.history.replaceState(window.history.state,``,`${window.location.pathname}${window.location.search}${n?`#${n}`:``}`)}return window.sessionStorage.getItem(Je)}catch{return null}}var Ze=Xe();typeof window<`u`&&!Ke&&window.addEventListener(`hashchange`,()=>{if(!new URLSearchParams(window.location.hash.replace(/^#/,``)).get(`settings-token`))return;let e=Xe();e&&!new URLSearchParams(window.location.hash.replace(/^#/,``)).has(`settings-token`)&&(Ze=e,window.location.reload())});function Qe(){Ze=null;try{window.sessionStorage.removeItem(Je)}catch{}}var $e=()=>Ze?{[Ye]:Ze}:{},et=(e,t)=>e===`/api/info`||e.startsWith(`/api/app-update`)||e.startsWith(`/api/agent/settings`)||e===`/api/agent/status`||e.startsWith(`/api/agent/feedback`)||e.startsWith(`/api/agent/usage`)||e.startsWith(`/api/agent/branches`)||/^\/?api\/agent\/boards\//.test(e)&&e.includes(`/threads`)||/^\/?api\/agent\/boards\/[a-z0-9-]+\/batch(\/|$)/.test(e)||e.startsWith(`/api/devices`)||e.startsWith(`/api/share/`)||/^\/api\/boards\/[a-z0-9-]+\/checks\/run$/.test(e)||t!==`GET`&&e.startsWith(`/api/agent/boards/`)&&e.includes(`/threads/`);function tt(e){let[t,n=``]=e.split(`?`);if(t===`/api/info`)return`data/info.json`;if(t===`/api/boards`)return`data/boards.json`;let r=/^\/api\/boards\/([a-z0-9-]+)$/.exec(t);if(r)return`data/boards/${r[1]}.json`;if(r=/^\/api\/boards\/([a-z0-9-]+)\/checks$/.exec(t),r){let e=new URLSearchParams(n).get(`env`);return e&&/^[a-z0-9][a-z0-9-]{0,63}$/.test(e)?`data/boards/${r[1]}/checks-${e}.json`:`data/boards/${r[1]}/checks.json`}if(r=/^\/api\/boards\/([a-z0-9-]+)\/comments$/.exec(t),r)return`data/boards/${r[1]}/comments.json`;if(r=/^\/api\/boards\/([a-z0-9-]+)\/journeys$/.exec(t),r)return`data/boards/${r[1]}/journeys.json`;if(r=/^\/api\/boards\/([a-z0-9-]+)\/compare$/.exec(t),r){let e=new URLSearchParams(n),[t,i]=[e.get(`a`)||``,e.get(`b`)||``];if(/^[a-z0-9-]+$/.test(t)&&/^[a-z0-9-]+$/.test(i))return`data/boards/${r[1]}/compare/${t}_${i}.json`}return null}var nt=class extends Error{constructor(e,t,n,{details:r=null,retryAfter:i=null,stepUp:a=null}={}){super(n),this.status=e,this.code=t,this.details=r,this.retryAfter=i,this.stepUp=a}},rt=(e,t)=>new nt(e,t?.error?.code||`http_error`,t?.error?.message||`Request failed (${e})`,{details:t?.error?.details||null,stepUp:t?.error?.stepUp||null});async function it(e){let t=await fetch(e,{headers:{Accept:`application/json`},cache:`no-store`});if(!t.ok)throw new nt(t.status,`http_error`,`Request failed (${t.status})`);return t.json()}var at=1e3,ot=e=>new Promise(t=>setTimeout(t,e));async function st(e,t,n){for(let r=0;;r+=at)try{return await ct(e,t,n)}catch(t){if(e===`GET`||t?.status!==409||t.code!==`test_running`||r>=45e3)throw t;await ot(at)}}async function ct(e,t,n){if(qe){let r=await Ie(e,t,n,it);if(r!==void 0)return r}let r=Ke?tt(t):Ge(`shapewall-local-console`)?t:t.replace(/^\//,``);if(!r||Ke&&e!==`GET`)throw new nt(404,`static`,`Not available in a static export.`);let i=n===void 0?{Accept:`application/json`}:{Accept:`application/json`,"Content-Type":`application/json`};Ze&&et(t,e)&&(i[Ye]=Ze);let a=await fetch(r,{method:e,headers:i,body:n===void 0?void 0:JSON.stringify(n),cache:`no-store`}),o=null;try{o=await a.json()}catch{o=null}if(!a.ok)throw dt(a.status,o?.error?.code),rt(a.status,o);return o}var lt=`shapewall:access-lost`,ut={share_ended:`share`,signed_out:`signed_out`,unknown_workspace:`removed`,unknown_project:`removed`};function dt(e,t){if(Ke||typeof window>`u`)return;e===401&&t===`pairing_required`&&window.dispatchEvent(new CustomEvent(`shapewall:pairing-required`));let n=(e===401||e===404)&&ut[t];n&&window.dispatchEvent(new CustomEvent(lt,{detail:{kind:n}}))}var ft={get:e=>st(`GET`,e),post:(e,t={})=>st(`POST`,e,t),patch:(e,t={})=>st(`PATCH`,e,t),delete:e=>st(`DELETE`,e)},pt=encodeURIComponent;function mt(e,t,n,r){return Ke?`data/boards/${pt(e)}/${t}/${pt(n)}`:`api/boards/${pt(e)}/${t}/${pt(n)}?v=${pt(r||`0`)}`}function ht(e,t){return Ke?`data/boards/${pt(e)}/comment-files/${pt(t)}`:`api/boards/${pt(e)}/comment-files/${pt(t)}`}function gt(e,t,n,r){return Ke?`data/boards/${pt(e)}/${t}/${pt(n)}`:`api/boards/${pt(e)}/${t===`variants`?`variant-elements`:`elements`}/${pt(n)}?v=${pt(r||`0`)}`}function _t(e,t,n,r){return Ke?`data/boards/${pt(e)}/${t}/${pt(n)}`:`api/boards/${pt(e)}/${t===`variants`?`variant-live`:`live`}/${pt(n)}?v=${pt(r||`0`)}`}function vt(e,{pollMs:t=0}={}){let[n,r]=(0,c.useState)({data:null,error:null,loading:!0}),i=(0,c.useRef)(0),a=(0,c.useRef)(null),o=(0,c.useCallback)(async()=>{if(!e)return null;let t=++i.current;try{let n=await ft.get(e);if(t===i.current){let e=JSON.stringify(n),t=e===a.current;a.current=e,r(e=>t&&!e.error&&!e.loading?e:{data:n,error:null,loading:!1})}return n}catch(e){return t===i.current&&r(t=>({data:t.data,error:e,loading:!1})),null}},[e]);(0,c.useEffect)(()=>{a.current=null,r({data:null,error:null,loading:!0}),o()},[o]),(0,c.useEffect)(()=>{if(!t||!e)return;let n=window.setInterval(()=>{document.visibilityState===`visible`&&o()},t);return()=>window.clearInterval(n)},[t,o,e]);let s=(0,c.useCallback)(e=>{i.current+=1,a.current=null,r(t=>({...t,data:typeof e==`function`?e(t.data):e}))},[]);return{...n,refetch:o,setData:s}}function yt(e){let[t,n]=(0,c.useState)(e);return e&&!t&&n(!0),t||e}function bt(e){let t=(0,c.useCallback)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]);return(0,c.useSyncExternalStore)(t,()=>window.matchMedia(e).matches,()=>!1)}var xt=new Set,St=()=>xt.forEach(e=>e()),Ct=null,wt=typeof window<`u`?window.location.search:``;function Tt(e){wt=e,window.location.search!==e&&window.history.replaceState(window.history.state,``,`${window.location.pathname}${e}`),St()}function Et(e){if(kt>0){Ct={...Ct||{},...e};return}let t=new URLSearchParams(wt);for(let[n,r]of Object.entries(e))r==null||r===``?t.delete(n):t.set(n,String(r));let n=t.toString();Tt(n?`?${n}`:``)}function Dt(){let e=(0,c.useSyncExternalStore)(e=>(xt.add(e),()=>xt.delete(e)),()=>wt,()=>``);return[new URLSearchParams(e),(0,c.useCallback)(e=>Et(e),[])]}var Ot=[],kt=0,At=[],jt=0;function Mt(){jt===0&&(kt+=1,queueMicrotask(()=>{let e=jt;jt=0,window.history.go(-e)})),jt+=1}function Nt(e){e.pushed=!0,window.history.pushState({...window.history.state||{},shapewallOverlay:Ot.length},``,window.location.href)}typeof window<`u`&&window.addEventListener(`popstate`,()=>{if(Tt(wt),kt>0){if(--kt,kt===0){if(Ct){let e=Ct;Ct=null,Et(e)}let e=At;At=[];for(let t of e)Ot.includes(t)&&Nt(t);let t=Pt;Pt=[];for(let e of t)e()}return}let e=Ot.pop();e&&e.close()});var Pt=[];function Ft(e){let t=typeof e==`string`?()=>window.location.assign(e):e;setTimeout(()=>{kt>0||jt>0?Pt.push(t):t()},30)}function It(e,t){let n=(0,c.useRef)(t);(0,c.useEffect)(()=>{n.current=t}),(0,c.useEffect)(()=>{if(!e)return;let t={close:()=>n.current(),pushed:!1};return Ot.push(t),kt>0?At.push(t):Nt(t),()=>{let e=Ot.indexOf(t);e<0||(Ot.splice(e,1),t.pushed?Mt():At=At.filter(e=>e!==t))}},[e])}function Lt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Lt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Rt(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Lt(e))&&(r&&(r+=` `),r+=t);return r}var zt=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Bt=(e,t)=>({classGroupId:e,validator:t}),Vt=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ht=`-`,Ut=[],Wt=`arbitrary..`,Gt=e=>{let t=Jt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return qt(e);let n=e.split(Ht);return Kt(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?zt(i,t):t:i||Ut}return n[e]||Ut}}},Kt=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Kt(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ht):e.slice(t).join(Ht),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},qt=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Wt+r:void 0})(),Jt=e=>{let{theme:t,classGroups:n}=e;return Yt(n,t)},Yt=(e,t)=>{let n=Vt();for(let r in e){let i=e[r];Xt(i,n,r,t)}return n},Xt=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Zt(i,t,n,r)}},Zt=(e,t,n,r)=>{typeof e==`string`?Qt(e,t,n):typeof e==`function`?$t(e,t,n,r):en(e,t,n,r)},Qt=(e,t,n)=>{let r=e===``?t:tn(t,e);r.classGroupId=n},$t=(e,t,n,r)=>{nn(e)?Xt(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(Bt(n,e)))},en=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Xt(o,tn(t,a),n,r)}},tn=(e,t)=>{let n=e,r=t.split(Ht),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Vt(),n.nextPart.set(t,i)),n=i}return n},nn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,rn=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},an=`!`,on=`:`,sn=[],cn=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ln=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===on){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(an)?(c=s.slice(0,-1),l=!0):s.startsWith(an)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return cn(t,l,c,u)};if(t){let e=t+on,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):cn(sn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},un=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},dn=e=>({cache:rn(e.cacheSize),parseClassName:ln(e),sortModifiers:un(e),postfixLookupClassGroupIds:fn(e),...Gt(e)}),fn=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},pn=/\s+/,mn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(pn),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+an:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},hn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=gn(n))&&(i&&(i+=` `),i+=r);return i},gn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=gn(e[r]))&&(n&&(n+=` `),n+=t);return n},_n=(e,...t)=>{let n,r,i,a,o=o=>(n=dn(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=mn(e,n);return i(e,a),a};return a=o,(...e)=>a(hn(...e))},vn=[],yn=e=>{let t=t=>t[e]||vn;return t.isThemeGetter=!0,t.themeKey=e,t},bn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Cn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wn=/\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$/,Tn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,En=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,On=e=>Sn.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),kn=e=>!!e&&Number.isInteger(Number(e)),An=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),jn=e=>Cn.test(e),Mn=()=>!0,Nn=e=>wn.test(e)&&!Tn.test(e),Pn=()=>!1,Fn=e=>En.test(e),In=e=>Dn.test(e),Ln=e=>!V(e)&&!H(e),Rn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),zn=e=>er(e,ir,Pn),V=e=>bn.test(e),Bn=e=>er(e,ar,Nn),Vn=e=>er(e,or,B),Hn=e=>er(e,cr,Mn),Un=e=>er(e,sr,Pn),Wn=e=>er(e,nr,Pn),Gn=e=>er(e,rr,In),Kn=e=>er(e,lr,Fn),H=e=>xn.test(e),qn=e=>tr(e,ar),Jn=e=>tr(e,sr),Yn=e=>tr(e,nr),Xn=e=>tr(e,ir),Zn=e=>tr(e,rr),Qn=e=>tr(e,lr,!0),$n=e=>tr(e,cr,!0),er=(e,t,n)=>{let r=bn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tr=(e,t,n=!1)=>{let r=xn.exec(e);return r?r[1]?t(r[1]):n:!1},nr=e=>e===`position`||e===`percentage`,rr=e=>e===`image`||e===`url`,ir=e=>e===`length`||e===`size`||e===`bg-size`,ar=e=>e===`length`,or=e=>e===`number`,sr=e=>e===`family-name`,cr=e=>e===`number`||e===`weight`,lr=e=>e===`shadow`,ur=()=>{let e=yn(`color`),t=yn(`font`),n=yn(`text`),r=yn(`font-weight`),i=yn(`tracking`),a=yn(`leading`),o=yn(`breakpoint`),s=yn(`container`),c=yn(`spacing`),l=yn(`radius`),u=yn(`shadow`),d=yn(`inset-shadow`),f=yn(`text-shadow`),p=yn(`drop-shadow`),m=yn(`blur`),h=yn(`perspective`),g=yn(`aspect`),_=yn(`ease`),v=yn(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[On,`full`,`auto`,...w()],E=()=>[kn,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,kn,H,V]},kn,H,V],O=()=>[kn,`auto`,H,V],k=()=>[`auto`,`min`,`max`,`fr`,H,V],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[On,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,On,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[On,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,H,V],ee=()=>[...b(),Yn,Wn,{position:[H,V]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,Xn,zn,{size:[H,V]}],re=()=>[An,qn,Bn],L=()=>[``,`none`,`full`,l,H,V],R=()=>[``,B,qn,Bn],ie=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],z=()=>[B,An,Yn,Wn],oe=()=>[``,`none`,m,H,V],se=()=>[`none`,B,H,V],ce=()=>[`none`,B,H,V],le=()=>[B,H,V],ue=()=>[On,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[jn],breakpoint:[jn],color:[Mn],container:[jn],"drop-shadow":[jn],ease:[`in`,`out`,`in-out`],font:[Ln],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[jn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[jn],shadow:[jn],spacing:[`px`,B],text:[jn],"text-shadow":[jn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,On,V,H,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,H,V]}],"container-named":[Rn],columns:[{columns:[B,`auto`,V,H,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[kn,`auto`,H,V]}],basis:[{basis:[On,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,On,`auto`,`initial`,`none`,V]}],grow:[{grow:[``,B,H,V]}],shrink:[{shrink:[``,B,H,V]}],order:[{order:[kn,`first`,`last`,`none`,H,V]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,qn,Bn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,$n,Hn]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,An,V]}],"font-family":[{font:[Jn,Un,t]}],"font-features":[{"font-features":[V]}],"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:[i,H,V]}],"line-clamp":[{"line-clamp":[B,`none`,H,Vn]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ie(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,H,Bn]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[B,`auto`,H,V]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[kn,H,V]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],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`,H,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},kn,H,V],radial:[``,H,V],conic:[``,kn,H,V]},Zn,Gn]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:R()}],"border-w-x":[{"border-x":R()}],"border-w-y":[{"border-y":R()}],"border-w-s":[{"border-s":R()}],"border-w-e":[{"border-e":R()}],"border-w-bs":[{"border-bs":R()}],"border-w-be":[{"border-be":R()}],"border-w-t":[{"border-t":R()}],"border-w-r":[{"border-r":R()}],"border-w-b":[{"border-b":R()}],"border-w-l":[{"border-l":R()}],"divide-x":[{"divide-x":R()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":R()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ie(),`hidden`,`none`]}],"divide-style":[{divide:[...ie(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ie(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,H,V]}],"outline-w":[{outline:[``,B,qn,Bn]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,Qn,Kn]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Qn,Kn]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:R()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[B,Bn]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":R()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Qn,Kn]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[B,H,V]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"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":[B]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[B]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:oe()}],brightness:[{brightness:[B,H,V]}],contrast:[{contrast:[B,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Qn,Kn]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,B,H,V]}],"hue-rotate":[{"hue-rotate":[B,H,V]}],invert:[{invert:[``,B,H,V]}],saturate:[{saturate:[B,H,V]}],sepia:[{sepia:[``,B,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[B,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[B,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,B,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[B,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[B,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,H,V]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[B,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":[`scale-3d`],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":[`translate-none`],zoom:[{zoom:[kn,H,V]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,H,V]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,H,V]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[B,qn,Bn,Vn]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],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":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`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-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`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-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`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-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},dr=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(fr(e,`cacheSize`,t),fr(e,`prefix`,n),fr(e,`experimentalParseClassName`,r),pr(e.theme,a.theme),pr(e.classGroups,a.classGroups),pr(e.conflictingClassGroups,a.conflictingClassGroups),pr(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),fr(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),fr(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),mr(e.theme,i.theme),mr(e.classGroups,i.classGroups),mr(e.conflictingClassGroups,i.conflictingClassGroups),mr(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),hr(e,i,`postfixLookupClassGroups`),hr(e,i,`orderSensitiveModifiers`),e),fr=(e,t,n)=>{n!==void 0&&(e[t]=n)},pr=(e,t)=>{if(t)for(let n in t)fr(e,n,t[n])},mr=(e,t)=>{if(t)for(let n in t)hr(e,t,n)},hr=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},gr=((e,...t)=>typeof e==`function`?_n(ur,e,...t):_n(()=>dr(ur(),e),...t))({extend:{theme:{text:[`caption`,`ui`,`title`,`heading`,`display`],shadow:[`card`,`pop`,`lift`,`thumb`]}}});function U(...e){return gr(Rt(e))}var _r=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]],vr=null,yr=0;function br(e,t=Date.now()){let n=Date.parse(e||``),r=Number.isFinite(n)?n:null;r!==vr&&(vr=r,yr=r===null?0:Math.max(0,t-r))}function xr(e){let t=new Date(e).getTime();return Number.isFinite(t)?vr!==null&&t<=vr?t+yr:t:NaN}function Sr(e,t=Date.now()){let n=xr(e);if(!Number.isFinite(n))return``;let r=Math.round((n-t)/1e3),i=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,t]of _r)if(Math.abs(r)>=t)return i.format(Math.round(r/t),e);return`just now`}var Cr=`shapewall.author`;function wr(){try{return window.localStorage.getItem(Cr)||``}catch{return``}}function Tr(e){try{window.localStorage.setItem(Cr,e)}catch{}}var Er=new Map,Dr=new Set,Or=e=>String(e||``).trim().toLowerCase();function kr(e){let t=new Map;for(let n of e||[])n?.label&&(n.icon||n.logo||n.tint)&&t.set(Or(n.label),{icon:n.icon||null,tint:n.tint||null,logo:n.logo||null});if(!(t.size===Er.size&&[...t].every(([e,t])=>JSON.stringify(Er.get(e))===JSON.stringify(t)))){Er=t;for(let e of Dr)e()}}var Ar=new Map;function jr(e){let t=new Map;for(let n of e||[])n?.id&&t.set(n.id,{icon:n.icon||null,tint:n.tint||null,logo:n.logo||null,label:n.name||null});if(!(t.size===Ar.size&&[...t].every(([e,t])=>JSON.stringify(Ar.get(e))===JSON.stringify(t)))){Ar=t,Er=new Map(Er);for(let e of Dr)e()}}var Mr=e=>(Dr.add(e),()=>Dr.delete(e)),Nr=()=>Er;function Pr(e,t=null){let n=(0,c.useSyncExternalStore)(Mr,Nr,Nr),r=t?Ar.get(t):null;if(r)return{icon:r.icon,tint:r.tint,logo:r.logo};let i=n.get(Or(e));if(i)return i;for(let t of Ar.values())if(t.label&&Or(t.label)===Or(e))return{icon:t.icon,tint:t.tint,logo:t.logo};return null}var Fr=[`boxy`,`dot`,`cyclops`,`ghost`,`cat`,`owl`,`bear`,`alien`,`cloud`,`planet`,`hex`,`drop`],Ir=[`blue`,`violet`,`pink`,`amber`,`green`,`cyan`,`indigo`,`magenta`],Lr=/^upload:([0-9a-f]{32})$/,Rr=[[0,31],[127,159],[8203,8207],[8232,8238],[8288,8297],[65279,65279]],zr=e=>[...e].some(e=>Rr.some(([t,n])=>e.codePointAt(0)>=t&&e.codePointAt(0)<=n));function Br(e){if(e==null)return{name:null,problem:null};if(typeof e!=`string`)return{name:null,problem:`name: text, 1 to 40 characters`};if(zr(e))return{name:null,problem:`name: one line of plain text, without control characters`};let t=e.trim();return t?[...t].length>40?{name:null,problem:`name: at most 40 characters`}:{name:t,problem:null}:{name:null,problem:null}}var Vr=e=>typeof e==`string`&&Lr.test(e),Hr=e=>typeof e==`string`&&Lr.exec(e)?.[1]||null,Ur=`Simple Icons 16.37.0 (https://simpleicons.org), CC0 1.0`,Wr=[{id:`claude`,name:`Claude`,owner:`Anthropic, PBC`,agents:[`claude`],viewBox:`0 0 24 24`,path:`m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`,source:`${Ur}, icons/claude.svg`},{id:`openai`,name:`OpenAI`,owner:`OpenAI`,agents:[`codex`],viewBox:`0 0 24 24`,path:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,source:`Simple Icons 15.22.0 (https://simpleicons.org), CC0 1.0, icons/openai.svg`},{id:`goose`,name:`goose`,owner:`LF Projects, LLC`,agents:[`goose`],viewBox:`0 0 45 45`,path:`M43.2098 39.2492L39.8118 36.4522C37.9646 34.9318 36.3923 33.1051 35.1631 31.0529C33.4647 28.2172 31.1178 25.8243 28.3164 24.071L26.9482 23.2744C26.4794 22.9485 26.1525 22.4405 26.106 21.8675C26.0762 21.4981 26.1647 21.1678 26.3712 20.8771C27.0837 19.873 30.9617 15.6995 31.6365 15.1411C32.5056 14.4228 33.4739 13.8253 34.3724 13.1412C34.5001 13.0438 34.6283 12.9469 34.7545 12.8481C34.7589 12.8437 34.7653 12.8403 34.7692 12.8363C35.0574 12.6088 35.3295 12.3671 35.5458 12.0803C36.5993 10.8604 36.5783 9.82938 36.5783 9.82938C36.5783 9.82938 36.5793 9.8284 36.5798 9.82791C36.4677 9.5534 36.0645 8.69902 35.2449 8.29825C35.9696 8.28406 36.7872 8.55564 37.1582 8.91873C37.6039 8.21947 37.8922 7.76585 38.3404 7.00347C38.4471 6.82241 38.5038 6.48771 38.2998 6.30029C38.2998 6.30029 38.2988 6.30029 38.2978 6.30029C38.2978 6.30029 38.2978 6.29931 38.2978 6.29833C38.2939 6.29442 38.289 6.29148 38.2851 6.28757C38.2812 6.28365 38.2787 6.27925 38.2743 6.27485C38.2743 6.27485 38.2734 6.27485 38.2724 6.27485C38.2724 6.27485 38.2724 6.27387 38.2724 6.27289C38.2641 6.26457 38.2548 6.25821 38.246 6.25038C38.2406 6.245 38.2362 6.23864 38.2313 6.23276C38.2254 6.22787 38.219 6.22347 38.2137 6.21808C38.2053 6.20977 38.2 6.19949 38.1911 6.19166C38.1911 6.19166 38.1897 6.19117 38.1892 6.19166C38.1892 6.19166 38.1892 6.19068 38.1892 6.1897C38.1853 6.18579 38.1804 6.18285 38.1765 6.17894C38.1726 6.17502 38.1696 6.17013 38.1657 6.16621C38.1657 6.16621 38.1642 6.16572 38.1637 6.16621C38.1637 6.16621 38.1637 6.16524 38.1637 6.16426C37.9763 5.9602 37.6416 6.01697 37.4606 6.12364C36.4692 6.70693 35.5047 7.33475 34.6351 7.88525C34.6351 7.88525 33.6046 7.86372 32.3842 8.91775C32.097 9.13452 31.8552 9.4066 31.6282 9.69433C31.6238 9.69873 31.6199 9.7046 31.6164 9.70901C31.5171 9.83476 31.4202 9.96297 31.3233 10.0912C30.6387 10.9901 30.0417 11.958 29.3234 12.8271C28.7656 13.5023 24.5915 17.3798 23.5874 18.0923C23.2967 18.2988 22.9669 18.3879 22.597 18.3575C22.0245 18.3115 21.5161 17.9842 21.1902 17.5154L20.3935 16.1472C18.6402 13.3448 16.2474 10.9989 13.4117 9.30041C11.3594 8.0712 9.5332 6.49847 8.01234 4.65172L5.2153 1.25377C5.0773 1.08642 4.81306 1.11382 4.71422 1.30662C4.39615 1.92612 3.78888 3.23411 3.32353 4.99327C3.31227 5.03487 3.32206 5.07891 3.34946 5.11218C3.92786 5.81095 5.26717 7.35089 6.8624 8.65351C6.97348 8.74403 6.88246 8.92313 6.74447 8.88496C5.36846 8.51013 4.03062 7.90825 3.02944 7.39542C2.94772 7.35383 2.84887 7.4057 2.83713 7.49672C2.68152 8.74354 2.64139 10.1127 2.80581 11.5562C2.8107 11.6032 2.84055 11.6438 2.8841 11.6629C4.02572 12.1596 5.85143 12.8804 7.76816 13.3389C7.90713 13.3722 7.90273 13.5723 7.76229 13.5992C6.26982 13.8801 4.70688 13.9427 3.43656 13.9261C3.3475 13.9251 3.28193 14.0093 3.30591 14.0949C3.56085 14.9958 3.90632 15.9118 4.3619 16.8342C4.55029 17.2487 4.75532 17.6553 4.97504 18.0532C5.01271 18.1212 5.08562 18.1618 5.16343 18.1584C6.21207 18.107 7.47946 17.9964 8.75369 17.7713C8.97095 17.7331 9.08741 18.0189 8.90391 18.1417C8.03877 18.7201 7.11588 19.2183 6.25758 19.6283C6.14259 19.6836 6.1054 19.8304 6.18125 19.9327C6.69114 20.6236 7.25191 21.2774 7.86114 21.8866C7.86114 21.8866 10.8608 24.9763 10.9425 25.2185C12.6928 23.4261 15.5701 21.4394 18.7474 19.7047C14.4921 23.1672 12.1198 25.7235 10.9258 27.1758L10.0935 28.3439C9.66091 28.9507 9.2856 29.5951 8.97193 30.2709C7.92231 32.5292 6.19201 37.0966 6.19201 37.0966C6.0594 37.4543 6.16755 37.8072 6.39753 38.0371C6.40292 38.0425 6.4083 38.0479 6.41417 38.0528C6.41955 38.0582 6.42445 38.0641 6.42983 38.0694C6.66031 38.2999 7.01263 38.4076 7.37033 38.275C7.37033 38.275 11.9368 36.5447 14.1961 35.495C14.8719 35.1814 15.5168 34.8056 16.1231 34.3735L17.4095 33.457C18.0907 32.9715 19.0234 33.0489 19.615 33.6405L22.5804 36.6058C23.1896 37.2151 23.8433 37.7758 24.5343 38.2857C24.637 38.3611 24.7833 38.3244 24.8386 38.2094C25.2492 37.3516 25.7473 36.4277 26.3252 35.5631C26.4481 35.3796 26.7343 35.4965 26.6957 35.7133C26.4701 36.988 26.3605 38.2554 26.3086 39.3035C26.3047 39.3809 26.3458 39.4543 26.4138 39.4919C26.8112 39.7121 27.2178 39.9172 27.6327 40.1051C28.5551 40.5606 29.4717 40.9066 30.3721 41.1611C30.4577 41.185 30.5419 41.1195 30.5409 41.0304C30.5237 39.7596 30.5864 38.1967 30.8677 36.7047C30.8942 36.5638 31.0943 36.5593 31.1281 36.6988C31.5861 38.616 32.3069 40.4417 32.8041 41.5829C32.8231 41.6264 32.8633 41.6558 32.9107 41.6612C34.3543 41.8256 35.7234 41.7855 36.9703 41.6298C37.0618 41.6186 37.1136 41.5197 37.0715 41.4375C36.5587 40.4364 35.9568 39.0975 35.582 37.7225C35.5443 37.584 35.7229 37.4935 35.8135 37.6046C37.1161 39.1998 38.656 40.5391 39.3548 41.1175C39.3881 41.1449 39.4326 41.1542 39.4737 41.1434C41.2333 40.6786 42.5413 40.0713 43.1604 39.7528C43.3532 39.6539 43.3806 39.3897 43.2132 39.2517L43.2098 39.2492Z`,source:`github.com/aaif-goose/goose at 0c5b5e2f2e7933fca4de5377d239645dcbe4cbb3, documentation/static/img/goose.svg (Apache 2.0; LF Projects trademark policy)`},{id:`gemini`,name:`Google Gemini`,owner:`Google LLC`,agents:[`gemini`],viewBox:`0 0 24 24`,path:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,source:`${Ur}, icons/googlegemini.svg`}],Gr=e=>Wr.find(t=>t.id===e)||null,Kr=e=>Wr.find(t=>t.agents.includes(e))?.id||null;function qr(e){let t=Array.isArray(e?.profiles)?e.profiles:[],n=e?.profileId||`default`,r=t.find(e=>e.id==="default"),i=r?.sameAs||`default`,a=t.filter(e=>!(e.id==="default"&&e.sameAs)).map(e=>({id:e.id,label:e.label||(e.id==="default"?`Default connection`:e.id),configured:e.configured!==!1,state:e.configured===!1?`unavailable`:e.state||`ready`,loginHint:e.loginHint||null,line:typeof e.line==`string`&&e.line?e.line:null,isDefault:e.id===i,icon:e.icon||null,tint:e.tint||null,logo:e.logo||null})),o=n==="default"&&r?.sameAs?r.sameAs:n,s=a.some(e=>e.id===o);return{show:t.length>0&&(a.length>1||!s),value:o,known:s,options:a}}function Jr(e,t){let{value:n}=qr(e);return t===n?null:t}function Yr(e){let{value:t,options:n}=qr(e);return n.find(e=>e.id!==t&&e.configured)||null}var Xr={ready:`Ready`,login:`Not signed in`,starting:`Starting`,testing:`Testing the connection`,"not-responding":`Not responding`,unavailable:`Not set up`},Zr={ready:`bg-ok`,login:`bg-warn`,starting:`bg-accent motion-safe:animate-pulse`,testing:`bg-accent motion-safe:animate-pulse`,"not-responding":`bg-bad`,unavailable:`bg-faint`};function Qr(e){return e?`Sign in: ${String(e).split(/, or /)[0]}`:null}function $r(e){if(e?.line)return e.line;let t=Xr[e?.state]||Xr.ready;return e?.state===`login`&&e.loginHint?`${t}. ${Qr(e.loginHint)}`:t}function ei(e){let t=String(e||`?`).trim().split(/\s+/).filter(Boolean);if(!t.length)return`?`;if(t.length>1)return(t[0][0]+t[1][0]).toUpperCase();let n=t[0];return n[0].toUpperCase()+(n[1]||``).toLowerCase()}function ti(e){return`Switched to ${e}. It starts fresh and can read this chat.`}function ni(e){if(!e?.configured)return{name:null,options:[],defaultId:null};let t=Array.isArray(e.profiles)?e.profiles:[],{options:n}=qr({profileId:`default`,profiles:t}),r=n.filter(e=>e.configured),i=t.find(e=>e.id==="default")?.sameAs||`default`;return{name:e.label||r.find(e=>e.isDefault)?.label||null,options:r.length>1?r:[],defaultId:i}}function ri({threadProfile:e=`default`,wanted:t,defaultId:n}){let r=e=>e==="default"||e===n,i=e||`default`;return i===t||r(i)&&r(t)?null:t}function ii({again:e,name:t}){return e?`Fix again`:t?`Fix with ${t}`:`Fix with agent`}var ai=e=>hi[Ir.indexOf(e)]||null,oi={blue:`Blue`,violet:`Violet`,pink:`Pink`,amber:`Amber`,green:`Green`,cyan:`Cyan`,indigo:`Indigo`,magenta:`Magenta`},W=`#fff`,G=`currentColor`,si=(e=26)=>(0,P.jsx)(`path`,{d:`M16.5 ${e}q3.5 2.8 7 0`,fill:`none`,stroke:G,strokeWidth:`1.8`,strokeLinecap:`round`}),ci={boxy:{name:`Square robot`,tint:`blue`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 13V8`,stroke:W,strokeWidth:`2.4`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`20`,cy:`7`,r:`2.6`,fill:W}),(0,P.jsx)(`rect`,{x:`5.5`,y:`18.5`,width:`4`,height:`7`,rx:`2`,fill:W,opacity:`.75`}),(0,P.jsx)(`rect`,{x:`30.5`,y:`18.5`,width:`4`,height:`7`,rx:`2`,fill:W,opacity:`.75`}),(0,P.jsx)(`rect`,{x:`9`,y:`12.5`,width:`22`,height:`19`,rx:`5.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.5`,cy:`20.5`,r:`2.3`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.5`,cy:`20.5`,r:`2.3`,fill:G}),(0,P.jsx)(`rect`,{x:`15.5`,y:`25.5`,width:`9`,height:`2.2`,rx:`1.1`,fill:G})]})},dot:{name:`Round robot`,tint:`green`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M13.5 13.5 11 8.5M26.5 13.5 29 8.5`,stroke:W,strokeWidth:`2.2`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`10.6`,cy:`7.6`,r:`2.2`,fill:W}),(0,P.jsx)(`circle`,{cx:`29.4`,cy:`7.6`,r:`2.2`,fill:W}),(0,P.jsx)(`circle`,{cx:`20`,cy:`22`,r:`11.5`,fill:W}),(0,P.jsx)(`rect`,{x:`11.5`,y:`17`,width:`17`,height:`8`,rx:`4`,fill:G}),(0,P.jsx)(`circle`,{cx:`16.3`,cy:`21`,r:`1.7`,fill:W}),(0,P.jsx)(`circle`,{cx:`23.7`,cy:`21`,r:`1.7`,fill:W})]})},cyclops:{name:`One-eyed robot`,tint:`violet`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`rect`,{x:`8`,y:`8.5`,width:`24`,height:`24`,rx:`9`,fill:W}),(0,P.jsx)(`circle`,{cx:`20`,cy:`18.5`,r:`6.2`,fill:G}),(0,P.jsx)(`circle`,{cx:`20`,cy:`18.5`,r:`2.6`,fill:W}),(0,P.jsx)(`rect`,{x:`16`,y:`27.3`,width:`8`,height:`2`,rx:`1`,fill:G})]})},ghost:{name:`Ghost`,tint:`indigo`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M9 32V19a11 11 0 0 1 22 0v13l-3.7-3.2-3.6 3.2-3.7-3.2-3.7 3.2-3.6-3.2z`,fill:W}),(0,P.jsx)(`ellipse`,{cx:`15.8`,cy:`18.8`,rx:`2.2`,ry:`2.9`,fill:G}),(0,P.jsx)(`ellipse`,{cx:`24.2`,cy:`18.8`,rx:`2.2`,ry:`2.9`,fill:G})]})},cat:{name:`Cat`,tint:`amber`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M8.5 8.5 16 13.2h8l7.5-4.7V23a11.5 9.5 0 0 1-23 0z`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.3`,cy:`21`,r:`2.2`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.7`,cy:`21`,r:`2.2`,fill:G}),(0,P.jsx)(`path`,{d:`M18.3 25.2h3.4L20 27.2z`,fill:G})]})},owl:{name:`Owl`,tint:`cyan`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M9 9.5 15 13h10l6-3.5V22a11 11 0 0 1-22 0z`,fill:W}),(0,P.jsx)(`circle`,{cx:`15`,cy:`19.5`,r:`4.6`,fill:G}),(0,P.jsx)(`circle`,{cx:`25`,cy:`19.5`,r:`4.6`,fill:G}),(0,P.jsx)(`circle`,{cx:`15`,cy:`19.5`,r:`1.9`,fill:W}),(0,P.jsx)(`circle`,{cx:`25`,cy:`19.5`,r:`1.9`,fill:W}),(0,P.jsx)(`path`,{d:`M18.2 24.6h3.6L20 28z`,fill:G})]})},bear:{name:`Bear`,tint:`pink`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`circle`,{cx:`10.8`,cy:`12`,r:`4.6`,fill:W}),(0,P.jsx)(`circle`,{cx:`29.2`,cy:`12`,r:`4.6`,fill:W}),(0,P.jsx)(`circle`,{cx:`20`,cy:`21.5`,r:`11`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.3`,cy:`19.5`,r:`2`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.7`,cy:`19.5`,r:`2`,fill:G}),(0,P.jsx)(`ellipse`,{cx:`20`,cy:`25.6`,rx:`4.4`,ry:`3.2`,fill:G,opacity:`.28`}),(0,P.jsx)(`ellipse`,{cx:`20`,cy:`24.4`,rx:`1.9`,ry:`1.4`,fill:G})]})},alien:{name:`Alien`,tint:`green`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 7.5c7 0 11.5 4.6 11.5 11 0 7-6 14-11.5 14S8.5 25.5 8.5 18.5c0-6.4 4.5-11 11.5-11z`,fill:W}),(0,P.jsx)(`ellipse`,{cx:`14.9`,cy:`19`,rx:`2.9`,ry:`4.3`,transform:`rotate(-24 14.9 19)`,fill:G}),(0,P.jsx)(`ellipse`,{cx:`25.1`,cy:`19`,rx:`2.9`,ry:`4.3`,transform:`rotate(24 25.1 19)`,fill:G}),(0,P.jsx)(`rect`,{x:`18`,y:`27`,width:`4`,height:`1.8`,rx:`.9`,fill:G})]})},cloud:{name:`Cloud`,tint:`magenta`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`circle`,{cx:`13.5`,cy:`22.5`,r:`6.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`20.5`,cy:`17`,r:`8.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`27.5`,cy:`22`,r:`6.5`,fill:W}),(0,P.jsx)(`rect`,{x:`7`,y:`20.5`,width:`27`,height:`9`,rx:`4.5`,fill:W}),(0,P.jsx)(`circle`,{cx:`16.5`,cy:`20.5`,r:`1.9`,fill:G}),(0,P.jsx)(`circle`,{cx:`24`,cy:`20.5`,r:`1.9`,fill:G}),(0,P.jsx)(`path`,{d:`M17 24.6q3.3 2.6 6.6 0`,fill:`none`,stroke:G,strokeWidth:`1.8`,strokeLinecap:`round`})]})},planet:{name:`Planet`,tint:`indigo`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`ellipse`,{cx:`20`,cy:`21`,rx:`15.5`,ry:`4.8`,transform:`rotate(-18 20 21)`,fill:`none`,stroke:W,strokeWidth:`2.4`,opacity:`.7`}),(0,P.jsx)(`circle`,{cx:`20`,cy:`20`,r:`9.5`,fill:W}),(0,P.jsx)(`path`,{d:`M5.6 25.7c3.2 1.4 10-.2 17.4-2.6 5.2-1.7 9.3-3.7 11.4-5.5`,fill:`none`,stroke:W,strokeWidth:`2.4`,strokeLinecap:`round`}),(0,P.jsx)(`circle`,{cx:`16.5`,cy:`17.3`,r:`1.8`,fill:G}),(0,P.jsx)(`circle`,{cx:`23.3`,cy:`16.3`,r:`1.8`,fill:G})]})},hex:{name:`Hexagon`,tint:`cyan`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 5.5 32.6 12.7v14.6L20 34.5 7.4 27.3V12.7z`,fill:W,stroke:W,strokeWidth:`2`,strokeLinejoin:`round`}),(0,P.jsx)(`circle`,{cx:`15.5`,cy:`18.5`,r:`2.2`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.5`,cy:`18.5`,r:`2.2`,fill:G}),si(24)]})},drop:{name:`Drop`,tint:`blue`,art:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`path`,{d:`M20 5c5.5 7.3 11 11.7 11 18a11 11 0 0 1-22 0c0-6.3 5.5-10.7 11-18z`,fill:W}),(0,P.jsx)(`circle`,{cx:`15.8`,cy:`21.5`,r:`2.1`,fill:G}),(0,P.jsx)(`circle`,{cx:`24.2`,cy:`21.5`,r:`2.1`,fill:G}),si(26.5)]})}},li=Fr,ui=e=>{let t=Hr(e);return t?`api/agent/icons/${t}`:null},di={xs:`h-4 w-4 rounded-[4px] text-[8px]`,sm:`h-5 w-5 rounded-[5px] text-[9px]`,md:`h-7 w-7 rounded-md text-[11px]`,lg:`h-10 w-10 rounded-lg text-sm`,xl:`h-14 w-14 rounded-xl text-lg`};function fi({label:e,icon:t=null,tint:n=null,logo:r=null,size:i=`md`,round:a=!1,src:o=null,className:s,...c}){let l=U(`relative inline-flex shrink-0 items-center justify-center overflow-hidden select-none`,di[i],a&&`rounded-full`),u=o||ui(t),d=!u&&t?ci[t]:null,f=!u&&!d&&!t?Gr(r):null,p={"aria-hidden":`true`,"data-sw-agent-avatar":u?`upload`:d?t:f?`logo:${f.id}`:`initials`,...c};if(u)return(0,P.jsx)(`span`,{className:U(l,`bg-surface-2`,s),...p,children:(0,P.jsx)(`img`,{src:u,alt:``,className:`h-full w-full object-cover`,draggable:`false`})});if(d){let e=ai(n)||ai(d.tint);return(0,P.jsx)(`span`,{className:U(l,s),style:{background:e,color:e},...p,children:(0,P.jsx)(`svg`,{viewBox:`0 0 40 40`,className:`h-full w-full`,focusable:`false`,children:d.art})})}if(f)return(0,P.jsx)(`span`,{className:U(l,`border border-line bg-surface-2 text-fg`,s),...p,children:(0,P.jsx)(`svg`,{viewBox:f.viewBox,className:`h-[62%] w-[62%]`,fill:`currentColor`,focusable:`false`,children:(0,P.jsx)(`path`,{d:f.path})})});let m=ai(n);return(0,P.jsx)(`span`,{className:U(l,`font-semibold`,m?`text-white`:`border border-line bg-surface-2 text-fg`,s),style:m?{background:m}:void 0,...p,children:ei(e)})}var pi=e=>({icon:e?.icon||null,tint:e?.tint||null,logo:e?.logo||null});function mi(e){let t=String(e||`?`).replace(/\(guest\)/i,``).trim().split(/\s+/).filter(Boolean);return((t[0]?.[0]||`?`)+(t.length>1?t.at(-1)[0]:``)).toUpperCase()}var hi=[`#1d4ed8`,`#6d28d9`,`#be185d`,`#b45309`,`#047857`,`#0e7490`,`#4338ca`,`#a21caf`],gi=`#3f3f46`;function _i(e){let t=String(e||``).toLowerCase(),n=0;for(let e=0;e<t.length;e+=1)n=n*31+t.charCodeAt(e)>>>0;return hi[n%hi.length]}var vi={xs:`h-5 w-5 text-[9px]`,sm:`h-6 w-6 text-[10px]`,md:`h-7 w-7 text-[11px]`,lg:`h-9 w-9 text-xs`};function yi({name:e,src:t=null,className:n,person:r=!1,agent:i=!1,agentId:a=null,colorKey:o,color:s=null,size:c=`lg`}){return t&&!i?(0,P.jsx)(xi,{src:t,name:e,className:n,person:r,colorKey:o,size:c},t):i?(0,P.jsx)(bi,{name:e,agentId:a,className:n,size:c}):r?(0,P.jsx)(`span`,{className:U(`inline-flex shrink-0 items-center justify-center rounded-full font-semibold text-white select-none`,vi[c],n),style:{background:s||_i(o||e)},"aria-hidden":`true`,children:mi(e)}):(0,P.jsx)(`span`,{className:U(`inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent/15 text-xs font-semibold text-accent select-none`,n),"aria-hidden":`true`,children:mi(e)})}function bi({name:e,agentId:t,className:n,size:r}){let i=Pr(e,t);return i?(0,P.jsx)(fi,{label:e,...i,round:!0,className:U(vi[r],n)}):(0,P.jsx)(`span`,{className:U(`inline-flex shrink-0 items-center justify-center rounded-full font-semibold text-white select-none`,vi[r],n),style:{background:gi},"aria-hidden":`true`,children:(0,P.jsx)(w,{size:r===`xs`?11:13})})}function xi({src:e,name:t,className:n,person:r,colorKey:i,size:a}){let[o,s]=(0,c.useState)(!1);return o?(0,P.jsx)(yi,{name:t,className:n,person:r,colorKey:i,size:a}):(0,P.jsx)(`span`,{className:U(`inline-flex shrink-0 overflow-hidden rounded-full bg-surface-2`,r?vi[a]:`h-9 w-9`,n),"aria-hidden":`true`,children:(0,P.jsx)(`img`,{src:e,alt:``,className:`h-full w-full object-cover`,onError:()=>s(!0),"data-sw-avatar-image":!0})})}var Si=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Ci=Rt,wi=(e,t)=>n=>{if(t?.variants==null)return Ci(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Si(t)||Si(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Ci(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Ti=wi(`inline-flex shrink-0 items-center gap-1 font-medium whitespace-nowrap`,{variants:{tone:{neutral:`border-line bg-surface-2 text-muted`,accent:`border-accent/40 bg-accent/10 text-accent`,ok:`border-ok/40 bg-ok/10 text-fg`,warn:`border-warn/50 bg-warn/15 text-fg`,bad:`border-bad/40 bg-bad/10 text-bad`,solid:`border-transparent bg-accent text-accent-fg`},shape:{chip:`rounded-full border px-1.5 text-[10.5px] leading-4`,count:`h-5 rounded-full border-0 px-1.5 text-[10px] font-semibold`,tag:`rounded border-0 px-1 text-[10px] uppercase`}},defaultVariants:{tone:`neutral`,shape:`chip`}});function Ei({tone:e,shape:t,className:n,...r}){return(0,P.jsx)(`span`,{className:U(Ti({tone:e,shape:t}),n),...r})}function Di({className:e,...t}){return(0,P.jsx)(`span`,{className:U(`inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[9px] font-bold text-white`,e),...t})}var Oi=Object.defineProperty,ki=(e,t)=>Oi(e,`name`,{value:t,configurable:!0});function Ai(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ki(Ai,`setRef`);function ji(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ai(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ai(e[t],null)}}}}ki(ji,`composeRefs`);function K(...e){return c.useCallback(ji(...e),e)}ki(K,`useComposedRefs`);var Mi=Object.defineProperty,Ni=(e,t)=>Mi(e,`name`,{value:t,configurable:!0});function Pi(e){let t=c.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=Gi(r),c.Children.forEach(r,e=>{if(Vi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;Ui(n)&&typeof Yi==`function`;)n=Yi(n._payload);a=Ri(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=c.cloneElement(a,void 0,s):!o&&c.Children.count(r)===1&&c.isValidElement(r)&&(a=r);let l=a?Bi(a):void 0,u=K(n,l);if(!a){if(r||r===0)throw Error(o?Ji(e):qi(e));return r}let d=zi(i,a.props??{});return a.type!==c.Fragment&&(d.ref=n?u:l),c.cloneElement(a,d)});return t.displayName=`${e}.Slot`,t}Ni(Pi,`createSlot`);var Fi=Pi(`Slot`),Ii=Symbol.for(`radix.slottable`);function Li(e){let t=Ni(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ii,t}Ni(Li,`createSlottable`);var Ri=Ni((e,t)=>`child`in e.props?c.isValidElement(t)?c.cloneElement(t,void 0,e.props.children(t.props.children)):null:c.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function zi(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Ki(a,i))}return{...e,...n}}Ni(zi,`mergeProps`);function Bi(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ni(Bi,`getElementRef`);function Vi(e){return c.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ii}Ni(Vi,`isSlottable`);var Hi=Symbol.for(`react.lazy`);function Ui(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Hi&&`_payload`in e&&Wi(e._payload)}Ni(Ui,`isLazyComponent`);function Wi(e){return typeof e==`object`&&!!e&&`then`in e}Ni(Wi,`isPromiseLike`);function Gi(e){let t=e;for(;Ui(t)&&typeof Yi==`function`;)t=Yi(t._payload);return t}Ni(Gi,`useUnwrappedLazy`);function Ki(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ni(Ki,`concatAriaDescribedby`);var qi=Ni(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Ji=Ni(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Yi=c.use,Xi=Object.defineProperty,Zi=(e,t)=>Xi(e,`name`,{value:t,configurable:!0}),q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Pi(`Primitive.${t}`),r=c.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,P.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qi(e,t){e&&N.flushSync(()=>e.dispatchEvent(t))}Zi(Qi,`dispatchDiscreteCustomEvent`);var $i=Object.defineProperty,ea=(e,t)=>$i(e,`name`,{value:t,configurable:!0}),ta=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),na=c.forwardRef(ea(function(e,t){return(0,P.jsx)(q.span,{...e,ref:t,style:{...ta,...e.style}})},`VisuallyHidden`)),ra=Object.defineProperty,ia=(e,t)=>ra(e,`name`,{value:t,configurable:!0});function aa(e,t){let n=c.createContext(t);n.displayName=e+`Context`;let r=ia(e=>{let{children:t,...r}=e,i=c.useMemo(()=>r,Object.values(r));return(0,P.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=c.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return ia(i,`useContext`),[r,i]}ia(aa,`createContext`);function oa(e,t=[]){let n=[];function r(t,r){let i=c.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=ia(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,l=c.useMemo(()=>o,Object.values(o));return(0,P.jsx)(s.Provider,{value:l,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:l=!1}=s,u=o?.[e]?.[a]||i,d=c.useContext(u);if(d)return d;if(r!==void 0)return r;if(!l)throw Error(`\`${n}\` must be used within \`${t}\``)}return ia(s,`useContext`),[o,s]}ia(r,`createContext`);let i=ia(()=>{let t=n.map(e=>c.createContext(e));return ia(function(n){let r=n?.[e]||t;return c.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,sa(i,...t)]}ia(oa,`createContextScope`);function sa(...e){let t=e[0];if(e.length===1)return t;let n=ia(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return ia(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}ia(sa,`composeContextScopes`);var J=globalThis?.document?c.useLayoutEffect:()=>{},ca=Object.defineProperty,Y=(e,t)=>ca(e,`name`,{value:t,configurable:!0});function la(e){let t=e+`CollectionProvider`,[n,r]=oa(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Y(e=>{let{scope:t,children:n}=e,r=c.useRef(null),a=c.useRef(new Map).current;return(0,P.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,l=Pi(s),u=c.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=K(t,a(s,n).collectionRef);return(0,P.jsx)(l,{ref:i,children:r})});u.displayName=s;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=Pi(d),m=c.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=c.useRef(null),s=K(t,o),l=a(d,n);return c.useEffect(()=>(l.itemMap.set(o,{ref:o,...i}),()=>void l.itemMap.delete(o))),(0,P.jsx)(p,{[f]:``,ref:s,children:r})});m.displayName=d;function h(t){let n=a(e+`CollectionConsumer`,t);return c.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Y(h,`useCollection`),[{Provider:o,Slot:u,ItemSlot:m},h,r]}Y(la,`createCollection`);var ua=new WeakMap,da=class e extends Map{static{Y(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ua.set(this,!0)}set(e,t){return ua.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=ma(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=fa(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=fa(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return fa(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function fa(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=pa(e,t);return n===-1?void 0:e[n]}Y(fa,`at`);function pa(e,t){let n=e.length,r=ma(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Y(pa,`toSafeIndex`);function ma(e){return e!==e||e===0?0:Math.trunc(e)}Y(ma,`toSafeInteger`);function ha(e){let t=e+`CollectionProvider`,[n,r]=oa(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let l=Y(({state:e,...t})=>e?(0,P.jsx)(d,{...t,state:e}):(0,P.jsx)(u,{...t}),`CollectionProvider`);l.displayName=t;let u=Y(e=>{let t=v();return(0,P.jsx)(d,{...e,state:t})},`CollectionInit`);u.displayName=e+`CollectionInit`;let d=Y(e=>{let{scope:t,children:n,state:r}=e,a=c.useRef(null),[s,l]=c.useState(null),u=K(a,l),[d,f]=r,p=c.useRef(new da),m=c.useCallback(()=>{let e=p.current;return va(e)||e.sort(ya),e},[]);return c.useEffect(()=>{if(!s)return;let e=ba(()=>{f(e=>{let t=e.toSorted(ya);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,f]),(0,P.jsx)(i,{scope:t,collectionElementRef:u,collectionElementRefObject:a,getCollection:m,setCollection:f,registryRef:p,children:(0,P.jsx)(o,{scope:t,collectionElement:s,collection:d,children:n})})},`CollectionProviderImpl`);d.displayName=e+`CollectionProviderImpl`;let f=e+`CollectionSlot`,p=Pi(f),m=c.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=K(t,a(f,n).collectionElementRef);return(0,P.jsx)(p,{ref:i,children:r})});m.displayName=f;let h=e+`CollectionItemSlot`,g=Pi(h),_=c.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=c.useRef(null),{setCollection:s,registryRef:l}=a(h,n),u=c.useRef(i);ga(u.current,i)||(u.current=i);let d=u.current,f=K(t,c.useCallback(e=>{let t=l.current;e?t.set(e,{...u.current,element:e}):o.current&&t.delete(o.current)},[l]),o);J(()=>{let e=o.current,t=l.current;e&&t.has(e)&&t.set(e,{...d,element:e})},[d,l]);let p=c.useRef(null);return c.useEffect(()=>{let e=o.current,t=p.current;((t?.element??null)!==e||e&&t?.itemData!==d)&&(p.current=e?{element:e,itemData:d}:null,s(n=>{let r=new da(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...d,element:e}),r.sort(ya)}))}),c.useEffect(()=>()=>{let e=p.current;p.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new da(t);return n.delete(e.element),n})},[s]),(0,P.jsx)(g,{"data-radix-collection-item":``,ref:f,children:r})});_.displayName=h;function v(){return c.useState(new da)}Y(v,`useInitCollection`);function y(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Y(y,`useCollection`);function b(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Y(b,`useGetCollection`),[{Provider:l,Slot:m,ItemSlot:_},{createCollectionScope:r,useCollection:y,useGetCollection:b,useInitCollection:v}]}Y(ha,`createCollection`);function ga(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Y(ga,`shallowEqual`);function _a(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Y(_a,`isElementPreceding`);function va(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Y(va,`isInDocumentOrder`);function ya(e,t){return!e[1].element||!t[1].element?0:_a(e[1].element,t[1].element)?-1:1}Y(ya,`sortByDocumentPosition`);function ba(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Y(ba,`getChildListObserver`);var xa=Object.defineProperty,Sa=(e,t)=>xa(e,`name`,{value:t,configurable:!0}),Ca=!!(typeof window<`u`&&window.document&&window.document.createElement);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return Sa(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Sa(X,`composeEventHandlers`);function wa(e){if(!Ca)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Sa(wa,`getOwnerWindow`);function Ta(e){if(!Ca)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Sa(Ta,`getOwnerDocument`);function Ea(e,t=!1){let{activeElement:n}=Ta(e);if(!n?.nodeName)return null;if(Da(n)&&n.contentDocument)return Ea(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ta(n).getElementById(e);if(t)return t}}return n}Sa(Ea,`getActiveElement`);function Da(e){return e.tagName===`IFRAME`}Sa(Da,`isFrame`);var Oa=Object.defineProperty,ka=(e,t)=>Oa(e,`name`,{value:t,configurable:!0}),Aa=c.useEffectEvent,ja=c.useInsertionEffect;function Ma(e){if(typeof Aa==`function`)return Aa(e);let t=c.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof ja==`function`?ja(()=>{t.current=e}):J(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}ka(Ma,`useEffectEvent`);var Na=Object.defineProperty,Pa=(e,t)=>Na(e,`name`,{value:t,configurable:!0}),Fa=c.useInsertionEffect||J;function Ia({prop:e,defaultProp:t,onChange:n=Pa(()=>{},`onChange`),caller:r}){let[i,a,o]=La({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,c.useCallback(t=>{if(s){let n=Ra(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Pa(Ia,`useControllableState`);function La({defaultProp:e,onChange:t}){let[n,r]=c.useState(e),i=c.useRef(n),a=c.useRef(t);return Fa(()=>{a.current=t},[t]),c.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Pa(La,`useUncontrolledState`);function Ra(e){return typeof e==`function`}Pa(Ra,`isFunction`);var za=Symbol(`RADIX:SYNC_STATE`);function Ba(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,l=i!==void 0,u=Ma(o),d=[{...n,state:a}];r&&d.push(r);let[f,p]=c.useReducer((t,n)=>{if(n.type===za)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),m=f.state,h=c.useRef(m);c.useEffect(()=>{h.current!==m&&(h.current=m,l||u(m))},[m,h,l]);let g=c.useMemo(()=>i===void 0?f:{...f,state:i},[f,i]);return c.useEffect(()=>{l&&!Object.is(i,f.state)&&p({type:za,state:i})},[i,f.state,l]),[g,p]}Pa(Ba,`useControllableStateReducer`);var Va=Object.defineProperty,Ha=(e,t)=>Va(e,`name`,{value:t,configurable:!0});function Ua(e,t){return c.useReducer((e,n)=>t[e][n]??e,e)}Ha(Ua,`useStateMachine`);var Wa=Ha(e=>{let{present:t,children:n}=e,r=Ga(t),i=typeof n==`function`?n({present:r.isPresent}):c.Children.only(n),a=qa(r.ref,Ya(i));return typeof n==`function`||r.isPresent?c.cloneElement(i,{ref:a}):null},`Presence`);function Ga(e){let[t,n]=c.useState(),r=c.useRef(null),i=c.useRef(e),a=c.useRef(`none`),o=c.useRef(void 0),[s,l]=Ua(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return c.useEffect(()=>{s===`mounted`?(a.current=o.current??Ja(r.current),o.current=void 0):a.current=`none`},[s]),J(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Ja(t);e?(o.current=s,l(`MOUNT`)):s===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,l]),J(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Ha(a=>{let o=Ja(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(l(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Ha(e=>{e.target===t&&(a.current=Ja(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:c.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Ja(t)}else r.current=null;n(e)},[])}}Ha(Ga,`usePresence`);function Ka(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ha(Ka,`setRef`);function qa(...e){let t=c.useRef(e);return t.current=e,c.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ka(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ka(n[e],null)}}},[])}Ha(qa,`useStableComposedRefs`);function Ja(e){return e?.animationName||`none`}Ha(Ja,`getAnimationName`);function Ya(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ha(Ya,`getElementRef`);var Xa=Object.defineProperty,Za=(e,t)=>Xa(e,`name`,{value:t,configurable:!0}),Qa=c.useId||(()=>void 0),$a=0;function eo(e){let[t,n]=c.useState(Qa());return J(()=>{e||n(e=>e??String($a++))},[e]),e||(t?`radix-${t}`:``)}Za(eo,`useId`);var to=Object.defineProperty,no=(e,t)=>to(e,`name`,{value:t,configurable:!0}),ro=`Collapsible`,[io,ao]=oa(ro),[oo,so]=io(ro),co=c.forwardRef(no(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,u]=Ia({prop:r,defaultProp:i??!1,onChange:o,caller:ro});return(0,P.jsx)(oo,{scope:n,disabled:a,contentId:eo(),open:l,onOpenToggle:c.useCallback(()=>u(e=>!e),[u]),children:(0,P.jsx)(q.div,{"data-state":ho(l),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),lo=`CollapsibleTrigger`,uo=c.forwardRef(no(function(e,t){let{__scopeCollapsible:n,...r}=e,i=so(lo,n);return(0,P.jsx)(q.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":ho(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:X(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),fo=`CollapsibleContent`,po=c.forwardRef(no(function(e,t){let{forceMount:n,...r}=e,i=so(fo,e.__scopeCollapsible);return(0,P.jsx)(Wa,{present:n||i.open,children:({present:e})=>(0,P.jsx)(mo,{...r,ref:t,present:e})})},`CollapsibleContent`)),mo=c.forwardRef(no(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=so(fo,n),[s,l]=c.useState(r),u=c.useRef(null),d=K(t,u),f=c.useRef(0),p=f.current,m=c.useRef(0),h=m.current,g=o.open||s,_=c.useRef(g),v=c.useRef(void 0);return c.useEffect(()=>{let e=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(e)},[]),J(()=>{let e=u.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();f.current=t.height,m.current=t.width,_.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),l(r)}},[o.open,r]),(0,P.jsx)(q.div,{"data-state":ho(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!g,...a,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&i})},`CollapsibleContentImpl`));function ho(e){return e?`open`:`closed`}no(ho,`getState`);var go=Object.defineProperty,_o=(e,t)=>go(e,`name`,{value:t,configurable:!0}),vo={LTR:`ltr`,RTL:`rtl`},yo=c.createContext(void 0);function bo(e){let t=c.useContext(yo);return e||t||vo.LTR}_o(bo,`useDirection`);var xo=Object.defineProperty,So=(e,t)=>xo(e,`name`,{value:t,configurable:!0}),Co=c.useInsertionEffect;function wo(e){let t=c.useRef(e);return typeof Co==`function`?Co(()=>{t.current=e}):J(()=>{t.current=e}),c.useMemo(()=>((...e)=>t.current?.(...e)),[])}So(wo,`useCallbackRef`);var To=Object.defineProperty,Eo=(e,t)=>To(e,`name`,{value:t,configurable:!0}),Do=`dismissableLayer.update`,Oo=`dismissableLayer.pointerDownOutside`,ko=`dismissableLayer.focusOutside`,Ao,jo=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Mo=c.forwardRef(Eo(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,d=c.useContext(jo),[f,p]=c.useState(null),m=f?.ownerDocument??globalThis?.document,[,h]=c.useState({}),g=K(t,p),_=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=f?_.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=c.useRef(!1),w=Fo(e=>{a?.(e),s?.(e),e.defaultPrevented||l?.()},{ownerDocument:m,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:d.dismissableSurfaces,shouldHandlePointerDownOutside:c.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...d.branches].some(t=>t.contains(e));return S&&!t},[d.branches,S])}),T=Io(e=>{if(r&&C.current)return;let t=e.target;[...d.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||l?.())},m),E=f?b===_.length-1:!1,D=wo(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))});return c.useEffect(()=>{if(E)return m.addEventListener(`keydown`,D,{capture:!0}),()=>m.removeEventListener(`keydown`,D,{capture:!0})},[m,E,D]),c.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Ao=m.body.style.pointerEvents,m.body.style.pointerEvents=`none`),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Lo(),()=>{n&&(d.layersWithOutsidePointerEventsDisabled.delete(f),d.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=Ao))}},[f,m,n,d]),c.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Lo())},[f,d]),c.useEffect(()=>{let e=Eo(()=>h({}),`handleUpdate`);return document.addEventListener(Do,e),()=>document.removeEventListener(Do,e)},[]),(0,P.jsx)(q.div,{...u,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:X(e.onFocusCapture,T.onFocusCapture),onBlurCapture:X(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function No(){let e=c.useContext(jo),[t,n]=c.useState(null);return c.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Eo(No,`useDismissableLayerSurface`);var Po=Eo(()=>!0,`IS_TRUE`);function Fo(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Po}=t,s=wo(e),l=c.useRef(!1),u=c.useRef(!1),d=c.useRef(new Map),f=c.useRef(()=>{});return c.useEffect(()=>{function e(){u.current=!1,i.current=!1,d.current.clear()}Eo(e,`resetOutsideInteraction`);function t(){return Array.from(d.current.values()).some(Boolean)}Eo(t,`isOutsideInteractionIntercepted`);function c(e){if(!u.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||d.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{u.current&&f.current()},0)}Eo(c,`handleInteractionCapture`);function p(e){u.current&&d.current.set(e.type,!1)}Eo(p,`handleInteractionBubble`);let m=Eo(a=>{if(a.target&&!l.current){let c=function(){n.removeEventListener(`click`,f.current);let r=t();e(),r||Ro(Oo,s,p,{discrete:!0})};if(Eo(c,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,f.current),e(),l.current=!1;return}let p={originalEvent:a};u.current=!0,i.current=r&&a.button===0,d.current.clear(),!r||a.button!==0?c():(n.removeEventListener(`click`,f.current),f.current=c,n.addEventListener(`click`,f.current,{once:!0}))}else n.removeEventListener(`click`,f.current),e();l.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,c,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,f.current);for(let e of h)n.removeEventListener(e,c,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Eo(()=>l.current=!0,`onPointerDownCapture`)}}Eo(Fo,`usePointerDownOutside`);function Io(e,t=globalThis?.document){let n=wo(e),r=c.useRef(!1);return c.useEffect(()=>{let e=Eo(e=>{e.target&&!r.current&&Ro(ko,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Eo(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Eo(()=>r.current=!1,`onBlurCapture`)}}Eo(Io,`useFocusOutside`);function Lo(){let e=new CustomEvent(Do);document.dispatchEvent(e)}Eo(Lo,`dispatchUpdate`);function Ro(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Qi(i,a):i.dispatchEvent(a)}Eo(Ro,`handleAndDispatchCustomEvent`);var zo=Object.defineProperty,Z=(e,t)=>zo(e,`name`,{value:t,configurable:!0}),Bo=`focusScope.autoFocusOnMount`,Vo=`focusScope.autoFocusOnUnmount`,Ho={bubbles:!1,cancelable:!0},Uo=c.forwardRef(Z(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[l,u]=c.useState(null),d=wo(a),f=wo(o),p=c.useRef(null),m=K(t,u),h=c.useRef(i);c.useEffect(()=>{h.current=i});let g=c.useCallback(e=>e?l?.contains(e)?!0:!!h.current?.some(t=>t.contains(e)):!1,[l]),_=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let e=function(e){if(_.paused||!l)return;let t=e.target;g(t)?p.current=t:es(p.current,{select:!0})},t=function(e){if(_.paused||!l)return;let t=e.relatedTarget;t!==null&&(g(t)||es(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&es(l)};Z(e,`handleFocusIn`),Z(t,`handleFocusOut`),Z(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,l,_.paused,g]),c.useEffect(()=>{if(l){ts.add(_);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(Bo,Ho);l.addEventListener(Bo,d),l.dispatchEvent(t),t.defaultPrevented||(Jo(is(Xo(l)),{select:!0}),document.activeElement===e&&es(l))}return()=>{l.removeEventListener(Bo,d);let t=l.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(Vo,Ho);l.addEventListener(Vo,f),l.dispatchEvent(r),r.defaultPrevented||es(e??t.body,{select:!0}),l.removeEventListener(Vo,f),ts.remove(_)},0)}}},[l,d,f,_]);let v=c.useCallback(e=>{if(!n&&!r||_.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Yo(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&es(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&es(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,_.paused]);return(0,P.jsx)(q.div,{tabIndex:-1,...s,ref:m,onKeyDown:v})},`FocusScope`)),Wo=c.createContext(null);function Go({registry:e,children:t}){return e?(0,P.jsx)(Wo.Provider,{value:e,children:t}):t}Z(Go,`FocusScopeBranchProvider`);function Ko(){let[e,t]=c.useState([]);return{nodes:e,registry:c.useMemo(()=>({add:Z(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:Z(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}Z(Ko,`useFocusScopeBranchRegistry`);function qo(e){let t=c.useContext(Wo);c.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}Z(qo,`useFocusScopeBranch`);function Jo(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(es(r,{select:t}),document.activeElement!==n)return}Z(Jo,`focusFirst`);function Yo(e){let t=Xo(e);return[Zo(t,e),Zo(t.reverse(),e)]}Z(Yo,`getTabbableEdges`);function Xo(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Z(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Z(Xo,`getTabbableCandidates`);function Zo(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Qo(r,{upTo:t})))return r}Z(Zo,`findVisible`);function Qo(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Z(Qo,`isHidden`);function $o(e){return e.tagName===`INPUT`&&typeof e.select==`function`}Z($o,`isSelectableInput`);function es(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&$o(e)&&t&&e.select()}}Z(es,`focus`);var ts=ns();function ns(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=rs(e,t),e.unshift(t)},remove(t){e=rs(e,t),e[0]?.resume()}}}Z(ns,`createFocusScopesStack`);function rs(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Z(rs,`arrayRemove`);function is(e){return e.filter(e=>e.tagName!==`A`)}Z(is,`removeLinks`);var as=Object.defineProperty,os=c.forwardRef(((e,t)=>as(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=c.useState(!1);J(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?N.createPortal((0,P.jsx)(q.div,{...r,ref:t}),o):null},`Portal`)),ss=Object.defineProperty,cs=(e,t)=>ss(e,`name`,{value:t,configurable:!0}),ls=0,us=null;function ds(e){return fs(),e.children}cs(ds,`FocusGuards`);function fs(){c.useEffect(()=>{us||={start:ps(),end:ps()};let{start:e,end:t}=us;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),ls++,()=>{ls===1&&(us?.start.remove(),us?.end.remove(),us=null),ls=Math.max(0,ls-1)}},[])}cs(fs,`useFocusGuards`);function ps(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}cs(ps,`createFocusGuard`);var ms=function(){return ms=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ms.apply(this,arguments)};function hs(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function gs(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var _s=`right-scroll-bar-position`,vs=`width-before-scroll-bar`,ys=`with-scroll-bars-hidden`,bs=`--removed-body-scroll-bar-size`;function xs(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ss(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Cs=typeof window<`u`?c.useLayoutEffect:c.useEffect,ws=new WeakMap;function Ts(e,t){var n=Ss(t||null,function(t){return e.forEach(function(e){return xs(e,t)})});return Cs(function(){var t=ws.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||xs(e,null)}),i.forEach(function(e){r.has(e)||xs(e,a)})}ws.set(n,e)},[e]),n}function Es(e){return e}function Ds(e,t){t===void 0&&(t=Es);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Os(e){e===void 0&&(e={});var t=Ds(null);return t.options=ms({async:!0,ssr:!1},e),t}var ks=function(e){var t=e.sideCar,n=hs(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return c.createElement(r,ms({},n))};ks.isSideCarExport=!0;function As(e,t){return e.useMedium(t),ks}var js=Os(),Ms=function(){},Ns=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Ms,onWheelCapture:Ms,onTouchMoveCapture:Ms}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=hs(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=Ts([n,t]),w=ms(ms({},x),i);return c.createElement(c.Fragment,null,d&&c.createElement(S,{sideCar:js,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?c.cloneElement(c.Children.only(s),ms(ms({},w),{ref:C})):c.createElement(y,ms({},w,{className:l,ref:C}),s))});Ns.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ns.classNames={fullWidth:vs,zeroRight:_s};var Ps=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Fs(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ps();return t&&e.setAttribute(`nonce`,t),e}function Is(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ls(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Rs=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Fs())&&(Is(t,n),Ls(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zs=function(){var e=Rs();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bs=function(){var e=zs();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Vs={left:0,top:0,right:0,gap:0},Hs=function(e){return parseInt(e||``,10)||0},Us=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Hs(n),Hs(r),Hs(i)]},Ws=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Vs;var t=Us(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gs=Bs(),Ks=`data-scroll-locked`,qs=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
2
  .${ys} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};
@@ -38,4 +38,4 @@ import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.f
38
38
  `},Js=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Ys=function(){c.useEffect(function(){return document.body.setAttribute(Ks,(Js()+1).toString()),function(){var e=Js()-1;e<=0?document.body.removeAttribute(Ks):document.body.setAttribute(Ks,e.toString())}},[])},Xs=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Ys();var a=c.useMemo(function(){return Ws(i)},[i]);return c.createElement(Gs,{styles:qs(a,!t,i,n?``:`!important`)})},Zs=!1;if(typeof window<`u`)try{var Qs=Object.defineProperty({},"passive",{get:function(){return Zs=!0,!0}});window.addEventListener(`test`,Qs,Qs),window.removeEventListener(`test`,Qs,Qs)}catch{Zs=!1}var $s=Zs?{passive:!1}:!1,ec=function(e){return e.tagName===`TEXTAREA`},tc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ec(e)&&n[t]===`visible`)},nc=function(e){return tc(e,`overflowY`)},rc=function(e){return tc(e,`overflowX`)},ic=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),sc(e,r)){var i=cc(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ac=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},oc=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},sc=function(e,t){return e===`v`?nc(t):rc(t)},cc=function(e,t){return e===`v`?ac(t):oc(t)},lc=function(e,t){return e===`h`&&t===`rtl`?-1:1},uc=function(e,t,n,r,i){var a=lc(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=cc(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&sc(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},dc=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fc=function(e){return[e.deltaX,e.deltaY]},pc=function(e){return e&&`current`in e?e.current:e},mc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hc=function(e){return`
39
39
  .block-interactivity-${e} {pointer-events: none;}
40
40
  .allow-interactivity-${e} {pointer-events: all;}
41
- `},gc=0,_c=[];function vc(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(gc++)[0],a=c.useState(Bs)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=gs([e.lockRef.current],(e.shards||[]).map(pc),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=dc(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ic(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ic(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return uc(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(_c.length&&_c[_c.length-1]===a){var r=`deltaY`in n?fc(n):dc(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&mc(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(pc).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:yc(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=dc(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,fc(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,dc(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return _c.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,$s),document.addEventListener(`touchmove`,l,$s),document.addEventListener(`touchstart`,d,$s),function(){_c=_c.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,$s),document.removeEventListener(`touchmove`,l,$s),document.removeEventListener(`touchstart`,d,$s)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:hc(i)}):null,m?c.createElement(Xs,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bc=As(js,vc),xc=c.forwardRef(function(e,t){return c.createElement(Ns,ms({},e,{ref:t,sideCar:bc}))});xc.classNames=Ns.classNames;var Sc=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Cc=new WeakMap,wc=new WeakMap,Tc={},Ec=0,Dc=function(e){return e&&(e.host||Dc(e.parentNode))},Oc=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Dc(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},kc=function(e,t,n,r){var i=Oc(t,Array.isArray(e)?e:[e]);Tc[n]||(Tc[n]=new WeakMap);var a=Tc[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Cc.get(e)||0)+1,l=(a.get(e)||0)+1;Cc.set(e,c),a.set(e,l),o.push(e),c===1&&i&&wc.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ec++,function(){o.forEach(function(e){var t=Cc.get(e)-1,i=a.get(e)-1;Cc.set(e,t),a.set(e,i),t||(wc.has(e)||e.removeAttribute(r),wc.delete(e)),i||e.removeAttribute(n)}),Ec--,Ec||(Cc=new WeakMap,Cc=new WeakMap,wc=new WeakMap,Tc={})}},Ac=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Sc(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),kc(r,i,n,`aria-hidden`)):function(){return null}},jc=Object.defineProperty,Mc=(e,t)=>jc(e,`name`,{value:t,configurable:!0}),Nc=`Dialog`,[Pc,Fc]=oa(Nc),[Ic,Lc]=Pc(Nc),Rc=Mc(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=c.useRef(null),l=c.useRef(null),{nodes:u,registry:d}=Ko(),[f,p]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:Nc}),[m,h]=c.useState(0),[g,_]=c.useState(0);return(0,P.jsx)(Ic,{scope:t,triggerRef:s,contentRef:l,contentId:eo(),titleId:eo(),descriptionId:eo(),titlePresent:m>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:_,open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(e=>!e),[p]),modal:o,branchNodes:u,branchRegistry:d,children:n})},`Dialog`),zc=`DialogPortal`,[Bc,Vc]=Pc(zc,{forceMount:void 0}),Hc=Mc(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Lc(zc,t);return(0,P.jsx)(Bc,{scope:t,forceMount:n,children:c.Children.map(r,e=>(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Uc=`DialogOverlay`,Wc=c.forwardRef(Mc(function(e,t){let n=Vc(Uc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lc(Uc,e.__scopeDialog);return a.modal?(0,P.jsx)(Wa,{present:r||a.open,children:(0,P.jsx)(Kc,{...i,ref:t})}):null},`DialogOverlay`)),Gc=Pi(`DialogOverlay.RemoveScroll`),Kc=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(Uc,n),a=K(t,No());return(0,P.jsx)(xc,{as:Gc,allowPinchZoom:!0,shards:c.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,P.jsx)(q.div,{"data-state":rl(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),qc=`DialogContent`,Jc=c.forwardRef(Mc(function(e,t){let n=Vc(qc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lc(qc,e.__scopeDialog);return(0,P.jsx)(Wa,{present:r||a.open,children:a.modal?(0,P.jsx)(Yc,{...i,ref:t}):(0,P.jsx)(Xc,{...i,ref:t})})},`DialogContent`)),Yc=c.forwardRef(Mc(function(e,t){let n=Lc(qc,e.__scopeDialog),r=c.useRef(null),i=K(t,n.contentRef,r);return c.useEffect(()=>{let e=r.current;if(e)return Ac(e)},[]),(0,P.jsx)(Zc,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Xc=c.forwardRef(Mc(function(e,t){let n=Lc(qc,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,P.jsx)(Zc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Zc=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=Lc(qc,n);return fs(),(0,P.jsx)(Go,{registry:l.branchRegistry,children:(0,P.jsx)(Uo,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Mo,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?nl(o,l.descriptionId):o,"data-state":rl(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),Qc=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(`DialogTitle`,n),{setTitleCount:a}=i;return J(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(q.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),$c=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(`DialogDescription`,n),{setDescriptionCount:a}=i;return J(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(q.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),el=`DialogClose`,tl=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(el,n);return(0,P.jsx)(q.button,{type:`button`,...r,ref:t,onClick:X(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function nl(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Mc(nl,`concatAriaDescribedby`);function rl(e){return e?`open`:`closed`}Mc(rl,`getState`);var il=Object.defineProperty,al=(e,t)=>il(e,`name`,{value:t,configurable:!0});function ol(e){let[t,n]=c.useState(void 0);return J(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}al(ol,`useSize`);var sl=[`top`,`right`,`bottom`,`left`],cl=Math.min,ll=Math.max,ul=Math.round,dl=Math.floor,fl=e=>({x:e,y:e}),pl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ml(e,t,n){return ll(e,cl(t,n))}function hl(e,t){return typeof e==`function`?e(t):e}function gl(e){return e.split(`-`)[0]}function _l(e){return e.split(`-`)[1]}function vl(e){return e===`x`?`y`:`x`}function yl(e){return e===`y`?`height`:`width`}function bl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xl(e){return vl(bl(e))}function Sl(e,t,n){n===void 0&&(n=!1);let r=_l(e),i=xl(e),a=yl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jl(o)),[o,jl(o)]}function Cl(e){let t=jl(e);return[wl(e),t,wl(t)]}function wl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Tl=[`left`,`right`],El=[`right`,`left`],Dl=[`top`,`bottom`],Ol=[`bottom`,`top`];function kl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?El:Tl:t?Tl:El;case`left`:case`right`:return t?Dl:Ol;default:return[]}}function Al(e,t,n,r){let i=_l(e),a=kl(gl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wl)))),a}function jl(e){let t=gl(e);return pl[t]+e.slice(t.length)}function Ml(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Nl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ml(e)}function Pl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Fl(e,t,n){let{reference:r,floating:i}=e,a=bl(t),o=xl(t),s=yl(o),c=gl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=_l(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Il(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=hl(t,e),p=Nl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Pl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ll=50,Rl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Il},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Fl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ll&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Fl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},zl=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=hl(e,t)||{};if(l==null)return{};let d=Nl(u),f={x:n,y:r},p=xl(i),m=yl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=cl(d[_],T),D=cl(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=ml(E,k,O),j=!c.arrow&&_l(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Bl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=hl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gl(r),_=bl(o),v=gl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jl(o)]:Cl(o)),x=p!==`none`;!d&&x&&b.push(...Al(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Sl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===bl(t)||T.every(e=>bl(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=bl(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Vl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hl(e){return sl.some(t=>e[t]>=0)}var Ul=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hl(e,t);switch(i){case`referenceHidden`:{let e=Vl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Hl(e)}}}case`escaped`:{let e=Vl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Hl(e)}}}default:return{}}}}},Wl=new Set([`left`,`top`]);async function Gl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gl(n),s=_l(n),c=bl(n)===`y`,l=Wl.has(o)?-1:1,u=a&&c?-1:1,d=hl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Kl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Gl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ql=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=hl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bl(i),p=vl(f),m=u[p],h=u[f],g=(e,t)=>ml(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Jl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=hl(e,t),u={x:n,y:r},d=bl(i),f=vl(d),p=u[f],m=u[d],h=hl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Wl.has(gl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Yl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=hl(e,t),c=await i.detectOverflow(t,s),l=gl(n),u=_l(n),d=bl(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=cl(p-c[m],g),y=cl(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ll(c.left,c.right):S=p-2*ll(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Xl(){return typeof window<`u`}function Zl(e){return eu(e)?(e.nodeName||``).toLowerCase():`#document`}function Ql(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $l(e){return((eu(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function eu(e){return Xl()?e instanceof Node||e instanceof Ql(e).Node:!1}function tu(e){return Xl()?e instanceof Element||e instanceof Ql(e).Element:!1}function nu(e){return Xl()?e instanceof HTMLElement||e instanceof Ql(e).HTMLElement:!1}function ru(e){return!Xl()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ql(e).ShadowRoot}function iu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=hu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function au(e){return/^(table|td|th)$/.test(Zl(e))}function ou(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var su=/transform|translate|scale|rotate|perspective|filter/,cu=/paint|layout|strict|content/,lu=e=>!!e&&e!==`none`,uu;function du(e){let t=tu(e)?hu(e):e;return lu(t.transform)||lu(t.translate)||lu(t.scale)||lu(t.rotate)||lu(t.perspective)||!pu()&&(lu(t.backdropFilter)||lu(t.filter))||su.test(t.willChange||``)||cu.test(t.contain||``)}function fu(e){let t=_u(e);for(;nu(t)&&!mu(t);){if(du(t))return t;if(ou(t))return null;t=_u(t)}return null}function pu(){return uu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),uu}function mu(e){return/^(html|body|#document)$/.test(Zl(e))}function hu(e){return Ql(e).getComputedStyle(e)}function gu(e){return tu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _u(e){if(Zl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ru(e)&&e.host||$l(e);return ru(t)?t.host:t}function vu(e){let t=_u(e);return mu(t)?(e.ownerDocument||e).body:nu(t)&&iu(t)?t:vu(t)}function yu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=vu(e),i=r===e.ownerDocument?.body,a=Ql(r);if(i){let e=bu(a);return t.concat(a,a.visualViewport||[],iu(r)?r:[],e&&n?yu(e):[])}return t.concat(r,yu(r,[],n))}function bu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xu(e){let t=hu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=nu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ul(n)!==a||ul(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Su(e){return tu(e)?e:e.contextElement}function Cu(e){let t=Su(e);if(!nu(t))return fl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=xu(t),o=(a?ul(n.width):n.width)/r,s=(a?ul(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var wu=fl(0);function Tu(e){let t=Ql(e);return!pu()||!t.visualViewport?wu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ql(e)}function Du(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Su(e),o=fl(1);t&&(r?tu(r)&&(o=Cu(r)):o=Cu(e));let s=Eu(a,n,r)?Tu(a):fl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ql(a),t=tu(r)?Ql(r):r,n=e,i=bu(n);for(;i&&t!==n;){let e=Cu(i),t=i.getBoundingClientRect(),r=hu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ql(i),i=bu(n)}}return Pl({width:u,height:d,x:c,y:l})}function Ou(e,t){let n=gu(e).scrollLeft;return t?t.left+n:Du($l(e)).left+n}function ku(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ou(e,n),y:n.top+t.scrollTop}}function Au(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=$l(r),s=t?ou(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fl(1),u=fl(0),d=nu(r);if((d||!a)&&((Zl(r)!==`body`||iu(o))&&(c=gu(r)),d)){let e=Du(r);l=Cu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ku(o,c):fl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ju(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Mu(e){let t=gu(e),n=e.ownerDocument.body,r=ll(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ll(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ou(e),o=-t.scrollTop;return hu(n).direction===`rtl`&&(a+=ll(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Nu=25;function Pu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ql(e),a=$l(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!pu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ou(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Nu&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Fu(e,t){let n=Du(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Cu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Iu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Pu(e,n,t);else if(t===`document`)r=Mu($l(e));else if(tu(t))r=Fu(t,n);else{let n=Tu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pl(r)}function Lu(e,t){let n=t.get(e);if(n)return n;let r=yu(e,[],!1).filter(e=>tu(e)&&Zl(e)!==`body`),i=null,a=hu(e).position===`fixed`,o=a?_u(e):e;for(;tu(o)&&!mu(o);){let e=hu(o),t=du(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=_u(o)}return t.set(e,r),r}function Ru(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ou(t)?[]:Lu(t,this._c):[].concat(n),r],o=Iu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Iu(t,a[e],i);s=ll(n.top,s),c=cl(n.right,c),l=cl(n.bottom,l),u=ll(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function zu(e){let{width:t,height:n}=xu(e);return{width:t,height:n}}function Bu(e,t,n){let r=nu(t),i=$l(t),a=n===`fixed`,o=Du(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fl(0);if((r||!a)&&((Zl(t)!==`body`||iu(i))&&(s=gu(t)),r)){let e=Du(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ou(i));let l=i&&!r&&!a?ku(i,s):fl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Vu(e){return hu(e).position===`static`}function Hu(e,t){if(!nu(e)||hu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return $l(e)===n&&(n=n.ownerDocument.body),n}function Uu(e,t){let n=Ql(e);if(ou(e))return n;if(!nu(e)){let t=_u(e);for(;t&&!mu(t);){if(tu(t)&&!Vu(t))return t;t=_u(t)}return n}let r=Hu(e,t);for(;r&&au(r)&&Vu(r);)r=Hu(r,t);return r&&mu(r)&&Vu(r)&&!du(r)?n:r||fu(e)||n}var Wu=async function(e){let t=this.getOffsetParent||Uu,n=this.getDimensions,r=await n(e.floating);return{reference:Bu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Gu(e){return hu(e).direction===`rtl`}var Ku={convertOffsetParentRelativeRectToViewportRelativeRect:Au,getDocumentElement:$l,getClippingRect:Ru,getOffsetParent:Uu,getElementRects:Wu,getClientRects:ju,getDimensions:zu,getScale:Cu,isElement:tu,isRTL:Gu};function qu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ju(e,t,n){let r=null,i,a=$l(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=dl(d),h=dl(a.clientWidth-(u+f)),g=dl(a.clientHeight-(d+p)),_=dl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ll(0,cl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!qu(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ql(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Yu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Su(e),u=i||a?[...l?yu(l):[],...t?yu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ju(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Du(e):null;c&&g();function g(){let t=Du(e);h&&!qu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Xu=Kl,Zu=ql,Qu=Bl,$u=Yl,ed=Ul,td=zl,nd=Jl,rd=(e,t,n)=>{let r=new Map,i=n??{},a={...Ku,...i.platform,_c:r};return Rl(e,t,{...i,platform:a})},id=typeof document<`u`?c.useLayoutEffect:function(){};function ad(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ad(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ad(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function od(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sd(e,t){let n=od(e);return Math.round(t*n)/n}function cd(e){let t=c.useRef(e);return id(()=>{t.current=e}),t}function ld(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=c.useState(r);ad(p,r)||m(r);let[h,g]=c.useState(null),[_,v]=c.useState(null),y=c.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=c.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=c.useRef(null),w=c.useRef(null),T=c.useRef(d),E=l!=null,D=cd(l),O=cd(i),k=cd(u),A=c.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),rd(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ad(T.current,t)&&(T.current=t,N.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);id(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let j=c.useRef(!1);id(()=>(j.current=!0,()=>{j.current=!1}),[]),id(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=c.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),P=c.useMemo(()=>({reference:x,floating:S}),[x,S]),F=c.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=sd(P.floating,d.x),r=sd(P.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...od(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:A,refs:M,elements:P,floatingStyles:F}),[d,A,M,P,F])}var ud=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:td({element:r.current,padding:i}).fn(n):r?td({element:r,padding:i}).fn(n):{}}}},dd=(e,t)=>{let n=Xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},fd=(e,t)=>{let n=Zu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>({fn:nd(e).fn,options:[e,t]}),md=(e,t)=>{let n=Qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=(e,t)=>{let n=$u(e);return{name:n.name,fn:n.fn,options:[e,t]}},gd=(e,t)=>{let n=ed(e);return{name:n.name,fn:n.fn,options:[e,t]}},_d=(e,t)=>{let n=ud(e);return{name:n.name,fn:n.fn,options:[e,t]}},vd=Object.defineProperty,yd=(e,t)=>vd(e,`name`,{value:t,configurable:!0}),bd={Partial:`partial`,Always:`always`},xd={Optimized:`optimized`,Always:`always`},Sd=`Popper`,[Cd,wd]=oa(Sd),[Td,Ed]=Cd(Sd),Dd=yd(e=>{let{__scopePopper:t,children:n}=e,[r,i]=c.useState(null),[a,o]=c.useState(void 0);return(0,P.jsx)(Td,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Od=`PopperAnchor`,kd=c.forwardRef(yd(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Ed(Od,n),o=c.useRef(null),s=a.onAnchorChange,l=K(t,c.useCallback(e=>{o.current=e,e&&s(e)},[s])),u=c.useRef(null);c.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&s(u.current)});let d=a.placementState&&Id(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,P.jsx)(q.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:l})},`PopperAnchor`)),Ad=`PopperContent`,[jd,Md]=Cd(Ad),Nd=c.forwardRef(yd(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f=bd.Partial,hideWhenDetached:p=!1,updatePositionStrategy:m=xd.Optimized,onPlaced:h,...g}=e,_=Ed(Ad,n),[v,y]=c.useState(null),b=K(t,y),[x,S]=c.useState(null),C=ol(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],k=O.length>0,A={padding:D,boundary:O.filter(Pd),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:F,middlewareData:I}=ld({strategy:`fixed`,placement:E,whileElementsMounted:yd((...e)=>Yu(...e,{animationFrame:m===xd.Always}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[dd({mainAxis:i+T,alignmentAxis:o}),l&&fd({mainAxis:!0,crossAxis:!1,...f===bd.Partial?{limiter:pd()}:{},...A}),l&&md({...A}),hd({...A,apply:yd(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&_d({element:x,padding:s}),Fd({arrowWidth:w,arrowHeight:T}),p&&gd(k?{strategy:`referenceHidden`,...A}:{strategy:`referenceHidden`,padding:A.padding,altBoundary:A.altBoundary})]}),ee=_.setPlacementState;J(()=>(ee(N),()=>{ee(void 0)}),[N,ee]);let[te,ne]=Id(N),re=wo(h);J(()=>{F&&re?.()},[F,re]);let L=I.arrow?.x,R=I.arrow?.y,ie=I.arrow?.centerOffset!==0,[ae,z]=c.useState();return J(()=>{v&&z(window.getComputedStyle(v).zIndex)},[v]),(0,P.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:F?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,P.jsx)(jd,{scope:n,placedSide:te,placedAlign:ne,onArrowChange:S,arrowX:L,arrowY:R,shouldHideArrow:ie,children:(0,P.jsx)(q.div,{"data-side":te,"data-align":ne,...g,ref:b,style:{...g.style,animation:F?g.style?.animation:`none`}})})})},`PopperContent`));function Pd(e){return e!==null}yd(Pd,`isNotNull`);var Fd=yd(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Id(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Id(e){let[t,n=`center`]=e.split(`-`);return[t,n]}yd(Id,`getSideAndAlignFromPlacement`);var Ld=Object.defineProperty,Rd=(e,t)=>Ld(e,`name`,{value:t,configurable:!0}),zd=!1;function Bd(){let[e,t]=c.useState(zd);return c.useEffect(()=>{zd||(zd=!0,t(!0))},[]),e}Rd(Bd,`useIsHydrated`);var Vd=c.useSyncExternalStore;function Hd(){return()=>{}}Rd(Hd,`subscribe`);function Ud(){return Vd(Hd,()=>!0,()=>!1)}Rd(Ud,`useIsHydratedModern`);var Wd=typeof Vd==`function`?Ud:Bd,Gd=Object.defineProperty,Kd=(e,t)=>Gd(e,`name`,{value:t,configurable:!0}),qd=`rovingFocusGroup.onEntryFocus`,Jd={bubbles:!1,cancelable:!0},Yd=`RovingFocusGroup`,[Xd,Zd,Qd]=la(Yd),[$d,ef]=oa(Yd,[Qd]),tf={Vertical:`vertical`,Horizontal:`horizontal`},nf={LTR:`ltr`,RTL:`rtl`},[rf,af]=$d(Yd),of=c.forwardRef(Kd(function(e,t){return(0,P.jsx)(Xd.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,P.jsx)(Xd.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,P.jsx)(sf,{...e,ref:t})})})},`RovingFocusGroup`)),sf=c.forwardRef(Kd(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=c.useRef(null),m=K(t,p),h=bo(a),[g,_]=Ia({prop:o,defaultProp:s??null,onChange:l,caller:Yd}),[v,y]=c.useState(!1),b=wo(u),x=Zd(n),S=c.useRef(!1),[C,w]=c.useState(0);return c.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(qd,b),()=>e.removeEventListener(qd,b)},[b]),(0,P.jsx)(rf,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:g,onItemFocus:c.useCallback(e=>_(e),[_]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:c.useCallback(()=>w(e=>e-1),[]),children:(0,P.jsx)(q.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:`none`,...e.style},onMouseDown:X(e.onMouseDown,()=>{S.current=!0}),onFocus:X(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(qd,Jd);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);pf([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}S.current=!1}),onBlur:X(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),cf=`RovingFocusGroupItem`,lf=c.forwardRef(Kd(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=eo(),u=a||l,d=af(cf,n),f=d.currentTabStopId===u,p=Zd(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=Wd();return J(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),c.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),(0,P.jsx)(Xd.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,P.jsx)(q.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:X(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:X(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:X(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=ff(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?mf(n,r+1):n.slice(r+1)}setTimeout(()=>pf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:f,hasTabStop:g!=null}):o})})},`RovingFocusGroupItem`)),uf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function df(e,t){return t===nf.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Kd(df,`getDirectionAwareKey`);function ff(e,t,n){let r=df(e.key,n);if(!(t===tf.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===tf.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return uf[r]}Kd(ff,`getFocusIntent`);function pf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Kd(pf,`focusFirst`);function mf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Kd(mf,`wrapArray`);var hf=Object.defineProperty,Q=(e,t)=>hf(e,`name`,{value:t,configurable:!0}),gf=[`Enter`,` `],_f=[`ArrowDown`,`PageUp`,`Home`],vf=[`ArrowUp`,`PageDown`,`End`],yf=[..._f,...vf];[...gf],[...gf];var bf=`Menu`,[xf,Sf,Cf]=la(bf),[wf,Tf]=oa(bf,[Cf,wd,ef]),Ef=wd(),Df=ef(),[Of,kf]=wf(bf),[Af,jf]=wf(bf),Mf=Q(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ef(t),[l,u]=c.useState(null),d=c.useRef(!1),f=wo(a),p=bo(i);return c.useEffect(()=>{let e=Q(()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Q(()=>d.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),c.useEffect(()=>{if(!n)return;let e=Q(()=>f(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,P.jsx)(Dd,{...s,children:(0,P.jsx)(Of,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,P.jsx)(Af,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})},`Menu`),Nf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e,i=Ef(n);return(0,P.jsx)(kd,{...i,...r,ref:t})},`MenuAnchor`)),Pf=`MenuPortal`,[Ff,If]=wf(Pf,{forceMount:void 0}),Lf=Q(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=kf(Pf,t);return(0,P.jsx)(Ff,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Rf=`MenuContent`,[zf,Bf]=wf(Rf),Vf=c.forwardRef(Q(function(e,t){let n=If(Rf,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=kf(Rf,e.__scopeMenu),o=jf(Rf,e.__scopeMenu);return(0,P.jsx)(xf.Provider,{scope:e.__scopeMenu,children:(0,P.jsx)(Wa,{present:r||a.open,children:(0,P.jsx)(xf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,P.jsx)(Hf,{...i,ref:t}):(0,P.jsx)(Uf,{...i,ref:t})})})})},`MenuContent`)),Hf=c.forwardRef(Q(function(e,t){let n=kf(Rf,e.__scopeMenu),r=c.useRef(null),i=K(t,r);return c.useEffect(()=>{let e=r.current;if(e)return Ac(e)},[]),(0,P.jsx)(Gf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Uf=c.forwardRef(Q(function(e,t){let n=kf(Rf,e.__scopeMenu);return(0,P.jsx)(Gf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Wf=Pi(`MenuContent.ScrollLock`),Gf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...g}=e,_=kf(Rf,n),v=jf(Rf,n),y=Ef(n),b=Df(n),x=Sf(n),[S,C]=c.useState(null),w=c.useRef(null),[T,E]=c.useState(null);qo(T);let{nodes:D,registry:O}=Ko(),k=!!(i||h),A=K(t,w,_.onContentChange,E),j=c.useRef(0),M=c.useRef(``),N=c.useRef(0),F=c.useRef(null),I=c.useRef(`right`),ee=c.useRef(0),te=c.useMemo(()=>h?[w,...D.map(e=>({current:e}))]:[],[w,D,h]),ne=h?xc:c.Fragment,re=h?{as:Wf,allowPinchZoom:!0,shards:te}:void 0,L=Q(e=>{let t=M.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=hp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){M.current=e,window.clearTimeout(j.current),e!==``&&(j.current=window.setTimeout(()=>s(``),1e3))}Q(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);c.useEffect(()=>()=>window.clearTimeout(j.current),[]),fs();let R=c.useCallback(e=>I.current===F.current?.side&&_p(e,F.current?.area),[]);return(0,P.jsx)(zf,{scope:n,searchRef:M,onItemEnter:c.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:c.useCallback(e=>{R(e)||(w.current?.focus(),C(null))},[R]),onTriggerLeave:c.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:N,onPointerGraceIntentChange:c.useCallback(e=>{F.current=e},[]),children:(0,P.jsx)(Go,{registry:k?O:null,children:(0,P.jsx)(ne,{...re,children:(0,P.jsx)(Uo,{asChild:!0,trapped:i,branches:D,onMountAutoFocus:X(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:(0,P.jsx)(of,{asChild:!0,...b,dir:v.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:X(l,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,P.jsx)(Nd,{role:`menu`,"aria-orientation":`vertical`,"data-state":up(_.open),"data-radix-menu-content":``,dir:v.dir,...y,...g,ref:A,style:{outline:`none`,...g.style},onKeyDown:X(g.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=w.current;if(e.target!==i||!yf.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);vf.includes(e.key)&&a.reverse(),pp(a)}),onBlur:X(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),M.current=``)}),onPointerMove:X(e.onPointerMove,vp(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;I.current=t,ee.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),Kf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,P.jsx)(q.div,{role:`group`,...r,ref:t})},`MenuGroup`)),qf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,P.jsx)(q.div,{...r,ref:t})},`MenuLabel`)),Jf=`MenuItem`,Yf=`menu.itemSelect`,Xf=c.forwardRef(Q(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=c.useRef(null),o=jf(Jf,e.__scopeMenu),s=Bf(Jf,e.__scopeMenu),l=K(t,a),u=c.useRef(!1),d=Q(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Yf,{bubbles:!0,cancelable:!0});e.addEventListener(Yf,e=>r?.(e),{once:!0}),Qi(e,t),t.defaultPrevented?u.current=!1:o.onClose()}},`handleSelect`);return(0,P.jsx)(Zf,{...i,ref:l,disabled:n,onClick:X(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:X(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:X(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&gf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Zf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Bf(Jf,n),s=Df(n),l=c.useRef(null),u=K(t,l),[d,f]=c.useState(!1),[p,m]=c.useState(``);return c.useEffect(()=>{let e=l.current;e&&m((e.textContent??``).trim())},[a.children]),(0,P.jsx)(xf.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:(0,P.jsx)(lf,{asChild:!0,...s,focusable:!r,children:(0,P.jsx)(q.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:X(e.onPointerMove,vp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,vp(e=>o.onItemLeave(e))),onFocus:X(e.onFocus,()=>f(!0)),onBlur:X(e.onBlur,()=>f(!1))})})})},`MenuItemImpl`)),[Qf,$f]=wf(`MenuRadioGroup`,{value:void 0,onValueChange:Q(()=>{},`onValueChange`)}),ep=c.forwardRef(Q(function(e,t){let{value:n,onValueChange:r,...i}=e,a=wo(r);return(0,P.jsx)(Qf,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,P.jsx)(Kf,{...i,ref:t})})},`MenuRadioGroup`)),tp=`MenuRadioItem`,np=c.forwardRef(Q(function(e,t){let{value:n,...r}=e,i=$f(tp,e.__scopeMenu),a=n===i.value;return(0,P.jsx)(ip,{scope:e.__scopeMenu,checked:a,children:(0,P.jsx)(Xf,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":fp(a),onSelect:X(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),rp=`MenuItemIndicator`,[ip,ap]=wf(rp,{checked:!1}),op=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=ap(rp,n);return(0,P.jsx)(Wa,{present:r||dp(a.checked)||a.checked===!0,children:(0,P.jsx)(q.span,{...i,ref:t,"data-state":fp(a.checked)})})},`MenuItemIndicator`)),sp=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,P.jsx)(q.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[cp,lp]=wf(`MenuSub`);function up(e){return e?`open`:`closed`}Q(up,`getOpenState`);function dp(e){return e===`indeterminate`}Q(dp,`isIndeterminate`);function fp(e){return dp(e)?`indeterminate`:e?`checked`:`unchecked`}Q(fp,`getCheckedState`);function pp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Q(pp,`focusFirst`);function mp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Q(mp,`wrapArray`);function hp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=mp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Q(hp,`getNextMatch`);function gp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Q(gp,`isPointInPolygon`);function _p(e,t){return t?gp({x:e.clientX,y:e.clientY},t):!1}Q(_p,`isPointerInGraceArea`);function vp(e){return t=>t.pointerType===`mouse`?e(t):void 0}Q(vp,`whenMouse`);var yp=Object.defineProperty,bp=(e,t)=>yp(e,`name`,{value:t,configurable:!0}),xp=`DropdownMenu`,[Sp,Cp]=oa(xp,[Tf]),wp=Tf(),[Tp,Ep]=Sp(xp),Dp=bp(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=wp(t),u=c.useRef(null),[d,f]=Ia({prop:i,defaultProp:a??!1,onChange:o,caller:xp});return(0,P.jsx)(Tp,{scope:t,triggerId:eo(),triggerRef:u,contentId:eo(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:s,children:(0,P.jsx)(Mf,{...l,open:d,onOpenChange:f,dir:r,modal:s,children:n})})},`DropdownMenu`),Op=`DropdownMenuTrigger`,kp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Ep(Op,n),o=wp(n),s=K(t,a.triggerRef);return(0,P.jsx)(Nf,{asChild:!0,...o,children:(0,P.jsx)(q.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:X(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:X(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Ap=bp(e=>{let{__scopeDropdownMenu:t,...n}=e,r=wp(t);return(0,P.jsx)(Lf,{...r,...n})},`DropdownMenuPortal`),jp=`DropdownMenuContent`,Mp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ep(jp,n),a=wp(n),o=c.useRef(!1);return(0,P.jsx)(Vf,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:X(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Np=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(Kf,{...i,...r,ref:t})},`DropdownMenuGroup`)),Pp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(qf,{...i,...r,ref:t})},`DropdownMenuLabel`)),Fp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(Xf,{...i,...r,ref:t})},`DropdownMenuItem`)),Ip=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(ep,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Lp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(np,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Rp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(op,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),zp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(sp,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Bp=Object.defineProperty,Vp=(e,t)=>Bp(e,`name`,{value:t,configurable:!0}),Hp,Up=`HoverCard`,[Wp,Gp]=oa(Up,[wd]),Kp=wd(),[qp,Jp]=Wp(Up),Yp=Vp(e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,l=Kp(t),u=c.useRef(0),d=c.useRef(0),f=c.useRef(!1),p=c.useRef(!1),[m,h]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:Up}),g=c.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>h(!0),o)},[o,h]),_=c.useCallback(()=>{clearTimeout(u.current),!f.current&&!p.current&&(d.current=window.setTimeout(()=>h(!1),s))},[s,h]),v=c.useCallback(()=>h(!1),[h]);return c.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),(0,P.jsx)(qp,{scope:t,open:m,onOpenChange:h,onOpen:g,onClose:_,onDismiss:v,hasSelectionRef:f,isPointerDownOnContentRef:p,children:(0,P.jsx)(Dd,{...l,children:n})})},`HoverCard`),Xp=`HoverCardTrigger`,Zp=c.forwardRef(Vp(function(e,t){let{__scopeHoverCard:n,...r}=e,i=Jp(Xp,n),a=Kp(n);return(0,P.jsx)(kd,{asChild:!0,...a,children:(0,P.jsx)(q.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:X(e.onPointerEnter,am(i.onOpen)),onPointerLeave:X(e.onPointerLeave,am(i.onClose)),onFocus:X(e.onFocus,i.onOpen),onBlur:X(e.onBlur,i.onClose),onTouchStart:X(e.onTouchStart,e=>e.preventDefault())})})},`HoverCardTrigger`)),Qp=`HoverCardPortal`,[$p,em]=Wp(Qp,{forceMount:void 0}),tm=Vp(e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=Jp(Qp,t);return(0,P.jsx)($p,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`HoverCardPortal`),nm=`HoverCardContent`,rm=c.forwardRef(Vp(function(e,t){let n=em(nm,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=Jp(nm,e.__scopeHoverCard);return(0,P.jsx)(Wa,{present:r||a.open,children:(0,P.jsx)(im,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:X(e.onPointerEnter,am(a.onOpen)),onPointerLeave:X(e.onPointerLeave,am(a.onClose)),ref:t})})},`HoverCardContent`)),im=c.forwardRef(Vp(function(e,t){let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,l=Jp(nm,n),u=Kp(n),d=c.useRef(null),[f,p]=c.useState(null),m=K(t,d,p);qo(f);let[h,g]=c.useState(!1);return c.useEffect(()=>{if(h){let e=document.body;return Hp=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Hp,e.style.webkitUserSelect=Hp}}},[h]),c.useEffect(()=>{if(d.current){let e=Vp(()=>{g(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(l.hasSelectionRef.current=!0)})},`handlePointerUp`);return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),c.useEffect(()=>{d.current&&om(d.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:X(a,e=>{e.preventDefault()}),onDismiss:l.onDismiss,children:(0,P.jsx)(Nd,{...u,...s,onPointerDown:X(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&g(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:m,style:{...s.style,userSelect:h?`text`:void 0,WebkitUserSelect:h?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})},`HoverCardContentImpl`));function am(e){return t=>t.pointerType===`touch`?void 0:e()}Vp(am,`excludeTouch`);function om(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Vp(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Vp(om,`getTabbableNodes`);var sm=Object.defineProperty,cm=(e,t)=>sm(e,`name`,{value:t,configurable:!0});function lm(e,[t,n]){return Math.min(n,Math.max(t,e))}cm(lm,`clamp`);var um=Object.defineProperty,dm=(e,t)=>um(e,`name`,{value:t,configurable:!0}),fm=`Popover`,[pm,mm]=oa(fm,[wd]),hm=wd(),[gm,_m]=pm(fm),vm=dm(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=hm(t),l=c.useRef(null),[u,d]=c.useState(!1),[f,p]=c.useState(0),[m,h]=c.useState(0),[g,_]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:fm});return(0,P.jsx)(Dd,{...s,children:(0,P.jsx)(gm,{scope:t,contentId:eo(),titleId:eo(),descriptionId:eo(),titlePresent:f>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:h,triggerRef:l,open:g,onOpenChange:_,onOpenToggle:c.useCallback(()=>_(e=>!e),[_]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>d(!0),[]),onCustomAnchorRemove:c.useCallback(()=>d(!1),[]),modal:o,children:n})})},`Popover`),ym=`PopoverAnchor`,bm=c.forwardRef(dm(function(e,t){let{__scopePopover:n,...r}=e,i=_m(ym,n),a=hm(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return c.useEffect(()=>(o(),()=>s()),[o,s]),(0,P.jsx)(kd,{...a,...r,ref:t})},`PopoverAnchor`)),xm=`PopoverTrigger`,Sm=c.forwardRef(dm(function(e,t){let{__scopePopover:n,...r}=e,i=_m(xm,n),a=hm(n),o=K(t,i.triggerRef),s=(0,P.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Nm(i.open),...r,ref:o,onClick:X(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,P.jsx)(kd,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Cm=`PopoverPortal`,[wm,Tm]=pm(Cm,{forceMount:void 0}),Em=dm(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=_m(Cm,t);return(0,P.jsx)(wm,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Dm=`PopoverContent`,Om=c.forwardRef(dm(function(e,t){let n=Tm(Dm,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=_m(Dm,e.__scopePopover);return(0,P.jsx)(Wa,{present:r||a.open,children:a.modal?(0,P.jsx)(Am,{...i,ref:t}):(0,P.jsx)(jm,{...i,ref:t})})},`PopoverContent`)),km=Pi(`PopoverContent.RemoveScroll`),Am=c.forwardRef(dm(function(e,t){let n=_m(Dm,e.__scopePopover),r=c.useRef(null),i=K(t,r),a=c.useRef(!1),{nodes:o,registry:s}=Ko();return c.useEffect(()=>{let e=r.current;if(e)return Ac(e)},[]),(0,P.jsx)(xc,{as:km,allowPinchZoom:!0,shards:c.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,P.jsx)(Mm,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),jm=c.forwardRef(dm(function(e,t){let n=_m(Dm,e.__scopePopover),r=c.useRef(!1),i=c.useRef(!1);return(0,P.jsx)(Mm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Mm=c.forwardRef(dm(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,"aria-describedby":f,branchNodes:p,branchRegistry:m,...h}=e,g=_m(Dm,n),_=hm(n),[v,y]=c.useState(null),b=K(t,y);return qo(v),fs(),(0,P.jsx)(Go,{registry:m,children:(0,P.jsx)(Uo,{asChild:!0,loop:!0,trapped:r,branches:p,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,P.jsx)(Nd,{"data-state":Nm(g.open),role:`dialog`,id:g.contentId,"aria-labelledby":g.titlePresent?g.titleId:void 0,"aria-describedby":g.descriptionPresent?Pm(f,g.descriptionId):f,..._,...h,ref:b,style:{...h.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`));function Nm(e){return e?`open`:`closed`}dm(Nm,`getState`);function Pm(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}dm(Pm,`concatAriaDescribedby`);var Fm=Object.defineProperty,$=(e,t)=>Fm(e,`name`,{value:t,configurable:!0}),Im={ItemAligned:`item-aligned`,Popper:`popper`},Lm={LTR:`ltr`,RTL:`rtl`},Rm=[` `,`Enter`,`ArrowUp`,`ArrowDown`],zm=[` `,`Enter`],Bm=`Select`,[Vm,Hm,Um]=la(Bm),[Wm,Gm]=oa(Bm,[Um,wd]),Km=wd(),[qm,Jm]=Wm(Bm),[Ym,Xm]=Wm(Bm);function Zm(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=Km(t),[v,y]=c.useState(null),[b,x]=c.useState(null),[S,C]=c.useState(!1),w=bo(u),[T,E]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:Bm}),[D,O]=Ia({prop:o,defaultProp:s,onChange:l,caller:Bm}),k=c.useRef(null),A=c.useRef(!1),[j,M]=c.useState(null),N=$(e=>{M({value:e,hasConsumerStoppedPropagation:A.current}),O(e)},`handleUserSelect`),F=c.useRef(D);c.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=$(()=>O(F.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let I=!v||!!h||!!v.closest(`form`),[ee,te]=c.useState(new Set),ne=eo(),re=Array.from(ee).map(e=>e.props.value).join(`;`),L=c.useCallback(e=>{te(t=>new Set(t).add(e))},[]),R=c.useCallback(e=>{te(t=>{let n=new Set(t);return n.delete(e),n})},[]),ie={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ne,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:A,userSelection:j,onUserSelect:N,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:ee,nativeSelectKey:re,isFormControl:I};return(0,P.jsx)(Dd,{..._,children:(0,P.jsx)(qm,{scope:t,...ie,children:(0,P.jsx)(Vm.Provider,{scope:t,children:(0,P.jsx)(Ym,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:R,children:Lh(g)?g(ie):n})})})})}$(Zm,`SelectProvider`);var Qm=$(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(Zm,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(Ih,{__scopeSelect:t}):null]})})},`Select`),$m=`SelectTrigger`,eh=c.forwardRef($(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Km(n),o=Jm($m,n),s=o.disabled||r,l=K(t,o.onTriggerChange),u=Hm(n),d=c.useRef(`touch`),[f,p,m]=zh(e=>{let t=u().filter(e=>!e.disabled),n=Bh(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),h=$(e=>{s||(o.onOpenChange(!0),m()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,P.jsx)(kd,{asChild:!0,...a,children:(0,P.jsx)(q.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Rh(o.value)?``:void 0,...i,ref:l,onClick:X(i.onClick,e=>{e.currentTarget.focus(),d.current!==`mouse`&&h(e)}),onPointerDown:X(i.onPointerDown,e=>{d.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:X(i.onKeyDown,e=>{let t=f.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),p(e.key)),t&&e.key===` `||Rm.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),th=`SelectValue`,nh=c.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,l=Jm(th,n),{onValueNodeHasChildrenChange:u}=l,d=a!==void 0,f=K(t,l.onValueNodeChange);J(()=>{u(d)},[u,d]);let p=Rh(l.value);return(0,P.jsx)(q.span,{...s,asChild:!p&&s.asChild,ref:f,style:{pointerEvents:`none`},children:(0,P.jsx)(c.Fragment,{children:p?o:a},p?`placeholder`:`value`)})},`SelectValue`)),rh=c.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(q.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[ih,ah]=Wm(`SelectPortal`,{forceMount:void 0}),oh=$(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(ih,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(os,{asChild:!0,...r})})},`SelectPortal`),sh=`SelectContent`,ch=c.forwardRef($(function(e,t){let n=ah(sh,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Jm(sh,e.__scopeSelect),[o,s]=c.useState();return J(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(Wa,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(mh,{...i,ref:t}):(0,P.jsx)(lh,{...i,fragment:o})})},`SelectContent`)),lh=c.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?N.createPortal((0,P.jsx)(dh,{scope:n,children:(0,P.jsx)(Vm.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),uh=10,[dh,fh]=Wm(sh),ph=Pi(`SelectContent.RemoveScroll`),mh=c.forwardRef($(function(e,t){let{__scopeSelect:n}=e,{position:r=Im.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=Jm(sh,n),[b,x]=c.useState(null),[S,C]=c.useState(null),w=K(t,x),[T,E]=c.useState(null),[D,O]=c.useState(null),k=Hm(n),[A,j]=c.useState(!1),M=c.useRef(!1),N=c.useRef(!1),F=c.useRef(!1);c.useEffect(()=>{if(b)return Ac(b)},[b]),fs();let I=c.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),ee=c.useCallback(()=>I([T,b]),[I,T,b]);c.useEffect(()=>{A&&ee()},[A,ee]);let{onOpenChange:te,triggerPointerDownPosRef:ne}=y;c.useEffect(()=>{if(b){let e={x:0,y:0},t=$(t=>{e={x:Math.abs(Math.round(t.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ne.current?.y??0))}},`handlePointerMove`),n=$(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||te(!1),document.removeEventListener(`pointermove`,t),ne.current=null},`handlePointerUp`);return ne.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,te,ne]),c.useEffect(()=>{let e=$(()=>te(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[re,L]=zh(e=>{let t=k().filter(e=>!e.disabled),n=Bh(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),R=c.useCallback((e,t,n)=>{let r=!N.current;r&&(N.current=!0);let i=!M.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(M.current=!0)):r&&E(e)},[y.value]),ie=c.useCallback(()=>b?.focus(),[b]),ae=c.useCallback((e,t,n)=>{if(!e)return;let r=!F.current;r&&(F.current=!0);let i=!M.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),z=r===Im.Popper?gh:hh,oe=z===gh?{side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,P.jsx)(dh,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:R,selectedItem:T,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:ee,selectedItemText:D,position:r,isPositioned:A,searchRef:re,children:(0,P.jsx)(xc,{as:ph,allowPinchZoom:!0,children:(0,P.jsx)(Uo,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:X(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,P.jsx)(z,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...oe,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:X(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&L(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>I(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),hh=c.forwardRef($(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Jm(sh,n),o=fh(sh,n),[s,l]=c.useState(null),[u,d]=c.useState(null),f=K(t,d),p=Hm(n),m=c.useRef(!1),h=c.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=c.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==Lm.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-uh,d=lm(a,[uh,Math.max(uh,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-uh,d=lm(a,[uh,Math.max(uh,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=p(),c=window.innerHeight-uh*2,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+h+l+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-uh,D=c-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=f+h+k,j=x-A;if(A<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=u.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,f+g.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}s.style.margin=`${uh}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,_,v,a.dir,r]);J(()=>b(),[b]);let[x,S]=c.useState();J(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);let C=c.useCallback(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return(0,P.jsx)(_h,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:(0,P.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,P.jsx)(q.div,{...i,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),gh=c.forwardRef($(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=uh,...a}=e,o=Km(n);return(0,P.jsx)(Nd,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[_h,vh]=Wm(sh,{}),yh=`SelectViewport`,bh=c.forwardRef($(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=fh(yh,n),o=vh(yh,n),s=K(t,a.onViewportChange),l=c.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,P.jsx)(Vm.Slot,{scope:n,children:(0,P.jsx)(q.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:X(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(l.current-t.scrollTop);if(e>0){let r=window.innerHeight-uh*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}l.current=t.scrollTop})})})]})},`SelectViewport`)),[xh,Sh]=Wm(`SelectGroup`),Ch=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=eo();return(0,P.jsx)(xh,{scope:n,id:i,children:(0,P.jsx)(q.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),wh=`SelectLabel`,Th=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=Sh(wh,n);return(0,P.jsx)(q.div,{id:i.id,...r,ref:t})},`SelectLabel`)),Eh=`SelectItem`,[Dh,Oh]=Wm(Eh),kh=c.forwardRef($(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Jm(Eh,n),l=fh(Eh,n),u=s.value===r,[d,f]=c.useState(a??``),[p,m]=c.useState(!1),h=K(t,wo(e=>l.itemRefCallback?.(e,r,i))),g=eo(),_=c.useRef(`touch`);function v(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return $(v,`handleSelect`),(0,P.jsx)(Dh,{scope:n,value:r,disabled:i,textId:g,isSelected:u,onItemTextChange:c.useCallback(e=>{f(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(Vm.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:(0,P.jsx)(q.div,{role:`option`,"aria-labelledby":g,"data-highlighted":p?``:void 0,"aria-selected":u&&p,"data-state":u?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:X(o.onFocus,()=>m(!0)),onBlur:X(o.onBlur,()=>m(!1)),onClick:X(o.onClick,e=>{i||_.current!==`mouse`&&v(e)}),onPointerUp:X(o.onPointerUp,e=>{i||_.current===`mouse`&&v(e)}),onPointerDown:X(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:X(o.onPointerMove,e=>{_.current=e.pointerType,i?l.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:X(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(l.searchRef?.current===``||e.key!==` `)&&(zm.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Ah=`SelectItemText`,jh=c.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Jm(Ah,n),s=fh(Ah,n),l=Oh(Ah,n),u=Xm(Ah,n),[d,f]=c.useState(null),p=wo(e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),m=K(t,f,l.onItemTextChange,p),h=d?.textContent,g=c.useMemo(()=>(0,P.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=u;return J(()=>(_(g),()=>v(g)),[_,v,g]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(q.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Rh(o.value)?N.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Mh=`SelectItemIndicator`,Nh=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return Oh(Mh,n).isSelected?(0,P.jsx)(q.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Ph=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return(0,P.jsx)(q.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),Fh=`SelectBubbleInput`,Ih=c.forwardRef($(function({__scopeSelect:e,...t},n){let r=Jm(Fh,e),{value:i,onValueChange:a,required:o,disabled:s,name:l,autoComplete:u,form:d,userSelection:f}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=c.useRef(null),g=K(n,h),_=i??``,v=c.useRef(_),y=c.useRef(f),b=c.useRef(!1),x=Array.from(p).some(e=>(e.props.value??``)===``);return c.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=f!==null&&f!==y.current;y.current=f;let i=v.current!==_;v.current=_;let a=r&&i;if(r&&!i&&f.value!==_&&!f.hasConsumerStoppedPropagation&&n){b.current=!0;try{n.call(e,f.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{b.current=!1,n.call(e,_)}return}let o=a&&!f.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,_),e.dispatchEvent(t)}},[_,f]),(0,P.jsxs)(q.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:l,autoComplete:u,disabled:s,form:d,onChange:e=>{b.current||a(e.target.value)},...t,style:{...ta,...t.style},ref:g,defaultValue:_,children:[Rh(i)&&!x?(0,P.jsx)(`option`,{value:``}):null,Array.from(p)]},m)},`SelectBubbleInput`));function Lh(e){return typeof e==`function`}$(Lh,`isFunction`);function Rh(e){return e===``||e===void 0}$(Rh,`shouldShowPlaceholder`);function zh(e){let t=wo(e),n=c.useRef(``),r=c.useRef(0),i=c.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}$(a,`updateSearch`),a(i)},[t]),a=c.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}$(zh,`useTypeaheadSearch`);function Bh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Vh(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}$(Bh,`findNextItem`);function Vh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$(Vh,`wrapArray`);var Hh=Object.defineProperty,Uh=(e,t)=>Hh(e,`name`,{value:t,configurable:!0}),Wh={Automatic:`automatic`,Manual:`manual`},Gh=`Tabs`,[Kh,qh]=oa(Gh,[ef]),Jh=ef(),[Yh,Xh]=Kh(Gh),Zh=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=Wh.Automatic,...l}=e,u=bo(s),[d,f]=Ia({prop:r,onChange:i,defaultProp:a??``,caller:Gh});return(0,P.jsx)(Yh,{scope:n,baseId:eo(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,P.jsx)(q.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Qh=`TabsList`,$h=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Xh(Qh,n),o=Jh(n);return(0,P.jsx)(of,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,P.jsx)(q.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),eg=`TabsTrigger`,tg=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Xh(eg,n),s=Jh(n),c=ig(o.baseId,r),l=ag(o.baseId,r),u=r===o.value;return(0,P.jsx)(lf,{asChild:!0,...s,focusable:!i,active:u,children:(0,P.jsx)(q.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:X(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:X(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:X(e.onFocus,()=>{let e=o.activationMode!==Wh.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),ng=`TabsContent`,rg=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Xh(ng,n),l=ig(s.baseId,r),u=ag(s.baseId,r),d=r===s.value,f=c.useRef(d);return c.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,P.jsx)(Wa,{present:i||d,children:({present:n})=>(0,P.jsx)(q.div,{"data-state":d?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function ig(e,t){return`${e}-trigger-${t}`}Uh(ig,`makeTriggerId`);function ag(e,t){return`${e}-content-${t}`}Uh(ag,`makeContentId`);var og=Object.defineProperty,sg=(e,t)=>og(e,`name`,{value:t,configurable:!0}),cg=`Toggle`,lg=c.forwardRef(sg(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=Ia({prop:n,onChange:i,defaultProp:r??!1,caller:cg});return(0,P.jsx)(q.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:X(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),ug=Object.defineProperty,dg=(e,t)=>ug(e,`name`,{value:t,configurable:!0}),fg=`ToggleGroup`,pg={Single:`single`,Multiple:`multiple`},[mg,hg]=oa(fg,[ef]),gg=ef(),_g=c.forwardRef(dg(function(e,t){let{type:n,...r}=e;if(n===pg.Single)return(0,P.jsx)(bg,{role:`radiogroup`,...r,ref:t});if(n===pg.Multiple)return(0,P.jsx)(xg,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${fg}\``)},`ToggleGroup`)),[vg,yg]=mg(fg),bg=c.forwardRef(dg(function(e,t){let{value:n,defaultValue:r,onValueChange:i=dg(()=>{},`onValueChange`),...a}=e,[o,s]=Ia({prop:n,defaultProp:r??``,onChange:i,caller:fg});return(0,P.jsx)(vg,{scope:e.__scopeToggleGroup,type:pg.Single,value:c.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:c.useCallback(()=>s(``),[s]),children:(0,P.jsx)(wg,{...a,ref:t})})},`ToggleGroupImplSingle`)),xg=c.forwardRef(dg(function(e,t){let{value:n,defaultValue:r,onValueChange:i=dg(()=>{},`onValueChange`),...a}=e,[o,s]=Ia({prop:n,defaultProp:r??[],onChange:i,caller:fg}),l=c.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=c.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,P.jsx)(vg,{scope:e.__scopeToggleGroup,type:pg.Multiple,value:o,onItemActivate:l,onItemDeactivate:u,children:(0,P.jsx)(wg,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[Sg,Cg]=mg(fg),wg=c.forwardRef(dg(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=gg(n),u=bo(o),d={dir:u,...c};return(0,P.jsx)(Sg,{scope:n,rovingFocus:i,disabled:r,children:i?(0,P.jsx)(of,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,P.jsx)(q.div,{...d,ref:t})}):(0,P.jsx)(q.div,{...d,ref:t})})},`ToggleGroupImpl`)),Tg=`ToggleGroupItem`,Eg=c.forwardRef(dg(function(e,t){let n=yg(Tg,e.__scopeToggleGroup),r=Cg(Tg,e.__scopeToggleGroup),i=gg(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},l=c.useRef(null);return r.rovingFocus?(0,P.jsx)(lf,{asChild:!0,...i,focusable:!o,active:a,ref:l,children:(0,P.jsx)(Dg,{...s,ref:t})}):(0,P.jsx)(Dg,{...s,ref:t})},`ToggleGroupItem`)),Dg=c.forwardRef(dg(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=yg(Tg,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===pg.Single?o:void 0;return(0,P.jsx)(lg,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),Og=Object.defineProperty,kg=(e,t)=>Og(e,`name`,{value:t,configurable:!0}),[Ag,jg]=oa(`Tooltip`,[wd]),Mg=wd(),Ng=`TooltipProvider`,Pg=700,Fg=`tooltip.open`,[Ig,Lg]=Ag(Ng),Rg=kg(e=>{let{__scopeTooltip:t,delayDuration:n=Pg,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=c.useRef(!0),s=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,P.jsx)(Ig,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:c.useCallback(()=>{r<=0||(window.clearTimeout(l.current),o.current=!1)},[r]),onClose:c.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:c.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),zg=`Tooltip`,[Bg,Vg]=Ag(zg),Hg=kg(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=Lg(zg,e.__scopeTooltip),u=Mg(t),[d,f]=c.useState(null),[p,m]=c.useState(void 0),h=eo(),g=c.useRef(0),_=o??l.disableHoverableContent,v=s??l.delayDuration,y=c.useRef(!1),[b,x]=Ia({prop:r,defaultProp:i??!1,onChange:kg(e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(Fg))):l.onClose(),a?.(e)},`onChange`),caller:zg}),S=c.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=c.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),w=c.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=c.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);c.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let E=p??h;return(0,P.jsx)(Dd,{...u,children:(0,P.jsx)(Bg,{scope:t,contentId:E,setContentId:m,open:b,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?T():C()},[l.isOpenDelayedRef,T,C]),onTriggerLeave:c.useCallback(()=>{_?w():(window.clearTimeout(g.current),g.current=0)},[w,_]),onOpen:C,onClose:w,disableHoverableContent:_,children:n})})},`Tooltip`),Ug=`TooltipTrigger`,Wg=c.forwardRef(kg(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=Vg(Ug,n),o=Lg(Ug,n),s=Mg(n),l=K(t,c.useRef(null),a.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,P.jsx)(kd,{asChild:!0,...s,children:(0,P.jsx)(q.button,{"aria-describedby":a.open?o_(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:l,onPointerMove:X(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:X(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:X(e.onBlur,a.onClose),onClick:X(e.onClick,a.onClose)})})},`TooltipTrigger`)),Gg=`TooltipPortal`,[Kg,qg]=Ag(Gg,{forceMount:void 0}),Jg=kg(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Vg(Gg,t);return(0,P.jsx)(Kg,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),Yg=`TooltipContent`,Xg=c.forwardRef(kg(function(e,t){let n=qg(Yg,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Vg(Yg,e.__scopeTooltip);return(0,P.jsx)(Wa,{present:r||o.open,children:o.disableHoverableContent?(0,P.jsx)($g,{side:i,...a,ref:t}):(0,P.jsx)(Zg,{side:i,...a,ref:t})})},`TooltipContent`)),Zg=c.forwardRef(kg(function(e,t){let n=Vg(Yg,e.__scopeTooltip),r=Lg(Yg,e.__scopeTooltip),i=c.useRef(null),a=K(t,i),[o,s]=c.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=c.useCallback(()=>{s(null),f(!1)},[f]),m=c.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=t_(r,e_(r,n.getBoundingClientRect())),a=n_(t.getBoundingClientRect()),o=i_([...i,...a]);s(o),f(!0)},[f]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&d){let e=kg(e=>m(e,d),`handleTriggerLeave`),t=kg(e=>m(e,l),`handleContentLeave`);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),c.useEffect(()=>{if(o){let e=kg(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!r_(n,o);r?p():i&&(p(),u())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,o,u,p]),(0,P.jsx)($g,{...e,ref:a})},`TooltipContentHoverable`)),Qg=Li(`TooltipContent`),$g=c.forwardRef(kg(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...l}=e,u=Vg(Yg,n),d=Mg(n),{onClose:f}=u,[p,m]=c.useState(null),h=K(t,m);qo(p),c.useEffect(()=>(document.addEventListener(Fg,f),()=>document.removeEventListener(Fg,f)),[f]),c.useEffect(()=>{if(u.trigger){let e=kg(e=>{e.target instanceof Node&&e.target.contains(u.trigger)&&f()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]);let{setContentId:g}=u;return J(()=>(g(a),()=>{g(void 0)}),[a,g]),(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,P.jsxs)(Nd,{"data-state":u.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:u.contentId,...d,...l,ref:h,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,P.jsx)(Qg,{children:r}),i?(0,P.jsx)(na,{id:u.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function e_(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}kg(e_,`getExitSideFromRect`);function t_(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}kg(t_,`getPaddedExitPoints`);function n_(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}kg(n_,`getPointsFromRect`);function r_(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}kg(r_,`isPointInPolygon`);function i_(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),a_(t)}kg(i_,`getHull`);function a_(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}kg(a_,`getHullPresorted`);function o_(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}kg(o_,`concatAriaDescribedby`);function s_({delayDuration:e=400,...t}){return(0,P.jsx)(Rg,{delayDuration:e,...t})}var c_=Hg,l_=Wg;function u_(e){let t=document.activeElement;e&&(e.style.animation=`none`);let n=0,r=()=>{n+=1,e?.isConnected&&n<20?window.requestAnimationFrame(r):(t?.isConnected?t:document.body).dispatchEvent(new KeyboardEvent(`keydown`,{key:`Escape`,code:`Escape`,bubbles:!0,cancelable:!0}))};window.requestAnimationFrame(r)}function d_({className:e,sideOffset:t=6,children:n,onEscapeKeyDown:r,...i}){let a=(0,c.useRef)(null);return(0,P.jsx)(Jg,{children:(0,P.jsx)(Xg,{ref:a,sideOffset:t,collisionPadding:8,onEscapeKeyDown:e=>{r?.(e),e.defaultPrevented||u_(a.current)},className:U(`z-[70] max-w-64 animate-fade-in data-[state=closed]:animate-fade-out rounded-md bg-fg px-2 py-1 text-xs font-medium text-surface shadow-pop select-none`,e),...i,children:n})})}function f_({content:e,side:t=`top`,align:n,children:r,...i}){return e?(0,P.jsxs)(c_,{...i,children:[(0,P.jsx)(l_,{asChild:!0,children:r}),(0,P.jsx)(d_,{side:t,align:n,children:e})]}):r}var p_=wi(`inline-flex shrink-0 items-center justify-center gap-1.5 rounded-md font-medium whitespace-nowrap transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-accent text-accent-fg shadow-card hover:bg-accent/90`,soft:`bg-accent/8 text-accent ring-1 ring-accent/40 ring-inset hover:bg-accent/12`,secondary:`border border-line bg-surface text-fg shadow-card hover:bg-surface-2`,ghost:`text-muted hover:bg-surface-2 hover:text-fg`,danger:`text-bad hover:bg-bad/10`,link:`px-0 text-accent underline-offset-2 hover:underline`,inverse:`text-current hover:bg-white/15`},size:{xs:`h-7 px-2 text-xs`,sm:`h-8 px-2.5 text-xs`,md:`h-10 px-3 text-sm`,touch:`h-11 min-w-11 px-3 text-sm`,"icon-xs":`h-7 w-7 p-0`,"icon-sm":`h-8 w-8 p-0`,icon:`h-11 w-11 p-0`}},defaultVariants:{variant:`secondary`,size:`sm`}});function m_({variant:e,size:t,asChild:n=!1,className:r,type:i=`button`,...a}){let o=n?Fi:`button`;return(0,P.jsx)(o,{type:n?void 0:i,className:U(p_({variant:e,size:t}),r),...a})}function h_({label:e,tooltip:t,side:n,variant:r=`ghost`,size:i=`icon-sm`,children:a,...o}){return(0,P.jsx)(f_,{content:t??e,side:n,children:(0,P.jsx)(m_,{variant:r,size:i,"aria-label":e,...o,children:a})})}var g_=co;function __({className:e,children:t,chevron:n=!0,...r}){return(0,P.jsxs)(uo,{className:U(`group/collapsible flex min-h-11 w-full items-center gap-2 rounded-md px-2 text-left text-ui font-medium text-fg transition-colors hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent lg:min-h-8`,e),...r,children:[n?(0,P.jsx)(A,{size:14,className:`shrink-0 text-faint transition-transform duration-(--motion-fast) ease-standard group-data-[state=open]/collapsible:rotate-90`,"aria-hidden":`true`}):null,t]})}function v_({className:e,...t}){return(0,P.jsx)(po,{className:U(`overflow-hidden data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down`,e),...t})}function y_({title:e,meta:t,children:n,defaultOpen:r=!1,open:i,onOpenChange:a,className:o,triggerClassName:s,contentClassName:c,...l}){return(0,P.jsxs)(g_,{defaultOpen:r,open:i,onOpenChange:a,className:o,...l,children:[(0,P.jsxs)(__,{className:s,children:[(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),t==null?null:(0,P.jsx)(`span`,{className:`shrink-0 text-caption font-normal text-faint tabular-nums`,children:t})]}),(0,P.jsx)(v_,{children:(0,P.jsx)(`div`,{className:U(`px-2 pt-1 pb-2`,c),children:n})})]})}var b_=wi(`fixed inset-x-0 bottom-0 z-50 flex max-h-[88dvh] w-full animate-sheet-in flex-col overflow-hidden rounded-t-2xl border border-line bg-surface text-fg shadow-pop outline-none sm:inset-auto sm:top-1/2 sm:left-1/2 sm:max-h-[calc(100dvh-3rem)] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:animate-pop-in sm:rounded-xl`,{variants:{size:{sm:`sm:max-w-md`,md:`sm:max-w-xl`,lg:`sm:max-w-5xl`}},defaultVariants:{size:`sm`}});function x_({className:e,...t}){return(0,P.jsx)(Wc,{className:U(`fixed inset-0 z-50 animate-fade-in bg-black/40`,e),...t})}function S_(e){e.preventDefault();let t=e.currentTarget;(t.querySelector(`[data-autofocus]`)||t.querySelector(`textarea, input, button:not([data-dialog-close]), [href]`)||t).focus()}function C_({open:e,onClose:t,title:n,description:r,wrapDescription:i=!1,children:a,footer:o,size:s=`sm`,className:c,onCloseAutoFocus:l,sticky:u=!1}){return It(e,t),(0,P.jsx)(Rc,{open:e,onOpenChange:e=>e?null:t(),children:(0,P.jsxs)(Hc,{children:[(0,P.jsx)(x_,{}),(0,P.jsxs)(Jc,{className:U(b_({size:s}),c),style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`},onOpenAutoFocus:S_,onCloseAutoFocus:l,onEscapeKeyDown:e=>{(u||e.target?.closest?.(`[data-sw-own-escape="true"]`))&&e.preventDefault()},onInteractOutside:e=>{u&&e.preventDefault()},...r?{}:{"aria-describedby":void 0},children:[(0,P.jsxs)(`div`,{className:U(`flex gap-3 border-b border-line px-5 py-3.5`,i?`items-start`:`items-center`),children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(Qc,{className:`text-[15px] font-semibold text-fg`,children:n}),r?(0,P.jsx)($c,{className:U(`mt-0.5 text-xs text-muted`,i?`text-pretty`:`truncate`),children:r}):null]}),(0,P.jsx)(tl,{"data-dialog-close":!0,className:`-mr-2 inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-md text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-accent`,"aria-label":`Close`,children:(0,P.jsx)(M,{size:18,"aria-hidden":`true`})})]}),(0,P.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:a}),o?(0,P.jsx)(`div`,{className:`flex justify-end gap-2 border-t border-line px-5 py-3`,children:o}):null]})]})})}function w_(e,t,n=!1){let[r,i]=(0,c.useState)(n),a=e!==void 0,o=a?e:r,s=(0,c.useCallback)(e=>{a||i(e),t?.(e)},[a,t]);return It(o,()=>s(!1)),[o,s]}function T_({open:e,onOpenChange:t,defaultOpen:n,...r}){let[i,a]=w_(e,t,n);return(0,P.jsx)(Dp,{open:i,onOpenChange:a,...r})}var E_=kp,D_=Np;function O_({className:e,sideOffset:t=4,align:n=`end`,...r}){return(0,P.jsx)(Ap,{children:(0,P.jsx)(Mp,{sideOffset:t,align:n,collisionPadding:8,className:U(`z-[60] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-44 overflow-y-auto data-[state=open]:animate-pop-in rounded-lg border border-line bg-surface p-1 text-fg shadow-pop`,e),...r})})}var k_=`relative flex h-11 w-full cursor-default items-center gap-2 rounded-md px-2 text-sm text-fg outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-surface-2 lg:h-8 lg:text-[13px] [&_svg]:shrink-0 [&_svg]:text-muted`;function A_({className:e,tone:t,...n}){return(0,P.jsx)(Fp,{className:U(k_,t===`danger`&&`text-bad [&_svg]:text-bad`,e),...n})}function j_({className:e,...t}){return(0,P.jsx)(Pp,{className:U(`px-2 pt-2 pb-1 text-[11px] font-medium tracking-wide text-faint uppercase`,e),...t})}function M_({className:e,...t}){return(0,P.jsx)(zp,{className:U(`-mx-1 my-1 h-px bg-line`,e),...t})}var N_=Ip;function P_({className:e,children:t,indicator:n=!0,...r}){return(0,P.jsxs)(Lp,{className:U(k_,n&&`pr-8`,`data-[state=checked]:font-medium`,e),...r,children:[t,n?(0,P.jsx)(Rp,{className:`absolute right-2 inline-flex items-center text-accent`,children:(0,P.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`,className:`!text-accent`,children:(0,P.jsx)(`path`,{d:`M3.5 8.5l3 3 6-7`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}):null]})}function F_({icon:e,title:t,children:n,action:r=null,details:i=null,tone:a=`default`,size:o=`md`,className:s,...c}){let l=o===`lg`;return(0,P.jsxs)(`div`,{className:U(`flex flex-col items-center px-6 text-center`,l?`m-auto w-full max-w-md animate-rise-in gap-3 py-12`:`gap-2 py-10`,s),...c,children:[e?l?(0,P.jsx)(`span`,{className:U(`mb-1 inline-flex h-12 w-12 items-center justify-center rounded-xl border`,a===`bad`?`border-bad/25 bg-bad/10 text-bad`:`border-line bg-surface text-muted shadow-card`),children:(0,P.jsx)(e,{size:22,"aria-hidden":`true`})}):(0,P.jsx)(e,{size:22,className:a===`bad`?`text-bad`:`text-faint`,"aria-hidden":`true`}):null,(0,P.jsx)(`p`,{className:U(`font-medium text-fg`,l?`text-heading font-semibold`:`text-sm`),children:t}),n?(0,P.jsx)(`div`,{className:U(`text-muted`,l?`max-w-sm text-sm`:`max-w-xs text-xs`),children:n}):null,r?(0,P.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center justify-center gap-2`,children:r}):null,i?(0,P.jsx)(y_,{title:`Details`,className:`mt-2 w-full max-w-sm text-left`,triggerClassName:`mx-auto w-auto text-muted`,"data-sw-error-details":!0,children:(0,P.jsx)(`pre`,{className:`rounded-md break-all border border-line bg-surface-2 px-3 py-2 font-mono text-caption whitespace-pre-wrap text-muted`,children:i})}):null]})}function I_({openDelay:e=250,closeDelay:t=80,...n}){return(0,P.jsx)(Yp,{openDelay:e,closeDelay:t,...n})}var L_=Zp;function R_({className:e,sideOffset:t=6,align:n=`start`,...r}){return(0,P.jsx)(tm,{children:(0,P.jsx)(rm,{sideOffset:t,align:n,collisionPadding:8,className:U(`pointer-events-none z-[65] w-72 max-w-[calc(100vw-16px)] animate-fade-in data-[state=closed]:animate-fade-out rounded-lg border border-line bg-surface p-3 text-fg shadow-pop outline-none`,e),...r})})}var z_=wi(`block w-full min-w-0 rounded-md border border-line bg-surface text-fg outline-none placeholder:text-faint focus:border-accent disabled:opacity-50`,{variants:{size:{xs:`h-7 px-2 text-xs`,sm:`h-8 px-2 text-[13px]`,touch:`h-11 px-2.5 text-base`}},defaultVariants:{size:`sm`}});function B_({size:e,icon:t,className:n,wrapperClassName:r,...i}){return t?(0,P.jsxs)(`span`,{className:U(`relative block`,r),children:[(0,P.jsx)(t,{size:13,className:`pointer-events-none absolute top-1/2 left-2 -translate-y-1/2 text-faint`,"aria-hidden":`true`}),(0,P.jsx)(`input`,{className:U(z_({size:e}),`pl-7`,n),...i})]}):(0,P.jsx)(`input`,{className:U(z_({size:e}),n),...i})}function V_({className:e,...t}){return(0,P.jsx)(`kbd`,{className:U(`inline-flex h-4 min-w-4 items-center justify-center rounded border border-current/25 px-1 font-sans text-[10px] font-medium opacity-80`,e),...t})}function H_({open:e,onOpenChange:t,defaultOpen:n,history:r=!0,...i}){return r?(0,P.jsx)(U_,{open:e,onOpenChange:t,defaultOpen:n,...i}):(0,P.jsx)(vm,{open:e,onOpenChange:t,defaultOpen:n,...i})}function U_({open:e,onOpenChange:t,defaultOpen:n,...r}){let[i,a]=w_(e,t,n);return(0,P.jsx)(vm,{open:i,onOpenChange:a,...r})}var W_=Sm,G_=bm;function K_({className:e,align:t=`start`,sideOffset:n=4,...r}){return(0,P.jsx)(Em,{children:(0,P.jsx)(Om,{align:t,sideOffset:n,collisionPadding:8,className:U(`z-[60] max-w-[calc(100vw-16px)] animate-pop-in rounded-lg border border-line bg-surface p-1 text-fg shadow-pop outline-none`,e),...r})})}function q_({open:e,onOpenChange:t,defaultOpen:n,...r}){let[i,a]=w_(e,t,n);return(0,P.jsx)(Qm,{open:i,onOpenChange:a,...r})}var J_=Ch;function Y_(e){return(0,P.jsx)(nh,{...e})}var X_=wi(`inline-flex min-w-0 items-center justify-between gap-1.5 rounded-md border bg-surface text-left font-medium text-fg shadow-card outline-none hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50 data-[placeholder]:text-muted`,{variants:{size:{xs:`h-7 px-2 text-xs`,sm:`h-8 px-2 text-[13px]`,touch:`h-11 px-3 text-sm`},tone:{default:`border-line`,active:`border-warn`}},defaultVariants:{size:`sm`,tone:`default`}}),Z_=new WeakSet,Q_=e=>Z_.has(e?.nativeEvent||e);function $_({size:e,tone:t,className:n,children:r,onKeyDown:i,...a}){return(0,P.jsxs)(eh,{className:U(X_({size:e,tone:t}),n),onKeyDown:e=>{i?.(e),e.defaultPrevented||e.ctrlKey||e.altKey||e.metaKey||e.key.length===1&&e.key!==` `&&(Z_.add(e.nativeEvent),e.preventDefault())},...a,children:[(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:r}),(0,P.jsx)(rh,{asChild:!0,children:(0,P.jsx)(O,{size:14,className:`shrink-0 text-faint`,"aria-hidden":`true`})})]})}function ev({className:e,children:t,align:n=`start`,...r}){return(0,P.jsx)(oh,{children:(0,P.jsx)(ch,{position:`popper`,sideOffset:4,align:n,collisionPadding:8,className:U(`z-[60] max-h-[min(var(--radix-select-content-available-height),24rem)] min-w-[max(var(--radix-select-trigger-width),10rem)] max-w-[calc(100vw-16px)] animate-pop-in overflow-hidden rounded-lg border border-line bg-surface text-fg shadow-pop`,e),...r,children:(0,P.jsx)(bh,{className:`p-1`,nonce:globalThis.__webpack_nonce__,children:t})})})}function tv({className:e,...t}){return(0,P.jsx)(Th,{className:U(`px-2 pt-2 pb-1 text-[11px] font-medium tracking-wide text-faint uppercase`,e),...t})}function nv({className:e,children:t,value:n,...r}){return(0,P.jsxs)(kh,{value:n,className:U(`relative flex h-11 w-full cursor-default items-center gap-2 rounded-md py-0 pr-2 pl-7 text-sm text-fg outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-surface-2 lg:h-8 lg:text-[13px]`,e),"data-sw-option":n,...r,children:[(0,P.jsx)(`span`,{className:`absolute left-2 inline-flex w-4 items-center justify-center`,children:(0,P.jsx)(Nh,{children:(0,P.jsx)(E,{size:14,className:`text-accent`,"aria-hidden":`true`})})}),(0,P.jsx)(jh,{children:t})]})}function rv({className:e,...t}){return(0,P.jsx)(Ph,{className:U(`-mx-1 my-1 h-px bg-line`,e),...t})}function iv({className:e,...t}){return(0,P.jsx)(`div`,{"aria-hidden":`true`,className:U(`sw-skeleton animate-shimmer rounded-md`,e),...t})}function av({size:e=14}){return(0,P.jsx)(`span`,{className:`inline-block animate-spin rounded-full border-2 border-current border-t-transparent`,style:{width:e,height:e},"aria-hidden":`true`})}var ov=Zh,sv={segmented:`flex rounded-md border border-line bg-surface-2 p-0.5`,underline:`flex gap-4 overflow-x-auto border-b border-line [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`},cv=`text-xs font-medium whitespace-nowrap text-muted outline-none hover:text-fg disabled:opacity-50`;function lv(e,t,n){return e===`underline`?U(cv,`relative inline-flex shrink-0 items-center justify-center rounded-sm px-0.5 transition-colors duration-(--motion-fast) ease-standard focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent`,`after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-transparent after:content-['']`,n===`on`?`data-[state=on]:text-fg data-[state=on]:after:bg-accent`:`data-[state=active]:text-fg data-[state=active]:after:bg-accent`,t?`h-11 min-w-11`:`h-11 lg:h-8`):U(cv,`flex-1 rounded px-2.5 focus-visible:outline-2 focus-visible:outline-accent`,n===`on`?`data-[state=on]:bg-surface data-[state=on]:text-fg data-[state=on]:shadow-card`:`data-[state=active]:bg-surface data-[state=active]:text-fg data-[state=active]:shadow-card`,t?`h-11 min-w-11`:`h-7`)}var uv=(0,c.createContext)(`segmented`);function dv({className:e,variant:t=`segmented`,...n}){return(0,P.jsx)(uv.Provider,{value:t,children:(0,P.jsx)($h,{className:U(sv[t],e),"data-sw-tabs-variant":t,...n})})}function fv({className:e,large:t=!1,...n}){let r=(0,c.useContext)(uv);return(0,P.jsx)(tg,{className:U(lv(r,t,`active`),e),...n})}function pv({className:e,...t}){return(0,P.jsx)(rg,{className:U(`outline-none`,e),...t})}var mv=wi(`block w-full min-w-0 resize-y rounded-md border border-line bg-surface text-fg outline-none placeholder:text-faint focus:border-accent disabled:opacity-50`,{variants:{size:{sm:`px-2 py-1.5 text-[13px]`,md:`px-3 py-2 text-[13px]`,touch:`min-h-11 px-2.5 py-2 text-base`}},defaultVariants:{size:`sm`}});function hv({size:e,className:t,...n}){return(0,P.jsx)(`textarea`,{className:U(mv({size:e}),t),...n})}var gv=wi(`inline-flex shrink-0 items-center justify-center gap-1.5 font-medium whitespace-nowrap transition-colors outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{outline:`rounded-md border border-line text-muted hover:text-fg data-[state=on]:border-accent data-[state=on]:bg-accent/10 data-[state=on]:text-fg`,flat:`relative rounded-md text-muted hover:bg-fg/[0.05] hover:text-fg focus-visible:z-10 focus-visible:outline-offset-0 aria-pressed:bg-surface-2 aria-pressed:text-fg aria-pressed:shadow-card aria-pressed:ring-1 aria-pressed:ring-line-strong/70 aria-pressed:ring-inset`,segment:`relative rounded text-muted hover:text-fg focus-visible:z-10 focus-visible:outline-offset-0 aria-pressed:bg-surface aria-pressed:text-fg aria-pressed:shadow-card`,pill:`max-w-full rounded-full border border-line text-muted hover:text-fg data-[state=on]:border-warn data-[state=on]:bg-warn/15 data-[state=on]:text-fg`},size:{xs:`h-7 px-2.5 text-xs`,sm:`h-8 px-2.5 text-xs`,touch:`h-11 px-3 text-xs`}},defaultVariants:{variant:`outline`,size:`sm`}});function _v({variant:e,size:t,className:n,...r}){return(0,P.jsx)(lg,{className:U(gv({variant:e,size:t}),n),...r})}function vv({label:e,options:t,value:n,onChange:r,large:i=!1,disabled:a=!1,variant:o=`segmented`,className:s,itemClassName:c}){return(0,P.jsx)(_g,{type:`single`,value:n,disabled:a,onValueChange:e=>e?r(e):null,"aria-label":e,className:U(sv[o],s),"data-sw-tabs-variant":o,children:t.map(e=>(0,P.jsx)(f_,{content:e.tooltip,side:`bottom`,children:(0,P.jsxs)(Eg,{value:e.id,className:U(lv(o,i,`on`),c),"data-sw-option":e.id,children:[e.label,e.count===void 0?null:(0,P.jsx)(`span`,{className:`tabular ml-1 text-faint`,children:e.count})]})},e.id))})}export{po as $,_t as $t,O_ as A,kr as At,m_ as B,yt as Bt,V_ as C,s as Cn,$r as Ct,L_ as D,Ir as Dt,R_ as E,Kr as Et,P_ as F,wr as Ft,bm as G,nt as Gt,f_ as H,Dt as Ht,M_ as I,br as It,Rc as J,ft as Jt,Om as K,qe as Kt,E_ as L,xr as Lt,A_ as M,U as Mt,j_ as N,Sr as Nt,F_ as O,Br as Ot,N_ as P,Tr as Pt,co as Q,Qe as Qt,C_ as R,Ft as Rt,W_ as S,S as Sn,Qr as St,I_ as T,r as Tn,Gr as Tt,s_ as U,vt as Ut,h_ as V,It as Vt,vm as W,lt as Wt,Hc as X,gt as Xt,Jc as Y,ht as Yt,Qc as Z,mt as Zt,Y_ as _,M as _n,ni as _t,pv as a,He as an,yi as at,G_ as b,E as bn,qr as bt,av as c,be as cn,fi as ct,ev as d,z as dn,oi as dt,rt as en,uo as et,J_ as f,oe as fn,pi as ft,$_ as g,re as gn,Jr as gt,rv as h,ae as hn,Xr as ht,ov as i,Ue as in,gi as it,D_ as j,jr as jt,T_ as k,Vr as kt,iv as l,_e as ln,ci as lt,tv as m,R as mn,Zr as mt,_v as n,We as nn,Di as nt,dv as o,Ae as on,mi as ot,nv as p,ie as pn,ai as pt,Em as q,Ke as qt,hv as r,Le as rn,Ti as rt,fv as s,ye as sn,_i as st,vv as t,$e as tn,Ei as tt,q_ as u,he as un,li as ut,Q_ as v,A as vn,ii as vt,B_ as w,a as wn,ti as wt,K_ as x,w as xn,ri as xt,H_ as y,O as yn,Yr as yt,x_ as z,bt as zt};
41
+ `},gc=0,_c=[];function vc(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),i=c.useState(gc++)[0],a=c.useState(Bs)[0],o=c.useRef(e);c.useEffect(function(){o.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=gs([e.lockRef.current],(e.shards||[]).map(pc),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=c.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=dc(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ic(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ic(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return uc(h,t,e,h===`h`?s:c,!0)},[]),l=c.useCallback(function(e){var n=e;if(_c.length&&_c[_c.length-1]===a){var r=`deltaY`in n?fc(n):dc(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&mc(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(pc).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:yc(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=c.useCallback(function(e){n.current=dc(e),r.current=void 0},[]),f=c.useCallback(function(t){u(t.type,fc(t),t.target,s(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,dc(t),t.target,s(t,e.lockRef.current))},[]);c.useEffect(function(){return _c.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,$s),document.addEventListener(`touchmove`,l,$s),document.addEventListener(`touchstart`,d,$s),function(){_c=_c.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,$s),document.removeEventListener(`touchmove`,l,$s),document.removeEventListener(`touchstart`,d,$s)}},[]);var m=e.removeScrollBar,h=e.inert;return c.createElement(c.Fragment,null,h?c.createElement(a,{styles:hc(i)}):null,m?c.createElement(Xs,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bc=As(js,vc),xc=c.forwardRef(function(e,t){return c.createElement(Ns,ms({},e,{ref:t,sideCar:bc}))});xc.classNames=Ns.classNames;var Sc=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Cc=new WeakMap,wc=new WeakMap,Tc={},Ec=0,Dc=function(e){return e&&(e.host||Dc(e.parentNode))},Oc=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Dc(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},kc=function(e,t,n,r){var i=Oc(t,Array.isArray(e)?e:[e]);Tc[n]||(Tc[n]=new WeakMap);var a=Tc[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Cc.get(e)||0)+1,l=(a.get(e)||0)+1;Cc.set(e,c),a.set(e,l),o.push(e),c===1&&i&&wc.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ec++,function(){o.forEach(function(e){var t=Cc.get(e)-1,i=a.get(e)-1;Cc.set(e,t),a.set(e,i),t||(wc.has(e)||e.removeAttribute(r),wc.delete(e)),i||e.removeAttribute(n)}),Ec--,Ec||(Cc=new WeakMap,Cc=new WeakMap,wc=new WeakMap,Tc={})}},Ac=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Sc(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),kc(r,i,n,`aria-hidden`)):function(){return null}},jc=Object.defineProperty,Mc=(e,t)=>jc(e,`name`,{value:t,configurable:!0}),Nc=`Dialog`,[Pc,Fc]=oa(Nc),[Ic,Lc]=Pc(Nc),Rc=Mc(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=c.useRef(null),l=c.useRef(null),{nodes:u,registry:d}=Ko(),[f,p]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:Nc}),[m,h]=c.useState(0),[g,_]=c.useState(0);return(0,P.jsx)(Ic,{scope:t,triggerRef:s,contentRef:l,contentId:eo(),titleId:eo(),descriptionId:eo(),titlePresent:m>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:_,open:f,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(e=>!e),[p]),modal:o,branchNodes:u,branchRegistry:d,children:n})},`Dialog`),zc=`DialogPortal`,[Bc,Vc]=Pc(zc,{forceMount:void 0}),Hc=Mc(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Lc(zc,t);return(0,P.jsx)(Bc,{scope:t,forceMount:n,children:c.Children.map(r,e=>(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Uc=`DialogOverlay`,Wc=c.forwardRef(Mc(function(e,t){let n=Vc(Uc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lc(Uc,e.__scopeDialog);return a.modal?(0,P.jsx)(Wa,{present:r||a.open,children:(0,P.jsx)(Kc,{...i,ref:t})}):null},`DialogOverlay`)),Gc=Pi(`DialogOverlay.RemoveScroll`),Kc=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(Uc,n),a=K(t,No());return(0,P.jsx)(xc,{as:Gc,allowPinchZoom:!0,shards:c.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,P.jsx)(q.div,{"data-state":rl(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),qc=`DialogContent`,Jc=c.forwardRef(Mc(function(e,t){let n=Vc(qc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Lc(qc,e.__scopeDialog);return(0,P.jsx)(Wa,{present:r||a.open,children:a.modal?(0,P.jsx)(Yc,{...i,ref:t}):(0,P.jsx)(Xc,{...i,ref:t})})},`DialogContent`)),Yc=c.forwardRef(Mc(function(e,t){let n=Lc(qc,e.__scopeDialog),r=c.useRef(null),i=K(t,n.contentRef,r);return c.useEffect(()=>{let e=r.current;if(e)return Ac(e)},[]),(0,P.jsx)(Zc,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Xc=c.forwardRef(Mc(function(e,t){let n=Lc(qc,e.__scopeDialog),r=c.useRef(!1),i=c.useRef(!1);return(0,P.jsx)(Zc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Zc=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=Lc(qc,n);return fs(),(0,P.jsx)(Go,{registry:l.branchRegistry,children:(0,P.jsx)(Uo,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Mo,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?nl(o,l.descriptionId):o,"data-state":rl(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),Qc=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(`DialogTitle`,n),{setTitleCount:a}=i;return J(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(q.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),$c=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(`DialogDescription`,n),{setDescriptionCount:a}=i;return J(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(q.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),el=`DialogClose`,tl=c.forwardRef(Mc(function(e,t){let{__scopeDialog:n,...r}=e,i=Lc(el,n);return(0,P.jsx)(q.button,{type:`button`,...r,ref:t,onClick:X(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function nl(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Mc(nl,`concatAriaDescribedby`);function rl(e){return e?`open`:`closed`}Mc(rl,`getState`);var il=Object.defineProperty,al=(e,t)=>il(e,`name`,{value:t,configurable:!0});function ol(e){let[t,n]=c.useState(void 0);return J(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}al(ol,`useSize`);var sl=[`top`,`right`,`bottom`,`left`],cl=Math.min,ll=Math.max,ul=Math.round,dl=Math.floor,fl=e=>({x:e,y:e}),pl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ml(e,t,n){return ll(e,cl(t,n))}function hl(e,t){return typeof e==`function`?e(t):e}function gl(e){return e.split(`-`)[0]}function _l(e){return e.split(`-`)[1]}function vl(e){return e===`x`?`y`:`x`}function yl(e){return e===`y`?`height`:`width`}function bl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xl(e){return vl(bl(e))}function Sl(e,t,n){n===void 0&&(n=!1);let r=_l(e),i=xl(e),a=yl(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jl(o)),[o,jl(o)]}function Cl(e){let t=jl(e);return[wl(e),t,wl(t)]}function wl(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Tl=[`left`,`right`],El=[`right`,`left`],Dl=[`top`,`bottom`],Ol=[`bottom`,`top`];function kl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?El:Tl:t?Tl:El;case`left`:case`right`:return t?Dl:Ol;default:return[]}}function Al(e,t,n,r){let i=_l(e),a=kl(gl(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wl)))),a}function jl(e){let t=gl(e);return pl[t]+e.slice(t.length)}function Ml(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Nl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ml(e)}function Pl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Fl(e,t,n){let{reference:r,floating:i}=e,a=bl(t),o=xl(t),s=yl(o),c=gl(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=_l(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Il(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=hl(t,e),p=Nl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Pl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Pl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ll=50,Rl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Il},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Fl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ll&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Fl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},zl=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=hl(e,t)||{};if(l==null)return{};let d=Nl(u),f={x:n,y:r},p=xl(i),m=yl(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=cl(d[_],T),D=cl(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=ml(E,k,O),j=!c.arrow&&_l(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Bl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=hl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gl(r),_=bl(o),v=gl(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jl(o)]:Cl(o)),x=p!==`none`;!d&&x&&b.push(...Al(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Sl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===bl(t)||T.every(e=>bl(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=bl(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Vl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hl(e){return sl.some(t=>e[t]>=0)}var Ul=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hl(e,t);switch(i){case`referenceHidden`:{let e=Vl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Hl(e)}}}case`escaped`:{let e=Vl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Hl(e)}}}default:return{}}}}},Wl=new Set([`left`,`top`]);async function Gl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gl(n),s=_l(n),c=bl(n)===`y`,l=Wl.has(o)?-1:1,u=a&&c?-1:1,d=hl(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Kl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Gl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ql=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=hl(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bl(i),p=vl(f),m=u[p],h=u[f],g=(e,t)=>ml(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Jl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=hl(e,t),u={x:n,y:r},d=bl(i),f=vl(d),p=u[f],m=u[d],h=hl(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Wl.has(gl(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Yl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=hl(e,t),c=await i.detectOverflow(t,s),l=gl(n),u=_l(n),d=bl(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=cl(p-c[m],g),y=cl(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ll(c.left,c.right):S=p-2*ll(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Xl(){return typeof window<`u`}function Zl(e){return eu(e)?(e.nodeName||``).toLowerCase():`#document`}function Ql(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $l(e){return((eu(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function eu(e){return Xl()?e instanceof Node||e instanceof Ql(e).Node:!1}function tu(e){return Xl()?e instanceof Element||e instanceof Ql(e).Element:!1}function nu(e){return Xl()?e instanceof HTMLElement||e instanceof Ql(e).HTMLElement:!1}function ru(e){return!Xl()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ql(e).ShadowRoot}function iu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=hu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function au(e){return/^(table|td|th)$/.test(Zl(e))}function ou(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var su=/transform|translate|scale|rotate|perspective|filter/,cu=/paint|layout|strict|content/,lu=e=>!!e&&e!==`none`,uu;function du(e){let t=tu(e)?hu(e):e;return lu(t.transform)||lu(t.translate)||lu(t.scale)||lu(t.rotate)||lu(t.perspective)||!pu()&&(lu(t.backdropFilter)||lu(t.filter))||su.test(t.willChange||``)||cu.test(t.contain||``)}function fu(e){let t=_u(e);for(;nu(t)&&!mu(t);){if(du(t))return t;if(ou(t))return null;t=_u(t)}return null}function pu(){return uu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),uu}function mu(e){return/^(html|body|#document)$/.test(Zl(e))}function hu(e){return Ql(e).getComputedStyle(e)}function gu(e){return tu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _u(e){if(Zl(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ru(e)&&e.host||$l(e);return ru(t)?t.host:t}function vu(e){let t=_u(e);return mu(t)?(e.ownerDocument||e).body:nu(t)&&iu(t)?t:vu(t)}function yu(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=vu(e),i=r===e.ownerDocument?.body,a=Ql(r);if(i){let e=bu(a);return t.concat(a,a.visualViewport||[],iu(r)?r:[],e&&n?yu(e):[])}return t.concat(r,yu(r,[],n))}function bu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xu(e){let t=hu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=nu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ul(n)!==a||ul(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Su(e){return tu(e)?e:e.contextElement}function Cu(e){let t=Su(e);if(!nu(t))return fl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=xu(t),o=(a?ul(n.width):n.width)/r,s=(a?ul(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var wu=fl(0);function Tu(e){let t=Ql(e);return!pu()||!t.visualViewport?wu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Eu(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ql(e)}function Du(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Su(e),o=fl(1);t&&(r?tu(r)&&(o=Cu(r)):o=Cu(e));let s=Eu(a,n,r)?Tu(a):fl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ql(a),t=tu(r)?Ql(r):r,n=e,i=bu(n);for(;i&&t!==n;){let e=Cu(i),t=i.getBoundingClientRect(),r=hu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ql(i),i=bu(n)}}return Pl({width:u,height:d,x:c,y:l})}function Ou(e,t){let n=gu(e).scrollLeft;return t?t.left+n:Du($l(e)).left+n}function ku(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ou(e,n),y:n.top+t.scrollTop}}function Au(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=$l(r),s=t?ou(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fl(1),u=fl(0),d=nu(r);if((d||!a)&&((Zl(r)!==`body`||iu(o))&&(c=gu(r)),d)){let e=Du(r);l=Cu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ku(o,c):fl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ju(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Mu(e){let t=gu(e),n=e.ownerDocument.body,r=ll(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ll(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ou(e),o=-t.scrollTop;return hu(n).direction===`rtl`&&(a+=ll(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Nu=25;function Pu(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ql(e),a=$l(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!pu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ou(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Nu&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Fu(e,t){let n=Du(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Cu(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Iu(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Pu(e,n,t);else if(t===`document`)r=Mu($l(e));else if(tu(t))r=Fu(t,n);else{let n=Tu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Pl(r)}function Lu(e,t){let n=t.get(e);if(n)return n;let r=yu(e,[],!1).filter(e=>tu(e)&&Zl(e)!==`body`),i=null,a=hu(e).position===`fixed`,o=a?_u(e):e;for(;tu(o)&&!mu(o);){let e=hu(o),t=du(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=_u(o)}return t.set(e,r),r}function Ru(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ou(t)?[]:Lu(t,this._c):[].concat(n),r],o=Iu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Iu(t,a[e],i);s=ll(n.top,s),c=cl(n.right,c),l=cl(n.bottom,l),u=ll(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function zu(e){let{width:t,height:n}=xu(e);return{width:t,height:n}}function Bu(e,t,n){let r=nu(t),i=$l(t),a=n===`fixed`,o=Du(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fl(0);if((r||!a)&&((Zl(t)!==`body`||iu(i))&&(s=gu(t)),r)){let e=Du(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ou(i));let l=i&&!r&&!a?ku(i,s):fl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Vu(e){return hu(e).position===`static`}function Hu(e,t){if(!nu(e)||hu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return $l(e)===n&&(n=n.ownerDocument.body),n}function Uu(e,t){let n=Ql(e);if(ou(e))return n;if(!nu(e)){let t=_u(e);for(;t&&!mu(t);){if(tu(t)&&!Vu(t))return t;t=_u(t)}return n}let r=Hu(e,t);for(;r&&au(r)&&Vu(r);)r=Hu(r,t);return r&&mu(r)&&Vu(r)&&!du(r)?n:r||fu(e)||n}var Wu=async function(e){let t=this.getOffsetParent||Uu,n=this.getDimensions,r=await n(e.floating);return{reference:Bu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Gu(e){return hu(e).direction===`rtl`}var Ku={convertOffsetParentRelativeRectToViewportRelativeRect:Au,getDocumentElement:$l,getClippingRect:Ru,getOffsetParent:Uu,getElementRects:Wu,getClientRects:ju,getDimensions:zu,getScale:Cu,isElement:tu,isRTL:Gu};function qu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ju(e,t,n){let r=null,i,a=$l(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=dl(d),h=dl(a.clientWidth-(u+f)),g=dl(a.clientHeight-(d+p)),_=dl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ll(0,cl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!qu(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ql(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Yu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Su(e),u=i||a?[...l?yu(l):[],...t?yu(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ju(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Du(e):null;c&&g();function g(){let t=Du(e);h&&!qu(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Xu=Kl,Zu=ql,Qu=Bl,$u=Yl,ed=Ul,td=zl,nd=Jl,rd=(e,t,n)=>{let r=new Map,i=n??{},a={...Ku,...i.platform,_c:r};return Rl(e,t,{...i,platform:a})},id=typeof document<`u`?c.useLayoutEffect:function(){};function ad(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ad(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ad(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function od(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sd(e,t){let n=od(e);return Math.round(t*n)/n}function cd(e){let t=c.useRef(e);return id(()=>{t.current=e}),t}function ld(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,f]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=c.useState(r);ad(p,r)||m(r);let[h,g]=c.useState(null),[_,v]=c.useState(null),y=c.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=c.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=c.useRef(null),w=c.useRef(null),T=c.useRef(d),E=l!=null,D=cd(l),O=cd(i),k=cd(u),A=c.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),rd(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ad(T.current,t)&&(T.current=t,N.flushSync(()=>{f(t)}))})},[p,t,n,O,k]);id(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let j=c.useRef(!1);id(()=>(j.current=!0,()=>{j.current=!1}),[]),id(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=c.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),P=c.useMemo(()=>({reference:x,floating:S}),[x,S]),F=c.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=sd(P.floating,d.x),r=sd(P.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...od(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:A,refs:M,elements:P,floatingStyles:F}),[d,A,M,P,F])}var ud=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:td({element:r.current,padding:i}).fn(n):r?td({element:r,padding:i}).fn(n):{}}}},dd=(e,t)=>{let n=Xu(e);return{name:n.name,fn:n.fn,options:[e,t]}},fd=(e,t)=>{let n=Zu(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>({fn:nd(e).fn,options:[e,t]}),md=(e,t)=>{let n=Qu(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd=(e,t)=>{let n=$u(e);return{name:n.name,fn:n.fn,options:[e,t]}},gd=(e,t)=>{let n=ed(e);return{name:n.name,fn:n.fn,options:[e,t]}},_d=(e,t)=>{let n=ud(e);return{name:n.name,fn:n.fn,options:[e,t]}},vd=Object.defineProperty,yd=(e,t)=>vd(e,`name`,{value:t,configurable:!0}),bd={Partial:`partial`,Always:`always`},xd={Optimized:`optimized`,Always:`always`},Sd=`Popper`,[Cd,wd]=oa(Sd),[Td,Ed]=Cd(Sd),Dd=yd(e=>{let{__scopePopper:t,children:n}=e,[r,i]=c.useState(null),[a,o]=c.useState(void 0);return(0,P.jsx)(Td,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Od=`PopperAnchor`,kd=c.forwardRef(yd(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Ed(Od,n),o=c.useRef(null),s=a.onAnchorChange,l=K(t,c.useCallback(e=>{o.current=e,e&&s(e)},[s])),u=c.useRef(null);c.useEffect(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&s(u.current)});let d=a.placementState&&Id(a.placementState),f=d?.[0],p=d?.[1];return r?null:(0,P.jsx)(q.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...i,ref:l})},`PopperAnchor`)),Ad=`PopperContent`,[jd,Md]=Cd(Ad),Nd=c.forwardRef(yd(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f=bd.Partial,hideWhenDetached:p=!1,updatePositionStrategy:m=xd.Optimized,onPlaced:h,...g}=e,_=Ed(Ad,n),[v,y]=c.useState(null),b=K(t,y),[x,S]=c.useState(null),C=ol(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof d==`number`?d:{top:0,right:0,bottom:0,left:0,...d},O=Array.isArray(u)?u:[u],k=O.length>0,A={padding:D,boundary:O.filter(Pd),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:F,middlewareData:I}=ld({strategy:`fixed`,placement:E,whileElementsMounted:yd((...e)=>Yu(...e,{animationFrame:m===xd.Always}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[dd({mainAxis:i+T,alignmentAxis:o}),l&&fd({mainAxis:!0,crossAxis:!1,...f===bd.Partial?{limiter:pd()}:{},...A}),l&&md({...A}),hd({...A,apply:yd(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&_d({element:x,padding:s}),Fd({arrowWidth:w,arrowHeight:T}),p&&gd(k?{strategy:`referenceHidden`,...A}:{strategy:`referenceHidden`,padding:A.padding,altBoundary:A.altBoundary})]}),ee=_.setPlacementState;J(()=>(ee(N),()=>{ee(void 0)}),[N,ee]);let[te,ne]=Id(N),re=wo(h);J(()=>{F&&re?.()},[F,re]);let L=I.arrow?.x,R=I.arrow?.y,ie=I.arrow?.centerOffset!==0,[ae,z]=c.useState();return J(()=>{v&&z(window.getComputedStyle(v).zIndex)},[v]),(0,P.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:F?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,P.jsx)(jd,{scope:n,placedSide:te,placedAlign:ne,onArrowChange:S,arrowX:L,arrowY:R,shouldHideArrow:ie,children:(0,P.jsx)(q.div,{"data-side":te,"data-align":ne,...g,ref:b,style:{...g.style,animation:F?g.style?.animation:`none`}})})})},`PopperContent`));function Pd(e){return e!==null}yd(Pd,`isNotNull`);var Fd=yd(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Id(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Id(e){let[t,n=`center`]=e.split(`-`);return[t,n]}yd(Id,`getSideAndAlignFromPlacement`);var Ld=Object.defineProperty,Rd=(e,t)=>Ld(e,`name`,{value:t,configurable:!0}),zd=!1;function Bd(){let[e,t]=c.useState(zd);return c.useEffect(()=>{zd||(zd=!0,t(!0))},[]),e}Rd(Bd,`useIsHydrated`);var Vd=c.useSyncExternalStore;function Hd(){return()=>{}}Rd(Hd,`subscribe`);function Ud(){return Vd(Hd,()=>!0,()=>!1)}Rd(Ud,`useIsHydratedModern`);var Wd=typeof Vd==`function`?Ud:Bd,Gd=Object.defineProperty,Kd=(e,t)=>Gd(e,`name`,{value:t,configurable:!0}),qd=`rovingFocusGroup.onEntryFocus`,Jd={bubbles:!1,cancelable:!0},Yd=`RovingFocusGroup`,[Xd,Zd,Qd]=la(Yd),[$d,ef]=oa(Yd,[Qd]),tf={Vertical:`vertical`,Horizontal:`horizontal`},nf={LTR:`ltr`,RTL:`rtl`},[rf,af]=$d(Yd),of=c.forwardRef(Kd(function(e,t){return(0,P.jsx)(Xd.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,P.jsx)(Xd.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,P.jsx)(sf,{...e,ref:t})})})},`RovingFocusGroup`)),sf=c.forwardRef(Kd(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=c.useRef(null),m=K(t,p),h=bo(a),[g,_]=Ia({prop:o,defaultProp:s??null,onChange:l,caller:Yd}),[v,y]=c.useState(!1),b=wo(u),x=Zd(n),S=c.useRef(!1),[C,w]=c.useState(0);return c.useEffect(()=>{let e=p.current;if(e)return e.addEventListener(qd,b),()=>e.removeEventListener(qd,b)},[b]),(0,P.jsx)(rf,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:g,onItemFocus:c.useCallback(e=>_(e),[_]),onItemShiftTab:c.useCallback(()=>y(!0),[]),onFocusableItemAdd:c.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:c.useCallback(()=>w(e=>e-1),[]),children:(0,P.jsx)(q.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:`none`,...e.style},onMouseDown:X(e.onMouseDown,()=>{S.current=!0}),onFocus:X(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(qd,Jd);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);pf([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),d)}}S.current=!1}),onBlur:X(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),cf=`RovingFocusGroupItem`,lf=c.forwardRef(Kd(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,l=eo(),u=a||l,d=af(cf,n),f=d.currentTabStopId===u,p=Zd(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=d,_=Wd();return J(()=>{if(_&&r)return m(),()=>h()},[_,r,m,h]),c.useEffect(()=>{if(!_&&r)return m(),()=>h()},[_,r,m,h]),(0,P.jsx)(Xd.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:(0,P.jsx)(q.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:X(e.onMouseDown,e=>{r?d.onItemFocus(u):e.preventDefault()}),onFocus:X(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:X(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=ff(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=p().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?mf(n,r+1):n.slice(r+1)}setTimeout(()=>pf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:f,hasTabStop:g!=null}):o})})},`RovingFocusGroupItem`)),uf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function df(e,t){return t===nf.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}Kd(df,`getDirectionAwareKey`);function ff(e,t,n){let r=df(e.key,n);if(!(t===tf.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===tf.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return uf[r]}Kd(ff,`getFocusIntent`);function pf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}Kd(pf,`focusFirst`);function mf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Kd(mf,`wrapArray`);var hf=Object.defineProperty,Q=(e,t)=>hf(e,`name`,{value:t,configurable:!0}),gf=[`Enter`,` `],_f=[`ArrowDown`,`PageUp`,`Home`],vf=[`ArrowUp`,`PageDown`,`End`],yf=[..._f,...vf];[...gf],[...gf];var bf=`Menu`,[xf,Sf,Cf]=la(bf),[wf,Tf]=oa(bf,[Cf,wd,ef]),Ef=wd(),Df=ef(),[Of,kf]=wf(bf),[Af,jf]=wf(bf),Mf=Q(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ef(t),[l,u]=c.useState(null),d=c.useRef(!1),f=wo(a),p=bo(i);return c.useEffect(()=>{let e=Q(()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Q(()=>d.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),c.useEffect(()=>{if(!n)return;let e=Q(()=>f(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,P.jsx)(Dd,{...s,children:(0,P.jsx)(Of,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,P.jsx)(Af,{scope:t,onClose:c.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})},`Menu`),Nf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e,i=Ef(n);return(0,P.jsx)(kd,{...i,...r,ref:t})},`MenuAnchor`)),Pf=`MenuPortal`,[Ff,If]=wf(Pf,{forceMount:void 0}),Lf=Q(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=kf(Pf,t);return(0,P.jsx)(Ff,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Rf=`MenuContent`,[zf,Bf]=wf(Rf),Vf=c.forwardRef(Q(function(e,t){let n=If(Rf,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=kf(Rf,e.__scopeMenu),o=jf(Rf,e.__scopeMenu);return(0,P.jsx)(xf.Provider,{scope:e.__scopeMenu,children:(0,P.jsx)(Wa,{present:r||a.open,children:(0,P.jsx)(xf.Slot,{scope:e.__scopeMenu,children:o.modal?(0,P.jsx)(Hf,{...i,ref:t}):(0,P.jsx)(Uf,{...i,ref:t})})})})},`MenuContent`)),Hf=c.forwardRef(Q(function(e,t){let n=kf(Rf,e.__scopeMenu),r=c.useRef(null),i=K(t,r);return c.useEffect(()=>{let e=r.current;if(e)return Ac(e)},[]),(0,P.jsx)(Gf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Uf=c.forwardRef(Q(function(e,t){let n=kf(Rf,e.__scopeMenu);return(0,P.jsx)(Gf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Wf=Pi(`MenuContent.ScrollLock`),Gf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:h,...g}=e,_=kf(Rf,n),v=jf(Rf,n),y=Ef(n),b=Df(n),x=Sf(n),[S,C]=c.useState(null),w=c.useRef(null),[T,E]=c.useState(null);qo(T);let{nodes:D,registry:O}=Ko(),k=!!(i||h),A=K(t,w,_.onContentChange,E),j=c.useRef(0),M=c.useRef(``),N=c.useRef(0),F=c.useRef(null),I=c.useRef(`right`),ee=c.useRef(0),te=c.useMemo(()=>h?[w,...D.map(e=>({current:e}))]:[],[w,D,h]),ne=h?xc:c.Fragment,re=h?{as:Wf,allowPinchZoom:!0,shards:te}:void 0,L=Q(e=>{let t=M.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=hp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){M.current=e,window.clearTimeout(j.current),e!==``&&(j.current=window.setTimeout(()=>s(``),1e3))}Q(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);c.useEffect(()=>()=>window.clearTimeout(j.current),[]),fs();let R=c.useCallback(e=>I.current===F.current?.side&&_p(e,F.current?.area),[]);return(0,P.jsx)(zf,{scope:n,searchRef:M,onItemEnter:c.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:c.useCallback(e=>{R(e)||(w.current?.focus(),C(null))},[R]),onTriggerLeave:c.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:N,onPointerGraceIntentChange:c.useCallback(e=>{F.current=e},[]),children:(0,P.jsx)(Go,{registry:k?O:null,children:(0,P.jsx)(ne,{...re,children:(0,P.jsx)(Uo,{asChild:!0,trapped:i,branches:D,onMountAutoFocus:X(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:(0,P.jsx)(of,{asChild:!0,...b,dir:v.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:X(l,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,P.jsx)(Nd,{role:`menu`,"aria-orientation":`vertical`,"data-state":up(_.open),"data-radix-menu-content":``,dir:v.dir,...y,...g,ref:A,style:{outline:`none`,...g.style},onKeyDown:X(g.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&L(e.key));let i=w.current;if(e.target!==i||!yf.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);vf.includes(e.key)&&a.reverse(),pp(a)}),onBlur:X(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),M.current=``)}),onPointerMove:X(e.onPointerMove,vp(e=>{let t=e.target,n=ee.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>ee.current?`right`:`left`;I.current=t,ee.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),Kf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,P.jsx)(q.div,{role:`group`,...r,ref:t})},`MenuGroup`)),qf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,P.jsx)(q.div,{...r,ref:t})},`MenuLabel`)),Jf=`MenuItem`,Yf=`menu.itemSelect`,Xf=c.forwardRef(Q(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=c.useRef(null),o=jf(Jf,e.__scopeMenu),s=Bf(Jf,e.__scopeMenu),l=K(t,a),u=c.useRef(!1),d=Q(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Yf,{bubbles:!0,cancelable:!0});e.addEventListener(Yf,e=>r?.(e),{once:!0}),Qi(e,t),t.defaultPrevented?u.current=!1:o.onClose()}},`handleSelect`);return(0,P.jsx)(Zf,{...i,ref:l,disabled:n,onClick:X(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:X(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:X(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&gf.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Zf=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Bf(Jf,n),s=Df(n),l=c.useRef(null),u=K(t,l),[d,f]=c.useState(!1),[p,m]=c.useState(``);return c.useEffect(()=>{let e=l.current;e&&m((e.textContent??``).trim())},[a.children]),(0,P.jsx)(xf.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:(0,P.jsx)(lf,{asChild:!0,...s,focusable:!r,children:(0,P.jsx)(q.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:X(e.onPointerMove,vp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,vp(e=>o.onItemLeave(e))),onFocus:X(e.onFocus,()=>f(!0)),onBlur:X(e.onBlur,()=>f(!1))})})})},`MenuItemImpl`)),[Qf,$f]=wf(`MenuRadioGroup`,{value:void 0,onValueChange:Q(()=>{},`onValueChange`)}),ep=c.forwardRef(Q(function(e,t){let{value:n,onValueChange:r,...i}=e,a=wo(r);return(0,P.jsx)(Qf,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,P.jsx)(Kf,{...i,ref:t})})},`MenuRadioGroup`)),tp=`MenuRadioItem`,np=c.forwardRef(Q(function(e,t){let{value:n,...r}=e,i=$f(tp,e.__scopeMenu),a=n===i.value;return(0,P.jsx)(ip,{scope:e.__scopeMenu,checked:a,children:(0,P.jsx)(Xf,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":fp(a),onSelect:X(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),rp=`MenuItemIndicator`,[ip,ap]=wf(rp,{checked:!1}),op=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,forceMount:r,...i}=e,a=ap(rp,n);return(0,P.jsx)(Wa,{present:r||dp(a.checked)||a.checked===!0,children:(0,P.jsx)(q.span,{...i,ref:t,"data-state":fp(a.checked)})})},`MenuItemIndicator`)),sp=c.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,P.jsx)(q.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[cp,lp]=wf(`MenuSub`);function up(e){return e?`open`:`closed`}Q(up,`getOpenState`);function dp(e){return e===`indeterminate`}Q(dp,`isIndeterminate`);function fp(e){return dp(e)?`indeterminate`:e?`checked`:`unchecked`}Q(fp,`getCheckedState`);function pp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Q(pp,`focusFirst`);function mp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Q(mp,`wrapArray`);function hp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=mp(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Q(hp,`getNextMatch`);function gp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Q(gp,`isPointInPolygon`);function _p(e,t){return t?gp({x:e.clientX,y:e.clientY},t):!1}Q(_p,`isPointerInGraceArea`);function vp(e){return t=>t.pointerType===`mouse`?e(t):void 0}Q(vp,`whenMouse`);var yp=Object.defineProperty,bp=(e,t)=>yp(e,`name`,{value:t,configurable:!0}),xp=`DropdownMenu`,[Sp,Cp]=oa(xp,[Tf]),wp=Tf(),[Tp,Ep]=Sp(xp),Dp=bp(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=wp(t),u=c.useRef(null),[d,f]=Ia({prop:i,defaultProp:a??!1,onChange:o,caller:xp});return(0,P.jsx)(Tp,{scope:t,triggerId:eo(),triggerRef:u,contentId:eo(),open:d,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(e=>!e),[f]),modal:s,children:(0,P.jsx)(Mf,{...l,open:d,onOpenChange:f,dir:r,modal:s,children:n})})},`DropdownMenu`),Op=`DropdownMenuTrigger`,kp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Ep(Op,n),o=wp(n),s=K(t,a.triggerRef);return(0,P.jsx)(Nf,{asChild:!0,...o,children:(0,P.jsx)(q.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:X(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:X(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Ap=bp(e=>{let{__scopeDropdownMenu:t,...n}=e,r=wp(t);return(0,P.jsx)(Lf,{...r,...n})},`DropdownMenuPortal`),jp=`DropdownMenuContent`,Mp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ep(jp,n),a=wp(n),o=c.useRef(!1);return(0,P.jsx)(Vf,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:X(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Np=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(Kf,{...i,...r,ref:t})},`DropdownMenuGroup`)),Pp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(qf,{...i,...r,ref:t})},`DropdownMenuLabel`)),Fp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(Xf,{...i,...r,ref:t})},`DropdownMenuItem`)),Ip=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(ep,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Lp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(np,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Rp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(op,{...i,...r,ref:t})},`DropdownMenuItemIndicator`)),zp=c.forwardRef(bp(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=wp(n);return(0,P.jsx)(sp,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Bp=Object.defineProperty,Vp=(e,t)=>Bp(e,`name`,{value:t,configurable:!0}),Hp,Up=`HoverCard`,[Wp,Gp]=oa(Up,[wd]),Kp=wd(),[qp,Jp]=Wp(Up),Yp=Vp(e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:s=300}=e,l=Kp(t),u=c.useRef(0),d=c.useRef(0),f=c.useRef(!1),p=c.useRef(!1),[m,h]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:Up}),g=c.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>h(!0),o)},[o,h]),_=c.useCallback(()=>{clearTimeout(u.current),!f.current&&!p.current&&(d.current=window.setTimeout(()=>h(!1),s))},[s,h]),v=c.useCallback(()=>h(!1),[h]);return c.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),(0,P.jsx)(qp,{scope:t,open:m,onOpenChange:h,onOpen:g,onClose:_,onDismiss:v,hasSelectionRef:f,isPointerDownOnContentRef:p,children:(0,P.jsx)(Dd,{...l,children:n})})},`HoverCard`),Xp=`HoverCardTrigger`,Zp=c.forwardRef(Vp(function(e,t){let{__scopeHoverCard:n,...r}=e,i=Jp(Xp,n),a=Kp(n);return(0,P.jsx)(kd,{asChild:!0,...a,children:(0,P.jsx)(q.a,{"data-state":i.open?`open`:`closed`,...r,ref:t,onPointerEnter:X(e.onPointerEnter,am(i.onOpen)),onPointerLeave:X(e.onPointerLeave,am(i.onClose)),onFocus:X(e.onFocus,i.onOpen),onBlur:X(e.onBlur,i.onClose),onTouchStart:X(e.onTouchStart,e=>e.preventDefault())})})},`HoverCardTrigger`)),Qp=`HoverCardPortal`,[$p,em]=Wp(Qp,{forceMount:void 0}),tm=Vp(e=>{let{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=Jp(Qp,t);return(0,P.jsx)($p,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`HoverCardPortal`),nm=`HoverCardContent`,rm=c.forwardRef(Vp(function(e,t){let n=em(nm,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=Jp(nm,e.__scopeHoverCard);return(0,P.jsx)(Wa,{present:r||a.open,children:(0,P.jsx)(im,{"data-state":a.open?`open`:`closed`,...i,onPointerEnter:X(e.onPointerEnter,am(a.onOpen)),onPointerLeave:X(e.onPointerLeave,am(a.onClose)),ref:t})})},`HoverCardContent`)),im=c.forwardRef(Vp(function(e,t){let{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...s}=e,l=Jp(nm,n),u=Kp(n),d=c.useRef(null),[f,p]=c.useState(null),m=K(t,d,p);qo(f);let[h,g]=c.useState(!1);return c.useEffect(()=>{if(h){let e=document.body;return Hp=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Hp,e.style.webkitUserSelect=Hp}}},[h]),c.useEffect(()=>{if(d.current){let e=Vp(()=>{g(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==``&&(l.hasSelectionRef.current=!0)})},`handlePointerUp`);return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),c.useEffect(()=>{d.current&&om(d.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:X(a,e=>{e.preventDefault()}),onDismiss:l.onDismiss,children:(0,P.jsx)(Nd,{...u,...s,onPointerDown:X(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&g(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:m,style:{...s.style,userSelect:h?`text`:void 0,WebkitUserSelect:h?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})},`HoverCardContentImpl`));function am(e){return t=>t.pointerType===`touch`?void 0:e()}Vp(am,`excludeTouch`);function om(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Vp(e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Vp(om,`getTabbableNodes`);var sm=Object.defineProperty,cm=(e,t)=>sm(e,`name`,{value:t,configurable:!0});function lm(e,[t,n]){return Math.min(n,Math.max(t,e))}cm(lm,`clamp`);var um=Object.defineProperty,dm=(e,t)=>um(e,`name`,{value:t,configurable:!0}),fm=`Popover`,[pm,mm]=oa(fm,[wd]),hm=wd(),[gm,_m]=pm(fm),vm=dm(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=hm(t),l=c.useRef(null),[u,d]=c.useState(!1),[f,p]=c.useState(0),[m,h]=c.useState(0),[g,_]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:fm});return(0,P.jsx)(Dd,{...s,children:(0,P.jsx)(gm,{scope:t,contentId:eo(),titleId:eo(),descriptionId:eo(),titlePresent:f>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:h,triggerRef:l,open:g,onOpenChange:_,onOpenToggle:c.useCallback(()=>_(e=>!e),[_]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>d(!0),[]),onCustomAnchorRemove:c.useCallback(()=>d(!1),[]),modal:o,children:n})})},`Popover`),ym=`PopoverAnchor`,bm=c.forwardRef(dm(function(e,t){let{__scopePopover:n,...r}=e,i=_m(ym,n),a=hm(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return c.useEffect(()=>(o(),()=>s()),[o,s]),(0,P.jsx)(kd,{...a,...r,ref:t})},`PopoverAnchor`)),xm=`PopoverTrigger`,Sm=c.forwardRef(dm(function(e,t){let{__scopePopover:n,...r}=e,i=_m(xm,n),a=hm(n),o=K(t,i.triggerRef),s=(0,P.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Nm(i.open),...r,ref:o,onClick:X(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,P.jsx)(kd,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Cm=`PopoverPortal`,[wm,Tm]=pm(Cm,{forceMount:void 0}),Em=dm(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=_m(Cm,t);return(0,P.jsx)(wm,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Dm=`PopoverContent`,Om=c.forwardRef(dm(function(e,t){let n=Tm(Dm,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=_m(Dm,e.__scopePopover);return(0,P.jsx)(Wa,{present:r||a.open,children:a.modal?(0,P.jsx)(Am,{...i,ref:t}):(0,P.jsx)(jm,{...i,ref:t})})},`PopoverContent`)),km=Pi(`PopoverContent.RemoveScroll`),Am=c.forwardRef(dm(function(e,t){let n=_m(Dm,e.__scopePopover),r=c.useRef(null),i=K(t,r),a=c.useRef(!1),{nodes:o,registry:s}=Ko();return c.useEffect(()=>{let e=r.current;if(e)return Ac(e)},[]),(0,P.jsx)(xc,{as:km,allowPinchZoom:!0,shards:c.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,P.jsx)(Mm,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),jm=c.forwardRef(dm(function(e,t){let n=_m(Dm,e.__scopePopover),r=c.useRef(!1),i=c.useRef(!1);return(0,P.jsx)(Mm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Mm=c.forwardRef(dm(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,"aria-describedby":f,branchNodes:p,branchRegistry:m,...h}=e,g=_m(Dm,n),_=hm(n),[v,y]=c.useState(null),b=K(t,y);return qo(v),fs(),(0,P.jsx)(Go,{registry:m,children:(0,P.jsx)(Uo,{asChild:!0,loop:!0,trapped:r,branches:p,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,P.jsx)(Nd,{"data-state":Nm(g.open),role:`dialog`,id:g.contentId,"aria-labelledby":g.titlePresent?g.titleId:void 0,"aria-describedby":g.descriptionPresent?Pm(f,g.descriptionId):f,..._,...h,ref:b,style:{...h.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`));function Nm(e){return e?`open`:`closed`}dm(Nm,`getState`);function Pm(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}dm(Pm,`concatAriaDescribedby`);var Fm=Object.defineProperty,$=(e,t)=>Fm(e,`name`,{value:t,configurable:!0}),Im={ItemAligned:`item-aligned`,Popper:`popper`},Lm={LTR:`ltr`,RTL:`rtl`},Rm=[` `,`Enter`,`ArrowUp`,`ArrowDown`],zm=[` `,`Enter`],Bm=`Select`,[Vm,Hm,Um]=la(Bm),[Wm,Gm]=oa(Bm,[Um,wd]),Km=wd(),[qm,Jm]=Wm(Bm),[Ym,Xm]=Wm(Bm);function Zm(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=Km(t),[v,y]=c.useState(null),[b,x]=c.useState(null),[S,C]=c.useState(!1),w=bo(u),[T,E]=Ia({prop:r,defaultProp:i??!1,onChange:a,caller:Bm}),[D,O]=Ia({prop:o,defaultProp:s,onChange:l,caller:Bm}),k=c.useRef(null),A=c.useRef(!1),[j,M]=c.useState(null),N=$(e=>{M({value:e,hasConsumerStoppedPropagation:A.current}),O(e)},`handleUserSelect`),F=c.useRef(D);c.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=$(()=>O(F.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let I=!v||!!h||!!v.closest(`form`),[ee,te]=c.useState(new Set),ne=eo(),re=Array.from(ee).map(e=>e.props.value).join(`;`),L=c.useCallback(e=>{te(t=>new Set(t).add(e))},[]),R=c.useCallback(e=>{te(t=>{let n=new Set(t);return n.delete(e),n})},[]),ie={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ne,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:A,userSelection:j,onUserSelect:N,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:ee,nativeSelectKey:re,isFormControl:I};return(0,P.jsx)(Dd,{..._,children:(0,P.jsx)(qm,{scope:t,...ie,children:(0,P.jsx)(Vm.Provider,{scope:t,children:(0,P.jsx)(Ym,{scope:t,onNativeOptionAdd:L,onNativeOptionRemove:R,children:Lh(g)?g(ie):n})})})})}$(Zm,`SelectProvider`);var Qm=$(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(Zm,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(Ih,{__scopeSelect:t}):null]})})},`Select`),$m=`SelectTrigger`,eh=c.forwardRef($(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Km(n),o=Jm($m,n),s=o.disabled||r,l=K(t,o.onTriggerChange),u=Hm(n),d=c.useRef(`touch`),[f,p,m]=zh(e=>{let t=u().filter(e=>!e.disabled),n=Bh(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),h=$(e=>{s||(o.onOpenChange(!0),m()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,P.jsx)(kd,{asChild:!0,...a,children:(0,P.jsx)(q.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Rh(o.value)?``:void 0,...i,ref:l,onClick:X(i.onClick,e=>{e.currentTarget.focus(),d.current!==`mouse`&&h(e)}),onPointerDown:X(i.onPointerDown,e=>{d.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:X(i.onKeyDown,e=>{let t=f.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),p(e.key)),t&&e.key===` `||Rm.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),th=`SelectValue`,nh=c.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,l=Jm(th,n),{onValueNodeHasChildrenChange:u}=l,d=a!==void 0,f=K(t,l.onValueNodeChange);J(()=>{u(d)},[u,d]);let p=Rh(l.value);return(0,P.jsx)(q.span,{...s,asChild:!p&&s.asChild,ref:f,style:{pointerEvents:`none`},children:(0,P.jsx)(c.Fragment,{children:p?o:a},p?`placeholder`:`value`)})},`SelectValue`)),rh=c.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(q.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[ih,ah]=Wm(`SelectPortal`,{forceMount:void 0}),oh=$(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(ih,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(os,{asChild:!0,...r})})},`SelectPortal`),sh=`SelectContent`,ch=c.forwardRef($(function(e,t){let n=ah(sh,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Jm(sh,e.__scopeSelect),[o,s]=c.useState();return J(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(Wa,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(mh,{...i,ref:t}):(0,P.jsx)(lh,{...i,fragment:o})})},`SelectContent`)),lh=c.forwardRef($(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?N.createPortal((0,P.jsx)(dh,{scope:n,children:(0,P.jsx)(Vm.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),uh=10,[dh,fh]=Wm(sh),ph=Pi(`SelectContent.RemoveScroll`),mh=c.forwardRef($(function(e,t){let{__scopeSelect:n}=e,{position:r=Im.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=Jm(sh,n),[b,x]=c.useState(null),[S,C]=c.useState(null),w=K(t,x),[T,E]=c.useState(null),[D,O]=c.useState(null),k=Hm(n),[A,j]=c.useState(!1),M=c.useRef(!1),N=c.useRef(!1),F=c.useRef(!1);c.useEffect(()=>{if(b)return Ac(b)},[b]),fs();let I=c.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),ee=c.useCallback(()=>I([T,b]),[I,T,b]);c.useEffect(()=>{A&&ee()},[A,ee]);let{onOpenChange:te,triggerPointerDownPosRef:ne}=y;c.useEffect(()=>{if(b){let e={x:0,y:0},t=$(t=>{e={x:Math.abs(Math.round(t.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ne.current?.y??0))}},`handlePointerMove`),n=$(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||te(!1),document.removeEventListener(`pointermove`,t),ne.current=null},`handlePointerUp`);return ne.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,te,ne]),c.useEffect(()=>{let e=$(()=>te(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[re,L]=zh(e=>{let t=k().filter(e=>!e.disabled),n=Bh(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),R=c.useCallback((e,t,n)=>{let r=!N.current;r&&(N.current=!0);let i=!M.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(M.current=!0)):r&&E(e)},[y.value]),ie=c.useCallback(()=>b?.focus(),[b]),ae=c.useCallback((e,t,n)=>{if(!e)return;let r=!F.current;r&&(F.current=!0);let i=!M.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),z=r===Im.Popper?gh:hh,oe=z===gh?{side:s,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,P.jsx)(dh,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:R,selectedItem:T,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:ee,selectedItemText:D,position:r,isPositioned:A,searchRef:re,children:(0,P.jsx)(xc,{as:ph,allowPinchZoom:!0,children:(0,P.jsx)(Uo,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:X(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,P.jsx)(z,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...oe,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:X(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&L(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>I(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),hh=c.forwardRef($(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Jm(sh,n),o=fh(sh,n),[s,l]=c.useState(null),[u,d]=c.useState(null),f=K(t,d),p=Hm(n),m=c.useRef(!1),h=c.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=c.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==Lm.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-uh,d=lm(a,[uh,Math.max(uh,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-uh,d=lm(a,[uh,Math.max(uh,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=p(),c=window.innerHeight-uh*2,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+h+l+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-uh,D=c-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=f+h+k,j=x-A;if(A<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=u.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,f+g.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}s.style.margin=`${uh}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,_,v,a.dir,r]);J(()=>b(),[b]);let[x,S]=c.useState();J(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);let C=c.useCallback(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return(0,P.jsx)(_h,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:(0,P.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,P.jsx)(q.div,{...i,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),gh=c.forwardRef($(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=uh,...a}=e,o=Km(n);return(0,P.jsx)(Nd,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[_h,vh]=Wm(sh,{}),yh=`SelectViewport`,bh=c.forwardRef($(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=fh(yh,n),o=vh(yh,n),s=K(t,a.onViewportChange),l=c.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,P.jsx)(Vm.Slot,{scope:n,children:(0,P.jsx)(q.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:X(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(l.current-t.scrollTop);if(e>0){let r=window.innerHeight-uh*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}l.current=t.scrollTop})})})]})},`SelectViewport`)),[xh,Sh]=Wm(`SelectGroup`),Ch=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=eo();return(0,P.jsx)(xh,{scope:n,id:i,children:(0,P.jsx)(q.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),wh=`SelectLabel`,Th=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e,i=Sh(wh,n);return(0,P.jsx)(q.div,{id:i.id,...r,ref:t})},`SelectLabel`)),Eh=`SelectItem`,[Dh,Oh]=Wm(Eh),kh=c.forwardRef($(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Jm(Eh,n),l=fh(Eh,n),u=s.value===r,[d,f]=c.useState(a??``),[p,m]=c.useState(!1),h=K(t,wo(e=>l.itemRefCallback?.(e,r,i))),g=eo(),_=c.useRef(`touch`);function v(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return $(v,`handleSelect`),(0,P.jsx)(Dh,{scope:n,value:r,disabled:i,textId:g,isSelected:u,onItemTextChange:c.useCallback(e=>{f(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(Vm.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:(0,P.jsx)(q.div,{role:`option`,"aria-labelledby":g,"data-highlighted":p?``:void 0,"aria-selected":u&&p,"data-state":u?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:X(o.onFocus,()=>m(!0)),onBlur:X(o.onBlur,()=>m(!1)),onClick:X(o.onClick,e=>{i||_.current!==`mouse`&&v(e)}),onPointerUp:X(o.onPointerUp,e=>{i||_.current===`mouse`&&v(e)}),onPointerDown:X(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:X(o.onPointerMove,e=>{_.current=e.pointerType,i?l.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:X(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(l.searchRef?.current===``||e.key!==` `)&&(zm.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Ah=`SelectItemText`,jh=c.forwardRef($(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Jm(Ah,n),s=fh(Ah,n),l=Oh(Ah,n),u=Xm(Ah,n),[d,f]=c.useState(null),p=wo(e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),m=K(t,f,l.onItemTextChange,p),h=d?.textContent,g=c.useMemo(()=>(0,P.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=u;return J(()=>(_(g),()=>v(g)),[_,v,g]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(q.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Rh(o.value)?N.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Mh=`SelectItemIndicator`,Nh=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return Oh(Mh,n).isSelected?(0,P.jsx)(q.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Ph=c.forwardRef($(function(e,t){let{__scopeSelect:n,...r}=e;return(0,P.jsx)(q.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),Fh=`SelectBubbleInput`,Ih=c.forwardRef($(function({__scopeSelect:e,...t},n){let r=Jm(Fh,e),{value:i,onValueChange:a,required:o,disabled:s,name:l,autoComplete:u,form:d,userSelection:f}=r,{nativeOptions:p,nativeSelectKey:m}=r,h=c.useRef(null),g=K(n,h),_=i??``,v=c.useRef(_),y=c.useRef(f),b=c.useRef(!1),x=Array.from(p).some(e=>(e.props.value??``)===``);return c.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=f!==null&&f!==y.current;y.current=f;let i=v.current!==_;v.current=_;let a=r&&i;if(r&&!i&&f.value!==_&&!f.hasConsumerStoppedPropagation&&n){b.current=!0;try{n.call(e,f.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{b.current=!1,n.call(e,_)}return}let o=a&&!f.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,_),e.dispatchEvent(t)}},[_,f]),(0,P.jsxs)(q.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:l,autoComplete:u,disabled:s,form:d,onChange:e=>{b.current||a(e.target.value)},...t,style:{...ta,...t.style},ref:g,defaultValue:_,children:[Rh(i)&&!x?(0,P.jsx)(`option`,{value:``}):null,Array.from(p)]},m)},`SelectBubbleInput`));function Lh(e){return typeof e==`function`}$(Lh,`isFunction`);function Rh(e){return e===``||e===void 0}$(Rh,`shouldShowPlaceholder`);function zh(e){let t=wo(e),n=c.useRef(``),r=c.useRef(0),i=c.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}$(a,`updateSearch`),a(i)},[t]),a=c.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}$(zh,`useTypeaheadSearch`);function Bh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Vh(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}$(Bh,`findNextItem`);function Vh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$(Vh,`wrapArray`);var Hh=Object.defineProperty,Uh=(e,t)=>Hh(e,`name`,{value:t,configurable:!0}),Wh={Automatic:`automatic`,Manual:`manual`},Gh=`Tabs`,[Kh,qh]=oa(Gh,[ef]),Jh=ef(),[Yh,Xh]=Kh(Gh),Zh=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=Wh.Automatic,...l}=e,u=bo(s),[d,f]=Ia({prop:r,onChange:i,defaultProp:a??``,caller:Gh});return(0,P.jsx)(Yh,{scope:n,baseId:eo(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,P.jsx)(q.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Qh=`TabsList`,$h=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Xh(Qh,n),o=Jh(n);return(0,P.jsx)(of,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,P.jsx)(q.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),eg=`TabsTrigger`,tg=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Xh(eg,n),s=Jh(n),c=ig(o.baseId,r),l=ag(o.baseId,r),u=r===o.value;return(0,P.jsx)(lf,{asChild:!0,...s,focusable:!i,active:u,children:(0,P.jsx)(q.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:X(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:X(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:X(e.onFocus,()=>{let e=o.activationMode!==Wh.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),ng=`TabsContent`,rg=c.forwardRef(Uh(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Xh(ng,n),l=ig(s.baseId,r),u=ag(s.baseId,r),d=r===s.value,f=c.useRef(d);return c.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,P.jsx)(Wa,{present:i||d,children:({present:n})=>(0,P.jsx)(q.div,{"data-state":d?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function ig(e,t){return`${e}-trigger-${t}`}Uh(ig,`makeTriggerId`);function ag(e,t){return`${e}-content-${t}`}Uh(ag,`makeContentId`);var og=Object.defineProperty,sg=(e,t)=>og(e,`name`,{value:t,configurable:!0}),cg=`Toggle`,lg=c.forwardRef(sg(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=Ia({prop:n,onChange:i,defaultProp:r??!1,caller:cg});return(0,P.jsx)(q.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:X(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),ug=Object.defineProperty,dg=(e,t)=>ug(e,`name`,{value:t,configurable:!0}),fg=`ToggleGroup`,pg={Single:`single`,Multiple:`multiple`},[mg,hg]=oa(fg,[ef]),gg=ef(),_g=c.forwardRef(dg(function(e,t){let{type:n,...r}=e;if(n===pg.Single)return(0,P.jsx)(bg,{role:`radiogroup`,...r,ref:t});if(n===pg.Multiple)return(0,P.jsx)(xg,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${fg}\``)},`ToggleGroup`)),[vg,yg]=mg(fg),bg=c.forwardRef(dg(function(e,t){let{value:n,defaultValue:r,onValueChange:i=dg(()=>{},`onValueChange`),...a}=e,[o,s]=Ia({prop:n,defaultProp:r??``,onChange:i,caller:fg});return(0,P.jsx)(vg,{scope:e.__scopeToggleGroup,type:pg.Single,value:c.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:c.useCallback(()=>s(``),[s]),children:(0,P.jsx)(wg,{...a,ref:t})})},`ToggleGroupImplSingle`)),xg=c.forwardRef(dg(function(e,t){let{value:n,defaultValue:r,onValueChange:i=dg(()=>{},`onValueChange`),...a}=e,[o,s]=Ia({prop:n,defaultProp:r??[],onChange:i,caller:fg}),l=c.useCallback(e=>s((t=[])=>[...t,e]),[s]),u=c.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,P.jsx)(vg,{scope:e.__scopeToggleGroup,type:pg.Multiple,value:o,onItemActivate:l,onItemDeactivate:u,children:(0,P.jsx)(wg,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[Sg,Cg]=mg(fg),wg=c.forwardRef(dg(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=gg(n),u=bo(o),d={dir:u,...c};return(0,P.jsx)(Sg,{scope:n,rovingFocus:i,disabled:r,children:i?(0,P.jsx)(of,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,P.jsx)(q.div,{...d,ref:t})}):(0,P.jsx)(q.div,{...d,ref:t})})},`ToggleGroupImpl`)),Tg=`ToggleGroupItem`,Eg=c.forwardRef(dg(function(e,t){let n=yg(Tg,e.__scopeToggleGroup),r=Cg(Tg,e.__scopeToggleGroup),i=gg(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},l=c.useRef(null);return r.rovingFocus?(0,P.jsx)(lf,{asChild:!0,...i,focusable:!o,active:a,ref:l,children:(0,P.jsx)(Dg,{...s,ref:t})}):(0,P.jsx)(Dg,{...s,ref:t})},`ToggleGroupItem`)),Dg=c.forwardRef(dg(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=yg(Tg,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===pg.Single?o:void 0;return(0,P.jsx)(lg,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),Og=Object.defineProperty,kg=(e,t)=>Og(e,`name`,{value:t,configurable:!0}),[Ag,jg]=oa(`Tooltip`,[wd]),Mg=wd(),Ng=`TooltipProvider`,Pg=700,Fg=`tooltip.open`,[Ig,Lg]=Ag(Ng),Rg=kg(e=>{let{__scopeTooltip:t,delayDuration:n=Pg,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=c.useRef(!0),s=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{let e=l.current;return()=>window.clearTimeout(e)},[]),(0,P.jsx)(Ig,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:c.useCallback(()=>{r<=0||(window.clearTimeout(l.current),o.current=!1)},[r]),onClose:c.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:c.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),zg=`Tooltip`,[Bg,Vg]=Ag(zg),Hg=kg(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,l=Lg(zg,e.__scopeTooltip),u=Mg(t),[d,f]=c.useState(null),[p,m]=c.useState(void 0),h=eo(),g=c.useRef(0),_=o??l.disableHoverableContent,v=s??l.delayDuration,y=c.useRef(!1),[b,x]=Ia({prop:r,defaultProp:i??!1,onChange:kg(e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(Fg))):l.onClose(),a?.(e)},`onChange`),caller:zg}),S=c.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=c.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),w=c.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=c.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);c.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let E=p??h;return(0,P.jsx)(Dd,{...u,children:(0,P.jsx)(Bg,{scope:t,contentId:E,setContentId:m,open:b,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?T():C()},[l.isOpenDelayedRef,T,C]),onTriggerLeave:c.useCallback(()=>{_?w():(window.clearTimeout(g.current),g.current=0)},[w,_]),onOpen:C,onClose:w,disableHoverableContent:_,children:n})})},`Tooltip`),Ug=`TooltipTrigger`,Wg=c.forwardRef(kg(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=Vg(Ug,n),o=Lg(Ug,n),s=Mg(n),l=K(t,c.useRef(null),a.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),f=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener(`pointerup`,f),[f]),(0,P.jsx)(kd,{asChild:!0,...s,children:(0,P.jsx)(q.button,{"aria-describedby":a.open?o_(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:l,onPointerMove:X(e.onPointerMove,e=>{e.pointerType!==`touch`&&!d.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:X(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener(`pointerup`,f,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:X(e.onBlur,a.onClose),onClick:X(e.onClick,a.onClose)})})},`TooltipTrigger`)),Gg=`TooltipPortal`,[Kg,qg]=Ag(Gg,{forceMount:void 0}),Jg=kg(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Vg(Gg,t);return(0,P.jsx)(Kg,{scope:t,forceMount:n,children:(0,P.jsx)(Wa,{present:n||a.open,children:(0,P.jsx)(os,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),Yg=`TooltipContent`,Xg=c.forwardRef(kg(function(e,t){let n=qg(Yg,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Vg(Yg,e.__scopeTooltip);return(0,P.jsx)(Wa,{present:r||o.open,children:o.disableHoverableContent?(0,P.jsx)($g,{side:i,...a,ref:t}):(0,P.jsx)(Zg,{side:i,...a,ref:t})})},`TooltipContent`)),Zg=c.forwardRef(kg(function(e,t){let n=Vg(Yg,e.__scopeTooltip),r=Lg(Yg,e.__scopeTooltip),i=c.useRef(null),a=K(t,i),[o,s]=c.useState(null),{trigger:l,onClose:u}=n,d=i.current,{onPointerInTransitChange:f}=r,p=c.useCallback(()=>{s(null),f(!1)},[f]),m=c.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=t_(r,e_(r,n.getBoundingClientRect())),a=n_(t.getBoundingClientRect()),o=i_([...i,...a]);s(o),f(!0)},[f]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&d){let e=kg(e=>m(e,d),`handleTriggerLeave`),t=kg(e=>m(e,l),`handleContentLeave`);return l.addEventListener(`pointerleave`,e),d.addEventListener(`pointerleave`,t),()=>{l.removeEventListener(`pointerleave`,e),d.removeEventListener(`pointerleave`,t)}}},[l,d,m,p]),c.useEffect(()=>{if(o){let e=kg(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||d?.contains(t),i=!r_(n,o);r?p():i&&(p(),u())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[l,d,o,u,p]),(0,P.jsx)($g,{...e,ref:a})},`TooltipContentHoverable`)),Qg=Li(`TooltipContent`),$g=c.forwardRef(kg(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...l}=e,u=Vg(Yg,n),d=Mg(n),{onClose:f}=u,[p,m]=c.useState(null),h=K(t,m);qo(p),c.useEffect(()=>(document.addEventListener(Fg,f),()=>document.removeEventListener(Fg,f)),[f]),c.useEffect(()=>{if(u.trigger){let e=kg(e=>{e.target instanceof Node&&e.target.contains(u.trigger)&&f()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]);let{setContentId:g}=u;return J(()=>(g(a),()=>{g(void 0)}),[a,g]),(0,P.jsx)(Mo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,P.jsxs)(Nd,{"data-state":u.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:u.contentId,...d,...l,ref:h,style:{...l.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,P.jsx)(Qg,{children:r}),i?(0,P.jsx)(na,{id:u.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function e_(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}kg(e_,`getExitSideFromRect`);function t_(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}kg(t_,`getPaddedExitPoints`);function n_(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}kg(n_,`getPointsFromRect`);function r_(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}kg(r_,`isPointInPolygon`);function i_(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),a_(t)}kg(i_,`getHull`);function a_(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}kg(a_,`getHullPresorted`);function o_(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}kg(o_,`concatAriaDescribedby`);function s_({delayDuration:e=400,...t}){return(0,P.jsx)(Rg,{delayDuration:e,...t})}var c_=Hg,l_=Wg;function u_(e){let t=document.activeElement;if(e){e.style.animationDuration=`1ms`;for(let t of e.getAnimations())try{t.finish()}catch{}}let n=0,r=()=>{n+=1,e?.isConnected&&n<20?window.requestAnimationFrame(r):(t?.isConnected?t:document.body).dispatchEvent(new KeyboardEvent(`keydown`,{key:`Escape`,code:`Escape`,bubbles:!0,cancelable:!0}))};window.requestAnimationFrame(r)}function d_({className:e,sideOffset:t=6,children:n,onEscapeKeyDown:r,...i}){let a=(0,c.useRef)(null);return(0,P.jsx)(Jg,{children:(0,P.jsx)(Xg,{ref:a,sideOffset:t,collisionPadding:8,onEscapeKeyDown:e=>{r?.(e),e.defaultPrevented||u_(a.current)},className:U(`z-[70] max-w-64 animate-fade-in data-[state=closed]:animate-fade-out rounded-md bg-fg px-2 py-1 text-xs font-medium text-surface shadow-pop select-none`,e),...i,children:n})})}function f_({content:e,side:t=`top`,align:n,children:r,...i}){return e?(0,P.jsxs)(c_,{...i,children:[(0,P.jsx)(l_,{asChild:!0,children:r}),(0,P.jsx)(d_,{side:t,align:n,children:e})]}):r}var p_=wi(`inline-flex shrink-0 items-center justify-center gap-1.5 rounded-md font-medium whitespace-nowrap transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`bg-accent text-accent-fg shadow-card hover:bg-accent/90`,soft:`bg-accent/8 text-accent ring-1 ring-accent/40 ring-inset hover:bg-accent/12`,secondary:`border border-line bg-surface text-fg shadow-card hover:bg-surface-2`,ghost:`text-muted hover:bg-surface-2 hover:text-fg`,danger:`text-bad hover:bg-bad/10`,link:`px-0 text-accent underline-offset-2 hover:underline`,inverse:`text-current hover:bg-white/15`},size:{xs:`h-7 px-2 text-xs`,sm:`h-8 px-2.5 text-xs`,md:`h-10 px-3 text-sm`,touch:`h-11 min-w-11 px-3 text-sm`,"icon-xs":`h-7 w-7 p-0`,"icon-sm":`h-8 w-8 p-0`,icon:`h-11 w-11 p-0`}},defaultVariants:{variant:`secondary`,size:`sm`}});function m_({variant:e,size:t,asChild:n=!1,className:r,type:i=`button`,...a}){let o=n?Fi:`button`;return(0,P.jsx)(o,{type:n?void 0:i,className:U(p_({variant:e,size:t}),r),...a})}function h_({label:e,tooltip:t,side:n,variant:r=`ghost`,size:i=`icon-sm`,children:a,...o}){return(0,P.jsx)(f_,{content:t??e,side:n,children:(0,P.jsx)(m_,{variant:r,size:i,"aria-label":e,...o,children:a})})}var g_=co;function __({className:e,children:t,chevron:n=!0,...r}){return(0,P.jsxs)(uo,{className:U(`group/collapsible flex min-h-11 w-full items-center gap-2 rounded-md px-2 text-left text-ui font-medium text-fg transition-colors hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent lg:min-h-8`,e),...r,children:[n?(0,P.jsx)(A,{size:14,className:`shrink-0 text-faint transition-transform duration-(--motion-fast) ease-standard group-data-[state=open]/collapsible:rotate-90`,"aria-hidden":`true`}):null,t]})}function v_({className:e,...t}){return(0,P.jsx)(po,{className:U(`overflow-hidden data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down`,e),...t})}function y_({title:e,meta:t,children:n,defaultOpen:r=!1,open:i,onOpenChange:a,className:o,triggerClassName:s,contentClassName:c,...l}){return(0,P.jsxs)(g_,{defaultOpen:r,open:i,onOpenChange:a,className:o,...l,children:[(0,P.jsxs)(__,{className:s,children:[(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),t==null?null:(0,P.jsx)(`span`,{className:`shrink-0 text-caption font-normal text-faint tabular-nums`,children:t})]}),(0,P.jsx)(v_,{children:(0,P.jsx)(`div`,{className:U(`px-2 pt-1 pb-2`,c),children:n})})]})}var b_=wi(`fixed inset-x-0 bottom-0 z-50 flex max-h-[88dvh] w-full animate-sheet-in flex-col overflow-hidden rounded-t-2xl border border-line bg-surface text-fg shadow-pop outline-none sm:inset-auto sm:top-1/2 sm:left-1/2 sm:max-h-[calc(100dvh-3rem)] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:animate-pop-in sm:rounded-xl`,{variants:{size:{sm:`sm:max-w-md`,md:`sm:max-w-xl`,lg:`sm:max-w-5xl`}},defaultVariants:{size:`sm`}});function x_({className:e,...t}){return(0,P.jsx)(Wc,{className:U(`fixed inset-0 z-50 animate-fade-in bg-black/40`,e),...t})}function S_(e){e.preventDefault();let t=e.currentTarget;(t.querySelector(`[data-autofocus]`)||t.querySelector(`textarea, input, button:not([data-dialog-close]), [href]`)||t).focus()}function C_({open:e,onClose:t,title:n,description:r,wrapDescription:i=!1,children:a,footer:o,size:s=`sm`,className:c,onCloseAutoFocus:l,sticky:u=!1}){return It(e,t),(0,P.jsx)(Rc,{open:e,onOpenChange:e=>e?null:t(),children:(0,P.jsxs)(Hc,{children:[(0,P.jsx)(x_,{}),(0,P.jsxs)(Jc,{className:U(b_({size:s}),c),style:{paddingBottom:`env(safe-area-inset-bottom, 0px)`},onOpenAutoFocus:S_,onCloseAutoFocus:l,onEscapeKeyDown:e=>{(u||e.target?.closest?.(`[data-sw-own-escape="true"]`))&&e.preventDefault()},onInteractOutside:e=>{u&&e.preventDefault()},...r?{}:{"aria-describedby":void 0},children:[(0,P.jsxs)(`div`,{className:U(`flex gap-3 border-b border-line px-5 py-3.5`,i?`items-start`:`items-center`),children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(Qc,{className:`text-[15px] font-semibold text-fg`,children:n}),r?(0,P.jsx)($c,{className:U(`mt-0.5 text-xs text-muted`,i?`text-pretty`:`truncate`),children:r}):null]}),(0,P.jsx)(tl,{"data-dialog-close":!0,className:`-mr-2 inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-md text-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-accent`,"aria-label":`Close`,children:(0,P.jsx)(M,{size:18,"aria-hidden":`true`})})]}),(0,P.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:a}),o?(0,P.jsx)(`div`,{className:`flex justify-end gap-2 border-t border-line px-5 py-3`,children:o}):null]})]})})}function w_(e,t,n=!1){let[r,i]=(0,c.useState)(n),a=e!==void 0,o=a?e:r,s=(0,c.useCallback)(e=>{a||i(e),t?.(e)},[a,t]);return It(o,()=>s(!1)),[o,s]}function T_({open:e,onOpenChange:t,defaultOpen:n,...r}){let[i,a]=w_(e,t,n);return(0,P.jsx)(Dp,{open:i,onOpenChange:a,...r})}var E_=kp,D_=Np;function O_({className:e,sideOffset:t=4,align:n=`end`,...r}){return(0,P.jsx)(Ap,{children:(0,P.jsx)(Mp,{sideOffset:t,align:n,collisionPadding:8,className:U(`z-[60] max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-44 overflow-y-auto data-[state=open]:animate-pop-in rounded-lg border border-line bg-surface p-1 text-fg shadow-pop`,e),...r})})}var k_=`relative flex h-11 w-full cursor-default items-center gap-2 rounded-md px-2 text-sm text-fg outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-surface-2 lg:h-8 lg:text-[13px] [&_svg]:shrink-0 [&_svg]:text-muted`;function A_({className:e,tone:t,...n}){return(0,P.jsx)(Fp,{className:U(k_,t===`danger`&&`text-bad [&_svg]:text-bad`,e),...n})}function j_({className:e,...t}){return(0,P.jsx)(Pp,{className:U(`px-2 pt-2 pb-1 text-[11px] font-medium tracking-wide text-faint uppercase`,e),...t})}function M_({className:e,...t}){return(0,P.jsx)(zp,{className:U(`-mx-1 my-1 h-px bg-line`,e),...t})}var N_=Ip;function P_({className:e,children:t,indicator:n=!0,...r}){return(0,P.jsxs)(Lp,{className:U(k_,n&&`pr-8`,`data-[state=checked]:font-medium`,e),...r,children:[t,n?(0,P.jsx)(Rp,{className:`absolute right-2 inline-flex items-center text-accent`,children:(0,P.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`,className:`!text-accent`,children:(0,P.jsx)(`path`,{d:`M3.5 8.5l3 3 6-7`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}):null]})}function F_({icon:e,title:t,children:n,action:r=null,details:i=null,tone:a=`default`,size:o=`md`,className:s,...c}){let l=o===`lg`;return(0,P.jsxs)(`div`,{className:U(`flex flex-col items-center px-6 text-center`,l?`m-auto w-full max-w-md animate-rise-in gap-3 py-12`:`gap-2 py-10`,s),...c,children:[e?l?(0,P.jsx)(`span`,{className:U(`mb-1 inline-flex h-12 w-12 items-center justify-center rounded-xl border`,a===`bad`?`border-bad/25 bg-bad/10 text-bad`:`border-line bg-surface text-muted shadow-card`),children:(0,P.jsx)(e,{size:22,"aria-hidden":`true`})}):(0,P.jsx)(e,{size:22,className:a===`bad`?`text-bad`:`text-faint`,"aria-hidden":`true`}):null,(0,P.jsx)(`p`,{className:U(`font-medium text-fg`,l?`text-heading font-semibold`:`text-sm`),children:t}),n?(0,P.jsx)(`div`,{className:U(`text-muted`,l?`max-w-sm text-sm`:`max-w-xs text-xs`),children:n}):null,r?(0,P.jsx)(`div`,{className:`mt-2 flex flex-wrap items-center justify-center gap-2`,children:r}):null,i?(0,P.jsx)(y_,{title:`Details`,className:`mt-2 w-full max-w-sm text-left`,triggerClassName:`mx-auto w-auto text-muted`,"data-sw-error-details":!0,children:(0,P.jsx)(`pre`,{className:`rounded-md break-all border border-line bg-surface-2 px-3 py-2 font-mono text-caption whitespace-pre-wrap text-muted`,children:i})}):null]})}function I_({openDelay:e=250,closeDelay:t=80,...n}){return(0,P.jsx)(Yp,{openDelay:e,closeDelay:t,...n})}var L_=Zp;function R_({className:e,sideOffset:t=6,align:n=`start`,...r}){return(0,P.jsx)(tm,{children:(0,P.jsx)(rm,{sideOffset:t,align:n,collisionPadding:8,className:U(`pointer-events-none z-[65] w-72 max-w-[calc(100vw-16px)] animate-fade-in data-[state=closed]:animate-fade-out rounded-lg border border-line bg-surface p-3 text-fg shadow-pop outline-none`,e),...r})})}var z_=wi(`block w-full min-w-0 rounded-md border border-line bg-surface text-fg outline-none placeholder:text-faint focus:border-accent disabled:opacity-50`,{variants:{size:{xs:`h-7 px-2 text-xs`,sm:`h-8 px-2 text-[13px]`,touch:`h-11 px-2.5 text-base`}},defaultVariants:{size:`sm`}});function B_({size:e,icon:t,className:n,wrapperClassName:r,...i}){return t?(0,P.jsxs)(`span`,{className:U(`relative block`,r),children:[(0,P.jsx)(t,{size:13,className:`pointer-events-none absolute top-1/2 left-2 -translate-y-1/2 text-faint`,"aria-hidden":`true`}),(0,P.jsx)(`input`,{className:U(z_({size:e}),`pl-7`,n),...i})]}):(0,P.jsx)(`input`,{className:U(z_({size:e}),n),...i})}function V_({className:e,...t}){return(0,P.jsx)(`kbd`,{className:U(`inline-flex h-4 min-w-4 items-center justify-center rounded border border-current/25 px-1 font-sans text-[10px] font-medium opacity-80`,e),...t})}function H_({open:e,onOpenChange:t,defaultOpen:n,history:r=!0,...i}){return r?(0,P.jsx)(U_,{open:e,onOpenChange:t,defaultOpen:n,...i}):(0,P.jsx)(vm,{open:e,onOpenChange:t,defaultOpen:n,...i})}function U_({open:e,onOpenChange:t,defaultOpen:n,...r}){let[i,a]=w_(e,t,n);return(0,P.jsx)(vm,{open:i,onOpenChange:a,...r})}var W_=Sm,G_=bm;function K_({className:e,align:t=`start`,sideOffset:n=4,...r}){return(0,P.jsx)(Em,{children:(0,P.jsx)(Om,{align:t,sideOffset:n,collisionPadding:8,className:U(`z-[60] max-w-[calc(100vw-16px)] animate-pop-in rounded-lg border border-line bg-surface p-1 text-fg shadow-pop outline-none`,e),...r})})}function q_({open:e,onOpenChange:t,defaultOpen:n,...r}){let[i,a]=w_(e,t,n);return(0,P.jsx)(Qm,{open:i,onOpenChange:a,...r})}var J_=Ch;function Y_(e){return(0,P.jsx)(nh,{...e})}var X_=wi(`inline-flex min-w-0 items-center justify-between gap-1.5 rounded-md border bg-surface text-left font-medium text-fg shadow-card outline-none hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50 data-[placeholder]:text-muted`,{variants:{size:{xs:`h-7 px-2 text-xs`,sm:`h-8 px-2 text-[13px]`,touch:`h-11 px-3 text-sm`},tone:{default:`border-line`,active:`border-warn`}},defaultVariants:{size:`sm`,tone:`default`}}),Z_=new WeakSet,Q_=e=>Z_.has(e?.nativeEvent||e);function $_({size:e,tone:t,className:n,children:r,onKeyDown:i,...a}){return(0,P.jsxs)(eh,{className:U(X_({size:e,tone:t}),n),onKeyDown:e=>{i?.(e),e.defaultPrevented||e.ctrlKey||e.altKey||e.metaKey||e.key.length===1&&e.key!==` `&&(Z_.add(e.nativeEvent),e.preventDefault())},...a,children:[(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:r}),(0,P.jsx)(rh,{asChild:!0,children:(0,P.jsx)(O,{size:14,className:`shrink-0 text-faint`,"aria-hidden":`true`})})]})}function ev({className:e,children:t,align:n=`start`,...r}){return(0,P.jsx)(oh,{children:(0,P.jsx)(ch,{position:`popper`,sideOffset:4,align:n,collisionPadding:8,className:U(`z-[60] max-h-[min(var(--radix-select-content-available-height),24rem)] min-w-[max(var(--radix-select-trigger-width),10rem)] max-w-[calc(100vw-16px)] animate-pop-in overflow-hidden rounded-lg border border-line bg-surface text-fg shadow-pop`,e),...r,children:(0,P.jsx)(bh,{className:`p-1`,nonce:globalThis.__webpack_nonce__,children:t})})})}function tv({className:e,...t}){return(0,P.jsx)(Th,{className:U(`px-2 pt-2 pb-1 text-[11px] font-medium tracking-wide text-faint uppercase`,e),...t})}function nv({className:e,children:t,value:n,...r}){return(0,P.jsxs)(kh,{value:n,className:U(`relative flex h-11 w-full cursor-default items-center gap-2 rounded-md py-0 pr-2 pl-7 text-sm text-fg outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-surface-2 lg:h-8 lg:text-[13px]`,e),"data-sw-option":n,...r,children:[(0,P.jsx)(`span`,{className:`absolute left-2 inline-flex w-4 items-center justify-center`,children:(0,P.jsx)(Nh,{children:(0,P.jsx)(E,{size:14,className:`text-accent`,"aria-hidden":`true`})})}),(0,P.jsx)(jh,{children:t})]})}function rv({className:e,...t}){return(0,P.jsx)(Ph,{className:U(`-mx-1 my-1 h-px bg-line`,e),...t})}function iv({className:e,...t}){return(0,P.jsx)(`div`,{"aria-hidden":`true`,className:U(`sw-skeleton animate-shimmer rounded-md`,e),...t})}function av({size:e=14}){return(0,P.jsx)(`span`,{className:`inline-block animate-spin rounded-full border-2 border-current border-t-transparent`,style:{width:e,height:e},"aria-hidden":`true`})}var ov=Zh,sv={segmented:`flex rounded-md border border-line bg-surface-2 p-0.5`,underline:`flex gap-4 overflow-x-auto border-b border-line [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`},cv=`text-xs font-medium whitespace-nowrap text-muted outline-none hover:text-fg disabled:opacity-50`;function lv(e,t,n){return e===`underline`?U(cv,`relative inline-flex shrink-0 items-center justify-center rounded-sm px-0.5 transition-colors duration-(--motion-fast) ease-standard focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent`,`after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-transparent after:content-['']`,n===`on`?`data-[state=on]:text-fg data-[state=on]:after:bg-accent`:`data-[state=active]:text-fg data-[state=active]:after:bg-accent`,t?`h-11 min-w-11`:`h-11 lg:h-8`):U(cv,`flex-1 rounded px-2.5 focus-visible:outline-2 focus-visible:outline-accent`,n===`on`?`data-[state=on]:bg-surface data-[state=on]:text-fg data-[state=on]:shadow-card`:`data-[state=active]:bg-surface data-[state=active]:text-fg data-[state=active]:shadow-card`,t?`h-11 min-w-11`:`h-7`)}var uv=(0,c.createContext)(`segmented`);function dv({className:e,variant:t=`segmented`,...n}){return(0,P.jsx)(uv.Provider,{value:t,children:(0,P.jsx)($h,{className:U(sv[t],e),"data-sw-tabs-variant":t,...n})})}function fv({className:e,large:t=!1,...n}){let r=(0,c.useContext)(uv);return(0,P.jsx)(tg,{className:U(lv(r,t,`active`),e),...n})}function pv({className:e,...t}){return(0,P.jsx)(rg,{className:U(`outline-none`,e),...t})}var mv=wi(`block w-full min-w-0 resize-y rounded-md border border-line bg-surface text-fg outline-none placeholder:text-faint focus:border-accent disabled:opacity-50`,{variants:{size:{sm:`px-2 py-1.5 text-[13px]`,md:`px-3 py-2 text-[13px]`,touch:`min-h-11 px-2.5 py-2 text-base`}},defaultVariants:{size:`sm`}});function hv({size:e,className:t,...n}){return(0,P.jsx)(`textarea`,{className:U(mv({size:e}),t),...n})}var gv=wi(`inline-flex shrink-0 items-center justify-center gap-1.5 font-medium whitespace-nowrap transition-colors outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{outline:`rounded-md border border-line text-muted hover:text-fg data-[state=on]:border-accent data-[state=on]:bg-accent/10 data-[state=on]:text-fg`,flat:`relative rounded-md text-muted hover:bg-fg/[0.05] hover:text-fg focus-visible:z-10 focus-visible:outline-offset-0 aria-pressed:bg-surface-2 aria-pressed:text-fg aria-pressed:shadow-card aria-pressed:ring-1 aria-pressed:ring-line-strong/70 aria-pressed:ring-inset`,segment:`relative rounded text-muted hover:text-fg focus-visible:z-10 focus-visible:outline-offset-0 aria-pressed:bg-surface aria-pressed:text-fg aria-pressed:shadow-card`,pill:`max-w-full rounded-full border border-line text-muted hover:text-fg data-[state=on]:border-warn data-[state=on]:bg-warn/15 data-[state=on]:text-fg`},size:{xs:`h-7 px-2.5 text-xs`,sm:`h-8 px-2.5 text-xs`,touch:`h-11 px-3 text-xs`}},defaultVariants:{variant:`outline`,size:`sm`}});function _v({variant:e,size:t,className:n,...r}){return(0,P.jsx)(lg,{className:U(gv({variant:e,size:t}),n),...r})}function vv({label:e,options:t,value:n,onChange:r,large:i=!1,disabled:a=!1,variant:o=`segmented`,className:s,itemClassName:c}){return(0,P.jsx)(_g,{type:`single`,value:n,disabled:a,onValueChange:e=>e?r(e):null,"aria-label":e,className:U(sv[o],s),"data-sw-tabs-variant":o,children:t.map(e=>(0,P.jsx)(f_,{content:e.tooltip,side:`bottom`,children:(0,P.jsxs)(Eg,{value:e.id,className:U(lv(o,i,`on`),c),"data-sw-option":e.id,children:[e.label,e.count===void 0?null:(0,P.jsx)(`span`,{className:`tabular ml-1 text-faint`,children:e.count})]})},e.id))})}export{po as $,_t as $t,O_ as A,kr as At,m_ as B,yt as Bt,V_ as C,s as Cn,$r as Ct,L_ as D,Ir as Dt,R_ as E,Kr as Et,P_ as F,wr as Ft,bm as G,nt as Gt,f_ as H,Dt as Ht,M_ as I,br as It,Rc as J,ft as Jt,Om as K,qe as Kt,E_ as L,xr as Lt,A_ as M,U as Mt,j_ as N,Sr as Nt,F_ as O,Br as Ot,N_ as P,Tr as Pt,co as Q,Qe as Qt,C_ as R,Ft as Rt,W_ as S,S as Sn,Qr as St,I_ as T,r as Tn,Gr as Tt,s_ as U,vt as Ut,h_ as V,It as Vt,vm as W,lt as Wt,Hc as X,gt as Xt,Jc as Y,ht as Yt,Qc as Z,mt as Zt,Y_ as _,M as _n,ni as _t,pv as a,He as an,yi as at,G_ as b,E as bn,qr as bt,av as c,be as cn,fi as ct,ev as d,z as dn,oi as dt,rt as en,uo as et,J_ as f,oe as fn,pi as ft,$_ as g,re as gn,Jr as gt,rv as h,ae as hn,Xr as ht,ov as i,Ue as in,gi as it,D_ as j,jr as jt,T_ as k,Vr as kt,iv as l,_e as ln,ci as lt,tv as m,R as mn,Zr as mt,_v as n,We as nn,Di as nt,dv as o,Ae as on,mi as ot,nv as p,ie as pn,ai as pt,Em as q,Ke as qt,hv as r,Le as rn,Ti as rt,fv as s,ye as sn,_i as st,vv as t,$e as tn,Ei as tt,q_ as u,he as un,li as ut,Q_ as v,A as vn,ii as vt,B_ as w,a as wn,ti as wt,K_ as x,w as xn,ri as xt,H_ as y,O as yn,Yr as yt,x_ as z,bt as zt};