@worldresources/wri-design-systems 2.177.0 → 2.178.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/dist/index.cjs.js CHANGED
@@ -213,16 +213,17 @@
213
213
  }
214
214
  }
215
215
  }
216
- `),"aria-label":o,disabled:l,onClick:c,mr:u&&!d?"16px":"0",mb:u&&d?"16px":"0",children:t.jsxs(e.Box,{display:"flex",overflow:"hidden",style:{justifyContent:"flex-end",alignItems:"center"},whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",maxWidth:n?"150px":"32px",padding:"8px",margin:n?"8px":"0",children:[i&&t.jsx(e.Box,{as:"span",mr:i&&n?"8px":"0px",children:t.jsx(pe,{content:s,disabled:!s,children:i})}),a&&t.jsx(e.Box,{"aria-hidden":!n,overflow:"hidden",maxWidth:n?"150px":"0px",whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",children:t.jsx(pe,{content:s,disabled:!s,children:a})})]})});var p};const fe=({items:r,vertical:o=!1,expanded:i=!1,showExpandedToggle:a,autoCollapse:s=!1,ariaLabel:l,defaultGaps:c})=>{const[u,d]=n.useState(i),{containerRef:p,visibleNumberOfItems:h,shouldForceCollapse:f}=function({itemsCount:e,isExpanded:t,isVertical:r,collapsedWidth:o,expandedLabelWidth:i,gap:a=0,showExpandedToggle:s,autoCollapse:l}){const c=n.useRef(null),[u,d]=n.useState(0),[p,h]=n.useState(e),[f,x]=n.useState(!1);return n.useEffect((()=>{if(!c.current)return;const e=new ResizeObserver((e=>{const t=e[0];d(Math.floor(t.contentRect.width))}));return e.observe(c.current),()=>e.disconnect()}),[]),n.useEffect((()=>{if(0===u)return;if(!l)return x(!1),void h(e);const n=u-(s?o+a:0),c=o+a;x(e*(t?i+a:c)-a>n),e>1&&!r&&h(Math.floor(n/c))}),[u,e,t,r,o,i,a,s,l]),{containerRef:c,visibleNumberOfItems:p,shouldForceCollapse:f}}({itemsCount:r.length,isExpanded:u,isVertical:o,collapsedWidth:48,expandedLabelWidth:100,gap:16,showExpandedToggle:a,autoCollapse:s});n.useEffect((()=>{d(i)}),[i]);const x=r.slice(0,h),g=r.slice(h,r.length),v=g.map((e=>({label:e.label,startIcon:e.icon,disabled:e.disabled,onClick:e.onClick,itemAriaLabel:e.ariaLabel}))),m=t.jsx("div",{style:{position:"relative",display:"flex",width:"48px"},children:t.jsx(he,{isExpanded:u,ariaLabel:u?"Collapse":"Expand",icon:t.jsx(R,{}),showGap:!1,vertical:o})}),[b,y]=n.useState(!1);return t.jsx("div",{role:"toolbar","aria-label":l,css:le,children:t.jsxs(e.Group,{ref:p,orientation:o?"vertical":"horizontal",attached:!0,display:"grid",borderCollapse:"collapse",gridAutoFlow:o||1===r.length?"row":"column",children:[x.map((e=>{const n=c&&!1!==e.gap||!c&&!0===e.gap;return t.jsx(he,{isExpanded:u&&!f,ariaLabel:e.ariaLabel,icon:e.icon,label:e.label,tooltip:e.tooltip,disabled:e.disabled,onClick:e.onClick,showGap:n,vertical:o},e.ariaLabel)})),f&&v.length>1&&t.jsxs(e.Menu.Root,{onSelect:({value:e})=>(e=>{const t=g.find((t=>t.label===e));t&&t.onClick&&t.onClick()})(e),onOpenChange:({open:e})=>y(e),open:b,children:[t.jsx(e.Menu.Trigger,{asChild:!0,children:m}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsx(e.Menu.Content,{style:{minWidth:0,padding:0},children:v.map((({label:n,startIcon:r,onClick:i,itemAriaLabel:a},s)=>t.jsx(e.Menu.Item,{css:ce,value:n||l||s.toString(),role:"menuitem",children:t.jsx(he,{isExpanded:!1,icon:r,ariaLabel:a,label:"",onClick:i,showGap:!1,vertical:o})})))})})})]}),a&&!s&&!f&&t.jsx(he,{isExpanded:u,ariaLabel:u?"Collapse":"Expand",icon:u?t.jsx(ee,{}):t.jsx(te,{}),label:"Collapse",onClick:()=>d(!u),showGap:!1,vertical:o})]})})},xe=r.css`
216
+ `),"aria-label":o,disabled:l,onClick:c,mr:u&&!d?"16px":"0",mb:u&&d?"16px":"0",children:t.jsxs(e.Box,{display:"flex",overflow:"hidden",style:{justifyContent:"flex-end",alignItems:"center"},whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",maxWidth:n?"150px":"32px",padding:"8px",margin:n?"8px":"0",children:[i&&t.jsx(e.Box,{as:"span",mr:i&&n?"8px":"0px",children:t.jsx(pe,{content:s,disabled:!s,children:i})}),a&&t.jsx(e.Box,{"aria-hidden":!n,overflow:"hidden",maxWidth:n?"150px":"0px",whiteSpace:"nowrap",transition:"max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease",children:t.jsx(pe,{content:s,disabled:!s,children:a})})]})});var p};const fe=({items:r,vertical:o=!1,expanded:i=!1,showExpandedToggle:a,autoCollapse:s=!1,ariaLabel:l,defaultGaps:c})=>{const[u,d]=n.useState(i),{containerRef:p,visibleNumberOfItems:h,shouldForceCollapse:f}=function({itemsCount:e,isExpanded:t,isVertical:r,collapsedWidth:o,expandedLabelWidth:i,gap:a=0,showExpandedToggle:s,autoCollapse:l}){const c=n.useRef(null),[u,d]=n.useState(0),[p,h]=n.useState(e),[f,x]=n.useState(!1);return n.useEffect((()=>{if(!c.current)return;const e=new ResizeObserver((e=>{const t=e[0];d(Math.floor(t.contentRect.width))}));return e.observe(c.current),()=>e.disconnect()}),[]),n.useEffect((()=>{if(0===u)return;if(!l)return x(!1),void h(e);const n=u-(s?o+a:0),c=o+a;x(e*(t?i+a:c)-a>n),e>1&&!r&&h(Math.floor(n/c))}),[u,e,t,r,o,i,a,s,l]),{containerRef:c,visibleNumberOfItems:p,shouldForceCollapse:f}}({itemsCount:r.length,isExpanded:u,isVertical:o,collapsedWidth:48,expandedLabelWidth:100,gap:16,showExpandedToggle:a,autoCollapse:s});n.useEffect((()=>{d(i)}),[i]);const x=r.slice(0,h),g=r.slice(h,r.length),v=g.map((e=>({label:e.label,startIcon:e.icon,disabled:e.disabled,onClick:e.onClick,itemAriaLabel:e.ariaLabel}))),m=t.jsx("div",{style:{position:"relative",display:"flex",width:"48px"},children:t.jsx(he,{isExpanded:u,ariaLabel:u?"Collapse":"Expand",icon:t.jsx(R,{}),showGap:!1,vertical:o})}),[b,y]=n.useState(!1);return t.jsx("div",{role:"toolbar","aria-label":l,css:le,children:t.jsxs(e.Group,{ref:p,orientation:o?"vertical":"horizontal",attached:!0,display:"grid",borderCollapse:"collapse",gridAutoFlow:o||1===r.length?"row":"column",children:[x.map((e=>{const n=c&&!1!==e.gap||!c&&!0===e.gap;return t.jsx(he,{isExpanded:u&&!f,ariaLabel:e.ariaLabel,icon:e.icon,label:e.label,tooltip:e.tooltip,disabled:e.disabled,onClick:e.onClick,showGap:n,vertical:o},e.ariaLabel)})),f&&v.length>1&&t.jsxs(e.Menu.Root,{onSelect:({value:e})=>(e=>{const t=g.find((t=>t.label===e));t&&t.onClick&&t.onClick()})(e),onOpenChange:({open:e})=>y(e),open:b,children:[t.jsx(e.Menu.Trigger,{asChild:!0,children:m}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsx(e.Menu.Content,{style:{minWidth:0,padding:0},children:v.map((({label:n,startIcon:r,onClick:i,itemAriaLabel:a},s)=>t.jsx(e.Menu.Item,{css:ce,value:n||l||s.toString(),role:"menuitem",children:t.jsx(he,{isExpanded:!1,icon:r,ariaLabel:a,label:"",onClick:i,showGap:!1,vertical:o})})))})})})]}),a&&!s&&!f&&t.jsx(he,{isExpanded:u,ariaLabel:u?"Collapse":"Expand",icon:u?t.jsx(ee,{}):t.jsx(te,{}),label:"Collapse",onClick:()=>d(!u),showGap:!1,vertical:o})]})})},xe=e=>r.css`
217
217
  display: flex;
218
218
  align-items: center;
219
219
  justify-content: center;
220
220
  gap: 4px;
221
221
  padding: 2px 12px;
222
222
  cursor: pointer;
223
-
223
+ color: ${"dark"===e?h("neutral",100):"default"};
224
+ background-color: ${"dark"===e?"default":"transparent"};
224
225
  &:hover {
225
- background-color: ${h("neutral",200)};
226
+ background-color: ${"dark"===e?"default":h("neutral",200)};
226
227
  }
227
228
 
