@worldresources/wri-design-systems 2.210.0 → 2.211.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
@@ -2479,37 +2479,62 @@
2479
2479
  gap: ${k(300)};
2480
2480
  margin-bottom: ${k(400)};
2481
2481
  `,zw=i.css`
2482
+ display: flex;
2483
+ flex-direction: column;
2484
+ gap: ${k(400)};
2485
+
2486
+ > :not(:last-child) {
2487
+ margin-bottom: 0;
2488
+ }
2489
+ `,Vw=i.css`
2482
2490
  font-size: ${C(400)};
2483
2491
  line-height: ${S(600)};
2484
2492
  font-weight: 400;
2485
2493
  text-align: left;
2486
2494
  color: ${w("neutral",900)};
2487
- `,Vw=i.css`
2495
+ `,Bw=i.css`
2488
2496
  font-size: ${C(300)};
2489
2497
  line-height: ${S(500)};
2490
2498
  font-weight: 400;
2491
2499
  text-align: left;
2492
2500
  color: ${w("neutral",700)};
2493
- `,Bw=i.css`
2501
+ `,Hw=i.css`
2494
2502
  display: flex;
2495
2503
  justify-content: space-between;
2496
2504
 
2497
2505
  button {
2498
2506
  width: 46%;
2499
2507
  }
2500
- `,Hw=i.css`
2508
+ `,_w=i.css`
2501
2509
  width: 14.625rem;
2502
2510
  border: ${j(100)} solid ${w("neutral",600)};
2503
2511
  border-radius: ${$(300)};
2504
- `,_w=i.css`
2505
- padding: ${k(300)};
2506
2512
  `,Fw=i.css`
2513
+ .ds-opacity-control-trigger {
2514
+ &:not(:disabled):not([data-disabled])[data-state='open'],
2515
+ &:not(:disabled):not([data-disabled])[aria-expanded='true'],
2516
+ &:not(:disabled):not([data-disabled])[data-popup-open],
2517
+ &:not(:disabled):not([data-disabled])[data-state='open']:hover,
2518
+ &:not(:disabled):not([data-disabled])[aria-expanded='true']:hover,
2519
+ &:not(:disabled):not([data-disabled])[data-popup-open]:hover {
2520
+ border-radius: ${$(300)};
2521
+ border: ${j(100)} solid
2522
+ ${w("neutral",600)};
2523
+ background-color: ${w("neutral",200)};
2524
+ box-shadow:
2525
+ 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.1),
2526
+ 0 0.125rem 0.25rem -0.125rem rgba(0, 0, 0, 0.1);
2527
+ }
2528
+ }
2529
+ `,qw=i.css`
2530
+ padding: ${k(300)};
2531
+ `,Ww=i.css`
2507
2532
  font-size: ${C(300)};
2508
2533
  line-height: ${S(500)};
2509
2534
  font-weight: 400;
2510
2535
  text-align: left;
2511
2536
  color: ${w("neutral",900)};
2512
- `,qw=i.css`
2537
+ `,Uw=i.css`
2513
2538
  display: flex;
2514
2539
  align-items: center;
2515
2540
  gap: ${k(300)};
@@ -2519,8 +2544,15 @@
2519
2544
  margin: 0;
2520
2545
 
2521
2546
  .chakra-input {
2522
- padding: ${k(100)};
2547
+ display: flex;
2548
+ height: ${k(700)};
2549
+ min-height: ${k(700)};
2550
+ padding: ${k(100)} ${k(200)};
2551
+ align-items: center;
2552
+ gap: ${k(200)};
2553
+ align-self: stretch;
2523
2554
  width: ${k(1200)};
2555
+ box-sizing: border-box;
2524
2556
  }
2525
2557
  }
2526
2558
 
@@ -2530,20 +2562,20 @@
2530
2562
  margin-top: 1.125rem;
2531
2563
  width: 100%;
2532
2564
  }
2533
- `,Ww=({defaultValue:t,onOpacityChanged:o,labels:i})=>{const s=Vf("OpacityControl",i),[a,l]=n.useState(t);return r.jsxs(e.Popover.Root,{positioning:{placement:"bottom-end"},children:[r.jsx(e.Popover.Trigger,{asChild:!0,children:r.jsx(Bf,{label:s.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{})})}),r.jsx(e.Popover.Positioner,{children:r.jsx(e.Popover.Content,{css:Hw,children:r.jsxs(e.Popover.Body,{css:_w,children:[r.jsx("p",{css:Fw,children:s.opacityHeading}),r.jsxs("div",{css:qw,children:[r.jsxs("div",{style:{position:"relative"},children:[r.jsx(gg,{"aria-label":s.opacityAriaLabel,min:"0",max:"100",value:a,onChange:e=>{const t=e.target.value||"0";let n=parseInt(t,10);n=Number.isNaN(n)?0:n,n=n<0?0:n,n=n>100?100:n,l(n),o&&o(n)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx("p",{style:{position:"absolute",top:"50%",right:"0.3125rem",transform:"translateY(-50%)",margin:0},children:s.percentSuffix})]}),r.jsx(Bb,{min:0,max:100,value:[a],onValueChangeEnd:({value:e})=>{l(e[0]),o&&o(e[0])}})]})]})})})]})},Uw=e=>i.css`
2565
+ `,Kw=({defaultValue:t,onOpacityChanged:o,labels:i})=>{const s=Vf("OpacityControl",i),[a,l]=n.useState(t);return r.jsx("span",{css:Fw,style:{display:"contents"},children:r.jsxs(e.Popover.Root,{positioning:{placement:"bottom-end"},children:[r.jsx(e.Popover.Trigger,{asChild:!0,children:r.jsx(Bf,{className:"ds-opacity-control-trigger",label:s.opacityButtonLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{})})}),r.jsx(e.Popover.Positioner,{children:r.jsx(e.Popover.Content,{css:_w,children:r.jsxs(e.Popover.Body,{css:qw,children:[r.jsx("p",{css:Ww,children:s.opacityHeading}),r.jsxs("div",{css:Uw,children:[r.jsxs("div",{style:{position:"relative"},children:[r.jsx(gg,{"aria-label":s.opacityAriaLabel,min:"0",max:"100",value:a,onChange:e=>{const t=e.target.value||"0";let n=parseInt(t,10);n=Number.isNaN(n)?0:n,n=n<0?0:n,n=n>100?100:n,l(n),o&&o(n)},className:"ds-opacity-control-text-input",onClick:e=>e.target.select()}),r.jsx("p",{style:{position:"absolute",top:"50%",right:"0.3125rem",transform:"translateY(-50%)",margin:0},children:s.percentSuffix})]}),r.jsx(Bb,{min:0,max:100,value:[a],onValueChangeEnd:({value:e})=>{l(e[0]),o&&o(e[0])}})]})]})})})]})})},Gw=e=>i.css`
2534
2566
  width: ${k(500)};
2535
2567
  height: ${k(500)};
2536
2568
  border-radius: 50%;
2537
2569
  background-color: ${e};
2538
2570
  border: ${j(100)} solid ${w("neutral",400)};
2539
- `,Kw=e=>i.css`
2571
+ `,Zw=e=>i.css`
2540
2572
  width: ${k(500)};
2541
2573
  height: ${k(200)};
2542
2574
  border-radius: ${$(200)};
2543
2575
  background-color: ${e};
2544
2576
  border: ${j(100)} solid ${w("neutral",400)};
2545
2577
  margin-top: 0.375rem;
2546
- `,Gw=e=>i.css`
2578
+ `,Jw=e=>i.css`
2547
2579
  width: ${k(500)};
2548
2580
  height: ${k(500)};
2549
2581
  border-radius: 50%;
@@ -2556,26 +2588,26 @@
2556
2588
  width: 0.625rem;
2557
2589
  height: 0.625rem;
2558
2590
  }
2559
- `,Zw=i.css`
2591
+ `,Xw=i.css`
2560
2592
  width: 100%;
2561
2593
  display: flex;
2562
2594
  justify-content: space-between;
2563
2595
  gap: ${k(200)};
2564
2596
  margin-bottom: ${k(400)};
2565
- `,Jw=i.css`
2597
+ `,Yw=i.css`
2566
2598
  display: flex;
2567
2599
  gap: ${k(200)};
2568
- `,Xw=i.css`
2600
+ `,Qw=i.css`
2569
2601
  font-size: ${C(300)};
2570
2602
  line-height: ${S(500)};
2571
2603
  font-weight: 400;
2572
2604
  color: ${w("neutral",800)};
2573
- `,Yw=i.css`
2605
+ `,eC=i.css`
2574
2606
  font-size: ${C(200)};
2575
2607
  line-height: ${S(400)};
2576
2608
  font-weight: 400;
2577
2609
  color: ${w("neutral",700)};
2578
- `,Qw=i.css`
2610
+ `,tC=i.css`
2579
2611
  button {
2580
2612
  height: 1.5625rem;
2581
2613
  font-size: ${C(200)};
@@ -2584,12 +2616,12 @@
2584
2616
  color: ${w("neutral",600)};
2585
2617
  padding: 0 0.625rem;
2586
2618
  }
2587
- `,eC=i.css`
2619
+ `,nC=i.css`
2588
2620
  width: 100%;
2589
2621
  display: flex;
2590
2622
  flex-direction: column;
2591
2623
  margin-bottom: ${k(400)};
2592
- `,tC=i.css`
2624
+ `,rC=i.css`
2593
2625
  height: ${k(500)};
2594
2626
  width: 100%;
2595
2627
  margin-bottom: ${k(200)};
@@ -2607,27 +2639,27 @@
2607
2639
  border-top-right-radius: 0.1875rem;
2608
2640
  border-bottom-right-radius: 0.1875rem;
2609
2641
  }
2610
- `,nC=i.css`
2642
+ `,oC=i.css`
2611
2643
  display: flex;
2612
2644
  justify-content: space-between;
2613
2645
  align-items: flex-start;
2614
- `,rC=i.css`
2646
+ `,iC=i.css`
2615
2647
  width: 100%;
2616
2648
  font-size: ${C(200)};
2617
2649
  line-height: ${S(400)};
2618
2650
  font-weight: 400;
2619
2651
  color: ${w("neutral",800)};
2620
2652
  text-align: center;
2621
- `,oC=i.css`
2653
+ `,sC=i.css`
2622
2654
  font-size: ${C(200)};
2623
2655
  line-height: ${S(400)};
2624
2656
  font-weight: 400;
2625
2657
  color: ${w("neutral",700)};
2626
2658
  text-align: center;
2627
- `,iC=e=>{const t=e.map(((t,n)=>`${n/(e.length-1)*100}%`));return`linear-gradient(to right, ${e.map(((e,n)=>`${e} ${t[n]}`)).join(", ")})`},sC=i.css`
2659
+ `,aC=e=>{const t=e.map(((t,n)=>`${n/(e.length-1)*100}%`));return`linear-gradient(to right, ${e.map(((e,n)=>`${e} ${t[n]}`)).join(", ")})`},lC=i.css`
2628
2660
  display: flex;
2629
2661
  flex-direction: column;
2630
- `,aC=i.css`
2662
+ `,cC=i.css`
2631
2663
  display: flex;
2632
2664
  gap: ${k(400)};
2633
2665
  align-items: center;
@@ -2635,46 +2667,46 @@
2635
2667
  .ds-select-input-container {
2636
2668
  margin-bottom: 0rem;
2637
2669
  }
2638
- `,lC=i.css`
2670
+ `,dC=i.css`
2639
2671
  font-size: ${C(500)};
2640
2672
  line-height: ${S(700)};
2641
2673
  font-weight: 400;
2642
2674
  color: ${w("neutral",700)};
2643
- `,cC=i.css`
2675
+ `,uC=i.css`
2644
2676
  font-size: ${C(500)};
2645
2677
  line-height: ${S(700)};
2646
2678
  font-weight: 400;
2647
2679
  color: ${w("neutral",700)};
2648
- `,dC=({pageSize:e,currentPage:t,totalItems:n,onPageSizeChange:o,showItemCountText:i,labels:s})=>{const a=Vf("ItemCount",s),l=0===n?0:(t-1)*e+1,c=0===n?0:Math.min(l+e-1,n);return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:sC,children:r.jsxs("div",{css:aC,children:[r.jsx("div",{style:{width:"5rem"},children:r.jsx(vv,{defaultValue:[`${e}`],items:[{label:"10",value:"10"},{label:"20",value:"20"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:e=>{o&&o(parseInt(e[0],10))},required:!0})}),r.jsx("p",{css:lC,children:a.perPageLabel})]})}),i?r.jsx("p",{css:cC,children:a.showingLabel(l,c,n)}):null]})},uC=e=>i.css`
2680
+ `,hC=({pageSize:e,currentPage:t,totalItems:n,onPageSizeChange:o,showItemCountText:i,labels:s})=>{const a=Vf("ItemCount",s),l=0===n?0:(t-1)*e+1,c=0===n?0:Math.min(l+e-1,n);return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:lC,children:r.jsxs("div",{css:cC,children:[r.jsx("div",{style:{width:"5rem"},children:r.jsx(vv,{defaultValue:[`${e}`],items:[{label:"10",value:"10"},{label:"20",value:"20"},{label:"50",value:"50"},{label:"100",value:"100"}],onChange:e=>{o&&o(parseInt(e[0],10))},required:!0})}),r.jsx("p",{css:dC,children:a.perPageLabel})]})}),i?r.jsx("p",{css:uC,children:a.showingLabel(l,c,n)}):null]})},pC=e=>i.css`
2649
2681
  border: ${j(100)} solid ${w("neutral",300)};
2650
2682
  ${e?"border: none;":""}
2651
- `,hC=e=>i.css`
2683
+ `,fC=e=>i.css`
2652
2684
  color: ${w("neutral",e?400:700)};
2653
2685
  line-height: ${S(500)};
2654
2686
  white-space: nowrap;
2655
2687
  overflow: hidden;
2656
2688
  text-overflow: ellipsis;
2657
- `,pC=i.css`
2689
+ `,mC=i.css`
2658
2690
  font-weight: 400;
2659
2691
  color: ${w("neutral",700)};
2660
2692
  white-space: nowrap;
2661
2693
  overflow: hidden;
2662
2694
  text-overflow: ellipsis;
2663
- `,fC=i.css`
2695
+ `,gC=i.css`
2664
2696
  color: ${w("neutral",700)};
2665
2697
  text-align: right;
2666
2698
  font-weight: 700;
2667
2699
  white-space: nowrap;
2668
2700
  overflow: hidden;
2669
2701
  text-overflow: ellipsis;
2670
- `,mC=e=>i.css`
2702
+ `,bC=e=>i.css`
2671
2703
  width: ${k(400)};
2672
2704
  height: ${k(400)};
2673
2705
 
2674
2706
  path {
2675
2707
  fill: ${w("neutral",e?400:700)};
2676
2708
  }
2677
- `,gC=i.css`
2709
+ `,vC=i.css`
2678
2710
  display: flex;
2679
2711
  align-items: center;
2680
2712
  justify-content: space-between;
@@ -2684,7 +2716,7 @@
2684
2716
  ${w("neutral",200)};
2685
2717
  width: 100%;
2686
2718
  text-align: left;
2687
- `,bC=i.css`
2719
+ `,yC=i.css`
2688
2720
  display: flex;
2689
2721
  align-items: center;
2690
2722
  justify-content: space-between;
@@ -2720,19 +2752,19 @@
2720
2752
  &:disabled {
2721
2753
  background-color: ${w("neutral",200)};
2722
2754
  }
2723
- `,vC=({id:t,label:n,caption:o,icon:i,value:s,variant:a="data",onItemClick:l,isExpanded:c=!1,ariaLabel:d,disabled:u=!1,isHighlighted:h=!1})=>{const p=("navigation"===a||"select"===a)&&!!l,f=p?e.chakra.button:e.chakra.div,m="string"==typeof n||"number"==typeof n||"bigint"==typeof n?String(n):"",g="string"==typeof s||"number"==typeof s||"bigint"==typeof s?String(s):"",b=d||("data"===a&&g?`${m}, ${g}`:m);return r.jsxs(f,{id:t,css:["data"===a?gC:bC,h&&{backgroundColor:w("neutral",200)}],onClick:p?l:void 0,tabIndex:p?0:void 0,onKeyDown:e=>{p&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l?.()))},role:p?"button":void 0,"aria-expanded":p?c:void 0,"aria-label":b,disabled:u,"data-selected":h||void 0,"data-highlighted":h||void 0,children:[r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[i,r.jsxs(e.Box,{flex:"1",minWidth:0,children:[r.jsx(e.Text,{fontWeight:"data"===a?"400":"700",css:hC(u),children:n}),o&&r.jsx(e.Text,{css:pC,children:o})]})]}),"data"===a&&s&&r.jsx(e.Text,{css:fC,children:s}),"navigation"===a&&r.jsx(e.Icon,{as:Zf,boxSize:4,"aria-hidden":"true",css:mC(u)})]})},yC=({items:t,noBorder:n,highlightedIndex:o})=>r.jsx(e.Box,{css:uC(n),children:t.map(((e,t)=>r.jsx(vC,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick,isHighlighted:t===o||e.isHighlighted},e.id??e.label)))}),xC=i.css`
2755
+ `,xC=({id:t,label:n,caption:o,icon:i,value:s,variant:a="data",onItemClick:l,isExpanded:c=!1,ariaLabel:d,disabled:u=!1,isHighlighted:h=!1})=>{const p=("navigation"===a||"select"===a)&&!!l,f=p?e.chakra.button:e.chakra.div,m="string"==typeof n||"number"==typeof n||"bigint"==typeof n?String(n):"",g="string"==typeof s||"number"==typeof s||"bigint"==typeof s?String(s):"",b=d||("data"===a&&g?`${m}, ${g}`:m);return r.jsxs(f,{id:t,css:["data"===a?vC:yC,h&&{backgroundColor:w("neutral",200)}],onClick:p?l:void 0,tabIndex:p?0:void 0,onKeyDown:e=>{p&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l?.()))},role:p?"button":void 0,"aria-expanded":p?c:void 0,"aria-label":b,disabled:u,"data-selected":h||void 0,"data-highlighted":h||void 0,children:[r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",children:[i,r.jsxs(e.Box,{flex:"1",minWidth:0,children:[r.jsx(e.Text,{fontWeight:"data"===a?"400":"700",css:fC(u),children:n}),o&&r.jsx(e.Text,{css:mC,children:o})]})]}),"data"===a&&s&&r.jsx(e.Text,{css:gC,children:s}),"navigation"===a&&r.jsx(e.Icon,{as:Zf,boxSize:4,"aria-hidden":"true",css:bC(u)})]})},wC=({items:t,noBorder:n,highlightedIndex:o})=>r.jsx(e.Box,{css:pC(n),children:t.map(((e,t)=>r.jsx(xC,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick,isHighlighted:t===o||e.isHighlighted},e.id??e.label)))}),CC=i.css`
2724
2756
  background: transparent;
2725
2757
  svg {
2726
2758
  path {
2727
2759
  fill: ${w("primary",500)};
2728
2760
  }
2729
2761
  }
2730
- `,wC=i.css`
2762
+ `,kC=i.css`
2731
2763
  font-size: ${C(400)};
2732
2764
  line-height: ${S(600)};
2733
2765
  font-weight: 700;
2734
2766
  color: ${w("neutral",900)};
2735
- `,CC=i.css`
2767
+ `,SC=i.css`
2736
2768
  span {
2737
2769
  height: ${k(500)};
2738
2770
  width: ${k(500)};
@@ -2742,7 +2774,7 @@
2742
2774
  background-color: transparent;
2743
2775
  }
2744
2776
  }
2745
- `,kC=i.css`
2777
+ `,$C=i.css`
2746
2778
  font-size: ${C(400)};
2747
2779
  line-height: ${S(600)};
2748
2780
  font-weight: 400;
@@ -2752,7 +2784,7 @@
2752
2784
  color: ${w("neutral",900)};
2753
2785
  font-weight: 700;
2754
2786
  }
2755
- `,SC=({totalItems:t,pageSize:n,currentPage:o,variant:i="default",onPageChange:s,labels:a})=>{const l=Vf("Pagination",a),c="compact"===i||"compact-with-buttons"===i,d="compact-with-buttons"===i;return r.jsx("div",{"aria-label":l.paginationLabel,children:r.jsx(e.Pagination.Root,{count:t,pageSize:n,defaultPage:o,onPageChange:e=>s&&s(e.page),siblingCount:1,children:r.jsxs(e.ButtonGroup,{gap:"2",size:"sm",variant:"ghost",css:CC,children:[r.jsx(e.Pagination.PrevTrigger,{asChild:!0,children:d?r.jsx(Bf,{variant:"secondary",label:l.previousLabel,size:"small",leftIcon:r.jsx(Gf,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(_f,{css:xC,style:{rotate:"90deg"},icon:r.jsx(Gf,{}),"aria-label":l.previousPageLabel})}),c?r.jsx(e.Pagination.PageText,{css:wC}):r.jsx(e.Pagination.Items,{render:e=>r.jsx(_f,{css:kC,"aria-label":l.pageLabel(e.value),icon:r.jsx("p",{children:e.value})})}),r.jsx(e.Pagination.NextTrigger,{asChild:!0,children:d?r.jsx(Bf,{variant:"secondary",label:l.nextLabel,size:"small",rightIcon:r.jsx(Gf,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(_f,{css:xC,style:{rotate:"270deg"},icon:r.jsx(Gf,{}),"aria-label":l.nextPageLabel})})]})})})},$C=(e,t)=>i.css`
2787
+ `,jC=({totalItems:t,pageSize:n,currentPage:o,variant:i="default",onPageChange:s,labels:a})=>{const l=Vf("Pagination",a),c="compact"===i||"compact-with-buttons"===i,d="compact-with-buttons"===i;return r.jsx("div",{"aria-label":l.paginationLabel,children:r.jsx(e.Pagination.Root,{count:t,pageSize:n,defaultPage:o,onPageChange:e=>s&&s(e.page),siblingCount:1,children:r.jsxs(e.ButtonGroup,{gap:"2",size:"sm",variant:"ghost",css:SC,children:[r.jsx(e.Pagination.PrevTrigger,{asChild:!0,children:d?r.jsx(Bf,{variant:"secondary",label:l.previousLabel,size:"small",leftIcon:r.jsx(Gf,{style:{rotate:"90deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(_f,{css:CC,style:{rotate:"90deg"},icon:r.jsx(Gf,{}),"aria-label":l.previousPageLabel})}),c?r.jsx(e.Pagination.PageText,{css:kC}):r.jsx(e.Pagination.Items,{render:e=>r.jsx(_f,{css:$C,"aria-label":l.pageLabel(e.value),icon:r.jsx("p",{children:e.value})})}),r.jsx(e.Pagination.NextTrigger,{asChild:!0,children:d?r.jsx(Bf,{variant:"secondary",label:l.nextLabel,size:"small",rightIcon:r.jsx(Gf,{style:{rotate:"270deg"},color:"var(--chakra-colors-primary-500)"})}):r.jsx(_f,{css:CC,style:{rotate:"270deg"},icon:r.jsx(Gf,{}),"aria-label":l.nextPageLabel})})]})})})},MC=(e,t)=>i.css`
2756
2788
  border: ${"full-width"===e?"none":`${j(100)} solid ${w("neutral",300)}`};
2757
2789
  border-radius: ${$(200)};
2758
2790
  box-shadow: ${"full-width"===e?"none":`0 0 0 0.0625rem ${w("neutral",300)}`};
@@ -2810,7 +2842,7 @@
2810
2842
  [data-sticky-last='true'] {
2811
2843
  border-inline-end: 0.0625rem solid ${w("neutral",400)};
2812
2844
  }
2813
- `,jC=e=>i.css`
2845
+ `,EC=e=>i.css`
2814
2846
  tr {
2815
2847
  background-color: ${w("neutral","full-width"===e?100:200)};
2816
2848
 
@@ -2819,14 +2851,14 @@
2819
2851
  box-shadow: inset 0 -0.0625rem 0 ${w("neutral",300)};
2820
2852
  }
2821
2853
  }
2822
- `,MC=i.css`
2854
+ `,TC=i.css`
2823
2855
  font-size: ${C(400)};
2824
2856
  line-height: ${S(600)};
2825
2857
  font-weight: 700;
2826
2858
  color: ${w("neutral",800)};
2827
2859
  display: flex;
2828
2860
  align-items: center;
2829
- `,EC=i.css`
2861
+ `,OC=i.css`
2830
2862
  height: ${S(600)};
2831
2863
  width: 0.625rem;
2832
2864
  display: flex;
@@ -2848,20 +2880,20 @@
2848
2880
  }
2849
2881
  }
2850
2882
  }
2851
- `,TC=e=>i.css`
2883
+ `,LC=e=>i.css`
2852
2884
  svg {
2853
2885
  path {
2854
2886
  fill: ${w("accessible",e?"controls-on-neutral-lights":100)} !important;
2855
2887
  }
2856
2888
  }
2857
- `,OC=i.css`
2889
+ `,AC=i.css`
2858
2890
  margin-top: ${k(300)};
2859
2891
  display: flex;
2860
2892
  justify-content: space-between;
2861
2893
  align-items: center;
2862
- `,LC=i.css`
2894
+ `,RC=i.css`
2863
2895
  margin-top: 0.5625rem;
2864
- `,AC=e=>i.css`
2896
+ `,NC=e=>i.css`
2865
2897
  tr {
2866
2898
  height: ${k(1200)};
2867
2899
 
@@ -2888,18 +2920,18 @@
2888
2920
  }
2889
2921
  }
2890
2922
  }
2891
- `,RC=e=>i.css`
2923
+ `,DC=e=>i.css`
2892
2924
  overflow: auto;
2893
2925
  height: ${e};
2894
2926
  width: 100%;
2895
- `,NC=i.css`
2927
+ `,IC=i.css`
2896
2928
  height: 30rem;
2897
2929
  display: flex;
2898
2930
  align-items: center;
2899
2931
  justify-content: center;
2900
- `,DC="__checkbox__",IC=(e,t)=>{const n=e[t]?.width;return n?{width:n,minWidth:n}:{}},PC=(e,t,n)=>{const r=e[t];return void 0===r?{}:{"data-sticky":"start","data-sticky-last":t===n?"true":void 0,left:`${r}px`}},zC=(e,t,n)=>{if(n||!t.key)return e;const{key:r,order:o}=t,i="asc"===o;return[...e].sort(((e,t)=>((e,t,n)=>{if(null==e&&null==t)return 0;if(null==e)return 1;if(null==t)return-1;if("string"==typeof e&&"string"==typeof t)return n?e.localeCompare(t):t.localeCompare(e);if("number"==typeof e&&"number"==typeof t)return n?e-t:t-e;const r=String(e),o=String(t);return n?r.localeCompare(o):o.localeCompare(r)})(e?.[r],t?.[r],i)))},VC=e.Table.Row,BC=e.Table.Cell,HC=i.css`
2932
+ `,PC="__checkbox__",zC=(e,t)=>{const n=e[t]?.width;return n?{width:n,minWidth:n}:{}},VC=(e,t,n)=>{const r=e[t];return void 0===r?{}:{"data-sticky":"start","data-sticky-last":t===n?"true":void 0,left:`${r}px`}},BC=(e,t,n)=>{if(n||!t.key)return e;const{key:r,order:o}=t,i="asc"===o;return[...e].sort(((e,t)=>((e,t,n)=>{if(null==e&&null==t)return 0;if(null==e)return 1;if(null==t)return-1;if("string"==typeof e&&"string"==typeof t)return n?e.localeCompare(t):t.localeCompare(e);if("number"==typeof e&&"number"==typeof t)return n?e-t:t-e;const r=String(e),o=String(t);return n?r.localeCompare(o):o.localeCompare(r)})(e?.[r],t?.[r],i)))},HC=e.Table.Row,_C=e.Table.Cell,FC=i.css`
2901
2933
  border: ${j(100)} solid ${w("neutral",300)};
2902
- `,_C=i.css`
2934
+ `,qC=i.css`
2903
2935
  padding: ${k(400)};
2904
2936
  cursor: pointer;
2905
2937
  &:focus-visible {
@@ -2914,9 +2946,9 @@
2914
2946
  transparent
2915
2947
  );
2916
2948
  }
2917
- `,FC=i.css`
2949
+ `,WC=i.css`
2918
2950
  border: ${j(100)} solid ${w("neutral",300)};
2919
- `,qC=i.css`
2951
+ `,UC=i.css`
2920
2952
  padding: ${k(400)};
2921
2953
  cursor: pointer;
2922
2954
  border-bottom: ${j(100)} solid
@@ -2938,7 +2970,7 @@
2938
2970
  transparent
2939
2971
  );
2940
2972
  }
2941
- `,WC=i.css`
2973
+ `,KC=i.css`
2942
2974
  .item-content-open > * {
2943
2975
  max-height: auto;
2944
2976
 
@@ -2959,10 +2991,10 @@
2959
2991
  padding-bottom 0.2s ease,
2960
2992
  padding-top 0.2s ease;
2961
2993
  }
2962
- `,UC=i.css`
2994
+ `,GC=i.css`
2963
2995
  border-top: ${j(100)} solid
2964
2996
  ${w("neutral",300)};
2965
- `;var KC,GC={exports:{}},ZC={},JC={exports:{}},XC={exports:{}},YC={};var QC,ek,tk,nk,rk,ok,ik,sk,ak,lk,ck,dk,uk,hk={};
2997
+ `;var ZC,JC={exports:{}},XC={},YC={exports:{}},QC={exports:{}},ek={};var tk,nk,rk,ok,ik,sk,ak,lk,ck,dk,uk,hk,pk,fk={};
2966
2998
  /** @license React v16.13.1
2967
2999
  * react-is.development.js
2968
3000
  *
@@ -2970,7 +3002,7 @@
2970
3002
  *
2971
3003
  * This source code is licensed under the MIT license found in the
2972
3004
  * LICENSE file in the root directory of this source tree.
2973
- */function pk(){return ek||(ek=1,"production"===process.env.NODE_ENV?XC.exports=function(){if(KC)return YC;KC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return YC.AsyncMode=l,YC.ConcurrentMode=c,YC.ContextConsumer=a,YC.ContextProvider=s,YC.Element=t,YC.ForwardRef=d,YC.Fragment=r,YC.Lazy=f,YC.Memo=p,YC.Portal=n,YC.Profiler=i,YC.StrictMode=o,YC.Suspense=u,YC.isAsyncMode=function(e){return x(e)||y(e)===l},YC.isConcurrentMode=x,YC.isContextConsumer=function(e){return y(e)===a},YC.isContextProvider=function(e){return y(e)===s},YC.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},YC.isForwardRef=function(e){return y(e)===d},YC.isFragment=function(e){return y(e)===r},YC.isLazy=function(e){return y(e)===f},YC.isMemo=function(e){return y(e)===p},YC.isPortal=function(e){return y(e)===n},YC.isProfiler=function(e){return y(e)===i},YC.isStrictMode=function(e){return y(e)===o},YC.isSuspense=function(e){return y(e)===u},YC.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},YC.typeOf=y,YC}():XC.exports=(QC||(QC=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}hk.AsyncMode=x,hk.ConcurrentMode=w,hk.ContextConsumer=C,hk.ContextProvider=k,hk.Element=S,hk.ForwardRef=$,hk.Fragment=j,hk.Lazy=M,hk.Memo=E,hk.Portal=T,hk.Profiler=O,hk.StrictMode=L,hk.Suspense=A,hk.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},hk.isConcurrentMode=N,hk.isContextConsumer=function(e){return y(e)===a},hk.isContextProvider=function(e){return y(e)===s},hk.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},hk.isForwardRef=function(e){return y(e)===d},hk.isFragment=function(e){return y(e)===r},hk.isLazy=function(e){return y(e)===f},hk.isMemo=function(e){return y(e)===p},hk.isPortal=function(e){return y(e)===n},hk.isProfiler=function(e){return y(e)===i},hk.isStrictMode=function(e){return y(e)===o},hk.isSuspense=function(e){return y(e)===u},hk.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},hk.typeOf=y}()),hk)),XC.exports}function fk(){if(nk)return tk;nk=1;return tk="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function mk(){return ok?rk:(ok=1,rk=Function.call.bind(Object.prototype.hasOwnProperty))}function gk(){if(lk)return ak;lk=1;var e=pk(),t=s,n=fk(),r=mk(),o=function(){if(sk)return ik;sk=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=fk(),n={},r=mk();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},ik=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ak=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+v(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+v(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return b(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=v(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=v(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=v(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return v(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},ak}function bk(){if(uk)return JC.exports;if(uk=1,"production"!==process.env.NODE_ENV){var e=pk();JC.exports=gk()(e.isElement,!0)}else JC.exports=function(){if(dk)return ck;dk=1;var e=fk();function t(){}function n(){}return n.resetWarningCache=t,ck=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ck}()();return JC.exports}var vk,yk={exports:{}};var xk,wk={},Ck={};function kk(){if(xk)return Ck;return xk=1,Object.defineProperty(Ck,"__esModule",{value:!0}),Ck.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},Ck.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Ck.int=function(e){return parseInt(e,10)},Ck.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Ck.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Ck}var Sk,$k,jk={};function Mk(){if($k)return wk;$k=1,Object.defineProperty(wk,"__esModule",{value:!0}),wk.addClassName=s,wk.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},wk.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},wk.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},wk.createSVGTransform=function(e,t){return o(e,t,"")},wk.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},wk.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},wk.getTranslation=o,wk.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},wk.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},wk.matchesSelector=r,wk.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},wk.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},wk.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},wk.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},wk.removeClassName=a,wk.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},wk.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=kk(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(Sk)return jk;Sk=1,Object.defineProperty(jk,"__esModule",{value:!0}),jk.browserPrefixToKey=n,jk.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},jk.default=void 0,jk.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return jk.default=t(),jk}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return wk}var Ek,Tk={};function Ok(){if(Ek)return Tk;Ek=1,Object.defineProperty(Tk,"__esModule",{value:!0}),Tk.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Tk.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Tk.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Tk.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Tk.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},Tk.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},Tk.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=kk(),t=Mk();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Tk}var Lk,Ak,Rk,Nk,Dk={},Ik={};function Pk(){if(Lk)return Ik;return Lk=1,Object.defineProperty(Ik,"__esModule",{value:!0}),Ik.default=function(){},Ik}function zk(){if(Ak)return Dk;Ak=1,Object.defineProperty(Dk,"__esModule",{value:!0}),Dk.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(bk()),r=c(o),i=Mk(),s=Ok(),a=kk(),l=c(Pk());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Dk.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Dk}function Vk(){return Rk||(Rk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(bk()),i=h(o),s=function(){if(vk)return yk.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return vk=1,yk.exports=t,yk.exports.clsx=t,yk.exports}(),a=Mk(),l=Ok(),c=kk(),d=h(zk()),u=h(Pk());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let b={},v=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(w,f):b=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...b},transform:v}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(ZC)),ZC}var Bk=function(){if(Nk)return GC.exports;Nk=1;const{default:e,DraggableCore:t}=Vk();return GC.exports=e,GC.exports.default=e,GC.exports.DraggableCore=t,GC.exports}(),Hk=lp(Bk);const _k=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
3005
+ */function mk(){return nk||(nk=1,"production"===process.env.NODE_ENV?QC.exports=function(){if(ZC)return ek;ZC=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case l:case c:case r:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case d:case f:case p:case s:return e;default:return h}}case n:return h}}}function x(e){return y(e)===c}return ek.AsyncMode=l,ek.ConcurrentMode=c,ek.ContextConsumer=a,ek.ContextProvider=s,ek.Element=t,ek.ForwardRef=d,ek.Fragment=r,ek.Lazy=f,ek.Memo=p,ek.Portal=n,ek.Profiler=i,ek.StrictMode=o,ek.Suspense=u,ek.isAsyncMode=function(e){return x(e)||y(e)===l},ek.isConcurrentMode=x,ek.isContextConsumer=function(e){return y(e)===a},ek.isContextProvider=function(e){return y(e)===s},ek.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ek.isForwardRef=function(e){return y(e)===d},ek.isFragment=function(e){return y(e)===r},ek.isLazy=function(e){return y(e)===f},ek.isMemo=function(e){return y(e)===p},ek.isPortal=function(e){return y(e)===n},ek.isProfiler=function(e){return y(e)===i},ek.isStrictMode=function(e){return y(e)===o},ek.isSuspense=function(e){return y(e)===u},ek.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},ek.typeOf=y,ek}():QC.exports=(tk||(tk=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case u:return m;default:var g=m&&m.$$typeof;switch(g){case a:case d:case f:case p:case s:return g;default:return h}}case n:return h}}}var x=l,w=c,C=a,k=s,S=t,$=d,j=r,M=f,E=p,T=n,O=i,L=o,A=u,R=!1;function N(e){return y(e)===c}fk.AsyncMode=x,fk.ConcurrentMode=w,fk.ContextConsumer=C,fk.ContextProvider=k,fk.Element=S,fk.ForwardRef=$,fk.Fragment=j,fk.Lazy=M,fk.Memo=E,fk.Portal=T,fk.Profiler=O,fk.StrictMode=L,fk.Suspense=A,fk.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||y(e)===l},fk.isConcurrentMode=N,fk.isContextConsumer=function(e){return y(e)===a},fk.isContextProvider=function(e){return y(e)===s},fk.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},fk.isForwardRef=function(e){return y(e)===d},fk.isFragment=function(e){return y(e)===r},fk.isLazy=function(e){return y(e)===f},fk.isMemo=function(e){return y(e)===p},fk.isPortal=function(e){return y(e)===n},fk.isProfiler=function(e){return y(e)===i},fk.isStrictMode=function(e){return y(e)===o},fk.isSuspense=function(e){return y(e)===u},fk.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===u||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===p||e.$$typeof===s||e.$$typeof===a||e.$$typeof===d||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===m)},fk.typeOf=y}()),fk)),QC.exports}function gk(){if(ok)return rk;ok=1;return rk="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function bk(){return sk?ik:(sk=1,ik=Function.call.bind(Object.prototype.hasOwnProperty))}function vk(){if(dk)return ck;dk=1;var e=mk(),t=s,n=gk(),r=bk(),o=function(){if(lk)return ak;lk=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=gk(),n={},r=bk();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,s,a,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var d;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+s+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}d=o[c](i,c,a,s,null,t)}catch(e){d=e}if(!d||d instanceof Error||e((a||"React class")+": type specification of "+s+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(null!=h?h:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},ak=o}(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ck=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var d="<<anonymous>>",u={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:f(a),arrayOf:function(e){return f((function(t,r,o,i,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[r];if(!Array.isArray(a))return new p("Invalid "+i+" `"+s+"` of type `"+v(a)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<a.length;l++){var c=e(a,l,o,i,s+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:f((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+v(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:f((function(t,n,r,o,i){var s=t[n];return e.isValidElementType(s)?null:new p("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,n,r,o,i){if(!(t[n]instanceof e)){var s=e.name||d;return new p("Invalid "+o+" `"+i+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:d)+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:f((function(e,t,n,r,o){return b(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,s,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=v(l);if("object"!==c)return new p("Invalid "+s+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var d in l)if(r(l,d)){var u=e(l,d,i,s,a+"."+d,n);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,n,r,o,i){for(var s=t[n],a=0;a<e.length;a++)if(h(s,e[a]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(o)+" at index "+t+"."),a}return f((function(t,o,i,s,a){for(var l=[],c=0;c<e.length;c++){var d=(0,e[c])(t,o,i,s,a,n);if(null==d)return null;d.data&&r(d.data,"expectedType")&&l.push(d.data.expectedType)}return new p("Invalid "+s+" `"+a+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,r,o,i,s){var a=t[r],l=v(a);if("object"!==l)return new p("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var d=e[c];if("function"!=typeof d)return g(o,i,s,c,y(d));var u=d(a,c,o,i,s+"."+c,n);if(u)return u}return null}))},exact:function(e){return f((function(o,i,s,a,l){var c=o[i],d=v(c);if("object"!==d)return new p("Invalid "+a+" `"+l+"` of type `"+d+"` supplied to `"+s+"`, expected `object`.");var u=t({},o[i],e);for(var h in u){var f=e[h];if(r(e,h)&&"function"!=typeof f)return g(s,a,l,h,y(f));if(!f)return new p("Invalid "+a+" `"+l+"` key `"+h+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,h,s,a,l+"."+h,n);if(m)return m}return null}))}};function h(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,s,a,c,u,h,f){if(c=c||d,h=h||a,f!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+a;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+h+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==s[a]?o?null===s[a]?new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+u+" `"+h+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,h)}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}function m(e){return f((function(t,n,r,o,i,s){var a=t[n];return v(a)!==e?new p("Invalid "+o+" `"+i+"` of type `"+y(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!b(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!b(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},ck}function yk(){if(pk)return YC.exports;if(pk=1,"production"!==process.env.NODE_ENV){var e=mk();YC.exports=vk()(e.isElement,!0)}else YC.exports=function(){if(hk)return uk;hk=1;var e=gk();function t(){}function n(){}return n.resetWarningCache=t,uk=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},uk}()();return YC.exports}var xk,wk={exports:{}};var Ck,kk={},Sk={};function $k(){if(Ck)return Sk;return Ck=1,Object.defineProperty(Sk,"__esModule",{value:!0}),Sk.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},Sk.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Sk.int=function(e){return parseInt(e,10)},Sk.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Sk.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Sk}var jk,Mk,Ek={};function Tk(){if(Mk)return kk;Mk=1,Object.defineProperty(kk,"__esModule",{value:!0}),kk.addClassName=s,kk.addEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},kk.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&s(e.body,"react-draggable-transparent-selection")},kk.createCSSTransform=function(e,n){const r=o(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:r}},kk.createSVGTransform=function(e,t){return o(e,t,"")},kk.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,(e=>n===e.identifier))||t.changedTouches&&(0,e.findInArray)(t.changedTouches,(e=>n===e.identifier))},kk.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},kk.getTranslation=o,kk.innerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingTop),n-=(0,e.int)(r.paddingBottom),n},kk.innerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(r.paddingLeft),n-=(0,e.int)(r.paddingRight),n},kk.matchesSelector=r,kk.matchesSelectorAndParentsTo=function(e,t,n){let o=e;do{if(r(o,t))return!0;if(o===n)return!1;o=o.parentNode}while(o);return!1},kk.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},kk.outerHeight=function(t){let n=t.clientHeight;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderTopWidth),n+=(0,e.int)(r.borderBottomWidth),n},kk.outerWidth=function(t){let n=t.clientWidth;const r=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(r.borderLeftWidth),n+=(0,e.int)(r.borderRightWidth),n},kk.removeClassName=a,kk.removeEvent=function(e,t,n,r){if(!e)return;const o={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},kk.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame((()=>{i(e)})):i(e)};var e=$k(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(function(){if(jk)return Ek;jk=1,Object.defineProperty(Ek,"__esModule",{value:!0}),Ek.browserPrefixToKey=n,Ek.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Ek.default=void 0,Ek.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=window.document?.documentElement?.style;if(!r)return"";if(t in r)return"";for(let o=0;o<e.length;o++)if(n(t,e[o])in r)return e[o];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}return Ek.default=t(),Ek}());let n="";function r(t,r){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(n){return(0,e.isFunction)(t[n])}))),!!(0,e.isFunction)(t[n])&&t[n](r)}function o(e,t,n){let{x:r,y:o}=e,i=`translate(${r}${n},${o}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function i(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function s(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return kk}var Ok,Lk={};function Ak(){if(Ok)return Lk;Ok=1,Object.defineProperty(Lk,"__esModule",{value:!0}),Lk.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Lk.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Lk.createCoreData=function(t,r,o){const i=!(0,e.isNum)(t.lastX),s=n(t);return i?{node:s,deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}:{node:s,deltaX:r-t.lastX,deltaY:o-t.lastY,lastX:t.lastX,lastY:t.lastY,x:r,y:o}},Lk.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Lk.getBoundPosition=function(r,o,i){if(!r.props.bounds)return[o,i];let{bounds:s}=r.props;s="string"==typeof s?s:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(s);const a=n(r);if("string"==typeof s){const{ownerDocument:n}=a,r=n.defaultView;let o;if("parent"===s)o=a.parentNode;else{o=a.getRootNode().querySelector(s)}if(!(o instanceof r.HTMLElement))throw new Error('Bounds selector "'+s+'" could not find an element.');const i=o,l=r.getComputedStyle(a),c=r.getComputedStyle(i);s={left:-a.offsetLeft+(0,e.int)(c.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(c.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(i)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(c.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(i)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(c.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(s.right)&&(o=Math.min(o,s.right));(0,e.isNum)(s.bottom)&&(i=Math.min(i,s.bottom));(0,e.isNum)(s.left)&&(o=Math.max(o,s.left));(0,e.isNum)(s.top)&&(i=Math.max(i,s.top));return[o,i]},Lk.getControlPosition=function(e,r,o){const i="number"==typeof r?(0,t.getTouch)(e,r):null;if("number"==typeof r&&!i)return null;const s=n(o),a=o.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,t.offsetXYFromParent)(i||e,a,o.props.scale)},Lk.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]};var e=$k(),t=Tk();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Lk}var Rk,Nk,Dk,Ik,Pk={},zk={};function Vk(){if(Rk)return zk;return Rk=1,Object.defineProperty(zk,"__esModule",{value:!0}),zk.default=function(){},zk}function Bk(){if(Nk)return Pk;Nk=1,Object.defineProperty(Pk,"__esModule",{value:!0}),Pk.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),t=c(yk()),r=c(o),i=Tk(),s=Ak(),a=$k(),l=c(Vk());function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let p=h,f=class extends e.Component{constructor(){super(...arguments),d(this,"dragging",!1),d(this,"lastX",NaN),d(this,"lastY",NaN),d(this,"touchIdentifier",null),d(this,"mounted",!1),d(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;const o=(0,s.getControlPosition)(e,r,this);if(null==o)return;const{x:a,y:c}=o,d=(0,s.createCoreData)(this,a,c);(0,l.default)("DraggableCore: handleDragStart: %j",d),(0,l.default)("calling",this.props.onStart);!1!==this.props.onStart(e,d)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=c,(0,i.addEvent)(n,p.move,this.handleDrag),(0,i.addEvent)(n,p.stop,this.handleDragStop))})),d(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);(0,l.default)("DraggableCore: handleDrag: %j",o);if(!1!==this.props.onDrag(e,o)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),d(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const o=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(a.ownerDocument),(0,l.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,l.default)("DraggableCore: Removing handlers"),(0,i.removeEvent)(a.ownerDocument,p.move,this.handleDrag),(0,i.removeEvent)(a.ownerDocument,p.stop,this.handleDragStop))})),d(this,"onMouseDown",(e=>(p=h,this.handleDragStart(e)))),d(this,"onMouseUp",(e=>(p=h,this.handleDragStop(e)))),d(this,"onTouchStart",(e=>(p=u,this.handleDragStart(e)))),d(this,"onTouchEnd",(e=>(p=u,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,i.addEvent)(e,u.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,i.removeEvent)(t,h.move,this.handleDrag),(0,i.removeEvent)(t,u.move,this.handleDrag),(0,i.removeEvent)(t,h.stop,this.handleDragStop),(0,i.removeEvent)(t,u.stop,this.handleDragStop),(0,i.removeEvent)(e,u.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Pk.default=f,d(f,"displayName","DraggableCore"),d(f,"propTypes",{allowAnyClick:t.default.bool,allowMobileScroll:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),d(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Pk}function Hk(){return Dk||(Dk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return d.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(s,t,i):s[t]=e[t]);return s}(e,t)}(n),r=h(yk()),i=h(o),s=function(){if(xk)return wk.exports;function e(t){var n,r,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=e(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function t(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=e(t))&&(o&&(o+=" "),o+=n);return o}return xk=1,wk.exports=t,wk.exports.clsx=t,wk.exports}(),a=Tk(),l=Ak(),c=$k(),d=h(Bk()),u=h(Vk());function h(e){return e&&e.__esModule?e:{default:e}}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",((e,t)=>{(0,u.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),f(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,u.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[o,i]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=o,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),f(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,u.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??i.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:o,defaultClassName:i,defaultClassNameDragging:c,defaultClassNameDragged:u,position:h,positionOffset:f,scale:m,...g}=this.props;let b={},v=null;const y=!Boolean(h)||this.state.dragging,x=h||o,w={x:(0,l.canDragX)(this)&&y?this.state.x:x.x,y:(0,l.canDragY)(this)&&y?this.state.y:x.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(w,f):b=(0,a.createCSSTransform)(w,f);const C=(0,s.clsx)(r.props.className||"",i,{[c]:this.state.dragging,[u]:this.state.dragged});return t.createElement(d.default,p({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:C,style:{...r.props.style,...b},transform:v}))}}e.default=m,f(m,"displayName","Draggable"),f(m,"propTypes",{...d.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:c.dontSetMe,style:c.dontSetMe,transform:c.dontSetMe}),f(m,"defaultProps",{...d.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(XC)),XC}var _k=function(){if(Ik)return JC.exports;Ik=1;const{default:e,DraggableCore:t}=Hk();return JC.exports=e,JC.exports.default=e,JC.exports.DraggableCore=t,JC.exports}(),Fk=lp(_k);const qk=(e="medium",t,n,r)=>{const o=t?u(t):{xsmall:"15rem",small:"20rem",medium:"30rem",large:"40rem",xlarge:"60rem","full-width":"90%"}[e]||"15rem",s=r?u(r):{xsmall:"35rem",small:"45rem",medium:"45rem",large:"45rem",xlarge:"45rem","full-width":"unset"}[e]||"35rem",a="unset"===s?"80vh":`min(${s}, 80vh)`;let l="auto";return n?l=u(n):"full-width"===e&&(l="90%"),i.css`
2974
3006
  max-width: 100%;
2975
3007
  width: ${o};
2976
3008
  height: ${l};
@@ -2980,7 +3012,7 @@
2980
3012
  border-radius: ${$(300)};
2981
3013
  box-shadow: 0 0.25rem 0.375rem -0.25rem #0000001a;
2982
3014
  box-shadow: 0 0.625rem 0.9375rem -0.1875rem #0000001a;
2983
- `},Fk=i.css`
3015
+ `},Wk=i.css`
2984
3016
  height: 100%;
2985
3017
  min-height: ${k(1e3)};
2986
3018
  display: flex;
@@ -2989,11 +3021,11 @@
2989
3021
  padding: ${k(200)};
2990
3022
  border-bottom: ${j(100)} solid
2991
3023
  ${w("neutral",300)};
2992
- `,qk=i.css`
3024
+ `,Uk=i.css`
2993
3025
  top: ${k(300)};
2994
- `,Wk=i.css`
3026
+ `,Kk=i.css`
2995
3027
  padding: 0;
2996
- `,Uk=e=>i.css`
3028
+ `,Gk=e=>i.css`
2997
3029
  display: flex;
2998
3030
  flex-direction: column;
2999
3031
  height: 100%;
@@ -3001,19 +3033,19 @@
3001
3033
  background-color: ${w("neutral",100)};
3002
3034
  box-shadow: 0 0.0625rem 0.125rem -0.0625rem #0000001a;
3003
3035
  box-shadow: 0 0.0625rem 0.1875rem 0 #0000001a;
3004
- `,Kk=i.css`
3036
+ `,Zk=i.css`
3005
3037
  border-right: ${j(100)} solid
3006
3038
  ${w("neutral",300)};
3007
- `,Gk=i.css`
3039
+ `,Jk=i.css`
3008
3040
  border: ${j(100)} solid ${w("neutral",300)};
3009
3041
  border-radius: ${$(300)};
3010
- `,Zk=i.css`
3042
+ `,Xk=i.css`
3011
3043
  flex-shrink: 0;
3012
3044
  min-height: ${k(1200)};
3013
3045
  width: 100%;
3014
3046
  border-bottom: ${j(100)} solid
3015
3047
  ${w("neutral",300)};
3016
- `,Jk=i.css`
3048
+ `,Yk=i.css`
3017
3049
  flex: 1;
3018
3050
  min-height: 0;
3019
3051
  width: 100%;
@@ -3022,7 +3054,7 @@
3022
3054
  &:focus-visible {
3023
3055
  outline-color: ${w("primary",700)};
3024
3056
  }
3025
- `,Xk=i.css`
3057
+ `,Qk=i.css`
3026
3058
  flex-shrink: 0;
3027
3059
  min-height: ${k(1600)};
3028
3060
  width: 100%;
@@ -3031,7 +3063,7 @@
3031
3063
  justify-content: flex-start;
3032
3064
  border-top: ${j(100)} solid
3033
3065
  ${w("neutral",300)};
3034
- `;var Yk,Qk;!function(){if(Qk)return Yk;Qk=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}Yk=e}();var eS=tS()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function tS(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var nS=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return eS((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(nS.displayName="Portal");
3066
+ `;var eS,tS;!function(){if(tS)return eS;tS=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return t[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};e=function(e,n,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var i=2;i<o;i++)r[i-2]=arguments[i];if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||t.apply(null,[n].concat(r))}}eS=e}();var nS=rS()?n.useLayoutEffect:n.useEffect;"production"!==process.env.NODE_ENV&&("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;function rS(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var oS=function(e){var t,r=e.children,i=e.type,s=void 0===i?"reach-portal":i,a=n.useRef(null),l=n.useRef(null),c=(t=n.useState(Object.create(null))[1],n.useCallback((function(){t(Object.create(null))}),[]));return nS((function(){if(a.current){var e=a.current.ownerDocument;return l.current=null==e?void 0:e.createElement(s),e.body.appendChild(l.current),c(),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s,c]),l.current?o.createPortal(r,l.current):n.createElement("span",{ref:a})};"production"!==process.env.NODE_ENV&&(oS.displayName="Portal");
3035
3067
  /*! *****************************************************************************
3036
3068
  Copyright (c) Microsoft Corporation.
3037
3069
 
@@ -3045,16 +3077,16 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
3045
3077
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
3046
3078
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
3047
3079
  PERFORMANCE OF THIS SOFTWARE.
3048
- ***************************************************************************** */var rS,oS,iS=function(){return iS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},iS.apply(this,arguments)};function sS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function aS(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function lS(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function cS(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(rS||(rS={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(oS||(oS={}));var dS=rS.Start,uS=rS.Stop,hS=rS.Raise,pS=rS.Send,fS=rS.Cancel,mS=rS.NullEvent,gS=rS.Assign;rS.After,rS.DoneState;var bS=rS.Log,vS=rS.Init,yS=rS.Invoke;rS.ErrorExecution;var xS,wS=rS.ErrorPlatform,CS=rS.ErrorCustom,kS=rS.Update,SS=rS.Choose,$S=rS.Pure,jS={},MS="xstate.guard",ES="production"===process.env.NODE_ENV;function TS(e,t,n){void 0===n&&(n=".");var r=AS(e,n),o=AS(t,n);return GS(o)?!!GS(r)&&o===r:GS(r)?r in o:Object.keys(r).every((function(e){return e in o&&TS(r[e],o[e])}))}function OS(e){try{return GS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function LS(e,t){try{return US(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function AS(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:US(e)?RS(e):"string"!=typeof e?e:RS(LS(e,t));var n}function RS(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function NS(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function DS(e,t,n){var r,o,i={};try{for(var s=aS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var IS=function(e){return function(t){var n,r,o=t;try{for(var i=aS(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function PS(e){return e?GS(e)?[[e]]:zS(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?PS(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function zS(e){var t;return(t=[]).concat.apply(t,cS([],lS(e),!1))}function VS(e){return US(e)?e:[e]}function BS(e){return void 0===e?[]:VS(e)}function HS(e,t,n){var r,o;if(KS(e))return e(t,n.data);var i={};try{for(var s=aS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];KS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function _S(e){return e instanceof Promise||!(null===e||!KS(e)&&"object"!=typeof e||!KS(e.then))}function FS(e,t){return NS(e.states,(function(e,n){if(e){var r=(GS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:FS(e,r)}}}))}function qS(e,t,n,r){ES||WS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(KS(s))l=s(e,t.data,a);else try{for(var c=aS(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=KS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var WS=function(){};function US(e){return Array.isArray(e)}function KS(e){return"function"==typeof e}function GS(e){return"string"==typeof e}function ZS(e,t){if(e)return GS(e)?{type:MS,name:e,predicate:t?t[e]:void 0}:KS(e)?{type:MS,name:e.name,predicate:e}:e}ES||(WS=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var JS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function XS(e){return!!e&&"__xstatenode"in e}function YS(e,t){return GS(e)||"number"==typeof e?iS({type:e},t):e}function QS(e,t){if(!GS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=YS(e);return iS({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function e$(e,t){return VS(t).map((function(t){return void 0===t||"string"==typeof t||XS(t)?{target:t,event:e}:iS(iS({},t),{event:e})}))}function t$(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===MS)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function n$(e){return"string"==typeof e?{type:e}:e}function r$(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function o$(e,t){return"".concat(e,":invocation[").concat(t,"]")}function i$(e){return(e.type===hS||e.type===pS&&e.to===oS.Internal)&&"number"!=typeof e.delay}(xS={})[JS]=function(){return this},xS[Symbol.observable]=function(){return this};var s$=QS({type:vS});function a$(e,t){return t&&t[e]||void 0}function l$(e,t){var n;if(GS(e)||"number"==typeof e)n=KS(r=a$(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(KS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(KS(r=a$(e.type,t)))n=iS(iS({},e),{exec:r});else if(r){var o=r.type||e.type;n=iS(iS(iS({},r),e),{type:o})}else n=e}return n}var c$=function(e,t){return e?(US(e)?e:[e]).map((function(e){return l$(e,t)})):[]};function d$(e){var t=l$(e);return iS(iS({id:GS(e)?e:t.id},t),{type:t.type})}function u$(e,t){var n="".concat(rS.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function h$(e,t){var n="".concat(rS.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function p$(e,t){var n="".concat(rS.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function f$(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=aS(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==gS?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?qS(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case hS:var h=function(e,t,n,r){var o,i={_event:n},s=QS(KS(e.event)?e.event(t,n.data,i):e.event);if(GS(e.delay)){var a=r&&r[e.delay];o=KS(a)?a(t,n.data,i):a}else o=KS(e.delay)?e.delay(t,n.data,i):e.delay;return iS(iS({},e),{type:hS,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case pS:var p=function(e,t,n,r){var o,i={_event:n},s=QS(KS(e.event)?e.event(t,n.data,i):e.event);if(GS(e.delay)){var a=r&&r[e.delay];o=KS(a)?a(t,n.data,i):a}else o=KS(e.delay)?e.delay(t,n.data,i):e.delay;var l=KS(e.to)?e.to(t,n.data,i):e.to;return iS(iS({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!ES){var f=a.delay;WS(!GS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==oS.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case bS:var m=function(e,t,n){return iS(iS({},e),{value:GS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case SS:if(!(y=null===(u=a.conds.find((function(n){var o=ZS(n.cond,e.options.guards);return!o||t$(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=lS(f$(e,t,l,r,[{type:o,actions:c$(BS(y),e.options.actions)}],i,s),2),b=g[0],v=g[1];return l=v,null==c||c.push(l),b;case $S:var y;if(!(y=a.get(l,r.data)))return[];var x=lS(f$(e,t,l,r,[{type:o,actions:c$(BS(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case uS:m=function(e,t,n){var r=KS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:rS.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case gS:l=qS(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=l$(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=iS(iS({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,cS([c[$]],lS(t),!1))}});k=j}return k}}var h=zS(o.map((function(e){var t,n,o=[];try{for(var s=aS(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var m$=function(e,t){return t(e)};function g$(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[JS]=function(){return this},t}function b$(e,t,n){var r=g$(t);if(r.deferred=!0,XS(e)){var o=r.state=m$(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var v$=function(e){return"atomic"===e.type||"final"===e.type};function y$(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function x$(e){return y$(e).filter((function(e){return"history"!==e.type}))}function w$(e){var t=[e];return v$(e)?t:t.concat(zS(x$(e).map(w$)))}function C$(e,t){var n,r,o,i,s,a,l,c,d=S$(new Set(e)),u=new Set(t);try{for(var h=aS(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=S$(u);try{for(var g=aS(u),b=g.next();!b.done;b=g.next()){if("compound"!==(k=b.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var v=(s=void 0,aS(x$(k))),y=v.next();!y.done;y=v.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=aS(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function k$(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(v$(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=k$(e,t)})),o}function S$(e){var t,n,r=new Map;try{for(var o=aS(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function $$(e,t){return k$(e,S$(C$([e],t)))}function j$(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function M$(e,t){return"compound"===t.type?x$(t).some((function(t){return"final"===t.type&&j$(e,t)})):"parallel"===t.type&&x$(t).every((function(t){return M$(e,t)}))}function E$(e){return new Set(zS(e.map((function(e){return e.tags}))))}function T$(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(GS(e)||GS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return T$(e[n],t[n])}))}var O$=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=jS,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||jS,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return cS([],lS(new Set(zS(cS([],lS(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:s$,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=s$;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),GS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,cS([],lS(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=sS(e,["configuration","transitions","tags","machine"]);return iS(iS({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return TS(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;ES&&WS(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),L$={deferEvents:!1},A$=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=iS(iS({},L$),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),R$=new Map,N$=0,D$=function(){return"x:".concat(N$++)},I$=function(e,t){return R$.set(e,t),e},P$=function(e){return R$.get(e)},z$=function(e){R$.delete(e)};function V$(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(ES||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function B$(e){if(V$()){var t=function(){var e=V$();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function H$(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return iS(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[JS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=r$(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var _$,F$={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(_$||(_$={}));var q$=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=_$.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(US(e))return r.batch(e),r.state;var n=QS(YS(e,t));if(r.status===_$.Stopped)return ES||WS(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==_$.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===oS.Parent||r.parent.id===t),s=i?r.parent:GS(t)?t===oS.Internal?r:r.children.get(t)||P$(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==_$.Stopped||r.parent!==s||r.state.done){var a=iS(iS({},e),{name:e.name===CS?"".concat(p$(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));ES||WS(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||a$(e.type,o),s=KS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case hS:var a=e;r.defer(a);break;case pS:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===s$):r.send(l._event);break;case fS:r.cancel(e.sendId);break;case dS:if(r.status!==_$.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===rS.Invoke){var d=n$(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;ES||WS(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(ES||WS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?HS(p,t,n):void 0;if("string"==typeof u)return;var g=KS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var b=void 0;XS(g)&&(g=m?g.withContext(m):g,b={autoForward:f}),r.spawn(g,h,b)}else r.spawnActivity(c);break;case uS:r.stopChild(e.activity.id);break;case bS:var v=e,y=v.label,x=v.value;y?r.logger(y,x):r.logger(x);break;default:ES||WS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=iS(iS({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new A$({deferEvents:this.options.deferEvents}),this.sessionId=D$()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:m$(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return ES||WS(this.status!==_$.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=aS(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==s$||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=aS(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=aS(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=aS(this.contextListeners),b=g.next();!b.done;b=g.next()){(0,b.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var v=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=v&&v.doneData?HS(v.doneData,e.context,t):void 0;this._doneEvent=h$(this.id,y);try{for(var x=aS(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),z$(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===_$.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=r$(e,t,n);this.listeners.add(o.next),this.status!==_$.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===_$.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===_$.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===_$.Running)return this;this.machine._init(),I$(this.sessionId,this),this.initialized=!0,this.status=_$.Running;var n=void 0===e?this.initialState:m$(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(O$.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,s$)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){KS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=aS(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=aS(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=aS(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var b=aS(this.doneListeners),v=b.next();!v.done;v=b.next()){h=v.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=_$.Stopped,this._initialState=void 0;try{for(var y=aS(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new A$({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=QS({type:"xstate.stop"}),r=m$(e,(function(){var t=zS(cS([],lS(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return c$(t.onExit,e.machine.options.actions)}))),r=lS(f$(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new O$({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!i$(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),z$(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===_$.NotStarted&&this.options.deferEvents)ES||WS(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==_$.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=QS(e);t.forward(r),i=m$(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,cS([],lS(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return iS(iS({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=aS(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,QS(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=QS(e);if(0===r.name.indexOf(wS)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(wS)})))throw r.data.data;return m$(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=aS(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),KS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==_$.Running)return b$(e,t);if(_S(e))return this.spawnPromise(Promise.resolve(e),t);if(KS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&KS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(XS(e))return this.spawnMachine(e,iS(iS({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,iS(iS({},this.options),{parent:this,id:n.id||t.id})),i=iS(iS({},F$),n);i.sync&&o.onTransition((function(e){r.send(kS,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(QS(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=H$(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(QS(h$(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=p$(t,e);try{o.send(QS(n,{origin:t}))}catch(r){!function(e,t,n){if(!ES){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=r$(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[JS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(QS(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(p$(t,e))}if(_S(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=r$(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,KS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[JS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(QS(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(QS(p$(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(QS(h$(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[JS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else ES||WS(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[JS]=function(){return this},n))},e.prototype.attachDev=function(){var e=V$();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(iS(iS({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:iS({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}B$(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[JS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===_$.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=W$,e}();function W$(e,t){return new q$(e,t)}function U$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function K$(e){return iS(iS({type:yS},e),{toJSON:function(){e.onDone,e.onError;var t=sS(e,["onDone","onError"]);return iS(iS({},t),{type:yS,src:U$(e.src)})}})}var G$="",Z$="*",J$={},X$=function(e){return"#"===e[0]},Y$=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||cS([this.machine.key],lS(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,ES||WS(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?NS(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,iS(((r={})[o.id]=o,r),o.idMap)),o})):J$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=aS(y$(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===G$})):G$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=BS(this.config.entry||this.config.onEntry).map((function(e){return l$(e)})),this.onExit=BS(this.config.exit||this.config.onExit).map((function(e){return l$(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=BS(this.config.invoke).map((function(e,t){var n,r;if(XS(e)){var o=o$(s.id,t);return s.machine.options.services=iS(((n={})[o]=e,n),s.machine.options.services),K$({src:o,id:o})}if(GS(e.src)){o=e.id||o$(s.id,t);return K$(iS(iS({},e),{id:o,src:e.src}))}if(XS(e.src)||KS(e.src)){o=e.id||o$(s.id,t);return s.machine.options.services=iS(((r={})[o]=e.src,r),s.machine.options.services),K$(iS(iS({id:o},e),{src:o}))}var i=e.src;return K$(iS(iS({id:o$(s.id,t)},e),{src:i}))})),this.activities=BS(this.config.activities).concat(this.invoke).map((function(e){return d$(e)})),this.transition=this.transition.bind(this),this.tags=BS(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||w$(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:iS(iS({},o),t.actions),activities:iS(iS({},i),t.activities),guards:iS(iS({},s),t.guards),services:iS(iS({},a),t.services),delays:iS(iS({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return KS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:NS(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===G$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Z$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(rS.After,"(").concat(e,")").concat(n)}(KS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:pS,event:KS(e)?e:YS(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:KS(e)?e.name:OS(e)}}(r,{delay:t})),e.onExit.push({type:fS,sendId:r}),r},r=US(t)?t.map((function(e,t){var r=n(e.delay,t);return iS(iS({},e),{event:r})})):zS(Object.keys(t).map((function(e,r){var o=t[e],i=GS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return BS(i).map((function(e){return iS(iS({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return iS(iS({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof O$?e.value:AS(e,this.delimiter);if(GS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,cS([],lS(zS(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=OS(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof O$?e:O$.create(e),n=Array.from(C$([],this.getStateNodes(t.value)));return new O$(iS(iS({},t),{value:this.resolve(t.value),configuration:n,done:M$(n,this),tags:E$(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=aS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=zS(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=zS(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:zS(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:zS(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return GS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,QS(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=aS(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(GS(p)&&X$(p)?e.matches(AS(this.getStateNodeById(p).path,this.delimiter)):TS(AS(p,this.delimiter),IS(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||t$(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,cS([],lS(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var b=zS(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:zS(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:b,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?C$([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=aS(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!j$(h,v=m.value)||j$(n.exitSet,v)||v.parent&&p.has(v.parent))&&p.add(v)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=aS(h),b=g.next();!b.done;b=g.next()){var v;j$(e,v=b.value)&&!j$(n.exitSet,v.parent)||n.exitSet.push(v)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=zS(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(u$(e.id,e.doneData),u$(i.id,e.doneData?HS(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&x$(s).every((function(e){return M$(n.configuration,e)}))&&t.push(u$(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=d$(e);return{type:rS.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:c$(s?cS(cS([],lS(t),!1),lS(n),!1):cS(cS([],lS(n),!1),lS(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:hS,event:"function"==typeof e?e:YS(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:c$(cS(cS([],lS(e.onExit),!1),lS(e.activities.map((function(e){return function(e){var t=KS(e)?e:d$(e);return{type:rS.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:c$(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=c$(zS(cS([],lS(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!i$(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=QS(t);if(e instanceof O$)o=void 0===n?e:this.resolveState(O$.from(e,n));else{var a=GS(e)?this.resolve(RS(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(O$.from(a,l))}if(!ES&&s.name===Z$)throw new Error("An event cannot have the wildcard type ('".concat(Z$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=C$([],this.getStateNodes(o.value)),u=c.configuration.length?C$(d,c.configuration):d;return c.configuration=cS([],lS(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,cS([],lS(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=s$);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=M$(h,this),f=u?$$(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),b=t?iS({},t.activities):{};try{for(var v=aS(g),y=v.next();!y.done;y=v.next()){var x=y.value;try{for(var w=(a=void 0,aS(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===dS?b[k.activity.id||k.activity.type]=k:k.type===uS&&(b[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}var S,$,j=lS(f$(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=lS(function(e,t){var n,r,o=lS([[],[]],2),i=o[0],s=o[1];try{for(var a=aS(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,i$),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===dS&&(null===(t=e.activity)||void 0===t?void 0:t.type)===yS})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=n$(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?HS(e.data,n,r):void 0,l=s?b$(s,e.id,a):g$(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?iS({},t.children):{}),N=new O$({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:FS(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?b:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:E$(h),machine:this}),D=n!==E;N.changed=o.name===kS||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==G$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:mS},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!T$(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(X$(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=X$(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&X$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=LS(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||J$;switch(this.type){case"parallel":return NS(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):J$}));case"compound":if(GS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?NS(e,(function(e,t){return e?n.getStateNode(t).resolve(e):J$})):this.initialStateValue||{};default:return e||J$}},e.prototype.getResolvedPath=function(e){if(X$(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return LS(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=DS(this.states,(function(e){return e.initialStateValue||J$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=v$(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=GS(t.target)&&X$(t.target)?RS(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return v$(this)?[this]:"compound"!==this.type||this.initial?zS(PS(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(ES||WS(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=lS(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:DS(this.states,(function(t,n){if(!e)return t.historyValue();var r=GS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?zS(PS(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=aS(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return GS(s)?[n.getStateNode(s)]:zS(PS(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=zS(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=aS(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,aS(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!GS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return BS(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return GS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=iS(iS({},e),{actions:c$(BS(e.actions)),cond:ZS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return iS(iS({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=Z$,s=o[i],a=void 0===s?[]:s,l=sS(o,["*"]);n=zS(Object.keys(l).map((function(e){ES||e!==G$||WS(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=e$(e,l[e]);return ES||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(GS(e.target)||XS(e.target))})),o=t===G$?"the transient event":"event '".concat(t,"'");WS(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(e$(Z$,a)))}else n=[];var c=this.config.always?e$("",this.config.always):[],d=this.config.onDone?e$(String(u$(this.id)),this.config.onDone):[];ES||WS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=zS(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,cS([],lS(e$(String(h$(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,cS([],lS(e$(String(p$(e.id)),e.onError)),!1)),t}))),h=this.after,p=zS(cS(cS(cS(cS([],lS(d),!1),lS(u),!1),lS(n),!1),lS(c),!1).map((function(e){return BS(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=aS(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var Q$,ej=function(e){return{type:gS,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(Q$||(Q$={}));var tj="undefined"!=typeof document?n.useLayoutEffect:function(){};function nj(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var rj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},oj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var ij=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},sj=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function aj(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function lj(e){var t=n.useRef([]),r=n.useRef([]);tj((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=ij(function(e,t){var n,r,o=rj([[],[]],2),i=o[0],s=o[1];try{for(var a=oj(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===Q$.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,sj([],ij(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,sj([],ij(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),tj((function(){for(;r.current.length;){var e=ij(r.current.shift(),2);aj(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=ij(t.current.shift(),2);aj(e[0],e[1])}}))}var cj=function(){return cj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cj.apply(this,arguments)},dj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},uj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var hj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function pj(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=nj((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=uj(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=dj(t,["context","guards","actions","activities","services","delays","state"]),f=nj((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return W$(o.withConfig(e,(function(){return cj(cj({},o.context),s)})),cj({deferEvents:!0},p))}));return tj((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),tj((function(){return f.start(h?O$.create(h):void 0),function(){f.stop()}}),[]),tj((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),lj(f),f}(e,t,r),i=hj(n.useState((function(){var e=o.machine.initialState;return t.state?O$.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function fj(){return fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fj.apply(null,arguments)}function mj(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const gj={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(gj.str(e)||gj.num(e))return e===t;if(gj.obj(e)&&gj.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!gj.und(n)||e===t}};function bj(e,t){return gj.und(e)||gj.nul(e)?t:e}function vj(e){return gj.und(e)?[]:gj.arr(e)?e:[e]}function yj(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return gj.fun(e)?e(...n):e}function xj(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,mj(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(gj.und(t))return fj({to:t},e);const n=Object.keys(e).reduce(((n,r)=>gj.und(t[r])?fj({},n,{[r]:e[r]}):n),{});return fj({to:t},n)}class wj{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class Cj extends wj{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof wj&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof wj&&e.removeChild(this)))}}class kj extends wj{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof wj&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof wj&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof wj)&&(t[n]=r instanceof wj?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let Sj,$j;let jj,Mj=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Ej,Tj=()=>Date.now();class Oj extends kj{constructor(e,t){super(),this.update=void 0,this.payload=e.style?fj({},e,{style:Ej(e.style)}):e,this.update=t,this.attach()}}let Lj=!1;const Aj=new Set,Rj=()=>{if(!Lj)return!1;let e=Tj();for(let t of Aj){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof wj,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Aj.delete(t),t.stop(!0))}return Aj.size?Mj(Rj):Lj=!1,Lj};function Nj(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Nj({range:e,output:t,extrapolate:n});if(jj&&"string"==typeof e.output[0])return jj(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class Dj extends Cj{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof Cj&&!(e instanceof Dj)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Nj(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Nj(e,t,n)}interpolate(e,t,n){return new Dj(this,e,t,n)}}const Ij=(e,t,n)=>e&&new Dj(e,t,n);function Pj(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>Pj(e,t)))}class zj extends wj{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&Pj(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Dj(this,e,t,n)}}class Vj extends Cj{constructor(e){super(),this.payload=e.map((e=>new zj(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new Dj(this,e,t)}}let Bj=0,Hj=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=Bj++}update(e){if(!e)return this;const t=xj(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=mj(t,["delay","to"]);if(gj.arr(o)||gj.fun(o))this.queue.push(fj({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=fj({to:{[n]:o},delay:yj(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=fj({},e[s.delay],s,{to:fj({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;gj.obj(n)&&(this.merged=fj({},n,this.merged)),gj.obj(o)&&(this.merged=fj({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=mj(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=gj.arr(s.to)||gj.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else gj.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Aj.has(t)||Aj.add(t),Lj||(Lj=!0,Mj(Rj));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,Aj.has(t)&&Aj.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=mj(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(gj.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=fj({},r,xj(r.to[t]));gj.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(gj.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=fj({},r,xj(n));if(gj.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=fj({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=fj({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=gj.num(o),l=gj.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!$j[o],c=gj.arr(o),h=!s&&!c&&!l;let f=gj.und(r[n])?o:r[n],m=s||c||l?o:1,g=yj(a,n);p&&(m=p.animations[n].parent);let b,v=i.parent,y=i.interpolation,x=vj(p?m.getPayload():m),w=o;h&&(w=jj({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!gj.und(v)&&i.animatedValues.some((e=>!e.done)),S=!gj.equ(w,C),$=!gj.equ(w,i.previous),j=!gj.equ(g,i.config);if(d||$&&S||j){if(s||l)v=y=i.parent||new zj(f);else if(c)v=y=i.parent||new Vj(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(v=i.parent,v.setValue(0,!1)):v=new zj(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=v.interpolate(t)}return x=vj(p?m.getPayload():m),b=vj(v.getPayload()),d&&!h&&v.setValue(f,!1),this.hasChanged=!0,b.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=Tj(),e.done=!1,e.animatedStyles.clear()})),yj(u,n)&&v.setValue(h?m:o,!1),fj({},e,{[n]:fj({},i,{name:n,parent:v,interpolation:y,animatedValues:b,toValues:x,previous:w,config:g,fromValues:vj(v.getValue()),immediate:yj(u,n),initialVelocity:bj(g.velocity,0),clamp:bj(g.clamp,!1),precision:bj(g.precision,.01),tension:bj(g.tension,170),friction:bj(g.friction,26),mass:bj(g.mass,1),duration:g.duration,easing:bj(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(v.setValue(1,!1),y.updateConfig({output:[w,w]})),v.done=!0,this.hasChanged=!0,fj({},e,{[n]:fj({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const _j=e=>{const t=gj.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=gj.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new Hj,s=i?yj(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?yj(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class Fj extends kj{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof wj||(e=Sj.transform(e)),this.payload=e}}const qj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Wj="[-+]?\\d*\\.?\\d+",Uj=Wj+"%";function Kj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Gj=new RegExp("rgb"+Kj(Wj,Wj,Wj)),Zj=new RegExp("rgba"+Kj(Wj,Wj,Wj,Wj)),Jj=new RegExp("hsl"+Kj(Wj,Uj,Uj)),Xj=new RegExp("hsla"+Kj(Wj,Uj,Uj,Wj)),Yj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Qj=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,eM=/^#([0-9a-fA-F]{6})$/,tM=/^#([0-9a-fA-F]{8})$/;function nM(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rM(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=nM(o,r,e+1/3),s=nM(o,r,e),a=nM(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function oM(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function iM(e){return(parseFloat(e)%360+360)%360/360}function sM(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function aM(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function lM(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=eM.exec(e))?parseInt(t[1]+"ff",16)>>>0:qj.hasOwnProperty(e)?qj[e]:(t=Gj.exec(e))?(oM(t[1])<<24|oM(t[2])<<16|oM(t[3])<<8|255)>>>0:(t=Zj.exec(e))?(oM(t[1])<<24|oM(t[2])<<16|oM(t[3])<<8|sM(t[4]))>>>0:(t=Yj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=tM.exec(e))?parseInt(t[1],16)>>>0:(t=Qj.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Jj.exec(e))?(255|rM(iM(t[1]),aM(t[2]),aM(t[3])))>>>0:(t=Xj.exec(e))?(rM(iM(t[1]),aM(t[2]),aM(t[3]))|sM(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const cM=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,dM=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,uM=new RegExp(`(${Object.keys(qj).join("|")})`,"g");let hM={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const pM=["Webkit","Ms","Moz","O"];function fM(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||hM.hasOwnProperty(e)&&hM[e]?(""+t).trim():t+"px"}hM=Object.keys(hM).reduce(((e,t)=>(pM.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),hM);const mM={};var gM,bM;gM=e=>new Fj(e),Ej=gM,bM=e=>{const t=e.output.map((e=>e.replace(dM,lM))).map((e=>e.replace(uM,lM))),n=t[0].match(cM).map((()=>[]));t.forEach((e=>{e.match(cM).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(cM).map(((t,r)=>Nj(fj({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(cM,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},jj=bM,$j=qj,function(e,t){Sj={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=mj(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=fM(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:mM[t]||(mM[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var vM;const yM=(vM=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new Oj(e,(()=>{let e=!1;a.current&&(e=Sj.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=mj(c,["scrollTop","scrollLeft"]),u=(h=e,!gj.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(gj.fun(t)?t(e):gj.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,fj({},d,{ref:u}))})),e=>(gj.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=vM(n),e}),vM))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function xM(e,t){return e.map((function(e,n){return e+t[n]}))}function wM(e,t){return e.map((function(e,n){return e-t[n]}))}function CM(e){return Math.hypot.apply(Math,e)}function kM(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function SM(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function $M(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-SM(t-e,n-t,r)+t:e>n?+SM(e-n,n-t,r)+n:e}function jM(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function MM(){return MM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MM.apply(this,arguments)}function EM(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function TM(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function LM(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return OM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?OM(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function AM(){}function RM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?AM:1===t.length?t[0]:function(){for(var e,n,r=LM(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function NM(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function DM(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function IM(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=IM(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var PM=MM({},{threshold:function(e){return void 0===e&&(e=0),NM(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return NM(.15);case!1:return NM(0);default:return NM(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:NM(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return PM.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),zM="undefined"!=typeof window&&window.document&&window.document.createElement,VM={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=zM?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},BM=MM({},PM,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=NM(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),NM(e)},swipeDistance:function(e){return void 0===e&&(e=60),NM(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function HM(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),IM(e,VM)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),IM(e,BM)}(i),s}function _M(e){return MM({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:AM,canceled:!1,memo:void 0,args:void 0},e)}function FM(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:_M({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:_M({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:_M({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:_M({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:_M({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var qM=new Map,WM=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=MM({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?UM(p[0],i[0]):d[0],m=!1===d[1]?UM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return MM({},g,{_movement:p,delta:[0,0]});var b,v,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(v=DM(n,this.state),b=DM(r,this.state),l[0]=v[0],a[0]=b[0]),!1!==w[1]&&!1===d[1])&&(v=null!=(y=v)?y:DM(n,this.state),b=null!=(x=b)?x:DM(r,this.state),l[1]=v[1],a[1]=b[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=xM(k,u),$=c?o:[0,0];return k=KM(a,xM(k,l),$),MM({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:KM(a,S,$),delta:wM(k,h)})},t.clean=function(){this.clearTimeout()},jM(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function UM(e,t){return Math.abs(e)>=t&&kM(e)*t}function KM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[$M(r,l,c,i),$M(o,u,h,s)]}function GM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function ZM(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,MM({},t,{event:n})].concat(o))}}var JM=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=LM(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];QM(e,c[0],ZM(c[1],MM({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=YM(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;tE(o,XM(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,RM.apply(void 0,d)])}eE(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=RM.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=YM(t.config),n=t.config.eventOptions;e&&tE(e,XM(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){tE(n,o[i],r)}e.windowListeners={}}(t)},this.state=FM(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function XM(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function YM(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function QM(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function eE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=LM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function tE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=LM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function nE(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(qM.get("drag"));e.wheel&&t.add(qM.get("wheel"));e.scroll&&t.add(qM.get("scroll"));e.move&&t.add(qM.get("move"));e.pinch&&t.add(qM.get("pinch"));e.hover&&t.add(qM.get("hover"));return t}(e),i=n.useMemo((function(){return new JM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?rE:i.bind}function rE(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var oE=function(e){function t(){return e.apply(this,arguments)||this}EM(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return wM(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=CM(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:CM(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(WM);function iE(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function sE(e){var t="buttons"in e?e.buttons:0,n=iE(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function aE(e){var t=iE(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var lE=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(tE(r.window,o[t],r.eventOptions),eE(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(TM(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=sE(e);if(n.down){t.updateSharedState(n);var r=aE(e),o=t.getKinematics(r,e),i=GM(TM(t),e),s=t.state._isTap,a=CM(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(MM({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],b=m[1],v=MM({},GM(TM(t),e),t.getMovement(t.state.values)),y=[0,0];v.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=kM(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>b&&(y[1]=kM(i))),t.updateGestureState(MM({},v,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(TM(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(tE(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}EM(t,e);var n=t.prototype;return n.startDrag=function(e){var t=aE(e);this.updateSharedState(sE(e)),this.updateGestureState(MM({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return MM({},FM()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),GM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(QM(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&QM(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(oE);function cE(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!cE(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!cE(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||cE(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function dE(e,t){try{return cE(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function uE(e,t){void 0===t&&(t={}),qM.set("drag",lE);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(HM,dE)),nE({drag:e},r.current(t))}
3080
+ ***************************************************************************** */var iS,sS,aS=function(){return aS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},aS.apply(this,arguments)};function lS(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function cS(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dS(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function uS(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(iS||(iS={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(sS||(sS={}));var hS=iS.Start,pS=iS.Stop,fS=iS.Raise,mS=iS.Send,gS=iS.Cancel,bS=iS.NullEvent,vS=iS.Assign;iS.After,iS.DoneState;var yS=iS.Log,xS=iS.Init,wS=iS.Invoke;iS.ErrorExecution;var CS,kS=iS.ErrorPlatform,SS=iS.ErrorCustom,$S=iS.Update,jS=iS.Choose,MS=iS.Pure,ES={},TS="xstate.guard",OS="production"===process.env.NODE_ENV;function LS(e,t,n){void 0===n&&(n=".");var r=NS(e,n),o=NS(t,n);return JS(o)?!!JS(r)&&o===r:JS(r)?r in o:Object.keys(r).every((function(e){return e in o&&LS(r[e],o[e])}))}function AS(e){try{return JS(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function RS(e,t){try{return GS(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function NS(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:GS(e)?DS(e):"string"!=typeof e?e:DS(RS(e,t));var n}function DS(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function IS(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o];n[i]=t(e[i],i,e,o)}return n}function PS(e,t,n){var r,o,i={};try{for(var s=cS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}var zS=function(e){return function(t){var n,r,o=t;try{for(var i=cS(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}};function VS(e){return e?JS(e)?[[e]]:BS(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?VS(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function BS(e){var t;return(t=[]).concat.apply(t,uS([],dS(e),!1))}function HS(e){return GS(e)?e:[e]}function _S(e){return void 0===e?[]:HS(e)}function FS(e,t,n){var r,o;if(ZS(e))return e(t,n.data);var i={};try{for(var s=cS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];ZS(c)?i[l]=c(t,n.data):i[l]=c}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}function qS(e){return e instanceof Promise||!(null===e||!ZS(e)&&"object"!=typeof e||!ZS(e.then))}function WS(e,t){return IS(e.states,(function(e,n){if(e){var r=(JS(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:WS(e,r)}}}))}function US(e,t,n,r){OS||KS(!!e,"Attempting to update undefined context");var o=e?n.reduce((function(e,n){var o,i,s=n.assignment,a={state:r,action:n,_event:t},l={};if(ZS(s))l=s(e,t.data,a);else try{for(var c=cS(Object.keys(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=s[u];l[u]=ZS(h)?h(e,t.data,a):h}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return Object.assign({},e,l)}),e):e;return o}var KS=function(){};function GS(e){return Array.isArray(e)}function ZS(e){return"function"==typeof e}function JS(e){return"string"==typeof e}function XS(e,t){if(e)return JS(e)?{type:TS,name:e,predicate:t?t[e]:void 0}:ZS(e)?{type:TS,name:e.name,predicate:e}:e}OS||(KS=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var YS=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function QS(e){return!!e&&"__xstatenode"in e}function e$(e,t){return JS(e)||"number"==typeof e?aS({type:e},t):e}function t$(e,t){if(!JS(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=e$(e);return aS({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function n$(e,t){return HS(t).map((function(t){return void 0===t||"string"==typeof t||QS(t)?{target:t,event:e}:aS(aS({},t),{event:e})}))}function r$(e,t,n,r,o){var i=e.options.guards,s={state:o,cond:t,_event:r};if(t.type===TS)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var a=null==i?void 0:i[t.type];if(!a)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return a(n,r.data,s)}function o$(e){return"string"==typeof e?{type:e}:e}function i$(e,t,n){var r=function(){},o="object"==typeof e,i=o?e:null;return{next:((o?e.next:e)||r).bind(i),error:((o?e.error:t)||r).bind(i),complete:((o?e.complete:n)||r).bind(i)}}function s$(e,t){return"".concat(e,":invocation[").concat(t,"]")}function a$(e){return(e.type===fS||e.type===mS&&e.to===sS.Internal)&&"number"!=typeof e.delay}(CS={})[YS]=function(){return this},CS[Symbol.observable]=function(){return this};var l$=t$({type:xS});function c$(e,t){return t&&t[e]||void 0}function d$(e,t){var n;if(JS(e)||"number"==typeof e)n=ZS(r=c$(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(ZS(e))n={type:e.name||e.toString(),exec:e};else{var r;if(ZS(r=c$(e.type,t)))n=aS(aS({},e),{exec:r});else if(r){var o=r.type||e.type;n=aS(aS(aS({},r),e),{type:o})}else n=e}return n}var u$=function(e,t){return e?(GS(e)?e:[e]).map((function(e){return d$(e,t)})):[]};function h$(e){var t=d$(e);return aS(aS({id:JS(e)?e:t.id},t),{type:t.type})}function p$(e,t){var n="".concat(iS.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function f$(e,t){var n="".concat(iS.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function m$(e,t){var n="".concat(iS.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function g$(e,t,n,r,o,i,s){void 0===s&&(s=!1);var a=s?[]:function(e){var t,n,r=[];try{for(var o=cS(e),i=o.next();!i.done;i=o.next())for(var s=i.value,a=0;a<s.actions.length;)s.actions[a].type!==vS?a++:(r.push(s.actions[a]),s.actions.splice(a,1))}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(o),l=a.length?US(n,r,a,t):n,c=s?[n]:void 0,d=[];function u(o,a){var u;switch(a.type){case fS:var h=function(e,t,n,r){var o,i={_event:n},s=t$(ZS(e.event)?e.event(t,n.data,i):e.event);if(JS(e.delay)){var a=r&&r[e.delay];o=ZS(a)?a(t,n.data,i):a}else o=ZS(e.delay)?e.delay(t,n.data,i):e.delay;return aS(aS({},e),{type:fS,_event:s,delay:o})}(a,l,r,e.options.delays);return i&&"number"==typeof h.delay&&i(h,l,r),h;case mS:var p=function(e,t,n,r){var o,i={_event:n},s=t$(ZS(e.event)?e.event(t,n.data,i):e.event);if(JS(e.delay)){var a=r&&r[e.delay];o=ZS(a)?a(t,n.data,i):a}else o=ZS(e.delay)?e.delay(t,n.data,i):e.delay;var l=ZS(e.to)?e.to(t,n.data,i):e.to;return aS(aS({},e),{to:l,_event:s,event:s.data,delay:o})}(a,l,r,e.options.delays);if(!OS){var f=a.delay;KS(!JS(f)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(f,"' was found on machine '").concat(e.id,"'"))}return i&&p.to!==sS.Internal&&("entry"===o?d.push(p):i(p,l,r)),p;case yS:var m=function(e,t,n){return aS(aS({},e),{value:JS(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})}(a,l,r);return null==i||i(m,l,r),m;case jS:if(!(y=null===(u=a.conds.find((function(n){var o=XS(n.cond,e.options.guards);return!o||r$(e,o,l,r,i?void 0:t)})))||void 0===u?void 0:u.actions))return[];var g=dS(g$(e,t,l,r,[{type:o,actions:u$(_S(y),e.options.actions)}],i,s),2),b=g[0],v=g[1];return l=v,null==c||c.push(l),b;case MS:var y;if(!(y=a.get(l,r.data)))return[];var x=dS(g$(e,t,l,r,[{type:o,actions:u$(_S(y),e.options.actions)}],i,s),2),w=x[0],C=x[1];return l=C,null==c||c.push(l),w;case pS:m=function(e,t,n){var r=ZS(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:iS.Stop,activity:o}}(a,l,r);return null==i||i(m,n,r),m;case vS:l=US(l,r,[a],i?void 0:t),null==c||c.push(l);break;default:var k=d$(a,e.options.actions),S=k.exec;if(i)i(k,l,r);else if(S&&c){var $=c.length-1,j=aS(aS({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];S.apply(void 0,uS([c[$]],dS(t),!1))}});k=j}return k}}var h=BS(o.map((function(e){var t,n,o=[];try{for(var s=cS(e.actions),a=s.next();!a.done;a=s.next()){var c=a.value,h=u(e.type,c);h&&(o=o.concat(h))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return d.forEach((function(e){i(e,l,r)})),d.length=0,o})));return[h,l]}var b$=function(e,t){return t(e)};function v$(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[YS]=function(){return this},t}function y$(e,t,n){var r=v$(t);if(r.deferred=!0,QS(e)){var o=r.state=b$(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return o}}return r}var x$=function(e){return"atomic"===e.type||"final"===e.type};function w$(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function C$(e){return w$(e).filter((function(e){return"history"!==e.type}))}function k$(e){var t=[e];return x$(e)?t:t.concat(BS(C$(e).map(k$)))}function S$(e,t){var n,r,o,i,s,a,l,c,d=j$(new Set(e)),u=new Set(t);try{for(var h=cS(u),p=h.next();!p.done;p=h.next())for(var f=(k=p.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var m=j$(u);try{for(var g=cS(u),b=g.next();!b.done;b=g.next()){if("compound"!==(k=b.value).type||m.get(k)&&m.get(k).length){if("parallel"===k.type)try{for(var v=(s=void 0,cS(C$(k))),y=v.next();!y.done;y=v.next()){var x=y.value;u.has(x)||(u.add(x),d.get(x)?d.get(x).forEach((function(e){return u.add(e)})):x.initialStateNodes.forEach((function(e){return u.add(e)})))}}catch(e){s={error:e}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(s)throw s.error}}}else d.get(k)?d.get(k).forEach((function(e){return u.add(e)})):k.initialStateNodes.forEach((function(e){return u.add(e)}))}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}try{for(var w=cS(u),C=w.next();!C.done;C=w.next()){var k;for(f=(k=C.value).parent;f&&!u.has(f);)u.add(f),f=f.parent}}catch(e){l={error:e}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}return u}function $$(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(x$(r))return r.key}var o={};return n.forEach((function(e){o[e.key]=$$(e,t)})),o}function j$(e){var t,n,r=new Map;try{for(var o=cS(e),i=o.next();!i.done;i=o.next()){var s=i.value;r.has(s)||r.set(s,[]),s.parent&&(r.has(s.parent)||r.set(s.parent,[]),r.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function M$(e,t){return $$(e,j$(S$([e],t)))}function E$(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function T$(e,t){return"compound"===t.type?C$(t).some((function(t){return"final"===t.type&&E$(e,t)})):"parallel"===t.type&&C$(t).every((function(t){return T$(e,t)}))}function O$(e){return new Set(BS(e.map((function(e){return e.tags}))))}function L$(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(JS(e)||JS(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return L$(e[n],t[n])}))}var A$=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=ES,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||ES,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return uS([],dS(new Set(BS(uS([],dS(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:l$,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=l$;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),JS(e))return[e];var r=Object.keys(e);return r.concat.apply(r,uS([],dS(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=lS(e,["configuration","transitions","tags","machine"]);return aS(aS({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return LS(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;OS&&KS(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),R$={deferEvents:!1},N$=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=aS(aS({},R$),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),D$=new Map,I$=0,P$=function(){return"x:".concat(I$++)},z$=function(e,t){return D$.set(e,t),e},V$=function(e){return D$.get(e)},B$=function(e){D$.delete(e)};function H$(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void(OS||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function _$(e){if(H$()){var t=function(){var e=H$();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function F$(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,o=[],i=!1,s=function(e){var t;return aS(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[YS]=function(){return this},t),e)}({id:t.id,send:function(t){o.push(t),function(){if(!i){for(i=!0;o.length>0;){var t=o.shift();n=e.transition(n,t,a),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,o){var i=i$(e,t,o);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),a={parent:t.parent,self:s,id:t.id||"anonymous",observers:r};return n=e.start?e.start(a):n,s}var q$,W$={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(q$||(q$={}));var U$=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=q$.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if(GS(e))return r.batch(e),r.state;var n=t$(e$(e,t));if(r.status===q$.Stopped)return OS||KS(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(r.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),r.state;if(r.status!==q$.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r._nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t,n){var o,i=r.parent&&(t===sS.Parent||r.parent.id===t),s=i?r.parent:JS(t)?t===sS.Internal?r:r.children.get(t)||V$(t):(o=t)&&"function"==typeof o.send?t:void 0;if(s)if("machine"in s){if(r.status!==q$.Stopped||r.parent!==s||r.state.done){var a=aS(aS({},e),{name:e.name===SS?"".concat(m$(r.id)):e.name,origin:r.sessionId});!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,a]):s.send(a)}}else!n&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([s,e.data]):s.send(e.data);else{if(!i)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."));OS||KS(!1,"Service '".concat(r.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,o){void 0===o&&(o=r.machine.options.actions);var i=e.exec||c$(e.type,o),s=ZS(i)?i:i?i.exec:e.exec;if(s)try{return s(t,n.data,r.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:r.state,_event:n})}catch(e){throw r.parent&&r.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case fS:var a=e;r.defer(a);break;case mS:var l=e;if("number"==typeof l.delay)return void r.defer(l);l.to?r.sendTo(l._event,l.to,n===l$):r.send(l._event);break;case gS:r.cancel(e.sendId);break;case hS:if(r.status!==q$.Running)return;var c=e.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[c.id||c.type])break;if(c.type===iS.Invoke){var d=o$(c.src),u=r.machine.options.services?r.machine.options.services[d.type]:void 0,h=c.id,p=c.data;OS||KS(!("forward"in c),"`forward` property is deprecated (found in invocation of '".concat(c.src,"' in in machine '").concat(r.machine.id,"'). ")+"Please use `autoForward` instead.");var f="autoForward"in c?c.autoForward:!!c.forward;if(!u)return void(OS||KS(!1,"No service found for invocation '".concat(c.src,"' in machine '").concat(r.machine.id,"'.")));var m=p?FS(p,t,n):void 0;if("string"==typeof u)return;var g=ZS(u)?u(t,n.data,{data:m,src:d,meta:c.meta}):u;if(!g)return;var b=void 0;QS(g)&&(g=m?g.withContext(m):g,b={autoForward:f}),r.spawn(g,h,b)}else r.spawnActivity(c);break;case pS:r.stopChild(e.activity.id);break;case yS:var v=e,y=v.label,x=v.value;y?r.logger(y,x):r.logger(x);break;default:OS||KS(!1,"No implementation found for action type '".concat(e.type,"'"))}};var o=aS(aS({},e.defaultOptions),n),i=o.clock,s=o.logger,a=o.parent,l=o.id,c=void 0!==l?l:t.id;this.id=c,this.logger=s,this.clock=i,this.parent=a,this.options=o,this.scheduler=new N$({deferEvents:this.options.deferEvents}),this.sessionId=P$()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:b$(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return OS||KS(this.status!==q$.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var o=cS(e.actions),i=o.next();!i.done;i=o.next()){var s=i.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,o,i,s,a,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==l$||!this.options.execute)for(var u=void 0;u=this._outgoingQueue.shift();)u[0].send(u[1]);else this.execute(this.state);if(this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var h=cS(this.eventListeners),p=h.next();!p.done;p=h.next()){(0,p.value)(e.event)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}try{for(var f=cS(this.listeners),m=f.next();!m.done;m=f.next()){(0,m.value)(e,e.event)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}try{for(var g=cS(this.contextListeners),b=g.next();!b.done;b=g.next()){(0,b.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=g.return)&&a.call(g)}finally{if(s)throw s.error}}if(this.state.done){var v=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),y=v&&v.doneData?FS(v.doneData,e.context,t):void 0;this._doneEvent=f$(this.id,y);try{for(var x=cS(this.doneListeners),w=x.next();!w.done;w=x.next()){(0,w.value)(this._doneEvent)}}catch(e){l={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this._stop(),this._stopChildren(),B$(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===q$.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,o=i$(e,t,n);this.listeners.add(o.next),this.status!==q$.NotStarted&&o.next(this.state);var i=function(){r.doneListeners.delete(i),r.stopListeners.delete(i),o.complete()};return this.status===q$.Stopped?o.complete():(this.onDone(i),this.onStop(i)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(i),r.stopListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===q$.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===q$.Running)return this;this.machine._init(),z$(this.sessionId,this),this.initialized=!0,this.status=q$.Running;var n=void 0===e?this.initialState:b$(this,(function(){return"object"==typeof(n=e)&&null!==n&&"value"in n&&"_event"in n?t.machine.resolveState(e):t.machine.resolveState(A$.from(e,t.machine.context));var n}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,l$)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){ZS(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,r,o,i,s,a,l,c;try{for(var d=cS(this.listeners),u=d.next();!u.done;u=d.next()){var h=u.value;this.listeners.delete(h)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var p=cS(this.stopListeners),f=p.next();!f.done;f=p.next()){(h=f.value)(),this.stopListeners.delete(h)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var m=cS(this.contextListeners),g=m.next();!g.done;g=m.next()){h=g.value;this.contextListeners.delete(h)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}try{for(var b=cS(this.doneListeners),v=b.next();!v.done;v=b.next()){h=v.value;this.doneListeners.delete(h)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=q$.Stopped,this._initialState=void 0;try{for(var y=cS(Object.keys(this.delayedEventsMap)),x=y.next();!x.done;x=y.next()){var w=x.value;this.clock.clearTimeout(this.delayedEventsMap[w])}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}this.scheduler.clear(),this.scheduler=new N$({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=t$({type:"xstate.stop"}),r=b$(e,(function(){var t=BS(uS([],dS(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return u$(t.onExit,e.machine.options.actions)}))),r=dS(g$(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=r[0],i=r[1],s=new A$({value:e.state.value,context:i,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!a$(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return s.changed=!0,s}));e.update(r,n),e._stopChildren(),B$(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===q$.NotStarted&&this.options.deferEvents)OS||KS(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==q$.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var r,o,i=t.state,s=!1,a=[],l=function(e){var r=t$(e);t.forward(r),i=b$(t,(function(){return t.machine.transition(i,r,void 0,n||void 0)})),a.push.apply(a,uS([],dS(t.machine.config.predictableActionArguments?i.actions:i.actions.map((function(e){return function(e,t){var n=e.exec;return aS(aS({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}(e,i)}))),!1)),s=s||!!i.changed};try{for(var c=cS(e),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}i.changed=s,i.actions=a,t.update(i,t$(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=t$(e);if(0===r.name.indexOf(kS)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(kS)})))throw r.data.data;return b$(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var r=cS(this.forwardTo),o=r.next();!o.done;o=r.next()){var i=o.value,s=this.children.get(i);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),ZS(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==q$.Running)return y$(e,t);if(qS(e))return this.spawnPromise(Promise.resolve(e),t);if(ZS(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(e){return!1}}(o=e)&&"id"in o)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&ZS(e.subscribe)}catch(e){return!1}}(e))return this.spawnObservable(e,t);if(QS(e))return this.spawnMachine(e,aS(aS({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,o},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var o=new e(t,aS(aS({},this.options),{parent:this,id:n.id||t.id})),i=aS(aS({},W$),n);i.sync&&o.onTransition((function(e){r.send($S,{state:e,id:o.id})}));var s=o;return this.children.set(o.id,s),i.autoForward&&this.forwardTo.add(o.id),o.onDone((function(e){r.removeChild(o.id),r.send(t$(e,{origin:o.id}))})).start(),s},e.prototype.spawnBehavior=function(e,t){var n=F$(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,o=this,i=!1;e.then((function(e){i||(r=e,o.removeChild(t),o.send(t$(f$(t,e),{origin:t})))}),(function(e){if(!i){o.removeChild(t);var n=m$(t,e);try{o.send(t$(n,{origin:t}))}catch(r){!function(e,t,n){if(!OS){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(o))}}}(e,r,t),o.devTools&&o.devTools.send(n,o.state),o.machine.strict&&o.stop()}}}));var s=((n={id:t,send:function(){},subscribe:function(t,n,r){var o=i$(t,n,r),i=!1;return e.then((function(e){i||(o.next(e),i||o.complete())}),(function(e){i||o.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[YS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnCallback=function(e,t){var n,r,o,i=this,s=!1,a=new Set,l=new Set;try{o=e((function(e){r=e,l.forEach((function(t){return t(e)})),s||i.send(t$(e,{origin:t}))}),(function(e){a.add(e)}))}catch(e){this.send(m$(t,e))}if(qS(o))return this.spawnPromise(o,t);var c=((n={id:t,send:function(e){return a.forEach((function(t){return t(e)}))},subscribe:function(e){var t=i$(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){s=!0,ZS(o)&&o()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[YS]=function(){return this},n);return this.children.set(t,c),c},e.prototype.spawnObservable=function(e,t){var n,r,o=this,i=e.subscribe((function(e){r=e,o.send(t$(e,{origin:t}))}),(function(e){o.removeChild(t),o.send(t$(m$(t,e),{origin:t}))}),(function(){o.removeChild(t),o.send(t$(f$(t),{origin:t}))})),s=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[YS]=function(){return this},n);return this.children.set(t,s),s},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else OS||KS(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[YS]=function(){return this},n))},e.prototype.attachDev=function(){var e=H$();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(aS(aS({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:aS({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}_$(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[YS]=function(){return this},e.prototype.getSnapshot=function(){return this.status===q$.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=K$,e}();function K$(e,t){return new U$(e,t)}function G$(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Z$(e){return aS(aS({type:wS},e),{toJSON:function(){e.onDone,e.onError;var t=lS(e,["onDone","onError"]);return aS(aS({},t),{type:wS,src:G$(e.src)})}})}var J$="",X$="*",Y$={},Q$=function(e){return"#"===e[0]},ej=function(){function e(t,n,r,o){void 0===r&&(r="context"in t?t.context:void 0);var i,s=this;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||uS([this.machine.key],dS(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,OS||KS(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?IS(this.config.states,(function(t,n){var r,o=new e(t,{},void 0,{parent:s,key:n});return Object.assign(s.idMap,aS(((r={})[o.id]=o,r),o.idMap)),o})):Y$;var a=0;!function e(t){var n,r;t.order=a++;try{for(var o=cS(w$(t)),i=o.next();!i.done;i=o.next()){e(i.value)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===J$})):J$ in this.config.on),this.strict=!!this.config.strict,this.onEntry=_S(this.config.entry||this.config.onEntry).map((function(e){return d$(e)})),this.onExit=_S(this.config.exit||this.config.onExit).map((function(e){return d$(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=_S(this.config.invoke).map((function(e,t){var n,r;if(QS(e)){var o=s$(s.id,t);return s.machine.options.services=aS(((n={})[o]=e,n),s.machine.options.services),Z$({src:o,id:o})}if(JS(e.src)){o=e.id||s$(s.id,t);return Z$(aS(aS({},e),{id:o,src:e.src}))}if(QS(e.src)||ZS(e.src)){o=e.id||s$(s.id,t);return s.machine.options.services=aS(((r={})[o]=e.src,r),s.machine.options.services),Z$(aS(aS({id:o},e),{src:o}))}var i=e.src;return Z$(aS(aS({id:s$(s.id,t)},e),{src:i}))})),this.activities=_S(this.config.activities).concat(this.invoke).map((function(e){return h$(e)})),this.transition=this.transition.bind(this),this.tags=_S(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||k$(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,i=r.activities,s=r.guards,a=r.services,l=r.delays;return new e(this.config,{actions:aS(aS({},o),t.actions),activities:aS(aS({},i),t.activities),guards:aS(aS({},s),t.guards),services:aS(aS({},a),t.services),delays:aS(aS({},l),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return ZS(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:IS(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===J$,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===X$}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=function(e,t){var n=t?"#".concat(t):"";return"".concat(iS.After,"(").concat(e,")").concat(n)}(ZS(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(function(e,t){return{to:t?t.to:void 0,type:mS,event:ZS(e)?e:e$(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:ZS(e)?e.name:AS(e)}}(r,{delay:t})),e.onExit.push({type:gS,sendId:r}),r},r=GS(t)?t.map((function(e,t){var r=n(e.delay,t);return aS(aS({},e),{event:r})})):BS(Object.keys(t).map((function(e,r){var o=t[e],i=JS(o)?{target:o}:o,s=isNaN(+e)?e:+e,a=n(s,r);return _S(i).map((function(e){return aS(aS({},e),{event:a,delay:s})}))})));return r.map((function(t){var n=t.delay;return aS(aS({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof A$?e.value:NS(e,this.delimiter);if(JS(r)){var o=this.getStateNode(r).initial;return void 0!==o?this.getStateNodes(((t={})[r]=o,t)):[this,this.states[r]]}var i=Object.keys(r),s=[this];return s.push.apply(s,uS([],dS(BS(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),s},e.prototype.handles=function(e){var t=AS(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof A$?e:A$.create(e),n=Array.from(S$([],this.getStateNodes(t.value)));return new A$(aS(aS({},t),{value:this.resolve(t.value),configuration:n,done:T$(n,this),tags:O$(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),o=this.getStateNode(r[0])._transition(e[r[0]],t,n);return o&&o.transitions.length?o:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,o,i={};try{for(var s=cS(Object.keys(e)),a=s.next();!a.done;a=s.next()){var l=a.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var u=Object.keys(i).map((function(e){return i[e]})),h=BS(u.map((function(e){return e.transitions})));if(!u.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=BS(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,exitSet:BS(u.map((function(e){return e.exitSet}))),configuration:p,source:t,actions:BS(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return JS(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,t$(t))},e.prototype.next=function(e,t){var n,r,o,i=this,s=t.name,a=[],l=[];try{for(var c=cS(this.getCandidates(s)),d=c.next();!d.done;d=c.next()){var u=d.value,h=u.cond,p=u.in,f=e.context,m=!p||(JS(p)&&Q$(p)?e.matches(NS(this.getStateNodeById(p).path,this.delimiter)):LS(NS(p,this.delimiter),zS(this.path.slice(0,-2))(e.value))),g=!1;try{g=!h||r$(this.machine,h,f,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(s,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(g&&m){void 0!==u.target&&(l=u.target),a.push.apply(a,uS([],dS(u.actions),!1)),o=u;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o){if(!l.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:a};var b=BS(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:BS(l.map((function(e){return i.getPotentiallyReenteringNodes(e)}))),configuration:b,source:e,actions:a}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,r,o,i,s){var a,l,c,d,u=this,h=i?S$([],this.getStateNodes(i.value)):[],p=new Set;try{for(var f=cS(Array.from(e).sort((function(e,t){return e.order-t.order}))),m=f.next();!m.done;m=f.next()){(!E$(h,v=m.value)||E$(n.exitSet,v)||v.parent&&p.has(v.parent))&&p.add(v)}}catch(e){a={error:e}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}try{for(var g=cS(h),b=g.next();!b.done;b=g.next()){var v;E$(e,v=b.value)&&!E$(n.exitSet,v.parent)||n.exitSet.push(v)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var y=Array.from(p).sort((function(e,t){return e.order-t.order})),x=new Set(n.exitSet),w=BS(y.map((function(e){var t=[];if("final"!==e.type)return t;var i=e.parent;if(!i.parent)return t;t.push(p$(e.id,e.doneData),p$(i.id,e.doneData?FS(e.doneData,r,o):void 0));var s=i.parent;return"parallel"===s.type&&C$(s).every((function(e){return T$(n.configuration,e)}))&&t.push(p$(s.id)),t}))),C=y.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return function(e){var t=h$(e);return{type:iS.Start,activity:t,exec:void 0}}(e)}));return{type:"entry",actions:u$(s?uS(uS([],dS(t),!1),dS(n),!1):uS(uS([],dS(n),!1),dS(t),!1),u.machine.options.actions)}})).concat({type:"state_done",actions:w.map((function(e){return function(e,t){return{type:fS,event:"function"==typeof e?e:e$(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}(e)}))}),k=Array.from(x).map((function(e){return{type:"exit",actions:u$(uS(uS([],dS(e.onExit),!1),dS(e.activities.map((function(e){return function(e){var t=ZS(e)?e:h$(e);return{type:iS.Stop,activity:t,exec:void 0}}(e)}))),!1),u.machine.options.actions)}})).concat({type:"transition",actions:u$(n.actions,this.machine.options.actions)}).concat(C);if(t){var S=u$(BS(uS([],dS(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!a$(e)}));return k.concat({type:"stop",actions:S})}return k},e.prototype.transition=function(e,t,n,r){void 0===e&&(e=this.initialState);var o,i,s=t$(t);if(e instanceof A$)o=void 0===n?e:this.resolveState(A$.from(e,n));else{var a=JS(e)?this.resolve(DS(this.getResolvedPath(e))):this.resolve(e),l=null!=n?n:this.machine.context;o=this.resolveState(A$.from(a,l))}if(!OS&&s.name===X$)throw new Error("An event cannot have the wildcard type ('".concat(X$,"')"));if(this.strict&&!this.events.includes(s.name)&&(i=s.name,!/^(done|error)\./.test(i)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var c=this._transition(o.value,o,s)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},d=S$([],this.getStateNodes(o.value)),u=c.configuration.length?S$(d,c.configuration):d;return c.configuration=uS([],dS(u),!1),this.resolveTransition(c,o,o.context,r,s)},e.prototype.resolveRaisedTransition=function(e,t,n,r){var o,i=e.actions;return(e=this.transition(e,t,void 0,r))._event=n,e.event=n.data,(o=e.actions).unshift.apply(o,uS([],dS(i),!1)),e},e.prototype.resolveTransition=function(e,t,n,r,o){var i,s,a,l,c=this;void 0===o&&(o=l$);var d=e.configuration,u=!t||e.transitions.length>0,h=u?e.configuration:t?t.configuration:[],p=T$(h,this),f=u?M$(this.machine,d):void 0,m=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,g=this.getActions(new Set(h),p,e,n,o,t,r),b=t?aS({},t.activities):{};try{for(var v=cS(g),y=v.next();!y.done;y=v.next()){var x=y.value;try{for(var w=(a=void 0,cS(x.actions)),C=w.next();!C.done;C=w.next()){var k=C.value;k.type===hS?b[k.activity.id||k.activity.type]=k:k.type===pS&&(b[k.activity.id||k.activity.type]=!1)}}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}var S,$,j=dS(g$(this,t,n,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=j[0],E=j[1],T=dS(function(e,t){var n,r,o=dS([[],[]],2),i=o[0],s=o[1];try{for(var a=cS(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(M,a$),2),O=T[0],L=T[1],A=M.filter((function(e){var t;return e.type===hS&&(null===(t=e.activity)||void 0===t?void 0:t.type)===wS})),R=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var o,i=o$(e.src),s=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[i.type],a=e.data?FS(e.data,n,r):void 0,l=s?y$(s,e.id,a):v$(e.id);return l.meta=e,l}(t.activity,c.machine,E,o),e}),t?aS({},t.children):{}),N=new A$({value:f||t.value,context:E,_event:o,_sessionid:t?t._sessionid:null,historyValue:f?m?(S=m,$=f,{current:$,states:WS(S,$)}):void 0:t?t.historyValue:void 0,history:!f||e.source?t:void 0,actions:f?L:[],activities:f?b:t?t.activities:{},events:[],configuration:h,transitions:e.transitions,children:R,done:p,tags:O$(h),machine:this}),D=n!==E;N.changed=o.name===$S||D;var I=N.history;I&&delete I.history;var P=!p&&(this._transient||d.some((function(e){return e._transient})));if(!(u||P&&o.name!==J$))return N;var z=N;if(!p)for(P&&(z=this.resolveRaisedTransition(z,{type:bS},o,r));O.length;){var V=O.shift();z=this.resolveRaisedTransition(z,V._event,o,r)}var B=z.changed||(I?!!z.actions.length||D||typeof I.value!=typeof z.value||!L$(z.value,I.value):void 0);return z.changed=B,z.history=I,z},e.prototype.getStateNode=function(e){if(Q$(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=Q$(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&Q$(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=RS(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||Y$;switch(this.type){case"parallel":return IS(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):Y$}));case"compound":if(JS(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?IS(e,(function(e,t){return e?n.getStateNode(t).resolve(e):Y$})):this.initialStateValue||{};default:return e||Y$}},e.prototype.getResolvedPath=function(e){if(Q$(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return RS(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=PS(this.states,(function(e){return e.initialStateValue||Y$}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=x$(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=JS(t.target)&&Q$(t.target)?DS(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return x$(this)?[this]:"compound"!==this.type||this.initial?BS(VS(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):(OS||KS(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this])},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=dS(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if("history"===o.type)return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:PS(this.states,(function(t,n){if(!e)return t.historyValue();var r=JS(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?BS(VS(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var o,i,s=(o=n.path,i="states",function(e){var t,n,r=e;try{for(var s=cS(o),a=s.next();!a.done;a=s.next()){var l=a.value;r=r[i][l]}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return r})(e).current;return JS(s)?[n.getStateNode(s)]:BS(VS(s).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=BS(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var o=this.states,i=new Set(this.ownEvents);if(o)try{for(var s=cS(Object.keys(o)),a=s.next();!a.done;a=s.next()){var l=o[a.value];if(l.states)try{for(var c=(n=void 0,cS(l.events)),d=c.next();!d.done;d=c.next()){var u=d.value;i.add("".concat(u))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!JS(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return _S(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return JS(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,i=this.resolveTarget(n),s=aS(aS({},e),{actions:u$(_S(e.actions)),cond:XS(e.cond,o),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return aS(aS({},s),{target:s.target?s.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return s},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,i=X$,s=o[i],a=void 0===s?[]:s,l=lS(o,["*"]);n=BS(Object.keys(l).map((function(e){OS||e!==J$||KS(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(r.id,'".'));var t=n$(e,l[e]);return OS||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&(JS(e.target)||QS(e.target))})),o=t===J$?"the transient event":"event '".concat(t,"'");KS(!r,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(r,e,t),t})).concat(n$(X$,a)))}else n=[];var c=this.config.always?n$("",this.config.always):[],d=this.config.onDone?n$(String(p$(this.id)),this.config.onDone):[];OS||KS(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var u=BS(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,uS([],dS(n$(String(f$(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,uS([],dS(n$(String(m$(e.id)),e.onError)),!1)),t}))),h=this.after,p=BS(uS(uS(uS(uS([],dS(d),!1),dS(u),!1),dS(n),!1),dS(c),!1).map((function(e){return _S(e).map((function(e){return r.formatTransition(e)}))})));try{for(var f=cS(h),m=f.next();!m.done;m=f.next()){var g=m.value;p.push(g)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}return p},e}();var tj,nj=function(e){return{type:vS,assignment:e}};!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(tj||(tj={}));var rj="undefined"!=typeof document?n.useLayoutEffect:function(){};function oj(e){var t=l.useRef();return t.current||(t.current={v:e()}),t.current.v}var ij=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},sj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var aj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},lj=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};function cj(e,t){(0,e.exec)(t.context,t._event.data,{action:e,state:t,_event:t._event})()}function dj(e){var t=n.useRef([]),r=n.useRef([]);rj((function(){var n=e.subscribe((function(e){var n,o;if(e.actions.length){var i=e.actions.filter((function(e){return"function"==typeof e.exec&&"__effect"in e.exec})),s=aj(function(e,t){var n,r,o=ij([[],[]],2),i=o[0],s=o[1];try{for(var a=sj(e),l=a.next();!l.done;l=a.next()){var c=l.value;t(c)?i.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return[i,s]}(i,(function(e){return e.exec.__effect===tj.Effect})),2),a=s[0],l=s[1];(n=t.current).push.apply(n,lj([],aj(a.map((function(t){return[t,e]}))),!1)),(o=r.current).push.apply(o,lj([],aj(l.map((function(t){return[t,e]}))),!1))}}));return function(){n.unsubscribe()}}),[]),rj((function(){for(;r.current.length;){var e=aj(r.current.shift(),2);cj(e[0],e[1])}})),n.useEffect((function(){for(;t.current.length;){var e=aj(t.current.shift(),2);cj(e[0],e[1])}}))}var uj=function(){return uj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},uj.apply(this,arguments)},hj=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},pj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};var fj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s};function mj(e,t){void 0===t&&(t={});var r=n.useCallback((function(e){var t=void 0===e.changed&&Object.keys(e.children).length;(e.changed||t)&&a(e)}),[]),o=function(e,t,r){void 0===t&&(t={});var o=oj((function(){return"function"==typeof e?e():e}));if("production"!==process.env.NODE_ENV&&"function"!=typeof e){var i=pj(n.useState(o),1)[0];e!==i&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var s=t.context,a=t.guards,l=t.actions,c=t.activities,d=t.services,u=t.delays,h=t.state,p=hj(t,["context","guards","actions","activities","services","delays","state"]),f=oj((function(){var e={context:s,guards:a,actions:l,activities:c,services:d,delays:u};return K$(o.withConfig(e,(function(){return uj(uj({},o.context),s)})),uj({deferEvents:!0},p))}));return rj((function(){var e;return r&&(e=f.subscribe(function(e){if("object"==typeof e)return e;var t=function(){};return{next:e,error:void 0||t,complete:void 0||t}}(r))),function(){null==e||e.unsubscribe()}}),[r]),rj((function(){return f.start(h?A$.create(h):void 0),function(){f.stop()}}),[]),rj((function(){Object.assign(f.machine.options.actions,l),Object.assign(f.machine.options.guards,a),Object.assign(f.machine.options.activities,c),Object.assign(f.machine.options.services,d),Object.assign(f.machine.options.delays,u)}),[l,a,c,d,u]),dj(f),f}(e,t,r),i=fj(n.useState((function(){var e=o.machine.initialState;return t.state?A$.create(t.state):e})),2),s=i[0],a=i[1];return[s,o.send,o]}function gj(){return gj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gj.apply(null,arguments)}function bj(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}const vj={arr:Array.isArray,obj:e=>"[object Object]"===Object.prototype.toString.call(e),fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,nul:e=>null===e,set:e=>e instanceof Set,map:e=>e instanceof Map,equ(e,t){if(typeof e!=typeof t)return!1;if(vj.str(e)||vj.num(e))return e===t;if(vj.obj(e)&&vj.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!vj.und(n)||e===t}};function yj(e,t){return vj.und(e)||vj.nul(e)?t:e}function xj(e){return vj.und(e)?[]:vj.arr(e)?e:[e]}function wj(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return vj.fun(e)?e(...n):e}function Cj(e){const t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,bj(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(vj.und(t))return gj({to:t},e);const n=Object.keys(e).reduce(((n,r)=>vj.und(t[r])?gj({},n,{[r]:e[r]}):n),{});return gj({to:t},n)}class kj{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){0===this.children.length&&this.attach(),this.children.push(e)}removeChild(e){const t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()}}class Sj extends kj{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach((e=>e instanceof kj&&e.addChild(this))),this.detach=()=>this.payload.forEach((e=>e instanceof kj&&e.removeChild(this)))}}class $j extends kj{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach((e=>e instanceof kj&&e.addChild(this))),this.detach=()=>Object.values(this.payload).forEach((e=>e instanceof kj&&e.removeChild(this)))}getValue(e){void 0===e&&(e=!1);const t={};for(const n in this.payload){const r=this.payload[n];(!e||r instanceof kj)&&(t[n]=r instanceof kj?r[e?"getAnimatedValue":"getValue"]():r)}return t}getAnimatedValue(){return this.getValue(!0)}}let jj,Mj;let Ej,Tj=e=>"undefined"!=typeof window?window.requestAnimationFrame(e):-1;let Oj,Lj=()=>Date.now();class Aj extends $j{constructor(e,t){super(),this.update=void 0,this.payload=e.style?gj({},e,{style:Oj(e.style)}):e,this.update=t,this.attach()}}let Rj=!1;const Nj=new Set,Dj=()=>{if(!Rj)return!1;let e=Lj();for(let t of Nj){let n=!1;for(let r=0;r<t.configs.length;r++){let o,i,s=t.configs[r];for(let t=0;t<s.animatedValues.length;t++){let r=s.animatedValues[t];if(r.done)continue;let a=s.fromValues[t],l=s.toValues[t],c=r.lastPosition,d=l instanceof kj,u=Array.isArray(s.initialVelocity)?s.initialVelocity[t]:s.initialVelocity;if(d&&(l=l.getValue()),s.immediate)r.setValue(l),r.done=!0;else if("string"!=typeof a&&"string"!=typeof l){if(void 0!==s.duration)c=a+s.easing((e-r.startTime)/s.duration)*(l-a),o=e>=r.startTime+s.duration;else if(s.decay)c=a+u/(1-.998)*(1-Math.exp(-.0020000000000000018*(e-r.startTime))),o=Math.abs(r.lastPosition-c)<.1,o&&(l=c);else{i=void 0!==r.lastTime?r.lastTime:e,u=void 0!==r.lastVelocity?r.lastVelocity:s.initialVelocity,e>i+64&&(i=e);let t=Math.floor(e-i);for(let e=0;e<t;++e){u+=1*((-s.tension*(c-l)+-s.friction*u)/s.mass)/1e3,c+=1*u/1e3}let n=!(!s.clamp||0===s.tension)&&(a<l?c>l:c<l),d=Math.abs(u)<=s.precision,h=0===s.tension||Math.abs(l-c)<=s.precision;o=n||d&&h,r.lastVelocity=u,r.lastTime=e}d&&!s.toValues[t].done&&(o=!1),o?(r.value!==l&&(c=l),r.done=!0):n=!0,r.setValue(c),r.lastPosition=c}else r.setValue(l),r.done=!0}t.props.onFrame&&(t.values[s.name]=s.interpolation.getValue())}t.props.onFrame&&t.props.onFrame(t.values),n||(Nj.delete(t),t.stop(!0))}return Nj.size?Tj(Dj):Rj=!1,Rj};function Ij(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return Ij({range:e,output:t,extrapolate:n});if(Ej&&"string"==typeof e.output[0])return Ej(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,s,a,l){let c=l?l(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===a)return c;"clamp"===a&&(c=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=i(c),r===-1/0?c=-c:o===1/0?c+=r:c=c*(o-r)+r;return c}(e,i[t],i[t+1],o[t],o[t+1],l,s,a,r.map)}}class Pj extends Sj{constructor(e,t,n,r){super(),this.calc=void 0,this.payload=e instanceof Sj&&!(e instanceof Pj)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Ij(t,n,r)}getValue(){return this.calc(...this.payload.map((e=>e.getValue())))}updateConfig(e,t,n){this.calc=Ij(e,t,n)}interpolate(e,t,n){return new Pj(this,e,t,n)}}const zj=(e,t,n)=>e&&new Pj(e,t,n);function Vj(e,t){"update"in e?t.add(e):e.getChildren().forEach((e=>Vj(e,t)))}class Bj extends kj{constructor(e){var t;super(),t=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(e,n){void 0===n&&(n=!0),t.value=e,n&&t.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){0===this.animatedStyles.size&&Vj(this,this.animatedStyles),this.animatedStyles.forEach((e=>e.update()))}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,t,n){return new Pj(this,e,t,n)}}class Hj extends Sj{constructor(e){super(),this.payload=e.map((e=>new Bj(e)))}setValue(e,t){void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach(((e,n)=>this.payload[n].setValue(e,t))):this.payload.forEach((n=>n.setValue(e,t)))}getValue(){return this.payload.map((e=>e.getValue()))}interpolate(e,t){return new Pj(this,e,t)}}let _j=0,Fj=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=_j++}update(e){if(!e)return this;const t=Cj(e),n=t.delay,r=void 0===n?0:n,o=t.to,i=bj(t,["delay","to"]);if(vj.arr(o)||vj.fun(o))this.queue.push(gj({},i,{delay:r,to:o}));else if(o){let e={};Object.entries(o).forEach((t=>{let n=t[0],o=t[1];const s=gj({to:{[n]:o},delay:wj(r,n)},i),a=e[s.delay]&&e[s.delay].to;e[s.delay]=gj({},e[s.delay],s,{to:gj({},a,s.to)})})),this.queue=Object.values(e)}return this.queue=this.queue.sort(((e,t)=>e.delay-t.delay)),this.diff(i),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((e=>{let t=e.from,n=void 0===t?{}:t,r=e.to,o=void 0===r?{}:r;vj.obj(n)&&(this.merged=gj({},n,this.merged)),vj.obj(o)&&(this.merged=gj({},this.merged,o))}));const t=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach(((r,o)=>{let i=r.delay,s=bj(r,["delay"]);const a=r=>{o===n.length-1&&t===this.guid&&r&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let l=vj.arr(s.to)||vj.fun(s.to);i?setTimeout((()=>{t===this.guid&&(l?this.runAsync(s,a):this.diff(s).start(a))}),i):l?this.runAsync(s,a):this.diff(s).start(a)}))}else vj.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,Nj.has(t)||Nj.add(t),Rj||(Rj=!0,Tj(Dj));var t;return this}stop(e){return this.listeners.forEach((t=>t(e))),this.listeners=[],this}pause(e){var t;return this.stop(!0),e&&(t=this,Nj.has(t)&&Nj.delete(t)),this}runAsync(e,t){var n=this;e.delay;let r=bj(e,["delay"]);const o=this.local;let i=Promise.resolve(void 0);if(vj.arr(r.to))for(let e=0;e<r.to.length;e++){const t=e,n=gj({},r,Cj(r.to[t]));vj.arr(n.config)&&(n.config=n.config[t]),i=i.then((()=>{if(o===this.guid)return new Promise((e=>this.diff(n).start(e)))}))}else if(vj.fun(r.to)){let e,t=0;i=i.then((()=>r.to((n=>{const i=gj({},r,Cj(n));if(vj.arr(i.config)&&(i.config=i.config[t]),t++,o===this.guid)return e=new Promise((e=>this.diff(i).start(e)))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((()=>e))))}i.then(t)}diff(e){this.props=gj({},this.props,e);let t=this.props,n=t.from,r=void 0===n?{}:n,o=t.to,i=void 0===o?{}:o,s=t.config,a=void 0===s?{}:s,l=t.reverse,c=t.attach,d=t.reset,u=t.immediate;if(l){var h=[i,r];r=h[0],i=h[1]}this.merged=gj({},r,this.merged,i),this.hasChanged=!1;let p=c&&c(this);if(this.animations=Object.entries(this.merged).reduce(((e,t)=>{let n=t[0],o=t[1],i=e[n]||{};const s=vj.num(o),l=vj.str(o)&&!o.startsWith("#")&&!/\d/.test(o)&&!Mj[o],c=vj.arr(o),h=!s&&!c&&!l;let f=vj.und(r[n])?o:r[n],m=s||c||l?o:1,g=wj(a,n);p&&(m=p.animations[n].parent);let b,v=i.parent,y=i.interpolation,x=xj(p?m.getPayload():m),w=o;h&&(w=Ej({range:[0,1],output:[o,o]})(1));let C=y&&y.getValue();const k=!vj.und(v)&&i.animatedValues.some((e=>!e.done)),S=!vj.equ(w,C),$=!vj.equ(w,i.previous),j=!vj.equ(g,i.config);if(d||$&&S||j){if(s||l)v=y=i.parent||new Bj(f);else if(c)v=y=i.parent||new Hj(f);else if(h){let e=i.interpolation&&i.interpolation.calc(i.parent.value);e=void 0===e||d?f:e,i.parent?(v=i.parent,v.setValue(0,!1)):v=new Bj(0);const t={output:[e,o]};i.interpolation?(y=i.interpolation,i.interpolation.updateConfig(t)):y=v.interpolate(t)}return x=xj(p?m.getPayload():m),b=xj(v.getPayload()),d&&!h&&v.setValue(f,!1),this.hasChanged=!0,b.forEach((e=>{e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=k?e.lastVelocity:void 0,e.lastTime=k?e.lastTime:void 0,e.startTime=Lj(),e.done=!1,e.animatedStyles.clear()})),wj(u,n)&&v.setValue(h?m:o,!1),gj({},e,{[n]:gj({},i,{name:n,parent:v,interpolation:y,animatedValues:b,toValues:x,previous:w,config:g,fromValues:xj(v.getValue()),immediate:wj(u,n),initialVelocity:yj(g.velocity,0),clamp:yj(g.clamp,!1),precision:yj(g.precision,.01),tension:yj(g.tension,170),friction:yj(g.friction,26),mass:yj(g.mass,1),duration:g.duration,easing:yj(g.easing,(e=>e)),decay:g.decay})})}return S?e:(h&&(v.setValue(1,!1),y.updateConfig({output:[w,w]})),v.done=!0,this.hasChanged=!0,gj({},e,{[n]:gj({},e[n],{previous:w})}))}),this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let e in this.animations)this.interpolations[e]=this.animations[e].interpolation,this.values[e]=this.animations[e].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const qj=e=>{const t=vj.fun(e),r=((e,t)=>{const r=n.useRef(!1),o=n.useRef(),i=vj.fun(t),s=n.useMemo((()=>{let n;return o.current&&(o.current.map((e=>e.destroy())),o.current=void 0),[new Array(e).fill().map(((e,r)=>{const o=new Fj,s=i?wj(t,r,o):t[r];return 0===r&&(n=s.ref),o.update(s),n||o.start(),o})),n]}),[e]),a=s[0],l=s[1];o.current=a,n.useImperativeHandle(l,(()=>({start:()=>Promise.all(o.current.map((e=>new Promise((t=>e.start(t)))))),stop:e=>o.current.forEach((t=>t.stop(e))),get controllers(){return o.current}})));const c=n.useMemo((()=>e=>o.current.map(((t,n)=>{t.update(i?wj(e,n,t):e[n]),l||t.start()}))),[e]);n.useEffect((()=>{r.current?i||c(t):l||o.current.forEach((e=>e.start()))})),n.useEffect((()=>(r.current=!0,()=>o.current.forEach((e=>e.destroy())))),[]);const d=o.current.map((e=>e.getValues()));return i?[d,c,e=>o.current.forEach((t=>t.pause(e)))]:d})(1,t?e:[e]),o=r[0],i=r[1],s=r[2];return t?[o[0],i,s]:o};class Wj extends $j{constructor(e){void 0===e&&(e={}),super(),!e.transform||e.transform instanceof kj||(e=jj.transform(e)),this.payload=e}}const Uj={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Kj="[-+]?\\d*\\.?\\d+",Gj=Kj+"%";function Zj(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}const Jj=new RegExp("rgb"+Zj(Kj,Kj,Kj)),Xj=new RegExp("rgba"+Zj(Kj,Kj,Kj,Kj)),Yj=new RegExp("hsl"+Zj(Kj,Gj,Gj)),Qj=new RegExp("hsla"+Zj(Kj,Gj,Gj,Kj)),eM=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,tM=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,nM=/^#([0-9a-fA-F]{6})$/,rM=/^#([0-9a-fA-F]{8})$/;function oM(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iM(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=oM(o,r,e+1/3),s=oM(o,r,e),a=oM(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function sM(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function aM(e){return(parseFloat(e)%360+360)%360/360}function lM(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function cM(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function dM(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=nM.exec(e))?parseInt(t[1]+"ff",16)>>>0:Uj.hasOwnProperty(e)?Uj[e]:(t=Jj.exec(e))?(sM(t[1])<<24|sM(t[2])<<16|sM(t[3])<<8|255)>>>0:(t=Xj.exec(e))?(sM(t[1])<<24|sM(t[2])<<16|sM(t[3])<<8|lM(t[4]))>>>0:(t=eM.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=rM.exec(e))?parseInt(t[1],16)>>>0:(t=tM.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Yj.exec(e))?(255|iM(aM(t[1]),cM(t[2]),cM(t[3])))>>>0:(t=Qj.exec(e))?(iM(aM(t[1]),cM(t[2]),cM(t[3]))|lM(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const uM=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,hM=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,pM=new RegExp(`(${Object.keys(Uj).join("|")})`,"g");let fM={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const mM=["Webkit","Ms","Moz","O"];function gM(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fM.hasOwnProperty(e)&&fM[e]?(""+t).trim():t+"px"}fM=Object.keys(fM).reduce(((e,t)=>(mM.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),fM);const bM={};var vM,yM;vM=e=>new Wj(e),Oj=vM,yM=e=>{const t=e.output.map((e=>e.replace(hM,dM))).map((e=>e.replace(pM,dM))),n=t[0].match(uM).map((()=>[]));t.forEach((e=>{e.match(uM).forEach(((e,t)=>n[t].push(+e)))}));const r=t[0].match(uM).map(((t,r)=>Ij(gj({},e,{output:n[r]}))));return e=>{let n=0;return t[0].replace(uM,(()=>r[n++](e))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`))}},Ej=yM,Mj=Uj,function(e,t){jj={fn:e,transform:t}}(((e,t)=>{if(!e.nodeType||void 0===e.setAttribute)return!1;{const o=t.style,i=t.children,s=t.scrollTop,a=t.scrollLeft,l=bj(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;void 0!==s&&(e.scrollTop=s),void 0!==a&&(e.scrollLeft=a),void 0!==i&&(e.textContent=i);for(let t in o)if(o.hasOwnProperty(t)){var n=0===t.indexOf("--"),r=gM(t,o[t],n);"float"===t&&(t="cssFloat"),n?e.style.setProperty(t,r):e.style[t]=r}for(let t in l){const n=c?t:bM[t]||(bM[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())));void 0!==e.getAttribute(n)&&e.setAttribute(n,l[t])}}}),(e=>e));var xM;const wM=(xM=e=>n.forwardRef(((t,r)=>{const o=function(){const e=n.useState(!1)[1];return n.useCallback((()=>e((e=>!e))),[])}(),i=n.useRef(!0),s=n.useRef(null),a=n.useRef(null),l=n.useCallback((e=>{const t=s.current;s.current=new Aj(e,(()=>{let e=!1;a.current&&(e=jj.fn(a.current,s.current.getAnimatedValue())),a.current&&!1!==e||o()})),t&&t.detach()}),[]);n.useEffect((()=>()=>{i.current=!1,s.current&&s.current.detach()}),[]),n.useImperativeHandle(r,(()=>(e=>e.current)(a))),l(t);const c=s.current.getValue();c.scrollTop,c.scrollLeft;const d=bj(c,["scrollTop","scrollLeft"]),u=(h=e,!vj.fun(h)||h.prototype instanceof n.Component?e=>a.current=function(e,t){return t&&(vj.fun(t)?t(e):vj.obj(t)&&(t.current=e)),e}(e,r):void 0);var h;return n.createElement(e,gj({},d,{ref:u}))})),e=>(vj.arr(e)?e:Object.keys(e)).reduce(((e,t)=>{const n=t;return e[n]=xM(n),e}),xM))(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);function CM(e,t){return e.map((function(e,n){return e+t[n]}))}function kM(e,t){return e.map((function(e,n){return e-t[n]}))}function SM(e){return Math.hypot.apply(Math,e)}function $M(e){return Math.sign?Math.sign(e):Number(e>0)-Number(e<0)||+e}function jM(e,t,n){return 0===t||Math.abs(t)===1/0?function(e,t){return Math.pow(e,5*t)}(e,n):e*t*n/(t+n*e)}function MM(e,t,n,r){return void 0===r&&(r=.15),0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-jM(t-e,n-t,r)+t:e>n?+jM(e-n,n-t,r)+n:e}function EM(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function TM(){return TM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},TM.apply(this,arguments)}function OM(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function LM(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function AM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RM(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return AM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AM(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function NM(){}function DM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?NM:1===t.length?t[0]:function(){for(var e,n,r=RM(t);!(n=r()).done;){e=n.value.apply(this,arguments)||e}return e}}function IM(e,t){if(void 0===e){if(void 0===t)throw new Error("Must define fallback value if undefined is expected");e=t}return Array.isArray(e)?e:[e,e]}function PM(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}return e}function zM(e,t){void 0===e&&(e={});for(var n={},r=0,o=Object.entries(t);r<o.length;r++){var i=o[r],s=i[0],a=i[1];switch(typeof a){case"function":n[s]=a.call(n,e[s],s,e);break;case"object":n[s]=zM(e[s],a);break;case"boolean":a&&(n[s]=e[s])}}return n}var VM=TM({},{threshold:function(e){return void 0===e&&(e=0),IM(e)},rubberband:function(e){switch(void 0===e&&(e=0),e){case!0:return IM(.15);case!1:return IM(0);default:return IM(e)}},enabled:function(e){return void 0===e&&(e=!0),e},triggerAllEvents:function(e){return void 0===e&&(e=!1),e},initial:function(e){return void 0===e&&(e=0),"function"==typeof e?e:IM(e)}},{axis:!0,lockDirection:function(e){return void 0===e&&(e=!1),e},bounds:function(e){if(void 0===e&&(e={}),"function"==typeof e)return function(t){return VM.bounds(e(t))};var t=e,n=t.left,r=void 0===n?-1/0:n,o=t.right,i=void 0===o?1/0:o,s=t.top,a=void 0===s?-1/0:s,l=t.bottom;return[[r,i],[a,void 0===l?1/0:l]]}}),BM="undefined"!=typeof window&&window.document&&window.document.createElement,HM={enabled:function(e){return void 0===e&&(e=!0),e},domTarget:!0,window:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return void 0===e&&(e=BM?window:void 0),e})),eventOptions:function(e){var t=void 0===e?{}:e,n=t.passive,r=void 0===n||n,o=t.capture;return{passive:r,capture:void 0!==o&&o}}},_M=TM({},VM,{threshold:function(e,t,n){var r=n.filterTaps,o=void 0!==r&&r,i=n.lockDirection,s=void 0!==i&&i,a=n.axis,l=IM(e,o?3:s||(void 0===a?void 0:a)?1:0);return this.filterTaps=o||l[0]+l[1]>0,l},swipeVelocity:function(e){return void 0===e&&(e=.5),IM(e)},swipeDistance:function(e){return void 0===e&&(e=60),IM(e)},delay:function(e){switch(void 0===e&&(e=0),e){case!0:return 180;case!1:return 0;default:return e}}});function FM(e){var t=e.domTarget,n=e.eventOptions,r=e.window,o=e.enabled,i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["domTarget","eventOptions","window","enabled"]),s=function(e){return void 0===e&&(e={}),zM(e,HM)}({domTarget:t,eventOptions:n,window:r,enabled:o});return s.drag=function(e){return void 0===e&&(e={}),zM(e,_M)}(i),s}function qM(e){return TM({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:NM,canceled:!1,memo:void 0,args:void 0},e)}function WM(){return{shared:{hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},drag:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),pinch:qM({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),wheel:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),move:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),scroll:qM({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0})}}var UM=new Map,KM=function(){function e(e,t){var n=this;void 0===t&&(t=[]),this.controller=e,this.args=t,this.debounced=!0,this.setTimeout=function(e,t){var r;void 0===t&&(t=140),clearTimeout(n.controller.timeouts[n.stateKey]);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];n.controller.timeouts[n.stateKey]=(r=window).setTimeout.apply(r,[e,t].concat(i))},this.clearTimeout=function(){clearTimeout(n.controller.timeouts[n.stateKey])},this.fireGestureHandler=function(e){if(void 0===e&&(e=!1),n.state._blocked)return n.debounced||(n.state._active=!1,n.clean()),null;if(!e&&!n.state.intentional&&!n.config.triggerAllEvents)return null;if(n.state.intentional){var t=n.state.active,r=n.state._active;n.state.active=r,n.state.first=r&&!t,n.state.last=t&&!r,n.controller.state.shared[n.ingKey]=r}var o=TM({},n.controller.state.shared,n.state,n.mapStateValues(n.state)),i=n.handler(o);return n.state.memo=void 0!==i?i:n.state.memo,n.state._active||n.clean(),o}}var t=e.prototype;return t.updateSharedState=function(e){Object.assign(this.controller.state.shared,e)},t.updateGestureState=function(e){Object.assign(this.state,e)},t.checkIntentionality=function(e,t){return{_intentional:e,_blocked:!1}},t.getMovement=function(e){var t=this.config,n=t.initial,r=t.bounds,o=t.rubberband,i=t.threshold,s=this.state,a=s._bounds,l=s._initial,c=s._active,d=s._intentional,u=s.lastOffset,h=s.movement,p=this.getInternalMovement(e,this.state),f=!1===d[0]?GM(p[0],i[0]):d[0],m=!1===d[1]?GM(p[1],i[1]):d[1],g=this.checkIntentionality([f,m],p);if(g._blocked)return TM({},g,{_movement:p,delta:[0,0]});var b,v,y,x,w=g._intentional,C=p;(!1!==w[0]&&!1===d[0]&&(v=PM(n,this.state),b=PM(r,this.state),l[0]=v[0],a[0]=b[0]),!1!==w[1]&&!1===d[1])&&(v=null!=(y=v)?y:PM(n,this.state),b=null!=(x=b)?x:PM(r,this.state),l[1]=v[1],a[1]=b[1]);var k=[!1!==w[0]?p[0]-w[0]:l[0],!1!==w[1]?p[1]-w[1]:l[1]],S=CM(k,u),$=c?o:[0,0];return k=ZM(a,CM(k,l),$),TM({},g,{intentional:!1!==w[0]||!1!==w[1],_initial:l,_movement:C,movement:k,values:e,offset:ZM(a,S,$),delta:kM(k,h)})},t.clean=function(){this.clearTimeout()},EM(e,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),e}();function GM(e,t){return Math.abs(e)>=t&&$M(e)*t}function ZM(e,t,n){var r=t[0],o=t[1],i=n[0],s=n[1],a=e[0],l=a[0],c=a[1],d=e[1],u=d[0],h=d[1];return[MM(r,l,c,i),MM(o,u,h,s)]}function JM(e,t,n){var r=e.state,o=e.args,i=t.timeStamp,s=t.type,a=r.values;return{_lastEventType:s,event:t,timeStamp:i,elapsedTime:n?0:i-r.startTime,args:o,previous:a}}function XM(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return e.call.apply(e,[this,TM({},t,{event:n})].concat(o))}}var YM=function(e){var t=this;this.classes=e,this.bind=function(){for(var e={},n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i,s=RM(t.classes);!(i=s()).done;){new(0,i.value)(t,r).addBindings(e)}for(var a=0,l=Object.entries(t.nativeRefs);a<l.length;a++){var c=l[a];tE(e,c[0],XM(c[1],TM({},t.state.shared,{args:r})))}return t.config.domTarget?function(e,t){var n=e.config,r=e.domListeners,o=eE(n);if(!o)throw new Error("domTarget must be defined");var i=n.eventOptions;rE(o,QM(r),i);for(var s=0,a=Object.entries(t);s<a.length;s++){var l=a[s],c=l[0],d=l[1],u=c.slice(2).toLowerCase();r.push([u,DM.apply(void 0,d)])}nE(o,r,i)}(t,e):function(e,t){for(var n=e.config,r={},o=n.eventOptions.capture?"Capture":"",i=0,s=Object.entries(t);i<s.length;i++){var a=s[i],l=a[0],c=a[1],d=Array.isArray(c)?c:[c];r[l+o]=DM.apply(void 0,d)}return r}(t,e)},this.effect=function(){return t.config.domTarget&&t.bind(),t.clean},this.clean=function(){var e=eE(t.config),n=t.config.eventOptions;e&&rE(e,QM(t.domListeners),n),Object.values(t.timeouts).forEach(clearTimeout),function(e){var t=e.config,n=t.window,r=t.eventOptions,o=e.windowListeners;if(!n)return;for(var i in o){rE(n,o[i],r)}e.windowListeners={}}(t)},this.state=WM(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function QM(e){return void 0===e&&(e=[]),e.splice(0,e.length)}function eE(e){var t=e.domTarget;return t&&"current"in t?t.current:t}function tE(e,t,n){e[t]||(e[t]=[]),e[t].push(n)}function nE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=RM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.addEventListener(s,a,n)}}function rE(e,t,n){void 0===t&&(t=[]),void 0===n&&(n={});for(var r,o=RM(t);!(r=o()).done;){var i=r.value,s=i[0],a=i[1];e.removeEventListener(s,a,n)}}function oE(e,t,r){void 0===r&&(r={});var o=function(e){var t=new Set;e.drag&&t.add(UM.get("drag"));e.wheel&&t.add(UM.get("wheel"));e.scroll&&t.add(UM.get("scroll"));e.move&&t.add(UM.get("move"));e.pinch&&t.add(UM.get("pinch"));e.hover&&t.add(UM.get("hover"));return t}(e),i=n.useMemo((function(){return new YM(o)}),[]);return i.config=t,i.handlers=e,i.nativeRefs=r,n.useEffect(i.effect,[]),i.config.domTarget?iE:i.bind}function iE(){"development"===process.env.NODE_ENV&&console.warn("Deprecation notice: When the `domTarget` option is specified, you don't need to write `useEffect(bind, [bind])` anymore: event binding is now made handled internally to this lib.\n\nNext version won't return anything when `domTarget` is provided, therefore your code will break if you try to call `useEffect`.")}var sE=function(e){function t(){return e.apply(this,arguments)||this}OM(t,e);var n=t.prototype;return n.getInternalMovement=function(e,t){return kM(e,t.initial)},n.checkIntentionality=function(e,t){if(!1===e[0]&&!1===e[1])return{_intentional:e,axis:this.state.axis};var n=t.map(Math.abs),r=n[0],o=n[1],i=this.state.axis||(r>o?"x":r<o?"y":void 0);return this.config.axis||this.config.lockDirection?i?this.config.axis&&i!==this.config.axis?{_intentional:e,_blocked:!0,axis:i}:(e["x"===i?1:0]=!1,{_intentional:e,_blocked:!1,axis:i}):{_intentional:[!1,!1],_blocked:!1,axis:i}:{_intentional:e,_blocked:!1,axis:i}},n.getKinematics=function(e,t){var n=this.getMovement(e);if(!n._blocked){var r=t.timeStamp-this.state.timeStamp;Object.assign(n,function(e,t,n){var r=SM(t),o=0===r?0:1/r,i=0===n?0:1/n,s=i*r,a=t.map((function(e){return i*e})),l=t.map((function(e){return o*e}));return{velocities:a,velocity:s,distance:SM(e),direction:l}}(n.movement,n.delta,r))}return n},n.mapStateValues=function(e){return{xy:e.values,vxvy:e.velocities}},t}(KM);function aE(e){if("touches"in e){var t=e.targetTouches,n=e.changedTouches;return t.length>0?t:n}return null}function lE(e){var t="buttons"in e?e.buttons:0,n=aE(e),r=n&&n.length||0;return{touches:r,down:r>0||t>0,buttons:t,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey}}function cE(e){var t=aE(e),n=t?t[0]:e;return[n.clientX,n.clientY]}var dE=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).ingKey="dragging",t.stateKey="drag",t.onDragStart=function(e){t.enabled&&!t.state._active&&(!function(e,t,n){var r=e.config,o=e.windowListeners;void 0===n&&(n=[]),r.window&&(rE(r.window,o[t],r.eventOptions),nE(r.window,o[t]=n,r.eventOptions))}(t.controller,t.stateKey,[["pointermove",t.onDragChange],["pointerup",t.onDragEnd],["pointercancel",t.onDragEnd]]),t.updateGestureState({_pointerId:e.pointerId}),t.config.delay>0?(t.state._delayedEvent=!0,"persist"in e&&"function"==typeof e.persist&&e.persist(),t.setTimeout(t.startDrag.bind(LM(t)),t.config.delay,e)):t.startDrag(e))},t.onDragChange=function(e){if(!t.state.canceled&&e.pointerId===t.state._pointerId)if(t.state._active){var n=lE(e);if(n.down){t.updateSharedState(n);var r=cE(e),o=t.getKinematics(r,e),i=JM(LM(t),e),s=t.state._isTap,a=SM(o._movement);s&&a>=3&&(s=!1),t.updateGestureState(TM({},i,o,{_isTap:s})),t.fireGestureHandler()}else t.onDragEnd(e)}else t.state._delayedEvent&&(t.clearTimeout(),t.startDrag(e))},t.onDragEnd=function(e){if(e.pointerId===t.state._pointerId){t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0});var n=t.state._isTap,r=t.state.velocities,o=r[0],i=r[1],s=t.state.movement,a=s[0],l=s[1],c=t.state._intentional,d=c[0],u=c[1],h=t.config.swipeVelocity,p=h[0],f=h[1],m=t.config.swipeDistance,g=m[0],b=m[1],v=TM({},JM(LM(t),e),t.getMovement(t.state.values)),y=[0,0];v.elapsedTime<220&&(!1!==d&&Math.abs(o)>p&&Math.abs(a)>g&&(y[0]=$M(o)),!1!==u&&Math.abs(i)>f&&Math.abs(l)>b&&(y[1]=$M(i))),t.updateGestureState(TM({},v,{tap:n,swipe:y})),t.fireGestureHandler(!0===n)}},t.clean=function(){e.prototype.clean.call(LM(t)),t.state._delayedEvent=!1,function(e,t){var n=e.config,r=e.windowListeners;n.window&&(rE(n.window,r[t],n.eventOptions),delete r[t])}(t.controller,t.stateKey)},t.onCancel=function(){t.state.canceled||(t.updateGestureState({canceled:!0}),t.state._active=!1,t.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame((function(){return t.fireGestureHandler()})))},t.onClick=function(e){t.state._isTap||e.stopPropagation()},t}OM(t,e);var n=t.prototype;return n.startDrag=function(e){var t=cE(e);this.updateSharedState(lE(e)),this.updateGestureState(TM({},function(e,t,n){var r=e.state.offset,o=n.timeStamp;return TM({},WM()[e.stateKey],{_active:!0,values:t,initial:t,offset:r,lastOffset:r,startTime:o})}(this,t,e),JM(this,e,!0),{_pointerId:e.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(t)),this.fireGestureHandler()},n.addBindings=function(e){(tE(e,"onPointerDown",this.onDragStart),this.config.filterTaps)&&tE(e,this.controller.config.eventOptions.capture?"onClick":"onClickCapture",this.onClick)},t}(sE);function uE(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,o,i;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!uE(e[r],t[r]))return!1;return!0}if("function"==typeof Map&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!uE(r.value[1],t.get(r.value[0])))return!1;return!0}if("function"==typeof Set&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if("undefined"!=typeof Element&&e instanceof Element)return!1;for(r=n;0!=r--;)if(!("_owner"===o[r]&&e.$$typeof||uE(e[o[r]],t[o[r]])))return!1;return!0}return e!=e&&t!=t}function hE(e,t){try{return uE(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}function pE(e,t){void 0===t&&(t={}),UM.set("drag",dE);var r=n.useRef();return r.current||(r.current=function(e,t){var n,r,o=[],i=!1;return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}(FM,hE)),oE({drag:e},r.current(t))}
3049
3081
  /*!
3050
3082
  * tabbable 5.3.3
3051
3083
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
3052
- */var hE=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],pE=hE.join(","),fE="undefined"==typeof Element,mE=fE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,gE=!fE&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},bE=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(pE));return t&&mE.call(e,pE)&&r.unshift(e),r=r.filter(n)},vE=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{mE.call(s,pE)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},yE=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},xE=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},wE=function(e){return"INPUT"===e.tagName},CE=function(e){return function(e){return wE(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||gE(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},kE=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},SE=function(e,t){return!(t.disabled||function(e){return wE(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=mE.call(e,"details>summary:first-of-type")?e.parentElement:e;if(mE.call(o,"details:not([open]) *"))return!0;var i=gE(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return kE(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=gE(e);if(l&&!l.shadowRoot&&!0===r(l))return kE(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!mE.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},$E=function(e,t){return!(CE(t)||yE(t)<0||!SE(e,t))},jE=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ME=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=yE(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(xE).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},EE=function(e,t){var n;return n=(t=t||{}).getShadowRoot?vE([e],t.includeContainer,{filter:$E.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:jE}):bE(e,t.includeContainer,$E.bind(null,t)),ME(n)},TE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==mE.call(e,pE)&&$E(t,e)},OE=hE.concat("iframe").join(","),LE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==mE.call(e,OE)&&SE(t,e)};
3084
+ */var fE=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],mE=fE.join(","),gE="undefined"==typeof Element,bE=gE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,vE=!gE&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},yE=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(mE));return t&&bE.call(e,mE)&&r.unshift(e),r=r.filter(n)},xE=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scope:s,candidates:l})}else{bE.call(s,mE)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),d=!r.shadowRootFilter||r.shadowRootFilter(s);if(c&&d){var u=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scope:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},wE=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},CE=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},kE=function(e){return"INPUT"===e.tagName},SE=function(e){return function(e){return kE(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||vE(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},$E=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},jE=function(e,t){return!(t.disabled||function(e){return kE(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=bE.call(e,"details>summary:first-of-type")?e.parentElement:e;if(bE.call(o,"details:not([open]) *"))return!0;var i=vE(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return $E(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,c=vE(e);if(l&&!l.shadowRoot&&!0===r(l))return $E(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!bE.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},ME=function(e,t){return!(SE(t)||wE(t)<0||!jE(e,t))},EE=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},TE=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=wE(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(CE).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},OE=function(e,t){var n;return n=(t=t||{}).getShadowRoot?xE([e],t.includeContainer,{filter:ME.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:EE}):yE(e,t.includeContainer,ME.bind(null,t)),TE(n)},LE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==bE.call(e,mE)&&ME(t,e)},AE=fE.concat("iframe").join(","),RE=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==bE.call(e,AE)&&jE(t,e)};
3053
3085
  /*!
3054
3086
  * focus-trap 6.9.4
3055
3087
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
3056
3088
  */
3057
- function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AE(Object(n),!0).forEach((function(t){NE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function NE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DE,IE=(DE=[],{activateTrap:function(e){if(DE.length>0){var t=DE[DE.length-1];t!==e&&t.pause()}var n=DE.indexOf(e);-1===n||DE.splice(n,1),DE.push(e)},deactivateTrap:function(e){var t=DE.indexOf(e);-1!==t&&DE.splice(t,1),DE.length>0&&DE[DE.length-1].unpause()}}),PE=function(e){return setTimeout(e,0)},zE=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},VE=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},BE=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},HE=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=RE({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=EE(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?vE([t],n.includeContainer,{filter:SE.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):bE(t,n.includeContainer,SE.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return TE(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return TE(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=BE(e);a(t)>=0||(VE(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!LE(t,o.tabbableOptions)}):VE(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=BE(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==VE(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=BE(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=zE(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||LE(t,o.tabbableOptions)&&!TE(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=zE(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||LE(t,o.tabbableOptions)&&!TE(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=BE(e);a(t)>=0||VE(o.clickOutsideDeactivates,e)||VE(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},b=function(){if(i.active)return IE.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?PE((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},v=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),b(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=RE({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,v(),i.active=!1,i.paused=!1,IE.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){PE((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,v()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),b(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var _E=!1;if("undefined"!=typeof window){var FE={get passive(){_E=!0}};window.addEventListener("testPassive",null,FE),window.removeEventListener("testPassive",null,FE)}var qE,WE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),UE=[],KE=!1,GE=-1,ZE=void 0,JE=void 0,XE=function(e){return UE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},YE=function(e){var t=e||window.event;return!!XE(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},QE=function(e,t){if(e){if(!UE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};UE=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(UE),[n]),WE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(GE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-GE;!XE(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?YE(e):e.stopPropagation())}(t,e)},KE||(document.addEventListener("touchmove",YE,_E?{passive:!1}:void 0),KE=!0)):function(e){if(void 0===JE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(JE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===ZE&&(ZE=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},eT=function(e){e?(UE=UE.filter((function(t){return t.targetElement!==e})),WE?(e.ontouchstart=null,e.ontouchmove=null,KE&&0===UE.length&&(document.removeEventListener("touchmove",YE,_E?{passive:!1}:void 0),KE=!1)):UE.length||(void 0!==JE&&(document.body.style.paddingRight=JE,JE=void 0),void 0!==ZE&&(document.body.style.overflow=ZE,ZE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},tT=[],nT="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(qE||(qE={}));var rT,oT=function(e){return Object.freeze(e)},iT=function(e,t){this.inlineSize=e,this.blockSize=t,oT(this)},sT=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,oT(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),aT=function(e){return e instanceof SVGElement&&"getBBox"in e},lT=function(e){if(aT(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},cT=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},dT="undefined"!=typeof window?window:{},uT=new WeakMap,hT=/auto|scroll/,pT=/^tb|vertical/,fT=/msie|trident/i.test(dT.navigator&&dT.navigator.userAgent),mT=function(e){return parseFloat(e||"0")},gT=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new iT((n?t:e)||0,(n?e:t)||0)},bT=oT({devicePixelContentBoxSize:gT(),borderBoxSize:gT(),contentBoxSize:gT(),contentRect:new sT(0,0,0,0)}),vT=function(e,t){if(void 0===t&&(t=!1),uT.has(e)&&!t)return uT.get(e);if(lT(e))return uT.set(e,bT),bT;var n=getComputedStyle(e),r=aT(e)&&e.ownerSVGElement&&e.getBBox(),o=!fT&&"border-box"===n.boxSizing,i=pT.test(n.writingMode||""),s=!r&&hT.test(n.overflowY||""),a=!r&&hT.test(n.overflowX||""),l=r?0:mT(n.paddingTop),c=r?0:mT(n.paddingRight),d=r?0:mT(n.paddingBottom),u=r?0:mT(n.paddingLeft),h=r?0:mT(n.borderTopWidth),p=r?0:mT(n.borderRightWidth),f=r?0:mT(n.borderBottomWidth),m=u+c,g=l+d,b=(r?0:mT(n.borderLeftWidth))+p,v=h+f,y=a?e.offsetHeight-v-e.clientHeight:0,x=s?e.offsetWidth-b-e.clientWidth:0,w=o?m+b:0,C=o?g+v:0,k=r?r.width:mT(n.width)-w-x,S=r?r.height:mT(n.height)-C-y,$=k+m+x+b,j=S+g+y+v,M=oT({devicePixelContentBoxSize:gT(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:gT($,j,i),contentBoxSize:gT(k,S,i),contentRect:new sT(u,l,k,S)});return uT.set(e,M),M},yT=function(e,t,n){var r=vT(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case qE.DEVICE_PIXEL_CONTENT_BOX:return s;case qE.BORDER_BOX:return o;default:return i}},xT=function(e){var t=vT(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=oT([t.borderBoxSize]),this.contentBoxSize=oT([t.contentBoxSize]),this.devicePixelContentBoxSize=oT([t.devicePixelContentBoxSize])},wT=function(e){if(lT(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},CT=function(){var e=1/0,t=[];tT.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new xT(t.target),o=wT(t.target);r.push(n),t.lastReportedSize=yT(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},kT=function(e){tT.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(wT(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},ST=function(){var e=0;for(kT(e);tT.some((function(e){return e.activeTargets.length>0}));)e=CT(),kT(e);return tT.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:nT}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=nT),window.dispatchEvent(e)}(),e>0},$T=[],jT=function(e){if(!rT){var t=0,n=document.createTextNode("");new MutationObserver((function(){return $T.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),rT=function(){n.textContent="".concat(t?t--:t++)}}$T.push(e),rT()},MT=0,ET={attributes:!0,characterData:!0,childList:!0,subtree:!0},TT=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],OT=function(e){return void 0===e&&(e=0),Date.now()+e},LT=!1,AT=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!LT){LT=!0;var n,r=OT(e);n=function(){var n=!1;try{n=ST()}finally{if(LT=!1,e=r-OT(),!MT)return;n?t.run(1e3):e>0?t.run(e):t.start()}},jT((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,ET)};document.body?t():dT.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),TT.forEach((function(t){return dT.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),TT.forEach((function(t){return dT.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),RT=function(e){!MT&&e>0&&AT.start(),!(MT+=e)&&AT.stop()},NT=function(){function e(e,t){this.target=e,this.observedBox=t||qE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=yT(this.target,this.observedBox,!0);return function(e){return!aT(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),DT=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},IT=new WeakMap,PT=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},zT=function(){function e(){}return e.connect=function(e,t){var n=new DT(e,t);IT.set(e,n)},e.observe=function(e,t,n){var r=IT.get(e),o=0===r.observationTargets.length;PT(r.observationTargets,t)<0&&(o&&tT.push(r),r.observationTargets.push(new NT(t,n&&n.box)),RT(1),AT.schedule())},e.unobserve=function(e,t){var n=IT.get(e),r=PT(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&tT.splice(tT.indexOf(n),1),n.observationTargets.splice(r,1),RT(-1))},e.disconnect=function(e){var t=this,n=IT.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),VT=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zT.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cT(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zT.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!cT(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zT.unobserve(this,e)},e.prototype.disconnect=function(){zT.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function BT(){return BT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BT.apply(this,arguments)}function HT(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var _T="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function FT(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function qT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var WT={box:"border-box"};function UT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return _T((function(){if(e.current&&o){var t=new VT(c);return t.observe(e.current,WT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function KT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var GT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},ZT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},JT=function(e,t,n){return void 0===n&&(n=e.context),new Y$(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:BT({},GT,ZT)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:BT({},GT,ZT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:BT({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[ej({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(KT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),XT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],YT=["velocity"],QT=["onRest","config"],eO={tension:170,friction:26},tO=eO.tension,nO=eO.friction,rO=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?iO:f,g=e.snapPoints,b=void 0===g?sO:g,v=e.blocking,y=void 0===v||v,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=HT(e,XT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return BT({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return BT({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=_j((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,QE(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,eT(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=HE(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return qT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),_T((function(){if(e)return a(qT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=UT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=UT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=UT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(qT).reduce((function(e,n){return e.add(FT(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=qT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:b,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);_T((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=HT(n,YT),s=HT(e,QT);return new Promise((function(e){return _(BT({},s,{config:BT({velocity:o},i,{mass:1,tension:tO,friction:Math.max(nO,nO+(nO-nO*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=pj(JT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),_T((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=uE((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,b=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var v=f+b,y=b*g,x=Math.max(le.current,Math.min(ce.current,v+2*y));if(!c&&h&&l>0&&v+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?$M(v,h?0:le.current,ce.current,.55):v<le.current?$M(v,le.current,2*ce.current,.55):$M(v,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var be=function(e){var t,n=e.spring,r=Ij([n.y,n.maxHeight],(function(e,t){return Math.round(FT(t-e,0,16))+"px"})),o=Ij([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return FT(e,t,n)+"px"})),i=Ij([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=Ij([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=Ij([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return FT((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=Ij([n.y,n.minSnap],(function(e,t){return t?FT(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(yM.div,BT({},O,{"data-rsbs-root":!0,"data-rsbs-state":oO.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:BT({},be,C,{opacity:H.ready})}),o,y&&n.createElement("div",BT({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",BT({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",BT({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",BT({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),oO=["closed","opening","open","closing","dragging","snapping","resizing"];function iO(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function sO(e){return e.minHeight}var aO=["onSpringStart","onSpringEnd","skipInitialTransition"],lO=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=HT(e,aO),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");_T((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(nS,{"data-rsbs-portal":!0},n.createElement(rO,BT({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const cO=i.css`
3089
+ function NE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NE(Object(n),!0).forEach((function(t){IE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function IE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var PE,zE=(PE=[],{activateTrap:function(e){if(PE.length>0){var t=PE[PE.length-1];t!==e&&t.pause()}var n=PE.indexOf(e);-1===n||PE.splice(n,1),PE.push(e)},deactivateTrap:function(e){var t=PE.indexOf(e);-1!==t&&PE.splice(t,1),PE.length>0&&PE[PE.length-1].unpause()}}),VE=function(e){return setTimeout(e,0)},BE=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},HE=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},_E=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},FE=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=DE({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},a=function(e){return i.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},c=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(a(r.activeElement)>=0)e=r.activeElement;else{var t=i.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(i.containerGroups=i.containers.map((function(e){var t,n,r=OE(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?xE([t],n.includeContainer,{filter:jE.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):yE(t,n.includeContainer,jE.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return LE(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return LE(e,o.tabbableOptions)}))}}})),i.tabbableGroups=i.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),i.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},u=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(c()))},h=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},p=function(e){var t=_E(e);a(t)>=0||(HE(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!RE(t,o.tabbableOptions)}):HE(o.allowOutsideClick,e)||e.preventDefault())},f=function(e){var t=_E(e),n=a(t)>=0;n||t instanceof Document?n&&(i.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),u(i.mostRecentlyFocusedNode||c()))},m=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==HE(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=_E(e);d();var n=null;if(i.tabbableGroups.length>0){var r=a(t),s=r>=0?i.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var c=BE(i.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(c<0&&(s.container===t||RE(t,o.tabbableOptions)&&!LE(t,o.tabbableOptions)&&!s.nextTabbableNode(t,!1))&&(c=r),c>=0){var h=0===c?i.tabbableGroups.length-1:c-1;n=i.tabbableGroups[h].lastTabbableNode}}else{var p=BE(i.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(p<0&&(s.container===t||RE(t,o.tabbableOptions)&&!LE(t,o.tabbableOptions)&&!s.nextTabbableNode(t))&&(p=r),p>=0){var f=p===i.tabbableGroups.length-1?0:p+1;n=i.tabbableGroups[f].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),u(n))}(e)},g=function(e){var t=_E(e);a(t)>=0||HE(o.clickOutsideDeactivates,e)||HE(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},b=function(){if(i.active)return zE.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?VE((function(){u(c())})):u(c()),r.addEventListener("focusin",f,!0),r.addEventListener("mousedown",p,{capture:!0,passive:!1}),r.addEventListener("touchstart",p,{capture:!0,passive:!1}),r.addEventListener("click",g,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},v=function(){if(i.active)return r.removeEventListener("focusin",f,!0),r.removeEventListener("mousedown",p,!0),r.removeEventListener("touchstart",p,!0),r.removeEventListener("click",g,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return i.active},get paused(){return i.paused},activate:function(e){if(i.active)return this;var t=s(e,"onActivate"),n=s(e,"onPostActivate"),o=s(e,"checkCanFocusTrap");o||d(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&d(),b(),n&&n()};return o?(o(i.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!i.active)return this;var t=DE({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,v(),i.active=!1,i.paused=!1,zE.deactivateTrap(n);var r=s(t,"onDeactivate"),a=s(t,"onPostDeactivate"),l=s(t,"checkCanReturnFocus"),c=s(t,"returnFocus","returnFocusOnDeactivate");r&&r();var d=function(){VE((function(){c&&u(h(i.nodeFocusedBeforeActivation)),a&&a()}))};return c&&l?(l(h(i.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,v()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,d(),b(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return i.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),i.active&&d(),this}}).updateContainerElements(e),n};var qE=!1;if("undefined"!=typeof window){var WE={get passive(){qE=!0}};window.addEventListener("testPassive",null,WE),window.removeEventListener("testPassive",null,WE)}var UE,KE="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),GE=[],ZE=!1,JE=-1,XE=void 0,YE=void 0,QE=function(e){return GE.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},eT=function(e){var t=e||window.event;return!!QE(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},tT=function(e,t){if(e){if(!GE.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};GE=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(GE),[n]),KE?(e.ontouchstart=function(e){1===e.targetTouches.length&&(JE=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-JE;!QE(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?eT(e):e.stopPropagation())}(t,e)},ZE||(document.addEventListener("touchmove",eT,qE?{passive:!1}:void 0),ZE=!0)):function(e){if(void 0===YE){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;t&&n>0&&(YE=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===XE&&(XE=document.body.style.overflow,document.body.style.overflow="hidden")}(t)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},nT=function(e){e?(GE=GE.filter((function(t){return t.targetElement!==e})),KE?(e.ontouchstart=null,e.ontouchmove=null,ZE&&0===GE.length&&(document.removeEventListener("touchmove",eT,qE?{passive:!1}:void 0),ZE=!1)):GE.length||(void 0!==YE&&(document.body.style.paddingRight=YE,YE=void 0),void 0!==XE&&(document.body.style.overflow=XE,XE=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},rT=[],oT="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(UE||(UE={}));var iT,sT=function(e){return Object.freeze(e)},aT=function(e,t){this.inlineSize=e,this.blockSize=t,sT(this)},lT=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,sT(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),cT=function(e){return e instanceof SVGElement&&"getBBox"in e},dT=function(e){if(cT(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e,i=o.offsetWidth,s=o.offsetHeight;return!(i||s||e.getClientRects().length)},uT=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},hT="undefined"!=typeof window?window:{},pT=new WeakMap,fT=/auto|scroll/,mT=/^tb|vertical/,gT=/msie|trident/i.test(hT.navigator&&hT.navigator.userAgent),bT=function(e){return parseFloat(e||"0")},vT=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new aT((n?t:e)||0,(n?e:t)||0)},yT=sT({devicePixelContentBoxSize:vT(),borderBoxSize:vT(),contentBoxSize:vT(),contentRect:new lT(0,0,0,0)}),xT=function(e,t){if(void 0===t&&(t=!1),pT.has(e)&&!t)return pT.get(e);if(dT(e))return pT.set(e,yT),yT;var n=getComputedStyle(e),r=cT(e)&&e.ownerSVGElement&&e.getBBox(),o=!gT&&"border-box"===n.boxSizing,i=mT.test(n.writingMode||""),s=!r&&fT.test(n.overflowY||""),a=!r&&fT.test(n.overflowX||""),l=r?0:bT(n.paddingTop),c=r?0:bT(n.paddingRight),d=r?0:bT(n.paddingBottom),u=r?0:bT(n.paddingLeft),h=r?0:bT(n.borderTopWidth),p=r?0:bT(n.borderRightWidth),f=r?0:bT(n.borderBottomWidth),m=u+c,g=l+d,b=(r?0:bT(n.borderLeftWidth))+p,v=h+f,y=a?e.offsetHeight-v-e.clientHeight:0,x=s?e.offsetWidth-b-e.clientWidth:0,w=o?m+b:0,C=o?g+v:0,k=r?r.width:bT(n.width)-w-x,S=r?r.height:bT(n.height)-C-y,$=k+m+x+b,j=S+g+y+v,M=sT({devicePixelContentBoxSize:vT(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),i),borderBoxSize:vT($,j,i),contentBoxSize:vT(k,S,i),contentRect:new lT(u,l,k,S)});return pT.set(e,M),M},wT=function(e,t,n){var r=xT(e,n),o=r.borderBoxSize,i=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case UE.DEVICE_PIXEL_CONTENT_BOX:return s;case UE.BORDER_BOX:return o;default:return i}},CT=function(e){var t=xT(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=sT([t.borderBoxSize]),this.contentBoxSize=sT([t.contentBoxSize]),this.devicePixelContentBoxSize=sT([t.devicePixelContentBoxSize])},kT=function(e){if(dT(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},ST=function(){var e=1/0,t=[];rT.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new CT(t.target),o=kT(t.target);r.push(n),t.lastReportedSize=wT(t.target,t.observedBox),o<e&&(e=o)})),t.push((function(){n.callback.call(n.observer,r,n.observer)})),n.activeTargets.splice(0,n.activeTargets.length)}}));for(var n=0,r=t;n<r.length;n++){(0,r[n])()}return e},$T=function(e){rT.forEach((function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach((function(n){n.isActive()&&(kT(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},jT=function(){var e=0;for($T(e);rT.some((function(e){return e.activeTargets.length>0}));)e=ST(),$T(e);return rT.some((function(e){return e.skippedTargets.length>0}))&&function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:oT}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=oT),window.dispatchEvent(e)}(),e>0},MT=[],ET=function(e){if(!iT){var t=0,n=document.createTextNode("");new MutationObserver((function(){return MT.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),iT=function(){n.textContent="".concat(t?t--:t++)}}MT.push(e),iT()},TT=0,OT={attributes:!0,characterData:!0,childList:!0,subtree:!0},LT=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],AT=function(e){return void 0===e&&(e=0),Date.now()+e},RT=!1,NT=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!RT){RT=!0;var n,r=AT(e);n=function(){var n=!1;try{n=jT()}finally{if(RT=!1,e=r-AT(),!TT)return;n?t.run(1e3):e>0?t.run(e):t.start()}},ET((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,OT)};document.body?t():hT.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),LT.forEach((function(t){return hT.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),LT.forEach((function(t){return hT.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),DT=function(e){!TT&&e>0&&NT.start(),!(TT+=e)&&NT.stop()},IT=function(){function e(e,t){this.target=e,this.observedBox=t||UE.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=wT(this.target,this.observedBox,!0);return function(e){return!cT(e)&&!function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)&&"inline"===getComputedStyle(e).display}(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),PT=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},zT=new WeakMap,VT=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},BT=function(){function e(){}return e.connect=function(e,t){var n=new PT(e,t);zT.set(e,n)},e.observe=function(e,t,n){var r=zT.get(e),o=0===r.observationTargets.length;VT(r.observationTargets,t)<0&&(o&&rT.push(r),r.observationTargets.push(new IT(t,n&&n.box)),DT(1),NT.schedule())},e.unobserve=function(e,t){var n=zT.get(e),r=VT(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&rT.splice(rT.indexOf(n),1),n.observationTargets.splice(r,1),DT(-1))},e.disconnect=function(e){var t=this,n=zT.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),HT=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");BT.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!uT(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");BT.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!uT(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");BT.unobserve(this,e)},e.prototype.disconnect=function(){BT.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();function _T(){return _T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_T.apply(this,arguments)}function FT(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}var qT="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function WT(e,t,n){return t=(t=+t)==t?t:0,n=(n=+n)==n?n:0,(e=+e)==e&&(e=(e=e<=n?e:n)>=t?e:t),e}function UT(e){var t=Math.round(e);if(Number.isNaN(e))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return t}var KT={box:"border-box"};function GT(e,t){var r=t.label,o=t.enabled,i=t.resizeSourceRef,s=n.useState(0),a=s[0],l=s[1];n.useDebugValue(r+": "+a);var c=n.useCallback((function(e){l(e[0].borderBoxSize[0].blockSize),i.current="element"}),[i]);return qT((function(){if(e.current&&o){var t=new HT(c);return t.observe(e.current,KT),function(){t.disconnect()}}}),[e,c,o]),o?a:0}function ZT(e){return void 0===e&&(e=1e3),new Promise((function(t){return setTimeout(t,e)}))}var JT={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},XT={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},YT=function(e,t,n){return void 0===n&&(n=e.context),new ej(e,t,n)}({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:_T({},JT,XT)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:_T({},JT,XT)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:_T({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[nj({y:function(e,t){return t.payload.y},velocity:function(e,t){return t.payload.velocity},snapSource:function(e,t){var n=t.payload.source;return void 0===n?"custom":n}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(e,t){},onSnapCancel:function(e,t){},onResizeCancel:function(e,t){},onCloseCancel:function(e,t){},onOpenEnd:function(e,t){},onSnapEnd:function(e,t){},onRezizeEnd:function(e,t){}},services:{onSnapStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeStart:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onSnapEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onOpenEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onCloseEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},onResizeEnd:function(){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},renderVisuallyHidden:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},activate:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},deactivate:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},openSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},openImmediately:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},snapSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},resizeSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}},closeSmoothly:function(e,t){try{return Promise.resolve(ZT()).then((function(){}))}catch(e){return Promise.reject(e)}}},guards:{initiallyClosed:function(e){return"CLOSED"===e.initialState},initiallyOpen:function(e){return"OPEN"===e.initialState}}}),QT=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],eO=["velocity"],tO=["onRest","config"],nO={tension:170,friction:26},rO=nO.tension,oO=nO.friction,iO=n.forwardRef((function(e,t){var r=e.children,o=e.sibling,i=e.className,s=e.footer,a=e.header,l=e.open,c=e.initialState,d=e.lastSnapRef,u=e.initialFocusRef,h=e.onDismiss,p=e.maxHeight,f=e.defaultSnap,m=void 0===f?aO:f,g=e.snapPoints,b=void 0===g?lO:g,v=e.blocking,y=void 0===v||v,x=e.scrollLocking,w=void 0===x||x,C=e.style,k=e.onSpringStart,S=e.onSpringCancel,$=e.onSpringEnd,j=e.reserveScrollBarGap,M=void 0===j?y:j,E=e.expandOnContentDrag,T=void 0!==E&&E,O=FT(e,QT),L=function(){var e=n.useState(!1),t=e[0],r=e[1],o=n.useState({}),i=o[0],s=o[1],a=n.useCallback((function(e){return s((function(t){var n;return _T({},t,((n={})[e]=!1,n))})),function(){s((function(t){var n;return _T({},t,((n={})[e]=!0,n))}))}}),[]);return n.useEffect((function(){var e=Object.values(i);0!==e.length&&e.every(Boolean)&&r(!0)}),[i]),{ready:t,registerReady:a}}(),A=L.ready,R=L.registerReady,N=n.useRef(!1),D=n.useRef(k),I=n.useRef(S),P=n.useRef($);n.useEffect((function(){D.current=k,I.current=S,P.current=$}),[S,k,$]);var z,V,B=qj((function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}})),H=B[0],_=B[1],F=n.useRef(null),q=n.useRef(null),W=n.useRef(null),U=n.useRef(null),K=n.useRef(null),G=n.useRef(null),Z=n.useRef(0),J=n.useRef(),X=n.useRef(!1),Y=(z=n.useMemo((function(){return"undefined"!=typeof window?window.matchMedia("(prefers-reduced-motion: reduce)"):null}),[]),V=n.useRef(null==z?void 0:z.matches),n.useDebugValue(V.current?"reduce":"no-preference"),n.useEffect((function(){var e=function(e){V.current=e.matches};return null==z||z.addListener(e),function(){return null==z?void 0:z.removeListener(e)}}),[z]),V),Q=function(e){var t=e.targetRef,r=e.enabled,o=e.reserveScrollBarGap,i=n.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return i.current.deactivate(),void(i.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1;i.current={activate:function(){n||(n=!0,tT(e,{allowTouchMove:function(e){return e.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:o}))},deactivate:function(){n&&(n=!1,nT(e))}}}),[r,t,o]),i}({targetRef:q,enabled:A&&w,reserveScrollBarGap:M}),ee=function(e){var t=e.targetRef,r=e.enabled,o=n.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return n.useDebugValue(r?"Enabled":"Disabled"),n.useEffect((function(){if(!r)return o.current.deactivate(),void(o.current={activate:function(){},deactivate:function(){}});var e=t.current,n=!1,i=[],s=[];o.current={activate:function(){if(!n){n=!0;var t=e.parentNode;document.querySelectorAll("body > *").forEach((function(e){if(e!==t){var n=e.getAttribute("aria-hidden");null!==n&&"false"!==n||(i.push(n),s.push(e),e.setAttribute("aria-hidden","true"))}}))}},deactivate:function(){n&&(n=!1,s.forEach((function(e,t){var n=i[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)})),i=[],s=[])}}}),[t,r]),o}({targetRef:F,enabled:A&&y}),te=function(e){var t=e.targetRef,r=e.fallbackRef,o=e.initialFocusRef,i=e.enabled,s=n.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return n.useDebugValue(i?"Enabled":"Disabled"),n.useEffect((function(){if(!i)return s.current.deactivate(),void(s.current={activate:function(){},deactivate:function(){}});var e=r.current,n=FE(t.current,{onActivate:void 0,initialFocus:o?function(){return(null==o?void 0:o.current)||e}:void 0,fallbackFocus:e,escapeDeactivates:!1,clickOutsideDeactivates:!1}),a=!1;s.current={activate:function(){try{return a?Promise.resolve():(a=!0,Promise.resolve(n.activate()).then((function(){return Promise.resolve(new Promise((function(e){return setTimeout((function(){return e(void 0)}),0)}))).then((function(){}))})))}catch(e){return Promise.reject(e)}},deactivate:function(){a&&(a=!1,n.deactivate())}}}),[i,r,o,t]),s}({targetRef:F,fallbackRef:G,initialFocusRef:u||void 0,enabled:A&&y&&!1!==u}),ne=function(e){var t=e.getSnapPoints,r=e.heightRef,o=e.lastSnapRef,i=e.ready,s=function(e){var t=e.contentRef,r=e.controlledMaxHeight,o=e.footerEnabled,i=e.footerRef,s=e.headerEnabled,a=e.headerRef,l=e.registerReady,c=e.resizeSourceRef,d=n.useMemo((function(){return l("contentHeight")}),[l]),u=function(e,t,r){var o=n.useMemo((function(){return t("maxHeight")}),[t]),i=n.useState((function(){return UT(e)||"undefined"!=typeof window?window.innerHeight:0})),s=i[0],a=i[1],l=s>0,c=n.useRef(0);return n.useDebugValue(e?"controlled":"auto"),n.useEffect((function(){l&&o()}),[l,o]),qT((function(){if(e)return a(UT(e)),void(r.current="maxheightprop");var t=function(){c.current||(c.current=requestAnimationFrame((function(){a(window.innerHeight),r.current="window",c.current=0})))};return window.addEventListener("resize",t),a(window.innerHeight),r.current="window",o(),function(){window.removeEventListener("resize",t),cancelAnimationFrame(c.current)}}),[e,o,r]),s}(r,l,c),h=GT(a,{label:"headerHeight",enabled:s,resizeSourceRef:c}),p=GT(t,{label:"contentHeight",enabled:!0,resizeSourceRef:c}),f=GT(i,{label:"footerHeight",enabled:o,resizeSourceRef:c}),m=Math.min(u-h-f,p)+h+f;n.useDebugValue("minHeight: "+m);var g=p>0;return n.useEffect((function(){g&&d()}),[g,d]),{maxHeight:u,minHeight:m,headerHeight:h,footerHeight:f}}({contentRef:e.contentRef,controlledMaxHeight:e.controlledMaxHeight,footerEnabled:e.footerEnabled,footerRef:e.footerRef,headerEnabled:e.headerEnabled,headerRef:e.headerRef,registerReady:e.registerReady,resizeSourceRef:e.resizeSourceRef}),a=s.maxHeight,l=s.minHeight,c=s.headerHeight,d=s.footerHeight,u=function(e,t){var n=[].concat(e).map(UT).reduce((function(e,n){return e.add(WT(n,0,t)),e}),new Set),r=Array.from(n),o=Math.min.apply(Math,r);if(Number.isNaN(o))throw new TypeError("minSnap is NaN");var i=Math.max.apply(Math,r);if(Number.isNaN(i))throw new TypeError("maxSnap is NaN");return{snapPoints:r,minSnap:o,maxSnap:i}}(i?t({height:r.current,footerHeight:d,headerHeight:c,minHeight:l,maxHeight:a}):[0],a),h=u.snapPoints,p=u.minSnap,f=u.maxSnap;return n.useDebugValue("minSnap: "+p+", maxSnap:"+f),{minSnap:p,maxSnap:f,findSnap:function(e){var t=UT("function"==typeof e?e({footerHeight:d,headerHeight:c,height:r.current,minHeight:l,maxHeight:a,snapPoints:h,lastSnap:o.current}):e);return h.reduce((function(e,n){return Math.abs(n-t)<Math.abs(e-t)?n:e}),p)},maxHeight:a}}({contentRef:W,controlledMaxHeight:p,footerEnabled:!!s,footerRef:K,getSnapPoints:b,headerEnabled:!1!==a,headerRef:U,heightRef:Z,lastSnapRef:d,ready:A,registerReady:R,resizeSourceRef:J}),re=ne.minSnap,oe=ne.maxSnap,ie=ne.maxHeight,se=ne.findSnap,ae=n.useRef(ie),le=n.useRef(re),ce=n.useRef(oe),de=n.useRef(se),ue=n.useRef(0);qT((function(){ae.current=ie,ce.current=oe,le.current=re,de.current=se,ue.current=se(m)}),[se,m,ie,oe,re]);var he=n.useCallback((function(e){var t=e.onRest,n=e.config,r=(n=void 0===n?{}:n).velocity,o=void 0===r?1:r,i=FT(n,eO),s=FT(e,tO);return new Promise((function(e){return _(_T({},s,{config:_T({velocity:o},i,{mass:1,tension:rO,friction:Math.max(oO,oO+(oO-oO*o))}),onRest:function(){var n=[].slice.call(arguments);e.apply(void 0,n),null==t||t.apply(void 0,n)}}))}))}),[_]),pe=mj(YT,{devTools:!1,actions:{onOpenCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"OPEN"})}),[]),onSnapCancel:n.useCallback((function(e){return null==I.current?void 0:I.current({type:"SNAP",source:e.snapSource})}),[]),onCloseCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"CLOSE"})}),[]),onResizeCancel:n.useCallback((function(){return null==I.current?void 0:I.current({type:"RESIZE",source:J.current})}),[]),onOpenEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"OPEN"})}),[]),onSnapEnd:n.useCallback((function(e,t){return null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource})}),[]),onResizeEnd:n.useCallback((function(){return null==P.current?void 0:P.current({type:"RESIZE",source:J.current})}),[])},context:{initialState:c},services:{onSnapStart:n.useCallback((function(e,t){try{return Promise.resolve(null==D.current?void 0:D.current({type:"SNAP",source:t.payload.source||"custom"}))}catch(e){return Promise.reject(e)}}),[]),onOpenStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeStart:n.useCallback((function(){try{return Promise.resolve(null==D.current?void 0:D.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),onSnapEnd:n.useCallback((function(e,t){try{return Promise.resolve(null==P.current?void 0:P.current({type:"SNAP",source:e.snapSource}))}catch(e){return Promise.reject(e)}}),[]),onOpenEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"OPEN"}))}catch(e){return Promise.reject(e)}}),[]),onCloseEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"CLOSE"}))}catch(e){return Promise.reject(e)}}),[]),onResizeEnd:n.useCallback((function(){try{return Promise.resolve(null==P.current?void 0:P.current({type:"RESIZE",source:J.current}))}catch(e){return Promise.reject(e)}}),[]),renderVisuallyHidden:n.useCallback((function(e,t){try{return Promise.resolve(he({y:ue.current,ready:0,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),activate:n.useCallback((function(e,t){try{return N.current=!0,Promise.resolve(Promise.all([Q.current.activate(),te.current.activate(),ee.current.activate()])).then((function(){}))}catch(e){return Promise.reject(e)}}),[ee,te,Q]),deactivate:n.useCallback((function(){try{return Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate(),N.current=!1,Promise.resolve()}catch(e){return Promise.reject(e)}}),[ee,te,Q]),openImmediately:n.useCallback((function(){try{return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he]),openSmoothly:n.useCallback((function(){try{return Promise.resolve(he({y:0,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:!0})).then((function(){return Z.current=ue.current,Promise.resolve(he({y:ue.current,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:ue.current,immediate:Y.current})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y]),snapSmoothly:n.useCallback((function(e,t){try{var n=de.current(e.y);return Z.current=n,d.current=n,Promise.resolve(he({y:n,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:Y.current,config:{velocity:e.velocity}})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),resizeSmoothly:n.useCallback((function(){try{var e=de.current(Z.current);return Z.current=e,d.current=e,Promise.resolve(he({y:e,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:"element"!==J.current||Y.current})).then((function(){}))}catch(e){return Promise.reject(e)}}),[he,d,Y]),closeSmoothly:n.useCallback((function(e,t){try{return he({minSnap:Z.current,immediate:!0}),Z.current=0,Promise.resolve(he({y:0,maxHeight:ae.current,maxSnap:ce.current,immediate:Y.current})).then((function(){return Promise.resolve(he({ready:0,immediate:!0})).then((function(){}))}))}catch(e){return Promise.reject(e)}}),[he,Y])}}),fe=pe[0],me=pe[1];n.useEffect((function(){A&&me(l?"OPEN":"CLOSE")}),[l,me,A]),qT((function(){(ie||oe||re)&&me("RESIZE")}),[ie,oe,re,me]),n.useEffect((function(){return function(){Q.current.deactivate(),te.current.deactivate(),ee.current.deactivate()}}),[ee,te,Q]),n.useImperativeHandle(t,(function(){return{snapTo:function(e,t){var n=void 0===t?{}:t,r=n.velocity,o=void 0===r?1:r,i=n.source,s=void 0===i?"custom":i;me("SNAP",{payload:{y:de.current(e),velocity:o,source:s}})},get height(){return Z.current}}}),[me]),n.useEffect((function(){var e=q.current,t=function(e){X.current&&e.preventDefault()},n=function(t){e.scrollTop<0&&(requestAnimationFrame((function(){e.style.overflow="hidden",e.scrollTop=0,e.style.removeProperty("overflow")})),t.preventDefault())};return T&&(e.addEventListener("scroll",t),e.addEventListener("touchmove",t),e.addEventListener("touchstart",n)),function(){e.removeEventListener("scroll",t),e.removeEventListener("touchmove",t),e.removeEventListener("touchstart",n)}}),[T,q]);var ge=pE((function(e){var t=e.args,n=(t=void 0===t?[]:t)[0],r=(n=void 0===n?{}:n).closeOnTap,o=void 0!==r&&r,i=n.isContentDragging,s=void 0!==i&&i,a=e.cancel,l=e.direction[1],c=e.down,d=e.first,u=e.last,p=e.memo,f=void 0===p?H.y.getValue():p,m=e.tap,g=e.velocity,b=-1*e.movement[1];if(!N.current)return a(),f;if(h&&o&&m)return a(),setTimeout((function(){return h()}),0),f;if(m)return f;var v=f+b,y=b*g,x=Math.max(le.current,Math.min(ce.current,v+2*y));if(!c&&h&&l>0&&v+y<le.current/2)return a(),h(),f;var w=c?h||le.current!==ce.current?MM(v,h?0:le.current,ce.current,.55):v<le.current?MM(v,le.current,2*ce.current,.55):MM(v,le.current/2,ce.current,.55):x;return T&&s?(w>=ce.current&&(w=ce.current),f===ce.current&&q.current.scrollTop>0&&(w=ce.current),X.current=w<ce.current):X.current=!1,d&&me("DRAG"),u?(me("SNAP",{payload:{y:w,velocity:g>.05?g:1,source:"dragging"}}),f):(_({y:w,ready:1,maxHeight:ae.current,maxSnap:ce.current,minSnap:le.current,immediate:!0,config:{velocity:g}}),f)}),{filterTaps:!0});if(Number.isNaN(ce.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(le.current))throw new TypeError("minSnapRef is NaN!!");var be=function(e){var t,n=e.spring,r=zj([n.y,n.maxHeight],(function(e,t){return Math.round(WT(t-e,0,16))+"px"})),o=zj([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return WT(e,t,n)+"px"})),i=zj([n.y,n.minSnap,n.maxSnap],(function(e,t,n){return e<t?t-e+"px":e>n?n-e+"px":"0px"})),s=zj([n.y,n.maxSnap],(function(e,t){return e>=t?Math.ceil(e-t):0})),a=zj([n.y,n.minSnap],(function(e,t){if(!t)return 0;var n=Math.max(t/2-45,0);return WT((e-n)*(1/(Math.min(t/2+45,t)-n)+0),0,1)})),l=zj([n.y,n.minSnap],(function(e,t){return t?WT(e/t,0,1):0}));return(t={})["--rsbs-content-opacity"]=a,t["--rsbs-backdrop-opacity"]=l,t["--rsbs-antigap-scale-y"]=s,t["--rsbs-overlay-translate-y"]=i,t["--rsbs-overlay-rounded"]=r,t["--rsbs-overlay-h"]=o,t}({spring:H});return n.createElement(wM.div,_T({},O,{"data-rsbs-root":!0,"data-rsbs-state":sO.find(fe.matches),"data-rsbs-is-blocking":y,"data-rsbs-is-dismissable":!!h,"data-rsbs-has-header":!!a,"data-rsbs-has-footer":!!s,className:i,ref:F,style:_T({},be,C,{opacity:H.ready})}),o,y&&n.createElement("div",_T({key:"backdrop","data-rsbs-backdrop":!0},ge({closeOnTap:!0}))),n.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:G,onKeyDown:function(e){"Escape"===e.key&&(e.stopPropagation(),h&&h())}},!1!==a&&n.createElement("div",_T({key:"header","data-rsbs-header":!0,ref:U},ge()),a),n.createElement("div",_T({key:"scroll","data-rsbs-scroll":!0,ref:q},T?ge({isContentDragging:!0}):{}),n.createElement("div",{"data-rsbs-content":!0,ref:W},r)),s&&n.createElement("div",_T({key:"footer",ref:K,"data-rsbs-footer":!0},ge()),s)))})),sO=["closed","opening","open","closing","dragging","snapping","resizing"];function aO(e){var t=e.lastSnap;return null!=t?t:Math.min.apply(Math,e.snapPoints)}function lO(e){return e.minHeight}var cO=["onSpringStart","onSpringEnd","skipInitialTransition"],dO=n.forwardRef((function(e,t){var r=e.onSpringStart,o=e.onSpringEnd,i=e.skipInitialTransition,s=FT(e,cO),a=n.useState(!1),l=a[0],c=a[1],d=n.useRef(),u=n.useRef(null),h=n.useRef(i&&s.open?"OPEN":"CLOSED");qT((function(){if(s.open)return cancelAnimationFrame(d.current),c(!0),function(){h.current="CLOSED"}}),[s.open]);var p=n.useCallback((function(e){return Promise.resolve(null==r?void 0:r(e)).then((function(){"OPEN"===e.type&&cancelAnimationFrame(d.current)}))}),[r]),f=n.useCallback((function(e){return Promise.resolve(null==o?void 0:o(e)).then((function(){"CLOSE"===e.type&&(d.current=requestAnimationFrame((function(){return c(!1)})))}))}),[o]);return l?n.createElement(oS,{"data-rsbs-portal":!0},n.createElement(iO,_T({},s,{lastSnapRef:u,ref:t,initialState:h.current,onSpringStart:p,onSpringEnd:f}))):null}));const uO=i.css`
3058
3090
  width: ${k(1e3)};
3059
3091
  border-radius: ${$(300)};
3060
3092
  background: transparent;
@@ -3068,7 +3100,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3068
3100
  margin: 0;
3069
3101
  background: ${w("neutral",300)};
3070
3102
  }
3071
- `,dO=(e,t)=>i.css`
3103
+ `,hO=(e,t)=>i.css`
3072
3104
  [data-rsbs-overlay] {
3073
3105
  border-top-left-radius: ${$(500)};
3074
3106
  border-top-right-radius: ${$(500)};
@@ -3094,11 +3126,11 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3094
3126
  padding: 0;
3095
3127
  min-height: ${k(1600)};
3096
3128
  }
3097
- `;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const uO=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},hO=e=>"small"===e||"small-full-width"===e,pO=(e,t)=>{let n="14.875rem";return(e=>"full-width"===e||"small-full-width"===e)(e)?n="100%":"large"===e&&(n="22.875rem"),i.css`
3129
+ `;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}("[data-rsbs-overlay] {\n border-top-left-radius: 16px;\n border-top-left-radius: var(--rsbs-overlay-rounded,16px);\n border-top-right-radius: 16px;\n border-top-right-radius: var(--rsbs-overlay-rounded,16px);\n display: flex;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n flex-direction: column;\n height: 0px;\n height: var(--rsbs-overlay-h,0px);\n transform: translate3d(0, 0px, 0);\n transform: translate3d(0, var(--rsbs-overlay-translate-y,0px), 0);\n will-change: height;\n}\n\n[data-rsbs-overlay]:focus {\n outline: none;\n}\n\n[data-rsbs-is-blocking='false'] [data-rsbs-overlay] {\n box-shadow: 0 -5px 60px 0 rgba(38, 89, 115, 0.11),\n 0 -1px 0 rgba(38, 89, 115, 0.05);\n}\n\n[data-rsbs-overlay],\n[data-rsbs-root]:after {\n max-width: auto;\n max-width: var(--rsbs-max-w,auto);\n margin-left: env(safe-area-inset-left);\n margin-left: var(--rsbs-ml,env(safe-area-inset-left));\n margin-right: env(safe-area-inset-right);\n margin-right: var(--rsbs-mr,env(safe-area-inset-right));\n}\n\n[data-rsbs-overlay],\n[data-rsbs-backdrop],\n[data-rsbs-root]:after {\n z-index: 3;\n -ms-scroll-chaining: none;\n overscroll-behavior: none;\n touch-action: none;\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n}\n\n[data-rsbs-backdrop] {\n top: -60px;\n bottom: -60px;\n background-color: rgba(0, 0, 0, 0.6);\n background-color: var(--rsbs-backdrop-bg,rgba(0, 0, 0, 0.6));\n will-change: opacity;\n cursor: pointer;\n opacity: 1;\n}\n\n[data-rsbs-is-dismissable='false'] [data-rsbs-backdrop] {\n cursor: ns-resize;\n}\n\n[data-rsbs-root]:after {\n content: '';\n pointer-events: none;\n background: #fff;\n background: var(--rsbs-bg,#fff);\n height: 1px;\n transform-origin: bottom;\n transform: scale3d(1, 0, 1);\n transform: scale3d(1, var(--rsbs-antigap-scale-y,0), 1);\n will-change: transform;\n}\n\n[data-rsbs-footer],\n[data-rsbs-header] {\n flex-shrink: 0;\n cursor: ns-resize;\n padding: 16px;\n}\n\n[data-rsbs-header] {\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(1 * 0.125));\n box-shadow: 0 1px 0\n rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125));\n z-index: 1;\n padding-top: calc(20px + env(safe-area-inset-top));\n padding-bottom: 8px;\n}\n\n[data-rsbs-header]:before {\n position: absolute;\n content: '';\n display: block;\n width: 36px;\n height: 4px;\n top: calc(8px + env(safe-area-inset-top));\n left: 50%;\n transform: translateX(-50%);\n border-radius: 2px;\n background-color: hsla(0, 0%, 0%, 0.14);\n background-color: var(--rsbs-handle-bg,hsla(0, 0%, 0%, 0.14));\n}\n\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n [data-rsbs-header]:before {\n transform: translateX(-50%) scaleY(0.75);\n }\n}\n\n[data-rsbs-has-header='false'] [data-rsbs-header] {\n box-shadow: none;\n padding-top: calc(12px + env(safe-area-inset-top));\n}\n\n[data-rsbs-scroll] {\n flex-shrink: 1;\n flex-grow: 1;\n -webkit-tap-highlight-color: revert;\n -webkit-touch-callout: revert;\n -webkit-user-select: auto;\n -ms-user-select: auto;\n -moz-user-select: auto;\n user-select: auto;\n overflow: auto;\n -ms-scroll-chaining: none;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n}\n\n[data-rsbs-scroll]:focus {\n outline: none;\n}\n\n[data-rsbs-has-footer='false'] [data-rsbs-content] {\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n[data-rsbs-content] {\n /* The overflow hidden is to ensure any margin on child nodes are included when the resize observer is measuring the height */\n overflow: hidden;\n}\n\n[data-rsbs-footer] {\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(1 * 0.125)),\n 0 2px 0 #fff;\n box-shadow: 0 -1px 0 rgba(46, 59, 66, calc(var(--rsbs-content-opacity,1) * 0.125)),\n 0 2px 0 var(--rsbs-bg,#fff);\n overflow: hidden;\n z-index: 1;\n padding-bottom: calc(16px + env(safe-area-inset-bottom));\n}\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='true'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-header] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-scroll] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-footer] > *, [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-footer] > * {\n opacity: 1;\n opacity: var(--rsbs-content-opacity,1);\n }\n\n[data-rsbs-is-dismissable='true'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='opening'] [data-rsbs-backdrop], [data-rsbs-is-dismissable='false'][data-rsbs-state='closing'] [data-rsbs-backdrop] {\n opacity: 1;\n opacity: var(--rsbs-backdrop-opacity,1);\n }\n\n[data-rsbs-state='closed'],\n[data-rsbs-state='closing'] {\n /* Allows interactions on the rest of the page before the close transition is finished */\n pointer-events: none;\n}\n");const pO=(e,t)=>{let n=0,r=1/0;return t.forEach(((t,o)=>{const i=Math.abs(t-e);i<r&&(r=i,n=o)})),n},fO=e=>"small"===e||"small-full-width"===e,mO=(e,t)=>{let n="14.875rem";return(e=>"full-width"===e||"small-full-width"===e)(e)?n="100%":"large"===e&&(n="22.875rem"),i.css`
3098
3130
  width: 100%;
3099
3131
  max-width: ${n};
3100
3132
  border-radius: ${$(300)};
3101
- padding: ${hO(e)?`${k(200)} ${k(200)} ${k(300)} ${k(200)}`:`${k(200)} ${k(300)} ${k(300)} ${k(300)}`};
3133
+ padding: ${fO(e)?`${k(200)} ${k(200)} ${k(300)} ${k(200)}`:`${k(200)} ${k(300)} ${k(300)} ${k(300)}`};
3102
3134
  display: flex;
3103
3135
  align-items: ${t?"center":"flex-start"};
3104
3136
  justify-content: ${t?"space-between":"flex-start"};
@@ -3108,7 +3140,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3108
3140
  button {
3109
3141
  margin-left: ${t?0:k(600)};
3110
3142
  }
3111
- `},fO=i.css`
3143
+ `},gO=i.css`
3112
3144
  display: flex;
3113
3145
  align-items: baseline;
3114
3146
  gap: ${k(200)};
@@ -3116,35 +3148,35 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3116
3148
  svg {
3117
3149
  margin-top: 0.1875rem;
3118
3150
  }
3119
- `,mO=e=>i.css`
3151
+ `,bO=e=>i.css`
3120
3152
  color: ${w("neutral",800)};
3121
- font-size: ${hO(e)?C(300):C(500)};
3122
- line-height: ${hO(e)?S(500):S(700)};
3153
+ font-size: ${fO(e)?C(300):C(500)};
3154
+ line-height: ${fO(e)?S(500):S(700)};
3123
3155
  font-weight: 400;
3124
3156
  text-align: left;
3125
- `,gO=(e,t)=>i.css`
3157
+ `,vO=(e,t)=>i.css`
3126
3158
  color: ${w("neutral",700)};
3127
- font-size: ${hO(e)?C(200):C(400)};
3128
- line-height: ${hO(e)?S(400):S(600)};
3159
+ font-size: ${fO(e)?C(200):C(400)};
3160
+ line-height: ${fO(e)?S(400):S(600)};
3129
3161
  font-weight: 400;
3130
3162
  margin-left: ${t?k(600):"0"};
3131
3163
  text-align: left;
3132
- `,bO=(e,t)=>i.css`
3164
+ `,yO=(e,t)=>i.css`
3133
3165
  color: ${w("neutral",700)};
3134
- font-size: ${hO(e)?C(200):C(400)};
3135
- line-height: ${hO(e)?S(400):S(600)};
3166
+ font-size: ${fO(e)?C(200):C(400)};
3167
+ line-height: ${fO(e)?S(400):S(600)};
3136
3168
  font-weight: 400;
3137
3169
  margin-left: ${t?k(600):"0"};
3138
3170
  text-align: left;
3139
- `,vO=i.css`
3171
+ `,xO=i.css`
3140
3172
  background-color: ${w("neutral",100)};
3141
3173
  border: ${j(100)} solid ${w("neutral",300)};
3142
3174
  color: ${w("neutral",700)};
3143
- `,yO=i.css`
3175
+ `,wO=i.css`
3144
3176
  background-color: ${w("neutral",200)};
3145
3177
  border: ${j(100)} solid ${w("neutral",300)};
3146
3178
  color: ${w("neutral",700)};
3147
- `,xO=i.css`
3179
+ `,CO=i.css`
3148
3180
  background-color: ${w("success",100)};
3149
3181
  border: ${j(100)} solid ${w("success",300)};
3150
3182
  color: ${w("success",500)};
@@ -3152,7 +3184,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3152
3184
  p {
3153
3185
  color: ${w("success",900)};
3154
3186
  }
3155
- `,wO=i.css`
3187
+ `,kO=i.css`
3156
3188
  background-color: ${w("warning",100)};
3157
3189
  border: ${j(100)} solid ${w("warning",300)};
3158
3190
  color: ${w("warning",500)};
@@ -3160,7 +3192,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3160
3192
  p {
3161
3193
  color: ${w("warning",900)};
3162
3194
  }
3163
- `,CO=i.css`
3195
+ `,SO=i.css`
3164
3196
  background-color: ${w("error",100)};
3165
3197
  border: ${j(100)} solid ${w("error",300)};
3166
3198
  color: ${w("error",500)};
@@ -3168,52 +3200,52 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3168
3200
  p {
3169
3201
  color: ${w("error",900)};
3170
3202
  }
3171
- `,kO=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Kf,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,actionButtonVariant:l="secondary",isButtonRight:c,buttonLeftIcon:d,buttonRightIcon:u,labels:h})=>{const p=Vf("InlineMessage",h);let f=vO;"info-grey"===n?f=yO:"success"===n?f=xO:"warning"===n?f=wO:"error"===n&&(f=CO);const m="error"===n||"warning"===n?"alert":"status",g="alert"===m?"assertive":"polite";return r.jsxs("div",{css:[pO(o,c),f],role:m,"aria-live":g,"aria-roledescription":p.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:fO,children:[i,"string"==typeof e?r.jsx("p",{css:mO(o),children:e}):r.jsx("div",{css:mO(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:gO(o,!!i),children:t}):t?r.jsx("div",{css:bO(o,!!i),children:t}):null]}),a?r.jsx(Bf,{label:a,variant:l,size:"large"===o||"full-width"===o?"default":"small",onClick:s,leftIcon:d,rightIcon:u}):null]})},SO=i.css`
3203
+ `,$O=({label:e,caption:t,variant:n,size:o="large",icon:i=r.jsx(Kf,{height:"1rem",width:"1rem"}),onActionClick:s,actionLabel:a,actionButtonVariant:l="secondary",isButtonRight:c,buttonLeftIcon:d,buttonRightIcon:u,labels:h})=>{const p=Vf("InlineMessage",h);let f=xO;"info-grey"===n?f=wO:"success"===n?f=CO:"warning"===n?f=kO:"error"===n&&(f=SO);const m="error"===n||"warning"===n?"alert":"status",g="alert"===m?"assertive":"polite";return r.jsxs("div",{css:[mO(o,c),f],role:m,"aria-live":g,"aria-roledescription":p.roleDescription,children:[r.jsxs("div",{children:[r.jsxs("div",{css:gO,children:[i,"string"==typeof e?r.jsx("p",{css:bO(o),children:e}):r.jsx("div",{css:bO(o),children:e})]}),t&&"string"==typeof t?r.jsx("p",{css:vO(o,!!i),children:t}):t?r.jsx("div",{css:yO(o,!!i),children:t}):null]}),a?r.jsx(Bf,{label:a,variant:l,size:"large"===o||"full-width"===o?"default":"small",onClick:s,leftIcon:d,rightIcon:u}):null]})},jO=i.css`
3172
3204
  width: 100%;
3173
3205
  min-height: calc(${k(1200)} * 12);
3174
3206
  background-color: ${w("neutral",100)};
3175
3207
  display: flex;
3176
3208
  flex-direction: column;
3177
- `,$O=i.css`
3209
+ `,MO=i.css`
3178
3210
  background-color: ${w("neutral",200)};
3179
3211
  padding: ${k(300)};
3180
3212
  display: flex;
3181
3213
  align-items: center;
3182
3214
  gap: ${k(300)};
3183
- `,jO=i.css`
3215
+ `,EO=i.css`
3184
3216
  flex: 1;
3185
3217
 
3186
3218
  .ds-text-input-container {
3187
3219
  margin-bottom: 0;
3188
3220
  }
3189
- `,MO=i.css`
3221
+ `,TO=i.css`
3190
3222
  flex-shrink: 0;
3191
3223
  color: ${w("neutral",700)};
3192
3224
  font-size: ${C(400)};
3193
3225
  font-style: normal;
3194
3226
  font-weight: 400;
3195
- `,EO=i.css`
3227
+ `,OO=i.css`
3196
3228
  flex: 1;
3197
3229
  min-height: 0;
3198
3230
  padding: ${k(400)};
3199
3231
  display: flex;
3200
3232
  flex-direction: column;
3201
3233
  gap: ${k(300)};
3202
- `,TO=i.css`
3234
+ `,LO=i.css`
3203
3235
  color: ${w("neutral",700)};
3204
3236
  font-size: ${C(400)};
3205
3237
  line-height: ${S(600)};
3206
3238
  font-weight: 700;
3207
- `,OO=i.css`
3239
+ `,AO=i.css`
3208
3240
  width: 100%;
3209
- `,LO=i.css`
3241
+ `,RO=i.css`
3210
3242
  flex: 1;
3211
3243
  min-height: 0;
3212
3244
  overflow-y: auto;
3213
3245
  display: flex;
3214
3246
  flex-direction: column;
3215
3247
  gap: ${k(200)};
3216
- `,AO=i.css`
3248
+ `,NO=i.css`
3217
3249
  background-color: ${w("neutral",200)};
3218
3250
  border: ${j(100)} solid ${w("neutral",300)};
3219
3251
  border-radius: ${$(300)};
@@ -3239,13 +3271,13 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3239
3271
  &:active {
3240
3272
  background-color: ${w("neutral",300)};
3241
3273
  }
3242
- `,RO=i.css`
3274
+ `,DO=i.css`
3243
3275
  display: flex;
3244
3276
  flex: 1;
3245
3277
  min-width: 0;
3246
3278
  flex-direction: column;
3247
3279
  gap: ${k(50)};
3248
- `,NO=i.css`
3280
+ `,IO=i.css`
3249
3281
  color: ${w("neutral",900)};
3250
3282
  font-size: ${C(300)};
3251
3283
  line-height: ${S(500)};
@@ -3253,7 +3285,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3253
3285
  overflow: hidden;
3254
3286
  text-overflow: ellipsis;
3255
3287
  white-space: nowrap;
3256
- `,DO=i.css`
3288
+ `,PO=i.css`
3257
3289
  color: ${w("neutral",700)};
3258
3290
  font-size: ${C(300)};
3259
3291
  line-height: ${S(500)};
@@ -3261,7 +3293,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3261
3293
  overflow: hidden;
3262
3294
  text-overflow: ellipsis;
3263
3295
  white-space: nowrap;
3264
- `,IO=e=>i.css`
3296
+ `,zO=e=>i.css`
3265
3297
  a,
3266
3298
  p {
3267
3299
  font-size: ${C("small"===e?200:400)};
@@ -3293,19 +3325,19 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3293
3325
  a:hover {
3294
3326
  text-decoration: underline;
3295
3327
  }
3296
- `,PO=e=>i.css`
3328
+ `,VO=e=>i.css`
3297
3329
  svg {
3298
3330
  height: ${k("small"===e?200:300)};
3299
3331
  width: ${k("small"===e?200:300)};
3300
3332
  color: ${w("neutral",600)};
3301
3333
  }
3302
- `,zO=i.css`
3334
+ `,BO=i.css`
3303
3335
  cursor: pointer;
3304
3336
  color: ${w("neutral",600)};
3305
3337
  display: flex;
3306
3338
  justify-content: center;
3307
3339
  align-items: center;
3308
- `,VO=(e,t)=>i.css`
3340
+ `,HO=(e,t)=>i.css`
3309
3341
  min-height: ${k(1400)};
3310
3342
  width: 100vw;
3311
3343
  position: ${e?"sticky":"absolute"};
@@ -3315,7 +3347,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3315
3347
  border-top: ${j(100)} solid
3316
3348
  ${w("neutral",400)};
3317
3349
  z-index: 101;
3318
- `,BO=e=>i.css`
3350
+ `,_O=e=>i.css`
3319
3351
  height: 100%;
3320
3352
  width: 100%;
3321
3353
  max-width: ${null!=e?u(e):"100%"};
@@ -3330,7 +3362,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3330
3362
  flex-direction: column;
3331
3363
  align-items: flex-start;
3332
3364
  }
3333
- `,HO=i.css`
3365
+ `,FO=i.css`
3334
3366
  display: flex;
3335
3367
  align-items: center;
3336
3368
  flex-wrap: wrap;
@@ -3343,7 +3375,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3343
3375
  color: ${w("neutral",700)};
3344
3376
  text-decoration: underline;
3345
3377
  }
3346
- `,_O=i.css`
3378
+ `,qO=i.css`
3347
3379
  width: 15rem;
3348
3380
  font-size: ${C(300)};
3349
3381
  line-height: ${S(500)};
@@ -3354,17 +3386,17 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3354
3386
  @media screen and (max-width: 48rem) {
3355
3387
  text-align: left;
3356
3388
  }
3357
- `,FO=i.css`
3389
+ `,WO=i.css`
3358
3390
  display: flex;
3359
3391
  align-items: center;
3360
3392
  gap: ${k(400)};
3361
- `,qO=i.css`
3393
+ `,UO=i.css`
3362
3394
  width: 100%;
3363
3395
  display: flex;
3364
3396
  align-items: center;
3365
3397
  height: ${k(1400)};
3366
3398
  background-color: ${w("neutral",200)};
3367
- `,WO=i.css`
3399
+ `,KO=i.css`
3368
3400
  height: ${k(1400)};
3369
3401
  width: 99%;
3370
3402
  background-color: ${w("neutral",200)};
@@ -3460,9 +3492,9 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3460
3492
  opacity: 1;
3461
3493
  }
3462
3494
  }
3463
- `,UO=i.css`
3495
+ `,GO=i.css`
3464
3496
  position: relative;
3465
- `,KO=i.css`
3497
+ `,ZO=i.css`
3466
3498
  position: absolute;
3467
3499
  top: -0.3125rem;
3468
3500
  right: -0.3125rem;
@@ -3477,7 +3509,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3477
3509
  display: flex;
3478
3510
  justify-content: center;
3479
3511
  align-items: center;
3480
- `,GO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),ZO=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
3512
+ `,JO=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),XO=(e,t,n,r,o)=>{let s="3rem";return e?s="6rem":o&&(s="1.75rem"),i.css`
3481
3513
  max-height: ${s};
3482
3514
  width: 100%;
3483
3515
  background-color: ${n??w("neutral","dark"===r?800:100)};
@@ -3487,7 +3519,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3487
3519
  z-index: 102;
3488
3520
  border-bottom: ${j(100)} solid
3489
3521
  ${w("neutral",400)};
3490
- `},JO=(e,t)=>i.css`
3522
+ `},YO=(e,t)=>i.css`
3491
3523
  height: ${k(t?700:1200)};
3492
3524
  width: 100%;
3493
3525
  background-color: ${w("neutral","dark"===e?800:100)};
@@ -3498,7 +3530,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3498
3530
  justify-content: flex-start;
3499
3531
  gap: 0;
3500
3532
  padding: ${t?0:`${k(200)} ${k(400)}`};
3501
- `,XO=(e,t,n)=>i.css`
3533
+ `,QO=(e,t,n)=>i.css`
3502
3534
  height: ${k(n?700:1200)};
3503
3535
  width: 100%;
3504
3536
  max-width: ${t?u(t):"100%"};
@@ -3509,13 +3541,13 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3509
3541
  justify-content: space-between;
3510
3542
  margin: 0 auto;
3511
3543
  padding: ${n?0:`${k(200)} ${k(400)}`};
3512
- `,YO=(e,t)=>i.css`
3544
+ `,eL=(e,t)=>i.css`
3513
3545
  display: flex;
3514
3546
  margin: ${t?"-0.0625rem":"0rem"};
3515
3547
  justify-content: flex-start;
3516
3548
  gap: ${k(300)};
3517
3549
  color: ${w("neutral",e?100:900)};
3518
- `,QO=i.css`
3550
+ `,tL=i.css`
3519
3551
  outline: none;
3520
3552
 
3521
3553
  a {
@@ -3527,12 +3559,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3527
3559
  outline-width: ${k(50)};
3528
3560
  }
3529
3561
  }
3530
- `,eL=e=>i.css`
3562
+ `,nL=e=>i.css`
3531
3563
  display: ${e?"none":"flex"};
3532
3564
  align-items: center;
3533
3565
  justify-content: flex-start;
3534
3566
  gap: 0rem;
3535
- `,tL=(e,t,n)=>i.css`
3567
+ `,rL=(e,t,n)=>i.css`
3536
3568
  font-size: ${C(n?300:400)};
3537
3569
  line-height: ${S(600)};
3538
3570
  font-weight: 400;
@@ -3557,12 +3589,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3557
3589
  font-weight: 700;
3558
3590
  color: ${w("accessible","controls-on-neutral-lights")};
3559
3591
  `:""}
3560
- `,nL=e=>i.css`
3592
+ `,oL=e=>i.css`
3561
3593
  height: ${k(e?700:1200)};
3562
3594
  display: flex;
3563
3595
  align-items: center;
3564
3596
  justify-content: flex-end;
3565
- `,rL=e=>i.css`
3597
+ `,iL=e=>i.css`
3566
3598
  height: 100%;
3567
3599
  font-size: ${C(400)};
3568
3600
  line-height: ${S(600)};
@@ -3582,7 +3614,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3582
3614
  }
3583
3615
  }
3584
3616
  `:""}
3585
- `,oL=e=>i.css`
3617
+ `,sL=e=>i.css`
3586
3618
  height: 100%;
3587
3619
  display: flex;
3588
3620
  align-items: center;
@@ -3591,7 +3623,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3591
3623
  padding-left: ${k(400)};
3592
3624
  border-left: ${j(100)} solid
3593
3625
  ${w("neutral",e?700:300)};
3594
- `,iL=(e="light",t)=>i.css`
3626
+ `,aL=(e="light",t)=>i.css`
3595
3627
  background-color: none;
3596
3628
  border: none;
3597
3629
  cursor: pointer;
@@ -3617,7 +3649,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3617
3649
  outline-width: ${j(200)};
3618
3650
  background-color: ${w("neutral",200)};
3619
3651
  }
3620
- `,sL=(e,t)=>i.css`
3652
+ `,lL=(e,t)=>i.css`
3621
3653
  position: absolute;
3622
3654
  top: ${k(t?700:1200)};
3623
3655
  right: 0;
@@ -3632,10 +3664,10 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3632
3664
  justify-content: flex-start;
3633
3665
  gap: ${k(400)};
3634
3666
  transition: width 0.5s ease-in-out;
3635
- `,aL=i.css`
3667
+ `,cL=i.css`
3636
3668
  height: 100%;
3637
3669
  width: 100%;
3638
- `,lL=e=>i.css`
3670
+ `,dL=e=>i.css`
3639
3671
  background-color: ${w("neutral","dark"===e?800:200)};
3640
3672
  border-bottom: ${j(100)} solid
3641
3673
  ${w("neutral",300)};
@@ -3656,13 +3688,13 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3656
3688
  margin-left: -${k(300)};
3657
3689
  }
3658
3690
  }
3659
- `,cL=i.css`
3691
+ `,uL=i.css`
3660
3692
  background-color: ${w("neutral",100)};
3661
- `,dL=i.css`
3693
+ `,hL=i.css`
3662
3694
  min-height: 100vh;
3663
3695
  width: 100%;
3664
3696
  overflow-y: scroll;
3665
- `;i.css``;const uL=e=>i.css`
3697
+ `;i.css``;const pL=e=>i.css`
3666
3698
  display: inline-block;
3667
3699
  width: 100%;
3668
3700
  padding: ${k(300)} ${k(400)};
@@ -3691,7 +3723,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3691
3723
  outline-width: ${j(200)};
3692
3724
  background-color: ${w("neutral",200)};
3693
3725
  }
3694
- `,hL=i.css`
3726
+ `,fL=i.css`
3695
3727
  width: 100%;
3696
3728
  padding: ${k(300)} ${k(400)};
3697
3729
  display: flex;
@@ -3715,7 +3747,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3715
3747
  outline-width: ${j(200)};
3716
3748
  background-color: ${w("neutral",200)};
3717
3749
  }
3718
- `,pL=e=>i.css`
3750
+ `,mL=e=>i.css`
3719
3751
  position: absolute;
3720
3752
  top: 0rem;
3721
3753
  right: 0;
@@ -3727,7 +3759,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3727
3759
  align-items: flex-start;
3728
3760
  justify-content: flex-start;
3729
3761
  transition: width 0.5s ease-in-out;
3730
- `,fL=i.css`
3762
+ `,gL=i.css`
3731
3763
  height: ${k(1200)};
3732
3764
  width: 100%;
3733
3765
  display: flex;
@@ -3739,7 +3771,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3739
3771
  position: relative;
3740
3772
  top: 0;
3741
3773
  left: 0;
3742
- `,mL=i.css`
3774
+ `,bL=i.css`
3743
3775
  position: absolute;
3744
3776
  bottom: 0;
3745
3777
  left: 0;
@@ -3754,7 +3786,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3754
3786
  button {
3755
3787
  width: calc(48% - 1.5rem);
3756
3788
  }
3757
- `,gL=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),b=n.useRef(null),v=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:sL(l,h),children:l&&r.jsxs("div",{css:aL,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:lL(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:cL,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:uL(d===e.link),children:e.label},e.label):r.jsxs("button",{css:hL,type:"button",ref:e=>{v.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{b.current?.focus()}),100))},children:[e.label,e.items?r.jsx(Gf,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:mL,children:s.map((e=>r.jsx(Bf,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:pL(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:fL,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),v.current[m]?.focus()},"aria-label":u.goBackLabel,css:iL(e),ref:b,children:[r.jsx(Gf,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:iL(e),children:[u.closeButtonText,r.jsx(Xf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:dL,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:uL(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},bL=1023,vL=i.css`
3789
+ `,vL=({theme:e="light",variant:t,navigationSection:o,utilitySection:i,actionsSection:s,linkRouter:a,isOpen:l,setIsOpen:c,pathname:d,resolvedLabels:u})=>{const h="condensed"===t,[p,f]=n.useState(void 0),[m,g]=n.useState(-1),b=n.useRef(null),v=n.useRef([]),y=a;return r.jsxs(r.Fragment,{children:[r.jsx("div",{css:lL(l,h),children:l&&r.jsxs("div",{css:cL,children:[r.jsxs("div",{style:{overflowY:"scroll",width:"100%",height:"100%",paddingBottom:"4.5rem"},children:[i?r.jsx("div",{css:dL(e),children:i?.map((e=>r.jsx("div",{className:"ds-utility-item",children:e})))}):null,o?r.jsx("div",{css:uL,children:o.map(((e,t)=>e.link?r.jsx(y,{to:e.link,href:e.link,onClick:()=>{f(void 0),g(-1),c(!1)},css:pL(d===e.link),children:e.label},e.label):r.jsxs("button",{css:fL,type:"button",ref:e=>{v.current[t]=e},onClick:()=>{e.items&&(f(e),g(t),setTimeout((()=>{b.current?.focus()}),100))},children:[e.label,e.items?r.jsx(Gf,{rotate:"270",color:"var(--chakra-colors-neutral-700)"}):null]},e.label)))}):null]}),s?r.jsx("div",{css:bL,children:s.map((e=>r.jsx(Bf,{...e,onClick:t=>{e?.onClick?.(t),f(void 0),g(-1),c(!1)}},e.ariaLabel)))}):null]})}),r.jsx("div",{css:mL(!!p?.items),children:p?.items?r.jsxs(r.Fragment,{children:[r.jsxs("div",{css:gL,children:[r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),v.current[m]?.focus()},"aria-label":u.goBackLabel,css:aL(e),ref:b,children:[r.jsx(Gf,{rotate:"90",color:"var(--chakra-colors-neutral-700)"}),p?.label]}),r.jsxs("button",{type:"button",onClick:()=>{f(void 0),g(-1),c(!1)},"aria-label":u.closeMenuLabel,css:aL(e),children:[u.closeButtonText,r.jsx(Xf,{height:"1rem",width:"1rem"})]})]}),r.jsx("div",{css:hL,children:p?.items?.map((e=>r.jsx(y,{to:e.link,href:e.link,css:pL(),onClick:()=>{f(void 0),g(-1),c(!1)},children:e.label},e.label)))})]}):null})]})},yL=1023,xL=i.css`
3758
3790
  width: ${k(1600)};
3759
3791
  height: 100%;
3760
3792
  z-index: 100;
@@ -3764,7 +3796,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3764
3796
  display: flex;
3765
3797
  flex-direction: column;
3766
3798
  justify-content: space-between;
3767
- `,yL=i.css`
3799
+ `,wL=i.css`
3768
3800
  width: ${k(1600)};
3769
3801
  height: ${k(1600)};
3770
3802
  background-color: ${w("neutral",200)};
@@ -3855,7 +3887,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3855
3887
  }
3856
3888
  }
3857
3889
  }
3858
- `,xL=i.css`
3890
+ `,CL=i.css`
3859
3891
  display: flex;
3860
3892
  justify-content: center;
3861
3893
  align-items: center;
@@ -3868,7 +3900,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3868
3900
  fill: ${w("neutral",600)};
3869
3901
  }
3870
3902
  }
3871
- `,wL=i.css`
3903
+ `,kL=i.css`
3872
3904
  width: ${k(1600)};
3873
3905
  height: ${k(1600)};
3874
3906
  background-color: ${w("neutral",200)};
@@ -3906,7 +3938,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3906
3938
  text-align: center;
3907
3939
  color: ${w("neutral",600)};
3908
3940
  }
3909
- `,CL=i.css`
3941
+ `,SL=i.css`
3910
3942
  width: 20rem;
3911
3943
  height: 100%;
3912
3944
  z-index: 100;
@@ -3916,7 +3948,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3916
3948
  overflow-x: hidden;
3917
3949
  border-right: ${j(100)} solid
3918
3950
  ${w("neutral",300)};
3919
- `,kL=e=>i.css`
3951
+ `,$L=e=>i.css`
3920
3952
  width: 100%;
3921
3953
  display: flex;
3922
3954
  align-items: center;
@@ -3925,7 +3957,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3925
3957
  ${"view"===e&&`\n border: ${j(100)} solid ${w("neutral",400)};\n background-color: ${w("neutral",200)};\n border-radius: ${$(300)};\n padding: ${k(100)};\n `}
3926
3958
 
3927
3959
  ${"transparent"===e&&`\n border: none;\n background-color: transparent;\n border-radius: ${$(300)};\n padding: 0 ${k(400)};\n\n .chakra-tabs__list {\n gap: ${k(800)};\n }\n `}
3928
- `,SL=i.css`
3960
+ `,jL=i.css`
3929
3961
  width: 99%;
3930
3962
  height: ${k(1e3)};
3931
3963
  padding: ${k(200)} ${k(400)};
@@ -3941,7 +3973,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3941
3973
  &:focus-visible {
3942
3974
  box-shadow: none;
3943
3975
  }
3944
- `,$L=i.css`
3976
+ `,ML=i.css`
3945
3977
  background-color: ${w("neutral",200)};
3946
3978
  color: ${w("neutral",700)};
3947
3979
 
@@ -3998,11 +4030,11 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
3998
4030
  opacity: 1;
3999
4031
  }
4000
4032
  }
4001
- `,jL=i.css`
4033
+ `,EL=i.css`
4002
4034
  width: ${k(100)};
4003
4035
  height: ${k(600)};
4004
4036
  background-color: ${w("neutral",400)};
4005
- `,ML=i.css`
4037
+ `,TL=i.css`
4006
4038
  height: ${k(800)};
4007
4039
  border-radius: ${$(200)};
4008
4040
  background-color: ${w("neutral",200)};
@@ -4077,7 +4109,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4077
4109
  opacity: 1;
4078
4110
  }
4079
4111
  }
4080
- `,EL=i.css`
4112
+ `,OL=i.css`
4081
4113
  background-color: transparent;
4082
4114
  color: ${w("neutral",600)};
4083
4115
  width: auto;
@@ -4154,7 +4186,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4154
4186
  }
4155
4187
  }
4156
4188
  }
4157
- `,TL=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),OL=e=>1===e?"none":2===e?"left":"right",LL=w("neutral",700),AL=i.css`
4189
+ `,LL=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),AL=e=>1===e?"none":2===e?"left":"right",RL=w("neutral",700),NL=i.css`
4158
4190
  position: relative;
4159
4191
  width: 100%;
4160
4192
 
@@ -4167,12 +4199,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4167
4199
  &[data-open='true'][data-placement='top'] input {
4168
4200
  border-bottom-left-radius: ${$(300)};
4169
4201
  border-bottom-right-radius: ${$(300)};
4170
- border-bottom-color: ${LL};
4202
+ border-bottom-color: ${RL};
4171
4203
  border-top-left-radius: 0;
4172
4204
  border-top-right-radius: 0;
4173
4205
  border-top-color: transparent;
4174
4206
  }
4175
- `,RL=i.css`
4207
+ `,DL=i.css`
4176
4208
  width: 100%;
4177
4209
  z-index: 1000;
4178
4210
  overflow-y: auto;
@@ -4186,7 +4218,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4186
4218
  margin-top: calc(${j(100)} * -1);
4187
4219
  border-top-left-radius: 0;
4188
4220
  border-top-right-radius: 0;
4189
- border-top: ${j(100)} solid ${LL};
4221
+ border-top: ${j(100)} solid ${RL};
4190
4222
 
4191
4223
  &[data-placement^='top'] {
4192
4224
  margin-top: 0;
@@ -4197,12 +4229,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4197
4229
  ${w("neutral",400)};
4198
4230
  border-bottom-left-radius: 0;
4199
4231
  border-bottom-right-radius: 0;
4200
- border-bottom: ${j(100)} solid ${LL};
4232
+ border-bottom: ${j(100)} solid ${RL};
4201
4233
  box-shadow:
4202
4234
  0 -0.25rem 0.375rem -0.25rem #0000001a,
4203
4235
  0 -0.625rem 0.9375rem -0.1875rem #0000001a;
4204
4236
  }
4205
- `,NL=i.css`
4237
+ `,IL=i.css`
4206
4238
  padding: ${k(200)};
4207
4239
  border-radius: ${$(300)};
4208
4240
  cursor: pointer;
@@ -4223,7 +4255,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4223
4255
  &:active {
4224
4256
  background-color: ${kf(40)};
4225
4257
  }
4226
- `,DL=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),o=e.split(n);return r.jsx(r.Fragment,{children:o.map((e=>n.test(e)?r.jsx("strong",{children:e},e):r.jsx("span",{children:e},e)))})},IL=({items:t,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),r.jsx(e.Box,{ref:a,padding:"0.5rem",children:t.map(((t,n)=>{const a=t.searchLabel||("string"==typeof t.label||"number"==typeof t.label?String(t.label):"");return r.jsx(e.Box,{css:NL,"data-highlighted":n===s||void 0,onClick:()=>i(t.id||a),children:"string"==typeof t.label||"number"==typeof t.label?r.jsx(DL,{text:String(t.label),query:o}):t.label},t.id)}))})},PL=e=>e.searchLabel?e.searchLabel:"string"==typeof e.label||"number"==typeof e.label?String(e.label):"",zL={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function VL(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&zL[e]?zL[e]:zL.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r||s,l=r&&n?"opacity: 0.7;":"",c=n?w("neutral",400):w("primary",800),d=n?w("neutral",400):w("primary",800);return i.css`
4258
+ `,PL=({text:e,query:t})=>{if(!t)return e;const n=new RegExp(`(${t})`,"ig"),o=e.split(n);return r.jsx(r.Fragment,{children:o.map((e=>n.test(e)?r.jsx("strong",{children:e},e):r.jsx("span",{children:e},e)))})},zL=({items:t,query:o,onSelect:i,highlightedIndex:s})=>{const a=n.useRef(null);return n.useEffect((()=>{if(!a.current)return;const e=a.current.children[s];e&&e.scrollIntoView({block:"nearest"})}),[s]),r.jsx(e.Box,{ref:a,padding:"0.5rem",children:t.map(((t,n)=>{const a=t.searchLabel||("string"==typeof t.label||"number"==typeof t.label?String(t.label):"");return r.jsx(e.Box,{css:IL,"data-highlighted":n===s||void 0,onClick:()=>i(t.id||a),children:"string"==typeof t.label||"number"==typeof t.label?r.jsx(PL,{text:String(t.label),query:o}):t.label},t.id)}))})},VL=e=>e.searchLabel?e.searchLabel:"string"==typeof e.label||"number"==typeof e.label?String(e.label):"",BL={small:k(400),medium:k(600),large:k(1e3),default:k(400)};function HL(e,t,n,r){const o=function(e,t){return null!=t&&""!==t?u(t):e&&BL[e]?BL[e]:BL.default}(e,t),s=n?w("neutral",200):w("primary",300),a=r||s,l=r&&n?"opacity: 0.7;":"",c=n?w("neutral",400):w("primary",800),d=n?w("neutral",400):w("primary",800);return i.css`
4227
4259
  height: ${o};
4228
4260
  width: ${o};
4229
4261
  border-radius: 50%;
@@ -4258,20 +4290,20 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4258
4290
  background-color: ${w("primary",500)};
4259
4291
  }
4260
4292
  }
4261
- `}const BL=i.css`
4293
+ `}const _L=i.css`
4262
4294
  font-size: ${C(200)};
4263
4295
  line-height: ${S(400)};
4264
4296
  font-weight: 700;
4265
4297
  color: inherit;
4266
- `,HL={small:{fontSize:h(8),boxSize:h(10),padding:h(2)},large:{fontSize:h(12),boxSize:h(20),padding:`${h(2)} ${h(4)}`}},_L=i.css`
4298
+ `,FL={small:{fontSize:h(8),boxSize:h(10),padding:h(2)},large:{fontSize:h(12),boxSize:h(20),padding:`${h(2)} ${h(4)}`}},qL=i.css`
4267
4299
  display: flex;
4268
4300
  justify-content: flex-start;
4269
4301
  align-items: center;
4270
4302
  gap: ${k(200)};
4271
- `,FL=e=>i.css`
4303
+ `,WL=e=>i.css`
4272
4304
  position: relative;
4273
4305
  display: flex;
4274
- `,qL=(e="large")=>{const t=k("small"===e?100:200);return i.css`
4306
+ `,UL=(e="large")=>{const t=k("small"===e?100:200);return i.css`
4275
4307
  height: ${t};
4276
4308
  width: ${t};
4277
4309
  background-color: ${w("error",500)};
@@ -4280,7 +4312,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4280
4312
  top: 0rem;
4281
4313
  right: 0rem;
4282
4314
  z-index: 1;
4283
- `},WL=(e="large")=>{const{boxSize:t,padding:n}=HL[e];return i.css`
4315
+ `},KL=(e="large")=>{const{boxSize:t,padding:n}=FL[e];return i.css`
4284
4316
  background-color: ${w("error",500)};
4285
4317
  padding: ${n};
4286
4318
  border-radius: 9999px;
@@ -4295,12 +4327,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4295
4327
  min-width: ${t};
4296
4328
  height: ${t};
4297
4329
  z-index: 1;
4298
- `},UL=(e="large")=>{const{fontSize:t}=HL[e];return i.css`
4330
+ `},GL=(e="large")=>{const{fontSize:t}=FL[e];return i.css`
4299
4331
  font-size: ${t};
4300
4332
  line-height: 1;
4301
4333
  font-weight: 700;
4302
4334
  color: ${w("error",100)};
4303
- `},KL=(e="large")=>{const{boxSize:t}=HL[e];return i.css`
4335
+ `},ZL=(e="large")=>{const{boxSize:t}=FL[e];return i.css`
4304
4336
  height: ${t};
4305
4337
  min-width: ${t};
4306
4338
  background-color: ${w("error",500)};
@@ -4309,12 +4341,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4309
4341
  justify-content: center;
4310
4342
  align-items: center;
4311
4343
  padding: 0rem ${k(100)} 0.0625rem ${k(100)};
4312
- `},GL=(e="large")=>{const{fontSize:t}=HL[e];return i.css`
4344
+ `},JL=(e="large")=>{const{fontSize:t}=FL[e];return i.css`
4313
4345
  font-size: ${t};
4314
4346
  line-height: ${S(600)};
4315
4347
  font-weight: 700;
4316
4348
  color: ${w("error",100)};
4317
- `},ZL=({hasNotification:e,notificationCount:t,label:o,labels:i,children:s,size:a="large"})=>{const l=Vf("Badge",i),[c,d]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?d(!0):d(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const u=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})(),h="small"===a?"1rem":"1.5rem";return c&&null==s?r.jsxs("div",{css:_L,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:FL(),children:[r.jsx(im,{color:"currentColor",height:h,width:h}),!e||t||o?null:r.jsx("div",{css:qL(a),"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,u.length>0?r.jsx("div",{css:KL(a),children:r.jsx("p",{css:GL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null]}):r.jsxs("div",{css:_L,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:FL(),children:[u.length>0?r.jsx("div",{css:WL(a),children:r.jsx("p",{css:UL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null,e&&!t?r.jsx("div",{css:qL(a),"aria-hidden":!0}):null,s??r.jsx(im,{color:"currentColor",height:h,width:h})]})]})},JL=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:i,src:s,srcSet:a,onClick:l,notificationCount:c,badgeSize:d="large",disabled:u=!1,customBackgroundColor:h="",labels:p},f)=>{const m=Vf("Avatar",p),g=()=>{u||l?.()},b=!!s||!!a,v=!!l&&!u,y=!!c&&c>0,x=r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:f,css:VL(o,i,u,h),onClick:g,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())},role:v?"button":"img",tabIndex:v?0:void 0,"aria-disabled":l?u:void 0,children:[b&&r.jsx(e.Avatar.Image,{src:s,srcSet:a,alt:n||t||"Avatar image"}),!b&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:BL}),!b&&!t&&r.jsx(Cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):w("primary",800)}})]});return y?r.jsx(ZL,{notificationCount:c,size:d,labels:{unreadMessagesLabel:m.unreadMessagesLabel},children:x}):x})),XL=e=>{switch(e){case"success":return{backgroundColor:w("success",100),textColor:w("success",900),borderColor:w("success",300),iconColor:w("success",500)};case"warning":return{backgroundColor:w("warning",100),textColor:w("warning",900),borderColor:w("warning",300),iconColor:w("warning",500)};case"error":return{backgroundColor:w("error",100),textColor:w("error",900),borderColor:w("error",300),iconColor:w("error",500)};case"information":return{backgroundColor:w("information",100),textColor:w("information",900),borderColor:w("information",300),iconColor:w("information",500)};case"general-grey":return{backgroundColor:w("neutral",200),textColor:w("neutral",800),borderColor:w("neutral",300),iconColor:w("neutral",700)};default:return{backgroundColor:w("neutral",100),textColor:w("neutral",800),borderColor:w("neutral",300),iconColor:w("neutral",700)}}},YL=(e,t="full-width",n=!1)=>{const{backgroundColor:r,textColor:o,borderColor:s}=XL(e),a="inline"===t,l=j(100),c=a?`calc(${k(200)} - ${l})`:k(200),d=`calc(${k(200)} - ${l})`;return i.css`
4349
+ `},XL=({hasNotification:e,notificationCount:t,label:o,labels:i,children:s,size:a="large"})=>{const l=Vf("Badge",i),[c,d]=n.useState(!1);n.useEffect((()=>{const e=()=>{window.innerWidth<1024?d(!0):d(!1)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const u=(()=>{let e="";return t&&t>0&&(e=`${t>99?"99+":t}`),e})(),h="small"===a?"1rem":"1.5rem";return c&&null==s?r.jsxs("div",{css:qL,role:"status","aria-live":"polite",children:[r.jsxs("div",{css:WL(),children:[r.jsx(im,{color:"currentColor",height:h,width:h}),!e||t||o?null:r.jsx("div",{css:UL(a),"aria-hidden":!0})]}),o?r.jsx("p",{children:o}):null,u.length>0?r.jsx("div",{css:ZL(a),children:r.jsx("p",{css:JL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null]}):r.jsxs("div",{css:qL,role:"status","aria-live":"polite",children:[o?r.jsx("p",{children:o}):null,r.jsxs("div",{css:WL(),children:[u.length>0?r.jsx("div",{css:KL(a),children:r.jsx("p",{css:GL(a),"aria-label":l.unreadMessagesLabel(t||0),children:u})}):null,e&&!t?r.jsx("div",{css:UL(a),"aria-hidden":!0}):null,s??r.jsx(im,{color:"currentColor",height:h,width:h})]})]})},YL=n.forwardRef((({name:t,ariaLabel:n,size:o="medium",customSize:i,src:s,srcSet:a,onClick:l,notificationCount:c,badgeSize:d="large",disabled:u=!1,customBackgroundColor:h="",labels:p},f)=>{const m=Vf("Avatar",p),g=()=>{u||l?.()},b=!!s||!!a,v=!!l&&!u,y=!!c&&c>0,x=r.jsxs(e.Avatar.Root,{"aria-label":n||t,ref:f,css:HL(o,i,u,h),onClick:g,onKeyDown:e=>{u||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),g())},role:v?"button":"img",tabIndex:v?0:void 0,"aria-disabled":l?u:void 0,children:[b&&r.jsx(e.Avatar.Image,{src:s,srcSet:a,alt:n||t||"Avatar image"}),!b&&t&&r.jsx(e.Avatar.Fallback,{name:t,css:_L}),!b&&!t&&r.jsx(Cm,{size:"100%",style:{padding:"15%",color:u?w("neutral",400):w("primary",800)}})]});return y?r.jsx(XL,{notificationCount:c,size:d,labels:{unreadMessagesLabel:m.unreadMessagesLabel},children:x}):x})),QL=e=>{switch(e){case"success":return{backgroundColor:w("success",100),textColor:w("success",900),borderColor:w("success",300),iconColor:w("success",500)};case"warning":return{backgroundColor:w("warning",100),textColor:w("warning",900),borderColor:w("warning",300),iconColor:w("warning",500)};case"error":return{backgroundColor:w("error",100),textColor:w("error",900),borderColor:w("error",300),iconColor:w("error",500)};case"information":return{backgroundColor:w("information",100),textColor:w("information",900),borderColor:w("information",300),iconColor:w("information",500)};case"general-grey":return{backgroundColor:w("neutral",200),textColor:w("neutral",800),borderColor:w("neutral",300),iconColor:w("neutral",700)};default:return{backgroundColor:w("neutral",100),textColor:w("neutral",800),borderColor:w("neutral",300),iconColor:w("neutral",700)}}},eA=(e,t="full-width",n=!1)=>{const{backgroundColor:r,textColor:o,borderColor:s}=QL(e),a="inline"===t,l=j(100),c=a?`calc(${k(200)} - ${l})`:k(200),d=`calc(${k(200)} - ${l})`;return i.css`
4318
4350
  display: ${a?"inline-flex":"flex"};
4319
4351
  width: ${a?"fit-content":"100%"};
4320
4352
  max-width: 100%;
@@ -4332,7 +4364,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4332
4364
  line-height: ${S(600)};
4333
4365
  font-weight: 400;
4334
4366
  }
4335
- `},QL=e=>{const{iconColor:t}=XL(e);return i.css`
4367
+ `},tA=e=>{const{iconColor:t}=QL(e);return i.css`
4336
4368
  display: flex;
4337
4369
  align-items: center;
4338
4370
  justify-content: center;
@@ -4344,32 +4376,32 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4344
4376
  width: ${k(400)};
4345
4377
  height: ${k(400)};
4346
4378
  }
4347
- `},eA=l.forwardRef((({children:t,icon:n,variant:o,onClose:i,labels:s,isCentered:a=!1,width:c="full-width"},d)=>{const u=Vf("AlertBanner",s),[h,p]=l.useState(!0),f="success"===o?r.jsx(tm,{}):"warning"===o?r.jsx(nm,{}):"error"===o?r.jsx(rm,{}):r.jsx(Kf,{});return h?r.jsxs(e.Alert.Root,{css:YL(o,c,a),children:[r.jsx(e.Alert.Indicator,{css:QL(o),children:n||f}),r.jsx(e.Alert.Content,{flex:a?"initial":"1",children:t}),r.jsx(Sg,{"aria-label":u.closeAlertLabel,pos:"absolute",top:"0.75rem",insetEnd:"0.75rem",onClick:()=>{p(!1),i?.()}})]}):null})),tA=i.css`
4379
+ `},nA=l.forwardRef((({children:t,icon:n,variant:o,onClose:i,labels:s,isCentered:a=!1,width:c="full-width"},d)=>{const u=Vf("AlertBanner",s),[h,p]=l.useState(!0),f="success"===o?r.jsx(tm,{}):"warning"===o?r.jsx(nm,{}):"error"===o?r.jsx(rm,{}):r.jsx(Kf,{});return h?r.jsxs(e.Alert.Root,{css:eA(o,c,a),children:[r.jsx(e.Alert.Indicator,{css:tA(o),children:n||f}),r.jsx(e.Alert.Content,{flex:a?"initial":"1",children:t}),r.jsx(Sg,{"aria-label":u.closeAlertLabel,pos:"absolute",top:"0.75rem",insetEnd:"0.75rem",onClick:()=>{p(!1),i?.()}})]}):null})),rA=i.css`
4348
4380
  height: ${k(200)};
4349
4381
  width: 100%;
4350
4382
  background-color: ${w("neutral",300)};
4351
4383
  display: flex;
4352
4384
  align-items: center;
4353
4385
  justify-content: flex-start;
4354
- `,nA=(e,t)=>i.css`
4386
+ `,oA=(e,t)=>i.css`
4355
4387
  height: 100%;
4356
4388
  width: ${e}%;
4357
4389
  background-color: ${t??w("primary",500)};
4358
4390
  transition: width 0.5s ease-in-out;
4359
- `,rA=i.css`
4391
+ `,iA=i.css`
4360
4392
  width: 100%;
4361
4393
  display: flex;
4362
4394
  align-items: center;
4363
4395
  justify-content: space-between;
4364
4396
  position: relative;
4365
- `,oA=i.css`
4397
+ `,sA=i.css`
4366
4398
  height: 3.75rem;
4367
4399
  width: ${k(2e3)};
4368
4400
  display: flex;
4369
4401
  flex-direction: column;
4370
4402
  align-items: center;
4371
4403
  justify-content: space-between;
4372
- `,iA=(e,t)=>i.css`
4404
+ `,aA=(e,t)=>i.css`
4373
4405
  height: ${k(800)};
4374
4406
  width: ${k(800)};
4375
4407
  display: flex;
@@ -4405,12 +4437,12 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4405
4437
  }
4406
4438
 
4407
4439
  ${t?`\n background-color: ${w("neutral",300)};\n \n &:hover {\n background-color: ${w("neutral",300)};\n box-shadow: none;\n }\n `:""}
4408
- `,sA=e=>i.css`
4440
+ `,lA=e=>i.css`
4409
4441
  color: ${w("neutral",e?800:600)};
4410
4442
  font-size: ${C(300)};
4411
4443
  line-height: ${S(500)};
4412
4444
  font-weight: 400;
4413
- `,aA=i.css`
4445
+ `,cA=i.css`
4414
4446
  height: ${j(100)};
4415
4447
  width: 100%;
4416
4448
  padding: 0 1.875rem;
@@ -4418,25 +4450,25 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4418
4450
  top: ${k(400)};
4419
4451
  left: 0;
4420
4452
  z-index: -1;
4421
- `,lA=i.css`
4453
+ `,dA=i.css`
4422
4454
  height: ${j(100)};
4423
4455
  width: 100%;
4424
4456
  background-color: ${w("neutral",400)};
4425
- `,cA=i.css`
4457
+ `,uA=i.css`
4426
4458
  font-size: ${C(500)};
4427
4459
  line-height: ${S(700)};
4428
4460
  font-weight: 400;
4429
4461
  color: ${w("neutral",800)};
4430
- `,dA=i.css`
4462
+ `,hA=i.css`
4431
4463
  font-size: ${C(400)};
4432
4464
  line-height: ${S(600)};
4433
4465
  font-weight: 400;
4434
4466
  color: ${w("neutral",700)};
4435
- `,uA=i.css`
4467
+ `,pA=i.css`
4436
4468
  padding: 0.375rem;
4437
- `,hA=i.css`
4469
+ `,fA=i.css`
4438
4470
  padding: 0.375rem;
4439
- `;let pA=!1;const fA=new Set,mA=e=>{let t,n=!1;const r=()=>{n&&(n=!1,(()=>{pA=!1;const[e]=fA;e&&(fA.delete(e),e())})())},o=()=>{pA=!0,n=!0,t=void 0,e()};return pA?(t=()=>o(),fA.add(t)):o(),()=>{n?r():t&&fA.delete(t)}},gA={pauseOnPageIdle:!0,offsets:"1.5rem"},bA={"top-start":e.createToaster({placement:"top-start",...gA}),top:e.createToaster({placement:"top",...gA}),"top-end":e.createToaster({placement:"top-end",...gA}),"bottom-start":e.createToaster({placement:"bottom-start",...gA}),bottom:e.createToaster({placement:"bottom",...gA}),"bottom-end":e.createToaster({placement:"bottom-end",...gA})};exports.AlertBanner=eA,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Vf("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:FC,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:WC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:qC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Bf,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(Gf,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:UC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:UC,children:i})]})})},exports.Avatar=JL,exports.Badge=ZL,exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Vf("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.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)}),[]),r.jsx("div",{ref:p,css:dw(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:uw,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:hw,children:[o?r.jsx("div",{css:pw,children:o.map((e=>r.jsxs("div",{children:[r.jsx(cb,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:fw,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:mw,children:s.map((e=>{return r.jsxs("div",{css:gw(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
4471
+ `;let mA=!1;const gA=new Set,bA=e=>{let t,n=!1;const r=()=>{n&&(n=!1,(()=>{mA=!1;const[e]=gA;e&&(gA.delete(e),e())})())},o=()=>{mA=!0,n=!0,t=void 0,e()};return mA?(t=()=>o(),gA.add(t)):o(),()=>{n?r():t&&gA.delete(t)}},vA={pauseOnPageIdle:!0,offsets:"1.5rem"},yA={"top-start":e.createToaster({placement:"top-start",...vA}),top:e.createToaster({placement:"top",...vA}),"top-end":e.createToaster({placement:"top-end",...vA}),"bottom-start":e.createToaster({placement:"bottom-start",...vA}),bottom:e.createToaster({placement:"bottom",...vA}),"bottom-end":e.createToaster({placement:"bottom-end",...vA})};exports.AlertBanner=nA,exports.AnalysisWidget=({children:t,header:o,footer:i,expanded:s=!0,collapsible:a=!0,actions:l,showFooterOnCollapsed:c=!1,labels:d})=>{Vf("AnalysisWidget",d);const u="analysis-widget-item",[h,p]=n.useState(s),f=`analysis-widget-header-${u}`;return r.jsx(e.Box,{as:"section","aria-labelledby":f,css:WC,children:r.jsxs(e.Accordion.Root,{multiple:!0,value:a?void 0:[u],defaultValue:s?[u]:[],children:[r.jsxs(e.Accordion.Item,{css:KC,value:u,children:[o&&r.jsx(e.Accordion.ItemTrigger,{id:f,"aria-expanded":h,css:UC,pointerEvents:a?"auto":"none",onClick:a?()=>{p(!h)}:void 0,children:r.jsxs(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"top",justifyContent:"space-between",children:[o,l&&l.map((e=>r.jsx(Bf,{variant:"secondary",size:"small",label:e.label,onClick:t=>{e.onClick(),t.preventDefault(),t.stopPropagation()},leftIcon:e?.icon},e.label))),a&&r.jsx(e.Accordion.ItemIndicator,{height:"1rem",marginTop:"0.5rem",display:"flex",children:r.jsx(Gf,{"aria-hidden":"true",color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]})}),r.jsxs("div",{className:h?"item-content-open":"item-content-closed","aria-hidden":!h,children:[t,!c&&i&&r.jsx(e.Box,{css:GC,children:i})]})]}),c&&i&&r.jsx(e.Box,{css:GC,children:i})]})})},exports.Avatar=YL,exports.Badge=XL,exports.BaseMap=({title:e,caption:t,additionalSettings:o,options:s,onOptionSelected:a,maxHeight:l="25rem",maxWidth:c="16.25rem",labels:d})=>{const u=Vf("BaseMap",d),h=n.useRef(null),p=n.useRef(null);return n.useEffect((()=>{const e=h.current,t=p.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)}),[]),r.jsx("div",{ref:p,css:dw(l,c),children:r.jsxs("div",{className:"ds-base-map-scroll-content",children:[r.jsxs("div",{css:uw,children:[r.jsx("h2",{ref:h,className:"ds-base-map-header-title",tabIndex:-1,children:e}),r.jsx("p",{className:"ds-base-map-header-caption",children:t})]}),r.jsxs("div",{css:hw,children:[o?r.jsx("div",{css:pw,children:o.map((e=>r.jsxs("div",{children:[r.jsx(cb,{css:{},checked:e.checked,onCheckedChange:({checked:t})=>e.onCheckedChange({checked:Boolean(t)}),children:e.label}),e.checked&&e.children?r.jsx("div",{css:fw,children:e.children}):null]},e.label)))}):null,s?r.jsx("div",{css:mw,children:s.map((e=>{return r.jsxs("div",{css:gw(e.active),role:"button","aria-label":`${e.label}${e.caption?`, ${e.caption}`:""}`,onClick:()=>a?.(e),tabIndex:0,onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),a?.(e))},children:[r.jsx("div",{css:(t=e.imageUrl,i.css`
4440
4472
  height: ${k(800)};
4441
4473
  width: ${k(800)};
4442
4474
  border: ${j(100)} solid ${w("neutral",300)};
@@ -4444,7 +4476,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4444
4476
  background-image: url(${t});
4445
4477
  background-size: cover;
4446
4478
  background-position: center;
4447
- `)}),r.jsxs("div",{css:bw,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(mv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Wf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:IO(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:PO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:zO,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:PO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:IO(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:IO(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:PO(a),children:o||r.jsx(Gf,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Bf,exports.Checkbox=cb,exports.CheckboxList=({label:e,caption:t,checkboxes:o,defaultValues:i,onCheckedChange:s,errorMessage:a,horizontal:l,required:c,hideCheckedCounter:d=!1,hideExpandToggle:u=!1,labels:h})=>{const p=Vf("CheckboxList",h),f=Array.isArray(i)?i:[],m=n.useMemo((()=>new Set(f)),[f]),[g,b]=n.useState((()=>o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:m.has(n),e}),{}))),[v,y]=n.useState(!0);n.useEffect((()=>{b((e=>{const t=o.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??m.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[o,m]);const x="string"!=typeof e,w=o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!g[n],e}),{}),C=o.length>0&&o.every((e=>e.name&&w[e.name])),k=o.some((e=>e.name&&w[e.name]))&&!C,S=o.length,$=`${o.filter((e=>e?.name&&w[e.name])).length} / ${S}`,j=t?`${t}.`:"",M=c?p.requiredLabel:p.optionalLabel,E=a?`${p.errorPrefix} ${a}.`:"",T=`${x?e.label:e}. ${j} ${M} ${E} `,O="string"==typeof e?e:r.jsxs("div",{css:Zb,children:[r.jsxs(cb,{checked:C,indeterminate:k,onCheckedChange:e=>(e=>{const t=o.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});b(t),s?.(t)})(!!e.checked),children:[e.label," ",!d&&r.jsx("span",{"aria-hidden":"true",css:Ub,children:$})]}),!u&&r.jsxs("button",{type:"button",onClick:()=>y((e=>!e)),"aria-expanded":v,"aria-controls":"checkbox-list",css:Kb,children:[v?p.hideLabel:p.expandLabel,r.jsx("span",{"aria-hidden":"true",css:Gb(v),children:r.jsx(Gf,{})})]})]});return r.jsx(ag,{label:O,caption:t,errorMessage:a,required:"string"==typeof e&&c,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:p.requiredSymbolLabel},containerProps:{"aria-label":T},children:r.jsx("div",{id:"checkbox-list",css:Fb(v),children:r.jsx("div",{css:qb,children:r.jsx("div",{css:Wb(l),children:o.map((e=>{const{onCheckedChange:t,...n}=e;return r.jsx(cb,{ms:x&&!l?"6":"",css:{},checked:!!e?.name&&!!w[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...g};t&&(n[t]=e,b(n)),s&&s(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})})})})},exports.CheckboxOptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.CheckboxGroup,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((n=>{return r.jsxs(e.CheckboxCard.Root,{css:db,defaultChecked:-1!==t?.indexOf(n.value),disabled:n.disabled,value:n.value,children:[r.jsx(e.CheckboxCard.HiddenInput,{}),r.jsxs(e.CheckboxCard.Control,{css:ub,children:[r.jsxs(e.CheckboxCard.Content,{css:(s=n.variant,i.css`
4479
+ `)}),r.jsxs("div",{css:bw,children:[r.jsxs("div",{className:"ds-base-map-title-container",children:[r.jsx("p",{className:"ds-base-map-title",children:e.label}),e.active?r.jsx(mv,{label:u.activeLabel,variant:"warning",size:"small",icon:r.jsx(Wf,{})}):null]}),r.jsx("p",{className:"ds-base-map-caption",children:e.caption}),e.active&&e.children?r.jsx("div",{className:"ds-base-map-children",children:e.children}):null]})]},e.label);var t}))}):null]})]})})},exports.Breadcrumb=({links:t,separator:o,maxItems:i=99,linkRouter:s,size:a="default"})=>{const[l,c]=n.useState(t.length>i);n.useEffect((()=>{c(t.length>i)}),[t.length]);const d=s;return r.jsx(e.Breadcrumb.Root,{children:r.jsx(e.Breadcrumb.List,{gap:"small"===a?"0.375rem":"0.625rem",children:l?r.jsxs(r.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:zO(a),children:r.jsxs(d,{to:t[0].link,href:t[0].link,children:[t[0].icon,t[0].label]})}),r.jsx(e.Breadcrumb.Separator,{css:VO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx("li",{className:"chakra-breadcrumb__item",children:r.jsx("button",{css:BO,type:"button",onClick:()=>c(!1),children:"..."})}),r.jsx(e.Breadcrumb.Separator,{css:VO(a),children:o||r.jsx(Gf,{rotate:"270"})}),r.jsx(e.Breadcrumb.Item,{css:zO(a),children:r.jsxs("p",{"aria-current":"page","aria-label":t[t.length-1].label,children:[t[t.length-1].icon,t[t.length-1].label]})})]}):t.map(((i,s)=>i?.label?r.jsxs(n.Fragment,{children:[r.jsx(e.Breadcrumb.Item,{css:zO(a),children:s<t.length-1?r.jsxs(d,{to:i.link,href:i.link,children:[i.icon,i.label]}):r.jsxs("p",{"aria-current":"page","aria-label":i.label,children:[i.label&&i.icon?i.icon:"",i.label]})}),s<t.length-1?r.jsx(e.Breadcrumb.Separator,{css:VO(a),children:o||r.jsx(Gf,{rotate:"270"})}):null]},i.label):null))})})},exports.Button=Bf,exports.Checkbox=cb,exports.CheckboxList=({label:e,caption:t,checkboxes:o,defaultValues:i,onCheckedChange:s,errorMessage:a,horizontal:l,required:c,hideCheckedCounter:d=!1,hideExpandToggle:u=!1,labels:h})=>{const p=Vf("CheckboxList",h),f=Array.isArray(i)?i:[],m=n.useMemo((()=>new Set(f)),[f]),[g,b]=n.useState((()=>o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:m.has(n),e}),{}))),[v,y]=n.useState(!0);n.useEffect((()=>{b((e=>{const t=o.filter((e=>e.name)).reduce(((t,n)=>{const r=n.name;return t[r]="boolean"==typeof n.checked?n.checked:e[r]??m.has(r),t}),{});return Object.keys(e).length===Object.keys(t).length&&Object.entries(t).every((([t,n])=>e[t]===n))?e:t}))}),[o,m]);const x="string"!=typeof e,w=o.filter((e=>e.name)).reduce(((e,t)=>{const n=t.name;return e[n]="boolean"==typeof t.checked?t.checked:!!g[n],e}),{}),C=o.length>0&&o.every((e=>e.name&&w[e.name])),k=o.some((e=>e.name&&w[e.name]))&&!C,S=o.length,$=`${o.filter((e=>e?.name&&w[e.name])).length} / ${S}`,j=t?`${t}.`:"",M=c?p.requiredLabel:p.optionalLabel,E=a?`${p.errorPrefix} ${a}.`:"",T=`${x?e.label:e}. ${j} ${M} ${E} `,O="string"==typeof e?e:r.jsxs("div",{css:Zb,children:[r.jsxs(cb,{checked:C,indeterminate:k,onCheckedChange:e=>(e=>{const t=o.filter((e=>void 0!==e.name)).reduce(((t,n)=>(t[n.name]=e,t)),{});b(t),s?.(t)})(!!e.checked),children:[e.label," ",!d&&r.jsx("span",{"aria-hidden":"true",css:Ub,children:$})]}),!u&&r.jsxs("button",{type:"button",onClick:()=>y((e=>!e)),"aria-expanded":v,"aria-controls":"checkbox-list",css:Kb,children:[v?p.hideLabel:p.expandLabel,r.jsx("span",{"aria-hidden":"true",css:Gb(v),children:r.jsx(Gf,{})})]})]});return r.jsx(ag,{label:O,caption:t,errorMessage:a,required:"string"==typeof e&&c,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:p.requiredSymbolLabel},containerProps:{"aria-label":T},children:r.jsx("div",{id:"checkbox-list",css:Fb(v),children:r.jsx("div",{css:qb,children:r.jsx("div",{css:Wb(l),children:o.map((e=>{const{onCheckedChange:t,...n}=e;return r.jsx(cb,{ms:x&&!l?"6":"",css:{},checked:!!e?.name&&!!w[e.name],onCheckedChange:({checked:n})=>{((e,t)=>{const n={...g};t&&(n[t]=e,b(n)),s&&s(n)})(n,e.name),t?.({checked:!!n})},...n},e.name)}))})})})})},exports.CheckboxOptionCard=({defaultValue:t,items:n,onValueChange:o})=>r.jsx(e.CheckboxGroup,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n.map((n=>{return r.jsxs(e.CheckboxCard.Root,{css:db,defaultChecked:-1!==t?.indexOf(n.value),disabled:n.disabled,value:n.value,children:[r.jsx(e.CheckboxCard.HiddenInput,{}),r.jsxs(e.CheckboxCard.Control,{css:ub,children:[r.jsxs(e.CheckboxCard.Content,{css:(s=n.variant,i.css`
4448
4480
  width: 100%;
4449
4481
  display: flex;
4450
4482
  flex-direction: ${"centered"===s?"column":"row"};
@@ -4487,9 +4519,9 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4487
4519
  0 -0.25rem 0.375rem -0.25rem #0000001a,
4488
4520
  0 -0.625rem 0.9375rem -0.1875rem #0000001a;
4489
4521
  }
4490
- `),"data-nav-source":J,onPointerMove:Y,children:[r.jsx(e.Combobox.Empty,{css:Pv,children:N.noItemsFoundLabel}),H?r.jsxs(e.Combobox.Item,{css:Iv,item:{label:V,value:B},children:[r.jsx(sm,{}),N.createOptionLabel(V)]},B):null,_.items.map((t=>r.jsxs(e.Combobox.Item,{css:Dv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g&&q.length>0?r.jsx("div",{css:zv,children:q.map((e=>r.jsx(mv,{label:e.label,variant:"info-white",onClose:()=>R(A.filter((t=>t!==e.value))),closable:!0},e.value)))}):null]})});var Q},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:HC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:_C,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=ag,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:VO(n,o),children:r.jsxs("div",{css:BO(i),children:[r.jsxs("div",{css:FO,children:[r.jsx(om,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:HO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:_O,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:ob,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:sb}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ib,children:e}):null,t?r.jsx("p",{id:a,css:ab,children:t}):null,o]})]})},exports.GuidedTour=({open:e,onOpenChange:t,steps:n,activeStepIndex:o,onStepChange:s,onFinish:a,onSkip:l,variant:c="dark",closeOnEscape:d=!0,closeOnOutsideClick:u=!1,labels:h})=>{const p=Vf("GuidedTour",h),f=n.length,m=n[o];if(!e||!m||0===f)return null;const g=0===o,b=o===f-1,v="dark"===c,y=()=>{a?a():t(!1)},x=r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.25rem"},children:[m.icon,r.jsx("p",{style:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"bold",marginBottom:m.caption?"0.25rem":0,color:w("neutral",v?100:800)},children:m.title})]}),m.caption?r.jsx("p",{style:{fontSize:"0.875rem",lineHeight:"1.25rem",color:w("neutral",v?200:700)},children:m.caption}):null]}),C=r.jsxs("div",{css:ow,children:[r.jsxs("div",{css:iw,children:[r.jsxs("div",{css:sw,children:[r.jsx(_f,{css:lw(v),icon:r.jsx(Jf,{}),"aria-label":p.previousStepLabel,disabled:g,onClick:()=>s(o-1)}),r.jsx("p",{css:aw(v),children:p.stepCounterLabel(o+1,f)}),r.jsx(_f,{css:[lw(v),i.css`
4522
+ `),"data-nav-source":J,onPointerMove:Y,children:[r.jsx(e.Combobox.Empty,{css:Pv,children:N.noItemsFoundLabel}),H?r.jsxs(e.Combobox.Item,{css:Iv,item:{label:V,value:B},children:[r.jsx(sm,{}),N.createOptionLabel(V)]},B):null,_.items.map((t=>r.jsxs(e.Combobox.Item,{css:Dv,item:t,children:[t.label,r.jsx(e.Combobox.ItemIndicator,{})]},t.value)))]})})}),g&&q.length>0?r.jsx("div",{css:zv,children:q.map((e=>r.jsx(mv,{label:e.label,variant:"info-white",onClose:()=>R(A.filter((t=>t!==e.value))),closable:!0},e.value)))}):null]})});var Q},exports.DesignSystemLocaleProvider=({labels:e,children:r})=>{const o=n.useMemo((()=>({labels:e})),[e]);return t.jsx(M.Provider,{value:o,children:r})},exports.ExtendableCard=({children:t,header:n,footer:o})=>r.jsx(e.Box,{css:FC,children:r.jsx(e.Accordion.Root,{multiple:!0,children:r.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[r.jsxs(e.Accordion.ItemTrigger,{css:qC,alignItems:"center",children:[r.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:n}),r.jsx(e.Accordion.ItemIndicator,{children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsxs(e.Accordion.ItemContent,{children:[t,o]})]})})}),exports.FieldWrapper=ag,exports.Footer=({children:e,label:t="© World Resources Institute",fixed:n,filled:o,maxWidth:i,additionalLogos:s})=>{const a=(new Date).getFullYear();return r.jsx("footer",{css:HO(n,o),children:r.jsxs("div",{css:_O(i),children:[r.jsxs("div",{css:WO,children:[r.jsx(om,{height:"2rem",width:"5.6875rem"}),s&&s.map(((e,t)=>r.jsx("div",{children:e},t)))]}),r.jsx("div",{css:FO,children:e}),r.jsx("div",{children:r.jsxs("p",{css:qO,children:[t," ",a]})})]})})},exports.FormContainer=({label:e,error:t,children:o})=>{const i=n.useId(),s=e?`${i}-label`:void 0,a=t?`${i}-error`:void 0;return r.jsxs("div",{css:ob,role:"group","aria-labelledby":s,"aria-describedby":a,children:[t?r.jsx("div",{css:sb}):null,r.jsxs("div",{children:[e?r.jsx("p",{id:s,css:ib,children:e}):null,t?r.jsx("p",{id:a,css:ab,children:t}):null,o]})]})},exports.GuidedTour=({open:e,onOpenChange:t,steps:n,activeStepIndex:o,onStepChange:s,onFinish:a,onSkip:l,variant:c="dark",closeOnEscape:d=!0,closeOnOutsideClick:u=!1,labels:h})=>{const p=Vf("GuidedTour",h),f=n.length,m=n[o];if(!e||!m||0===f)return null;const g=0===o,b=o===f-1,v="dark"===c,y=()=>{a?a():t(!1)},x=r.jsxs("div",{children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.25rem"},children:[m.icon,r.jsx("p",{style:{fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"bold",marginBottom:m.caption?"0.25rem":0,color:w("neutral",v?100:800)},children:m.title})]}),m.caption?r.jsx("p",{style:{fontSize:"0.875rem",lineHeight:"1.25rem",color:w("neutral",v?200:700)},children:m.caption}):null]}),C=r.jsxs("div",{css:ow,children:[r.jsxs("div",{css:iw,children:[r.jsxs("div",{css:sw,children:[r.jsx(_f,{css:lw(v),icon:r.jsx(Jf,{}),"aria-label":p.previousStepLabel,disabled:g,onClick:()=>s(o-1)}),r.jsx("p",{css:aw(v),children:p.stepCounterLabel(o+1,f)}),r.jsx(_f,{css:[lw(v),i.css`
4491
4523
  color: ${w("primary",600)};
4492
- `],icon:r.jsx(Zf,{}),"aria-label":b?p.finishLabel:p.nextStepLabel,onClick:b?y:()=>s(o+1)})]}),b?r.jsx(Bf,{variant:"primary",size:"small",label:p.startExploringLabel,onClick:y}):r.jsx(Bf,{css:cw(v),variant:"borderless",size:"small",label:p.skipAllLabel,onClick:()=>{l?l():t(!1)}})]}),m.footer]});return r.jsx(rw,{open:e,onOpenChange:t,anchorRef:m.anchorRef,placement:m.placement,offset:m.offset,variant:c,closeOnEscape:d,closeOnOutsideClick:u,header:x,content:m.content,footer:C,labels:m.labels})},exports.IconButton=_f,exports.InlineMessage=kO,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Jb,children:r.jsx(ag,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Xb(!!i,a),attached:!0,children:["start"===a?r.jsx(vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(gg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=dC,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const p=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},f=Object.values(d).filter((e=>!0===e)).length,m=c.groupAriaLabel(t,f,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Cw,alignItems:"flex-start","aria-label":m,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:kw,children:[t,r.jsx(mv,{label:c.activeTagLabel(f),size:"small",variant:f>0?"success":"info-grey"})]}),r.jsx("div",{css:Sw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(jb,{name:t,value:h,customGap:"0",onChange:(e,t)=>p(e,!!t,a,t),children:s.map((e=>r.jsx(Ow,{...e,onChange:(t,n)=>p(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:ww,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=Ow,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Lw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:Aw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Rw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Nw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:Dw,children:[r.jsx("div",{css:Iw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Pw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:zw,children:e}),r.jsx("p",{css:Vw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Xf,{}),onClick:s})]}),a,r.jsxs("div",{css:Bw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Ww,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=yC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(sm,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(am,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(lm,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(cm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(dm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(um,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(hm,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Jg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=yw,exports.MapMarkers=xw,exports.MapPopUp=rw,exports.Menu=Bm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(Sg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:SO,children:[r.jsxs("div",{css:$O,children:[r.jsx("div",{css:jO,children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(gg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:MO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:EO,children:[r.jsx("h3",{css:TO,children:A}),i?r.jsx("div",{css:OO,children:r.jsx(kO,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:LO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:AO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:RO,children:[r.jsx("p",{css:NO,children:t.label}),r.jsx("p",{css:DO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>GO(o,t)));return r.jsx("div",{css:qO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=GO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:WO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:UO,children:[i,a?r.jsx("div",{css:KO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Hk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:_k(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Fk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:qk,asChild:!0,children:r.jsx(Sg,{})})]}),r.jsx(e.Dialog.Body,{css:Wk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,labels:u,...h})=>{const p=Vf("MultiActionButton",u),[f,m]=n.useState(!1),g=l?p.disabledAriaLabel(i):void 0;return r.jsxs(e.Group,{css:tb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":g,role:"group",children:[r.jsx(Bf,{...h,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>m(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:Qg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:nb,"aria-label":p.openOptionsLabel(i),"aria-haspopup":"menu","aria-expanded":f,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:f?"180":"0",color:Yg(t,l)}),disabled:l})}),r.jsx(rb,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:eb(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=bL),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=bL||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>bL&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=bL||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:ZO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:XO(y&&!k,d,T),children:[r.jsxs("div",{css:YO(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:QO,children:o}):null,r.jsx("div",{css:eL(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:tL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:nL(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:iL(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Xf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(wm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:nL(T),children:l?.map(((e,t)=>r.jsx("div",{css:rL(y),children:e},t)))}),c?.length?r.jsx("div",{css:oL(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:JO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:tL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(gL,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:vL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:yL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:xL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:wL,children:[r.jsx("div",{css:xL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:CL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Ww,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
4524
+ `],icon:r.jsx(Zf,{}),"aria-label":b?p.finishLabel:p.nextStepLabel,onClick:b?y:()=>s(o+1)})]}),b?r.jsx(Bf,{variant:"primary",size:"small",label:p.startExploringLabel,onClick:y}):r.jsx(Bf,{css:cw(v),variant:"borderless",size:"small",label:p.skipAllLabel,onClick:()=>{l?l():t(!1)}})]}),m.footer]});return r.jsx(rw,{open:e,onOpenChange:t,anchorRef:m.anchorRef,placement:m.placement,offset:m.offset,variant:c,closeOnEscape:d,closeOnOutsideClick:u,header:x,content:m.content,footer:C,labels:m.labels})},exports.IconButton=_f,exports.InlineMessage=$O,exports.InputWithUnits=({label:t,caption:o,errorMessage:i,units:s,unitsPosition:a="end",defaultUnit:l="",defaultValue:c="",onChange:d,required:u,disabled:h})=>{const[p,f]=n.useState(c),[m,g]=n.useState(l?[l]:[s[0].value]),b=(e,t)=>{d&&d("end"===a?""+(t?`${p} ${e}`:`${e} ${m}`):""+(t?`${e} ${p}`:`${m} ${e}`))};return r.jsx("div",{css:Jb,children:r.jsx(ag,{label:t,caption:o,errorMessage:i,required:u,disabled:h,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs(e.Group,{css:Xb(!!i,a),attached:!0,children:["start"===a?r.jsx(vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null,r.jsx(gg,{type:"number","aria-label":`${t} value`,value:p,disabled:h,noMarginBottom:!0,onChange:e=>{f(e.target.value),b(e.target.value)}}),"end"===a?r.jsx(vv,{placeholder:"","aria-label":`${t} unit`,value:m,items:s,disabled:h,onChange:e=>{g(e),b(e?.[0],!0)}}):null]})})})},exports.ItemCount=hC,exports.LayerGroup=({label:t,caption:o,value:i,layerItems:s,onChangeForRadioVariant:a,labels:l})=>{const c=Vf("LayerGroup",l),[d,u]=n.useState({}),[h,p]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(s));n.useEffect((()=>{let e={...d};s.forEach((n=>{n.isDefaultSelected&&(e={...e,["radio"===n.variant?t:n.name]:n.isDefaultSelected})})),u(e)}),[]);const f=(e,t,n,r)=>{const o={...d,[e]:t};u(o),n&&n(e,t,r)},m=Object.values(d).filter((e=>!0===e)).length,g=c.groupAriaLabel(t,m,o);return r.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[r.jsxs(e.Accordion.ItemTrigger,{css:Cw,alignItems:"flex-start","aria-label":g,children:[r.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[r.jsxs("span",{css:kw,children:[t,r.jsx(mv,{label:c.activeTagLabel(m),size:"small",variant:m>0?"success":"info-grey"})]}),r.jsx("div",{css:Sw,children:o})]}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{paddingLeft:"1rem",paddingRight:"1rem",children:r.jsx(jb,{name:t,value:h,customGap:"0",onChange:(e,t)=>{p(t),f(e,!!t,a,t)},children:s.map((e=>r.jsx(Ow,{...e,onChange:(t,n)=>f(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:t,defaultValue:n,...o})=>r.jsx("div",{css:ww,style:{width:"100%"},children:r.jsx(e.Accordion.Root,{css:{},defaultValue:n,multiple:!0,...o,children:t})}),exports.LayerItem=Ow,exports.LayerParameters=({label:t,children:o,openedByDefault:i})=>r.jsx("div",{children:r.jsx(e.Accordion.Root,{defaultValue:i?[t]:[],multiple:!0,children:r.jsxs(e.Accordion.Item,{css:Lw,value:t,children:[r.jsxs(e.Accordion.ItemTrigger,{css:Aw,children:[r.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:r.jsx("p",{css:Rw,children:t})}),r.jsx(e.Accordion.ItemIndicator,{display:"flex",children:r.jsx(Gf,{color:"var(--chakra-colors-neutral-700)",height:"1rem",width:"1rem"})})]}),r.jsx(e.Accordion.ItemContent,{css:Nw,children:n.Children.map(o,(e=>r.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:t,onDrag:n,onUpClick:o,onDownClick:i,onRemoveClick:s,children:a,onInfoClick:l,onOpacityChanged:c,labels:d})=>{const u=Vf("LegendItem",d);return r.jsxs("div",{css:Dw,children:[r.jsx("div",{css:Iw,children:r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:[r.jsx(_f,{icon:r.jsx(Gf,{rotate:"180"}),"aria-label":u.upLabel,onClick:o}),r.jsx(_f,{icon:r.jsx(Gf,{}),"aria-label":u.downLabel,onClick:i})]})}),r.jsxs("div",{style:{width:"100%"},children:[r.jsxs("div",{css:Pw,children:[r.jsxs("div",{children:[r.jsx("h3",{css:Vw,children:e}),r.jsx("p",{css:Bw,children:t})]}),r.jsx(Bf,{label:u.removeLabel,size:"small",variant:"secondary",rightIcon:r.jsx(Xf,{}),onClick:s})]}),a?r.jsx("div",{css:zw,children:a}):null,r.jsxs("div",{css:Hw,children:[r.jsx(Bf,{label:u.aboutDataLabel,size:"small",variant:"secondary",leftIcon:r.jsx(Kf,{}),onClick:l}),r.jsx(Kw,{defaultValue:80,onOpacityChanged:c})]})]})]})},exports.List=wC,exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:n,onExpandClick:r,onShareClick:o,onPrintClick:i,onSettingsClick:s,onQuestionClick:a,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u,labels:h})=>{const p=Vf("MapControlsToolbar",h),f=[{icon:t.jsx(sm,{}),label:p.zoomInLabel,ariaLabel:p.zoomInAriaLabel,onClick:e},{icon:t.jsx(am,{}),label:p.zoomOutLabel,ariaLabel:p.zoomOutAriaLabel,onClick:n,gap:!0},{icon:t.jsx(lm,{}),label:p.expandLabel,ariaLabel:p.expandAriaLabel,onClick:r,gap:!0},{icon:t.jsx(cm,{}),label:p.shareLabel,ariaLabel:p.shareAriaLabel,onClick:o,gap:!0},{icon:t.jsx(dm,{}),label:p.printLabel,ariaLabel:p.printAriaLabel,onClick:i,gap:!0},{icon:t.jsx(um,{}),label:p.settingsLabel,ariaLabel:p.settingsAriaLabel,onClick:s,gap:!0},{icon:t.jsx(hm,{}),label:p.helpLabel,ariaLabel:p.helpAriaLabel,onClick:a}];return t.jsx(Jg,{items:f,vertical:l,expanded:c,showExpandedToggle:d,ariaLabel:u||p.toolbarAriaLabel})},exports.MapMarker=yw,exports.MapMarkers=xw,exports.MapPopUp=rw,exports.Menu=Bm,exports.MobileSearch=({value:t,placeholder:o,showInfoMessage:i=!0,items:s=[],disabled:a,readOnly:l,id:c,name:d,autoFocus:u,autoComplete:h,onBlur:p,onFocus:f,onQueryChange:m,onCancel:g,onItemClick:b,onChange:v,labels:y})=>{const x=Vf("MobileSearch",y),[C,k]=n.useState(t??""),[S,$]=n.useState(!0),[j,M]=n.useState(!1),E=n.useRef(null),T="string"==typeof t,O=T?t:C;n.useEffect((()=>{T&&k(t)}),[T,t]),n.useEffect((()=>{m?.(O)}),[O,m]);const L=n.useMemo((()=>{const e=O.trim().toLowerCase();return e?s.filter((t=>`${t.id??""} ${t.label} ${t.caption??""}`.toLowerCase().includes(e))):s}),[s,O]),A=O.trim().length?x.matchingResultsTitle(L.length):x.recentSearchesTitle,R=O.length?r.jsx(Sg,{onClick:()=>{T||k("");const e=E.current?.querySelector("input");e&&(e.value="",e.focus()),$(!0)}}):null;let N=w("neutral",500);return a?N=w("neutral",500):j&&(N=w("primary",700)),r.jsxs("div",{ref:E,css:jO,children:[r.jsxs("div",{css:MO,children:[r.jsx("div",{css:EO,children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:"1.25rem",height:"1.25rem",fill:N,"aria-hidden":"true"}),endElement:R,children:r.jsx(gg,{label:"",value:O,placeholder:o??x.inputAriaLabel,onChange:e=>{T||k(e.target.value),$(!0),v?.(e)},onFocus:e=>{M(!0),$(!0),f?.(e)},onBlur:e=>{M(!1),p?.(e)},noMarginBottom:!0,type:"search","aria-label":o??x.inputAriaLabel,disabled:a,readOnly:l,id:c,name:d,autoFocus:u??!0,autoComplete:h,style:{paddingLeft:"2.5rem"}})})}),r.jsx(Bf,{css:TO,variant:"borderless",label:x.cancelLabel,onClick:()=>{T||k(""),$(!1);const e=E.current?.querySelector("input");e&&(e.value="",e.blur()),g?.()}})]}),S?r.jsxs("div",{css:OO,children:[r.jsx("h3",{css:LO,children:A}),i?r.jsx("div",{css:AO,children:r.jsx($O,{label:x.infoLabel,variant:"info-white",size:"full-width"})}):null,r.jsx("ul",{css:RO,"aria-label":A,children:L.map((t=>r.jsx("li",{children:r.jsxs(e.chakra.button,{type:"button",css:NO,onClick:()=>(e=>{b?.(e)})(t),"aria-label":`${t.label}, ${t.caption??""}`,style:{width:"100%"},children:[t.icon??null,r.jsxs("div",{css:DO,children:[r.jsx("p",{css:IO,children:t.label}),r.jsx("p",{css:PO,children:t.caption})]})]})},t.id)))})]}):null]})},exports.MobileTabBar=({defaultValue:t,tabs:o,onTabClick:i,hideLabels:s,activationMode:a="manual",labels:l})=>{const c=Vf("MobileTabBar",l),d=o.length,[u,h]=n.useState((()=>JO(o,t)));return r.jsx("div",{css:UO,children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:t||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=JO(o,e);h(t),i&&i(e)})(e),activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((t,n)=>{const{label:o,icon:i,bagdeCount:a,"aria-label":l,"aria-describedby":h,disabled:p,...f}=t,m=`${t.value}-str-status`,g=u===n,b=[c.tabPositionStatus(n+1,d),g?c.selectedStatus:c.notSelectedStatus];p&&b.push(c.disabledStatus);const v=[h,m].filter(Boolean).join(" ")||void 0;return r.jsxs(e.Tabs.Trigger,{css:KO,"aria-label":l||o,"aria-disabled":!!p||void 0,"aria-describedby":v,disabled:p,...f,children:[r.jsxs("div",{css:GO,children:[i,a?r.jsx("div",{css:ZO,className:"ds-badge-count",children:a}):null]}),s?null:r.jsx("p",{children:o}),r.jsx(e.VisuallyHidden,{id:m,children:b.join(", ")})]},t.value)}))})})})},exports.Modal=({header:t,content:o,footer:i,size:s="medium",width:a,height:l,maxHeight:c,draggable:d,blocking:u,open:h,onClose:p,labels:f,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,trapFocus:w})=>{const C=Vf("Modal",f),k=n.useRef(null);return h?r.jsx(e.Dialog.Root,{open:h,onOpenChange:p,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!d&&!u,preventScroll:!d&&!u,closeOnEscape:!u,defaultOpen:!0,trapFocus:w,lazyMount:m,unmountOnExit:g,restoreFocus:b,modal:v,initialFocusEl:y,finalFocusEl:x,children:r.jsxs(e.Portal,{children:[d?null:r.jsx(e.Dialog.Backdrop,{css:{background:"rgba(0, 0, 0, 0.64)"}}),r.jsx(Fk,{disabled:!d,nodeRef:k,children:r.jsx(e.Dialog.Positioner,{ref:k,children:r.jsxs(e.Dialog.Content,{"aria-label":C.dialogAriaLabel,css:qk(s,a,l,c),children:[r.jsxs(e.Dialog.Header,{css:Wk,children:[t,u?null:r.jsx(e.Dialog.CloseTrigger,{css:Uk,asChild:!0,children:r.jsx(Sg,{})})]}),r.jsx(e.Dialog.Body,{css:Kk,children:o}),i?r.jsx(e.Dialog.Footer,{padding:"0.75rem",children:i}):null]})})})]})}):null},exports.MultiActionButton=({variant:t="primary",size:o="default",mainActionLabel:i,mainActionOnClick:s=()=>{},otherActions:a=[],disabled:l,mainActionLeftIcon:c,mainActionRightIcon:d,labels:u,...h})=>{const p=Vf("MultiActionButton",u),[f,m]=n.useState(!1),g=l?p.disabledAriaLabel(i):void 0;return r.jsxs(e.Group,{css:tb,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":g,role:"group",children:[r.jsx(Bf,{...h,label:i,variant:t,size:o,onClick:s,disabled:l,leftIcon:c,rightIcon:d}),r.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>m(e),positioning:{placement:"bottom-end"},onSelect:({value:e})=>{const t=a.find((t=>t.value===e));t&&!t.disabled&&t.onClick()},children:[r.jsx(e.Menu.Trigger,{css:Qg(t),"data-group-item":!0,"data-last":!0,asChild:!0,children:r.jsx(Bf,{style:nb,"aria-label":p.openOptionsLabel(i),"aria-haspopup":"menu","aria-expanded":f,variant:t,size:o,leftIcon:r.jsx(Gf,{"aria-hidden":"true",rotate:f?"180":"0",color:Yg(t,l)}),disabled:l})}),r.jsx(rb,{children:a.map((({label:t,value:n,disabled:i})=>r.jsx(e.Menu.Item,{css:eb(o),value:n,disabled:i,children:t},n)))})]})]})},exports.Navbar=({variant:e="default",theme:t="light",logo:o,linkRouter:i,pathname:s,navigationSection:a,utilitySection:l,actionsSection:c,maxWidth:d,fixed:u,onNavbarHeightChange:h,backgroundColor:p,labels:f})=>{const m=Vf("Navbar",f),g=n.useRef(null),b=n.useRef(null),v=n.useRef(null),[y,x]=n.useState(!1),[w,C]=n.useState(-1),[k,S]=n.useState("undefined"!=typeof window&&window?.innerWidth<=yL),[$,j]=n.useState(!1),M=i,E=n.useCallback((()=>{if(b.current&&g.current&&v.current){const e=g.current.getBoundingClientRect(),t=b.current.getBoundingClientRect(),n=v.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=yL||window.innerWidth<=w?(h?.(96),x(!0)):window.innerWidth>yL&&window.innerWidth<=1440?e.right>=t.left?(h?.(96),x(!0),C(window.innerWidth)):window.innerWidth>w&&(h?.(48),x(!1),C(-1)):(h?.(48),x(!1),C(-1)),y&&(window.innerWidth<=yL||n.right>=t.left?(S(!0),h?.(48)):(S(!1),h?.(96)))}}),[w,y]);n.useEffect((()=>(E(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)})),[E]);const T="condensed"===e;return r.jsxs("nav",{css:XO(y&&!k,u,p,t,T),children:[r.jsxs("div",{css:QO(y&&!k,d,T),children:[r.jsxs("div",{css:eL(y&&!k||"dark"===t,T),ref:g,children:[o?r.jsx("div",{ref:v,css:tL,children:o}):null,r.jsx("div",{css:nL(y),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:rL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))})]}),r.jsx("div",{css:oL(T),ref:b,children:k?r.jsxs("button",{type:"button",onClick:()=>j(!$),"aria-label":$?m.closeMenuLabel:m.openMenuLabel,"aria-expanded":$,css:aL(t),children:[$?m.closeLabel:m.menuLabel,$?r.jsx(Xf,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"}):r.jsx(wm,{height:T?"0.75rem":"1rem",width:T?"0.75rem":"1rem"})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{css:oL(T),children:l?.map(((e,t)=>r.jsx("div",{css:iL(y),children:e},t)))}),c?.length?r.jsx("div",{css:sL(y),children:c.map((e=>r.jsx(Bf,{...e},e.ariaLabel)))}):null]})})]}),y&&!k?r.jsx("div",{css:YO(t,T),children:a?.map((e=>e.link?r.jsx(M,{to:e.link,href:e.link,css:rL(s===e.link,t,T),children:e.label},e.label):r.jsx(Bm,{theme:t,label:e.label,fontSize:T?"0.875rem":"1rem",items:e.items||[]},e.label)))}):null,k?r.jsx(vL,{theme:t,variant:e,navigationSection:a,utilitySection:l,actionsSection:c,linkRouter:i,isOpen:$,setIsOpen:j,pathname:s,resolvedLabels:m}):null]})},exports.NavigationRail=({tabs:t=[],defaultValue:o,onTabClick:i,children:s,onOpenChange:a,labels:l})=>{const c=Vf("NavigationRail",l),[d,u]=n.useState(!1),[h,p]=n.useState(o||t?.[0]?.value),f=e=>{p(e),i&&i(e)},[m]=e.useMediaQuery(["(max-width: 48rem)"]);return m?r.jsxs(e.Tabs.Root,{defaultValue:h,onValueChange:({value:e})=>f(e),children:[r.jsx(e.Tabs.List,{style:{display:"flex",overflowX:"auto",whiteSpace:"nowrap",padding:"0.5rem",gap:"0.5rem"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{value:t.value,css:{"--indicator-color":w("primary",500),flexShrink:0,padding:"0.625rem 1rem",color:w("neutral",600),"&[data-selected]":{color:w("neutral",800),fontWeight:600}},children:t.label},t.value)))}),t.map((t=>r.jsx(e.Tabs.Content,{value:t.value,children:s},t.value)))]}):r.jsxs("div",{style:{height:"calc(100vh - 3rem - 3.5rem)",position:"fixed",top:"3rem",left:0,display:"flex"},children:[r.jsxs("div",{css:xL,children:[r.jsx(e.Tabs.Root,{defaultValue:o||t?.[0]?.value,orientation:"horizontal",width:"full",onValueChange:({value:e})=>{f(e)},children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",style:{flexDirection:"column"},children:t.map((t=>r.jsx(e.Tabs.Trigger,{css:wL,"aria-label":t["aria-label"]||t.label,...t,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:"0.3125rem",className:"ds-tab-label",children:[t.icon?r.jsx("div",{css:CL,children:t.icon}):null,r.jsx("p",{children:t.label})]})},t.label)))})}),s?r.jsx(e.Collapsible.Root,{onOpenChange:({open:e})=>{u(e),a&&a(!e)},children:r.jsxs(e.Collapsible.Trigger,{css:kL,children:[r.jsx("div",{css:CL,children:d?r.jsx(qf,{}):r.jsx(Ff,{})}),r.jsxs("div",{className:"ds-tab-label",children:[r.jsx("p",{children:d?c.showLabel:c.hideLabel}),r.jsx("p",{children:c.sidebarLabel})]})]})}):null]}),s?r.jsx(e.Collapsible.Root,{defaultOpen:!0,open:!d,children:r.jsx(e.Collapsible.Content,{height:"100%",children:r.jsx("div",{css:SL,role:"tabpanel","aria-labelledby":h,children:s})})}):null]})},exports.OpacityControl=Kw,exports.OptionCard=({defaultValue:t,items:n,onValueChange:o,variant:s,itemWidth:a,hideControl:l})=>r.jsx(e.RadioCard.Root,{defaultValue:t,onValueChange:o,children:r.jsx(e.HStack,{alignItems:"flex-start",flexWrap:"wrap",gap:"0.75rem",children:n?.map((t=>{return r.jsxs(e.RadioCard.Item,{css:(o=a,c=t.selectedColor,d=t.selectedBackgroundColor,i.css`
4493
4525
  width: ${o||"15.0625rem"};
4494
4526
  min-height: 4.375rem;
4495
4527
  padding: ${k(300)};
@@ -4556,7 +4588,7 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4556
4588
  padding: 0;
4557
4589
  padding-top: ${k(200)};
4558
4590
  color: ${n?w("neutral",500):"inherit"};
4559
- `),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=SC,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId();return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[Uk(s),"fixed"===i?Kk:Gk],children:[e?r.jsx("div",{id:a,css:Zk,children:e}):null,r.jsx("div",{css:Jk,children:t}),o?r.jsx("div",{css:Xk,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Vf("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,b]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),v={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsx("div",{css:yv,children:r.jsxs(ag,{label:e,caption:t,required:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:[r.jsxs("div",{css:xv,children:[r.jsx(gg,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="very-weak",e.length>=4&&n>=2&&(t.strength="weak"),e.length>=6&&n>=3&&(t.strength="medium"),e.length>=l&&n>=4&&(t.strength="strong"),e.length>=l+2&&n>=5&&(t.strength="very-strong"),m(e),b(t),a&&a({...t,password:e})})(e.target.value),noMarginBottom:!0}),r.jsx(Bf,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(em,{}):r.jsx(Qf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:wv,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
4591
+ `),children:t.children}):null]},`${t.label}-${t.value}`);var n,o,c,d}))})}),exports.Pagination=jC,exports.Panel=({header:e,content:t,footer:o,variant:i="fixed",width:s})=>{const a=n.useId();return r.jsxs("div",{role:"region","aria-labelledby":e?a:void 0,css:[Gk(s),"fixed"===i?Zk:Jk],children:[e?r.jsx("div",{id:a,css:Xk,children:e}):null,r.jsx("div",{css:Yk,children:t}),o?r.jsx("div",{css:Qk,children:o}):null]})},exports.Password=({label:e,caption:t,required:o,disabledRules:s,onChange:a,minLength:l=8,hideValidations:c,labels:d})=>{const u=Vf("Password",d),[h,p]=n.useState(!1),[f,m]=n.useState(""),[g,b]=n.useState({strength:"very-weak",length:!1,uppercase:!1,lowercase:!1,numbers:!1,specialCharacters:!1}),v={"very-weak":u.strengthVeryWeak,weak:u.strengthWeak,medium:u.strengthMedium,strong:u.strengthStrong,"very-strong":u.strengthVeryStrong};return r.jsx("div",{css:yv,children:r.jsxs(ag,{label:e,caption:t,required:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:[r.jsxs("div",{css:xv,children:[r.jsx(gg,{type:h?"text":"password","aria-label":e,value:f,"aria-describedby":"password-guidelines",onChange:e=>(e=>{const t={...g};let n=0,r=!1;t.length=e.length>=l,n+=e.length>=l?1:0,r=/[A-Z]/.test(e),n+=r?1:0,t.uppercase=r,r=/[a-z]/.test(e),n+=r?1:0,t.lowercase=r,r=/[0-9]/.test(e),n+=r?1:0,t.numbers=r,r=/[-'/`~!¡#*$@_%+=.,^&(){}[\]|;:“‘"<>?\\]/.test(e),n+=r?1:0,t.specialCharacters=r,t.strength="very-weak",e.length>=4&&n>=2&&(t.strength="weak"),e.length>=6&&n>=3&&(t.strength="medium"),e.length>=l&&n>=4&&(t.strength="strong"),e.length>=l+2&&n>=5&&(t.strength="very-strong"),m(e),b(t),a&&a({...t,password:e})})(e.target.value),noMarginBottom:!0}),r.jsx(Bf,{label:h?u.hideLabel:u.showLabel,variant:"secondary",leftIcon:h?r.jsx(em,{}):r.jsx(Qf,{}),"aria-label":h?u.hidePasswordLabel:u.showPasswordLabel,onClick:()=>p(!h),type:"button"})]}),f&&!c?r.jsxs("div",{id:"password-guidelines",css:wv,"aria-live":"polite",children:[r.jsxs("p",{css:(y=g.strength,i.css`
4560
4592
  font-size: ${C(400)};
4561
4593
  line-height: ${S(600)};
4562
4594
  font-weight: 400;
@@ -4568,14 +4600,14 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4568
4600
  font-weight: 700;
4569
4601
  color: ${w("medium"===y?"warning":"strong"===y||"very-strong"===y?"success":"error",900)};
4570
4602
  }
4571
- `),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:Cv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:kv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:kv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:kv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:kv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:kv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]})});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Vf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:tA,role:"progressbar","aria-label":o.progressAriaLabel(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:r.jsx("div",{css:nA(i,n)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(pm,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Vf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,b="line"===e,v="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return b&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:Zw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:Jw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:Uw(i)}),b&&r.jsx("div",{css:Kw(i)}),v&&r.jsx("div",{css:Gw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:Xw,children:t}),o?r.jsx("p",{id:m,css:Yw,children:o}):null]})]}),s&&a?r.jsx("div",{css:Qw,children:r.jsx(Bf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(em,{}):r.jsx(Qf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=$b,exports.RadioGroup=jb,exports.RadioList=({label:e,caption:t,name:n,radios:o,defaultValue:i,onCheckedChange:s,errorMessage:a,horizontal:l,variant:c="default",required:d,labels:u})=>{const h=Vf("RadioList",u),p=`${e}. ${t?`${t}.`:""} ${d?h.requiredLabel:h.optionalLabel} ${a?`${h.errorPrefix} ${a}.`:""} `;return r.jsx(ag,{label:e,caption:t,errorMessage:a,required:d,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:h.requiredSymbolLabel},containerProps:{"aria-roledescription":"group","aria-label":p},children:r.jsx(jb,{name:n,value:i,onChange:s,horizontal:l&&"card"!==c,children:o.map((e=>r.jsx($b,{css:"card"===c?Sv:{},...e},e.value)))})})},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=wg,onChange:a,labels:c})=>{const d=Vf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(xg.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(xg.Toolbar,{children:r.jsxs(xg.ControlGroup,{children:[s.includes("undo")?r.jsx(ng,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(rg,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Km,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(ig,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Gm,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Zm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(Jm,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Xm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(Ym,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Qm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(eg,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(bg,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(tg,{label:d.imageTooltip}):null]})}),r.jsx(xg.Content,{})]})},exports.SSOButtons=Cg,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:eC,children:[o?r.jsx("div",{css:(s=iC(e),i.css`
4603
+ `),"aria-live":"polite",role:"status",children:[u.strengthPrefix," ",r.jsx("span",{children:v[g.strength]})]}),r.jsx("div",{css:Cv(g.strength),children:r.jsx("div",{})}),r.jsxs("div",{css:kv(g.length),"aria-label":`${u.minLengthRule(l)}. ${g.length?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.length?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.minLengthRule(l)})]}),s?.uppercase?null:r.jsxs("div",{css:kv(g.uppercase),"aria-label":`${u.uppercaseRule}. ${g.uppercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.uppercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.uppercaseRule})]}),s?.lowercase?null:r.jsxs("div",{css:kv(g.lowercase),"aria-label":`${u.lowercaseRule}. ${g.lowercase?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.lowercase?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.lowercaseRule})]}),s?.numbers?null:r.jsxs("div",{css:kv(g.numbers),"aria-label":`${u.numberRule}. ${g.numbers?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.numbers?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.numberRule})]}),s?.specialCharacters?null:r.jsxs("div",{css:kv(g.specialCharacters),"aria-label":`${u.specialCharRule}. ${g.specialCharacters?u.requirementMet:u.requirementNotMet}`,children:[r.jsx("div",{children:g.specialCharacters?r.jsx(Wf,{color:"var(--chakra-colors-success-500)",height:"0.5rem",width:"0.5rem"}):r.jsx(Xf,{color:"var(--chakra-colors-error-900)",height:"0.5rem",width:"0.5rem"})}),r.jsx("p",{children:u.specialCharRule})]})]}):null]})});var y},exports.ProgressBar=({progress:e,labels:t,color:n})=>{const o=Vf("ProgressBar",t);let i=e;return i>100&&(i=100),i<0&&(i=0),r.jsx("div",{css:rA,role:"progressbar","aria-label":o.progressAriaLabel(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,children:r.jsx("div",{css:oA(i,n)})})},exports.QualitativeAttribute=({type:e,label:t,caption:o,color:i,onActionClick:s,showActionButton:a,pointIcon:l=r.jsx(pm,{color:"#006D2C"}),ariaLabelType:c="",labels:d})=>{const u=Vf("QualitativeAttribute",d),[h,p]=n.useState(!0),f=n.useId(),m=n.useId(),g="raster"===e,b="line"===e,v="point"===e,y=n.useId(),x=n.useMemo((()=>{const e=h?u.visibleText:u.hiddenText;let n=c??`${c},`;return b&&(n=u.linePrefix),u.currentlyTemplate(String(t),o,n,e)}),[h,e,t,o,c,u]),w=h?u.hideLabel:u.showLabel;return r.jsxs("div",{css:Xw,children:[r.jsx("p",{id:y,css:{position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,clip:"rect(0 0 0 0)",overflow:"hidden"},children:x}),r.jsxs("div",{css:Yw,children:[r.jsxs("div",{children:[g&&r.jsx("div",{css:Gw(i)}),b&&r.jsx("div",{css:Zw(i)}),v&&r.jsx("div",{css:Jw(i),children:l})]}),r.jsxs("div",{children:[r.jsx("p",{id:f,css:Qw,children:t}),o?r.jsx("p",{id:m,css:eC,children:o}):null]})]}),s&&a?r.jsx("div",{css:tC,children:r.jsx(Bf,{type:"button",variant:"borderless",label:String(w),rightIcon:h?r.jsx(em,{}):r.jsx(Qf,{}),"aria-pressed":h,"aria-labelledby":`${y} ${f}`,onClick:()=>{p((e=>!e)),s?.()}})}):null]})},exports.Radio=$b,exports.RadioGroup=jb,exports.RadioList=({label:e,caption:t,name:n,radios:o,defaultValue:i,onCheckedChange:s,errorMessage:a,horizontal:l,variant:c="default",required:d,labels:u})=>{const h=Vf("RadioList",u),p=`${e}. ${t?`${t}.`:""} ${d?h.requiredLabel:h.optionalLabel} ${a?`${h.errorPrefix} ${a}.`:""} `;return r.jsx(ag,{label:e,caption:t,errorMessage:a,required:d,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",labels:{requiredSymbolLabel:h.requiredSymbolLabel},containerProps:{"aria-roledescription":"group","aria-label":p},children:r.jsx(jb,{name:n,value:i,onChange:s,horizontal:l&&"card"!==c,children:o.map((e=>r.jsx($b,{css:"card"===c?Sv:{},...e},e.value)))})})},exports.RichTextEditor=({defaultValue:e="",disabled:t=!1,ariaLabel:n,placeholder:o,minHeight:i,visibleControls:s=wg,onChange:a,labels:c})=>{const d=Vf("RichTextEditor",c),u=n||d.editorAriaLabel,h=o||d.placeholder,p=i,f=pf({extensions:[ap.configure({link:!1}),ru.configure({openOnClick:!0,autolink:!0,defaultProtocol:"https"}),oc,ip,qu.configure({placeholder:h,emptyEditorClass:"is-editor-empty"}),Wu,Uu,Ku.configure({types:["paragraph","heading"]}),th],content:e,editable:!t,shouldRerenderOnTransaction:!0,immediatelyRender:!1,onUpdate:({editor:e})=>{a?.(e.getHTML())},editorProps:{attributes:{"aria-label":u}}},[h,u]);return l.useEffect((()=>{f&&f.setEditable(!t)}),[f,t]),r.jsxs(xg.Root,{editor:f,disabled:t,css:{"& .ProseMirror":{minHeight:p||0}},children:[r.jsx(xg.Toolbar,{children:r.jsxs(xg.ControlGroup,{children:[s.includes("undo")?r.jsx(ng,{label:d.undoTooltip}):null,s.includes("redo")?r.jsx(rg,{label:d.redoTooltip}):null,s.includes("textType")?r.jsx(Km,{label:d.textTypeTooltip}):null,s.includes("alignment")?r.jsx(ig,{label:d.alignmentTooltip,alignLeftLabel:d.alignLeftOptionLabel,alignCenterLabel:d.alignCenterOptionLabel,alignRightLabel:d.alignRightOptionLabel,alignJustifyLabel:d.alignJustifyOptionLabel}):null,s.includes("fontSize")?r.jsx(Gm,{label:d.fontSizeTooltip}):null,s.includes("bold")?r.jsx(Zm,{label:d.boldTooltip,icon:r.jsx("strong",{css:{fontSize:C(600),lineHeight:1},children:d.boldIconText})}):null,s.includes("italic")?r.jsx(Jm,{label:d.italicTooltip,icon:r.jsx("em",{css:{fontStyle:"italic",fontSize:C(600),lineHeight:1},children:d.italicIconText})}):null,s.includes("underline")?r.jsx(Xm,{label:d.underlineTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"underline"},children:d.underlineIconText})}):null,s.includes("strikethrough")?r.jsx(Ym,{label:d.strikethroughTooltip,icon:r.jsx("span",{css:{fontSize:C(600),lineHeight:1,textDecoration:"line-through"},children:d.strikethroughIconText})}):null,s.includes("bulletList")?r.jsx(Qm,{label:d.bulletListTooltip}):null,s.includes("orderedList")?r.jsx(eg,{label:d.orderedListTooltip}):null,s.includes("link")?r.jsx(bg,{label:d.linkTooltip,urlPlaceholder:d.linkUrlPlaceholder,labelPlaceholder:d.linkLabelPlaceholder,labelInputAriaLabel:d.linkLabelAriaLabel,applyLabel:d.linkApplyLabel,removeLabel:d.linkRemoveLabel,invalidUrlMessage:d.linkInvalidUrlMessage}):null,s.includes("image")?r.jsx(tg,{label:d.imageTooltip}):null]})}),r.jsx(xg.Content,{})]})},exports.SSOButtons=Cg,exports.ScaleBar=({colors:e,values:t,subLabels:n,isGradient:o})=>{return r.jsxs("div",{css:nC,children:[o?r.jsx("div",{css:(s=aC(e),i.css`
4572
4604
  height: ${k(500)};
4573
4605
  width: 100%;
4574
4606
  margin-bottom: ${k(200)};
4575
4607
  border: ${j(100)} solid ${w("neutral",300)};
4576
4608
  border-radius: ${$(300)};
4577
4609
  ${s?`background: ${s};`:""}
4578
- `)}):r.jsx("div",{css:tC,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:nC,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:rC,children:e})},e)))}),n&&n.length?r.jsx("div",{css:nC,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:oC,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=Ov(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||PL(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||PL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??PL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||PL(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(Sg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):M&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:AL,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(gg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||PL(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:RL,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(IL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(yC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=vv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=uO(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||uO(v,w)!==w.length-1);return r.jsx(lO,{ref:g,css:dO(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:cO,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(yw,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Bb,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsx(ag,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:$v,children:[i.step&&i.marks?r.jsx(vv,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}),r.jsx(Bb,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:rA,children:[e.map(((e,n)=>r.jsxs("div",{css:oA,children:[r.jsx("button",{css:iA(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:sA(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:aA,children:r.jsx("div",{css:lA})})]})},exports.Switch=_b,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(TL(i,o)||0);return r.jsx("div",{css:kL(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(TL(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,s)=>r.jsxs(n.Fragment,{children:["view"===t&&1===s&&"left"===OL(l)?r.jsx("div",{css:jL}):null,r.jsx(e.Tabs.Trigger,{css:[SL,"view"===t&&ML,"panel"===t&&$L,"transparent"===t&&EL],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===s&&s<i.length-1&&"right"===OL(l)?r.jsx("div",{css:jL}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),j=n.useRef(null),[M,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>zC(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==M[DC]?[DC]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[DC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>PC(M,e.key,q),K=e=>((e,t,n,r)=>({...IC(e,n),...PC(t,n,r)}))(_,M,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...PC(s,DC,a),children:t.jsx(cb,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),b&&b(e,t)},stickyOffsets:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?RC(y):void 0,children:r.jsxs(e.Table.Root,{css:$C(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:jC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...PC(M,DC,q),children:r.jsx(cb,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,IC(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:MC,children:[t.label,t.sortable?r.jsxs("div",{css:EC,children:[r.jsx(_f,{css:TC(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:TC(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:AC(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:NC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:OC,children:[N?r.jsx(dC,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:LC,children:r.jsx(SC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=BC,exports.TableRow=VC,exports.Tag=mv,exports.TextInput=gg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,j]=n.useState(!1),[M,E]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),j(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),j(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,M?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=M&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Mv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Mv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:jv,"aria-live":"polite",children:M}):null]}):null;return r.jsx(ag,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:Ev(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),j(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),j(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(j(t>g),S(!1),E(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const o=Vf("Toast",t),[s,a]=n.useState(!1);return n.useEffect((()=>{const e=mA((()=>a(!0)));return()=>{e(),a(!1)}}),[]),s?Object.keys(bA).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:bA[t],insetInline:{mdDown:"4"},children:n=>{return r.jsxs(e.Toast.Root,{css:(s=n.meta?.maxWidth,i.css`
4610
+ `)}):r.jsx("div",{css:rC,children:e?.map(((e,n)=>r.jsx("div",{"data-test":`${e}-${t?.[n]}`,style:{backgroundColor:e,width:"100%",height:"100%"}},`${e}-${t?.[n]}`)))}),r.jsx("div",{css:oC,children:t?.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:iC,children:e})},e)))}),n&&n.length?r.jsx("div",{css:oC,children:n.map((e=>r.jsx("div",{style:{width:o?"auto":`calc(100% / ${t.length})`,display:"flex",justifyContent:"center"},children:r.jsx("p",{css:sC,style:{width:"100%"},children:e})},e)))}):null]});var s},exports.Search=({placeholder:t,disabled:o,size:i="default",options:s=[],resultsMaxHeight:a=50,isLoading:l=!1,displayResults:c="text",onSelect:d,onQueryChange:h,onClear:p,renderResults:f,labels:m})=>{const g=Vf("Search",m),[b,v]=n.useState(""),{open:y,onOpen:x,onClose:C}=e.useDisclosure(),[k,S]=n.useState(s),[$,j]=n.useState(-1),[M,E]=n.useState(!1),[T,O]=n.useState("pointer"),L=n.useRef(null),{contentRef:A,placement:R}=Ov(),N=`search-results-${n.useId()}`,D=e=>{const t=s.find((t=>t.id===e||VL(t)===e));t&&(d?.(t),v(""),C())};n.useEffect((()=>{if(h?.(b),!b)return void S(s);const e=s.filter((e=>{const t=b.toLowerCase();return e.id?.toLowerCase().includes(t)||VL(e).toLowerCase().includes(t)||e.caption?.toLowerCase().includes(t)})).map((e=>({id:e.id??VL(e),label:e.label,searchLabel:e.searchLabel,caption:e.caption,variant:"select",icon:e.icon,onItemClick:()=>D(e.id||VL(e))})));S(e),x()}),[b]);const I=b.length?r.jsx(Sg,{onClick:()=>{v(""),p?.()}}):null,P="none"!==c&&!!b.length&&k.length>0&&y,z=(P||l&&!!b.length)&&"custom"!==c;let V=w("neutral",500);o?V=w("neutral",500):M&&(V=w("primary",700));const B="small"===i?"1rem":"1.25rem",H=u(a);return r.jsxs(e.Popover.Root,{open:z,onOpenChange:e=>{e.open||C()},autoFocus:!1,closeOnEscape:!1,positioning:{sameWidth:!0,gutter:0},children:[r.jsxs("div",{ref:L,css:NL,"data-open":z||void 0,"data-placement":R,children:[r.jsx(e.Popover.Anchor,{children:r.jsx(e.InputGroup,{startElement:r.jsx(Sm,{width:B,height:B,fill:V}),endElement:I,children:r.jsx(gg,{autoComplete:"off",placeholder:t||g.filterPlaceholder,onChange:e=>{const{value:t}=e.target;v(t)},onFocus:()=>E(!0),onBlur:()=>E(!1),value:b,label:"",style:{paddingLeft:"2.5rem"},type:"search","aria-label":t||g.filterAriaLabel,"aria-expanded":P,"aria-controls":N,role:"combobox","aria-autocomplete":"list",disabled:o,size:i,noMarginBottom:!0,onKeyDown:e=>{if(P){if("ArrowDown"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.min(e+1,k.length-1)))),"ArrowUp"===e.key&&(e.preventDefault(),O("keyboard"),j((e=>Math.max(e-1,0)))),"Enter"===e.key&&(e.preventDefault(),$>=0)){const e=k[$];D(e.id||VL(e))}"Escape"===e.key&&C()}}})})}),(P||l&&!!b.length)&&"custom"===c&&f&&!l&&f({items:k,highlightedIndex:$,query:b,onSelect:D})]}),r.jsx(e.Portal,{children:r.jsx(e.Popover.Positioner,{children:r.jsxs(e.Popover.Content,{ref:A,css:DL,style:{maxHeight:H},"data-nav-source":T,onPointerMove:()=>O("pointer"),children:[l&&r.jsx(e.Box,{padding:"1rem",children:r.jsx(e.Spinner,{})}),"text"===c&&!l&&r.jsx(zL,{highlightedIndex:$,items:k,query:b,onSelect:D}),"list"===c&&!l&&r.jsx(wC,{items:k,highlightedIndex:$})]})})})]})},exports.Select=vv,exports.Sheet=({header:e,content:t,footer:o,open:i=!1,onClose:s,minimizedHeight:a,midHeight:l=200,maxFullHeight:c,defaultSnap:d="minimized",className:u,blocking:h,zIndex:p=1e3,labels:f})=>{const m=Vf("Sheet",f),g=n.useRef(null),b=n.useRef([]),[v,y]=n.useState(null),x=window.innerWidth>768,w=b.current;let C=m.expandSheetLabel;if(null!=v){const e=pO(v,w);e>0&&e<w.length-1?C=m.makeFullScreenLabel:e===w.length-1&&(C=m.expandedSheetLabel)}const k=!(null==v||!w.length||pO(v,w)!==w.length-1);return r.jsx(dO,{ref:g,css:hO(!!e,p),className:u,open:i,onDismiss:s,header:r.jsxs("div",{children:[r.jsx("button",{type:"button",disabled:k,"aria-label":C,css:uO,onKeyDown:e=>{if("Enter"!==e.key&&" "!==e.key)return;e.preventDefault();const t=w[w.length-1];if(x)return void g.current?.snapTo?.((()=>t));const n=v??w[0];let r=w.findIndex((e=>e>n));-1===r&&(r=w.length-1);const o=w[r];g.current?.snapTo?.((()=>o))},children:r.jsx("div",{})}),r.jsx("span",{"aria-live":"polite",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:C}),e]}),footer:o,snapPoints:({headerHeight:e,maxHeight:t,footerHeight:n})=>{const r=[20,a||e,l+(o?n:0),c||t-t/6];return b.current=r,r},onSpringEnd:()=>{const e=g.current?.height;e&&y(e)},defaultSnap:({headerHeight:e,maxHeight:t,footerHeight:n})=>{let r=20;return"minimized"===d?r=a||e:"mid"===d?r=l+(o?n:0):"full"===d&&(r=c||t-t/6),r},blocking:h,children:i?t:null})},exports.SimpleMapPin=({onClick:e,triggerRef:n,showFocusState:r,count:o,mode:i,variant:s="simple-pin"})=>t.jsx(yw,{count:o,mode:i,onClick:e,ref:n,showFocusState:r,variant:s}),exports.Slider=Bb,exports.SliderInput=({label:e,caption:t,size:o="default",sliderItem:i,required:s,onChange:a})=>{const[l,c]=n.useState(i.value||[]),d=(e,t)=>{const n=e.target.value,r=[...l];let o=n?parseInt(n,10):n;const s=i.min||0,a=i.max||100;o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>a?a:o,r[t]=o,c(r)},u=(e,t)=>{const n=e.target.value||"0",r=[...l];let o=parseInt(n,10);const s=i.min||0,d=i.max||100;if(o=Number.isNaN(o)?s:o,o=o<s?s:o,o=o>d?d:o,2===l?.length){o=Number.isNaN(o)?s:o;const e=l[0],n=l[1];0===t?(o=o<s?s:o,o=o>n?n:o):1===t&&(o=o<e?e:o,o=o>d?d:o)}r[t]=o,c(r),a&&a(r)};return r.jsx(ag,{label:e,caption:t,required:s,size:o,showOptionalLabel:!1,noMarginBottom:!0,semantics:"group",children:r.jsxs("div",{css:$v,children:[i.step&&i.marks?r.jsx(vv,{items:i.marks.map((e=>{const t="number"==typeof e?e:e.value;return{label:`${"number"==typeof e?e:e.label}`,value:`${t}`}})),placeholder:"",style:{width:"5.625rem"},value:[`${l?.[0]}`],onChange:e=>{const t=e.map((e=>parseInt(e,10)));c(t),a&&a(t)}}):r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[0],type:"number",onChange:e=>d(e,0),onBlur:e=>u(e,0),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}),r.jsx(Bb,{css:{},...i,value:l,"aria-label":2===l?.length?[`${e} minimum`,`${e} maximum`]:[e],onValueChangeEnd:e=>{c(e.value),a&&a(e.value)}}),2===l?.length?r.jsx(gg,{"aria-label":e,min:i.min,max:i.max,value:l?.[1],type:"number",onChange:e=>d(e,1),onBlur:e=>u(e,1),className:"ds-opacity-control-text-input",onClick:e=>e.target.select(),noMarginBottom:!0}):null]})})},exports.StepProgressIndicator=({steps:e,currentStep:t,labels:n})=>{const o=Vf("StepProgressIndicator",n);return r.jsxs("div",{css:iA,children:[e.map(((e,n)=>r.jsxs("div",{css:sA,children:[r.jsx("button",{css:aA(t>=n+1,t<n+1),type:"button",onClick:e.onClick,"aria-current":t===n+1,"aria-disabled":t<n+1,disabled:t<n+1,"aria-label":o.currentStepLabel(n+1,e.label||"",t>n+1),"data-active":t>=n+1,children:t>n+1?r.jsx(Wf,{height:"1rem",width:"1rem"}):n+1}),e.label?r.jsx("p",{css:lA(t===n+1),children:e.label}):null]},`${e.label}-${n}`))),r.jsx("div",{css:cA,children:r.jsx("div",{css:dA})})]})},exports.Switch=_b,exports.TabBar=({variant:t="panel",defaultValue:o,tabs:i,onTabClick:s,activationMode:a="manual"})=>{const[l,c]=n.useState(LL(i,o)||0);return r.jsx("div",{css:$L(t),children:r.jsx(e.Tabs.Root,{width:"full",defaultValue:o||i?.[0]?.value,onValueChange:({value:e})=>{return c(LL(i,t=e)),void(s&&s(t));var t},activationMode:a,children:r.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:i.map(((o,s)=>r.jsxs(n.Fragment,{children:["view"===t&&1===s&&"left"===AL(l)?r.jsx("div",{css:EL}):null,r.jsx(e.Tabs.Trigger,{css:[jL,"view"===t&&TL,"panel"===t&&ML,"transparent"===t&&OL],"aria-label":o["aria-label"]||o.label,...o,children:r.jsxs(e.Box,{display:"flex",alignItems:"center",gap:"0.3125rem",children:[o.icon,o.label]})},o.label),"view"===t&&1===s&&s<i.length-1&&"right"===AL(l)?r.jsx("div",{css:EL}):null]},o.label)))})})})},exports.Table=({columns:o,data:i=[],renderRow:s,striped:a,stickyHeader:l,pagination:c,selectable:d,selectedRows:u,variant:h="default",onSortColumn:p,onPageSizeChange:f,onPageChange:m,onAllItemsSelected:g,onRowSelected:b,loading:v,height:y,labels:x})=>{const C=Vf("Table",x),[k,S]=n.useState({key:"",order:""}),$=n.useRef({}),j=n.useRef(null),[M,E]=n.useState({}),[T,O]=n.useState([]),{totalItems:L=i.length,currentPage:A=1,pageSize:R=10,showItemCount:N,showItemCountText:D}=c||{},I=Boolean(p),P=n.useMemo((()=>BC(i,k,I)),[i,I,k]),z=(e,t)=>{S({key:e,order:t}),p&&p({key:e,order:t})},V=u??T,B=P.length>0&&V.length===P.length,H=V.length>0&&V.length<P.length,_=n.useMemo((()=>(e=>e.reduce(((e,t)=>(e[t.key]=t,e)),{}))(o)),[o]),F=n.useMemo((()=>(e=>e.filter((e=>e.sticky)).map((e=>e.key)))(o)),[o]),q=(e=>e.length>0?e[e.length-1]:void 0)([...void 0!==M[PC]?[PC]:[],...F]),W=n.useCallback((()=>{const e=((e,t,n)=>{const r={};let o=0;const i=e.filter((e=>e.sticky));return n&&i.length>0&&(r[PC]=0,o+=n.offsetWidth),i.forEach((e=>{r[e.key]=o,o+=t[e.key]?.offsetWidth||0})),r})(o,$.current,d?j.current:void 0);E(e)}),[o,d]);n.useEffect((()=>{W()}),[W,i.length]),n.useEffect((()=>{const e=()=>{W()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[W]),n.useEffect((()=>{void 0===u&&O((e=>((e,t)=>{const n=e.filter((e=>t.some((t=>t.id===e.id)))),r=n.length===e.length&&n.every(((t,n)=>t.id===e[n]?.id));return r?e:n})(e,i)))}),[i,u]);const U=e=>VC(M,e.key,q),K=e=>((e,t,n,r)=>({...zC(e,n),...VC(t,n,r)}))(_,M,e,q),G=e=>((e,t)=>e.some((e=>e.id===t.id)))(V,e),Z=(({columns:n,selectable:r,isRowSelected:o,onRowSelected:i,stickyOffsets:s={},lastStickyColumnKey:a,getSelectRowLabel:l})=>(c,d)=>{const{id:u,name:h}=c;return t.jsxs(e.Table.Row,{className:d?.className,children:[r?t.jsx(e.Table.Cell,{...VC(s,PC,a),children:t.jsx(cb,{name:`checkbox-${u}`,"aria-label":l(h,u),checked:o(c),onCheckedChange:({checked:e})=>{i(c,e)}})}):null,n.map((n=>t.jsx(e.Table.Cell,{...d?.getCellProps(n.key),children:n.cell?n.cell(c):c?.[n.key]},n.key)))]})})({columns:o,selectable:d,isRowSelected:G,onRowSelected:(e,t)=>{void 0===u&&O((n=>((e,t,n)=>n?e.some((e=>e.id===t.id))?e:[...e,t]:e.filter((e=>e.id!==t.id)))(n,e,t))),b&&b(e,t)},stickyOffsets:M,lastStickyColumnKey:q,getSelectRowLabel:(e,t)=>C.selectRowLabel(e,t)}),J=s||Z;return r.jsxs("div",{children:[r.jsx("div",{css:y?DC(y):void 0,children:r.jsxs(e.Table.Root,{css:MC(h,l),striped:a,stickyHeader:l,interactive:!0,children:[r.jsx(e.Table.Header,{css:EC(h),children:r.jsxs(e.Table.Row,{children:[d?r.jsx(e.Table.ColumnHeader,{ref:j,...VC(M,PC,q),children:r.jsx(cb,{name:"header-checkbox","aria-label":C.selectAllRowsLabel,checked:B,indeterminate:H,onCheckedChange:({checked:e})=>{void 0===u&&O(e?P:[]),g&&g(e)}})}):null,o.map((t=>{return r.jsx(e.Table.ColumnHeader,{ref:e=>{$.current[t.key]=e},...(n=t.key,zC(_,n)),role:t.sortable?"columnheader":void 0,"aria-sort":t.sortable&&"asc"===k.order?"ascending":t.sortable&&"desc"===k.order?"descending":void 0,...U(t),children:r.jsxs("div",{css:TC,children:[t.label,t.sortable?r.jsxs("div",{css:OC,children:[r.jsx(_f,{css:LC(k.key===t.key&&"asc"===k.order),icon:r.jsx(Gf,{style:{transform:"rotate(180deg)"}}),onClick:()=>z(t.key,"asc"),"aria-label":C.ascendingLabel}),r.jsx(_f,{css:LC(k.key===t.key&&"desc"===k.order),icon:r.jsx(Gf,{}),onClick:()=>z(t.key,"desc"),"aria-label":C.descendingLabel})]}):null]})},t.key);var n}))]})}),r.jsx(e.Table.Body,{css:NC(a),children:P.map((e=>r.jsx(n.Fragment,{children:J(e,{className:G(e)?"selected":void 0,getCellProps:K})},e.id)))})]})}),v?r.jsx("div",{css:IC,children:r.jsx(e.Spinner,{size:"lg",color:w("primary",500)})}):null,r.jsxs("div",{css:AC,children:[N?r.jsx(hC,{pageSize:R,currentPage:A,totalItems:L,onPageSizeChange:f,showItemCountText:D}):null,c?r.jsx("div",{css:RC,children:r.jsx(jC,{totalItems:L,pageSize:R,currentPage:A,onPageChange:m})}):null]})]})},exports.TableCell=_C,exports.TableRow=HC,exports.Tag=mv,exports.TextInput=gg,exports.Textarea=({label:t,caption:o,placeholder:i,errorMessage:s,required:a,disabled:l,size:c="default",showOptionalLabel:d=!0,defaultValue:u="",onChange:h,onFocus:p,onBlur:f,minLength:m,maxLength:g,labels:b,value:v,...y})=>{const x=Vf("Textarea",b),[w,C]=n.useState(u),[k,S]=n.useState(!1),[$,j]=n.useState(!1),[M,E]=n.useState(""),T=void 0!==v,O=T?String(v??""):w,L=n.useId(),A=n.useId(),R=n.useId();n.useEffect((()=>{const{length:e}=u;m&&e<m&&e>0?(S(e<m),j(!1),E(x.enterAtLeastChars(m-e))):m&&0===e&&E(x.minChars(m)),g&&e>0?(S(!1),j(e>g),E(x.charsRemaining(g-e))):g&&0===e&&E(x.maxChars(g))}),[]);const N=!!s||k||$,D=[o?L:null,N?A:null,M?R:null].filter(Boolean).join(" ")||void 0,I=Boolean(O),P=mg(p,f),z=M&&!$&&!k,V=k&&!!m||$&&!!g||z?r.jsxs(r.Fragment,{children:[k&&m?r.jsx(e.Field.ErrorText,{id:A,css:Mv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.needMoreChars(m-O.length)}):null,$&&g?r.jsx(e.Field.ErrorText,{id:A,css:Mv,style:{fontSize:"0.75rem",lineHeight:"1rem"},"aria-live":"polite",children:x.tooManyChars(O.length-g)}):null,z?r.jsx(e.Field.HelperText,{id:R,css:jv,"aria-live":"polite",children:M}):null]}):null;return r.jsx(ag,{label:t,caption:o,errorMessage:s,invalid:N,required:a,disabled:l,size:c,showOptionalLabel:d,labels:{requiredSymbolLabel:x.requiredSymbolLabel,optionalSuffix:x.optionalSuffix},captionId:L,errorId:s?A:void 0,footer:V,semantics:"field",children:r.jsx(e.Textarea,{placeholder:i,disabled:l,focusVisibleRing:"none",css:Ev(c,I),onChange:e=>{T||C(e.target.value);const{length:t}=e.target.value;m&&g?(S(t<m),j(t>g),E(x.charsRemaining(g-t))):m?(S(t<m),j(!1),E(t<m?x.enterAtLeastChars(m-t):"")):g&&(j(t>g),S(!1),E(x.charsRemaining(g-t))),h&&h(e)},value:O,"aria-label":t||i,"aria-describedby":D,"aria-invalid":N||void 0,_placeholder:{color:"var(--chakra-colors-neutral-700)"},...y,"data-focus-visible":P.isTabFocused||void 0,onFocus:P.onFocus,onBlur:P.onBlur})})},exports.Toast=({labels:t})=>{const o=Vf("Toast",t),[s,a]=n.useState(!1);return n.useEffect((()=>{const e=bA((()=>a(!0)));return()=>{e(),a(!1)}}),[]),s?Object.keys(yA).map((t=>r.jsx(e.Portal,{children:r.jsx(e.Toaster,{toaster:yA[t],insetInline:{mdDown:"4"},children:n=>{return r.jsxs(e.Toast.Root,{css:(s=n.meta?.maxWidth,i.css`
4579
4611
  justify-content: space-between;
4580
4612
  align-items: center;
4581
4613
  gap: ${k(200)};
@@ -4619,4 +4651,4 @@ function AE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
4619
4651
  color: ${w("error",900)};
4620
4652
  }
4621
4653
  }
4622
- `),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:r.jsx(rm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:cA,"aria-label":`${n.title}`,children:n.title}),n.description?r.jsx(e.Toast.Title,{css:dA,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[n.action?r.jsx(Bf,{css:uA,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),bA[t].dismiss(n.id)}}):null,n.meta?.closable?r.jsx(Bf,{css:hA,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||o.dismissLabel,leftIcon:r.jsx(Xf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),bA[t].dismiss(n.id)}}):null]}):null]});var s}})},t))):null},exports.Toolbar=Jg,exports.Tooltip=Fm,exports.closeToast=e=>{Object.values(bA).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{bA[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};
4654
+ `),width:{md:"sm"},children:[r.jsxs(e.Stack,{flexDirection:"row",className:"ds-toast-icon-container",alignItems:n.description?"flex-start":"center",children:["info"===n.type?n.meta?.icon?n.meta.icon:r.jsx(Kf,{color:"var(--chakra-colors-neutral-700)"}):null,"loading"===n.type?r.jsx(e.Spinner,{size:"lg",borderWidth:"0.1875rem",color:"var(--chakra-colors-primary-700)"}):null,"success"===n.type?n.meta?.icon?n.meta.icon:r.jsx(tm,{color:"var(--chakra-colors-success-500)"}):null,"warning"===n.type?n.meta?.icon?n.meta.icon:r.jsx(nm,{color:"var(--chakra-colors-warning-500)"}):null,"error"===n.type?n.meta?.icon?n.meta.icon:r.jsx(rm,{color:"var(--chakra-colors-error-500)"}):null,r.jsxs(e.Stack,{gap:"1",flex:"1",maxWidth:"100%",children:[r.jsx(e.Toast.Title,{css:uA,"aria-label":`${n.title}`,children:n.title}),n.description?r.jsx(e.Toast.Title,{css:hA,"aria-label":`${n.description}`,children:n.description}):null]})]}),n.action||n.meta?.closable?r.jsxs(e.Stack,{flexDirection:"row",children:[n.action?r.jsx(Bf,{css:pA,label:n.action.label,size:"small",variant:"info"===n.type?"primary":"secondary",onClick:()=>{n?.action?.onClick&&n.action.onClick(),yA[t].dismiss(n.id)}}):null,n.meta?.closable?r.jsx(Bf,{css:fA,label:n.meta.closableLabel,"aria-label":n.meta?.closableLabel||o.dismissLabel,leftIcon:r.jsx(Xf,{height:"0.625rem!",width:"0.625rem!"}),size:"small",variant:"secondary",onClick:()=>{n.meta?.onClose&&n.meta.onClose(),yA[t].dismiss(n.id)}}):null]}):null]});var s}})},t))):null},exports.Toolbar=Jg,exports.Tooltip=Fm,exports.closeToast=e=>{Object.values(yA).forEach((t=>{t.dismiss(e)}))},exports.designSystemStyles=x,exports.designSystemStylesForTailwind=y,exports.getThemedBorderWidth=j,exports.getThemedColor=w,exports.getThemedFontSize=C,exports.getThemedLineHeight=S,exports.getThemedRadius=$,exports.getThemedSpacing=k,exports.showToast=e=>{yA[e.placement].create({title:e.label,description:e.caption,duration:e.duration||5e3,meta:{closable:e.closable,icon:e.icon,closableLabel:e.closableLabel,onClose:e.onClose,maxWidth:e.maxWidth},...e})};