import "./Menu.css";
import {box as $9b405e0f8095dce0$export$827f4ee28efc37, iconStyles as $9b405e0f8095dce0$export$2c99b98b77550cb4} from "./Checkbox.mjs";
import {centerBaseline as $1f4b04be3f24aae3$export$9d7e2342a7e53afa} from "./CenterBaseline.mjs";
import $81cf3d4588736e7d$export$2e2bcd8739ae039 from "./Checkmark.mjs";
import $4b69f02ec06b9226$export$2e2bcd8739ae039 from "./Chevron.mjs";
import {divider as $bdf52657dac0f070$export$e8c9778bf415dd08} from "./Divider.mjs";
import {HeaderContext as $8e847109a6ab556d$export$e0e4026c12a8bdbb, HeadingContext as $8e847109a6ab556d$export$d688439359537581, KeyboardContext as $8e847109a6ab556d$export$744d98a3b8a94e1c, Text as $8e847109a6ab556d$export$5f1af8db9871e1d6, TextContext as $8e847109a6ab556d$export$9afb8bc826b033ea} from "./Content.mjs";
import {IconContext as $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed} from "../icons/Icon.mjs";
import {ImageContext as $dbd6f0b2503b938c$export$8151eb379fcf2442} from "./Image.mjs";
import {InPopoverContext as $88b746eba92c8d0d$export$60dfb2c3202ad27d, Popover as $88b746eba92c8d0d$export$5b6b19405a83ff9d, PopoverContext as $88b746eba92c8d0d$export$9b9a0cd73afb7ca4} from "./Popover.mjs";
import $d9f847a2895a93dc$export$2e2bcd8739ae039 from "./LinkOut.mjs";
import {mergeStyles as $feb886035e0d4633$export$e618dc39ac9ad607} from "../icons/runtime.mjs";
import {pressScale as $10ea7662e51a285b$export$56e8cba416805d8d} from "./pressScale.mjs";
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
import {jsx as $g2Qzl$jsx, jsxs as $g2Qzl$jsxs, Fragment as $g2Qzl$Fragment} from "react/jsx-runtime";
import {Provider as $g2Qzl$Provider, Menu as $g2Qzl$Menu, Separator as $g2Qzl$Separator, MenuSection as $g2Qzl$MenuSection, MenuItem as $g2Qzl$MenuItem, DEFAULT_SLOT as $g2Qzl$DEFAULT_SLOT, MenuTrigger as $g2Qzl$MenuTrigger, SubmenuTrigger as $g2Qzl$SubmenuTrigger} from "react-aria-components";
import {createContext as $g2Qzl$createContext, forwardRef as $g2Qzl$forwardRef, useContext as $g2Qzl$useContext, useRef as $g2Qzl$useRef, useState as $g2Qzl$useState} from "react";
import {useLocale as $g2Qzl$useLocale} from "react-aria";
import {PressResponder as $g2Qzl$PressResponder} from "@react-aria/interactions";
import {useGlobalListeners as $g2Qzl$useGlobalListeners} from "@react-aria/utils";

/*
 * Copyright 2024 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */ 


