228
229
  &:focus-visible {
@@ -379,7 +380,7 @@
379
380
  width: 100%;
380
381
  margin-left: ${i?"8px":"0"};
381
382
  margin-right: ${a?"8px":"0"};
382
- `),children:[t.jsxs("div",{css:be,children:[t.jsx("p",{className:"ds-menu-item-label",children:n.label}),n.command?t.jsx(e.Menu.ItemCommand,{"aria-label":`Shortcut ${n.command}`,children:n.command}):null]}),n.caption?t.jsx("p",{className:"ds-menu-item-caption",children:n.caption}):null]}),n.endIcon]})}),o?null:t.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var i,a},Ce=({label:r,items:o,groups:i,onSelect:a,customTrigger:s})=>{const[l,c]=n.useState(!1);return t.jsxs(e.Menu.Root,{onSelect:({value:e})=>a&&a(e),onOpenChange:({open:e})=>c(e),open:l,children:[t.jsx(e.Menu.Trigger,{css:xe,asChild:!0,children:s||t.jsxs("button",{type:"button",children:[r,t.jsx($,{marginLeft:"6px",rotate:l?"180":"0",height:"14px",width:"14px"})]})}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsxs(e.Menu.Content,{css:ge,role:"menu","aria-label":r||"Menu",children:[o?.map(((r,i)=>{if(r.submenu){const[o,s]=n.useState(!1);return t.jsxs(e.Menu.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>a&&a(e),onOpenChange:({open:e})=>s(e),open:o,children:[t.jsxs(e.Menu.TriggerItem,{css:ve,role:"menuitem","aria-haspopup":"true","aria-expanded":o?"true":"false",children:[r.label,t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"})]}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsx(e.Menu.Content,{css:ge,role:"menu","aria-label":`${r.label} submenu`,children:r.submenu.map(((e,n)=>t.jsx(we,{item:e,isLast:n===(r.submenu?.length||0)-1},e.value)))})})})]},`${r.value}-${i}`)}return t.jsx(we,{item:r,isLast:i===o.length-1},`${r.value}-${i}`)})),i?.map(((r,o)=>t.jsxs(n.Fragment,{children:[t.jsxs(e.Menu.ItemGroup,{role:"group","aria-labelledby":`group-${o}`,children:[t.jsx(e.Menu.ItemGroupLabel,{id:`group-${o}`,css:ye,children:r.title}),r.items?.map((e=>t.jsx(we,{item:e,isLast:i.length-1===o},e.value)))]}),o!==i.length-1?t.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"}):null]},r.title)))]})})})]})},je=r.css`
383
+ `),children:[t.jsxs("div",{css:be,children:[t.jsx("p",{className:"ds-menu-item-label",children:n.label}),n.command?t.jsx(e.Menu.ItemCommand,{"aria-label":`Shortcut ${n.command}`,children:n.command}):null]}),n.caption?t.jsx("p",{className:"ds-menu-item-caption",children:n.caption}):null]}),n.endIcon]})}),o?null:t.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"})]});var i,a},Ce=({theme:r="light",label:o,items:i,groups:a,onSelect:s,customTrigger:l})=>{const[c,u]=n.useState(!1);return t.jsxs(e.Menu.Root,{onSelect:({value:e})=>s&&s(e),onOpenChange:({open:e})=>u(e),open:c,children:[t.jsx(e.Menu.Trigger,{css:xe(r),asChild:!0,children:l||t.jsxs("button",{type:"button",children:[o,t.jsx($,{marginLeft:"6px",rotate:c?"180":"0",height:"14px",width:"14px"})]})}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsxs(e.Menu.Content,{css:ge,role:"menu","aria-label":o||"Menu",children:[i?.map(((r,o)=>{if(r.submenu){const[i,a]=n.useState(!1);return t.jsxs(e.Menu.Root,{positioning:{placement:"right-start",gutter:2},onSelect:({value:e})=>s&&s(e),onOpenChange:({open:e})=>a(e),open:i,children:[t.jsxs(e.Menu.TriggerItem,{css:ve,role:"menuitem","aria-haspopup":"true","aria-expanded":i?"true":"false",children:[r.label,t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"})]}),t.jsx(e.Portal,{children:t.jsx(e.Menu.Positioner,{children:t.jsx(e.Menu.Content,{css:ge,role:"menu","aria-label":`${r.label} submenu`,children:r.submenu.map(((e,n)=>t.jsx(we,{item:e,isLast:n===(r.submenu?.length||0)-1},e.value)))})})})]},`${r.value}-${o}`)}return t.jsx(we,{item:r,isLast:o===i.length-1},`${r.value}-${o}`)})),a?.map(((r,o)=>t.jsxs(n.Fragment,{children:[t.jsxs(e.Menu.ItemGroup,{role:"group","aria-labelledby":`group-${o}`,children:[t.jsx(e.Menu.ItemGroupLabel,{id:`group-${o}`,css:ye,children:r.title}),r.items?.map((e=>t.jsx(we,{item:e,isLast:a.length-1===o},e.value)))]}),o!==a.length-1?t.jsx(e.Menu.Separator,{borderColor:"var(--chakra-colors-neutral-300)"}):null]},r.title)))]})})})]})},je=r.css`
383
384
  width: 200px;
384
385
  border: 1px solid ${h("neutral",600)};
385
386
  border-radius: 4px;
@@ -2701,37 +2702,46 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2701
2702
  display: flex;
2702
2703
  justify-content: center;
2703
2704
  align-items: center;
2704
- `,qh=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Wh=(e,t,n)=>r.css`
2705
- height: ${e?"96px":"48px"};
2706
- width: 100%;
2707
- background-color: ${n||h("neutral",100)};
2708
- position: ${t?"sticky":"absolute"};
2709
- top: 0;
2710
- left: 0;
2711
- z-index: 102;
2712
- border-bottom: 1px solid ${h("neutral",400)};
2713
- `,Gh=r.css`
2714
- height: 48px;
2705
+ `,qh=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Wh=(e,t,n,o,i)=>{let a="48px";return e?a="96px":i&&(a="28px"),r.css`
2706
+ max-height: ${a};
2707
+ width: 100%;
2708
+ background-color: ${h("neutral",n||"dark"===o?800:100)};
2709
+ position: ${t?"sticky":"absolute"};
2710
+ top: 0;
2711
+ left: 0;
2712
+ z-index: 102;
2713
+ border-bottom: 1px solid ${h("neutral",400)};
2714
+ `},Gh=(e,t)=>r.css`
2715
+ height: ${t?"28px":"48px"};
2715
2716
  width: 100%;
2716
- background-color: ${h("neutral",100)};
2717
- border-bottom: 1px solid ${h("neutral",400)};
2717
+ background-color: ${h("neutral","dark"===e?800:100)};
2718
+ border-bottom: 1px solid
2719
+ ${h("neutral","dark"===e?800:400)};
2718
2720
  display: flex;
2719
2721
  align-items: center;
2720
2722
  justify-content: flex-start;
2721
2723
  gap: 0px;
2722
- padding: 8px 16px;
2723
- `,Uh=(e,t)=>r.css`
2724
- height: 48px;
2724
+ padding: ${t?"0px":"8px 16px"};
2725
+ `,Uh=(e,t,n)=>r.css`
2726
+ height: ${n?"28px":"48px"};
2725
2727
  width: 100%;
2726
2728
  max-width: ${t?`${t}px`:"100%"};
2727
2729
  background-color: ${e?h("neutral",800):"transparent"};
2728
2730
  display: flex;
2729
- align-items: center;
2731
+ align-items: ${n?"start":"center"};
2732
+
2730
2733
  justify-content: space-between;
2731
2734
  margin: 0 auto;
2732
- padding: 8px 16px;
2733
- `,Xh=r.css`
2735
+ padding: ${n?"0px":"8px 16px"};
2736
+ `,Xh=(e,t)=>r.css`
2737
+ display: flex;
2738
+ margin: ${t?"-1px":"0px"};
2739
+ justify-content: flex-start;
2740
+ gap: 12px;
2741
+ color: ${h("neutral",e?100:900)};
2742
+ `,Yh=r.css`
2734
2743
  outline: none;
2744
+
2735
2745
  a {
2736
2746
  &:focus-visible {
2737
2747
  border-radius: 0px;
@@ -2741,20 +2751,20 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2741
2751
  outline-width: 2px;
2742
2752
  }
2743
2753
  }
2744
- `,Yh=e=>r.css`
2754
+ `,Kh=e=>r.css`
2745
2755
  display: ${e?"none":"flex"};
2746
2756
  align-items: center;
2747
2757
  justify-content: flex-start;
2748
2758
  gap: 0px;
2749
- `,Kh=e=>r.css`
2759
+ `,Jh=(e,t)=>r.css`
2750
2760
  font-size: 16px;
2751
2761
  line-height: 24px;
2752
2762
  font-weight: 400;
2753
- color: ${h("neutral",900)};
2763
+ color: ${h("neutral","dark"===t?200:900)};
2754
2764
  padding: 2px 12px;
2755
2765
 
2756
2766
  &:hover {
2757
- background-color: ${h("neutral",200)};
2767
+ background-color: ${"dark"===t?"default":h("neutral",200)};
2758
2768
  }
2759
2769
 
2760
2770
  &:focus-visible {
@@ -2771,12 +2781,12 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2771
2781
  font-weight: 700;
2772
2782
  color: ${h("accessible","controls-on-neutral-lights")};
2773
2783
  `:""}
2774
- `,Jh=r.css`
2775
- height: 48px;
2784
+ `,Qh=e=>r.css`
2785
+ height: ${e?"28px":"48px"};
2776
2786
  display: flex;
2777
2787
  align-items: center;
2778
2788
  justify-content: flex-end;
2779
- `,Qh=e=>r.css`
2789
+ `,ef=e=>r.css`
2780
2790
  height: 100%;
2781
2791
  font-size: 16px;
2782
2792
  line-height: 24px;
@@ -2795,7 +2805,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2795
2805
  }
2796
2806
  }
2797
2807
  `:""}
2798
- `,ef=e=>r.css`
2808
+ `,tf=e=>r.css`
2799
2809
  height: 100%;
2800
2810
  display: flex;
2801
2811
  align-items: center;
@@ -2803,19 +2813,19 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2803
2813
  gap: 20px;
2804
2814
  padding-left: 16px;
2805
2815
  border-left: 1px solid ${h("neutral",e?700:300)};
2806
- `,tf=r.css`
2816
+ `,nf=(e="light")=>r.css`
2807
2817
  background-color: none;
2808
2818
  border: none;
2809
2819
  cursor: pointer;
2810
2820
  padding: 0px;
2811
- color: ${h("neutral",800)};
2821
+ color: ${h("neutral","dark"===e?100:800)};
2812
2822
  display: flex;
2813
2823
  justify-content: center;
2814
2824
  align-items: center;
2815
2825
  gap: 8px;
2816
2826
 
2817
2827
  &:hover {
2818
- background-color: ${h("neutral",200)};
2828
+ background-color: ${"dark"===e?"default":h("neutral",200)};
2819
2829
  }
2820
2830
 
2821
2831
  &:focus-visible {
@@ -2828,7 +2838,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2828
2838
  outline-width: 2px;
2829
2839
  background-color: ${h("neutral",200)};
2830
2840
  }
2831
- `,nf=e=>r.css`
2841
+ `,rf=e=>r.css`
2832
2842
  position: absolute;
2833
2843
  top: 48px;
2834
2844
  right: 0;
@@ -2841,11 +2851,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2841
2851
  justify-content: flex-start;
2842
2852
  gap: 16px;
2843
2853
  transition: width 0.5s ease-in-out;
2844
- `,rf=r.css`
2854
+ `,of=r.css`
2845
2855
  height: 100%;
2846
2856
  width: 100%;
2847
- `,of=r.css`
2848
- background-color: ${h("neutral",200)};
2857
+ `,af=e=>r.css`
2858
+ background-color: ${h("neutral","dark"===e?800:200)};
2849
2859
  border-bottom: 1px solid ${h("neutral",300)};
2850
2860
 
2851
2861
  .ds-utility-item {
@@ -2864,13 +2874,13 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2864
2874
  margin-left: -12px;
2865
2875
  }
2866
2876
  }
2867
- `,af=r.css`
2868
- background-color: ${h("neutral",100)};
2869
2877
  `,sf=r.css`
2878
+ background-color: ${h("neutral",100)};
2879
+ `,lf=r.css`
2870
2880
  min-height: 100vh;
2871
2881
  width: 100%;
2872
2882
  overflow-y: scroll;
2873
- `;r.css``;const lf=e=>r.css`
2883
+ `;r.css``;const cf=e=>r.css`
2874
2884
  display: inline-block;
2875
2885
  width: 100%;
2876
2886
  padding: 12px 16px;
@@ -2899,7 +2909,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2899
2909
  outline-width: 2px;
2900
2910
  background-color: ${h("neutral",200)};
2901
2911
  }
2902
- `,cf=r.css`
2912
+ `,uf=r.css`
2903
2913
  width: 100%;
2904
2914
  padding: 12px 16px;
2905
2915
  display: flex;
@@ -2923,7 +2933,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2923
2933
  outline-width: 2px;
2924
2934
  background-color: ${h("neutral",200)};
2925
2935
  }
2926
- `,uf=e=>r.css`
2936
+ `,df=e=>r.css`
2927
2937
  position: absolute;
2928
2938
  top: 0px;
2929
2939
  right: 0;
@@ -2935,7 +2945,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2935
2945
  align-items: flex-start;
2936
2946
  justify-content: flex-start;
2937
2947
  transition: width 0.5s ease-in-out;
2938
- `,df=r.css`
2948
+ `,pf=r.css`
2939
2949
  height: 48px;
2940
2950
  width: 100%;
2941
2951
  display: flex;
@@ -2946,7 +2956,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2946
2956
  position: relative;
2947
2957
  top: 0;
2948
2958
  left: 0;
2949
- `,pf=r.css`
2959
+ `,hf=r.css`
2950
2960
  position: absolute;
2951
2961
  bottom: 0;
2952
2962
  left: 0;
@@ -2961,7 +2971,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2961
2971
  button {
2962
2972
  width: calc(48% - 24px);
2963
2973
  }
