@stoneforge/quarry 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +13 -0
- package/README.md +160 -0
- package/dist/api/index.d.ts +8 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/quarry-api.d.ts +268 -0
- package/dist/api/quarry-api.d.ts.map +1 -0
- package/dist/api/quarry-api.js +3905 -0
- package/dist/api/quarry-api.js.map +1 -0
- package/dist/api/types.d.ts +1359 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +204 -0
- package/dist/api/types.js.map +1 -0
- package/dist/bin/sf.d.ts +3 -0
- package/dist/bin/sf.d.ts.map +1 -0
- package/dist/bin/sf.js +9 -0
- package/dist/bin/sf.js.map +1 -0
- package/dist/cli/commands/admin.d.ts +11 -0
- package/dist/cli/commands/admin.d.ts.map +1 -0
- package/dist/cli/commands/admin.js +465 -0
- package/dist/cli/commands/admin.js.map +1 -0
- package/dist/cli/commands/alias.d.ts +8 -0
- package/dist/cli/commands/alias.d.ts.map +1 -0
- package/dist/cli/commands/alias.js +70 -0
- package/dist/cli/commands/alias.js.map +1 -0
- package/dist/cli/commands/channel.d.ts +13 -0
- package/dist/cli/commands/channel.d.ts.map +1 -0
- package/dist/cli/commands/channel.js +680 -0
- package/dist/cli/commands/channel.js.map +1 -0
- package/dist/cli/commands/completion.d.ts +8 -0
- package/dist/cli/commands/completion.d.ts.map +1 -0
- package/dist/cli/commands/completion.js +87 -0
- package/dist/cli/commands/completion.js.map +1 -0
- package/dist/cli/commands/config.d.ts +12 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +242 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/crud.d.ts +64 -0
- package/dist/cli/commands/crud.d.ts.map +1 -0
- package/dist/cli/commands/crud.js +805 -0
- package/dist/cli/commands/crud.js.map +1 -0
- package/dist/cli/commands/dep.d.ts +16 -0
- package/dist/cli/commands/dep.d.ts.map +1 -0
- package/dist/cli/commands/dep.js +499 -0
- package/dist/cli/commands/dep.js.map +1 -0
- package/dist/cli/commands/document.d.ts +12 -0
- package/dist/cli/commands/document.d.ts.map +1 -0
- package/dist/cli/commands/document.js +1039 -0
- package/dist/cli/commands/document.js.map +1 -0
- package/dist/cli/commands/embeddings.d.ts +12 -0
- package/dist/cli/commands/embeddings.d.ts.map +1 -0
- package/dist/cli/commands/embeddings.js +273 -0
- package/dist/cli/commands/embeddings.js.map +1 -0
- package/dist/cli/commands/entity.d.ts +16 -0
- package/dist/cli/commands/entity.d.ts.map +1 -0
- package/dist/cli/commands/entity.js +522 -0
- package/dist/cli/commands/entity.js.map +1 -0
- package/dist/cli/commands/gc.d.ts +10 -0
- package/dist/cli/commands/gc.d.ts.map +1 -0
- package/dist/cli/commands/gc.js +257 -0
- package/dist/cli/commands/gc.js.map +1 -0
- package/dist/cli/commands/help.d.ts +11 -0
- package/dist/cli/commands/help.d.ts.map +1 -0
- package/dist/cli/commands/help.js +169 -0
- package/dist/cli/commands/help.js.map +1 -0
- package/dist/cli/commands/history.d.ts +9 -0
- package/dist/cli/commands/history.d.ts.map +1 -0
- package/dist/cli/commands/history.js +160 -0
- package/dist/cli/commands/history.js.map +1 -0
- package/dist/cli/commands/identity.d.ts +18 -0
- package/dist/cli/commands/identity.d.ts.map +1 -0
- package/dist/cli/commands/identity.js +698 -0
- package/dist/cli/commands/identity.js.map +1 -0
- package/dist/cli/commands/inbox.d.ts +20 -0
- package/dist/cli/commands/inbox.d.ts.map +1 -0
- package/dist/cli/commands/inbox.js +493 -0
- package/dist/cli/commands/inbox.js.map +1 -0
- package/dist/cli/commands/init.d.ts +20 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +144 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/install.d.ts +9 -0
- package/dist/cli/commands/install.d.ts.map +1 -0
- package/dist/cli/commands/install.js +200 -0
- package/dist/cli/commands/install.js.map +1 -0
- package/dist/cli/commands/library.d.ts +12 -0
- package/dist/cli/commands/library.d.ts.map +1 -0
- package/dist/cli/commands/library.js +665 -0
- package/dist/cli/commands/library.js.map +1 -0
- package/dist/cli/commands/message.d.ts +11 -0
- package/dist/cli/commands/message.d.ts.map +1 -0
- package/dist/cli/commands/message.js +608 -0
- package/dist/cli/commands/message.js.map +1 -0
- package/dist/cli/commands/plan.d.ts +17 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +698 -0
- package/dist/cli/commands/plan.js.map +1 -0
- package/dist/cli/commands/playbook.d.ts +12 -0
- package/dist/cli/commands/playbook.d.ts.map +1 -0
- package/dist/cli/commands/playbook.js +730 -0
- package/dist/cli/commands/playbook.js.map +1 -0
- package/dist/cli/commands/reset.d.ts +12 -0
- package/dist/cli/commands/reset.d.ts.map +1 -0
- package/dist/cli/commands/reset.js +306 -0
- package/dist/cli/commands/reset.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +11 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +106 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +8 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +82 -0
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/commands/sync.d.ts +14 -0
- package/dist/cli/commands/sync.d.ts.map +1 -0
- package/dist/cli/commands/sync.js +370 -0
- package/dist/cli/commands/sync.js.map +1 -0
- package/dist/cli/commands/task.d.ts +25 -0
- package/dist/cli/commands/task.d.ts.map +1 -0
- package/dist/cli/commands/task.js +1153 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/commands/team.d.ts +13 -0
- package/dist/cli/commands/team.d.ts.map +1 -0
- package/dist/cli/commands/team.js +471 -0
- package/dist/cli/commands/team.js.map +1 -0
- package/dist/cli/commands/workflow.d.ts +16 -0
- package/dist/cli/commands/workflow.d.ts.map +1 -0
- package/dist/cli/commands/workflow.js +753 -0
- package/dist/cli/commands/workflow.js.map +1 -0
- package/dist/cli/completion.d.ts +28 -0
- package/dist/cli/completion.d.ts.map +1 -0
- package/dist/cli/completion.js +295 -0
- package/dist/cli/completion.js.map +1 -0
- package/dist/cli/db.d.ts +38 -0
- package/dist/cli/db.d.ts.map +1 -0
- package/dist/cli/db.js +90 -0
- package/dist/cli/db.js.map +1 -0
- package/dist/cli/formatter.d.ts +87 -0
- package/dist/cli/formatter.d.ts.map +1 -0
- package/dist/cli/formatter.js +464 -0
- package/dist/cli/formatter.js.map +1 -0
- package/dist/cli/index.d.ts +33 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +38 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/parser.d.ts +45 -0
- package/dist/cli/parser.d.ts.map +1 -0
- package/dist/cli/parser.js +256 -0
- package/dist/cli/parser.js.map +1 -0
- package/dist/cli/plugin-loader.d.ts +39 -0
- package/dist/cli/plugin-loader.d.ts.map +1 -0
- package/dist/cli/plugin-loader.js +165 -0
- package/dist/cli/plugin-loader.js.map +1 -0
- package/dist/cli/plugin-registry.d.ts +50 -0
- package/dist/cli/plugin-registry.d.ts.map +1 -0
- package/dist/cli/plugin-registry.js +206 -0
- package/dist/cli/plugin-registry.js.map +1 -0
- package/dist/cli/plugin-types.d.ts +106 -0
- package/dist/cli/plugin-types.d.ts.map +1 -0
- package/dist/cli/plugin-types.js +103 -0
- package/dist/cli/plugin-types.js.map +1 -0
- package/dist/cli/runner.d.ts +35 -0
- package/dist/cli/runner.d.ts.map +1 -0
- package/dist/cli/runner.js +340 -0
- package/dist/cli/runner.js.map +1 -0
- package/dist/cli/suggest.d.ts +15 -0
- package/dist/cli/suggest.d.ts.map +1 -0
- package/dist/cli/suggest.js +49 -0
- package/dist/cli/suggest.js.map +1 -0
- package/dist/cli/types.d.ts +138 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +63 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/config/config.d.ts +86 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +348 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/defaults.d.ts +66 -0
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/defaults.js +114 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/duration.d.ts +75 -0
- package/dist/config/duration.d.ts.map +1 -0
- package/dist/config/duration.js +190 -0
- package/dist/config/duration.js.map +1 -0
- package/dist/config/env.d.ts +67 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +207 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/file.d.ts +97 -0
- package/dist/config/file.d.ts.map +1 -0
- package/dist/config/file.js +365 -0
- package/dist/config/file.js.map +1 -0
- package/dist/config/index.d.ts +35 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +41 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/merge.d.ts +53 -0
- package/dist/config/merge.d.ts.map +1 -0
- package/dist/config/merge.js +226 -0
- package/dist/config/merge.js.map +1 -0
- package/dist/config/types.d.ts +257 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +72 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/validation.d.ts +55 -0
- package/dist/config/validation.d.ts.map +1 -0
- package/dist/config/validation.js +251 -0
- package/dist/config/validation.js.map +1 -0
- package/dist/http/index.d.ts +8 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +12 -0
- package/dist/http/index.js.map +1 -0
- package/dist/http/sync-handlers.d.ts +162 -0
- package/dist/http/sync-handlers.d.ts.map +1 -0
- package/dist/http/sync-handlers.js +271 -0
- package/dist/http/sync-handlers.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/server/index.d.ts +34 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +3329 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/static.d.ts +18 -0
- package/dist/server/static.d.ts.map +1 -0
- package/dist/server/static.js +71 -0
- package/dist/server/static.js.map +1 -0
- package/dist/server/ws/broadcaster.d.ts +8 -0
- package/dist/server/ws/broadcaster.d.ts.map +1 -0
- package/dist/server/ws/broadcaster.js +7 -0
- package/dist/server/ws/broadcaster.js.map +1 -0
- package/dist/server/ws/handler.d.ts +55 -0
- package/dist/server/ws/handler.d.ts.map +1 -0
- package/dist/server/ws/handler.js +160 -0
- package/dist/server/ws/handler.js.map +1 -0
- package/dist/services/blocked-cache.d.ts +297 -0
- package/dist/services/blocked-cache.d.ts.map +1 -0
- package/dist/services/blocked-cache.js +755 -0
- package/dist/services/blocked-cache.js.map +1 -0
- package/dist/services/dependency.d.ts +205 -0
- package/dist/services/dependency.d.ts.map +1 -0
- package/dist/services/dependency.js +566 -0
- package/dist/services/dependency.js.map +1 -0
- package/dist/services/embeddings/fusion.d.ts +33 -0
- package/dist/services/embeddings/fusion.d.ts.map +1 -0
- package/dist/services/embeddings/fusion.js +34 -0
- package/dist/services/embeddings/fusion.js.map +1 -0
- package/dist/services/embeddings/index.d.ts +12 -0
- package/dist/services/embeddings/index.d.ts.map +1 -0
- package/dist/services/embeddings/index.js +10 -0
- package/dist/services/embeddings/index.js.map +1 -0
- package/dist/services/embeddings/local-provider.d.ts +31 -0
- package/dist/services/embeddings/local-provider.d.ts.map +1 -0
- package/dist/services/embeddings/local-provider.js +80 -0
- package/dist/services/embeddings/local-provider.js.map +1 -0
- package/dist/services/embeddings/service.d.ts +76 -0
- package/dist/services/embeddings/service.d.ts.map +1 -0
- package/dist/services/embeddings/service.js +153 -0
- package/dist/services/embeddings/service.js.map +1 -0
- package/dist/services/embeddings/types.d.ts +70 -0
- package/dist/services/embeddings/types.d.ts.map +1 -0
- package/dist/services/embeddings/types.js +8 -0
- package/dist/services/embeddings/types.js.map +1 -0
- package/dist/services/id-length-cache.d.ts +156 -0
- package/dist/services/id-length-cache.d.ts.map +1 -0
- package/dist/services/id-length-cache.js +197 -0
- package/dist/services/id-length-cache.js.map +1 -0
- package/dist/services/inbox.d.ts +147 -0
- package/dist/services/inbox.d.ts.map +1 -0
- package/dist/services/inbox.js +428 -0
- package/dist/services/inbox.js.map +1 -0
- package/dist/services/index.d.ts +10 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +10 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/priority-service.d.ts +145 -0
- package/dist/services/priority-service.d.ts.map +1 -0
- package/dist/services/priority-service.js +272 -0
- package/dist/services/priority-service.js.map +1 -0
- package/dist/services/search-utils.d.ts +47 -0
- package/dist/services/search-utils.d.ts.map +1 -0
- package/dist/services/search-utils.js +83 -0
- package/dist/services/search-utils.js.map +1 -0
- package/dist/sync/hash.d.ts +48 -0
- package/dist/sync/hash.d.ts.map +1 -0
- package/dist/sync/hash.js +136 -0
- package/dist/sync/hash.js.map +1 -0
- package/dist/sync/index.d.ts +11 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +16 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/merge.d.ts +80 -0
- package/dist/sync/merge.d.ts.map +1 -0
- package/dist/sync/merge.js +310 -0
- package/dist/sync/merge.js.map +1 -0
- package/dist/sync/serialization.d.ts +132 -0
- package/dist/sync/serialization.d.ts.map +1 -0
- package/dist/sync/serialization.js +306 -0
- package/dist/sync/serialization.js.map +1 -0
- package/dist/sync/service.d.ts +102 -0
- package/dist/sync/service.d.ts.map +1 -0
- package/dist/sync/service.js +493 -0
- package/dist/sync/service.js.map +1 -0
- package/dist/sync/types.d.ts +275 -0
- package/dist/sync/types.d.ts.map +1 -0
- package/dist/sync/types.js +76 -0
- package/dist/sync/types.js.map +1 -0
- package/dist/systems/identity.d.ts +479 -0
- package/dist/systems/identity.d.ts.map +1 -0
- package/dist/systems/identity.js +817 -0
- package/dist/systems/identity.js.map +1 -0
- package/dist/systems/index.d.ts +8 -0
- package/dist/systems/index.d.ts.map +1 -0
- package/dist/systems/index.js +29 -0
- package/dist/systems/index.js.map +1 -0
- package/package.json +121 -0
- package/web/assets/charts-vendor-D1YcbGux.js +55 -0
- package/web/assets/dnd-vendor-DmxE-_ZH.js +5 -0
- package/web/assets/editor-vendor-BxraAWts.js +279 -0
- package/web/assets/index-B77vv208.js +341 -0
- package/web/assets/index-CF_XnVLh.css +1 -0
- package/web/assets/router-vendor-BCKpRBrB.js +41 -0
- package/web/assets/ui-vendor-DUahGnbT.js +45 -0
- package/web/assets/utils-vendor-CfYKiENT.js +813 -0
- package/web/favicon.ico +0 -0
- package/web/index.html +23 -0
- package/web/logo.png +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import{r as i,j as m,b as Ro,c as Rt,a as Zs,R as Me}from"./router-vendor-BCKpRBrB.js";function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Zn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Pt(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Zn(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Zn(e[r],null)}}}}function $(...e){return i.useCallback(Pt(...e),e)}function Qs(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return m.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function ye(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:h,children:v,...g}=f,p=h?.[e]?.[l]||c,w=i.useMemo(()=>g,Object.values(g));return m.jsx(p.Provider,{value:w,children:v})};u.displayName=s+"Provider";function d(f,h){const v=h?.[e]?.[l]||c,g=i.useContext(v);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Js(r,...t)]}function Js(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var z=globalThis?.document?i.useLayoutEffect:()=>{},ei=Ro[" useId ".trim().toString()]||(()=>{}),ti=0;function ge(e){const[t,n]=i.useState(ei());return z(()=>{n(o=>o??String(ti++))},[e]),t?`radix-${t}`:""}var ni=Ro[" useInsertionEffect ".trim().toString()]||z;function et({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=oi({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,o])}const u=i.useCallback(d=>{if(c){const f=ri(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[c,e,s,a]);return[l,u]}function oi({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return ni(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function ri(e){return typeof e=="function"}function $e(e){const t=si(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(ai);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return m.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return m.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function si(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=li(r),c=ci(s,r.props);return r.type!==i.Fragment&&(c.ref=o?Pt(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Po=Symbol("radix.slottable");function ii(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Po,t}function ai(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Po}function ci(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function li(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)}var ui=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=ui.reduce((e,t)=>{const n=$e(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function To(e,t){e&&Rt.flushSync(()=>e.dispatchEvent(t))}function fe(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function di(e,t=globalThis?.document){const n=fe(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var fi="DismissableLayer",ln="dismissableLayer.update",pi="dismissableLayer.pointerDownOutside",mi="dismissableLayer.focusOutside",Qn,Mo=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),We=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(Mo),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,v]=i.useState({}),g=$(t,E=>f(E)),p=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=p.indexOf(w),y=d?p.indexOf(d):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,b=y>=x,S=gi(E=>{const A=E.target,L=[...u.branches].some(I=>I.contains(A));!b||L||(r?.(E),a?.(E),E.defaultPrevented||c?.())},h),M=wi(E=>{const A=E.target;[...u.branches].some(I=>I.contains(A))||(s?.(E),a?.(E),E.defaultPrevented||c?.())},h);return di(E=>{y===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Jn(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Qn)}},[d,h,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Jn())},[d,u]),i.useEffect(()=>{const E=()=>v({});return document.addEventListener(ln,E),()=>document.removeEventListener(ln,E)},[]),m.jsx(D.div,{...l,ref:g,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,M.onFocusCapture),onBlurCapture:R(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});We.displayName=fi;var hi="DismissableLayerBranch",vi=i.forwardRef((e,t)=>{const n=i.useContext(Mo),o=i.useRef(null),r=$(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(D.div,{...e,ref:r})});vi.displayName=hi;function gi(e,t=globalThis?.document){const n=fe(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){Ao(pi,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function wi(e,t=globalThis?.document){const n=fe(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&Ao(mi,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Jn(){const e=new CustomEvent(ln);document.dispatchEvent(e)}function Ao(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?To(r,s):r.dispatchEvent(s)}var Zt="focusScope.autoFocusOnMount",Qt="focusScope.autoFocusOnUnmount",eo={bubbles:!1,cancelable:!0},xi="FocusScope",Tt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=fe(r),d=fe(s),f=i.useRef(null),h=$(t,p=>l(p)),v=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let p=function(C){if(v.paused||!c)return;const b=C.target;c.contains(b)?f.current=b:Ce(f.current,{select:!0})},w=function(C){if(v.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||Ce(f.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const S of C)S.removedNodes.length>0&&Ce(c)};document.addEventListener("focusin",p),document.addEventListener("focusout",w);const y=new MutationObserver(x);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",w),y.disconnect()}}},[o,c,v.paused]),i.useEffect(()=>{if(c){no.add(v);const p=document.activeElement;if(!c.contains(p)){const x=new CustomEvent(Zt,eo);c.addEventListener(Zt,u),c.dispatchEvent(x),x.defaultPrevented||(yi(Ri(_o(c)),{select:!0}),document.activeElement===p&&Ce(c))}return()=>{c.removeEventListener(Zt,u),setTimeout(()=>{const x=new CustomEvent(Qt,eo);c.addEventListener(Qt,d),c.dispatchEvent(x),x.defaultPrevented||Ce(p??document.body,{select:!0}),c.removeEventListener(Qt,d),no.remove(v)},0)}}},[c,u,d,v]);const g=i.useCallback(p=>{if(!n&&!o||v.paused)return;const w=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,x=document.activeElement;if(w&&x){const y=p.currentTarget,[C,b]=Ci(y);C&&b?!p.shiftKey&&x===b?(p.preventDefault(),n&&Ce(C,{select:!0})):p.shiftKey&&x===C&&(p.preventDefault(),n&&Ce(b,{select:!0})):x===y&&p.preventDefault()}},[n,o,v.paused]);return m.jsx(D.div,{tabIndex:-1,...a,ref:h,onKeyDown:g})});Tt.displayName=xi;function yi(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ce(o,{select:t}),document.activeElement!==n)return}function Ci(e){const t=_o(e),n=to(t,e),o=to(t.reverse(),e);return[n,o]}function _o(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function to(e,t){for(const n of e)if(!bi(n,{upTo:t}))return n}function bi(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Si(e){return e instanceof HTMLInputElement&&"select"in e}function Ce(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Si(e)&&t&&e.select()}}var no=Ei();function Ei(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=oo(e,t),e.unshift(t)},remove(t){e=oo(e,t),e[0]?.resume()}}}function oo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ri(e){return e.filter(t=>t.tagName!=="A")}var Pi="Portal",Ue=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);z(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Zs.createPortal(m.jsx(D.div,{...o,ref:t}),a):null});Ue.displayName=Pi;function Ti(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var oe=e=>{const{present:t,children:n}=e,o=Mi(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=$(o.ref,Ai(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};oe.displayName="Presence";function Mi(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=Ti(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=it(o.current);s.current=c==="mounted"?u:"none"},[c]),z(()=>{const u=o.current,d=r.current;if(d!==e){const h=s.current,v=it(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),z(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=v=>{const p=it(o.current).includes(CSS.escape(v.animationName));if(v.target===t&&p&&(l("ANIMATION_END"),!r.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=v=>{v.target===t&&(s.current=it(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function it(e){return e?.animationName||"none"}function Ai(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)}var Jt=0;function Sn(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ro()),document.body.insertAdjacentElement("beforeend",e[1]??ro()),Jt++,()=>{Jt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Jt--}},[])}function ro(){const 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}var le=function(){return le=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},le.apply(this,arguments)};function Io(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function _i(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var ft="right-scroll-bar-position",pt="width-before-scroll-bar",Ii="with-scroll-bars-hidden",Oi="--removed-body-scroll-bar-size";function en(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Di(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var Ni=typeof window<"u"?i.useLayoutEffect:i.useEffect,so=new WeakMap;function Li(e,t){var n=Di(null,function(o){return e.forEach(function(r){return en(r,o)})});return Ni(function(){var o=so.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||en(c,null)}),s.forEach(function(c){r.has(c)||en(c,a)})}so.set(n,e)},[e]),n}function ki(e){return e}function ji(e,t){t===void 0&&(t=ki);var n=[],o=!1,r={read:function(){if(o)throw new 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(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return r}function Fi(e){e===void 0&&(e={});var t=ji(null);return t.options=le({async:!0,ssr:!1},e),t}var Oo=function(e){var t=e.sideCar,n=Io(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,le({},n))};Oo.isSideCarExport=!0;function $i(e,t){return e.useMedium(t),Oo}var Do=Fi(),tn=function(){},Mt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:tn,onWheelCapture:tn,onTouchMoveCapture:tn}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,v=e.noRelative,g=e.noIsolation,p=e.inert,w=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,C=e.gapMode,b=Io(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,M=Li([n,t]),E=le(le({},b),r);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:Do,removeScrollBar:u,shards:f,noRelative:v,noIsolation:g,inert:p,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:C}),a?i.cloneElement(i.Children.only(c),le(le({},E),{ref:M})):i.createElement(y,le({},E,{className:l,ref:M}),c))});Mt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mt.classNames={fullWidth:pt,zeroRight:ft};var Bi=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Hi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bi();return t&&e.setAttribute("nonce",t),e}function Wi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ui(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Vi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Hi())&&(Wi(t,n),Ui(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ki=function(){var e=Vi();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},No=function(){var e=Ki(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Gi={left:0,top:0,right:0,gap:0},nn=function(e){return parseInt(e||"",10)||0},zi=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[nn(n),nn(o),nn(r)]},Yi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gi;var t=zi(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Xi=No(),je="data-scroll-locked",qi=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Ii,` {
|
|
3
|
+
overflow: hidden `).concat(o,`;
|
|
4
|
+
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(je,`] {
|
|
7
|
+
overflow: hidden `).concat(o,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(r,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
12
|
+
padding-right: `).concat(a,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(ft,` {
|
|
20
|
+
right: `).concat(c,"px ").concat(o,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(pt,` {
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(ft," .").concat(ft,` {
|
|
28
|
+
right: 0 `).concat(o,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(pt," .").concat(pt,` {
|
|
32
|
+
margin-right: 0 `).concat(o,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(je,`] {
|
|
36
|
+
`).concat(Oi,": ").concat(c,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},io=function(){var e=parseInt(document.body.getAttribute(je)||"0",10);return isFinite(e)?e:0},Zi=function(){i.useEffect(function(){return document.body.setAttribute(je,(io()+1).toString()),function(){var e=io()-1;e<=0?document.body.removeAttribute(je):document.body.setAttribute(je,e.toString())}},[])},Qi=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;Zi();var s=i.useMemo(function(){return Yi(r)},[r]);return i.createElement(Xi,{styles:qi(s,!t,r,n?"":"!important")})},un=!1;if(typeof window<"u")try{var at=Object.defineProperty({},"passive",{get:function(){return un=!0,!0}});window.addEventListener("test",at,at),window.removeEventListener("test",at,at)}catch{un=!1}var Ne=un?{passive:!1}:!1,Ji=function(e){return e.tagName==="TEXTAREA"},Lo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ji(e)&&n[t]==="visible")},ea=function(e){return Lo(e,"overflowY")},ta=function(e){return Lo(e,"overflowX")},ao=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=ko(e,o);if(r){var s=jo(e,o),a=s[1],c=s[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},na=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},oa=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},ko=function(e,t){return e==="v"?ea(t):ta(t)},jo=function(e,t){return e==="v"?na(t):oa(t)},ra=function(e,t){return e==="h"&&t==="rtl"?-1:1},sa=function(e,t,n,o,r){var s=ra(e,window.getComputedStyle(t).direction),a=s*o,c=n.target,l=t.contains(c),u=!1,d=a>0,f=0,h=0;do{if(!c)break;var v=jo(e,c),g=v[0],p=v[1],w=v[2],x=p-w-s*g;(g||x)&&ko(e,c)&&(f+=x,h+=g);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},ct=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},co=function(e){return[e.deltaX,e.deltaY]},lo=function(e){return e&&"current"in e?e.current:e},ia=function(e,t){return e[0]===t[0]&&e[1]===t[1]},aa=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},ca=0,Le=[];function la(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(ca++)[0],s=i.useState(No)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var p=_i([e.lockRef.current],(e.shards||[]).map(lo),!0).filter(Boolean);return p.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),p.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(p,w){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var x=ct(p),y=n.current,C="deltaX"in p?p.deltaX:y[0]-x[0],b="deltaY"in p?p.deltaY:y[1]-x[1],S,M=p.target,E=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in p&&E==="h"&&M.type==="range")return!1;var A=window.getSelection(),L=A&&A.anchorNode,I=L?L===M||L.contains(M):!1;if(I)return!1;var N=ao(E,M);if(!N)return!0;if(N?S=E:(S=E==="v"?"h":"v",N=ao(E,M)),!N)return!1;if(!o.current&&"changedTouches"in p&&(C||b)&&(o.current=S),!S)return!0;var j=o.current||S;return sa(j,w,p,j==="h"?C:b)},[]),l=i.useCallback(function(p){var w=p;if(!(!Le.length||Le[Le.length-1]!==s)){var x="deltaY"in w?co(w):ct(w),y=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&ia(S.delta,x)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var C=(a.current.shards||[]).map(lo).filter(Boolean).filter(function(S){return S.contains(w.target)}),b=C.length>0?c(w,C[0]):!a.current.noIsolation;b&&w.cancelable&&w.preventDefault()}}},[]),u=i.useCallback(function(p,w,x,y){var C={name:p,delta:w,target:x,should:y,shadowParent:ua(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),d=i.useCallback(function(p){n.current=ct(p),o.current=void 0},[]),f=i.useCallback(function(p){u(p.type,co(p),p.target,c(p,e.lockRef.current))},[]),h=i.useCallback(function(p){u(p.type,ct(p),p.target,c(p,e.lockRef.current))},[]);i.useEffect(function(){return Le.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ne),document.addEventListener("touchmove",l,Ne),document.addEventListener("touchstart",d,Ne),function(){Le=Le.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,Ne),document.removeEventListener("touchmove",l,Ne),document.removeEventListener("touchstart",d,Ne)}},[]);var v=e.removeScrollBar,g=e.inert;return i.createElement(i.Fragment,null,g?i.createElement(s,{styles:aa(r)}):null,v?i.createElement(Qi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ua(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const da=$i(Do,la);var At=i.forwardRef(function(e,t){return i.createElement(Mt,le({},e,{ref:t,sideCar:da}))});At.classNames=Mt.classNames;var fa=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ke=new WeakMap,lt=new WeakMap,ut={},on=0,Fo=function(e){return e&&(e.host||Fo(e.parentNode))},pa=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Fo(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ma=function(e,t,n,o){var r=pa(t,Array.isArray(e)?e:[e]);ut[n]||(ut[n]=new WeakMap);var s=ut[n],a=[],c=new Set,l=new Set(r),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))d(h);else try{var v=h.getAttribute(o),g=v!==null&&v!=="false",p=(ke.get(h)||0)+1,w=(s.get(h)||0)+1;ke.set(h,p),s.set(h,w),a.push(h),p===1&&g&<.set(h,!0),w===1&&h.setAttribute(n,"true"),g||h.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return d(t),c.clear(),on++,function(){a.forEach(function(f){var h=ke.get(f)-1,v=s.get(f)-1;ke.set(f,h),s.set(f,v),h||(lt.has(f)||f.removeAttribute(o),lt.delete(f)),v||f.removeAttribute(n)}),on--,on||(ke=new WeakMap,ke=new WeakMap,lt=new WeakMap,ut={})}},En=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=fa(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),ma(o,r,n,"aria-hidden")):function(){return null}},_t="Dialog",[$o]=ye(_t),[ha,ce]=$o(_t),Bo=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[u,d]=et({prop:o,defaultProp:r??!1,onChange:s,caller:_t});return m.jsx(ha,{scope:t,triggerRef:c,contentRef:l,contentId:ge(),titleId:ge(),descriptionId:ge(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};Bo.displayName=_t;var Ho="DialogTrigger",va=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=ce(Ho,n),s=$(t,r.triggerRef);return m.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Tn(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});va.displayName=Ho;var Rn="DialogPortal",[ga,Wo]=$o(Rn,{forceMount:void 0}),Uo=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=ce(Rn,t);return m.jsx(ga,{scope:t,forceMount:n,children:i.Children.map(o,a=>m.jsx(oe,{present:n||s.open,children:m.jsx(Ue,{asChild:!0,container:r,children:a})}))})};Uo.displayName=Rn;var ht="DialogOverlay",Vo=i.forwardRef((e,t)=>{const n=Wo(ht,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=ce(ht,e.__scopeDialog);return s.modal?m.jsx(oe,{present:o||s.open,children:m.jsx(xa,{...r,ref:t})}):null});Vo.displayName=ht;var wa=$e("DialogOverlay.RemoveScroll"),xa=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=ce(ht,n);return m.jsx(At,{as:wa,allowPinchZoom:!0,shards:[r.contentRef],children:m.jsx(D.div,{"data-state":Tn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ae="DialogContent",Ko=i.forwardRef((e,t)=>{const n=Wo(Ae,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=ce(Ae,e.__scopeDialog);return m.jsx(oe,{present:o||s.open,children:s.modal?m.jsx(ya,{...r,ref:t}):m.jsx(Ca,{...r,ref:t})})});Ko.displayName=Ae;var ya=i.forwardRef((e,t)=>{const n=ce(Ae,e.__scopeDialog),o=i.useRef(null),r=$(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return En(s)},[]),m.jsx(Go,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),Ca=i.forwardRef((e,t)=>{const n=ce(Ae,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return m.jsx(Go,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Go=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=ce(Ae,n),l=i.useRef(null),u=$(t,l);return Sn(),m.jsxs(m.Fragment,{children:[m.jsx(Tt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:m.jsx(We,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Tn(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(ba,{titleId:c.titleId}),m.jsx(Ea,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Pn="DialogTitle",zo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=ce(Pn,n);return m.jsx(D.h2,{id:r.titleId,...o,ref:t})});zo.displayName=Pn;var Yo="DialogDescription",Xo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=ce(Yo,n);return m.jsx(D.p,{id:r.descriptionId,...o,ref:t})});Xo.displayName=Yo;var qo="DialogClose",Zo=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=ce(qo,n);return m.jsx(D.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Zo.displayName=qo;function Tn(e){return e?"open":"closed"}var Qo="DialogTitleWarning",[sd,Jo]=Qs(Qo,{contentName:Ae,titleName:Pn,docsSlug:"dialog"}),ba=({titleId:e})=>{const t=Jo(Qo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Sa="DialogDescriptionWarning",Ea=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jo(Sa).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},id=Bo,ad=Uo,cd=Vo,ld=Ko,ud=zo,dd=Xo,fd=Zo;function uo(e,[t,n]){return Math.min(n,Math.max(t,e))}function Mn(e){const t=e+"CollectionProvider",[n,o]=ye(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:w,children:x}=p,y=Me.useRef(null),C=Me.useRef(new Map).current;return m.jsx(r,{scope:w,itemMap:C,collectionRef:y,children:x})};a.displayName=t;const c=e+"CollectionSlot",l=$e(c),u=Me.forwardRef((p,w)=>{const{scope:x,children:y}=p,C=s(c,x),b=$(w,C.collectionRef);return m.jsx(l,{ref:b,children:y})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=$e(d),v=Me.forwardRef((p,w)=>{const{scope:x,children:y,...C}=p,b=Me.useRef(null),S=$(w,b),M=s(d,x);return Me.useEffect(()=>(M.itemMap.set(b,{ref:b,...C}),()=>void M.itemMap.delete(b))),m.jsx(h,{[f]:"",ref:S,children:y})});v.displayName=d;function g(p){const w=s(e+"CollectionConsumer",p);return Me.useCallback(()=>{const y=w.collectionRef.current;if(!y)return[];const C=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((M,E)=>C.indexOf(M.ref.current)-C.indexOf(E.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:v},g,o]}var Ra=i.createContext(void 0);function er(e){const t=i.useContext(Ra);return e||t||"ltr"}const tr=["top","right","bottom","left"],fo=["start","end"],pd=tr.reduce((e,t)=>e.concat(t,t+"-"+fo[0],t+"-"+fo[1]),[]),be=Math.min,Q=Math.max,vt=Math.round,dt=Math.floor,de=e=>({x:e,y:e}),Pa={left:"right",right:"left",bottom:"top",top:"bottom"},Ta={start:"end",end:"start"};function dn(e,t,n){return Q(e,be(t,n))}function we(e,t){return typeof e=="function"?e(t):e}function xe(e){return e.split("-")[0]}function Ve(e){return e.split("-")[1]}function An(e){return e==="x"?"y":"x"}function _n(e){return e==="y"?"height":"width"}const Ma=new Set(["top","bottom"]);function ue(e){return Ma.has(xe(e))?"y":"x"}function In(e){return An(ue(e))}function Aa(e,t,n){n===void 0&&(n=!1);const o=Ve(e),r=In(e),s=_n(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=gt(a)),[a,gt(a)]}function _a(e){const t=gt(e);return[fn(e),t,fn(t)]}function fn(e){return e.replace(/start|end/g,t=>Ta[t])}const po=["left","right"],mo=["right","left"],Ia=["top","bottom"],Oa=["bottom","top"];function Da(e,t,n){switch(e){case"top":case"bottom":return n?t?mo:po:t?po:mo;case"left":case"right":return t?Ia:Oa;default:return[]}}function Na(e,t,n,o){const r=Ve(e);let s=Da(xe(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(fn)))),s}function gt(e){return e.replace(/left|right|bottom|top/g,t=>Pa[t])}function La(e){return{top:0,right:0,bottom:0,left:0,...e}}function nr(e){return typeof e!="number"?La(e):{top:e,right:e,bottom:e,left:e}}function wt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ho(e,t,n){let{reference:o,floating:r}=e;const s=ue(t),a=In(t),c=_n(a),l=xe(t),u=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let v;switch(l){case"top":v={x:d,y:o.y-r.height};break;case"bottom":v={x:d,y:o.y+o.height};break;case"right":v={x:o.x+o.width,y:f};break;case"left":v={x:o.x-r.width,y:f};break;default:v={x:o.x,y:o.y}}switch(Ve(t)){case"start":v[a]-=h*(n&&u?-1:1);break;case"end":v[a]+=h*(n&&u?-1:1);break}return v}const ka=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=ho(u,o,l),h=o,v={},g=0;for(let p=0;p<c.length;p++){const{name:w,fn:x}=c[p],{x:y,y:C,data:b,reset:S}=await x({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:v,rects:u,platform:a,elements:{reference:e,floating:t}});d=y??d,f=C??f,v={...v,[w]:{...v[w],...b}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:d,y:f}=ho(u,h,l)),p=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:v}};async function Xe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:v=0}=we(t,e),g=nr(v),w=c[h?f==="floating"?"reference":"floating":f],x=wt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},S=wt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:C,strategy:l}):y);return{top:(x.top-S.top+g.top)/b.y,bottom:(S.bottom-x.bottom+g.bottom)/b.y,left:(x.left-S.left+g.left)/b.x,right:(S.right-x.right+g.right)/b.x}}const ja=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=we(e,t)||{};if(u==null)return{};const f=nr(d),h={x:n,y:o},v=In(r),g=_n(v),p=await a.getDimensions(u),w=v==="y",x=w?"top":"left",y=w?"bottom":"right",C=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[v]-h[v]-s.floating[g],S=h[v]-s.reference[v],M=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=M?M[C]:0;(!E||!await(a.isElement==null?void 0:a.isElement(M)))&&(E=c.floating[C]||s.floating[g]);const A=b/2-S/2,L=E/2-p[g]/2-1,I=be(f[x],L),N=be(f[y],L),j=I,F=E-p[g]-N,k=E/2-p[g]/2+A,H=dn(j,k,F),O=!l.arrow&&Ve(r)!=null&&k!==H&&s.reference[g]/2-(k<j?I:N)-p[g]/2<0,B=O?k<j?k-j:k-F:0;return{[v]:h[v]+B,data:{[v]:H,centerOffset:k-H-B,...O&&{alignmentOffset:B}},reset:O}}}),Fa=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=we(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=xe(r),y=ue(c),C=xe(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(C||!p?[gt(c)]:_a(c)),M=g!=="none";!h&&M&&S.push(...Na(c,p,g,b));const E=[c,...S],A=await Xe(t,w),L=[];let I=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&L.push(A[x]),f){const k=Aa(r,a,b);L.push(A[k[0]],A[k[1]])}if(I=[...I,{placement:r,overflows:L}],!L.every(k=>k<=0)){var N,j;const k=(((N=s.flip)==null?void 0:N.index)||0)+1,H=E[k];if(H&&(!(f==="alignment"?y!==ue(H):!1)||I.every(_=>ue(_.placement)===y?_.overflows[0]>0:!0)))return{data:{index:k,overflows:I},reset:{placement:H}};let O=(j=I.filter(B=>B.overflows[0]<=0).sort((B,_)=>B.overflows[1]-_.overflows[1])[0])==null?void 0:j.placement;if(!O)switch(v){case"bestFit":{var F;const B=(F=I.filter(_=>{if(M){const P=ue(_.placement);return P===y||P==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(P=>P>0).reduce((P,K)=>P+K,0)]).sort((_,P)=>_[1]-P[1])[0])==null?void 0:F[0];B&&(O=B);break}case"initialPlacement":O=c;break}if(r!==O)return{reset:{placement:O}}}return{}}}};function vo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function go(e){return tr.some(t=>e[t]>=0)}const $a=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=we(e,t);switch(o){case"referenceHidden":{const s=await Xe(t,{...r,elementContext:"reference"}),a=vo(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:go(a)}}}case"escaped":{const s=await Xe(t,{...r,altBoundary:!0}),a=vo(s,n.floating);return{data:{escapedOffsets:a,escaped:go(a)}}}default:return{}}}}},or=new Set(["left","top"]);async function Ba(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=xe(n),c=Ve(n),l=ue(n)==="y",u=or.has(a)?-1:1,d=s&&l?-1:1,f=we(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof g=="number"&&(v=c==="end"?g*-1:g),l?{x:v*d,y:h*u}:{x:h*u,y:v*d}}const Ha=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,l=await Ba(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:a}}}}},Wa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x,y}=w;return{x,y}}},...l}=we(e,t),u={x:n,y:o},d=await Xe(t,l),f=ue(xe(r)),h=An(f);let v=u[h],g=u[f];if(s){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=v+d[w],C=v-d[x];v=dn(y,v,C)}if(a){const w=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+d[w],C=g-d[x];g=dn(y,g,C)}const p=c.fn({...t,[h]:v,[f]:g});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[h]:s,[f]:a}}}}}},Ua=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=we(e,t),d={x:n,y:o},f=ue(r),h=An(f);let v=d[h],g=d[f];const p=we(c,t),w=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=h==="y"?"height":"width",b=s.reference[h]-s.floating[C]+w.mainAxis,S=s.reference[h]+s.reference[C]-w.mainAxis;v<b?v=b:v>S&&(v=S)}if(u){var x,y;const C=h==="y"?"width":"height",b=or.has(xe(r)),S=s.reference[f]-s.floating[C]+(b&&((x=a.offset)==null?void 0:x[f])||0)+(b?0:w.crossAxis),M=s.reference[f]+s.reference[C]+(b?0:((y=a.offset)==null?void 0:y[f])||0)-(b?w.crossAxis:0);g<S?g=S:g>M&&(g=M)}return{[h]:v,[f]:g}}}},Va=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:l=()=>{},...u}=we(e,t),d=await Xe(t,u),f=xe(r),h=Ve(r),v=ue(r)==="y",{width:g,height:p}=s.floating;let w,x;f==="top"||f==="bottom"?(w=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(x=f,w=h==="end"?"top":"bottom");const y=p-d.top-d.bottom,C=g-d.left-d.right,b=be(p-d[w],y),S=be(g-d[x],C),M=!t.middlewareData.shift;let E=b,A=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=y),M&&!h){const I=Q(d.left,0),N=Q(d.right,0),j=Q(d.top,0),F=Q(d.bottom,0);v?A=g-2*(I!==0||N!==0?I+N:Q(d.left,d.right)):E=p-2*(j!==0||F!==0?j+F:Q(d.top,d.bottom))}await l({...t,availableWidth:A,availableHeight:E});const L=await a.getDimensions(c.floating);return g!==L.width||p!==L.height?{reset:{rects:!0}}:{}}}};function It(){return typeof window<"u"}function Ke(e){return rr(e)?(e.nodeName||"").toLowerCase():"#document"}function J(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function me(e){var t;return(t=(rr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rr(e){return It()?e instanceof Node||e instanceof J(e).Node:!1}function ie(e){return It()?e instanceof Element||e instanceof J(e).Element:!1}function pe(e){return It()?e instanceof HTMLElement||e instanceof J(e).HTMLElement:!1}function wo(e){return!It()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof J(e).ShadowRoot}const Ka=new Set(["inline","contents"]);function tt(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Ka.has(r)}const Ga=new Set(["table","td","th"]);function za(e){return Ga.has(Ke(e))}const Ya=[":popover-open",":modal"];function Ot(e){return Ya.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xa=["transform","translate","scale","rotate","perspective"],qa=["transform","translate","scale","rotate","perspective","filter"],Za=["paint","layout","strict","content"];function On(e){const t=Dn(),n=ie(e)?ae(e):e;return Xa.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||qa.some(o=>(n.willChange||"").includes(o))||Za.some(o=>(n.contain||"").includes(o))}function Qa(e){let t=Se(e);for(;pe(t)&&!Be(t);){if(On(t))return t;if(Ot(t))return null;t=Se(t)}return null}function Dn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ja=new Set(["html","body","#document"]);function Be(e){return Ja.has(Ke(e))}function ae(e){return J(e).getComputedStyle(e)}function Dt(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Se(e){if(Ke(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wo(e)&&e.host||me(e);return wo(t)?t.host:t}function sr(e){const t=Se(e);return Be(t)?e.ownerDocument?e.ownerDocument.body:e.body:pe(t)&&tt(t)?t:sr(t)}function qe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=sr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=J(r);if(s){const c=pn(a);return t.concat(a,a.visualViewport||[],tt(r)?r:[],c&&n?qe(c):[])}return t.concat(r,qe(r,[],n))}function pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ir(e){const t=ae(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=pe(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=vt(n)!==s||vt(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function Nn(e){return ie(e)?e:e.contextElement}function Fe(e){const t=Nn(e);if(!pe(t))return de(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=ir(t);let a=(s?vt(n.width):n.width)/o,c=(s?vt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const ec=de(0);function ar(e){const t=J(e);return!Dn()||!t.visualViewport?ec:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==J(e)?!1:t}function _e(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Nn(e);let a=de(1);t&&(o?ie(o)&&(a=Fe(o)):a=Fe(e));const c=tc(s,n,o)?ar(s):de(0);let l=(r.left+c.x)/a.x,u=(r.top+c.y)/a.y,d=r.width/a.x,f=r.height/a.y;if(s){const h=J(s),v=o&&ie(o)?J(o):o;let g=h,p=pn(g);for(;p&&o&&v!==g;){const w=Fe(p),x=p.getBoundingClientRect(),y=ae(p),C=x.left+(p.clientLeft+parseFloat(y.paddingLeft))*w.x,b=x.top+(p.clientTop+parseFloat(y.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,f*=w.y,l+=C,u+=b,g=J(p),p=pn(g)}}return wt({width:d,height:f,x:l,y:u})}function Nt(e,t){const n=Dt(e).scrollLeft;return t?t.left+n:_e(me(e)).left+n}function cr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Nt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function nc(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=me(o),c=t?Ot(t.floating):!1;if(o===a||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=de(1);const d=de(0),f=pe(o);if((f||!f&&!s)&&((Ke(o)!=="body"||tt(a))&&(l=Dt(o)),pe(o))){const v=_e(o);u=Fe(o),d.x=v.x+o.clientLeft,d.y=v.y+o.clientTop}const h=a&&!f&&!s?cr(a,l):de(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function oc(e){return Array.from(e.getClientRects())}function rc(e){const t=me(e),n=Dt(e),o=e.ownerDocument.body,r=Q(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Q(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Nt(e);const c=-n.scrollTop;return ae(o).direction==="rtl"&&(a+=Q(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:c}}const xo=25;function sc(e,t){const n=J(e),o=me(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,l=0;if(r){s=r.width,a=r.height;const d=Dn();(!d||d&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const u=Nt(o);if(u<=0){const d=o.ownerDocument,f=d.body,h=getComputedStyle(f),v=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(o.clientWidth-f.clientWidth-v);g<=xo&&(s-=g)}else u<=xo&&(s+=u);return{width:s,height:a,x:c,y:l}}const ic=new Set(["absolute","fixed"]);function ac(e,t){const n=_e(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=pe(e)?Fe(e):de(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:a,height:c,x:l,y:u}}function yo(e,t,n){let o;if(t==="viewport")o=sc(e,n);else if(t==="document")o=rc(me(e));else if(ie(t))o=ac(t,n);else{const r=ar(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return wt(o)}function lr(e,t){const n=Se(e);return n===t||!ie(n)||Be(n)?!1:ae(n).position==="fixed"||lr(n,t)}function cc(e,t){const n=t.get(e);if(n)return n;let o=qe(e,[],!1).filter(c=>ie(c)&&Ke(c)!=="body"),r=null;const s=ae(e).position==="fixed";let a=s?Se(e):e;for(;ie(a)&&!Be(a);){const c=ae(a),l=On(a);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&ic.has(r.position)||tt(a)&&!l&&lr(e,a))?o=o.filter(d=>d!==a):r=c,a=Se(a)}return t.set(e,o),o}function lc(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Ot(t)?[]:cc(t,this._c):[].concat(n),o],c=a[0],l=a.reduce((u,d)=>{const f=yo(t,d,r);return u.top=Q(f.top,u.top),u.right=be(f.right,u.right),u.bottom=be(f.bottom,u.bottom),u.left=Q(f.left,u.left),u},yo(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function uc(e){const{width:t,height:n}=ir(e);return{width:t,height:n}}function dc(e,t,n){const o=pe(t),r=me(t),s=n==="fixed",a=_e(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=de(0);function u(){l.x=Nt(r)}if(o||!o&&!s)if((Ke(t)!=="body"||tt(r))&&(c=Dt(t)),o){const v=_e(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else r&&u();s&&!o&&r&&u();const d=r&&!o&&!s?cr(r,c):de(0),f=a.left+c.scrollLeft-l.x-d.x,h=a.top+c.scrollTop-l.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function rn(e){return ae(e).position==="static"}function Co(e,t){if(!pe(e)||ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return me(e)===n&&(n=n.ownerDocument.body),n}function ur(e,t){const n=J(e);if(Ot(e))return n;if(!pe(e)){let r=Se(e);for(;r&&!Be(r);){if(ie(r)&&!rn(r))return r;r=Se(r)}return n}let o=Co(e,t);for(;o&&za(o)&&rn(o);)o=Co(o,t);return o&&Be(o)&&rn(o)&&!On(o)?n:o||Qa(e)||n}const fc=async function(e){const t=this.getOffsetParent||ur,n=this.getDimensions,o=await n(e.floating);return{reference:dc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pc(e){return ae(e).direction==="rtl"}const mc={convertOffsetParentRelativeRectToViewportRelativeRect:nc,getDocumentElement:me,getClippingRect:lc,getOffsetParent:ur,getElementRects:fc,getClientRects:oc,getDimensions:uc,getScale:Fe,isElement:ie,isRTL:pc};function dr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hc(e,t){let n=null,o;const r=me(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:v}=u;if(c||t(),!h||!v)return;const g=dt(f),p=dt(r.clientWidth-(d+h)),w=dt(r.clientHeight-(f+v)),x=dt(d),C={rootMargin:-g+"px "+-p+"px "+-w+"px "+-x+"px",threshold:Q(0,be(1,l))||1};let b=!0;function S(M){const E=M[0].intersectionRatio;if(E!==l){if(!b)return a();E?a(!1,E):o=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!dr(u,e.getBoundingClientRect())&&a(),b=!1}try{n=new IntersectionObserver(S,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return a(!0),s}function vc(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Nn(e),d=r||s?[...u?qe(u):[],...qe(t)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=u&&c?hc(u,n):null;let h=-1,v=null;a&&(v=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let g,p=l?_e(e):null;l&&w();function w(){const x=_e(e);p&&!dr(p,x)&&n(),p=x,g=requestAnimationFrame(w)}return n(),()=>{var x;d.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f?.(),(x=v)==null||x.disconnect(),v=null,l&&cancelAnimationFrame(g)}}const gc=Ha,wc=Wa,xc=Fa,yc=Va,Cc=$a,bo=ja,bc=Ua,Sc=(e,t,n)=>{const o=new Map,r={platform:mc,...n},s={...r.platform,_c:o};return ka(e,t,{...r,platform:s})};var Ec=typeof document<"u",Rc=function(){},mt=Ec?i.useLayoutEffect:Rc;function xt(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!xt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!xt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function fr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function So(e,t){const n=fr(e);return Math.round(t*n)/n}function sn(e){const t=i.useRef(e);return mt(()=>{t.current=e}),t}function Pc(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=i.useState(o);xt(h,o)||v(o);const[g,p]=i.useState(null),[w,x]=i.useState(null),y=i.useCallback(_=>{_!==M.current&&(M.current=_,p(_))},[]),C=i.useCallback(_=>{_!==E.current&&(E.current=_,x(_))},[]),b=s||g,S=a||w,M=i.useRef(null),E=i.useRef(null),A=i.useRef(d),L=l!=null,I=sn(l),N=sn(r),j=sn(u),F=i.useCallback(()=>{if(!M.current||!E.current)return;const _={placement:t,strategy:n,middleware:h};N.current&&(_.platform=N.current),Sc(M.current,E.current,_).then(P=>{const K={...P,isPositioned:j.current!==!1};k.current&&!xt(A.current,K)&&(A.current=K,Rt.flushSync(()=>{f(K)}))})},[h,t,n,N,j]);mt(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,f(_=>({..._,isPositioned:!1})))},[u]);const k=i.useRef(!1);mt(()=>(k.current=!0,()=>{k.current=!1}),[]),mt(()=>{if(b&&(M.current=b),S&&(E.current=S),b&&S){if(I.current)return I.current(b,S,F);F()}},[b,S,F,I,L]);const H=i.useMemo(()=>({reference:M,floating:E,setReference:y,setFloating:C}),[y,C]),O=i.useMemo(()=>({reference:b,floating:S}),[b,S]),B=i.useMemo(()=>{const _={position:n,left:0,top:0};if(!O.floating)return _;const P=So(O.floating,d.x),K=So(O.floating,d.y);return c?{..._,transform:"translate("+P+"px, "+K+"px)",...fr(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:K}},[n,c,O.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:F,refs:H,elements:O,floatingStyles:B}),[d,F,H,O,B])}const Tc=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?bo({element:o.current,padding:r}).fn(n):{}:o?bo({element:o,padding:r}).fn(n):{}}}},Mc=(e,t)=>({...gc(e),options:[e,t]}),Ac=(e,t)=>({...wc(e),options:[e,t]}),_c=(e,t)=>({...bc(e),options:[e,t]}),Ic=(e,t)=>({...xc(e),options:[e,t]}),Oc=(e,t)=>({...yc(e),options:[e,t]}),Dc=(e,t)=>({...Cc(e),options:[e,t]}),Nc=(e,t)=>({...Tc(e),options:[e,t]});var Lc="Arrow",pr=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return m.jsx(D.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});pr.displayName=Lc;var kc=pr;function jc(e){const[t,n]=i.useState(void 0);return z(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ln="Popper",[mr,Ee]=ye(Ln),[Fc,hr]=mr(Ln),vr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return m.jsx(Fc,{scope:t,anchor:o,onAnchorChange:r,children:n})};vr.displayName=Ln;var gr="PopperAnchor",wr=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=hr(gr,n),a=i.useRef(null),c=$(t,a),l=i.useRef(null);return i.useEffect(()=>{const u=l.current;l.current=o?.current||a.current,u!==l.current&&s.onAnchorChange(l.current)}),o?null:m.jsx(D.div,{...r,ref:c})});wr.displayName=gr;var kn="PopperContent",[$c,Bc]=mr(kn),xr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:g,...p}=e,w=hr(kn,n),[x,y]=i.useState(null),C=$(t,T=>y(T)),[b,S]=i.useState(null),M=jc(b),E=M?.width??0,A=M?.height??0,L=o+(s!=="center"?"-"+s:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(u)?u:[u],j=N.length>0,F={padding:I,boundary:N.filter(Wc),altBoundary:j},{refs:k,floatingStyles:H,placement:O,isPositioned:B,middlewareData:_}=Pc({strategy:"fixed",placement:L,whileElementsMounted:(...T)=>vc(...T,{animationFrame:v==="always"}),elements:{reference:w.anchor},middleware:[Mc({mainAxis:r+A,alignmentAxis:a}),l&&Ac({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?_c():void 0,...F}),l&&Ic({...F}),Oc({...F,apply:({elements:T,rects:W,availableWidth:X,availableHeight:U})=>{const{width:V,height:G}=W.reference,te=T.floating.style;te.setProperty("--radix-popper-available-width",`${X}px`),te.setProperty("--radix-popper-available-height",`${U}px`),te.setProperty("--radix-popper-anchor-width",`${V}px`),te.setProperty("--radix-popper-anchor-height",`${G}px`)}}),b&&Nc({element:b,padding:c}),Uc({arrowWidth:E,arrowHeight:A}),h&&Dc({strategy:"referenceHidden",...F})]}),[P,K]=br(O),Y=fe(g);z(()=>{B&&Y?.()},[B,Y]);const re=_.arrow?.x,he=_.arrow?.y,ee=_.arrow?.centerOffset!==0,[ve,Z]=i.useState();return z(()=>{x&&Z(window.getComputedStyle(x).zIndex)},[x]),m.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx($c,{scope:n,placedSide:P,onArrowChange:S,arrowX:re,arrowY:he,shouldHideArrow:ee,children:m.jsx(D.div,{"data-side":P,"data-align":K,...p,ref:C,style:{...p.style,animation:B?void 0:"none"}})})})});xr.displayName=kn;var yr="PopperArrow",Hc={top:"bottom",right:"left",bottom:"top",left:"right"},Cr=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Bc(yr,o),a=Hc[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(kc,{...r,ref:n,style:{...r.style,display:"block"}})})});Cr.displayName=yr;function Wc(e){return e!==null}var Uc=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=br(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+l/2;let g="",p="";return u==="bottom"?(g=a?f:`${h}px`,p=`${-l}px`):u==="top"?(g=a?f:`${h}px`,p=`${o.floating.height+l}px`):u==="right"?(g=`${-l}px`,p=a?f:`${v}px`):u==="left"&&(g=`${o.floating.width+l}px`,p=a?f:`${v}px`),{data:{x:g,y:p}}}});function br(e){const[t,n="center"]=e.split("-");return[t,n]}var jn=vr,Lt=wr,kt=xr,jt=Cr;function Vc(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Sr=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"}),Kc="VisuallyHidden",Er=i.forwardRef((e,t)=>m.jsx(D.span,{...e,ref:t,style:{...Sr,...e.style}}));Er.displayName=Kc;var Gc=Er,zc=[" ","Enter","ArrowUp","ArrowDown"],Yc=[" ","Enter"],Ft="Select",[Fn,$t,Xc]=Mn(Ft),[Ge]=ye(Ft,[Xc,Ee]),$n=Ee(),[md,Re]=Ge(Ft),[hd,qc]=Ge(Ft),Rr="SelectTrigger",Pr=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=$n(n),a=Re(Rr,n),c=a.disabled||o,l=$(t,a.onTriggerChange),u=$t(n),d=i.useRef("touch"),[f,h,v]=Yr(p=>{const w=u().filter(C=>!C.disabled),x=w.find(C=>C.value===a.value),y=Xr(w,p,x);y!==void 0&&a.onValueChange(y.value)}),g=p=>{c||(a.onOpenChange(!0),v()),p&&(a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return m.jsx(Lt,{asChild:!0,...s,children:m.jsx(D.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":zr(a.value)?"":void 0,...r,ref:l,onClick:R(r.onClick,p=>{p.currentTarget.focus(),d.current!=="mouse"&&g(p)}),onPointerDown:R(r.onPointerDown,p=>{d.current=p.pointerType;const w=p.target;w.hasPointerCapture(p.pointerId)&&w.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(g(p),p.preventDefault())}),onKeyDown:R(r.onKeyDown,p=>{const w=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&h(p.key),!(w&&p.key===" ")&&zc.includes(p.key)&&(g(),p.preventDefault())})})})});Pr.displayName=Rr;var Tr="SelectValue",Zc=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...c}=e,l=Re(Tr,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=$(t,l.onValueNodeChange);return z(()=>{u(d)},[u,d]),m.jsx(D.span,{...c,ref:f,style:{pointerEvents:"none"},children:zr(l.value)?m.jsx(m.Fragment,{children:a}):s})});Zc.displayName=Tr;var Qc="SelectIcon",Mr=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return m.jsx(D.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Mr.displayName=Qc;var Jc="SelectPortal",Ar=e=>m.jsx(Ue,{asChild:!0,...e});Ar.displayName=Jc;var Ie="SelectContent",_r=i.forwardRef((e,t)=>{const n=Re(Ie,e.__scopeSelect),[o,r]=i.useState();if(z(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Rt.createPortal(m.jsx(Ir,{scope:e.__scopeSelect,children:m.jsx(Fn.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),s):null}return m.jsx(Or,{...e,ref:t})});_r.displayName=Ie;var se=10,[Ir,Pe]=Ge(Ie),el="SelectContentImpl",tl=$e("SelectContent.RemoveScroll"),Or=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:p,avoidCollisions:w,...x}=e,y=Re(Ie,n),[C,b]=i.useState(null),[S,M]=i.useState(null),E=$(t,T=>b(T)),[A,L]=i.useState(null),[I,N]=i.useState(null),j=$t(n),[F,k]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(C)return En(C)},[C]),Sn();const O=i.useCallback(T=>{const[W,...X]=j().map(G=>G.ref.current),[U]=X.slice(-1),V=document.activeElement;for(const G of T)if(G===V||(G?.scrollIntoView({block:"nearest"}),G===W&&S&&(S.scrollTop=0),G===U&&S&&(S.scrollTop=S.scrollHeight),G?.focus(),document.activeElement!==V))return},[j,S]),B=i.useCallback(()=>O([A,C]),[O,A,C]);i.useEffect(()=>{F&&B()},[F,B]);const{onOpenChange:_,triggerPointerDownPosRef:P}=y;i.useEffect(()=>{if(C){let T={x:0,y:0};const W=U=>{T={x:Math.abs(Math.round(U.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(U.pageY)-(P.current?.y??0))}},X=U=>{T.x<=10&&T.y<=10?U.preventDefault():C.contains(U.target)||_(!1),document.removeEventListener("pointermove",W),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",X,{capture:!0})}}},[C,_,P]),i.useEffect(()=>{const T=()=>_(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[_]);const[K,Y]=Yr(T=>{const W=j().filter(V=>!V.disabled),X=W.find(V=>V.ref.current===document.activeElement),U=Xr(W,T,X);U&&setTimeout(()=>U.ref.current.focus())}),re=i.useCallback((T,W,X)=>{const U=!H.current&&!X;(y.value!==void 0&&y.value===W||U)&&(L(T),U&&(H.current=!0))},[y.value]),he=i.useCallback(()=>C?.focus(),[C]),ee=i.useCallback((T,W,X)=>{const U=!H.current&&!X;(y.value!==void 0&&y.value===W||U)&&N(T)},[y.value]),ve=o==="popper"?mn:Dr,Z=ve===mn?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:v,sticky:g,hideWhenDetached:p,avoidCollisions:w}:{};return m.jsx(Ir,{scope:n,content:C,viewport:S,onViewportChange:M,itemRefCallback:re,selectedItem:A,onItemLeave:he,itemTextRefCallback:ee,focusSelectedItem:B,selectedItemText:I,position:o,isPositioned:F,searchRef:K,children:m.jsx(At,{as:tl,allowPinchZoom:!0,children:m.jsx(Tt,{asChild:!0,trapped:y.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:R(r,T=>{y.trigger?.focus({preventScroll:!0}),T.preventDefault()}),children:m.jsx(We,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:m.jsx(ve,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:T=>T.preventDefault(),...x,...Z,onPlaced:()=>k(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:R(x.onKeyDown,T=>{const W=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!W&&T.key.length===1&&Y(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let U=j().filter(V=>!V.disabled).map(V=>V.ref.current);if(["ArrowUp","End"].includes(T.key)&&(U=U.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const V=T.target,G=U.indexOf(V);U=U.slice(G+1)}setTimeout(()=>O(U)),T.preventDefault()}})})})})})})});Or.displayName=el;var nl="SelectItemAlignedPosition",Dr=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Re(Ie,n),a=Pe(Ie,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=$(t,E=>d(E)),h=$t(n),v=i.useRef(!1),g=i.useRef(!0),{viewport:p,selectedItem:w,selectedItemText:x,focusSelectedItem:y}=a,C=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&p&&w&&x){const E=s.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),L=s.valueNode.getBoundingClientRect(),I=x.getBoundingClientRect();if(s.dir!=="rtl"){const V=I.left-A.left,G=L.left-V,te=E.left-G,Te=E.width+te,Yt=Math.max(Te,A.width),Xt=window.innerWidth-se,qt=uo(G,[se,Math.max(se,Xt-Yt)]);c.style.minWidth=Te+"px",c.style.left=qt+"px"}else{const V=A.right-I.right,G=window.innerWidth-L.right-V,te=window.innerWidth-E.right-G,Te=E.width+te,Yt=Math.max(Te,A.width),Xt=window.innerWidth-se,qt=uo(G,[se,Math.max(se,Xt-Yt)]);c.style.minWidth=Te+"px",c.style.right=qt+"px"}const N=h(),j=window.innerHeight-se*2,F=p.scrollHeight,k=window.getComputedStyle(u),H=parseInt(k.borderTopWidth,10),O=parseInt(k.paddingTop,10),B=parseInt(k.borderBottomWidth,10),_=parseInt(k.paddingBottom,10),P=H+O+F+_+B,K=Math.min(w.offsetHeight*5,P),Y=window.getComputedStyle(p),re=parseInt(Y.paddingTop,10),he=parseInt(Y.paddingBottom,10),ee=E.top+E.height/2-se,ve=j-ee,Z=w.offsetHeight/2,T=w.offsetTop+Z,W=H+O+T,X=P-W;if(W<=ee){const V=N.length>0&&w===N[N.length-1].ref.current;c.style.bottom="0px";const G=u.clientHeight-p.offsetTop-p.offsetHeight,te=Math.max(ve,Z+(V?he:0)+G+B),Te=W+te;c.style.height=Te+"px"}else{const V=N.length>0&&w===N[0].ref.current;c.style.top="0px";const te=Math.max(ee,H+p.offsetTop+(V?re:0)+Z)+X;c.style.height=te+"px",p.scrollTop=W-ee+p.offsetTop}c.style.margin=`${se}px 0`,c.style.minHeight=K+"px",c.style.maxHeight=j+"px",o?.(),requestAnimationFrame(()=>v.current=!0)}},[h,s.trigger,s.valueNode,c,u,p,w,x,s.dir,o]);z(()=>C(),[C]);const[b,S]=i.useState();z(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const M=i.useCallback(E=>{E&&g.current===!0&&(C(),y?.(),g.current=!1)},[C,y]);return m.jsx(rl,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:M,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:m.jsx(D.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Dr.displayName=nl;var ol="SelectPopperPosition",mn=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=se,...s}=e,a=$n(n);return m.jsx(kt,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.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)"}})});mn.displayName=ol;var[rl,Bn]=Ge(Ie,{}),hn="SelectViewport",Nr=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Pe(hn,n),a=Bn(hn,n),c=$(t,s.onViewportChange),l=i.useRef(0);return m.jsxs(m.Fragment,{children:[m.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:o}),m.jsx(Fn.Slot,{scope:n,children:m.jsx(D.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const v=Math.abs(l.current-d.scrollTop);if(v>0){const g=window.innerHeight-se*2,p=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),x=Math.max(p,w);if(x<g){const y=x+v,C=Math.min(g,y),b=y-C;f.style.height=C+"px",f.style.bottom==="0px"&&(d.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Nr.displayName=hn;var Lr="SelectGroup",[sl,il]=Ge(Lr),al=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ge();return m.jsx(sl,{scope:n,id:r,children:m.jsx(D.div,{role:"group","aria-labelledby":r,...o,ref:t})})});al.displayName=Lr;var kr="SelectLabel",jr=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=il(kr,n);return m.jsx(D.div,{id:r.id,...o,ref:t})});jr.displayName=kr;var yt="SelectItem",[cl,Fr]=Ge(yt),$r=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,c=Re(yt,n),l=Pe(yt,n),u=c.value===o,[d,f]=i.useState(s??""),[h,v]=i.useState(!1),g=$(t,y=>l.itemRefCallback?.(y,o,r)),p=ge(),w=i.useRef("touch"),x=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(cl,{scope:n,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:i.useCallback(y=>{f(C=>C||(y?.textContent??"").trim())},[]),children:m.jsx(Fn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:m.jsx(D.div,{role:"option","aria-labelledby":p,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:g,onFocus:R(a.onFocus,()=>v(!0)),onBlur:R(a.onBlur,()=>v(!1)),onClick:R(a.onClick,()=>{w.current!=="mouse"&&x()}),onPointerUp:R(a.onPointerUp,()=>{w.current==="mouse"&&x()}),onPointerDown:R(a.onPointerDown,y=>{w.current=y.pointerType}),onPointerMove:R(a.onPointerMove,y=>{w.current=y.pointerType,r?l.onItemLeave?.():w.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(a.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:R(a.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(Yc.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});$r.displayName=yt;var ze="SelectItemText",Br=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=Re(ze,n),c=Pe(ze,n),l=Fr(ze,n),u=qc(ze,n),[d,f]=i.useState(null),h=$(t,x=>f(x),l.onItemTextChange,x=>c.itemTextRefCallback?.(x,l.value,l.disabled)),v=d?.textContent,g=i.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:p,onNativeOptionRemove:w}=u;return z(()=>(p(g),()=>w(g)),[p,w,g]),m.jsxs(m.Fragment,{children:[m.jsx(D.span,{id:l.textId,...s,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Rt.createPortal(s.children,a.valueNode):null]})});Br.displayName=ze;var Hr="SelectItemIndicator",Wr=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Fr(Hr,n).isSelected?m.jsx(D.span,{"aria-hidden":!0,...o,ref:t}):null});Wr.displayName=Hr;var vn="SelectScrollUpButton",Ur=i.forwardRef((e,t)=>{const n=Pe(vn,e.__scopeSelect),o=Bn(vn,e.__scopeSelect),[r,s]=i.useState(!1),a=$(t,o.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?m.jsx(Kr,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});Ur.displayName=vn;var gn="SelectScrollDownButton",Vr=i.forwardRef((e,t)=>{const n=Pe(gn,e.__scopeSelect),o=Bn(gn,e.__scopeSelect),[r,s]=i.useState(!1),a=$(t,o.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?m.jsx(Kr,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Vr.displayName=gn;var Kr=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Pe("SelectScrollButton",n),a=i.useRef(null),c=$t(n),l=i.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),z(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),m.jsx(D.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{l()})})}),ll="SelectSeparator",Gr=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return m.jsx(D.div,{"aria-hidden":!0,...o,ref:t})});Gr.displayName=ll;var wn="SelectArrow",ul=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=$n(n),s=Re(wn,n),a=Pe(wn,n);return s.open&&a.position==="popper"?m.jsx(jt,{...r,...o,ref:t}):null});ul.displayName=wn;var dl="SelectBubbleInput",fl=i.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=i.useRef(null),s=$(o,r),a=Vc(t);return i.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(f)}},[a,t]),m.jsx(D.select,{...n,style:{...Sr,...n.style},ref:s,defaultValue:t})});fl.displayName=dl;function zr(e){return e===""||e===void 0}function Yr(e){const t=fe(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(a=>{const c=n.current+a;t(c),(function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Xr(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=pl(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function pl(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var vd=Pr,gd=Mr,wd=Ar,xd=_r,yd=Nr,Cd=jr,bd=$r,Sd=Br,Ed=Wr,Rd=Ur,Pd=Vr,Td=Gr,[Bt]=ye("Tooltip",[Ee]),Ht=Ee(),qr="TooltipProvider",ml=700,xn="tooltip.open",[hl,Hn]=Bt(qr),Zr=e=>{const{__scopeTooltip:t,delayDuration:n=ml,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(hl,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(u=>{c.current=u},[]),disableHoverableContent:r,children:s})};Zr.displayName=qr;var Ze="Tooltip",[vl,nt]=Bt(Ze),Qr=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,l=Hn(Ze,e.__scopeTooltip),u=Ht(t),[d,f]=i.useState(null),h=ge(),v=i.useRef(0),g=a??l.disableHoverableContent,p=c??l.delayDuration,w=i.useRef(!1),[x,y]=et({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(xn))):l.onClose(),s?.(E)},caller:Ze}),C=i.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),b=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,w.current=!1,y(!0)},[y]),S=i.useCallback(()=>{window.clearTimeout(v.current),v.current=0,y(!1)},[y]),M=i.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{w.current=!0,y(!0),v.current=0},p)},[p,y]);return i.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),m.jsx(jn,{...u,children:m.jsx(vl,{scope:t,contentId:h,open:x,stateAttribute:C,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayedRef.current?M():b()},[l.isOpenDelayedRef,M,b]),onTriggerLeave:i.useCallback(()=>{g?S():(window.clearTimeout(v.current),v.current=0)},[S,g]),onOpen:b,onClose:S,disableHoverableContent:g,children:n})})};Qr.displayName=Ze;var yn="TooltipTrigger",Jr=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=nt(yn,n),s=Hn(yn,n),a=Ht(n),c=i.useRef(null),l=$(t,c,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),m.jsx(Lt,{asChild:!0,...a,children:m.jsx(D.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});Jr.displayName=yn;var Wn="TooltipPortal",[gl,wl]=Bt(Wn,{forceMount:void 0}),es=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=nt(Wn,t);return m.jsx(gl,{scope:t,forceMount:n,children:m.jsx(oe,{present:n||s.open,children:m.jsx(Ue,{asChild:!0,container:r,children:o})})})};es.displayName=Wn;var He="TooltipContent",ts=i.forwardRef((e,t)=>{const n=wl(He,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=nt(He,e.__scopeTooltip);return m.jsx(oe,{present:o||a.open,children:a.disableHoverableContent?m.jsx(ns,{side:r,...s,ref:t}):m.jsx(xl,{side:r,...s,ref:t})})}),xl=i.forwardRef((e,t)=>{const n=nt(He,e.__scopeTooltip),o=Hn(He,e.__scopeTooltip),r=i.useRef(null),s=$(t,r),[a,c]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),v=i.useCallback((g,p)=>{const w=g.currentTarget,x={x:g.clientX,y:g.clientY},y=Sl(x,w.getBoundingClientRect()),C=El(x,y),b=Rl(p.getBoundingClientRect()),S=Tl([...C,...b]);c(S),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const g=w=>v(w,d),p=w=>v(w,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",p),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",p)}}},[l,d,v,h]),i.useEffect(()=>{if(a){const g=p=>{const w=p.target,x={x:p.clientX,y:p.clientY},y=l?.contains(w)||d?.contains(w),C=!Pl(x,a);y?h():C&&(h(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,a,u,h]),m.jsx(ns,{...e,ref:s})}),[yl,Cl]=Bt(Ze,{isInside:!1}),bl=ii("TooltipContent"),ns=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=nt(He,n),u=Ht(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(xn,d),()=>document.removeEventListener(xn,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{h.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),m.jsx(We,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:m.jsxs(kt,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(bl,{children:o}),m.jsx(yl,{scope:n,isInside:!0,children:m.jsx(Gc,{id:l.contentId,role:"tooltip",children:r||o})})]})})});ts.displayName=He;var os="TooltipArrow",rs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ht(n);return Cl(os,n).isInside?null:m.jsx(jt,{...r,...o,ref:t})});rs.displayName=os;function Sl(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function El(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Rl(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Pl(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function Tl(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Ml(t)}function Ml(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.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)}var Md=Zr,Ad=Qr,_d=Jr,Id=es,Od=ts,Dd=rs,an,Wt="HoverCard",[ss]=ye(Wt,[Ee]),Ut=Ee(),[Al,Vt]=ss(Wt),is=e=>{const{__scopeHoverCard:t,children:n,open:o,defaultOpen:r,onOpenChange:s,openDelay:a=700,closeDelay:c=300}=e,l=Ut(t),u=i.useRef(0),d=i.useRef(0),f=i.useRef(!1),h=i.useRef(!1),[v,g]=et({prop:o,defaultProp:r??!1,onChange:s,caller:Wt}),p=i.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),a)},[a,g]),w=i.useCallback(()=>{clearTimeout(u.current),!f.current&&!h.current&&(d.current=window.setTimeout(()=>g(!1),c))},[c,g]),x=i.useCallback(()=>g(!1),[g]);return i.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),m.jsx(Al,{scope:t,open:v,onOpenChange:g,onOpen:p,onClose:w,onDismiss:x,hasSelectionRef:f,isPointerDownOnContentRef:h,children:m.jsx(jn,{...l,children:n})})};is.displayName=Wt;var as="HoverCardTrigger",cs=i.forwardRef((e,t)=>{const{__scopeHoverCard:n,...o}=e,r=Vt(as,n),s=Ut(n);return m.jsx(Lt,{asChild:!0,...s,children:m.jsx(D.a,{"data-state":r.open?"open":"closed",...o,ref:t,onPointerEnter:R(e.onPointerEnter,bt(r.onOpen)),onPointerLeave:R(e.onPointerLeave,bt(r.onClose)),onFocus:R(e.onFocus,r.onOpen),onBlur:R(e.onBlur,r.onClose),onTouchStart:R(e.onTouchStart,a=>a.preventDefault())})})});cs.displayName=as;var Un="HoverCardPortal",[_l,Il]=ss(Un,{forceMount:void 0}),ls=e=>{const{__scopeHoverCard:t,forceMount:n,children:o,container:r}=e,s=Vt(Un,t);return m.jsx(_l,{scope:t,forceMount:n,children:m.jsx(oe,{present:n||s.open,children:m.jsx(Ue,{asChild:!0,container:r,children:o})})})};ls.displayName=Un;var Ct="HoverCardContent",us=i.forwardRef((e,t)=>{const n=Il(Ct,e.__scopeHoverCard),{forceMount:o=n.forceMount,...r}=e,s=Vt(Ct,e.__scopeHoverCard);return m.jsx(oe,{present:o||s.open,children:m.jsx(Ol,{"data-state":s.open?"open":"closed",...r,onPointerEnter:R(e.onPointerEnter,bt(s.onOpen)),onPointerLeave:R(e.onPointerLeave,bt(s.onClose)),ref:t})})});us.displayName=Ct;var Ol=i.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,...c}=e,l=Vt(Ct,n),u=Ut(n),d=i.useRef(null),f=$(t,d),[h,v]=i.useState(!1);return i.useEffect(()=>{if(h){const g=document.body;return an=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=an,g.style.webkitUserSelect=an}}},[h]),i.useEffect(()=>{if(d.current){const g=()=>{v(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),i.useEffect(()=>{d.current&&Nl(d.current).forEach(p=>p.setAttribute("tabindex","-1"))}),m.jsx(We,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:R(s,g=>{g.preventDefault()}),onDismiss:l.onDismiss,children:m.jsx(kt,{...u,...c,onPointerDown:R(c.onPointerDown,g=>{g.currentTarget.contains(g.target)&&v(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:f,style:{...c.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)"}})})}),Dl="HoverCardArrow",ds=i.forwardRef((e,t)=>{const{__scopeHoverCard:n,...o}=e,r=Ut(n);return m.jsx(jt,{...r,...o,ref:t})});ds.displayName=Dl;function bt(e){return t=>t.pointerType==="touch"?void 0:e()}function Nl(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var Nd=is,Ld=cs,kd=ls,jd=us,Fd=ds,cn="rovingFocusGroup.onEntryFocus",Ll={bubbles:!1,cancelable:!0},ot="RovingFocusGroup",[Cn,fs,kl]=Mn(ot),[jl,ps]=ye(ot,[kl]),[Fl,$l]=jl(ot),ms=i.forwardRef((e,t)=>m.jsx(Cn.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Cn.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Bl,{...e,ref:t})})}));ms.displayName=ot;var Bl=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=i.useRef(null),v=$(t,h),g=er(s),[p,w]=et({prop:a,defaultProp:c??null,onChange:l,caller:ot}),[x,y]=i.useState(!1),C=fe(u),b=fs(n),S=i.useRef(!1),[M,E]=i.useState(0);return i.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(cn,C),()=>A.removeEventListener(cn,C)},[C]),m.jsx(Fl,{scope:n,orientation:o,dir:g,loop:r,currentTabStopId:p,onItemFocus:i.useCallback(A=>w(A),[w]),onItemShiftTab:i.useCallback(()=>y(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:i.useCallback(()=>E(A=>A-1),[]),children:m.jsx(D.div,{tabIndex:x||M===0?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{S.current=!0}),onFocus:R(e.onFocus,A=>{const L=!S.current;if(A.target===A.currentTarget&&L&&!x){const I=new CustomEvent(cn,Ll);if(A.currentTarget.dispatchEvent(I),!I.defaultPrevented){const N=b().filter(O=>O.focusable),j=N.find(O=>O.active),F=N.find(O=>O.id===p),H=[j,F,...N].filter(Boolean).map(O=>O.ref.current);gs(H,d)}}S.current=!1}),onBlur:R(e.onBlur,()=>y(!1))})})}),hs="RovingFocusGroupItem",vs=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,l=ge(),u=s||l,d=$l(hs,n),f=d.currentTabStopId===u,h=fs(n),{onFocusableItemAdd:v,onFocusableItemRemove:g,currentTabStopId:p}=d;return i.useEffect(()=>{if(o)return v(),()=>g()},[o,v,g]),m.jsx(Cn.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:m.jsx(D.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,w=>{o?d.onItemFocus(u):w.preventDefault()}),onFocus:R(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:R(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=Ul(w,d.orientation,d.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let C=h().filter(b=>b.focusable).map(b=>b.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();const b=C.indexOf(w.currentTarget);C=d.loop?Vl(C,b+1):C.slice(b+1)}setTimeout(()=>gs(C))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:p!=null}):a})})});vs.displayName=hs;var Hl={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Wl(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ul(e,t,n){const o=Wl(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Hl[o]}function gs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Vl(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Kl=ms,Gl=vs,bn=["Enter"," "],zl=["ArrowDown","PageUp","Home"],ws=["ArrowUp","PageDown","End"],Yl=[...zl,...ws],Xl={ltr:[...bn,"ArrowRight"],rtl:[...bn,"ArrowLeft"]},ql={ltr:["ArrowLeft"],rtl:["ArrowRight"]},rt="Menu",[Qe,Zl,Ql]=Mn(rt),[Oe,xs]=ye(rt,[Ql,Ee,ps]),Kt=Ee(),ys=ps(),[Jl,De]=Oe(rt),[eu,st]=Oe(rt),Cs=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=Kt(t),[l,u]=i.useState(null),d=i.useRef(!1),f=fe(s),h=er(r);return i.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),m.jsx(jn,{...c,children:m.jsx(Jl,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:m.jsx(eu,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:o})})})};Cs.displayName=rt;var tu="MenuAnchor",Vn=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Kt(n);return m.jsx(Lt,{...r,...o,ref:t})});Vn.displayName=tu;var Kn="MenuPortal",[nu,bs]=Oe(Kn,{forceMount:void 0}),Ss=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=De(Kn,t);return m.jsx(nu,{scope:t,forceMount:n,children:m.jsx(oe,{present:n||s.open,children:m.jsx(Ue,{asChild:!0,container:r,children:o})})})};Ss.displayName=Kn;var ne="MenuContent",[ou,Gn]=Oe(ne),Es=i.forwardRef((e,t)=>{const n=bs(ne,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(ne,e.__scopeMenu),a=st(ne,e.__scopeMenu);return m.jsx(Qe.Provider,{scope:e.__scopeMenu,children:m.jsx(oe,{present:o||s.open,children:m.jsx(Qe.Slot,{scope:e.__scopeMenu,children:a.modal?m.jsx(ru,{...r,ref:t}):m.jsx(su,{...r,ref:t})})})})}),ru=i.forwardRef((e,t)=>{const n=De(ne,e.__scopeMenu),o=i.useRef(null),r=$(t,o);return i.useEffect(()=>{const s=o.current;if(s)return En(s)},[]),m.jsx(zn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),su=i.forwardRef((e,t)=>{const n=De(ne,e.__scopeMenu);return m.jsx(zn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),iu=$e("MenuContent.ScrollLock"),zn=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,disableOutsideScroll:g,...p}=e,w=De(ne,n),x=st(ne,n),y=Kt(n),C=ys(n),b=Zl(n),[S,M]=i.useState(null),E=i.useRef(null),A=$(t,E,w.onContentChange),L=i.useRef(0),I=i.useRef(""),N=i.useRef(0),j=i.useRef(null),F=i.useRef("right"),k=i.useRef(0),H=g?At:i.Fragment,O=g?{as:iu,allowPinchZoom:!0}:void 0,B=P=>{const K=I.current+P,Y=b().filter(T=>!T.disabled),re=document.activeElement,he=Y.find(T=>T.ref.current===re)?.textValue,ee=Y.map(T=>T.textValue),ve=wu(ee,K,he),Z=Y.find(T=>T.textValue===ve)?.ref.current;(function T(W){I.current=W,window.clearTimeout(L.current),W!==""&&(L.current=window.setTimeout(()=>T(""),1e3))})(K),Z&&setTimeout(()=>Z.focus())};i.useEffect(()=>()=>window.clearTimeout(L.current),[]),Sn();const _=i.useCallback(P=>F.current===j.current?.side&&yu(P,j.current?.area),[]);return m.jsx(ou,{scope:n,searchRef:I,onItemEnter:i.useCallback(P=>{_(P)&&P.preventDefault()},[_]),onItemLeave:i.useCallback(P=>{_(P)||(E.current?.focus(),M(null))},[_]),onTriggerLeave:i.useCallback(P=>{_(P)&&P.preventDefault()},[_]),pointerGraceTimerRef:N,onPointerGraceIntentChange:i.useCallback(P=>{j.current=P},[]),children:m.jsx(H,{...O,children:m.jsx(Tt,{asChild:!0,trapped:r,onMountAutoFocus:R(s,P=>{P.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:m.jsx(We,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:v,children:m.jsx(Kl,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:M,onEntryFocus:R(l,P=>{x.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(kt,{role:"menu","aria-orientation":"vertical","data-state":Bs(w.open),"data-radix-menu-content":"",dir:x.dir,...y,...p,ref:A,style:{outline:"none",...p.style},onKeyDown:R(p.onKeyDown,P=>{const Y=P.target.closest("[data-radix-menu-content]")===P.currentTarget,re=P.ctrlKey||P.altKey||P.metaKey,he=P.key.length===1;Y&&(P.key==="Tab"&&P.preventDefault(),!re&&he&&B(P.key));const ee=E.current;if(P.target!==ee||!Yl.includes(P.key))return;P.preventDefault();const Z=b().filter(T=>!T.disabled).map(T=>T.ref.current);ws.includes(P.key)&&Z.reverse(),vu(Z)}),onBlur:R(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(L.current),I.current="")}),onPointerMove:R(e.onPointerMove,Je(P=>{const K=P.target,Y=k.current!==P.clientX;if(P.currentTarget.contains(K)&&Y){const re=P.clientX>k.current?"right":"left";F.current=re,k.current=P.clientX}}))})})})})})})});Es.displayName=ne;var au="MenuGroup",Yn=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return m.jsx(D.div,{role:"group",...o,ref:t})});Yn.displayName=au;var cu="MenuLabel",Rs=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return m.jsx(D.div,{...o,ref:t})});Rs.displayName=cu;var St="MenuItem",Eo="menu.itemSelect",Gt=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=st(St,e.__scopeMenu),c=Gn(St,e.__scopeMenu),l=$(t,s),u=i.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(Eo,{bubbles:!0,cancelable:!0});f.addEventListener(Eo,v=>o?.(v),{once:!0}),To(f,h),h.defaultPrevented?u.current=!1:a.onClose()}};return m.jsx(Ps,{...r,ref:l,disabled:n,onClick:R(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:R(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||bn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Gt.displayName=St;var Ps=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=Gn(St,n),c=ys(n),l=i.useRef(null),u=$(t,l),[d,f]=i.useState(!1),[h,v]=i.useState("");return i.useEffect(()=>{const g=l.current;g&&v((g.textContent??"").trim())},[s.children]),m.jsx(Qe.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:m.jsx(Gl,{asChild:!0,...c,focusable:!o,children:m.jsx(D.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:R(e.onPointerMove,Je(g=>{o?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,Je(g=>a.onItemLeave(g))),onFocus:R(e.onFocus,()=>f(!0)),onBlur:R(e.onBlur,()=>f(!1))})})})}),lu="MenuCheckboxItem",Ts=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return m.jsx(Os,{scope:e.__scopeMenu,checked:n,children:m.jsx(Gt,{role:"menuitemcheckbox","aria-checked":Et(n)?"mixed":n,...r,ref:t,"data-state":qn(n),onSelect:R(r.onSelect,()=>o?.(Et(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ts.displayName=lu;var Ms="MenuRadioGroup",[uu,du]=Oe(Ms,{value:void 0,onValueChange:()=>{}}),As=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=fe(o);return m.jsx(uu,{scope:e.__scopeMenu,value:n,onValueChange:s,children:m.jsx(Yn,{...r,ref:t})})});As.displayName=Ms;var _s="MenuRadioItem",Is=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=du(_s,e.__scopeMenu),s=n===r.value;return m.jsx(Os,{scope:e.__scopeMenu,checked:s,children:m.jsx(Gt,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":qn(s),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Is.displayName=_s;var Xn="MenuItemIndicator",[Os,fu]=Oe(Xn,{checked:!1}),Ds=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=fu(Xn,n);return m.jsx(oe,{present:o||Et(s.checked)||s.checked===!0,children:m.jsx(D.span,{...r,ref:t,"data-state":qn(s.checked)})})});Ds.displayName=Xn;var pu="MenuSeparator",Ns=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return m.jsx(D.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Ns.displayName=pu;var mu="MenuArrow",Ls=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=Kt(n);return m.jsx(jt,{...r,...o,ref:t})});Ls.displayName=mu;var hu="MenuSub",[$d,ks]=Oe(hu),Ye="MenuSubTrigger",js=i.forwardRef((e,t)=>{const n=De(Ye,e.__scopeMenu),o=st(Ye,e.__scopeMenu),r=ks(Ye,e.__scopeMenu),s=Gn(Ye,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),m.jsx(Vn,{asChild:!0,...u,children:m.jsx(Ps,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Bs(n.open),...e,ref:Pt(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,Je(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:R(e.onPointerLeave,Je(f=>{d();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,g=v==="right",p=g?-5:5,w=h[g?"left":"right"],x=h[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+p,y:f.clientY},{x:w,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:w,y:h.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||Xl[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});js.displayName=Ye;var Fs="MenuSubContent",$s=i.forwardRef((e,t)=>{const n=bs(ne,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=De(ne,e.__scopeMenu),a=st(ne,e.__scopeMenu),c=ks(Fs,e.__scopeMenu),l=i.useRef(null),u=$(t,l);return m.jsx(Qe.Provider,{scope:e.__scopeMenu,children:m.jsx(oe,{present:o||s.open,children:m.jsx(Qe.Slot,{scope:e.__scopeMenu,children:m.jsx(zn,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{a.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:R(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:R(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=ql[a.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});$s.displayName=Fs;function Bs(e){return e?"open":"closed"}function Et(e){return e==="indeterminate"}function qn(e){return Et(e)?"indeterminate":e?"checked":"unchecked"}function vu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function wu(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=gu(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function xu(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function yu(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return xu(n,t)}function Je(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Cu=Cs,bu=Vn,Su=Ss,Eu=Es,Ru=Yn,Pu=Rs,Tu=Gt,Mu=Ts,Au=As,_u=Is,Iu=Ds,Ou=Ns,Du=Ls,Nu=js,Lu=$s,zt="DropdownMenu",[ku]=ye(zt,[xs]),q=xs(),[ju,Hs]=ku(zt),Ws=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,l=q(t),u=i.useRef(null),[d,f]=et({prop:r,defaultProp:s??!1,onChange:a,caller:zt});return m.jsx(ju,{scope:t,triggerId:ge(),triggerRef:u,contentId:ge(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:m.jsx(Cu,{...l,open:d,onOpenChange:f,dir:o,modal:c,children:n})})};Ws.displayName=zt;var Us="DropdownMenuTrigger",Vs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Hs(Us,n),a=q(n);return m.jsx(bu,{asChild:!0,...a,children:m.jsx(D.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:Pt(t,s.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Vs.displayName=Us;var Fu="DropdownMenuPortal",Ks=e=>{const{__scopeDropdownMenu:t,...n}=e,o=q(t);return m.jsx(Su,{...o,...n})};Ks.displayName=Fu;var Gs="DropdownMenuContent",zs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Hs(Gs,n),s=q(n),a=i.useRef(!1);return m.jsx(Eu,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(a.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)"}})});zs.displayName=Gs;var $u="DropdownMenuGroup",Bu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Ru,{...r,...o,ref:t})});Bu.displayName=$u;var Hu="DropdownMenuLabel",Ys=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Pu,{...r,...o,ref:t})});Ys.displayName=Hu;var Wu="DropdownMenuItem",Xs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Tu,{...r,...o,ref:t})});Xs.displayName=Wu;var Uu="DropdownMenuCheckboxItem",Vu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Mu,{...r,...o,ref:t})});Vu.displayName=Uu;var Ku="DropdownMenuRadioGroup",Gu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Au,{...r,...o,ref:t})});Gu.displayName=Ku;var zu="DropdownMenuRadioItem",Yu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(_u,{...r,...o,ref:t})});Yu.displayName=zu;var Xu="DropdownMenuItemIndicator",qu=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Iu,{...r,...o,ref:t})});qu.displayName=Xu;var Zu="DropdownMenuSeparator",qs=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Ou,{...r,...o,ref:t})});qs.displayName=Zu;var Qu="DropdownMenuArrow",Ju=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Du,{...r,...o,ref:t})});Ju.displayName=Qu;var ed="DropdownMenuSubTrigger",td=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Nu,{...r,...o,ref:t})});td.displayName=ed;var nd="DropdownMenuSubContent",od=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=q(n);return m.jsx(Lu,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});od.displayName=nd;var Bd=Ws,Hd=Vs,Wd=Ks,Ud=zs,Vd=Ys,Kd=Xs,Gd=qs;export{yd as $,vt as A,J as B,ld as C,Ot as D,Se as E,Be as F,za as G,On as H,Qa as I,Ke as J,tt as K,Dt as L,qe as M,pn as N,cd as O,ad as P,Dn as Q,id as R,fd as S,ud as T,dd as U,vd as V,gd as W,Rd as X,Pd as Y,wd as Z,xd as _,ue as a,Cd as a0,bd as a1,Ed as a2,Sd as a3,Td as a4,Ad as a5,_d as a6,Id as a7,Od as a8,Dd as a9,Md as aa,Nd as ab,Ld as ac,kd as ad,jd as ae,Fd as af,Bd as ag,Hd as ah,Wd as ai,Ud as aj,Vd as ak,Gd as al,Kd as am,gt as b,Pt as c,_a as d,we as e,Na as f,xe as g,Aa as h,dn as i,nr as j,In as k,Ve as l,be as m,Q as n,An as o,pd as p,_n as q,wt as r,fn as s,tr as t,ge as u,ie as v,me as w,ae as x,pe as y,de as z};
|