const $13afb0ea5f0ed767$export$c7e742effb1c51e2 = /*#__PURE__*/ (0, $g2Qzl$createContext)(null);
const $13afb0ea5f0ed767$var$menuItemGrid = {
    size: {
        S: [
            "calc(1.5rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(1.5rem * 3 / 8)"
        ],
        M: [
            "calc(2rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(2rem * 3 / 8)"
        ],
        L: [
            "calc(2.5rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(2.5rem * 3 / 8)"
        ],
        XL: [
            "calc(3rem * 3 / 8)",
            'auto',
            'auto',
            'minmax(0, 1fr)',
            'auto',
            'auto',
            'auto',
            "calc(3rem * 3 / 8)"
        ]
    }
};
let $13afb0ea5f0ed767$export$b1e5508a851be14d = function anonymous(props, overrides) {
    let rules = " ";
    let width = false;
    let maxWidth = false;
    let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "Z") width = true;
        if (p[1] === "L") maxWidth = true;
        rules += p[0];
    }
    rules += ' _Le1';
    rules += ' se1';
    if (props.size === "XL") rules += ' Dk92HIe1';
    else if (props.size === "L") rules += ' DyaX9Fb1';
    else if (props.size === "M") rules += ' Deb5jcb1';
    else if (props.size === "S") rules += ' DGTLJAe1';
    rules += ' _oa1';
    rules += ' K40ub4c1';
    if (!width) rules += ' Za1';
    if (props.isPopover) rules += ' _Na1';
    if (props.isPopover) rules += ' Pa1';
    if (props.isPopover) {
        if (!maxWidth) rules += ' Lh1';
    }
    if (props.isPopover) rules += ' Tt1';
    if (props.isPopover) rules += ' Qt1';
    if (props.isPopover) rules += ' St1';
    if (props.isPopover) rules += ' Rt1';
    rules += ' uk1';
    rules += ' ucJ9TBTb1';
    rules += ' ud3Euai1';
    rules += ' uea1';
    rules += ' ugb1';
    rules += ' uhd1';
    rules += ' uje1';
    rules += ' u2NhKxcl1';
    rules += ' uic1';
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e1';
        rules += ' vx1';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d1';
        rules += ' vx1';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b1';
        rules += ' vx1';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a1';
        rules += ' vx1';
    } else {
        rules += ' -_6BNtrc-c1';
        rules += ' vx1';
    }
    rules += ' __ya1';
    return rules;
};
let $13afb0ea5f0ed767$export$fe2e36411d703b3d = function anonymous(props) {
    let rules = " ";
    rules += ' z2mU1';
    rules += ' yzZKy1';
    rules += ' eb1';
    rules += ' se1';
    rules += ' CcAc39c1';
    if (props.size === "XL") rules += ' Dk92HIe1';
    else if (props.size === "L") rules += ' DyaX9Fb1';
    else if (props.size === "M") rules += ' Deb5jcb1';
    else if (props.size === "S") rules += ' DGTLJAe1';
    return rules;
};
let $13afb0ea5f0ed767$export$562e61a0817eb32e = function anonymous(props) {
    let rules = " ";
    rules += ' pt1';
    rules += ' z3mU1';
    rules += ' yAZKy1';
    rules += ' _oa1';
    rules += ' MAyFGYc1';
    rules += ' Tu7Fubd1';
    rules += ' Qu7Fubd1';
    if (props.size === "XL") rules += ' -M_-Mk1';
    else if (props.size === "L") rules += ' -M_-Mh1';
    else if (props.size === "S") rules += ' -M_-Mg1';
    else if (props.size === "XS") rules += ' -M_-Mf1';
    else rules += ' -M_-Mi1';
    return rules;
};
let $13afb0ea5f0ed767$export$300ac6f106ef584d = " uk1 ucJ9TBTb1 ud3Euai1 uea1 ugb1 uhd1 uje1 u2NhKxcl1 uic1 -_6BNtrc-c1 vx1 xd1 _xa1 xX0cczbc1 _xX0cczba1 _Fd1 _FnuYUweb1 pt1 Jy1 Gy1 Iy1 Hy1";
let $13afb0ea5f0ed767$export$f68e44d881264486 = function anonymous(props, overrides) {
    let rules = " ";
    let minWidth = false;
    let position = false;
    let gridColumnStart = false;
    let gridColumnEnd = false;
    let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "N") minWidth = true;
        if (p[1] === "_P") position = true;
        if (p[1] === "z") gridColumnStart = true;
        if (p[1] === "y") gridColumnEnd = true;
        rules += p[0];
    }
    if (props.isFocusVisible) rules += ' _Lf1';
    else rules += ' _Le1';
    rules += ' Oh1';
    rules += ' Olc1';
    rules += ' _Mc1';
    rules += ' _Kd1';
    if (props.size === "XL") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "L") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "S") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "XS") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e1';
        rules += ' vx1';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d1';
        rules += ' vx1';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b1';
        rules += ' vx1';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a1';
        rules += ' vx1';
    } else {
        rules += ' -_6BNtrc-c1';
        rules += ' vx1';
    }
    if (props.size === "XL") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "L") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "S") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "XS") {
        rules += ' xb1';
        rules += ' _xa1';
    } else {
        rules += ' xb1';
        rules += ' _xa1';
    }
    if (props.size === "XL") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "L") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "S") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "XS") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    }
    if (props.isDisabled) {
        rules += ' pp1';
        rules += ' plc1';
    } else {
        if (props.isPressed) rules += ' po1';
        else if (props.isFocusVisible) rules += ' po1';
        else if (props.isHovered) rules += ' po1';
        else rules += ' pt1';
        if (props.isFocused) rules += ' ple1';
        else rules += ' plb1';
    }
    rules += ' se1';
    rules += ' ea1';
    rules += ' egLWx3bb1';
    rules += ' _oa1';
    rules += ' Sd1';
    rules += ' Rd1';
    if (props.size === "XL") {
        if (!minWidth) rules += ' Nl1';
    } else if (props.size === "L") {
        if (!minWidth) rules += ' Nj1';
    } else if (props.size === "S") {
        if (!minWidth) rules += ' Nf1';
    } else if (props.size === "XS") {
        if (!minWidth) rules += ' Ne1';
    } else if (!minWidth) rules += ' Nk1';
    if (props.size === "XL") rules += ' -SFnbic-_JaP8ec1';
    else if (props.size === "L") rules += ' -SFnbic-_J0K2hn1';
    else if (props.size === "S") rules += ' -SFnbic-_JJOW22b1';
    else if (props.size === "XS") rules += ' -SFnbic-_JICefdd1';
    else rules += ' -SFnbic-_Jb1';
    rules += ' -Bu7z1c-ob1';
    rules += ' oj1';
    rules += ' nj1';
    rules += ' kj1';
    rules += ' jj1';
    rules += ' qh1';
    rules += ' -Qg41Lb-IAxCW0c1';
    rules += ' -Qg41Lb-gLWx3bIy1';
    rules += ' MAyFGYc1';
    rules += ' Td1';
    rules += ' QAzEcG1';
    rules += ' -aRvJDd-Tu7Fubd1';
    if (props.isFocused) {
        rules += ' gF1';
        rules += ' gle1';
    } else rules += ' g91';
    if (!position) rules += ' _Pc1';
    if (!gridColumnStart) rules += ' z2mU1';
    if (!gridColumnEnd) rules += ' yzZKy1';
    rules += ' CcAc39c1';
    rules += ' DLwlgod1';
    rules += ' EpvfBwb1';
    rules += ' EDNKd2dZQmDFe1';
    rules += ' UDNKd2dai5a01';
    rules += ' FF1';
    rules += ' _Xa1';
    if (props.isLink) rules += ' ry1';
    else rules += ' ri1';
    rules += ' Yd1';
    rules += ' Xb1';
    rules += ' _2b1';
    rules += ' _yb1';
    if (props.size === "XL") rules += ' -M_-Mk1';
    else if (props.size === "L") rules += ' -M_-Mh1';
    else if (props.size === "S") rules += ' -M_-Mg1';
    else if (props.size === "XS") rules += ' -M_-Mf1';
    else rules += ' -M_-Mi1';
    return rules;
};
let $13afb0ea5f0ed767$export$292abbf31ed842a = function anonymous(props) {
    let rules = " ";
    if (props.isSelected) rules += ' _6c1';
    else rules += ' _6b1';
    rules += ' z2CW8rb1';
    rules += ' y2CW8rb1';
    rules += ' B2CW8rb1';
    rules += ' A2CW8rb1';
    if (props.isPressed) rules += ' ps1';
    else if (props.isFocusVisible) rules += ' ps1';
    else if (props.isHovered) rules += ' ps1';
    else rules += ' pu1';
    rules += ' -_8sjo0b-t5ZbAob1';
    if (props.isFocused) rules += ' -_8sjo0b-lt8pvGJ1';
    else rules += ' -_8sjo0b-lta1';
    rules += ' Hw1';
    rules += ' fa1';
    return rules;
};
let $13afb0ea5f0ed767$export$b07e517d22efa1ca = " z2CW8rb1 y2CW8rb1 B2CW8rb1 A2CW8rb1 Hw1";
let $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27 = " sb1 ZuUmpre1 FuUmpre1 Ht1 Hsu1 -_8sjo0b-t5ZbAob1";
let $13afb0ea5f0ed767$export$31d1842a0fd736e6 = " sd1 z2U5Crc1 y2U5Crc1 B2U5Crc1 A2U5Crc1";
let $13afb0ea5f0ed767$var$image = function anonymous(props) {
    let rules = " ";
    rules += ' z2U5Crc1';
    rules += ' y2U5Crc1';
    rules += ' B2U5Crc1';
    rules += ' AvoofG1';
    rules += ' Ht1';
    rules += ' Hsu1';
    rules += ' Jt1';
    rules += ' _dc1';
    rules += ' oa1';
    rules += ' na1';
    rules += ' ka1';
    rules += ' ja1';
    if (props.size === "XL") rules += ' ZF1';
    else if (props.size === "L") rules += ' Zx1';
    else if (props.size === "M") rules += ' Zw1';
    else if (props.size === "S") rules += ' ZC1';
    else rules += ' Zw1';
    if (props.size === "XL") rules += ' Fz1';
    else if (props.size === "L") rules += ' Fw1';
    else if (props.size === "M") rules += ' Fv1';
    else if (props.size === "S") rules += ' Fx1';
    else rules += ' Fv1';
    rules += ' fa1';
    rules += ' _Ha1';
    return rules;
};
let $13afb0ea5f0ed767$export$1237798dc640739a = function anonymous(props) {
    let rules = " ";
    rules += ' zv6x9r1';
    rules += ' yv6x9r1';
    rules += ' Bv6x9r1';
    rules += ' Av6x9r1';
    if (props.size === "XL") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "L") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "S") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "XS") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e1';
        rules += ' vx1';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d1';
        rules += ' vx1';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b1';
        rules += ' vx1';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a1';
        rules += ' vx1';
    } else {
        rules += ' -_6BNtrc-c1';
        rules += ' vx1';
    }
    rules += ' xc1';
    rules += ' _xa1';
    if (props.size === "XL") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "L") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "S") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "XS") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    }
    rules += ' p40ub4c1';
    rules += ' JAzEcG1';
    return rules;
};
let $13afb0ea5f0ed767$export$6d59db4903f20f7d = function anonymous(props) {
    let rules = " ";
    rules += ' z9u7zPc1';
    rules += ' y9u7zPc1';
    rules += ' B9u7zPc1';
    rules += ' A9u7zPc1';
    if (props.size === "XL") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "L") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "M") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else if (props.size === "S") {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    } else {
        rules += ' uk1';
        rules += ' ucJ9TBTb1';
        rules += ' ud3Euai1';
        rules += ' uea1';
        rules += ' ugb1';
        rules += ' uhd1';
        rules += ' uje1';
        rules += ' u2NhKxcl1';
        rules += ' uic1';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-d1';
        rules += ' vx1';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-c1';
        rules += ' vx1';
    } else if (props.size === "M") {
        rules += ' -_6BNtrc-b1';
        rules += ' vx1';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-a1';
        rules += ' vx1';
    } else {
        rules += ' -_6BNtrc-b1';
        rules += ' vx1';
    }
    if (props.size === "XL") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "L") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "M") {
        rules += ' xb1';
        rules += ' _xa1';
    } else if (props.size === "S") {
        rules += ' xb1';
        rules += ' _xa1';
    } else {
        rules += ' xb1';
        rules += ' _xa1';
    }
    if (props.size === "XL") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "L") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "M") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else if (props.size === "S") {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    } else {
        rules += ' _Fd1';
        rules += ' _FnuYUweb1';
    }
    if (props.isDisabled) rules += ' pp1';
    else if (props.isFocused) rules += ' pt1';
    else {
        if (props.isPressed) rules += ' pt1';
        else if (props.isFocusVisible) rules += ' pt1';
        else if (props.isHovered) rules += ' pt1';
        else rules += ' pv1';
    }
    rules += ' Yd1';
    rules += ' Xb1';
    rules += ' _2b1';
    return rules;
};
let $13afb0ea5f0ed767$var$value = " z8bmXs1 y8bmXs1 B8bmXs1 A8bmXs1 Iv1";
let $13afb0ea5f0ed767$var$keyboard = function anonymous(props) {
    let rules = " ";
    rules += ' z45MTAd1';
    rules += ' y45MTAd1';
    rules += ' B45MTAd1';
    rules += ' A45MTAd1';
    rules += ' Iv1';
    rules += ' uk1';
    rules += ' ucJ9TBTb1';
    rules += ' ud3Euai1';
    rules += ' uea1';
    rules += ' ugb1';
    rules += ' uhd1';
    rules += ' uje1';
    rules += ' u2NhKxcl1';
    rules += ' uic1';
    rules += ' -_6BNtrc-c1';
    rules += ' vx1';
    rules += ' xb1';
    rules += ' _xa1';
    rules += ' _Fd1';
    rules += ' _FnuYUweb1';
    if (props.isDisabled) rules += ' pp1';
    else rules += ' pn1';
    if (props.isDisabled) rules += ' plc1';
    rules += ' _Wb1';
    rules += ' _3f1';
    return rules;
};
let $13afb0ea5f0ed767$var$descriptor = " z0cdLvd1 y0cdLvd1 B0cdLvd1 A0cdLvd1 Iv1 -_8sjo0b-t5ZbAob1";
let $13afb0ea5f0ed767$var$InternalMenuContext = /*#__PURE__*/ (0, $g2Qzl$createContext)({
    size: 'M',
    isSubmenu: false,
    hideLinkOutIcon: false
});
let $13afb0ea5f0ed767$var$InternalMenuTriggerContext = /*#__PURE__*/ (0, $g2Qzl$createContext)(null);
let $13afb0ea5f0ed767$var$wrappingDiv = " sd1 Za1 Fb1";
const $13afb0ea5f0ed767$export$d9b273488cd8ce6f = /*#__PURE__*/ (0, $g2Qzl$forwardRef)(function Menu(props, ref) {
    [props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $13afb0ea5f0ed767$export$c7e742effb1c51e2);
    let { isSubmenu: isSubmenu, size: ctxSize } = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuContext);
    let { children: children, size: size = ctxSize, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, styles: styles, hideLinkOutIcon: hideLinkOutIcon = false } = props;
    let ctx = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuTriggerContext);
    let inPopover = (0, $g2Qzl$useContext)((0, $88b746eba92c8d0d$export$60dfb2c3202ad27d));
    let isPopover = (ctx || isSubmenu) && !inPopover;
    let content = /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$var$InternalMenuContext.Provider, {
        value: {
            size: size,
            isSubmenu: true,
            hideLinkOutIcon: hideLinkOutIcon
        },
        children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Provider), {
            values: [
                [
                    (0, $8e847109a6ab556d$export$e0e4026c12a8bdbb),
                    {
                        styles: $13afb0ea5f0ed767$export$562e61a0817eb32e({
                            size: size
                        })
                    }
                ],
                [
                    (0, $8e847109a6ab556d$export$d688439359537581),
                    {
                        // @ts-ignore
                        role: 'presentation',
                        styles: $13afb0ea5f0ed767$export$300ac6f106ef584d
                    }
                ],
                [
                    (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                    {
                        slots: {
                            'description': {
                                styles: $13afb0ea5f0ed767$export$6d59db4903f20f7d({
                                    size: size
                                })
                            }
                        }
                    }
                ],
                [
                    (0, $88b746eba92c8d0d$export$60dfb2c3202ad27d),
                    false
                ]
            ],
            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Menu), {
                ...props,
                className: $13afb0ea5f0ed767$export$b1e5508a851be14d({
                    size: size,
                    isPopover: isPopover
                }, isPopover ? null : styles),
                children: children
            })
        })
    });
    if (isPopover) return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$5b6b19405a83ff9d), {
        ref: ref,
        padding: "none",
        hideArrow: true,
        children: /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
            style: UNSAFE_style,
            className: (UNSAFE_className || '') + $13afb0ea5f0ed767$var$wrappingDiv,
            children: content
        })
    });
    return content;
});
function $13afb0ea5f0ed767$export$2e0a83ec2e27ecbb(props) {
    return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Separator), {
        ...props,
        className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)((0, $bdf52657dac0f070$export$e8c9778bf415dd08)({
            size: 'M',
            orientation: 'horizontal',
            isStaticColor: false
        }), " se1 skk1 z3mU1 yAZKy1 JydxGIe1 GydxGIe1")
    });
}
function $13afb0ea5f0ed767$export$4b1545b4f2016d26(props) {
    // remember, context doesn't work if it's around Section nor inside
    let { size: size } = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuContext);
    return /*#__PURE__*/ (0, $g2Qzl$jsxs)((0, $g2Qzl$Fragment), {
        children: [
            /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$MenuSection), {
                ...props,
                className: $13afb0ea5f0ed767$export$fe2e36411d703b3d({
                    size: size
                }),
                children: props.children
            }),
            /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$export$2e0a83ec2e27ecbb, {})
        ]
    });
}
const $13afb0ea5f0ed767$var$checkmarkIconSize = {
    S: 'XS',
    M: 'M',
    L: 'L',
    XL: 'XL'
};
const $13afb0ea5f0ed767$var$linkIconSize = {
    S: 'M',
    M: 'L',
    L: 'XL',
    XL: 'XL'
};
function $13afb0ea5f0ed767$export$2ce376c2cc3355c8(props1) {
    let ref = (0, $g2Qzl$useRef)(null);
    let isLink = props1.href != null;
    let isLinkOut = isLink && props1.target === '_blank';
    let { size: size, hideLinkOutIcon: hideLinkOutIcon } = (0, $g2Qzl$useContext)($13afb0ea5f0ed767$var$InternalMenuContext);
    let textValue = props1.textValue || (typeof props1.children === 'string' ? props1.children : undefined);
    let { direction: direction } = (0, $g2Qzl$useLocale)();
    return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$MenuItem), {
        ...props1,
        textValue: textValue,
        ref: ref,
        style: (0, $10ea7662e51a285b$export$56e8cba416805d8d)(ref, props1.UNSAFE_style),
        className: (renderProps)=>(props1.UNSAFE_className || '') + $13afb0ea5f0ed767$export$f68e44d881264486({
                ...renderProps,
                isFocused: renderProps.hasSubmenu && renderProps.isOpen || renderProps.isFocused,
                size: size,
                isLink: isLink
            }, props1.styles),
        children: (renderProps)=>{
            let { children: children } = props1;
            let checkboxRenderProps = {
                ...renderProps,
                size: size,
                isFocused: false,
                isFocusVisible: false,
                isIndeterminate: false,
                isReadOnly: false,
                isInvalid: false,
                isRequired: false
            };
            return /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$Fragment), {
                children: /*#__PURE__*/ (0, $g2Qzl$jsxs)((0, $g2Qzl$Provider), {
                    values: [
                        [
                            (0, $ac8c32e6775ddd1f$export$a49f528ae1a4d0ed),
                            {
                                slots: {
                                    icon: {
                                        render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                                            slot: 'icon',
                                            styles: $13afb0ea5f0ed767$export$31d1842a0fd736e6
                                        }),
                                        styles: $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27
                                    },
                                    descriptor: {
                                        render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
                                            slot: 'descriptor',
                                            styles: $13afb0ea5f0ed767$var$descriptor
                                        })
                                    } // TODO: remove once we have default?
                                }
                            }
                        ],
                        [
                            (0, $8e847109a6ab556d$export$9afb8bc826b033ea),
                            {
                                slots: {
                                    [(0, $g2Qzl$DEFAULT_SLOT)]: {
                                        styles: $13afb0ea5f0ed767$export$1237798dc640739a({
                                            size: size
                                        })
                                    },
                                    label: {
                                        styles: $13afb0ea5f0ed767$export$1237798dc640739a({
                                            size: size
                                        })
                                    },
                                    description: {
                                        styles: $13afb0ea5f0ed767$export$6d59db4903f20f7d({
                                            ...renderProps,
                                            size: size
                                        })
                                    },
                                    value: {
                                        styles: $13afb0ea5f0ed767$var$value
                                    }
                                }
                            }
                        ],
                        [
                            (0, $8e847109a6ab556d$export$744d98a3b8a94e1c),
                            {
                                styles: $13afb0ea5f0ed767$var$keyboard({
                                    size: size,
                                    isDisabled: renderProps.isDisabled
                                })
                            }
                        ],
                        [
                            (0, $dbd6f0b2503b938c$export$8151eb379fcf2442),
                            {
                                styles: $13afb0ea5f0ed767$var$image({
                                    size: size
                                })
                            }
                        ]
                    ],
                    children: [
                        renderProps.selectionMode === 'single' && !renderProps.hasSubmenu && /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $81cf3d4588736e7d$export$2e2bcd8739ae039), {
                            size: $13afb0ea5f0ed767$var$checkmarkIconSize[size],
                            className: $13afb0ea5f0ed767$export$292abbf31ed842a({
                                ...renderProps,
                                size: size
                            })
                        }),
                        renderProps.selectionMode === 'multiple' && !renderProps.hasSubmenu && /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
                            className: (0, $feb886035e0d4633$export$e618dc39ac9ad607)($13afb0ea5f0ed767$export$b07e517d22efa1ca, (0, $9b405e0f8095dce0$export$827f4ee28efc37)(checkboxRenderProps)),
                            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $81cf3d4588736e7d$export$2e2bcd8739ae039), {
                                size: size,
                                className: (0, $9b405e0f8095dce0$export$2c99b98b77550cb4)
                            })
                        }),
                        typeof children === 'string' ? /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $8e847109a6ab556d$export$5f1af8db9871e1d6), {
                            slot: "label",
                            children: children
                        }) : children,
                        isLinkOut && !hideLinkOutIcon && /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
                            slot: "descriptor",
                            className: $13afb0ea5f0ed767$var$descriptor,
                            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $d9f847a2895a93dc$export$2e2bcd8739ae039), {
                                size: $13afb0ea5f0ed767$var$linkIconSize[size],
                                className: function anonymous(props) {
                                    let rules = " ";
                                    if (props.direction === "rtl") {
                                        rules += ' -Z4Pn4c-a1';
                                        rules += ' __Ha1';
                                    }
                                    return rules;
                                }({
                                    direction: direction
                                })
                            })
                        }),
                        renderProps.hasSubmenu && /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {
                            slot: "descriptor",
                            className: $13afb0ea5f0ed767$var$descriptor,
                            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $4b69f02ec06b9226$export$2e2bcd8739ae039), {
                                size: size,
                                className: function anonymous(props) {
                                    let rules = " ";
                                    if (props.direction === "rtl") {
                                        rules += ' -Z4Pn4c-a1';
                                        rules += ' __Ha1';
                                    }
                                    return rules;
                                }({
                                    direction: direction
                                })
                            })
                        })
                    ]
                })
            });
        }
    });
}
/**
 * The MenuTrigger serves as a wrapper around a Menu and its associated trigger,
 * linking the Menu's open state with the trigger's press state.
 */ function $13afb0ea5f0ed767$export$27d2ad3c5815583e(props) {
    // RAC sets isPressed via PressResponder when the menu is open.
    // We don't want press scaling to appear to get "stuck", so override this.
    // For mouse interactions, menus open on press start. When the popover underlay appears
    // it covers the trigger button, causing onPressEnd to fire immediately and no press scaling
    // to occur. We override this by listening for pointerup on the document ourselves.
    let [isPressed, setPressed] = (0, $g2Qzl$useState)(false);
    let { addGlobalListener: addGlobalListener } = (0, $g2Qzl$useGlobalListeners)();
    let onPressStart = (e)=>{
        if (e.pointerType !== 'mouse') return;
        setPressed(true);
        addGlobalListener(document, 'pointerup', ()=>{
            setPressed(false);
        }, {
            once: true,
            capture: true
        });
    };
    let { align: align = 'start', direction: direction = 'bottom', shouldFlip: shouldFlip } = props;
    let placement;
    switch(direction){
        case 'left':
        case 'right':
        case 'start':
        case 'end':
            placement = `${direction} ${align === 'end' ? 'bottom' : 'top'}`;
            break;
        case 'bottom':
        case 'top':
        default:
            placement = `${direction} ${align}`;
    }
    return /*#__PURE__*/ (0, $g2Qzl$jsx)($13afb0ea5f0ed767$var$InternalMenuTriggerContext.Provider, {
        value: {
            align: props.align,
            direction: props.direction,
            shouldFlip: props.shouldFlip
        },
        children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$9b9a0cd73afb7ca4).Provider, {
            value: {
                hideArrow: true,
                offset: 8,
                crossOffset: 0,
                placement: placement,
                shouldFlip: shouldFlip
            },
            children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$MenuTrigger), {
                ...props,
                children: /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $g2Qzl$PressResponder), {
                    onPressStart: onPressStart,
                    isPressed: isPressed,
                    children: props.children
                })
            })
        })
    });
}
function $13afb0ea5f0ed767$export$ecabc99eeffab7ca(props) {
    // For submenus, the offset from the edge of the popover should be 10px.
    // Subtract 8px for the padding around the parent menu.
    // Offset by padding + border so that the first item in a submenu lines up with the parent menu item.
    return /*#__PURE__*/ (0, $g2Qzl$jsxs)((0, $g2Qzl$SubmenuTrigger), {
        ...props,
        children: [
            props.children[0],
            /*#__PURE__*/ (0, $g2Qzl$jsx)((0, $88b746eba92c8d0d$export$9b9a0cd73afb7ca4).Provider, {
                value: {
                    hideArrow: true,
                    offset: -2,
                    crossOffset: -8,
                    placement: 'end top'
                },
                children: props.children[1]
            })
        ]
    });
}
function $13afb0ea5f0ed767$export$aebfca372ec4a7db(props) {
    return /*#__PURE__*/ (0, $g2Qzl$jsx)("div", {});
}