2964
- `,hf=({navigationSection:e,utilitySection:r,actionsSection:o,linkRouter:i,isOpen:a,setIsOpen:s,pathname:l})=>{const[c,u]=n.useState(void 0),[d,p]=n.useState(-1),h=n.useRef(null),f=n.useRef([]),x=i;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:nf(a),children:a&&t.jsxs("div",{css:rf,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[r?t.jsx("div",{css:of,children:r?.map((e=>t.jsx("div",{className:"ds-utility-item",children:e})))}):null,e?t.jsx("div",{css:af,children:e.map(((e,n)=>e.link?t.jsx(x,{to:e.link,href:e.link,onClick:()=>{u(void 0),p(-1),s(!1)},css:lf(l===e.link),children:e.label},e.label):t.jsxs("button",{css:cf,type:"button",ref:e=>f.current[n]=e,onClick:()=>{e.items&&(u(e),p(n),setTimeout((()=>{h.current?.focus()}),100))},children:[e.label,e.items?t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),o?t.jsx("div",{css:pf,children:o.map((e=>t.jsx(b,{...e,onClick:t=>{e?.onClick?.(t),u(void 0),p(-1),s(!1)}},e.ariaLabel)))}):null]})}),t.jsx("div",{css:uf(!!c?.items),children:c?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:df,children:[t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),f.current[d]?.focus()},"aria-label":"Go back",css:tf,ref:h,children:[t.jsx($,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),c?.label]}),t.jsxs("button",{type:"button",onClick:()=>{u(void 0),p(-1),s(!1)},"aria-label":"Close menu",css:tf,children:["Close",t.jsx(E,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:sf,children:c?.items?.map((e=>t.jsx(x,{to:e.link,href:e.link,css:lf(),onClick:()=>{u(void 0),p(-1),s(!1)},children:e.label},e.label)))})]}):null})]})},ff=1023,xf=r.css`
2974
+ `,ff=({theme:e="light",navigationSection:r,utilitySection:o,actionsSection:i,linkRouter:a,isOpen:s,setIsOpen:l,pathname:c})=>{const[u,d]=n.useState(void 0),[p,h]=n.useState(-1),f=n.useRef(null),x=n.useRef([]),g=a;return t.jsxs(t.Fragment,{children:[t.jsx("div",{css:rf(s),children:s&&t.jsxs("div",{css:of,children:[t.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"72px"},children:[o?t.jsx("div",{css:af(e),children:o?.map((e=>t.jsx("div",{className:"ds-utility-item",children:e})))}):null,r?t.jsx("div",{css:sf,children:r.map(((e,n)=>e.link?t.jsx(g,{to:e.link,href:e.link,onClick:()=>{d(void 0),h(-1),l(!1)},css:cf(c===e.link),children:e.label},e.label):t.jsxs("button",{css:uf,type:"button",ref:e=>x.current[n]=e,onClick:()=>{e.items&&(d(e),h(n),setTimeout((()=>{f.current?.focus()}),100))},children:[e.label,e.items?t.jsx($,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),i?t.jsx("div",{css:hf,children:i.map((e=>t.jsx(b,{...e,onClick:t=>{e?.onClick?.(t),d(void 0),h(-1),l(!1)}},e.ariaLabel)))}):null]})}),t.jsx("div",{css:df(!!u?.items),children:u?.items?t.jsxs(t.Fragment,{children:[t.jsxs("div",{css:pf,children:[t.jsxs("button",{type:"button",onClick:()=>{d(void 0),h(-1),x.current[p]?.focus()},"aria-label":"Go back",css:nf(e),ref:f,children:[t.jsx($,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),u?.label]}),t.jsxs("button",{type:"button",onClick:()=>{d(void 0),h(-1),l(!1)},"aria-label":"Close menu",css:nf(e),children:["Close",t.jsx(E,{height:"16px",width:"16px"})]})]}),t.jsx("div",{css:lf,children:u?.items?.map((e=>t.jsx(g,{to:e.link,href:e.link,css:cf(),onClick:()=>{d(void 0),h(-1),l(!1)},children:e.label},e.label)))})]}):null})]})},xf=1023,gf=r.css`
2965
2975
  width: 64px;
2966
2976
  height: 100%;
2967
2977
  z-index: 100;
@@ -2970,7 +2980,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
2970
2980
  display: flex;
2971
2981
  flex-direction: column;
2972
2982
  justify-content: space-between;
2973
- `,gf=r.css`
2983
+ `,vf=r.css`
2974
2984
  width: 64px;
2975
2985
  height: 64px;
2976
2986
  background-color: ${h("neutral",200)};
@@ -3060,7 +3070,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3060
3070
  }
3061
3071
  }
3062
3072
  }
3063
- `,vf=r.css`
3073
+ `,mf=r.css`
3064
3074
  display: flex;
3065
3075
  justify-content: center;
3066
3076
  align-items: center;
@@ -3073,7 +3083,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3073
3083
  fill: ${h("neutral",600)};
3074
3084
  }
3075
3085
  }
3076
- `,mf=r.css`
3086
+ `,bf=r.css`
3077
3087
  width: 64px;
3078
3088
  height: 64px;
3079
3089
  background-color: ${h("neutral",200)};
@@ -3111,7 +3121,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3111
3121
  text-align: center;
3112
3122
  color: ${h("neutral",600)};
3113
3123
  }
3114
- `,bf=r.css`
3124
+ `,yf=r.css`
3115
3125
  width: 320px;
3116
3126
  height: 100%;
3117
3127
  z-index: 100;
@@ -3120,7 +3130,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3120
3130
  overflow-y: auto;
3121
3131
  overflow-x: hidden;
3122
3132
  border-right: 1px solid ${h("neutral",300)};
3123
- `,yf=e=>r.css`
3133
+ `,wf=e=>r.css`
3124
3134
  width: 100%;
3125
3135
  display: flex;
3126
3136
  align-items: center;
@@ -3129,7 +3139,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3129
3139
  ${"view"===e&&`\n border: 1px solid ${h("neutral",400)};\n background-color: ${h("neutral",200)};\n border-radius: 4px;\n padding: 4px;\n `}
3130
3140
 
3131
3141
  ${"transparent"===e&&"\n border: none;\n background-color: transparent;\n border-radius: 4px;\n padding: 0px 16px;\n\n .chakra-tabs__list {\n gap: 32px;\n }\n "}
3132
- `,wf=r.css`
3142
+ `,Cf=r.css`
3133
3143
  width: 99%;
3134
3144
  height: 40px;
3135
3145
  padding: 8px 16px;
@@ -3145,7 +3155,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3145
3155
  &:focus-visible {
3146
3156
  box-shadow: none;
3147
3157
  }
3148
- `,Cf=r.css`
3158
+ `,jf=r.css`
3149
3159
  background-color: ${h("neutral",200)};
3150
3160
  color: ${h("neutral",700)};
3151
3161
 
@@ -3202,11 +3212,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3202
3212
  opacity: 1;
3203
3213
  }
3204
3214
  }
3205
- `,jf=r.css`
3215
+ `,kf=r.css`
3206
3216
  width: 4px;
3207
3217
  height: 24px;
3208
3218
  background-color: ${h("neutral",400)};
3209
- `,kf=r.css`
3219
+ `,$f=r.css`
3210
3220
  height: 32px;
3211
3221
  border-radius: 2px;
3212
3222
  background-color: ${h("neutral",200)};
@@ -3279,7 +3289,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3279
3289
  opacity: 1;
3280
3290
  }
3281
3291
  }
3282
- `,$f=r.css`
3292
+ `,Sf=r.css`
3283
3293
  background-color: transparent;
3284
3294
  color: ${h("neutral",600)};
3285
3295
  width: auto;
@@ -3350,7 +3360,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3350
3360
  }
3351
3361
  }
3352
3362
  }
3353
- `,Sf=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Ef=e=>1===e?"none":2===e?"left":"right",Rf=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return o.jsx(o.Fragment,{children:r.map((e=>n.test(e)?o.jsx("strong",{children:e},e):o.jsx("span",{children:e},e)))})},Lf=({items:t,query:r,onSelect:i,highlightedIndex:a})=>{const s=n.useRef(null);return n.useEffect((()=>{if(!s.current)return;const e=s.current.children[a];e&&e.scrollIntoView({block:"nearest"})}),[a]),o.jsx(e.Box,{padding:"8px",children:t.map(((t,n)=>o.jsx(e.Box,{ref:s,padding:"6px 8px",borderRadius:"md",cursor:"pointer",bg:n===a?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(t.id||t.label),children:o.jsx(Rf,{text:t.label,query:r})},t.id)))})},Of={small:"16px",medium:"24px",large:"40px",default:"16px"};function Tf(e,t,n,o){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&Of[e]?Of[e]:Of.default}(e,t),a=n?h("neutral",200):h("primary",300),s=o??a,l=o&&n?"opacity: 0.7;":"",c=h("neutral",n?400:800);return r.css`
3363
+ `,Ef=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Rf=e=>1===e?"none":2===e?"left":"right",Lf=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),r=e.split(n);return o.jsx(o.Fragment,{children:r.map((e=>n.test(e)?o.jsx("strong",{children:e},e):o.jsx("span",{children:e},e)))})},Of=({items:t,query:r,onSelect:i,highlightedIndex:a})=>{const s=n.useRef(null);return n.useEffect((()=>{if(!s.current)return;const e=s.current.children[a];e&&e.scrollIntoView({block:"nearest"})}),[a]),o.jsx(e.Box,{padding:"8px",children:t.map(((t,n)=>o.jsx(e.Box,{ref:s,padding:"6px 8px",borderRadius:"md",cursor:"pointer",bg:n===a?"gray.100":void 0,_hover:{background:"gray.50"},onClick:()=>i(t.id||t.label),children:o.jsx(Lf,{text:t.label,query:r})},t.id)))})},Tf={small:"16px",medium:"24px",large:"40px",default:"16px"};function Pf(e,t,n,o){const i=function(e,t){return"string"==typeof t&&""!==t.trim()?t:e&&Tf[e]?Tf[e]:Tf.default}(e,t),a=n?h("neutral",200):h("primary",300),s=o??a,l=o&&n?"opacity: 0.7;":"",c=h("neutral",n?400:800);return r.css`
3354
3364
  height: ${i};
3355
3365
  width: ${i};
3356
3366
  border-radius: 50%;
@@ -3384,17 +3394,17 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3384
3394
  background-color: ${h("primary",500)};
3385
3395
  }
3386
3396
  }
3387
- `}const Pf=e=>r.css`
3397
+ `}const Mf=e=>r.css`
3388
3398
  width: ${e||"16px"};
3389
3399
  position: absolute;
3390
3400
  top: -8px;
3391
3401
  left: 15px;
3392
- `,Mf=r.css`
3402
+ `,_f=r.css`
3393
3403
  font-size: 12px;
3394
3404
  line-height: 16px;
3395
3405
  font-weight: 700;
3396
3406
  color: ${h("primary",800)};
3397
- `,_f=n.forwardRef((({name:n,ariaLabel:o,size:i="medium",customSize:a="",src:s,srcSet:l,onClick:c,notificationCount:u,disabled:d=!0,customBackgroundColor:p=""},f)=>{const x=()=>{d||c?.()},g=(()=>{let e="";return u&&u>0&&(e=`${u>99?"99+":u}`),e})();let v="16px";u&&u>99?v="28px":u&&u>9&&(v="22px");const m=!!s||!!l,b=c&&!d;return t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:f,css:Tf(i,a,d,p),onClick:x,onKeyDown:e=>{d||"Enter"!==e.key||x()},role:b?"button":void 0,tabIndex:b?0:void 0,"aria-disabled":d,children:[m&&t.jsx(e.Avatar.Image,{src:s,srcSet:l}),!m&&n&&t.jsx(e.Avatar.Fallback,{name:n,css:Mf}),!m&&!n&&t.jsx(Q,{size:"100%",style:{padding:"15%",color:d?h("neutral",400):void 0}}),g.length>0?t.jsx("div",{css:Pf(v),children:t.jsx("div",{css:r.css`
3407
+ `,Df=n.forwardRef((({name:n,ariaLabel:o,size:i="medium",customSize:a="",src:s,srcSet:l,onClick:c,notificationCount:u,disabled:d=!0,customBackgroundColor:p=""},f)=>{const x=()=>{d||c?.()},g=(()=>{let e="";return u&&u>0&&(e=`${u>99?"99+":u}`),e})();let v="16px";u&&u>99?v="28px":u&&u>9&&(v="22px");const m=!!s||!!l,b=c&&!d;return t.jsxs(e.Avatar.Root,{"aria-label":o||n,ref:f,css:Pf(i,a,d,p),onClick:x,onKeyDown:e=>{d||"Enter"!==e.key||x()},role:b?"button":void 0,tabIndex:b?0:void 0,"aria-disabled":d,children:[m&&t.jsx(e.Avatar.Image,{src:s,srcSet:l}),!m&&n&&t.jsx(e.Avatar.Fallback,{name:n,css:_f}),!m&&!n&&t.jsx(Q,{size:"100%",style:{padding:"15%",color:d?h("neutral",400):void 0}}),g.length>0?t.jsx("div",{css:Mf(v),children:t.jsx("div",{css:r.css`
3398
3408
  height: 16px;
3399
3409
  width: auto;
3400
3410
  background-color: ${h("error",500)};
@@ -3406,16 +3416,16 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3406
3416
  font-size: 12px;
3407
3417
  font-weight: 700;
3408
3418
  color: ${h("error",100)};
3409
- `,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})})),Df=r.css`
3419
+ `,children:t.jsx("p",{"aria-label":`${u} unread message`,children:g})})}):null]})})),If=r.css`
3410
3420
  display: flex;
3411
3421
  justify-content: flex-start;
3412
3422
  align-items: center;
