@purpurds/tooltip 7.6.1 → 7.7.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/.rush/temp/chunked-rush-logs/tooltip.test_unit.chunks.jsonl +4 -4
- package/.rush/temp/ci_build/@purpurds/tooltip/{e53969c1b0b0038edeecbaae9709b0cec2724cfe.untar.log → 56e2c4a58123de97ef646ba6b7c93c03d2203269.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +4 -4
- package/.rush/temp/operation/ci_build/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +4 -4
- package/.rush/temp/operation/test_unit/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +1 -1
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +6 -6
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.d.ts +26 -4
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.es.js +691 -713
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +7 -6
- package/src/tooltip.stories.tsx +1 -1
- package/src/tooltip.tsx +17 -22
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
{"kind":"O","text":"\n"}
|
|
3
3
|
{"kind":"O","text":"\u001b[1m\u001b[46m RUN \u001b[49m\u001b[22m \u001b[36mv3.1.3 \u001b[39m\u001b[90m/opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/components/tooltip\u001b[39m\n"}
|
|
4
4
|
{"kind":"O","text":"\n"}
|
|
5
|
-
{"kind":"O","text":" \u001b[32m✓\u001b[39m src/tooltip.test.tsx \u001b[2m(\u001b[22m\u001b[2m9 tests\u001b[22m\u001b[2m)\u001b[22m\u001b[33m
|
|
6
|
-
{"kind":"O","text":" \u001b[33m\u001b[2m✓\u001b[22m\u001b[39m Tooltip\u001b[2m > \u001b[22mshould open on hover \u001b[33m
|
|
5
|
+
{"kind":"O","text":" \u001b[32m✓\u001b[39m src/tooltip.test.tsx \u001b[2m(\u001b[22m\u001b[2m9 tests\u001b[22m\u001b[2m)\u001b[22m\u001b[33m 658\u001b[2mms\u001b[22m\u001b[39m\n"}
|
|
6
|
+
{"kind":"O","text":" \u001b[33m\u001b[2m✓\u001b[22m\u001b[39m Tooltip\u001b[2m > \u001b[22mshould open on hover \u001b[33m 521\u001b[2mms\u001b[22m\u001b[39m\n"}
|
|
7
7
|
{"kind":"O","text":"\n"}
|
|
8
8
|
{"kind":"O","text":"\u001b[2m Test Files \u001b[22m \u001b[1m\u001b[32m1 passed\u001b[39m\u001b[22m\u001b[90m (1)\u001b[39m\n"}
|
|
9
9
|
{"kind":"O","text":"\u001b[2m Tests \u001b[22m \u001b[1m\u001b[32m9 passed\u001b[39m\u001b[22m\u001b[90m (9)\u001b[39m\n"}
|
|
10
|
-
{"kind":"O","text":"\u001b[2m Start at \u001b[22m
|
|
11
|
-
{"kind":"O","text":"\u001b[2m Duration \u001b[22m 1.56s\u001b[2m (transform
|
|
10
|
+
{"kind":"O","text":"\u001b[2m Start at \u001b[22m 14:47:31\n"}
|
|
11
|
+
{"kind":"O","text":"\u001b[2m Duration \u001b[22m 1.56s\u001b[2m (transform 248ms, setup 0ms, collect 406ms, tests 658ms, environment 231ms, prepare 71ms)\u001b[22m\n"}
|
|
12
12
|
{"kind":"O","text":"\n"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Start time: Thu Jul
|
|
2
|
-
Invoking "/usr/bin/tar -x -m -f /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/common/temp/build-cache/ci_build/@purpurds/tooltip/
|
|
1
|
+
Start time: Thu Jul 31 2025 14:47:12 GMT+0000 (Coordinated Universal Time)
|
|
2
|
+
Invoking "/usr/bin/tar -x -m -f /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/common/temp/build-cache/ci_build/@purpurds/tooltip/56e2c4a58123de97ef646ba6b7c93c03d2203269"
|
|
3
3
|
|
|
4
4
|
======= BEGIN PROCESS INPUT ======
|
|
5
5
|
|
|
@@ -12,9 +12,9 @@ rendering chunks...
|
|
|
12
12
|
[vite:dts] Start generate declaration files...
|
|
13
13
|
computing gzip size...
|
|
14
14
|
dist/styles.css 1.78 kB │ gzip: 0.49 kB
|
|
15
|
-
dist/tooltip.cjs.js 56.
|
|
16
|
-
[vite:dts] Declaration files built in
|
|
15
|
+
dist/tooltip.cjs.js 56.84 kB │ gzip: 19.56 kB │ map: 261.08 kB
|
|
16
|
+
[vite:dts] Declaration files built in 2566ms.
|
|
17
17
|
|
|
18
18
|
dist/styles.css 1.78 kB │ gzip: 0.49 kB
|
|
19
|
-
dist/tooltip.es.js 82.
|
|
20
|
-
✓ built in 4.
|
|
19
|
+
dist/tooltip.es.js 82.80 kB │ gzip: 23.48 kB │ map: 269.70 kB
|
|
20
|
+
✓ built in 4.06s
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
{"kind":"O","text":"\u001b[36m[vite:dts]\u001b[32m Start generate declaration files...\u001b[39m\n"}
|
|
13
13
|
{"kind":"O","text":"computing gzip size...\n"}
|
|
14
14
|
{"kind":"O","text":"\u001b[2mdist/\u001b[22m\u001b[35mstyles.css \u001b[39m\u001b[1m\u001b[2m 1.78 kB\u001b[22m\u001b[1m\u001b[22m\u001b[2m │ gzip: 0.49 kB\u001b[22m\n"}
|
|
15
|
-
{"kind":"O","text":"\u001b[2mdist/\u001b[22m\u001b[36mtooltip.cjs.js \u001b[39m\u001b[1m\u001b[2m56.
|
|
16
|
-
{"kind":"O","text":"\u001b[32m\u001b[36m[vite:dts]\u001b[32m Declaration files built in
|
|
15
|
+
{"kind":"O","text":"\u001b[2mdist/\u001b[22m\u001b[36mtooltip.cjs.js \u001b[39m\u001b[1m\u001b[2m56.84 kB\u001b[22m\u001b[1m\u001b[22m\u001b[2m │ gzip: 19.56 kB\u001b[22m\u001b[2m │ map: 261.08 kB\u001b[22m\n"}
|
|
16
|
+
{"kind":"O","text":"\u001b[32m\u001b[36m[vite:dts]\u001b[32m Declaration files built in 2566ms.\n"}
|
|
17
17
|
{"kind":"O","text":"\u001b[39m\n"}
|
|
18
18
|
{"kind":"O","text":"\u001b[2mdist/\u001b[22m\u001b[35mstyles.css \u001b[39m\u001b[1m\u001b[2m 1.78 kB\u001b[22m\u001b[1m\u001b[22m\u001b[2m │ gzip: 0.49 kB\u001b[22m\n"}
|
|
19
|
-
{"kind":"O","text":"\u001b[2mdist/\u001b[22m\u001b[36mtooltip.es.js \u001b[39m\u001b[1m\u001b[2m82.
|
|
20
|
-
{"kind":"O","text":"\u001b[32m✓ built in 4.
|
|
19
|
+
{"kind":"O","text":"\u001b[2mdist/\u001b[22m\u001b[36mtooltip.es.js \u001b[39m\u001b[1m\u001b[2m82.80 kB\u001b[22m\u001b[1m\u001b[22m\u001b[2m │ gzip: 23.48 kB\u001b[22m\u001b[2m │ map: 269.70 kB\u001b[22m\n"}
|
|
20
|
+
{"kind":"O","text":"\u001b[32m✓ built in 4.06s\u001b[39m\n"}
|
|
@@ -2,11 +2,11 @@ Invoking: vitest run --passWithNoTests
|
|
|
2
2
|
|
|
3
3
|
RUN v3.1.3 /opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/components/tooltip
|
|
4
4
|
|
|
5
|
-
✓ src/tooltip.test.tsx (9 tests)
|
|
6
|
-
✓ Tooltip > should open on hover
|
|
5
|
+
✓ src/tooltip.test.tsx (9 tests) 658ms
|
|
6
|
+
✓ Tooltip > should open on hover 521ms
|
|
7
7
|
|
|
8
8
|
Test Files 1 passed (1)
|
|
9
9
|
Tests 9 passed (9)
|
|
10
|
-
Start at
|
|
11
|
-
Duration 1.56s (transform
|
|
10
|
+
Start at 14:47:31
|
|
11
|
+
Duration 1.56s (transform 248ms, setup 0ms, collect 406ms, tests 658ms, environment 231ms, prepare 71ms)
|
|
12
12
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
{"kind":"O","text":"\n"}
|
|
3
3
|
{"kind":"O","text":"\u001b[1m\u001b[46m RUN \u001b[49m\u001b[22m \u001b[36mv3.1.3 \u001b[39m\u001b[90m/opt/actions-runner/_work/teliasaurus/teliasaurus/purpur/components/tooltip\u001b[39m\n"}
|
|
4
4
|
{"kind":"O","text":"\n"}
|
|
5
|
-
{"kind":"O","text":" \u001b[32m✓\u001b[39m src/tooltip.test.tsx \u001b[2m(\u001b[22m\u001b[2m9 tests\u001b[22m\u001b[2m)\u001b[22m\u001b[33m
|
|
6
|
-
{"kind":"O","text":" \u001b[33m\u001b[2m✓\u001b[22m\u001b[39m Tooltip\u001b[2m > \u001b[22mshould open on hover \u001b[33m
|
|
5
|
+
{"kind":"O","text":" \u001b[32m✓\u001b[39m src/tooltip.test.tsx \u001b[2m(\u001b[22m\u001b[2m9 tests\u001b[22m\u001b[2m)\u001b[22m\u001b[33m 658\u001b[2mms\u001b[22m\u001b[39m\n"}
|
|
6
|
+
{"kind":"O","text":" \u001b[33m\u001b[2m✓\u001b[22m\u001b[39m Tooltip\u001b[2m > \u001b[22mshould open on hover \u001b[33m 521\u001b[2mms\u001b[22m\u001b[39m\n"}
|
|
7
7
|
{"kind":"O","text":"\n"}
|
|
8
8
|
{"kind":"O","text":"\u001b[2m Test Files \u001b[22m \u001b[1m\u001b[32m1 passed\u001b[39m\u001b[22m\u001b[90m (1)\u001b[39m\n"}
|
|
9
9
|
{"kind":"O","text":"\u001b[2m Tests \u001b[22m \u001b[1m\u001b[32m9 passed\u001b[39m\u001b[22m\u001b[90m (9)\u001b[39m\n"}
|
|
10
|
-
{"kind":"O","text":"\u001b[2m Start at \u001b[22m
|
|
11
|
-
{"kind":"O","text":"\u001b[2m Duration \u001b[22m 1.56s\u001b[2m (transform
|
|
10
|
+
{"kind":"O","text":"\u001b[2m Start at \u001b[22m 14:47:31\n"}
|
|
11
|
+
{"kind":"O","text":"\u001b[2m Duration \u001b[22m 1.56s\u001b[2m (transform 248ms, setup 0ms, collect 406ms, tests 658ms, environment 231ms, prepare 71ms)\u001b[22m\n"}
|
|
12
12
|
{"kind":"O","text":"\n"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"../../components/tooltip": "../../components/tooltip:
|
|
2
|
+
"../../components/tooltip": "../../components/tooltip:5yd/5rIZY+xvsekghfDMnYwzxL3m/b/I3TNh6ed5IFk=:",
|
|
3
3
|
"/@adobe/css-tools@4.4.0": "sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ==",
|
|
4
4
|
"/@babel/code-frame@7.24.7": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==",
|
|
5
5
|
"/@babel/helper-validator-identifier@7.24.7": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==",
|
package/dist/LICENSE.txt
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
Name: @purpurds/button
|
|
2
|
-
Version: 7.6.
|
|
2
|
+
Version: 7.6.1
|
|
3
3
|
License: AGPL-3.0-only
|
|
4
4
|
Private: false
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Name: @purpurds/icon
|
|
9
|
-
Version: 7.6.
|
|
9
|
+
Version: 7.6.1
|
|
10
10
|
License: AGPL-3.0-only
|
|
11
11
|
Private: false
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
Name: @purpurds/paragraph
|
|
16
|
-
Version: 7.6.
|
|
16
|
+
Version: 7.6.1
|
|
17
17
|
License: AGPL-3.0-only
|
|
18
18
|
Private: false
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
22
22
|
Name: @purpurds/tokens
|
|
23
|
-
Version: 7.6.
|
|
23
|
+
Version: 7.6.1
|
|
24
24
|
License: AGPL-3.0-only
|
|
25
25
|
Private: false
|
|
26
26
|
|
package/dist/tooltip.cjs.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),Q=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),Q=require("react"),Tt=require("react-dom");function St(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=St(Q),Nt=St(Tt),Mn={LG:"lg"};function $n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/var
|
|
5
|
+
*/var at;function jn(){return at||(at=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(st)),st.exports}var kn=jn();const In=$n(kn),Fn="_rotate_12t9p_1",Bn="_dash_12t9p_1",Wn={"purpur-spinner":"_purpur-spinner_12t9p_2",rotate:Fn,"purpur-spinner--xxs":"_purpur-spinner--xxs_12t9p_6","purpur-spinner--xs":"_purpur-spinner--xs_12t9p_10","purpur-spinner--sm":"_purpur-spinner--sm_12t9p_14","purpur-spinner--md":"_purpur-spinner--md_12t9p_18","purpur-spinner--lg":"_purpur-spinner--lg_12t9p_22","purpur-spinner__circle":"_purpur-spinner__circle_12t9p_26",dash:Bn,"purpur-spinner__circle--disabled":"_purpur-spinner__circle--disabled_12t9p_41","purpur-spinner__circle--negative":"_purpur-spinner__circle--negative_12t9p_44"},ct=In.bind(Wn),fe="purpur-spinner",Hn={SM:"sm"},qn=({disabled:e=!1,negative:t=!1,size:n=Hn.SM,...o})=>w.jsx("div",{className:ct(fe,`${fe}--${n}`),...o,children:w.jsx("svg",{viewBox:"0 0 50 50",children:w.jsx("circle",{className:ct(`${fe}__circle`,{[`${fe}__circle--disabled`]:e,[`${fe}__circle--negative`]:t}),cx:"25",cy:"25",r:"20"})})});function zn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}};/*!
|
|
6
6
|
Copyright (c) 2018 Jed Watson.
|
|
7
7
|
Licensed under the MIT License (MIT), see
|
|
8
8
|
http://jedwatson.github.io/classnames
|
|
9
|
-
*/var
|
|
9
|
+
*/var ut;function Vn(){return ut||(ut=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(lt)),lt.exports}var Un=Vn();const Yn=zn(Un),Gn={"purpur-button":"_purpur-button_w455q_1","purpur-button--xs":"_purpur-button--xs_w455q_33","purpur-button--icon-only":"_purpur-button--icon-only_w455q_36","purpur-button--sm":"_purpur-button--sm_w455q_39","purpur-button--md":"_purpur-button--md_w455q_45","purpur-button--lg":"_purpur-button--lg_w455q_51","purpur-button--full-width":"_purpur-button--full-width_w455q_57","purpur-button--primary":"_purpur-button--primary_w455q_60","purpur-button--disabled":"_purpur-button--disabled_w455q_64","purpur-button--primary-negative":"_purpur-button--primary-negative_w455q_70","purpur-button--secondary":"_purpur-button--secondary_w455q_82","purpur-button--secondary-negative":"_purpur-button--secondary-negative_w455q_93","purpur-button--expressive":"_purpur-button--expressive_w455q_104","purpur-button--expressive-negative":"_purpur-button--expressive-negative_w455q_114","purpur-button--negative":"_purpur-button--negative_w455q_126","purpur-button--destructive":"_purpur-button--destructive_w455q_133","purpur-button--destructive-negative":"_purpur-button--destructive-negative_w455q_143","purpur-button--tertiary-purple":"_purpur-button--tertiary-purple_w455q_153","purpur-button--tertiary-purple-negative":"_purpur-button--tertiary-purple-negative_w455q_166","purpur-button--text-negative":"_purpur-button--text-negative_w455q_181","purpur-button--text":"_purpur-button--text_w455q_181"},Xn={TERTIARY_PURPLE:"tertiary-purple"},Zn=Yn.bind(Gn),J="purpur-button",Dt=Q.forwardRef(({children:e,className:t,disabled:n=!1,fullWidth:o=!1,iconOnly:i,loading:r=!1,negative:s=!1,onClick:a,size:c="md",variant:l,type:f="button",...d},h)=>{if(i&&l==="destructive")return null;const p=Zn([J,`${J}--${s?`${l}-negative`:l}`,`${J}--${c}`],{[`${J}--icon-only`]:i,[`${J}--negative`]:s,[`${J}--full-width`]:o,[`${J}--disabled`]:n||r},t),m=v=>{n||r?v.preventDefault():a&&a(v)},g=!!d["aria-disabled"]||n||r;return w.jsxs("button",{className:p,type:f,ref:h,"aria-disabled":g,onClick:m,...d,children:[r&&w.jsx(qn,{size:c===Mn.LG?"xs":"xxs",negative:s,disabled:g})," ",e]})});Dt.displayName="Button";function Kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ft={exports:{}};/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
|
-
*/var
|
|
13
|
+
*/var pt;function Jn(){return pt||(pt=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(ft)),ft.exports}var Qn=Jn();const er=Kn(Qn),tr={"purpur-icon":"_purpur-icon_8u1lq_1","purpur-icon--xxs":"_purpur-icon--xxs_8u1lq_4","purpur-icon--xs":"_purpur-icon--xs_8u1lq_8","purpur-icon--sm":"_purpur-icon--sm_8u1lq_12","purpur-icon--md":"_purpur-icon--md_8u1lq_16","purpur-icon--lg":"_purpur-icon--lg_8u1lq_20","purpur-icon--xl":"_purpur-icon--xl_8u1lq_24"},nr=er.bind(tr),dt="purpur-icon",rr="md",or=e=>e.filter(t=>Object.keys(t).length>=1).map(t=>`${t.name}="${t.value}"`).join(" "),ir=({content:e="",title:t}={})=>{const n=[{name:"xmlns",value:"http://www.w3.org/2000/svg"},{name:"fill",value:"currentColor"},{name:"viewBox",value:"0 0 24 24"},t?{name:"role",value:"img"}:{name:"aria-hidden",value:"true"}],o=t?`<title>${t}</title>`:"";return`<svg ${or(n)}>${o}${e}</svg>`},sr=e=>e.replace(/<(\/?)svg([^>]*)>/g,"").trim(),Lt=({svg:e,allyTitle:t,className:n,size:o=rr,...i})=>{const r=ir({content:sr(e.svg),title:t}),s=nr(n,dt,`${dt}--${o}`);return w.jsx("span",{className:s,dangerouslySetInnerHTML:{__html:r},...i})};Lt.displayName="Icon";const ar={name:"info",svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',keywords:["info"],category:"status"},Mt=e=>w.jsx(Lt,{...e,svg:ar});Mt.displayName="IconInfo";function cr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ht={exports:{}};/*!
|
|
14
14
|
Copyright (c) 2018 Jed Watson.
|
|
15
15
|
Licensed under the MIT License (MIT), see
|
|
16
16
|
http://jedwatson.github.io/classnames
|
|
17
|
-
*/var vt;function ur(){return vt||(vt=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o(a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(gt)),gt.exports}var fr=ur();const pr=lr(fr),de={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},kt={PARAGRAPH100:"paragraph-100"},he="purpur-paragraph",It=({["data-testid"]:e,children:t,className:n,disabled:o,enableHyphenation:i=!1,negative:r=!1,variant:s=kt.PARAGRAPH100,...a})=>{const c=pr([n,de[he],de[`${he}--${s}`],{[de[`${he}--hyphens`]]:i,[de[`${he}--disabled`]]:o,[de[`${he}--negative`]]:r}]);return w.jsx("p",{...a,className:c,"data-testid":e,children:t})};It.displayName="Paragraph";const dr="400ms";function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function yt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ft(...e){return t=>{let n=!1;const o=e.map(i=>{const r=yt(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<o.length;i++){const r=o[i];typeof r=="function"?r():yt(e[i],null)}}}}function ne(...e){return f.useCallback(Ft(...e),e)}function Bt(e,t=[]){let n=[];function o(r,s){const a=f.createContext(s),c=n.length;n=[...n,s];const l=d=>{var y;const{scope:h,children:p,...m}=d,g=((y=h==null?void 0:h[e])==null?void 0:y[c])||a,v=f.useMemo(()=>m,Object.values(m));return w.jsx(g.Provider,{value:v,children:p})};l.displayName=r+"Provider";function u(d,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[c])||a,m=f.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[l,u]}const i=()=>{const r=n.map(s=>f.createContext(s));return function(a){const c=(a==null?void 0:a[e])||r;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[o,hr(i,...t)]}function hr(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=o.reduce((a,{useScope:c,scopeName:l})=>{const d=c(r)[`__scope${l}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Wt=f.forwardRef((e,t)=>{const{children:n,...o}=e,i=f.Children.toArray(n),r=i.find(mr);if(r){const s=r.props.children,a=i.map(c=>c===r?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:c);return w.jsx(ke,{...o,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,a):null})}return w.jsx(ke,{...o,ref:t,children:n})});Wt.displayName="Slot";var ke=f.forwardRef((e,t)=>{const{children:n,...o}=e;if(f.isValidElement(n)){const i=vr(n),r=gr(o,n.props);return n.type!==f.Fragment&&(r.ref=t?Ft(t,i):i),f.cloneElement(n,r)}return f.Children.count(n)>1?f.Children.only(null):null});ke.displayName="SlotClone";var Ht=({children:e})=>w.jsx(w.Fragment,{children:e});function mr(e){return f.isValidElement(e)&&e.type===Ht}function gr(e,t){const n={...t};for(const o in t){const i=e[o],r=t[o];/^on[A-Z]/.test(o)?i&&r?n[o]=(...a)=>{r(...a),i(...a)}:i&&(n[o]=i):o==="style"?n[o]={...i,...r}:o==="className"&&(n[o]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function vr(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],K=yr.reduce((e,t)=>{const n=f.forwardRef((o,i)=>{const{asChild:r,...s}=o,a=r?Wt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function xr(e,t){e&&Lt.flushSync(()=>e.dispatchEvent(t))}function ae(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function wr(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e);f.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var br="DismissableLayer",Ie="dismissableLayer.update",_r="dismissableLayer.pointerDownOutside",Pr="dismissableLayer.focusOutside",xt,qt=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zt=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:r,onInteractOutside:s,onDismiss:a,...c}=e,l=f.useContext(qt),[u,d]=f.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),m=ne(t,A=>d(A)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=u?g.indexOf(u):-1,P=l.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,_=Or(A=>{const E=A.target,D=[...l.branches].some(R=>R.contains(E));!b||D||(i==null||i(A),s==null||s(A),A.defaultPrevented||a==null||a())},h),C=Er(A=>{const E=A.target;[...l.branches].some(R=>R.contains(E))||(r==null||r(A),s==null||s(A),A.defaultPrevented||a==null||a())},h);return wr(A=>{x===l.layers.size-1&&(o==null||o(A),!A.defaultPrevented&&a&&(A.preventDefault(),a()))},h),f.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(xt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),wt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=xt)}},[u,h,n,l]),f.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),wt())},[u,l]),f.useEffect(()=>{const A=()=>p({});return document.addEventListener(Ie,A),()=>document.removeEventListener(Ie,A)},[]),w.jsx(K.div,{...c,ref:m,style:{pointerEvents:P?b?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,C.onFocusCapture),onBlurCapture:z(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,_.onPointerDownCapture)})});zt.displayName=br;var Ar="DismissableLayerBranch",Cr=f.forwardRef((e,t)=>{const n=f.useContext(qt),o=f.useRef(null),i=ne(t,o);return f.useEffect(()=>{const r=o.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),w.jsx(K.div,{...e,ref:i})});Cr.displayName=Ar;function Or(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e),o=f.useRef(!1),i=f.useRef(()=>{});return f.useEffect(()=>{const r=a=>{if(a.target&&!o.current){let c=function(){Vt(_r,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Er(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e),o=f.useRef(!1);return f.useEffect(()=>{const i=r=>{r.target&&!o.current&&Vt(Pr,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function wt(){const e=new CustomEvent(Ie);document.dispatchEvent(e)}function Vt(e,t,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?xr(i,r):i.dispatchEvent(r)}var ee=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Rr=f.useId||(()=>{}),Tr=0;function Sr(e){const[t,n]=f.useState(Rr());return ee(()=>{n(o=>o??String(Tr++))},[e]),t?`radix-${t}`:""}const Nr=["top","right","bottom","left"],H=Math.min,I=Math.max,Ae=Math.round,be=Math.floor,G=e=>({x:e,y:e}),Dr={left:"right",right:"left",bottom:"top",top:"bottom"},Lr={start:"end",end:"start"};function Fe(e,t,n){return I(e,H(t,n))}function V(e,t){return typeof e=="function"?e(t):e}function U(e){return e.split("-")[0]}function ce(e){return e.split("-")[1]}function ze(e){return e==="x"?"y":"x"}function Ve(e){return e==="y"?"height":"width"}function X(e){return["top","bottom"].includes(U(e))?"y":"x"}function Ue(e){return ze(X(e))}function Mr(e,t,n){n===void 0&&(n=!1);const o=ce(e),i=Ue(e),r=Ve(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Ce(s)),[s,Ce(s)]}function $r(e){const t=Ce(e);return[Be(e),t,Be(t)]}function Be(e){return e.replace(/start|end/g,t=>Lr[t])}function jr(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:s;default:return[]}}function kr(e,t,n,o){const i=ce(e);let r=jr(U(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Be)))),r}function Ce(e){return e.replace(/left|right|bottom|top/g,t=>Dr[t])}function Ir(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ut(e){return typeof e!="number"?Ir(e):{top:e,right:e,bottom:e,left:e}}function Oe(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function bt(e,t,n){let{reference:o,floating:i}=e;const r=X(t),s=Ue(t),a=Ve(s),c=U(t),l=r==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(c){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ce(t)){case"start":p[s]-=h*(n&&l?-1:1);break;case"end":p[s]+=h*(n&&l?-1:1);break}return p}const Fr=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bt(l,o,c),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:v,fn:y}=a[g],{x,y:P,data:b,reset:_}=await y({x:u,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});u=x??u,d=P??d,p={...p,[v]:{...p[v],...b}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(l=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:u,y:d}=bt(l,h,c)),g=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:p}};async function me(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=V(t,e),m=Ut(p),v=a[h?d==="floating"?"reference":"floating":d],y=Oe(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),x=d==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,P=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),b=await(r.isElement==null?void 0:r.isElement(P))?await(r.getScale==null?void 0:r.getScale(P))||{x:1,y:1}:{x:1,y:1},_=Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:P,strategy:c}):x);return{top:(y.top-_.top+m.top)/b.y,bottom:(_.bottom-y.bottom+m.bottom)/b.y,left:(y.left-_.left+m.left)/b.x,right:(_.right-y.right+m.right)/b.x}}const Br=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=V(e,t)||{};if(l==null)return{};const d=Ut(u),h={x:n,y:o},p=Ue(i),m=Ve(p),g=await s.getDimensions(l),v=p==="y",y=v?"top":"left",x=v?"bottom":"right",P=v?"clientHeight":"clientWidth",b=r.reference[m]+r.reference[p]-h[p]-r.floating[m],_=h[p]-r.reference[p],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let A=C?C[P]:0;(!A||!await(s.isElement==null?void 0:s.isElement(C)))&&(A=a.floating[P]||r.floating[m]);const E=b/2-_/2,D=A/2-g[m]/2-1,R=H(d[y],D),M=H(d[x],D),$=R,j=A-g[m]-M,T=A/2-g[m]/2+E,L=Fe($,T,j),k=!c.arrow&&ce(i)!=null&&T!==L&&r.reference[m]/2-(T<$?R:M)-g[m]/2<0,O=k?T<$?T-$:T-j:0;return{[p]:h[p]+O,data:{[p]:L,centerOffset:T-L-O,...k&&{alignmentOffset:O}},reset:k}}}),Wr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...v}=V(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=U(i),x=X(a),P=U(a)===a,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),_=h||(P||!g?[Ce(a)]:$r(a)),C=m!=="none";!h&&C&&_.push(...kr(a,g,m,b));const A=[a,..._],E=await me(t,v),D=[];let R=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&D.push(E[y]),d){const T=Mr(i,s,b);D.push(E[T[0]],E[T[1]])}if(R=[...R,{placement:i,overflows:D}],!D.every(T=>T<=0)){var M,$;const T=(((M=r.flip)==null?void 0:M.index)||0)+1,L=A[T];if(L)return{data:{index:T,overflows:R},reset:{placement:L}};let k=($=R.filter(O=>O.overflows[0]<=0).sort((O,S)=>O.overflows[1]-S.overflows[1])[0])==null?void 0:$.placement;if(!k)switch(p){case"bestFit":{var j;const O=(j=R.filter(S=>{if(C){const N=X(S.placement);return N===x||N==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(N=>N>0).reduce((N,Le)=>N+Le,0)]).sort((S,N)=>S[1]-N[1])[0])==null?void 0:j[0];O&&(k=O);break}case"initialPlacement":k=a;break}if(i!==k)return{reset:{placement:k}}}return{}}}};function _t(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pt(e){return Nr.some(t=>e[t]>=0)}const Hr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=V(e,t);switch(o){case"referenceHidden":{const r=await me(t,{...i,elementContext:"reference"}),s=_t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Pt(s)}}}case"escaped":{const r=await me(t,{...i,altBoundary:!0}),s=_t(r,n.floating);return{data:{escapedOffsets:s,escaped:Pt(s)}}}default:return{}}}}};async function qr(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=U(n),a=ce(n),c=X(n)==="y",l=["left","top"].includes(s)?-1:1,u=r&&c?-1:1,d=V(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*u,y:h*l}:{x:h*l,y:p*u}}const zr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=t,c=await qr(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Vr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=V(e,t),l={x:n,y:o},u=await me(t,c),d=X(U(i)),h=ze(d);let p=l[h],m=l[d];if(r){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=p+u[v],P=p-u[y];p=Fe(x,p,P)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=m+u[v],P=m-u[y];m=Fe(x,m,P)}const g=a.fn({...t,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}},Ur=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=V(e,t),u={x:n,y:o},d=X(i),h=ze(d);let p=u[h],m=u[d];const g=V(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const P=h==="y"?"height":"width",b=r.reference[h]-r.floating[P]+v.mainAxis,_=r.reference[h]+r.reference[P]-v.mainAxis;p<b?p=b:p>_&&(p=_)}if(l){var y,x;const P=h==="y"?"width":"height",b=["top","left"].includes(U(i)),_=r.reference[d]-r.floating[P]+(b&&((y=s.offset)==null?void 0:y[d])||0)+(b?0:v.crossAxis),C=r.reference[d]+r.reference[P]+(b?0:((x=s.offset)==null?void 0:x[d])||0)-(b?v.crossAxis:0);m<_?m=_:m>C&&(m=C)}return{[h]:p,[d]:m}}}},Yr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:r}=t,{apply:s=()=>{},...a}=V(e,t),c=await me(t,a),l=U(n),u=ce(n),d=X(n)==="y",{width:h,height:p}=o.floating;let m,g;l==="top"||l==="bottom"?(m=l,g=u===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=l,m=u==="end"?"top":"bottom");const v=p-c.top-c.bottom,y=h-c.left-c.right,x=H(p-c[m],v),P=H(h-c[g],y),b=!t.middlewareData.shift;let _=x,C=P;if(d?C=u||b?H(P,y):y:_=u||b?H(x,v):v,b&&!u){const E=I(c.left,0),D=I(c.right,0),R=I(c.top,0),M=I(c.bottom,0);d?C=h-2*(E!==0||D!==0?E+D:I(c.left,c.right)):_=p-2*(R!==0||M!==0?R+M:I(c.top,c.bottom))}await s({...t,availableWidth:C,availableHeight:_});const A=await i.getDimensions(r.floating);return h!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function le(e){return Yt(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Y(e){var t;return(t=(Yt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Yt(e){return e instanceof Node||e instanceof F(e).Node}function B(e){return e instanceof Element||e instanceof F(e).Element}function q(e){return e instanceof HTMLElement||e instanceof F(e).HTMLElement}function At(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof F(e).ShadowRoot}function ve(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Gr(e){return["table","td","th"].includes(le(e))}function Re(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ye(e){const t=Ge(),n=B(e)?W(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Xr(e){let t=Z(e);for(;q(t)&&!ie(t);){if(Ye(t))return t;if(Re(t))return null;t=Z(t)}return null}function Ge(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ie(e){return["html","body","#document"].includes(le(e))}function W(e){return F(e).getComputedStyle(e)}function Te(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(le(e)==="html")return e;const t=e.assignedSlot||e.parentNode||At(e)&&e.host||Y(e);return At(t)?t.host:t}function Gt(e){const t=Z(e);return ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&ve(t)?t:Gt(t)}function ge(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Gt(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=F(i);if(r){const a=We(s);return t.concat(s,s.visualViewport||[],ve(i)?i:[],a&&n?ge(a):[])}return t.concat(i,ge(i,[],n))}function We(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xt(e){const t=W(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=q(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,a=Ae(n)!==r||Ae(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function Xe(e){return B(e)?e:e.contextElement}function oe(e){const t=Xe(e);if(!q(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Xt(t);let s=(r?Ae(n.width):n.width)/o,a=(r?Ae(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Zr=G(0);function Zt(e){const t=F(e);return!Ge()||!t.visualViewport?Zr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==F(e)?!1:t}function te(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Xe(e);let s=G(1);t&&(o?B(o)&&(s=oe(o)):s=oe(e));const a=Kr(r,n,o)?Zt(r):G(0);let c=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(r){const h=F(r),p=o&&B(o)?F(o):o;let m=h,g=We(m);for(;g&&o&&p!==m;){const v=oe(g),y=g.getBoundingClientRect(),x=W(g),P=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,b=y.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,d*=v.y,c+=P,l+=b,m=F(g),g=We(m)}}return Oe({width:u,height:d,x:c,y:l})}function Jr(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Y(o),a=t?Re(t.floating):!1;if(o===s||a&&r)return n;let c={scrollLeft:0,scrollTop:0},l=G(1);const u=G(0),d=q(o);if((d||!d&&!r)&&((le(o)!=="body"||ve(s))&&(c=Te(o)),q(o))){const h=te(o);l=oe(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x,y:n.y*l.y-c.scrollTop*l.y+u.y}}function Qr(e){return Array.from(e.getClientRects())}function Kt(e){return te(Y(e)).left+Te(e).scrollLeft}function eo(e){const t=Y(e),n=Te(e),o=e.ownerDocument.body,i=I(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=I(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Kt(e);const a=-n.scrollTop;return W(o).direction==="rtl"&&(s+=I(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}function to(e,t){const n=F(e),o=Y(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,c=0;if(i){r=i.width,s=i.height;const l=Ge();(!l||l&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:a,y:c}}function no(e,t){const n=te(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=q(e)?oe(e):G(1),s=e.clientWidth*r.x,a=e.clientHeight*r.y,c=i*r.x,l=o*r.y;return{width:s,height:a,x:c,y:l}}function Ct(e,t,n){let o;if(t==="viewport")o=to(e,n);else if(t==="document")o=eo(Y(e));else if(B(t))o=no(t,n);else{const i=Zt(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return Oe(o)}function Jt(e,t){const n=Z(e);return n===t||!B(n)||ie(n)?!1:W(n).position==="fixed"||Jt(n,t)}function ro(e,t){const n=t.get(e);if(n)return n;let o=ge(e,[],!1).filter(a=>B(a)&&le(a)!=="body"),i=null;const r=W(e).position==="fixed";let s=r?Z(e):e;for(;B(s)&&!ie(s);){const a=W(s),c=Ye(s);!c&&a.position==="fixed"&&(i=null),(r?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ve(s)&&!c&&Jt(e,s))?o=o.filter(u=>u!==s):i=a,s=Z(s)}return t.set(e,o),o}function oo(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?Re(t)?[]:ro(t,this._c):[].concat(n),o],a=s[0],c=s.reduce((l,u)=>{const d=Ct(t,u,i);return l.top=I(d.top,l.top),l.right=H(d.right,l.right),l.bottom=H(d.bottom,l.bottom),l.left=I(d.left,l.left),l},Ct(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function io(e){const{width:t,height:n}=Xt(e);return{width:t,height:n}}function so(e,t,n){const o=q(t),i=Y(t),r=n==="fixed",s=te(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const c=G(0);if(o||!o&&!r)if((le(t)!=="body"||ve(i))&&(a=Te(t)),o){const d=te(t,!0,r,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else i&&(c.x=Kt(i));const l=s.left+a.scrollLeft-c.x,u=s.top+a.scrollTop-c.y;return{x:l,y:u,width:s.width,height:s.height}}function Me(e){return W(e).position==="static"}function Ot(e,t){return!q(e)||W(e).position==="fixed"?null:t?t(e):e.offsetParent}function Qt(e,t){const n=F(e);if(Re(e))return n;if(!q(e)){let i=Z(e);for(;i&&!ie(i);){if(B(i)&&!Me(i))return i;i=Z(i)}return n}let o=Ot(e,t);for(;o&&Gr(o)&&Me(o);)o=Ot(o,t);return o&&ie(o)&&Me(o)&&!Ye(o)?n:o||Xr(e)||n}const ao=async function(e){const t=this.getOffsetParent||Qt,n=this.getDimensions,o=await n(e.floating);return{reference:so(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function co(e){return W(e).direction==="rtl"}const lo={convertOffsetParentRelativeRectToViewportRelativeRect:Jr,getDocumentElement:Y,getClippingRect:oo,getOffsetParent:Qt,getElementRects:ao,getClientRects:Qr,getDimensions:io,getScale:oe,isElement:B,isRTL:co};function uo(e,t){let n=null,o;const i=Y(e);function r(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),r();const{left:l,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=be(u),m=be(i.clientWidth-(l+d)),g=be(i.clientHeight-(u+h)),v=be(l),x={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:I(0,H(1,c))||1};let P=!0;function b(_){const C=_[0].intersectionRatio;if(C!==c){if(!P)return s();C?s(!1,C):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{n=new IntersectionObserver(b,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,x)}n.observe(e)}return s(!0),r}function fo(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Xe(e),u=i||r?[...l?ge(l):[],...ge(t)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const d=l&&a?uo(l,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var P;(P=p)==null||P.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,g=c?te(e):null;c&&v();function v(){const y=te(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const po=zr,ho=Vr,mo=Wr,go=Yr,vo=Hr,Et=Br,yo=Ur,xo=(e,t,n)=>{const o=new Map,i={platform:lo,...n},r={...i.platform,_c:o};return Fr(e,t,{...i,platform:r})};var Pe=typeof document<"u"?Q.useLayoutEffect:Q.useEffect;function Ee(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,i;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(!Ee(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&e.$$typeof)&&!Ee(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function en(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rt(e,t){const n=en(e);return Math.round(t*n)/n}function Tt(e){const t=f.useRef(e);return Pe(()=>{t.current=e}),t}function wo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=f.useState(o);Ee(h,o)||p(o);const[m,g]=f.useState(null),[v,y]=f.useState(null),x=f.useCallback(O=>{O!==C.current&&(C.current=O,g(O))},[]),P=f.useCallback(O=>{O!==A.current&&(A.current=O,y(O))},[]),b=r||m,_=s||v,C=f.useRef(null),A=f.useRef(null),E=f.useRef(u),D=c!=null,R=Tt(c),M=Tt(i),$=f.useCallback(()=>{if(!C.current||!A.current)return;const O={placement:t,strategy:n,middleware:h};M.current&&(O.platform=M.current),xo(C.current,A.current,O).then(S=>{const N={...S,isPositioned:!0};j.current&&!Ee(E.current,N)&&(E.current=N,Lt.flushSync(()=>{d(N)}))})},[h,t,n,M]);Pe(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[l]);const j=f.useRef(!1);Pe(()=>(j.current=!0,()=>{j.current=!1}),[]),Pe(()=>{if(b&&(C.current=b),_&&(A.current=_),b&&_){if(R.current)return R.current(b,_,$);$()}},[b,_,$,R,D]);const T=f.useMemo(()=>({reference:C,floating:A,setReference:x,setFloating:P}),[x,P]),L=f.useMemo(()=>({reference:b,floating:_}),[b,_]),k=f.useMemo(()=>{const O={position:n,left:0,top:0};if(!L.floating)return O;const S=Rt(L.floating,u.x),N=Rt(L.floating,u.y);return a?{...O,transform:"translate("+S+"px, "+N+"px)",...en(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:N}},[n,a,L.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:$,refs:T,elements:L,floatingStyles:k}),[u,$,T,L,k])}const bo=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Et({element:o.current,padding:i}).fn(n):{}:o?Et({element:o,padding:i}).fn(n):{}}}},_o=(e,t)=>({...po(e),options:[e,t]}),Po=(e,t)=>({...ho(e),options:[e,t]}),Ao=(e,t)=>({...yo(e),options:[e,t]}),Co=(e,t)=>({...mo(e),options:[e,t]}),Oo=(e,t)=>({...go(e),options:[e,t]}),Eo=(e,t)=>({...vo(e),options:[e,t]}),Ro=(e,t)=>({...bo(e),options:[e,t]});var To="Arrow",tn=f.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...r}=e;return w.jsx(K.svg,{...r,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});tn.displayName=To;var So=tn;function No(e){const[t,n]=f.useState(void 0);return ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if("borderBoxSize"in r){const c=r.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ze="Popper",[nn,rn]=Bt(Ze),[Do,on]=nn(Ze),sn=e=>{const{__scopePopper:t,children:n}=e,[o,i]=f.useState(null);return w.jsx(Do,{scope:t,anchor:o,onAnchorChange:i,children:n})};sn.displayName=Ze;var an="PopperAnchor",cn=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,r=on(an,n),s=f.useRef(null),a=ne(t,s);return f.useEffect(()=>{r.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:w.jsx(K.div,{...i,ref:a})});cn.displayName=an;var Ke="PopperContent",[Lo,Mo]=nn(Ke),ln=f.forwardRef((e,t)=>{var tt,nt,rt,ot,it,st;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:r="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,v=on(Ke,n),[y,x]=f.useState(null),P=ne(t,ue=>x(ue)),[b,_]=f.useState(null),C=No(b),A=(C==null?void 0:C.width)??0,E=(C==null?void 0:C.height)??0,D=o+(r!=="center"?"-"+r:""),R=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(l)?l:[l],$=M.length>0,j={padding:R,boundary:M.filter(jo),altBoundary:$},{refs:T,floatingStyles:L,placement:k,isPositioned:O,middlewareData:S}=wo({strategy:"fixed",placement:D,whileElementsMounted:(...ue)=>fo(...ue,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[_o({mainAxis:i+E,alignmentAxis:s}),c&&Po({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Ao():void 0,...j}),c&&Co({...j}),Oo({...j,apply:({elements:ue,rects:at,availableWidth:Dn,availableHeight:Ln})=>{const{width:Mn,height:$n}=at.reference,we=ue.floating.style;we.setProperty("--radix-popper-available-width",`${Dn}px`),we.setProperty("--radix-popper-available-height",`${Ln}px`),we.setProperty("--radix-popper-anchor-width",`${Mn}px`),we.setProperty("--radix-popper-anchor-height",`${$n}px`)}}),b&&Ro({element:b,padding:a}),ko({arrowWidth:A,arrowHeight:E}),h&&Eo({strategy:"referenceHidden",...j})]}),[N,Le]=pn(k),xe=ae(m);ee(()=>{O&&(xe==null||xe())},[O,xe]);const En=(tt=S.arrow)==null?void 0:tt.x,Rn=(nt=S.arrow)==null?void 0:nt.y,Tn=((rt=S.arrow)==null?void 0:rt.centerOffset)!==0,[Sn,Nn]=f.useState();return ee(()=>{y&&Nn(window.getComputedStyle(y).zIndex)},[y]),w.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:O?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Sn,"--radix-popper-transform-origin":[(ot=S.transformOrigin)==null?void 0:ot.x,(it=S.transformOrigin)==null?void 0:it.y].join(" "),...((st=S.hide)==null?void 0:st.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(Lo,{scope:n,placedSide:N,onArrowChange:_,arrowX:En,arrowY:Rn,shouldHideArrow:Tn,children:w.jsx(K.div,{"data-side":N,"data-align":Le,...g,ref:P,style:{...g.style,animation:O?void 0:"none"}})})})});ln.displayName=Ke;var un="PopperArrow",$o={top:"bottom",right:"left",bottom:"top",left:"right"},fn=f.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,r=Mo(un,o),s=$o[r.placedSide];return w.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:w.jsx(So,{...i,ref:n,style:{...i.style,display:"block"}})})});fn.displayName=un;function jo(e){return e!==null}var ko=e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:n,rects:o,middlewareData:i}=t,s=((v=i.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[l,u]=pn(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+c/2;let m="",g="";return l==="bottom"?(m=s?d:`${h}px`,g=`${-c}px`):l==="top"?(m=s?d:`${h}px`,g=`${o.floating.height+c}px`):l==="right"?(m=`${-c}px`,g=s?d:`${p}px`):l==="left"&&(m=`${o.floating.width+c}px`,g=s?d:`${p}px`),{data:{x:m,y:g}}}});function pn(e){const[t,n="center"]=e.split("-");return[t,n]}var Io=sn,Fo=cn,Bo=ln,Wo=fn,Ho="Portal",dn=f.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[i,r]=f.useState(!1);ee(()=>r(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Nt.createPortal(w.jsx(K.div,{...o,ref:t}),s):null});dn.displayName=Ho;function qo(e,t){return f.useReducer((n,o)=>t[n][o]??n,e)}var Je=e=>{const{present:t,children:n}=e,o=zo(t),i=typeof n=="function"?n({present:o.isPresent}):f.Children.only(n),r=ne(o.ref,Vo(i));return typeof n=="function"||o.isPresent?f.cloneElement(i,{ref:r}):null};Je.displayName="Presence";function zo(e){const[t,n]=f.useState(),o=f.useRef({}),i=f.useRef(e),r=f.useRef("none"),s=e?"mounted":"unmounted",[a,c]=qo(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=_e(o.current);r.current=a==="mounted"?l:"none"},[a]),ee(()=>{const l=o.current,u=i.current;if(u!==e){const h=r.current,p=_e(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ee(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=p=>{const g=_e(o.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(r.current=_e(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function _e(e){return(e==null?void 0:e.animationName)||"none"}function Vo(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Uo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=Yo({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:o,a=ae(n),c=f.useCallback(l=>{if(r){const d=typeof l=="function"?l(e):l;d!==e&&a(d)}else i(l)},[r,e,i,a]);return[s,c]}function Yo({defaultProp:e,onChange:t}){const n=f.useState(e),[o]=n,i=f.useRef(o),r=ae(t);return f.useEffect(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),n}var Go="VisuallyHidden",hn=f.forwardRef((e,t)=>w.jsx(K.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));hn.displayName=Go;var Xo=hn,[Se,Ci]=Bt("Tooltip",[rn]),Ne=rn(),mn="TooltipProvider",Zo=700,He="tooltip.open",[Ko,Qe]=Se(mn),gn=e=>{const{__scopeTooltip:t,delayDuration:n=Zo,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:r}=e,[s,a]=f.useState(!0),c=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),w.jsx(Ko,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(u=>{c.current=u},[]),disableHoverableContent:i,children:r})};gn.displayName=mn;var De="Tooltip",[Jo,ye]=Se(De),vn=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=e,c=Qe(De,e.__scopeTooltip),l=Ne(t),[u,d]=f.useState(null),h=Sr(),p=f.useRef(0),m=s??c.disableHoverableContent,g=a??c.delayDuration,v=f.useRef(!1),[y=!1,x]=Uo({prop:o,defaultProp:i,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(He))):c.onClose(),r==null||r(A)}}),P=f.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),b=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,x(!0)},[x]),_=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,x(!0),p.current=0},g)},[g,x]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),w.jsx(Io,{...l,children:w.jsx(Jo,{scope:t,contentId:h,open:y,stateAttribute:P,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayed?C():b()},[c.isOpenDelayed,C,b]),onTriggerLeave:f.useCallback(()=>{m?_():(window.clearTimeout(p.current),p.current=0)},[_,m]),onOpen:b,onClose:_,disableHoverableContent:m,children:n})})};vn.displayName=De;var qe="TooltipTrigger",yn=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=ye(qe,n),r=Qe(qe,n),s=Ne(n),a=f.useRef(null),c=ne(t,a,i.onTriggerChange),l=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>l.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(Fo,{asChild:!0,...s,children:w.jsx(K.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:c,onPointerMove:z(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!r.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:z(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:z(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:z(e.onBlur,i.onClose),onClick:z(e.onClick,i.onClose)})})});yn.displayName=qe;var et="TooltipPortal",[Qo,ei]=Se(et,{forceMount:void 0}),xn=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,r=ye(et,t);return w.jsx(Qo,{scope:t,forceMount:n,children:w.jsx(Je,{present:n||r.open,children:w.jsx(dn,{asChild:!0,container:i,children:o})})})};xn.displayName=et;var se="TooltipContent",wn=f.forwardRef((e,t)=>{const n=ei(se,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...r}=e,s=ye(se,e.__scopeTooltip);return w.jsx(Je,{present:o||s.open,children:s.disableHoverableContent?w.jsx(bn,{side:i,...r,ref:t}):w.jsx(ti,{side:i,...r,ref:t})})}),ti=f.forwardRef((e,t)=>{const n=ye(se,e.__scopeTooltip),o=Qe(se,e.__scopeTooltip),i=f.useRef(null),r=ne(t,i),[s,a]=f.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=o,h=f.useCallback(()=>{a(null),d(!1)},[d]),p=f.useCallback((m,g)=>{const v=m.currentTarget,y={x:m.clientX,y:m.clientY},x=oi(y,v.getBoundingClientRect()),P=ii(y,x),b=si(g.getBoundingClientRect()),_=ci([...P,...b]);a(_),d(!0)},[d]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(c&&u){const m=v=>p(v,u),g=v=>p(v,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",g)}}},[c,u,p,h]),f.useEffect(()=>{if(s){const m=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(u==null?void 0:u.contains(v)),P=!ai(y,s);x?h():P&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,s,l,h]),w.jsx(bn,{...e,ref:r})}),[ni,ri]=Se(De,{isInside:!1}),bn=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:r,onPointerDownOutside:s,...a}=e,c=ye(se,n),l=Ne(n),{onClose:u}=c;return f.useEffect(()=>(document.addEventListener(He,u),()=>document.removeEventListener(He,u)),[u]),f.useEffect(()=>{if(c.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,u]),w.jsx(zt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:w.jsxs(Bo,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(Ht,{children:o}),w.jsx(ni,{scope:n,isInside:!0,children:w.jsx(Xo,{id:c.contentId,role:"tooltip",children:i||o})})]})})});wn.displayName=se;var _n="TooltipArrow",Pn=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Ne(n);return ri(_n,n).isInside?null:w.jsx(Wo,{...i,...o,ref:t})});Pn.displayName=_n;function oi(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function ii(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 si(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function ai(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,s=t.length-1;r<t.length;s=r++){const a=t[r].x,c=t[r].y,l=t[s].x,u=t[s].y;c>o!=u>o&&n<(l-a)*(o-c)/(u-c)+a&&(i=!i)}return i}function ci(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),li(t)}function li(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var ui=gn,fi=vn,pi=yn,di=xn,hi=wn,mi=Pn;function gi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $e={exports:{}};/*!
|
|
17
|
+
*/var mt;function lr(){return mt||(mt=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(ht)),ht.exports}var ur=lr();const fr=cr(ur),pr={"purpur-paragraph":"_purpur-paragraph_1rh57_1","purpur-paragraph--disabled":"_purpur-paragraph--disabled_1rh57_7","purpur-paragraph--hyphens":"_purpur-paragraph--hyphens_1rh57_10","purpur-paragraph--negative":"_purpur-paragraph--negative_1rh57_13","purpur-paragraph--paragraph-100":"_purpur-paragraph--paragraph-100_1rh57_16","purpur-paragraph--paragraph-100-medium":"_purpur-paragraph--paragraph-100-medium_1rh57_22","purpur-paragraph--paragraph-100-bold":"_purpur-paragraph--paragraph-100-bold_1rh57_29","purpur-paragraph--paragraph-200":"_purpur-paragraph--paragraph-200_1rh57_36","purpur-paragraph--preamble-100":"_purpur-paragraph--preamble-100_1rh57_42","purpur-paragraph--preamble-200":"_purpur-paragraph--preamble-200_1rh57_48","purpur-paragraph--additional-100":"_purpur-paragraph--additional-100_1rh57_54","purpur-paragraph--additional-100-medium":"_purpur-paragraph--additional-100-medium_1rh57_60","purpur-paragraph--overline-100":"_purpur-paragraph--overline-100_1rh57_67","purpur-paragraph--overline-200":"_purpur-paragraph--overline-200_1rh57_75"},dr=fr.bind(pr),$t={PARAGRAPH100:"paragraph-100"},pe="purpur-paragraph",jt=({children:e,className:t,disabled:n,enableHyphenation:o=!1,negative:i=!1,variant:r=$t.PARAGRAPH100,...s})=>{const a=dr(t,pe,`${pe}--${r}`,{[`${pe}--hyphens`]:o,[`${pe}--disabled`]:n,[`${pe}--negative`]:i});return w.jsx("p",{...s,className:a,children:e})};jt.displayName="Paragraph";const hr="400ms";function z(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function gt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function kt(...e){return t=>{let n=!1;const o=e.map(i=>{const r=gt(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<o.length;i++){const r=o[i];typeof r=="function"?r():gt(e[i],null)}}}}function ne(...e){return u.useCallback(kt(...e),e)}function It(e,t=[]){let n=[];function o(r,s){const a=u.createContext(s),c=n.length;n=[...n,s];const l=d=>{var y;const{scope:h,children:p,...m}=d,g=((y=h==null?void 0:h[e])==null?void 0:y[c])||a,v=u.useMemo(()=>m,Object.values(m));return w.jsx(g.Provider,{value:v,children:p})};l.displayName=r+"Provider";function f(d,h){var g;const p=((g=h==null?void 0:h[e])==null?void 0:g[c])||a,m=u.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${r}\``)}return[l,f]}const i=()=>{const r=n.map(s=>u.createContext(s));return function(a){const c=(a==null?void 0:a[e])||r;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[o,mr(i,...t)]}function mr(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=o.reduce((a,{useScope:c,scopeName:l})=>{const d=c(r)[`__scope${l}`];return{...a,...d}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Ft=u.forwardRef((e,t)=>{const{children:n,...o}=e,i=u.Children.toArray(n),r=i.find(gr);if(r){const s=r.props.children,a=i.map(c=>c===r?u.Children.count(s)>1?u.Children.only(null):u.isValidElement(s)?s.props.children:null:c);return w.jsx($e,{...o,ref:t,children:u.isValidElement(s)?u.cloneElement(s,void 0,a):null})}return w.jsx($e,{...o,ref:t,children:n})});Ft.displayName="Slot";var $e=u.forwardRef((e,t)=>{const{children:n,...o}=e;if(u.isValidElement(n)){const i=yr(n),r=vr(o,n.props);return n.type!==u.Fragment&&(r.ref=t?kt(t,i):i),u.cloneElement(n,r)}return u.Children.count(n)>1?u.Children.only(null):null});$e.displayName="SlotClone";var Bt=({children:e})=>w.jsx(w.Fragment,{children:e});function gr(e){return u.isValidElement(e)&&e.type===Bt}function vr(e,t){const n={...t};for(const o in t){const i=e[o],r=t[o];/^on[A-Z]/.test(o)?i&&r?n[o]=(...a)=>{r(...a),i(...a)}:i&&(n[o]=i):o==="style"?n[o]={...i,...r}:o==="className"&&(n[o]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function yr(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],K=xr.reduce((e,t)=>{const n=u.forwardRef((o,i)=>{const{asChild:r,...s}=o,a=r?Ft:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function wr(e,t){e&&Nt.flushSync(()=>e.dispatchEvent(t))}function ae(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function br(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e);u.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var _r="DismissableLayer",je="dismissableLayer.update",Ar="dismissableLayer.pointerDownOutside",Pr="dismissableLayer.focusOutside",vt,Wt=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ht=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:r,onInteractOutside:s,onDismiss:a,...c}=e,l=u.useContext(Wt),[f,d]=u.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=u.useState({}),m=ne(t,P=>d(P)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),x=f?g.indexOf(f):-1,A=l.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,_=Er(P=>{const E=P.target,D=[...l.branches].some(R=>R.contains(E));!b||D||(i==null||i(P),s==null||s(P),P.defaultPrevented||a==null||a())},h),C=Rr(P=>{const E=P.target;[...l.branches].some(R=>R.contains(E))||(r==null||r(P),s==null||s(P),P.defaultPrevented||a==null||a())},h);return br(P=>{x===l.layers.size-1&&(o==null||o(P),!P.defaultPrevented&&a&&(P.preventDefault(),a()))},h),u.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(vt=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),yt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=vt)}},[f,h,n,l]),u.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),yt())},[f,l]),u.useEffect(()=>{const P=()=>p({});return document.addEventListener(je,P),()=>document.removeEventListener(je,P)},[]),w.jsx(K.div,{...c,ref:m,style:{pointerEvents:A?b?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,C.onFocusCapture),onBlurCapture:z(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,_.onPointerDownCapture)})});Ht.displayName=_r;var Cr="DismissableLayerBranch",Or=u.forwardRef((e,t)=>{const n=u.useContext(Wt),o=u.useRef(null),i=ne(t,o);return u.useEffect(()=>{const r=o.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),w.jsx(K.div,{...e,ref:i})});Or.displayName=Cr;function Er(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e),o=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{const r=a=>{if(a.target&&!o.current){let c=function(){qt(Ar,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",r),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function Rr(e,t=globalThis==null?void 0:globalThis.document){const n=ae(e),o=u.useRef(!1);return u.useEffect(()=>{const i=r=>{r.target&&!o.current&&qt(Pr,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function yt(){const e=new CustomEvent(je);document.dispatchEvent(e)}function qt(e,t,n,{discrete:o}){const i=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?wr(i,r):i.dispatchEvent(r)}var ee=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Tr=u.useId||(()=>{}),Sr=0;function Nr(e){const[t,n]=u.useState(Tr());return ee(()=>{n(o=>o??String(Sr++))},[e]),t?`radix-${t}`:""}const Dr=["top","right","bottom","left"],H=Math.min,I=Math.max,_e=Math.round,xe=Math.floor,G=e=>({x:e,y:e}),Lr={left:"right",right:"left",bottom:"top",top:"bottom"},Mr={start:"end",end:"start"};function ke(e,t,n){return I(e,H(t,n))}function V(e,t){return typeof e=="function"?e(t):e}function U(e){return e.split("-")[0]}function ce(e){return e.split("-")[1]}function He(e){return e==="x"?"y":"x"}function qe(e){return e==="y"?"height":"width"}function X(e){return["top","bottom"].includes(U(e))?"y":"x"}function ze(e){return He(X(e))}function $r(e,t,n){n===void 0&&(n=!1);const o=ce(e),i=ze(e),r=qe(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Ae(s)),[s,Ae(s)]}function jr(e){const t=Ae(e);return[Ie(e),t,Ie(t)]}function Ie(e){return e.replace(/start|end/g,t=>Mr[t])}function kr(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:s;default:return[]}}function Ir(e,t,n,o){const i=ce(e);let r=kr(U(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Ie)))),r}function Ae(e){return e.replace(/left|right|bottom|top/g,t=>Lr[t])}function Fr(e){return{top:0,right:0,bottom:0,left:0,...e}}function zt(e){return typeof e!="number"?Fr(e):{top:e,right:e,bottom:e,left:e}}function Pe(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function xt(e,t,n){let{reference:o,floating:i}=e;const r=X(t),s=ze(t),a=qe(s),c=U(t),l=r==="y",f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(c){case"top":p={x:f,y:o.y-i.height};break;case"bottom":p={x:f,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-i.width,y:d};break;default:p={x:o.x,y:o.y}}switch(ce(t)){case"start":p[s]-=h*(n&&l?-1:1);break;case"end":p[s]+=h*(n&&l?-1:1);break}return p}const Br=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=xt(l,o,c),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:v,fn:y}=a[g],{x,y:A,data:b,reset:_}=await y({x:f,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});f=x??f,d=A??d,p={...p,[v]:{...p[v],...b}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(l=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:f,y:d}=xt(l,h,c)),g=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}};async function de(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=V(t,e),m=zt(p),v=a[h?d==="floating"?"reference":"floating":d],y=Pe(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:l,rootBoundary:f,strategy:c})),x=d==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),b=await(r.isElement==null?void 0:r.isElement(A))?await(r.getScale==null?void 0:r.getScale(A))||{x:1,y:1}:{x:1,y:1},_=Pe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:A,strategy:c}):x);return{top:(y.top-_.top+m.top)/b.y,bottom:(_.bottom-y.bottom+m.bottom)/b.y,left:(y.left-_.left+m.left)/b.x,right:(_.right-y.right+m.right)/b.x}}const Wr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:c}=t,{element:l,padding:f=0}=V(e,t)||{};if(l==null)return{};const d=zt(f),h={x:n,y:o},p=ze(i),m=qe(p),g=await s.getDimensions(l),v=p==="y",y=v?"top":"left",x=v?"bottom":"right",A=v?"clientHeight":"clientWidth",b=r.reference[m]+r.reference[p]-h[p]-r.floating[m],_=h[p]-r.reference[p],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let P=C?C[A]:0;(!P||!await(s.isElement==null?void 0:s.isElement(C)))&&(P=a.floating[A]||r.floating[m]);const E=b/2-_/2,D=P/2-g[m]/2-1,R=H(d[y],D),M=H(d[x],D),$=R,j=P-g[m]-M,T=P/2-g[m]/2+E,L=ke($,T,j),k=!c.arrow&&ce(i)!=null&&T!==L&&r.reference[m]/2-(T<$?R:M)-g[m]/2<0,O=k?T<$?T-$:T-j:0;return{[p]:h[p]+O,data:{[p]:L,centerOffset:T-L-O,...k&&{alignmentOffset:O}},reset:k}}}),Hr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...v}=V(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=U(i),x=X(a),A=U(a)===a,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),_=h||(A||!g?[Ae(a)]:jr(a)),C=m!=="none";!h&&C&&_.push(...Ir(a,g,m,b));const P=[a,..._],E=await de(t,v),D=[];let R=((o=r.flip)==null?void 0:o.overflows)||[];if(f&&D.push(E[y]),d){const T=$r(i,s,b);D.push(E[T[0]],E[T[1]])}if(R=[...R,{placement:i,overflows:D}],!D.every(T=>T<=0)){var M,$;const T=(((M=r.flip)==null?void 0:M.index)||0)+1,L=P[T];if(L)return{data:{index:T,overflows:R},reset:{placement:L}};let k=($=R.filter(O=>O.overflows[0]<=0).sort((O,S)=>O.overflows[1]-S.overflows[1])[0])==null?void 0:$.placement;if(!k)switch(p){case"bestFit":{var j;const O=(j=R.filter(S=>{if(C){const N=X(S.placement);return N===x||N==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(N=>N>0).reduce((N,Ne)=>N+Ne,0)]).sort((S,N)=>S[1]-N[1])[0])==null?void 0:j[0];O&&(k=O);break}case"initialPlacement":k=a;break}if(i!==k)return{reset:{placement:k}}}return{}}}};function wt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bt(e){return Dr.some(t=>e[t]>=0)}const qr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=V(e,t);switch(o){case"referenceHidden":{const r=await de(t,{...i,elementContext:"reference"}),s=wt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:bt(s)}}}case"escaped":{const r=await de(t,{...i,altBoundary:!0}),s=wt(r,n.floating);return{data:{escapedOffsets:s,escaped:bt(s)}}}default:return{}}}}};async function zr(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=U(n),a=ce(n),c=X(n)==="y",l=["left","top"].includes(s)?-1:1,f=r&&c?-1:1,d=V(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),c?{x:p*f,y:h*l}:{x:h*l,y:p*f}}const Vr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=t,c=await zr(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Ur=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:y,y:x}=v;return{x:y,y:x}}},...c}=V(e,t),l={x:n,y:o},f=await de(t,c),d=X(U(i)),h=He(d);let p=l[h],m=l[d];if(r){const v=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=p+f[v],A=p-f[y];p=ke(x,p,A)}if(s){const v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=m+f[v],A=m-f[y];m=ke(x,m,A)}const g=a.fn({...t,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}},Yr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=V(e,t),f={x:n,y:o},d=X(i),h=He(d);let p=f[h],m=f[d];const g=V(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const A=h==="y"?"height":"width",b=r.reference[h]-r.floating[A]+v.mainAxis,_=r.reference[h]+r.reference[A]-v.mainAxis;p<b?p=b:p>_&&(p=_)}if(l){var y,x;const A=h==="y"?"width":"height",b=["top","left"].includes(U(i)),_=r.reference[d]-r.floating[A]+(b&&((y=s.offset)==null?void 0:y[d])||0)+(b?0:v.crossAxis),C=r.reference[d]+r.reference[A]+(b?0:((x=s.offset)==null?void 0:x[d])||0)-(b?v.crossAxis:0);m<_?m=_:m>C&&(m=C)}return{[h]:p,[d]:m}}}},Gr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:r}=t,{apply:s=()=>{},...a}=V(e,t),c=await de(t,a),l=U(n),f=ce(n),d=X(n)==="y",{width:h,height:p}=o.floating;let m,g;l==="top"||l==="bottom"?(m=l,g=f===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=l,m=f==="end"?"top":"bottom");const v=p-c.top-c.bottom,y=h-c.left-c.right,x=H(p-c[m],v),A=H(h-c[g],y),b=!t.middlewareData.shift;let _=x,C=A;if(d?C=f||b?H(A,y):y:_=f||b?H(x,v):v,b&&!f){const E=I(c.left,0),D=I(c.right,0),R=I(c.top,0),M=I(c.bottom,0);d?C=h-2*(E!==0||D!==0?E+D:I(c.left,c.right)):_=p-2*(R!==0||M!==0?R+M:I(c.top,c.bottom))}await s({...t,availableWidth:C,availableHeight:_});const P=await i.getDimensions(r.floating);return h!==P.width||p!==P.height?{reset:{rects:!0}}:{}}}};function le(e){return Vt(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Y(e){var t;return(t=(Vt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Vt(e){return e instanceof Node||e instanceof F(e).Node}function B(e){return e instanceof Element||e instanceof F(e).Element}function q(e){return e instanceof HTMLElement||e instanceof F(e).HTMLElement}function _t(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof F(e).ShadowRoot}function me(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Xr(e){return["table","td","th"].includes(le(e))}function Oe(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ve(e){const t=Ue(),n=B(e)?W(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Zr(e){let t=Z(e);for(;q(t)&&!ie(t);){if(Ve(t))return t;if(Oe(t))return null;t=Z(t)}return null}function Ue(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ie(e){return["html","body","#document"].includes(le(e))}function W(e){return F(e).getComputedStyle(e)}function Ee(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(le(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_t(e)&&e.host||Y(e);return _t(t)?t.host:t}function Ut(e){const t=Z(e);return ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&me(t)?t:Ut(t)}function he(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ut(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=F(i);if(r){const a=Fe(s);return t.concat(s,s.visualViewport||[],me(i)?i:[],a&&n?he(a):[])}return t.concat(i,he(i,[],n))}function Fe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yt(e){const t=W(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=q(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,a=_e(n)!==r||_e(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function Ye(e){return B(e)?e:e.contextElement}function oe(e){const t=Ye(e);if(!q(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Yt(t);let s=(r?_e(n.width):n.width)/o,a=(r?_e(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Kr=G(0);function Gt(e){const t=F(e);return!Ue()||!t.visualViewport?Kr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jr(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==F(e)?!1:t}function te(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Ye(e);let s=G(1);t&&(o?B(o)&&(s=oe(o)):s=oe(e));const a=Jr(r,n,o)?Gt(r):G(0);let c=(i.left+a.x)/s.x,l=(i.top+a.y)/s.y,f=i.width/s.x,d=i.height/s.y;if(r){const h=F(r),p=o&&B(o)?F(o):o;let m=h,g=Fe(m);for(;g&&o&&p!==m;){const v=oe(g),y=g.getBoundingClientRect(),x=W(g),A=y.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,b=y.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,l*=v.y,f*=v.x,d*=v.y,c+=A,l+=b,m=F(g),g=Fe(m)}}return Pe({width:f,height:d,x:c,y:l})}function Qr(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Y(o),a=t?Oe(t.floating):!1;if(o===s||a&&r)return n;let c={scrollLeft:0,scrollTop:0},l=G(1);const f=G(0),d=q(o);if((d||!d&&!r)&&((le(o)!=="body"||me(s))&&(c=Ee(o)),q(o))){const h=te(o);l=oe(o),f.x=h.x+o.clientLeft,f.y=h.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+f.x,y:n.y*l.y-c.scrollTop*l.y+f.y}}function eo(e){return Array.from(e.getClientRects())}function Xt(e){return te(Y(e)).left+Ee(e).scrollLeft}function to(e){const t=Y(e),n=Ee(e),o=e.ownerDocument.body,i=I(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=I(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Xt(e);const a=-n.scrollTop;return W(o).direction==="rtl"&&(s+=I(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}function no(e,t){const n=F(e),o=Y(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,c=0;if(i){r=i.width,s=i.height;const l=Ue();(!l||l&&t==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:r,height:s,x:a,y:c}}function ro(e,t){const n=te(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=q(e)?oe(e):G(1),s=e.clientWidth*r.x,a=e.clientHeight*r.y,c=i*r.x,l=o*r.y;return{width:s,height:a,x:c,y:l}}function At(e,t,n){let o;if(t==="viewport")o=no(e,n);else if(t==="document")o=to(Y(e));else if(B(t))o=ro(t,n);else{const i=Gt(e);o={...t,x:t.x-i.x,y:t.y-i.y}}return Pe(o)}function Zt(e,t){const n=Z(e);return n===t||!B(n)||ie(n)?!1:W(n).position==="fixed"||Zt(n,t)}function oo(e,t){const n=t.get(e);if(n)return n;let o=he(e,[],!1).filter(a=>B(a)&&le(a)!=="body"),i=null;const r=W(e).position==="fixed";let s=r?Z(e):e;for(;B(s)&&!ie(s);){const a=W(s),c=Ve(s);!c&&a.position==="fixed"&&(i=null),(r?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||me(s)&&!c&&Zt(e,s))?o=o.filter(f=>f!==s):i=a,s=Z(s)}return t.set(e,o),o}function io(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?Oe(t)?[]:oo(t,this._c):[].concat(n),o],a=s[0],c=s.reduce((l,f)=>{const d=At(t,f,i);return l.top=I(d.top,l.top),l.right=H(d.right,l.right),l.bottom=H(d.bottom,l.bottom),l.left=I(d.left,l.left),l},At(t,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function so(e){const{width:t,height:n}=Yt(e);return{width:t,height:n}}function ao(e,t,n){const o=q(t),i=Y(t),r=n==="fixed",s=te(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const c=G(0);if(o||!o&&!r)if((le(t)!=="body"||me(i))&&(a=Ee(t)),o){const d=te(t,!0,r,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else i&&(c.x=Xt(i));const l=s.left+a.scrollLeft-c.x,f=s.top+a.scrollTop-c.y;return{x:l,y:f,width:s.width,height:s.height}}function De(e){return W(e).position==="static"}function Pt(e,t){return!q(e)||W(e).position==="fixed"?null:t?t(e):e.offsetParent}function Kt(e,t){const n=F(e);if(Oe(e))return n;if(!q(e)){let i=Z(e);for(;i&&!ie(i);){if(B(i)&&!De(i))return i;i=Z(i)}return n}let o=Pt(e,t);for(;o&&Xr(o)&&De(o);)o=Pt(o,t);return o&&ie(o)&&De(o)&&!Ve(o)?n:o||Zr(e)||n}const co=async function(e){const t=this.getOffsetParent||Kt,n=this.getDimensions,o=await n(e.floating);return{reference:ao(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function lo(e){return W(e).direction==="rtl"}const uo={convertOffsetParentRelativeRectToViewportRelativeRect:Qr,getDocumentElement:Y,getClippingRect:io,getOffsetParent:Kt,getElementRects:co,getClientRects:eo,getDimensions:so,getScale:oe,isElement:B,isRTL:lo};function fo(e,t){let n=null,o;const i=Y(e);function r(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),r();const{left:l,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=xe(f),m=xe(i.clientWidth-(l+d)),g=xe(i.clientHeight-(f+h)),v=xe(l),x={rootMargin:-p+"px "+-m+"px "+-g+"px "+-v+"px",threshold:I(0,H(1,c))||1};let A=!0;function b(_){const C=_[0].intersectionRatio;if(C!==c){if(!A)return s();C?s(!1,C):o=setTimeout(()=>{s(!1,1e-7)},1e3)}A=!1}try{n=new IntersectionObserver(b,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,x)}n.observe(e)}return s(!0),r}function po(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=Ye(e),f=i||r?[...l?he(l):[],...he(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const d=l&&a?fo(l,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var A;(A=p)==null||A.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,g=c?te(e):null;c&&v();function v(){const y=te(e);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,m=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const ho=Vr,mo=Ur,go=Hr,vo=Gr,yo=qr,Ct=Wr,xo=Yr,wo=(e,t,n)=>{const o=new Map,i={platform:uo,...n},r={...i.platform,_c:o};return Br(e,t,{...i,platform:r})};var be=typeof document<"u"?Q.useLayoutEffect:Q.useEffect;function Ce(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,i;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(!Ce(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&e.$$typeof)&&!Ce(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function Jt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ot(e,t){const n=Jt(e);return Math.round(t*n)/n}function Et(e){const t=u.useRef(e);return be(()=>{t.current=e}),t}function bo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[f,d]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=u.useState(o);Ce(h,o)||p(o);const[m,g]=u.useState(null),[v,y]=u.useState(null),x=u.useCallback(O=>{O!==C.current&&(C.current=O,g(O))},[]),A=u.useCallback(O=>{O!==P.current&&(P.current=O,y(O))},[]),b=r||m,_=s||v,C=u.useRef(null),P=u.useRef(null),E=u.useRef(f),D=c!=null,R=Et(c),M=Et(i),$=u.useCallback(()=>{if(!C.current||!P.current)return;const O={placement:t,strategy:n,middleware:h};M.current&&(O.platform=M.current),wo(C.current,P.current,O).then(S=>{const N={...S,isPositioned:!0};j.current&&!Ce(E.current,N)&&(E.current=N,Nt.flushSync(()=>{d(N)}))})},[h,t,n,M]);be(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[l]);const j=u.useRef(!1);be(()=>(j.current=!0,()=>{j.current=!1}),[]),be(()=>{if(b&&(C.current=b),_&&(P.current=_),b&&_){if(R.current)return R.current(b,_,$);$()}},[b,_,$,R,D]);const T=u.useMemo(()=>({reference:C,floating:P,setReference:x,setFloating:A}),[x,A]),L=u.useMemo(()=>({reference:b,floating:_}),[b,_]),k=u.useMemo(()=>{const O={position:n,left:0,top:0};if(!L.floating)return O;const S=Ot(L.floating,f.x),N=Ot(L.floating,f.y);return a?{...O,transform:"translate("+S+"px, "+N+"px)",...Jt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:S,top:N}},[n,a,L.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:$,refs:T,elements:L,floatingStyles:k}),[f,$,T,L,k])}const _o=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Ct({element:o.current,padding:i}).fn(n):{}:o?Ct({element:o,padding:i}).fn(n):{}}}},Ao=(e,t)=>({...ho(e),options:[e,t]}),Po=(e,t)=>({...mo(e),options:[e,t]}),Co=(e,t)=>({...xo(e),options:[e,t]}),Oo=(e,t)=>({...go(e),options:[e,t]}),Eo=(e,t)=>({...vo(e),options:[e,t]}),Ro=(e,t)=>({...yo(e),options:[e,t]}),To=(e,t)=>({..._o(e),options:[e,t]});var So="Arrow",Qt=u.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...r}=e;return w.jsx(K.svg,{...r,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qt.displayName=So;var No=Qt;function Do(e){const[t,n]=u.useState(void 0);return ee(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const r=i[0];let s,a;if("borderBoxSize"in r){const c=r.borderBoxSize,l=Array.isArray(c)?c[0]:c;s=l.inlineSize,a=l.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ge="Popper",[en,tn]=It(Ge),[Lo,nn]=en(Ge),rn=e=>{const{__scopePopper:t,children:n}=e,[o,i]=u.useState(null);return w.jsx(Lo,{scope:t,anchor:o,onAnchorChange:i,children:n})};rn.displayName=Ge;var on="PopperAnchor",sn=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,r=nn(on,n),s=u.useRef(null),a=ne(t,s);return u.useEffect(()=>{r.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:w.jsx(K.div,{...i,ref:a})});sn.displayName=on;var Xe="PopperContent",[Mo,$o]=en(Xe),an=u.forwardRef((e,t)=>{var Qe,et,tt,nt,rt,ot;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:r="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...g}=e,v=nn(Xe,n),[y,x]=u.useState(null),A=ne(t,ue=>x(ue)),[b,_]=u.useState(null),C=Do(b),P=(C==null?void 0:C.width)??0,E=(C==null?void 0:C.height)??0,D=o+(r!=="center"?"-"+r:""),R=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(l)?l:[l],$=M.length>0,j={padding:R,boundary:M.filter(ko),altBoundary:$},{refs:T,floatingStyles:L,placement:k,isPositioned:O,middlewareData:S}=bo({strategy:"fixed",placement:D,whileElementsMounted:(...ue)=>po(...ue,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Ao({mainAxis:i+E,alignmentAxis:s}),c&&Po({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Co():void 0,...j}),c&&Oo({...j}),Eo({...j,apply:({elements:ue,rects:it,availableWidth:Sn,availableHeight:Nn})=>{const{width:Dn,height:Ln}=it.reference,ye=ue.floating.style;ye.setProperty("--radix-popper-available-width",`${Sn}px`),ye.setProperty("--radix-popper-available-height",`${Nn}px`),ye.setProperty("--radix-popper-anchor-width",`${Dn}px`),ye.setProperty("--radix-popper-anchor-height",`${Ln}px`)}}),b&&To({element:b,padding:a}),Io({arrowWidth:P,arrowHeight:E}),h&&Ro({strategy:"referenceHidden",...j})]}),[N,Ne]=un(k),ve=ae(m);ee(()=>{O&&(ve==null||ve())},[O,ve]);const Cn=(Qe=S.arrow)==null?void 0:Qe.x,On=(et=S.arrow)==null?void 0:et.y,En=((tt=S.arrow)==null?void 0:tt.centerOffset)!==0,[Rn,Tn]=u.useState();return ee(()=>{y&&Tn(window.getComputedStyle(y).zIndex)},[y]),w.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:O?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Rn,"--radix-popper-transform-origin":[(nt=S.transformOrigin)==null?void 0:nt.x,(rt=S.transformOrigin)==null?void 0:rt.y].join(" "),...((ot=S.hide)==null?void 0:ot.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(Mo,{scope:n,placedSide:N,onArrowChange:_,arrowX:Cn,arrowY:On,shouldHideArrow:En,children:w.jsx(K.div,{"data-side":N,"data-align":Ne,...g,ref:A,style:{...g.style,animation:O?void 0:"none"}})})})});an.displayName=Xe;var cn="PopperArrow",jo={top:"bottom",right:"left",bottom:"top",left:"right"},ln=u.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,r=$o(cn,o),s=jo[r.placedSide];return w.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:w.jsx(No,{...i,ref:n,style:{...i.style,display:"block"}})})});ln.displayName=cn;function ko(e){return e!==null}var Io=e=>({name:"transformOrigin",options:e,fn(t){var v,y,x;const{placement:n,rects:o,middlewareData:i}=t,s=((v=i.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[l,f]=un(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+c/2;let m="",g="";return l==="bottom"?(m=s?d:`${h}px`,g=`${-c}px`):l==="top"?(m=s?d:`${h}px`,g=`${o.floating.height+c}px`):l==="right"?(m=`${-c}px`,g=s?d:`${p}px`):l==="left"&&(m=`${o.floating.width+c}px`,g=s?d:`${p}px`),{data:{x:m,y:g}}}});function un(e){const[t,n="center"]=e.split("-");return[t,n]}var Fo=rn,Bo=sn,Wo=an,Ho=ln,qo="Portal",fn=u.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[i,r]=u.useState(!1);ee(()=>r(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Tt.createPortal(w.jsx(K.div,{...o,ref:t}),s):null});fn.displayName=qo;function zo(e,t){return u.useReducer((n,o)=>t[n][o]??n,e)}var Ze=e=>{const{present:t,children:n}=e,o=Vo(t),i=typeof n=="function"?n({present:o.isPresent}):u.Children.only(n),r=ne(o.ref,Uo(i));return typeof n=="function"||o.isPresent?u.cloneElement(i,{ref:r}):null};Ze.displayName="Presence";function Vo(e){const[t,n]=u.useState(),o=u.useRef({}),i=u.useRef(e),r=u.useRef("none"),s=e?"mounted":"unmounted",[a,c]=zo(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const l=we(o.current);r.current=a==="mounted"?l:"none"},[a]),ee(()=>{const l=o.current,f=i.current;if(f!==e){const h=r.current,p=we(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ee(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=p=>{const g=we(o.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(r.current=we(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function we(e){return(e==null?void 0:e.animationName)||"none"}function Uo(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,i]=Go({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:o,a=ae(n),c=u.useCallback(l=>{if(r){const d=typeof l=="function"?l(e):l;d!==e&&a(d)}else i(l)},[r,e,i,a]);return[s,c]}function Go({defaultProp:e,onChange:t}){const n=u.useState(e),[o]=n,i=u.useRef(o),r=ae(t);return u.useEffect(()=>{i.current!==o&&(r(o),i.current=o)},[o,i,r]),n}var Xo="VisuallyHidden",pn=u.forwardRef((e,t)=>w.jsx(K.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));pn.displayName=Xo;var Zo=pn,[Re,Oi]=It("Tooltip",[tn]),Te=tn(),dn="TooltipProvider",Ko=700,Be="tooltip.open",[Jo,Ke]=Re(dn),hn=e=>{const{__scopeTooltip:t,delayDuration:n=Ko,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:r}=e,[s,a]=u.useState(!0),c=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const f=l.current;return()=>window.clearTimeout(f)},[]),w.jsx(Jo,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:u.useCallback(f=>{c.current=f},[]),disableHoverableContent:i,children:r})};hn.displayName=dn;var Se="Tooltip",[Qo,ge]=Re(Se),mn=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:r,disableHoverableContent:s,delayDuration:a}=e,c=Ke(Se,e.__scopeTooltip),l=Te(t),[f,d]=u.useState(null),h=Nr(),p=u.useRef(0),m=s??c.disableHoverableContent,g=a??c.delayDuration,v=u.useRef(!1),[y=!1,x]=Yo({prop:o,defaultProp:i,onChange:P=>{P?(c.onOpen(),document.dispatchEvent(new CustomEvent(Be))):c.onClose(),r==null||r(P)}}),A=u.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),b=u.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,x(!0)},[x]),_=u.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=u.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,x(!0),p.current=0},g)},[g,x]);return u.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),w.jsx(Fo,{...l,children:w.jsx(Qo,{scope:t,contentId:h,open:y,stateAttribute:A,trigger:f,onTriggerChange:d,onTriggerEnter:u.useCallback(()=>{c.isOpenDelayed?C():b()},[c.isOpenDelayed,C,b]),onTriggerLeave:u.useCallback(()=>{m?_():(window.clearTimeout(p.current),p.current=0)},[_,m]),onOpen:b,onClose:_,disableHoverableContent:m,children:n})})};mn.displayName=Se;var We="TooltipTrigger",gn=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=ge(We,n),r=Ke(We,n),s=Te(n),a=u.useRef(null),c=ne(t,a,i.onTriggerChange),l=u.useRef(!1),f=u.useRef(!1),d=u.useCallback(()=>l.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),w.jsx(Bo,{asChild:!0,...s,children:w.jsx(K.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:c,onPointerMove:z(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!r.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:z(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:z(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:z(e.onBlur,i.onClose),onClick:z(e.onClick,i.onClose)})})});gn.displayName=We;var Je="TooltipPortal",[ei,ti]=Re(Je,{forceMount:void 0}),vn=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,r=ge(Je,t);return w.jsx(ei,{scope:t,forceMount:n,children:w.jsx(Ze,{present:n||r.open,children:w.jsx(fn,{asChild:!0,container:i,children:o})})})};vn.displayName=Je;var se="TooltipContent",yn=u.forwardRef((e,t)=>{const n=ti(se,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...r}=e,s=ge(se,e.__scopeTooltip);return w.jsx(Ze,{present:o||s.open,children:s.disableHoverableContent?w.jsx(xn,{side:i,...r,ref:t}):w.jsx(ni,{side:i,...r,ref:t})})}),ni=u.forwardRef((e,t)=>{const n=ge(se,e.__scopeTooltip),o=Ke(se,e.__scopeTooltip),i=u.useRef(null),r=ne(t,i),[s,a]=u.useState(null),{trigger:c,onClose:l}=n,f=i.current,{onPointerInTransitChange:d}=o,h=u.useCallback(()=>{a(null),d(!1)},[d]),p=u.useCallback((m,g)=>{const v=m.currentTarget,y={x:m.clientX,y:m.clientY},x=ii(y,v.getBoundingClientRect()),A=si(y,x),b=ai(g.getBoundingClientRect()),_=li([...A,...b]);a(_),d(!0)},[d]);return u.useEffect(()=>()=>h(),[h]),u.useEffect(()=>{if(c&&f){const m=v=>p(v,f),g=v=>p(v,c);return c.addEventListener("pointerleave",m),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",m),f.removeEventListener("pointerleave",g)}}},[c,f,p,h]),u.useEffect(()=>{if(s){const m=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),A=!ci(y,s);x?h():A&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,f,s,l,h]),w.jsx(xn,{...e,ref:r})}),[ri,oi]=Re(Se,{isInside:!1}),xn=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:r,onPointerDownOutside:s,...a}=e,c=ge(se,n),l=Te(n),{onClose:f}=c;return u.useEffect(()=>(document.addEventListener(Be,f),()=>document.removeEventListener(Be,f)),[f]),u.useEffect(()=>{if(c.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),w.jsx(Ht,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:w.jsxs(Wo,{"data-state":c.stateAttribute,...l,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(Bt,{children:o}),w.jsx(ri,{scope:n,isInside:!0,children:w.jsx(Zo,{id:c.contentId,role:"tooltip",children:i||o})})]})})});yn.displayName=se;var wn="TooltipArrow",bn=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Te(n);return oi(wn,n).isInside?null:w.jsx(Ho,{...i,...o,ref:t})});bn.displayName=wn;function ii(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function si(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 ai(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function ci(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,s=t.length-1;r<t.length;s=r++){const a=t[r].x,c=t[r].y,l=t[s].x,f=t[s].y;c>o!=f>o&&n<(l-a)*(o-c)/(f-c)+a&&(i=!i)}return i}function li(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),ui(t)}function ui(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const r=t[t.length-1],s=t[t.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],s=n[n.length-2];if((r.x-s.x)*(i.y-s.y)>=(r.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fi=hn,pi=mn,di=gn,hi=vn,mi=yn,gi=bn;function vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Le={exports:{}};/*!
|
|
18
18
|
Copyright (c) 2018 Jed Watson.
|
|
19
19
|
Licensed under the MIT License (MIT), see
|
|
20
20
|
http://jedwatson.github.io/classnames
|
|
21
|
-
*/var
|
|
21
|
+
*/var Rt;function yi(){return Rt||(Rt=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(r=i(r,o.call(this,a)))}return r}function o(r){if(typeof r=="string"||typeof r=="number")return this&&this[r]||r;if(typeof r!="object")return"";if(Array.isArray(r))return n.apply(this,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var s="";for(var a in r)t.call(r,a)&&r[a]&&(s=i(s,this&&this[a]||a));return s}function i(r,s){return s?r?r+" "+s:r+s:r}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(Le)),Le.exports}var xi=yi();const wi=vi(xi),bi="_slideDownAndFade_fkagk_1",_i="_slideLeftAndFade_fkagk_1",Ai="_slideUpAndFade_fkagk_1",Pi="_slideRightAndFade_fkagk_1",Ci={"purpur-tooltip":"_purpur-tooltip_fkagk_1","purpur-tooltip__content":"_purpur-tooltip__content_fkagk_4","purpur-tooltip__content--primary":"_purpur-tooltip__content--primary_fkagk_14","purpur-tooltip__content--primary-negative":"_purpur-tooltip__content--primary-negative_fkagk_17",slideDownAndFade:bi,slideLeftAndFade:_i,slideUpAndFade:Ai,slideRightAndFade:Pi,"purpur-tooltip__arrow--primary":"_purpur-tooltip__arrow--primary_fkagk_32","purpur-tooltip__arrow--primary-negative":"_purpur-tooltip__arrow--primary-negative_fkagk_35"},Me=wi.bind(Ci),_n={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"},An={START:"start",CENTER:"center",END:"end"},re="purpur-tooltip",Pn=Q.forwardRef(({["data-testid"]:e,buttonSize:t="md",children:n,className:o,contentClassName:i,negative:r=!1,position:s=_n.TOP,align:a=An.CENTER,triggerAriaLabel:c,triggerElement:l,...f},d)=>{const[h,p]=Q.useState(!1),m=Me(o,re,`${re}--primary${r?"-negative":""}`),g=w.jsx(Dt,{ref:d,"aria-label":c,"aria-expanded":h,variant:Xn.TERTIARY_PURPLE,negative:r,iconOnly:!0,"data-testid":`${e}-trigger-button`,size:t,children:w.jsx(Mt,{size:"md"})});return w.jsx("div",{"data-testid":e,className:m,children:w.jsx(fi,{delayDuration:parseInt(hr),children:w.jsxs(pi,{open:h,onOpenChange:p,...f,children:[w.jsx(di,{asChild:!0,onClick:v=>{v.preventDefault(),p(!0)},children:Q.Children.count(l)===0?g:l}),w.jsx(hi,{children:w.jsxs(mi,{side:s,align:a,className:Me(i,`${re}__content`,`${re}__content--primary${r?"-negative":""}`),sideOffset:-5,"data-testid":`${e}-content`,children:[typeof n=="string"?w.jsx(jt,{variant:$t.PARAGRAPH100,negative:!r,"data-testid":`${e}-paragraph`,children:n}):n,w.jsx(gi,{className:Me(`${re}__arrow`,`${re}__arrow--primary${r?"-negative":""}`)})]})})]})})})});Pn.displayName="Tooltip";exports.TOOLTIP_ALIGN=An;exports.TOOLTIP_POSITION=_n;exports.Tooltip=Pn;
|
|
22
22
|
//# sourceMappingURL=tooltip.cjs.js.map
|