export {$13afb0ea5f0ed767$export$c7e742effb1c51e2 as MenuContext, $13afb0ea5f0ed767$export$b1e5508a851be14d as menu, $13afb0ea5f0ed767$export$fe2e36411d703b3d as section, $13afb0ea5f0ed767$export$562e61a0817eb32e as sectionHeader, $13afb0ea5f0ed767$export$300ac6f106ef584d as sectionHeading, $13afb0ea5f0ed767$export$f68e44d881264486 as menuitem, $13afb0ea5f0ed767$export$292abbf31ed842a as checkmark, $13afb0ea5f0ed767$export$b07e517d22efa1ca as checkbox, $13afb0ea5f0ed767$export$1ca1ec8b29a4ce27 as icon, $13afb0ea5f0ed767$export$31d1842a0fd736e6 as iconCenterWrapper, $13afb0ea5f0ed767$export$1237798dc640739a as label, $13afb0ea5f0ed767$export$6d59db4903f20f7d as description, $13afb0ea5f0ed767$export$d9b273488cd8ce6f as Menu, $13afb0ea5f0ed767$export$2e0a83ec2e27ecbb as Divider, $13afb0ea5f0ed767$export$4b1545b4f2016d26 as MenuSection, $13afb0ea5f0ed767$export$2ce376c2cc3355c8 as MenuItem, $13afb0ea5f0ed767$export$27d2ad3c5815583e as MenuTrigger, $13afb0ea5f0ed767$export$ecabc99eeffab7ca as SubmenuTrigger, $13afb0ea5f0ed767$export$aebfca372ec4a7db as CombinedMenu};
//# sourceMappingURL=Menu.mjs.map