3413
3423
  gap: 8px;
3414
- `,If=e=>r.css`
3424
+ `,Vf=e=>r.css`
3415
3425
  width: ${e||"16px"};
3416
3426
  position: relative;
3417
3427
  display: flex;
3418
- `,Vf=r.css`
3428
+ `,Nf=r.css`
3419
3429
  height: 4px;
3420
3430
  width: 4px;
3421
3431
  background-color: ${h("error",500)};
@@ -3423,7 +3433,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3423
3433
  position: absolute;
3424
3434
  top: 0px;
3425
3435
  right: 0px;
3426
- `,Nf=r.css`
3436
+ `,Af=r.css`
3427
3437
  height: 10px;
3428
3438
  background-color: ${h("error",500)};
3429
3439
  padding: 0 3px 1px 3px;
@@ -3434,11 +3444,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3434
3444
  position: absolute;
3435
3445
  top: -2px;
3436
3446
  left: 9px;
3437
- `,Af=r.css`
3447
+ `,zf=r.css`
3438
3448
  font-size: 9px;
3439
3449
  font-weight: 700;
3440
3450
  color: ${h("error",100)};
3441
- `,zf=r.css`
3451
+ `,Bf=r.css`
3442
3452
  height: 16px;
3443
3453
  min-width: 16px;
3444
3454
  background-color: ${h("error",500)};
@@ -3447,11 +3457,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3447
3457
  justify-content: center;
3448
3458
  align-items: center;
3449
3459
  padding: 0px 4px 1px 4px;
3450
- `,Bf=r.css`
3460
+ `,Hf=r.css`
3451
3461
  font-size: 16px;
3452
3462
  font-weight: 700;
3453
3463
  color: ${h("error",100)};
3454
- `,Hf=(e,t)=>r.css`
3464
+ `,Ff=(e,t)=>r.css`
3455
3465
  width: 100%;
3456
3466
  max-width: ${"small"===e?"234px":"320px"};
3457
3467
  border-radius: 4px;
@@ -3466,7 +3476,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3466
3476
  button {
3467
3477
  margin-left: ${t?0:"24px"};
3468
3478
  }
3469
- `,Ff=r.css`
3479
+ `,Zf=r.css`
3470
3480
  display: flex;
3471
3481
  align-items: flex-start;
3472
3482
  gap: 8px;
@@ -3474,28 +3484,28 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3474
3484
  svg {
3475
3485
  margin-top: 6px;
3476
3486
  }
3477
- `,Zf=e=>r.css`
3487
+ `,qf=e=>r.css`
3478
3488
  color: ${h("neutral",800)};
3479
3489
  font-size: ${"small"===e?"14px":"18px"};
3480
3490
  line-height: ${"small"===e?"20px":"28px"};
3481
3491
  font-weight: 400;
3482
3492
  text-align: left;
3483
- `,qf=e=>r.css`
3493
+ `,Wf=e=>r.css`
3484
3494
  color: ${h("neutral",700)};
3485
3495
  font-size: ${"small"===e?"12px":"16px"};
3486
3496
  line-height: ${"small"===e?"16px":"24px"};
3487
3497
  font-weight: 400;
3488
3498
  margin-left: 24px;
3489
3499
  text-align: left;
3490
- `,Wf=r.css`
3500
+ `,Gf=r.css`
3491
3501
  background-color: ${h("neutral",100)};
3492
3502
  border: 1px solid ${h("neutral",300)};
3493
3503
  color: ${h("neutral",700)};
3494
- `,Gf=r.css`
3504
+ `,Uf=r.css`
3495
3505
  background-color: ${h("neutral",200)};
3496
3506
  border: 1px solid ${h("neutral",300)};
3497
3507
  color: ${h("neutral",700)};
3498
- `,Uf=r.css`
3508
+ `,Xf=r.css`
3499
3509
  background-color: ${h("success",100)};
3500
3510
  border: 1px solid ${h("success",300)};
3501
3511
  color: ${h("success",500)};
@@ -3503,7 +3513,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3503
3513
  p {
3504
3514
  color: ${h("success",900)};
3505
3515
  }
3506
- `,Xf=r.css`
3516
+ `,Yf=r.css`
3507
3517
  background-color: ${h("warning",100)};
3508
3518
  border: 1px solid ${h("warning",300)};
3509
3519
  color: ${h("warning",500)};
@@ -3511,7 +3521,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3511
3521
  p {
3512
3522
  color: ${h("warning",900)};
3513
3523
  }
3514
- `,Yf=r.css`
3524
+ `,Kf=r.css`
3515
3525
  background-color: ${h("error",100)};
3516
3526
  border: 1px solid ${h("error",300)};
3517
3527
  color: ${h("error",500)};
@@ -3519,32 +3529,32 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3519
3529
  p {
3520
3530
  color: ${h("error",900)};
3521
3531
  }
3522
- `,Kf=r.css`
3532
+ `,Jf=r.css`
3523
3533
  height: 8px;
3524
3534
  width: 100%;
3525
3535
  background-color: ${h("neutral",300)};
3526
3536
  display: flex;
3527
3537
  align-items: center;
3528
3538
  justify-content: flex-start;
3529
- `,Jf=e=>r.css`
3539
+ `,Qf=e=>r.css`
3530
3540
  height: 100%;
3531
3541
  width: ${e}%;
3532
3542
  background-color: ${h("primary",500)};
3533
3543
  transition: width 0.5s ease-in-out;
3534
- `,Qf=r.css`
3544
+ `,ex=r.css`
3535
3545
  width: 100%;
3536
3546
  display: flex;
3537
3547
  align-items: center;
3538
3548
  justify-content: space-between;
3539
3549
  position: relative;
3540
- `,ex=r.css`
3550
+ `,tx=r.css`
3541
3551
  height: 60px;
3542
3552
  width: 80px;
3543
3553
  display: flex;
3544
3554
  flex-direction: column;
3545
3555
  align-items: center;
3546
3556
  justify-content: space-between;
3547
- `,tx=(e,t)=>r.css`
3557
+ `,nx=(e,t)=>r.css`
3548
3558
  height: 32px;
3549
3559
  width: 32px;
3550
3560
  display: flex;
@@ -3580,12 +3590,12 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3580
3590
  }
3581
3591
 
3582
3592
  ${t?`\n background-color: ${h("neutral",300)};\n \n &:hover {\n background-color: ${h("neutral",300)};\n box-shadow: none;\n }\n `:""}
3583
- `,nx=e=>r.css`
3593
+ `,rx=e=>r.css`
3584
3594
  color: ${h("neutral",e?800:600)};
3585
3595
  font-size: 14px;
3586
3596
  line-height: 20px;
3587
3597
  font-weight: 400;
3588
- `,rx=r.css`
3598
+ `,ox=r.css`
3589
3599
  height: 1px;
3590
3600
  width: 100%;
3591
3601
  padding: 0 30px;
@@ -3593,11 +3603,11 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3593
3603
  top: 16px;
3594
3604
  left: 0;
3595
3605
  z-index: -1;
3596
- `,ox=r.css`
3606
+ `,ix=r.css`
3597
3607
  height: 1px;
3598
3608
  width: 100%;
3599
3609
  background-color: ${h("neutral",400)};
3600
- `,ix=r.css`
3610
+ `,ax=r.css`
3601
3611
  justify-content: space-between;
3602
3612
  align-items: center;
3603
3613
  gap: 8px;
@@ -3640,21 +3650,21 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3640
3650
  color: ${h("error",900)};
3641
3651
  }
3642
3652
  }
3643
- `,ax=r.css`
3653
+ `,sx=r.css`
3644
3654
  font-size: 18px;
3645
3655
  line-height: 28px;
3646
3656
  font-weight: 400;
3647
3657
  color: ${h("neutral",800)};
3648
- `,sx=r.css`
3658
+ `,lx=r.css`
3649
3659
  font-size: 16px;
3650
3660
  line-height: 24px;
3651
3661
  font-weight: 400;
3652
3662
  color: ${h("neutral",700)};
3653
- `,lx=r.css`
3654
- padding: 6px;
3655
3663
  `,cx=r.css`
3656
3664
  padding: 6px;
3657
- `,ux={pauseOnPageIdle:!0,offsets:"24px"},dx={"top-start":e.createToaster({placement:"top-start",...ux}),"top-end":e.createToaster({placement:"top-end",...ux}),"bottom-start":e.createToaster({placement:"bottom-start",...ux}),"bottom-end":e.createToaster({placement:"bottom-end",...ux})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l,showFooterOnCollapsed:c=!1})=>{const u="analysis-widget-item",[d,p]=n.useState(a),h=`analysis-widget-header-${u}`;return t.jsx(e.Box,{as:"section","aria-labelledby":h,css:ua,children:t.jsxs(e.Accordion.Root,{multiple:!0,value:s?void 0:[u],defaultValue:a?[u]:[],children:[t.jsxs(e.Accordion.Item,{css:pa,value:u,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:h,role:"button","aria-expanded":d,tabIndex:0,css:da,pointerEvents:s?"auto":"none",onClick:s?()=>{p(!d)}:void 0,children:t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>t.jsx(b,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),s&&t.jsx(e.Accordion.ItemIndicator,{height:"16px",marginTop:"8px",display:"flex",children:t.jsx($,{"aria-label":"Toggle section",color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]})}),t.jsxs("div",{className:d?"item-content-open":"item-content-closed","aria-hidden":!d,children:[r,!c&&i&&t.jsx(e.Box,{css:ha,children:i})]})]}),c&&i&&t.jsx(e.Box,{css:ha,children:i})]})})},exports.Avatar=_f,exports.Badge=({hasNotification:e,notificationCount:r,label:o})=>{const[i,a]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?a(!0):a(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const s=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let l="16px";return r&&r>99?l="28px":r&&r>9&&(l="22px"),i?t.jsxs("div",{css:Df,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:If(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:Vf,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:zf,children:t.jsx("p",{css:Bf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:Df,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:If(l),children:[s.length>0?t.jsx("div",{css:Nf,children:t.jsx("p",{css:Af,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Vf,"aria-hidden":!0}):null,t.jsx(I,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:o,additionalSettings:i,options:a,onOptionSelected:s,maxHeight:l="400px",maxWidth:c="260px"})=>{const u=n.useRef(null),d=n.useRef(null);return n.useEffect((()=>{const e=u.current,t=d.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),t.jsx("div",{ref:d,css:Cn(l,c),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:jn,children:[t.jsx("h2",{ref:u,className:"ds-base-map-header-title",tabIndex:-1,children:e}),t.jsx("p",{className:"ds-base-map-header-caption",children:o})]}),t.jsxs("div",{css:kn,children:[i?t.jsx("div",{css:$n,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Le,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:Sn,children:e.children}):null]},e.label)))}):null,a?t.jsx("div",{css:En,children:a.map((e=>{return t.jsxs("div",{css:Rn(e.active),role:"button",onClick:()=>s?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||s?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
3665
+ `,ux=r.css`
3666
+ padding: 6px;
3667
+ `,dx={pauseOnPageIdle:!0,offsets:"24px"},px={"top-start":e.createToaster({placement:"top-start",...dx}),"top-end":e.createToaster({placement:"top-end",...dx}),"bottom-start":e.createToaster({placement:"bottom-start",...dx}),"bottom-end":e.createToaster({placement:"bottom-end",...dx})};exports.AnalysisWidget=({children:r,header:o,footer:i,expanded:a=!0,collapsible:s=!0,actions:l,showFooterOnCollapsed:c=!1})=>{const u="analysis-widget-item",[d,p]=n.useState(a),h=`analysis-widget-header-${u}`;return t.jsx(e.Box,{as:"section","aria-labelledby":h,css:ua,children:t.jsxs(e.Accordion.Root,{multiple:!0,value:s?void 0:[u],defaultValue:a?[u]:[],children:[t.jsxs(e.Accordion.Item,{css:pa,value:u,children:[o&&t.jsx(e.Accordion.ItemTrigger,{id:h,role:"button","aria-expanded":d,tabIndex:0,css:da,pointerEvents:s?"auto":"none",onClick:s?()=>{p(!d)}:void 0,children:t.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>t.jsx(b,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),s&&t.jsx(e.Accordion.ItemIndicator,{height:"16px",marginTop:"8px",display:"flex",children:t.jsx($,{"aria-label":"Toggle section",color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]})}),t.jsxs("div",{className:d?"item-content-open":"item-content-closed","aria-hidden":!d,children:[r,!c&&i&&t.jsx(e.Box,{css:ha,children:i})]})]}),c&&i&&t.jsx(e.Box,{css:ha,children:i})]})})},exports.Avatar=Df,exports.Badge=({hasNotification:e,notificationCount:r,label:o})=>{const[i,a]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?a(!0):a(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const s=(()=>{let e="";return r&&r>0&&(e=`${r>99?"99+":r}`),e})();let l="16px";return r&&r>99?l="28px":r&&r>9&&(l="22px"),i?t.jsxs("div",{css:If,role:"status","aria-live":"polite",children:[t.jsxs("div",{css:Vf(),children:[t.jsx(I,{color:"currentColor",height:"16px",width:"16px"}),!e||r||o?null:t.jsx("div",{css:Nf,"aria-hidden":!0})]}),o?t.jsx("p",{children:o}):null,s.length>0?t.jsx("div",{css:Bf,children:t.jsx("p",{css:Hf,"aria-label":`${r} unread message`,children:s})}):null]}):t.jsxs("div",{css:If,role:"status","aria-live":"polite",children:[o?t.jsx("p",{children:o}):null,t.jsxs("div",{css:Vf(l),children:[s.length>0?t.jsx("div",{css:Af,children:t.jsx("p",{css:zf,"aria-label":`${r} unread message`,children:s})}):null,e&&!r?t.jsx("div",{css:Nf,"aria-hidden":!0}):null,t.jsx(I,{color:"currentColor",height:"16px",width:"16px"})]})]})},exports.BaseMap=({title:e,caption:o,additionalSettings:i,options:a,onOptionSelected:s,maxHeight:l="400px",maxWidth:c="260px"})=>{const u=n.useRef(null),d=n.useRef(null);return n.useEffect((()=>{const e=u.current,t=d.current;if(!e||!t)return;const n=()=>{e.focus()};if("undefined"!=typeof IntersectionObserver){let e=!1;const r=new IntersectionObserver((([t])=>{t?.isIntersecting?(e||n(),e=!0):e=!1}),{threshold:.01});return r.observe(t),()=>r.disconnect()}const r=window.setTimeout(n,0);return()=>window.clearTimeout(r)}),[]),t.jsx("div",{ref:d,css:Cn(l,c),children:t.jsxs("div",{className:"ds-base-map-scroll-content",children:[t.jsxs("div",{css:jn,children:[t.jsx("h2",{ref:u,className:"ds-base-map-header-title",tabIndex:-1,children:e}),t.jsx("p",{className:"ds-base-map-header-caption",children:o})]}),t.jsxs("div",{css:kn,children:[i?t.jsx("div",{css:$n,children:i.map((e=>t.jsxs("div",{children:[t.jsx(Le,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?t.jsx("div",{css:Sn,children:e.children}):null]},e.label)))}):null,a?t.jsx("div",{css:En,children:a.map((e=>{return t.jsxs("div",{css:Rn(e.active),role:"button",onClick:()=>s?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||s?.(e)},children:[t.jsx("div",{css:(n=e.imageUrl,r.css`
3658
3668
  height: 32px;
3659
3669
  width: 32px;
3660
3670
  border: 1px solid ${h("neutral",300)};
@@ -3678,13 +3688,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3678
3688
  padding: 0px;
3679
3689
  padding-top: 8px;
3680
3690
  color: ${i?h("neutral",500):"inherit"};
3681
- `),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=se,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Tn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:la,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:ca,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:Vh(r,o),children:t.jsxs("div",{css:Nh(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ah,children:e}),t.jsx("div",{children:t.jsxs("p",{css:zh,children:[n," ",a]})})]})})},exports.IconButton=ae,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Wf;return"info-grey"===r?c=Gf:"success"===r?c=Uf:"warning"===r?c=Xf:"error"===r&&(c=Yf),t.jsxs("div",{css:[Hf(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Ff,children:[i,t.jsx("p",{css:Zf(o),children:e})]}),t.jsx("p",{css:qf(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:pt,children:[i?t.jsx("div",{css:xt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ht(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:ft(p),"aria-label":o,children:o}),i?t.jsx("p",{css:gt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:vt(!!i,s),attached:!0,children:["start"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(kt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ii,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Xo,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Yo,children:[r,t.jsx(Gt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Ko,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(We,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ri,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Uo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ri,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:oi,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ii,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ai,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:si,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:li,children:[t.jsxs("div",{css:ci,children:[t.jsx(ae,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ae,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ae,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ui,children:[t.jsxs("div",{children:[t.jsx("h3",{css:di,children:e}),t.jsx("p",{css:pi,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:hi,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(mi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=qi,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(fe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Tn,exports.MapMarkers=Pn,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Ao({open:e,onOpenChange:r,placement:c,whileElementsMounted:ao,middleware:[bo(u),(b={fallbackAxisSideDirection:"start"},{...co(b),options:[b,y]}),yo({padding:8}),wo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=_o(),v=Ar("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Vo(f),{escapeKey:C,outsidePress:j}=Vo(x),k=l.useRef(!1),$=Ar((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Ir(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Ar((e=>{var t;const n=()=>{var t;$(e),null==(t=Mr(e))||t.removeEventListener("keydown",n)};null==(t=Mr(e))||t.addEventListener("keydown",n)})),E=Ar((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Mr(e),l="[data-floating-ui-inert]",c=Dr(o.floating).querySelectorAll(l);let d=Nn(s)?s:null;for(;d&&!Qn(d);){const e=nr(d);if(Qn(e)||!Nn(e))break;d=e}if(c.length&&Nn(s)&&!s.matches("html,body")&&!Pr(s,o.floating)&&Array.from(c).every((e=>!Pr(d,e))))return;if(An(s)&&O){const t=Qn(s),n=er(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Ir(g.nodesRef.current,p).some((t=>{var n;return _r(e,null==(n=t.context)?void 0:n.elements.floating)}));if(_r(e,o.floating)||_r(e,o.domReference)||h)return;const f=g?Ir(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Ar((e=>{var t;const n=()=>{var t;E(e),null==(t=Mr(e))||t.removeEventListener(u,n)};null==(t=Mr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Kn()?5:0)}const d=Dr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Nn(o.domReference)&&(p=or(o.domReference)),Nn(o.floating)&&(p=p.concat(or(o.floating))),!Nn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(or(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const L=l.useMemo((()=>({onKeyDown:$,...d&&{[Do[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Io[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:L,floating:O}:{}),[a,L,O])}(g,{escapeKey:d,outsidePress:p}),C=Ho(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>zo(t,e,"reference")),t),i=l.useCallback((t=>zo(t,e,"floating")),n),a=l.useCallback((t=>zo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Fo,children:[t.jsxs("div",{css:Zo,children:[i,t.jsx(se,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:qo,children:a}),s?t.jsx("div",{css:Wo,children:s}):null,t.jsx("div",{ref:h,css:Go(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=Ce,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>qh(o,r)));return t.jsx("div",{css:Bh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=qh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Hh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Fh,children:[i,s?t.jsx("div",{css:Zh,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(ds,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ps(i),children:[t.jsxs(e.Dialog.Header,{css:hs,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:fs,asChild:!0,children:t.jsx(se,{})})]}),t.jsx(e.Dialog.Body,{css:xs,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:Se,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ke(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Ee,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:$e(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d,backgroundColor:p})=>{const f=n.useRef(null),x=n.useRef(null),g=n.useRef(null),[v,m]=n.useState(!1),[y,w]=n.useState(-1),[C,j]=n.useState("undefined"!=typeof window&&window?.innerWidth<=ff),[k,$]=n.useState(!1),S=o,R=n.useCallback((()=>{if(x.current&&f.current&&g.current){const e=f.current.getBoundingClientRect(),t=x.current.getBoundingClientRect(),n=g.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=ff||window.innerWidth<=y?(d?.(96),m(!0)):window.innerWidth>ff&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),m(!0),w(window.innerWidth)):window.innerWidth>y&&(d?.(48),m(!1),w(-1)):(d?.(48),m(!1),w(-1)),v&&(window.innerWidth<=ff||n.right>=t.left?(j(!0),d?.(48)):(j(!1),d?.(96)))}}),[y,v]);return n.useEffect((()=>(R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)})),[R]),t.jsxs("nav",{css:Wh(v&&!C,u,p),children:[t.jsxs("div",{css:Uh(v&&!C,c),children:[t.jsxs("div",{css:(L=v&&!C,r.css`
3682
- display: flex;
3683
- align-items: center;
3684
- justify-content: flex-start;
3685
- gap: 12px;
3686
- color: ${h("neutral",L?100:900)};
3687
- `),ref:f,children:[e?t.jsx("div",{ref:g,css:Xh,children:e}):null,t.jsx("div",{css:Yh(v),children:a?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Kh(i===e.link),children:e.label},e.label):t.jsx(Ce,{label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:Jh,ref:x,children:C?t.jsxs("button",{type:"button",onClick:()=>$(!k),"aria-label":"Open menu",css:tf,children:[k?"Close":"Menu",k?t.jsx(E,{height:"16px",width:"16px"}):t.jsx(J,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Jh,children:s?.map(((e,n)=>t.jsx("div",{css:Qh(v),children:e},n)))}),l?t.jsx("div",{css:ef(v),children:l.map((e=>t.jsx(b,{...e},e.ariaLabel)))}):null]})})]}),v&&!C?t.jsx("div",{css:Gh,children:a?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Kh(i===e.link),children:e.label},e.label):t.jsx(Ce,{label:e.label,items:e.items||[]},e.label)))}):null,C?t.jsx(hf,{navigationSection:a,utilitySection:s,actionsSection:l,linkRouter:o,isOpen:k,setIsOpen:$,pathname:i}):null]});var L},exports.NavigationRail=({tabs:r=[],defaultValue:o,onTabClick:i,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(o||r?.[0]?.value),p=e=>{d(e),i&&i(e)},[f]=e.useMediaQuery(["(max-width: 768px)"]);return f?t.jsxs(e.Tabs.Root,{defaultValue:u,onValueChange:({value:e})=>p(e),children:[t.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"8px",gap:"8px"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{value:n.value,css:{"--indicator-color":h("primary",500),flexShrink:0,padding:"10px 16px",color:h("neutral",600),"&[data-selected]":{color:h("neutral",800),fontWeight:600}},children:n.label},n.value)))}),r.map((n=>t.jsx(e.Tabs.Content,{value:n.value,children:a},n.value)))]}):t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:xf,children:[t.jsx(e.Tabs.Root,{defaultValue:o||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{p(e)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{css:gf,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"ds-tab-label",children:[n.icon?t.jsx("div",{css:vf,children:n.icon}):null,t.jsx("p",{children:n.label})]})},n.label)))})}),a?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{c(e),s&&s(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:mf,children:[t.jsx("div",{css:vf,children:l?t.jsx(w,{}):t.jsx(y,{})}),t.jsxs("div",{className:"ds-tab-label",children:[t.jsx("p",{children:l?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),a?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!l,children:t.jsx(e.Collapsible.Content,{height:"100%",children:t.jsx("div",{css:bf,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((n=>{return t.jsxs(e.RadioCard.Item,{css:Ie,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Ve,children:[t.jsxs("div",{css:(i=n.variant,r.css`
3691
+ `),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=se,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(Tn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:la,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:ca,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:Vh(r,o),children:t.jsxs("div",{css:Nh(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Ah,children:e}),t.jsx("div",{children:t.jsxs("p",{css:zh,children:[n," ",a]})})]})})},exports.IconButton=ae,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(k,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Gf;return"info-grey"===r?c=Uf:"success"===r?c=Xf:"warning"===r?c=Yf:"error"===r&&(c=Kf),t.jsxs("div",{css:[Ff(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Zf,children:[i,t.jsx("p",{css:qf(o),children:e})]}),t.jsx("p",{css:Wf(o),children:n})]}),s?t.jsx(b,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:pt,children:[i?t.jsx("div",{css:xt}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:ht(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:ft(p),"aria-label":o,children:o}),i?t.jsx("p",{css:gt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:vt(!!i,s),attached:!0,children:["start"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(kt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Yt,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ii,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Xo,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Yo,children:[r,t.jsx(Gt,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Ko,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(We,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(ri,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:Uo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=ri,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:oi,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:ii,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:ai,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx($,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:si,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:li,children:[t.jsxs("div",{css:ci,children:[t.jsx(ae,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ae,{icon:t.jsx($,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ae,{icon:t.jsx($,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ui,children:[t.jsxs("div",{children:[t.jsx("h3",{css:di,children:e}),t.jsx("p",{css:pi,children:n})]}),t.jsx(b,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:hi,children:[t.jsx(b,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(k,{}),onClick:l}),t.jsx(mi,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=qi,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(V,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(N,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(fe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapMarker=Tn,exports.MapMarkers=Pn,exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=Ao({open:e,onOpenChange:r,placement:c,whileElementsMounted:ao,middleware:[bo(u),(b={fallbackAxisSideDirection:"start"},{...co(b),options:[b,y]}),yo({padding:8}),wo({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=_o(),v=Ar("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Vo(f),{escapeKey:C,outsidePress:j}=Vo(x),k=l.useRef(!1),$=Ar((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Ir(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Ar((e=>{var t;const n=()=>{var t;$(e),null==(t=Mr(e))||t.removeEventListener("keydown",n)};null==(t=Mr(e))||t.addEventListener("keydown",n)})),E=Ar((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=Mr(e),l="[data-floating-ui-inert]",c=Dr(o.floating).querySelectorAll(l);let d=Nn(s)?s:null;for(;d&&!Qn(d);){const e=nr(d);if(Qn(e)||!Nn(e))break;d=e}if(c.length&&Nn(s)&&!s.matches("html,body")&&!Pr(s,o.floating)&&Array.from(c).every((e=>!Pr(d,e))))return;if(An(s)&&O){const t=Qn(s),n=er(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Ir(g.nodesRef.current,p).some((t=>{var n;return _r(e,null==(n=t.context)?void 0:n.elements.floating)}));if(_r(e,o.floating)||_r(e,o.domReference)||h)return;const f=g?Ir(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Ar((e=>{var t;const n=()=>{var t;E(e),null==(t=Mr(e))||t.removeEventListener(u,n)};null==(t=Mr(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Kn()?5:0)}const d=Dr(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Nn(o.domReference)&&(p=or(o.domReference)),Nn(o.floating)&&(p=p.concat(or(o.floating))),!Nn(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(or(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const L=l.useMemo((()=>({onKeyDown:$,...d&&{[Do[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),O=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Io[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:L,floating:O}:{}),[a,L,O])}(g,{escapeKey:d,outsidePress:p}),C=Ho(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>zo(t,e,"reference")),t),i=l.useCallback((t=>zo(t,e,"floating")),n),a=l.useCallback((t=>zo(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Fo,children:[t.jsxs("div",{css:Zo,children:[i,t.jsx(se,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:qo,children:a}),s?t.jsx("div",{css:Wo,children:s}):null,t.jsx("div",{ref:h,css:Go(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=Ce,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>qh(o,r)));return t.jsx("div",{css:Bh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=qh(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Hh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Fh,children:[i,s?t.jsx("div",{css:Zh,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(ds,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ps(i),children:[t.jsxs(e.Dialog.Header,{css:hs,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:fs,asChild:!0,children:t.jsx(se,{})})]}),t.jsx(e.Dialog.Body,{css:xs,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),p=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:Se,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":p,role:"group",children:[t.jsx(b,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ke(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(b,{variant:r,size:o,leftIcon:t.jsx($,{rotate:u?"180":"0",color:h("accessible","text-on-primary-mids")||h("primary",900)}),disabled:l})}),t.jsx(Ee,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:$e(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({variant:e="default",theme:r="light",logo:o,linkRouter:i,pathname:a,navigationSection:s,utilitySection:l,actionsSection:c,maxWidth:u,fixed:d,onNavbarHeightChange:p,backgroundColor:h})=>{const f=n.useRef(null),x=n.useRef(null),g=n.useRef(null),[v,m]=n.useState(!1),[y,w]=n.useState(-1),[C,j]=n.useState("undefined"!=typeof window&&window?.innerWidth<=xf),[k,$]=n.useState(!1),S=i,R=n.useCallback((()=>{if(x.current&&f.current&&g.current){const e=f.current.getBoundingClientRect(),t=x.current.getBoundingClientRect(),n=g.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=xf||window.innerWidth<=y?(p?.(96),m(!0)):window.innerWidth>xf&&window.innerWidth<=1440?e.right>=t.left?(p?.(96),m(!0),w(window.innerWidth)):window.innerWidth>y&&(p?.(48),m(!1),w(-1)):(p?.(48),m(!1),w(-1)),v&&(window.innerWidth<=xf||n.right>=t.left?(j(!0),p?.(48)):(j(!1),p?.(96)))}}),[y,v]);n.useEffect((()=>(R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)})),[R]);const L="condensed"===e;return t.jsxs("nav",{css:Wh(v&&!C,d,h,r,L),children:[t.jsxs("div",{css:Uh(v&&!C,u,L),children:[t.jsxs("div",{css:Xh(v&&!C||"dark"===r,L),ref:f,children:[o?t.jsx("div",{ref:g,css:Yh,children:o}):null,t.jsx("div",{css:Kh(v),children:s?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Jh(a===e.link,r),children:e.label},e.label):t.jsx(Ce,{theme:r,label:e.label,items:e.items||[]},e.label)))})]}),t.jsx("div",{css:Qh(L),ref:x,children:C?t.jsxs("button",{type:"button",onClick:()=>$(!k),"aria-label":"Open menu",css:nf(r),children:[k?"Close":"Menu",k?t.jsx(E,{height:"16px",width:"16px"}):t.jsx(J,{height:"16px",width:"16px"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{css:Qh(L),children:l?.map(((e,n)=>t.jsx("div",{css:ef(v),children:e},n)))}),c?.length?t.jsx("div",{css:tf(v),children:c.map((e=>t.jsx(b,{...e},e.ariaLabel)))}):null]})})]}),v&&!C?t.jsx("div",{css:Gh(r,L),children:s?.map((e=>e.link?t.jsx(S,{to:e.link,href:e.link,css:Jh(a===e.link,r),children:e.label},e.label):t.jsx(Ce,{theme:r,label:e.label,items:e.items||[]},e.label)))}):null,C?t.jsx(ff,{theme:r,navigationSection:s,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:k,setIsOpen:$,pathname:a}):null]})},exports.NavigationRail=({tabs:r=[],defaultValue:o,onTabClick:i,children:a,onOpenChange:s})=>{const[l,c]=n.useState(!1),[u,d]=n.useState(o||r?.[0]?.value),p=e=>{d(e),i&&i(e)},[f]=e.useMediaQuery(["(max-width: 768px)"]);return f?t.jsxs(e.Tabs.Root,{defaultValue:u,onValueChange:({value:e})=>p(e),children:[t.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"8px",gap:"8px"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{value:n.value,css:{"--indicator-color":h("primary",500),flexShrink:0,padding:"10px 16px",color:h("neutral",600),"&[data-selected]":{color:h("neutral",800),fontWeight:600}},children:n.label},n.value)))}),r.map((n=>t.jsx(e.Tabs.Content,{value:n.value,children:a},n.value)))]}):t.jsxs("div",{style:{height:"calc(100vh - 48px - 56px)",position:"fixed",top:"48px",left:0,display:"flex"},children:[t.jsxs("div",{css:gf,children:[t.jsx(e.Tabs.Root,{defaultValue:o||r?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{p(e)},role:"tablist",children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:r.map((n=>t.jsx(e.Tabs.Trigger,{css:vf,"aria-label":n["aria-label"]||n.label,...n,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"5px",className:"ds-tab-label",children:[n.icon?t.jsx("div",{css:mf,children:n.icon}):null,t.jsx("p",{children:n.label})]})},n.label)))})}),a?t.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{c(e),s&&s(!e)},children:t.jsxs(e.Collapsible.Trigger,{css:bf,children:[t.jsx("div",{css:mf,children:l?t.jsx(w,{}):t.jsx(y,{})}),t.jsxs("div",{className:"ds-tab-label",children:[t.jsx("p",{children:l?"Show":"Hide"}),t.jsx("p",{children:"Sidebar"})]})]})}):null]}),a?t.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!l,children:t.jsx(e.Collapsible.Content,{height:"100%",children:t.jsx("div",{css:yf,role:"tabpanel","aria-labelledby":u,children:a})})}):null]})},exports.OptionCard=({defaultValue:n,items:o,onValueChange:i})=>t.jsx(e.RadioCard.Root,{defaultValue:n,onValueChange:i,children:t.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"12px",children:o.map((n=>{return t.jsxs(e.RadioCard.Item,{css:Ie,value:n.value,disabled:n.disabled,children:[t.jsx(e.RadioCard.ItemHiddenInput,{}),t.jsxs(e.RadioCard.ItemControl,{css:Ve,children:[t.jsxs("div",{css:(i=n.variant,r.css`
3688
3692
  width: 100%;
3689
3693
  display: flex;
3690
3694
  flex-direction: ${"centered"===i?"column":"row"};
@@ -3708,7 +3712,7 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3708
3712
  font-weight: 700;
3709
3713
  color: ${h("Medium"===v?"warning":"Strong"===v||"Very Strong"===v?"success":"error",900)};
3710
3714
  }
3711
- `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:nn(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:rn(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:rn(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:rn(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:rn(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:rn(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:Kf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Jf(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"}),ariaLabelType:c=""})=>{const[u,d]=n.useState(!0),p=n.useId(),h=n.useId(),f="raster"===e,x="line"===e,g="point"===e,v=n.useId(),m=n.useMemo((()=>{let e=c??`${c},`;x&&(e="line,");return`${e} ${r}${o?`, ${o}`:""}. Currently ${u?"visible":"hidden"}.`}),[u,e,r,o]),y=u?"Hide":"Show";return t.jsxs("div",{css:Ci,children:[t.jsx("p",{id:v,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:m}),t.jsxs("div",{css:ji,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:bi(i)}),x&&t.jsx("div",{css:yi(i)}),g&&t.jsx("div",{css:wi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:ki,children:r}),o?t.jsx("p",{id:h,css:$i,children:o}):null]})]}),a&&s?t.jsx("div",{css:Si,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:u?t.jsx(O,{}):t.jsx(L,{}),"aria-pressed":u,"aria-labelledby":`${v} ${p}`,onClick:()=>{d((e=>!e)),a?.()}})}):null]})},exports.Radio=qe,exports.RadioGroup=We,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:on,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:cn}):null,t.jsxs("div",{css:(f=!!c,r.css`
3715
+ `),"aria-live":"polite",role:"status",children:["Password Strength: ",t.jsx("span",{children:x.strength})]}),t.jsx("div",{css:nn(x.strength),children:t.jsx("div",{})}),t.jsxs("div",{css:rn(x.length),"aria-label":`Use a minimum of ${l} characters. ${x.length?"Requirement met.":"Requirement not met."}`,children:[t.jsx("div",{children:x.length?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsxs("p",{children:["Use a minimum of ",l," characters"]})]}),a?.uppercase?null:t.jsxs("div",{css:rn(x.uppercase),"aria-label":"Use an uppercase letter. "+(x.uppercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.uppercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use an uppercase letter"})]}),a?.lowercase?null:t.jsxs("div",{css:rn(x.lowercase),"aria-label":"Use a lowercase letter. "+(x.lowercase?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.lowercase?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a lowercase letter"})]}),a?.numbers?null:t.jsxs("div",{css:rn(x.numbers),"aria-label":"Use a number. "+(x.numbers?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.numbers?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a number"})]}),a?.specialCharacters?null:t.jsxs("div",{css:rn(x.specialCharacters),"aria-label":"Use a special character. "+(x.specialCharacters?"Requirement met.":"Requirement not met."),children:[t.jsx("div",{children:x.specialCharacters?t.jsx(C,{color:"var(--chakra-colors-success-500)",height:"8px",width:"8px"}):t.jsx(E,{color:"var(--chakra-colors-error-900)",height:"8px",width:"8px"})}),t.jsx("p",{children:"Use a special character"})]})]}):null]});var v},exports.ProgressBar=({progress:e})=>{let n=e;return n>100&&(n=100),n<0&&(n=0),t.jsx("div",{css:Jf,role:"progressbar","aria-label":`Progress: ${n}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,children:t.jsx("div",{css:Qf(n)})})},exports.QualitativeAttribute=({type:e,label:r,caption:o,color:i,onActionClick:a,showActionButton:s,pointIcon:l=t.jsx(Z,{color:"#006D2C"}),ariaLabelType:c=""})=>{const[u,d]=n.useState(!0),p=n.useId(),h=n.useId(),f="raster"===e,x="line"===e,g="point"===e,v=n.useId(),m=n.useMemo((()=>{let e=c??`${c},`;x&&(e="line,");return`${e} ${r}${o?`, ${o}`:""}. Currently ${u?"visible":"hidden"}.`}),[u,e,r,o]),y=u?"Hide":"Show";return t.jsxs("div",{css:Ci,children:[t.jsx("p",{id:v,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:m}),t.jsxs("div",{css:ji,children:[t.jsxs("div",{children:[f&&t.jsx("div",{css:bi(i)}),x&&t.jsx("div",{css:yi(i)}),g&&t.jsx("div",{css:wi(i),children:l})]}),t.jsxs("div",{children:[t.jsx("p",{id:p,css:ki,children:r}),o?t.jsx("p",{id:h,css:$i,children:o}):null]})]}),a&&s?t.jsx("div",{css:Si,children:t.jsx(b,{type:"button",variant:"borderless",label:y,rightIcon:u?t.jsx(O,{}):t.jsx(L,{}),"aria-pressed":u,"aria-labelledby":`${v} ${p}`,onClick:()=>{d((e=>!e)),a?.()}})}):null]})},exports.Radio=qe,exports.RadioGroup=We,exports.RadioList=({label:n,caption:o,name:i,radios:a,defaultValue:s,onCheckedChange:l,errorMessage:c,horizontal:u,variant:d="default",required:p})=>{const h=`${n}. ${o?`${o}.`:""} ${p?"Required.":"Optional."} ${c?`Error: ${c}.`:""} `;return t.jsxs(e.Group,{css:on,"aria-roledescription":"group","aria-label":h,children:[c?t.jsx("div",{css:cn}):null,t.jsxs("div",{css:(f=!!c,r.css`
3712
3716
  margin-left: ${f?"19px":"0px"};
3713
3717
  `),children:[t.jsxs("p",{css:an,"aria-label":n,children:[p&&t.jsx("span",{"aria-label":"required",children:"*"}),n]}),t.jsx("p",{css:sn,"aria-label":o,children:o}),c?t.jsx("p",{css:un,"aria-label":c,children:c}):null,t.jsx("div",{css:ln,children:t.jsx(We,{name:i,defaultValue:s,onChange:l,horizontal:u&&"card"!==d,children:a.map((e=>t.jsx(qe,{css:"card"===d?dn:{},...e},e.value)))})})]})]});var f},exports.SSOButtons=re,exports.ScaleBar=({colors:e,values:n,subLabels:o,isGradient:i})=>{return t.jsxs("div",{css:Ei,children:[i?t.jsx("div",{css:(a=Pi(e),r.css`
3714
3718
  height: 20px;
@@ -3717,4 +3721,4 @@ function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3717
3721
  border: 1px solid ${h("neutral",300)};
3718
3722
  border-radius: 4px;
3719
3723
  ${a?`background: ${a};`:""}
3720
- `)}):t.jsx("div",{css:Ri,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:Li,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Oi,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Li,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ti,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Search=({placeholder:r,disabled:o,size:i="default",options:a=[],resultsMaxHeight:s="200px",isLoading:l=!1,displayResults:c="text",onSelect:u,onQueryChange:d,onClear:p,renderResults:f})=>{const[x,g]=n.useState(""),{open:v,onOpen:m,onClose:b}=e.useDisclosure(),[y,w]=n.useState(a),[C,j]=n.useState(-1),k=n.useRef(null),$=`search-results-${n.useId()}`,S=e=>{const t=a.find((t=>t.id===e||t.label===e));t&&(u?.(t),g(""),b())};n.useEffect((()=>{if(d?.(x),!x)return void w(a);const e=a.filter((e=>e.id?.toLowerCase().includes(x.toLowerCase())||e.label.toLowerCase().includes(x.toLowerCase())||e.caption?.toLowerCase().includes(x.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>S(e.id||e.label)})));w(e),m()}),[x]),n.useEffect((()=>{function e(e){v&&k.current&&!k.current.contains(e.target)&&b()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[v]);const E=x.length?t.jsx(se,{style:{marginTop:"-12px"},onClick:()=>{g(""),p?.()}}):null,R="none"!==c&&!!x.length&&y.length>0&&v;return t.jsxs("div",{ref:k,style:{position:"relative",width:"100%"},children:[t.jsx(e.InputGroup,{startElement:t.jsx(ne,{fill:o?h("neutral",500):h("primary",700),style:{marginTop:"-12px"}}),endElement:E,children:t.jsx(kt,{autoComplete:"off",placeholder:r||"Filter",onChange:e=>{const{value:t}=e.target;g(t)},value:x,label:"",style:{paddingLeft:"40px"},type:"search","aria-label":r||"Search filter","aria-expanded":R,"aria-controls":$,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,onKeyDown:e=>{if(R){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,y.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),C>=0)){const e=y[C];S(e.id||e.label)}"Escape"===e.key&&b()}}})}),(R||l&&!!x.length)&&"custom"===c&&f&&!l&&f({items:y,highlightedIndex:C,query:x,onSelect:S}),(R||l&&!!x.length)&&t.jsx(e.Portal,{container:k,children:t.jsxs(e.Box,{position:"absolute",marginTop:"-20px",width:"100%",backgroundColor:"white",border:"1px solid",borderColor:"gray.200",borderRadius:"md",boxShadow:"md",zIndex:1e3,overflowY:"auto",maxHeight:s,children:[l&&t.jsx(e.Box,{padding:"1rem",children:t.jsx(e.Spinner,{})}),"text"===c&&!l&&t.jsx(Lf,{highlightedIndex:C,items:y,query:x,onSelect:S}),"list"===c&&!l&&t.jsx(qi,{items:y,highlightedIndex:C})]})})]})},exports.Select=Yt,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:u="minimized",className:d,blocking:p,zIndex:h=1e3})=>{const f=n.useRef(null),x=n.useRef([]),[g,v]=n.useState(null),m=window.innerWidth>768,b=x.current;let y="Expand sheet";if(null!=g){const e=Mh(g,b);e>0&&e<b.length-1?y="Make full screen":e===b.length-1&&(y="Expanded sheet")}const w=!(null==g||!b.length||Mh(g,b)!==b.length-1);return t.jsx(Oh,{ref:f,css:Ph(!!e,h),className:d,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("button",{type:"button",disabled:w,"aria-label":y,css:Th,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=b[b.length-1];if(m)return void f.current?.snapTo?.((()=>t));const n=g??b[0];let r=b.findIndex((e=>e>n));-1===r&&(r=b.length-1);const o=b[r];f.current?.snapTo?.((()=>o))},children:t.jsx("div",{})}),t.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:y}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,s||e,l+(o?n:0),c||t-t/6];return x.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(o?n:0):"full"===u&&(r=c||t-t/6),r},blocking:p,children:i?r:null})},exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Tn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=tt,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:pn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:hn(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:fn,children:[i.step&&i.marks?t.jsx(Yt,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(tt,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:Qf,children:[e.map(((e,r)=>t.jsxs("div",{css:ex,children:[t.jsx("button",{css:tx(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:nx(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:rx,children:t.jsx("div",{css:ox})})]}),exports.Switch=rt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(Sf(i,o)||0);return t.jsx("div",{css:yf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(Sf(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>t.jsxs(n.Fragment,{children:["view"===r&&1===i&&"left"===Ef(l)?t.jsx("div",{css:jf}):null,t.jsx(e.Tabs.Trigger,{css:[wf,"view"===r&&kf,"panel"===r&&Cf,"transparent"===r&&$f],"aria-label":o["aria-label"]||o.label,...o,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[o.icon,o.label]})},o.label),"view"===r&&1===i&&"right"===Ef(l)?t.jsx("div",{css:jf}):null]},o.label)))})})})},exports.Table=({columns:r,data:o=[],renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,variant:d="default",onSortColumn:p,onPageSizeChange:f,onPageChange:x,onAllItemsSelected:g,loading:v})=>{const[m,b]=n.useState({key:"",order:""}),{totalItems:y=o.length,currentPage:w=1,pageSize:C=10,showItemCount:j,showItemCountText:k}=l||{},S=(e,t)=>{b({key:e,order:t}),p&&p({key:e,order:t})},E=u?.length===o?.length,R=u&&u.length>0&&!E;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Ki(d),striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ji(d),children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Le,{name:"header-checkbox",checked:E,indeterminate:R,onCheckedChange:({checked:e})=>{g&&g(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===m.order?"ascending":n.sortable&&"desc"===m.order?"descending":void 0,children:t.jsxs("div",{css:Qi,children:[n.label,n.sortable?t.jsxs("div",{css:ea,children:[t.jsx(ae,{css:ta(m.key===n.key&&"asc"===m.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>S(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ae,{css:ta(m.key===n.key&&"desc"===m.order),icon:t.jsx($,{}),onClick:()=>S(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{css:oa,children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),v?t.jsx("div",{css:ia,children:t.jsx(e.Spinner,{size:"lg",color:h("primary",500)})}):null,t.jsxs("div",{css:na,children:[t.jsx("div",{children:j?t.jsx(Ii,{pageSize:C,currentPage:w,totalItems:y,onPageSizeChange:f,showItemCountText:k}):null}),l?t.jsx("div",{css:ra,children:t.jsx(Yi,{totalItems:y,pageSize:C,currentPage:w,onPageChange:x})}):null]})]})},exports.TableCell=sa,exports.TableRow=aa,exports.Tag=Gt,exports.TextInput=kt,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:xn(c),children:[S?t.jsx("div",{css:gn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:vn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:mn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:yn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:wn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:yn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:yn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:bn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(dx).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:dx[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:ix,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:ax,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:sx,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:lx,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),dx[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:cx,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>dx[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=pe,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{dx[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};
3724
+ `)}):t.jsx("div",{css:Ri,children:e?.map(((e,r)=>t.jsx("div",{"data-test":`${e}-${n?.[r]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${n?.[r]}`)))}),t.jsx("div",{css:Li,children:n?.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Oi,children:e})},e)))}),o&&o.length?t.jsx("div",{css:Li,children:o.map((e=>t.jsx("div",{style:{width:i?"auto":`calc(100% / ${n.length})`,display:"flex",justifyContent:"center"},children:t.jsx("p",{css:Ti,style:{width:"100%"},children:e})},e)))}):null]});var a},exports.Search=({placeholder:r,disabled:o,size:i="default",options:a=[],resultsMaxHeight:s="200px",isLoading:l=!1,displayResults:c="text",onSelect:u,onQueryChange:d,onClear:p,renderResults:f})=>{const[x,g]=n.useState(""),{open:v,onOpen:m,onClose:b}=e.useDisclosure(),[y,w]=n.useState(a),[C,j]=n.useState(-1),[k,$]=n.useState(!1),S=n.useRef(null),E=`search-results-${n.useId()}`,R=e=>{const t=a.find((t=>t.id===e||t.label===e));t&&(u?.(t),g(""),b())};n.useEffect((()=>{if(d?.(x),!x)return void w(a);const e=a.filter((e=>e.id?.toLowerCase().includes(x.toLowerCase())||e.label.toLowerCase().includes(x.toLowerCase())||e.caption?.toLowerCase().includes(x.toLowerCase()))).map((e=>({id:e.id,label:e.label,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>R(e.id||e.label)})));w(e),m()}),[x]),n.useEffect((()=>{function e(e){v&&S.current&&!S.current.contains(e.target)&&b()}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[v]);const L=x.length?t.jsx(se,{style:{marginTop:"-12px"},onClick:()=>{g(""),p?.()}}):null,O="none"!==c&&!!x.length&&y.length>0&&v;let T=h("neutral",500);return o?T=h("neutral",500):k&&(T=h("primary",700)),t.jsxs("div",{ref:S,style:{position:"relative",width:"100%"},children:[t.jsx(e.InputGroup,{startElement:t.jsx(ne,{fill:T,style:{marginTop:"-12px"}}),endElement:L,children:t.jsx(kt,{autoComplete:"off",placeholder:r||"Filter",onChange:e=>{const{value:t}=e.target;g(t)},onFocus:()=>$(!0),onBlur:()=>$(!1),value:x,label:"",style:{paddingLeft:"40px",borderColor:h("neutral",500)},type:"search","aria-label":r||"Search filter","aria-expanded":O,"aria-controls":E,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,onKeyDown:e=>{if(O){if("ArrowDown"===e.key&&(e.preventDefault(),j((e=>Math.min(e+1,y.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),C>=0)){const e=y[C];R(e.id||e.label)}"Escape"===e.key&&b()}}})}),(O||l&&!!x.length)&&"custom"===c&&f&&!l&&f({items:y,highlightedIndex:C,query:x,onSelect:R}),(O||l&&!!x.length)&&t.jsx(e.Portal,{container:S,children:t.jsxs(e.Box,{position:"absolute",marginTop:"-20px",width:"100%",backgroundColor:"white",border:"1px solid",borderColor:"gray.200",borderRadius:"md",boxShadow:"md",zIndex:1e3,overflowY:"auto",maxHeight:s,children:[l&&t.jsx(e.Box,{padding:"1rem",children:t.jsx(e.Spinner,{})}),"text"===c&&!l&&t.jsx(Of,{highlightedIndex:C,items:y,query:x,onSelect:R}),"list"===c&&!l&&t.jsx(qi,{items:y,highlightedIndex:C})]})})]})},exports.Select=Yt,exports.Sheet=({header:e,content:r,footer:o,open:i=!1,onClose:a,minimizedHeight:s,midHeight:l=200,maxFullHeight:c,defaultSnap:u="minimized",className:d,blocking:p,zIndex:h=1e3})=>{const f=n.useRef(null),x=n.useRef([]),[g,v]=n.useState(null),m=window.innerWidth>768,b=x.current;let y="Expand sheet";if(null!=g){const e=Mh(g,b);e>0&&e<b.length-1?y="Make full screen":e===b.length-1&&(y="Expanded sheet")}const w=!(null==g||!b.length||Mh(g,b)!==b.length-1);return t.jsx(Oh,{ref:f,css:Ph(!!e,h),className:d,open:i,onDismiss:a,header:t.jsxs("div",{children:[t.jsx("button",{type:"button",disabled:w,"aria-label":y,css:Th,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=b[b.length-1];if(m)return void f.current?.snapTo?.((()=>t));const n=g??b[0];let r=b.findIndex((e=>e>n));-1===r&&(r=b.length-1);const o=b[r];f.current?.snapTo?.((()=>o))},children:t.jsx("div",{})}),t.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:y}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,s||e,l+(o?n:0),c||t-t/6];return x.current=r,r},onSpringEnd:()=>{const e=f.current?.height;e&&v(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===u?r=s||e:"mid"===u?r=l+(o?n:0):"full"===u&&(r=c||t-t/6),r},blocking:p,children:i?r:null})},exports.SimpleMapPin=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="simple-pin"})=>o.jsx(Tn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.Slider=tt,exports.SliderInput=({label:e,caption:r,size:o="default",sliderItem:i,required:a,onChange:s})=>{const[l,c]=n.useState(i.value||[]),u=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const a=i.min||0,s=i.max||100;o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>s?s:o,r[t]=o,c(r)},d=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const a=i.min||0,u=i.max||100;if(o=Number.isNaN(o)?a:o,o=o<a?a:o,o=o>u?u:o,2===l?.length){o=Number.isNaN(o)?a:o;const e=l[0],n=l[1];0===t?(o=o<a?a:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>u?u:o)}r[t]=o,c(r),s&&s(r)};return t.jsxs("div",{children:[t.jsxs("p",{css:pn(o),"aria-label":e,children:[a?t.jsx("span",{children:"*"}):null,e]}),r?t.jsx("p",{css:hn(o),"aria-label":r,children:r}):null,t.jsxs("div",{css:fn,children:[i.step&&i.marks?t.jsx(Yt,{items:i.marks.map((e=>({label:`${e.label}`,value:`${e.value}`}))),placeholder:"",style:{width:"90px"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),s&&s(t)}}):t.jsx(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>u(e,0),onBlur:e=>d(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),t.jsx(tt,{css:{},...i,value:l,onValueChangeEnd:e=>{c(e.value),s&&s(e.value)}}),2===l?.length?t.jsx(kt,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>u(e,1),onBlur:e=>d(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}):null]})]})},exports.StepProgressIndicator=({steps:e,currentStep:n})=>t.jsxs("div",{css:ex,children:[e.map(((e,r)=>t.jsxs("div",{css:tx,children:[t.jsx("button",{css:nx(n>=r+1,n<r+1),type:"button",onClick:e.onClick,"aria-current":n===r+1,"aria-disabled":n<r+1,disabled:n<r+1,"aria-label":`Current Step ${r}${e.label?` ${e.label}`:""}`,"data-active":n>=r+1,children:n>r+1?t.jsx(C,{height:"16px",width:"16px"}):r+1}),e.label?t.jsx("p",{css:rx(n===r+1),children:e.label}):null]},`${e.label}-${r}`))),t.jsx("div",{css:ox,children:t.jsx("div",{css:ix})})]}),exports.Switch=rt,exports.TabBar=({variant:r="panel",defaultValue:o,tabs:i,onTabClick:a,activationMode:s="manual"})=>{const[l,c]=n.useState(Ef(i,o)||0);return t.jsx("div",{css:wf(r),children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(Ef(i,t=e)),void(a&&a(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,i)=>t.jsxs(n.Fragment,{children:["view"===r&&1===i&&"left"===Rf(l)?t.jsx("div",{css:kf}):null,t.jsx(e.Tabs.Trigger,{css:[Cf,"view"===r&&$f,"panel"===r&&jf,"transparent"===r&&Sf],"aria-label":o["aria-label"]||o.label,...o,children:t.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"5px",children:[o.icon,o.label]})},o.label),"view"===r&&1===i&&"right"===Rf(l)?t.jsx("div",{css:kf}):null]},o.label)))})})})},exports.Table=({columns:r,data:o=[],renderRow:i,striped:a,stickyHeader:s,pagination:l,selectable:c,selectedRows:u,variant:d="default",onSortColumn:p,onPageSizeChange:f,onPageChange:x,onAllItemsSelected:g,loading:v})=>{const[m,b]=n.useState({key:"",order:""}),{totalItems:y=o.length,currentPage:w=1,pageSize:C=10,showItemCount:j,showItemCountText:k}=l||{},S=(e,t)=>{b({key:e,order:t}),p&&p({key:e,order:t})},E=u?.length===o?.length,R=u&&u.length>0&&!E;return t.jsxs("div",{children:[t.jsxs(e.Table.Root,{css:Ki(d),striped:a,stickyHeader:s,interactive:!0,children:[t.jsx(e.Table.Header,{css:Ji(d),children:t.jsxs(e.Table.Row,{children:[c?t.jsx(e.Table.ColumnHeader,{children:t.jsx(Le,{name:"header-checkbox",checked:E,indeterminate:R,onCheckedChange:({checked:e})=>{g&&g(e)}})}):null,r.map((n=>t.jsx(e.Table.ColumnHeader,{role:n.sortable?"columnheader":void 0,"aria-sort":n.sortable&&"asc"===m.order?"ascending":n.sortable&&"desc"===m.order?"descending":void 0,children:t.jsxs("div",{css:Qi,children:[n.label,n.sortable?t.jsxs("div",{css:ea,children:[t.jsx(ae,{css:ta(m.key===n.key&&"asc"===m.order),icon:t.jsx($,{style:{transform:"rotate(180deg)"}}),onClick:()=>S(n.key,"asc"),"aria-label":"Ascending"}),t.jsx(ae,{css:ta(m.key===n.key&&"desc"===m.order),icon:t.jsx($,{}),onClick:()=>S(n.key,"desc"),"aria-label":"Descending"})]}):null]})},n.key)))]})}),t.jsx(e.Table.Body,{css:oa,children:o.map((e=>t.jsx(n.Fragment,{children:i(e)},e.id)))})]}),v?t.jsx("div",{css:ia,children:t.jsx(e.Spinner,{size:"lg",color:h("primary",500)})}):null,t.jsxs("div",{css:na,children:[t.jsx("div",{children:j?t.jsx(Ii,{pageSize:C,currentPage:w,totalItems:y,onPageSizeChange:f,showItemCountText:k}):null}),l?t.jsx("div",{css:ra,children:t.jsx(Yi,{totalItems:y,pageSize:C,currentPage:w,onPageChange:x})}):null]})]})},exports.TableCell=sa,exports.TableRow=aa,exports.Tag=Gt,exports.TextInput=kt,exports.Textarea=({label:r,caption:o,placeholder:i,errorMessage:a,required:s,disabled:l,size:c="default",defaultValue:u="",onChange:d,minLength:p,maxLength:h,...f})=>{const[x,g]=n.useState(u),[v,m]=n.useState(!1),[b,y]=n.useState(!1),[w,C]=n.useState(""),j=n.useId(),k=n.useId(),$=n.useId();n.useEffect((()=>{const{length:e}=u;p&&e<p&&e>0?(m(e<p),y(!1),C(`Enter at least ${p-e} characters`)):p&&0===e&&C(`Min ${p} characters`),h&&e>0?(m(!1),y(e>h),C(`You have ${h-e} characters remaining`)):h&&0===e&&C(`Max ${h} characters`)}),[]);const S=!!a||v||b,E=[o?j:null,S?k:null,w?$:null].filter(Boolean).join(" ")||void 0;return t.jsxs("div",{css:xn(c),children:[S?t.jsx("div",{css:gn}):null,t.jsxs(e.Field.Root,{required:s,invalid:S,gap:"0",style:{marginLeft:S?"19px":"0px"},children:[r?t.jsxs(e.Field.Label,{css:vn(c,l),"aria-label":r,children:[t.jsx(e.Field.RequiredIndicator,{"aria-label":"required"}),r,s?"":t.jsx("span",{children:" (Optional)"})]}):null,o?t.jsx(e.Field.HelperText,{id:j,css:mn(c,l),children:o}):null,a?t.jsx(e.Field.ErrorText,{id:k,css:yn,"aria-label":`Error: ${a}`,"aria-live":"polite",children:a}):null,t.jsx(e.Textarea,{placeholder:i,disabled:l,css:wn(c,x,u),onChange:e=>{g(e.target.value);const{length:t}=e.target.value;p&&h?(m(t<p),y(t>h),C(`You have ${h-t} characters remaining`)):p?(m(t<p),y(!1),C(t<p?`Enter at least ${p-t} characters`:"")):h&&(y(t>h),m(!1),C(`You have ${h-t} characters remaining`)),d&&d(e)},value:x,"aria-describedby":E,_placeholder:{color:"var(--chakra-colors-neutral-500)"},...f}),v&&p?t.jsxs(e.Field.ErrorText,{id:k,css:yn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You need ",p-x.length," more characters"]}):null,b&&h?t.jsxs(e.Field.ErrorText,{id:k,css:yn,style:{marginTop:"8px",fontSize:"12px",lineHeight:"16px"},"aria-live":"polite",children:["You have ",x.length-h," characters too many"]}):null,!w||b||v?null:t.jsx(e.Field.HelperText,{id:$,css:bn,"aria-live":"polite",children:w})]})]})},exports.Toast=()=>Object.keys(px).map((n=>t.jsx(e.Portal,{children:t.jsx(e.Toaster,{toaster:px[n],insetInline:{mdDown:"4"},children:r=>t.jsxs(e.Toast.Root,{css:ax,width:{md:"sm"},children:[t.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",children:["info"===r.type?r.meta?.icon?r.meta.icon:t.jsx(k,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===r.type?t.jsx(e.Spinner,{size:"lg",borderWidth:"3px",color:"var(--chakra-colors-primary-500)"}):null,"success"===r.type?r.meta?.icon?r.meta.icon:t.jsx(P,{color:"var(--chakra-colors-success-500)"}):null,"warning"===r.type?r.meta?.icon?r.meta.icon:t.jsx(M,{color:"var(--chakra-colors-warning-500)"}):null,"error"===r.type?r.meta?.icon?r.meta.icon:t.jsx(_,{color:"var(--chakra-colors-error-500)"}):null,t.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[t.jsx(e.Toast.Title,{css:sx,"aria-label":`${r.title}`,children:r.title}),r.description?t.jsx(e.Toast.Title,{css:lx,"aria-label":`${r.description}`,children:r.description}):null]})]}),r.action||r.meta?.closable?t.jsxs(e.Stack,{flexDirection:"row",children:[r.action?t.jsx(b,{css:cx,label:r.action.label,size:"small",variant:"info"===r.type?"primary":"secondary",onClick:()=>{r?.action?.onClick&&r.action.onClick(),px[n].dismiss()}}):null,r.meta?.closable?t.jsx(b,{css:ux,label:r.meta.closableLabel,"aria-label":r.meta?.closableLabel||"Dismiss",leftIcon:t.jsx(E,{height:"10px!",width:"10px!"}),size:"small",variant:"secondary",onClick:()=>px[n].dismiss()}):null]}):null]})})},n))),exports.Toolbar=fe,exports.Tooltip=pe,exports.designSystemStyles=p,exports.designSystemStylesForTailwind=d,exports.getThemedColor=h,exports.showToast=e=>{px[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel},...e})};