import{i as pe,m as ue,bz as me,bA as ge,k as be,l as oe,n as S,bB as ve,bC as $e,r,X as ae,b7 as fe,bi as we,aY as Ce,c as H,e as ye,bk as ne,bD as he,bE as Se,o as Pe,bF as xe,bw as Oe,bG as Ie,bH as Re,S as Ee,E as te}from"./main-crazy-owls-work.js";import{R as ze,a as Ne}from"./LeftOutlined-i89HTNl0.js";import{D as De}from"./Dropdown-D0863Mnh.js";import{M as je,O as Te}from"./index-BuKJnHlC.js";import{i as ie}from"./move-ULSkkuK6.js";import{s as Be,a as He,b as Ae,c as Me,i as re,R as Le}from"./EllipsisOutlined-7nGPDvd9.js";const Xe=e=>typeof e!="object"&&typeof e!="function"||e===null,_e=e=>{const{componentCls:n,menuCls:t,colorError:i,colorTextLightSolid:l}=e,s=`${t}-item`;return{[`${n}, ${n}-menu-submenu`]:{[`${t} ${s}`]:{[`&${s}-danger:not(${s}-disabled)`]:{color:i,"&:hover":{color:l,backgroundColor:i}}}}}},Ve=e=>{const{componentCls:n,menuCls:t,zIndexPopup:i,dropdownArrowDistance:l,sizePopupArrow:s,antCls:o,iconCls:c,motionDurationMid:v,paddingBlock:C,fontSize:y,dropdownEdgeChildPadding:P,colorTextDisabled:f,fontSizeIcon:u,controlPaddingHorizontal:b,colorBgElevated:d}=e;return[{[n]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:i,display:"block","&::before":{position:"absolute",insetBlock:e.calc(s).div(2).sub(l).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${o}-btn`]:{[`& > ${c}-down, & > ${o}-btn-icon > ${c}-down`]:{fontSize:u}},[`${n}-wrap`]:{position:"relative",[`${o}-btn > ${c}-down`]:{fontSize:u},[`${c}-down::before`]:{transition:`transform ${v}`}},[`${n}-wrap-open`]:{[`${c}-down::before`]:{transform:"rotate(180deg)"}},"\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ":{display:"none"},[`&${o}-slide-down-enter${o}-slide-down-enter-active${n}-placement-bottomLeft,
          &${o}-slide-down-appear${o}-slide-down-appear-active${n}-placement-bottomLeft,
          &${o}-slide-down-enter${o}-slide-down-enter-active${n}-placement-bottom,
          &${o}-slide-down-appear${o}-slide-down-appear-active${n}-placement-bottom,
          &${o}-slide-down-enter${o}-slide-down-enter-active${n}-placement-bottomRight,
          &${o}-slide-down-appear${o}-slide-down-appear-active${n}-placement-bottomRight`]:{animationName:Me},[`&${o}-slide-up-enter${o}-slide-up-enter-active${n}-placement-topLeft,
          &${o}-slide-up-appear${o}-slide-up-appear-active${n}-placement-topLeft,
          &${o}-slide-up-enter${o}-slide-up-enter-active${n}-placement-top,
          &${o}-slide-up-appear${o}-slide-up-appear-active${n}-placement-top,
          &${o}-slide-up-enter${o}-slide-up-enter-active${n}-placement-topRight,
          &${o}-slide-up-appear${o}-slide-up-appear-active${n}-placement-topRight`]:{animationName:Ae},[`&${o}-slide-down-leave${o}-slide-down-leave-active${n}-placement-bottomLeft,
          &${o}-slide-down-leave${o}-slide-down-leave-active${n}-placement-bottom,
          &${o}-slide-down-leave${o}-slide-down-leave-active${n}-placement-bottomRight`]:{animationName:He},[`&${o}-slide-up-leave${o}-slide-up-leave-active${n}-placement-topLeft,
          &${o}-slide-up-leave${o}-slide-up-leave-active${n}-placement-top,
          &${o}-slide-up-leave${o}-slide-up-leave-active${n}-placement-topRight`]:{animationName:Be}}},me(e,d,{arrowPlacement:{top:!0,bottom:!0}}),{[`${n} ${t}`]:{position:"relative",margin:0},[`${t}-submenu-popup`]:{position:"absolute",zIndex:i,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${n}, ${n}-menu-submenu`]:Object.assign(Object.assign({},be(e)),{[t]:Object.assign(Object.assign({padding:P,listStyleType:"none",backgroundColor:d,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},oe(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${t}-item-group-title`]:{padding:`${S(C)} ${S(b)}`,color:e.colorTextDescription,transition:`all ${v}`},[`${t}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${t}-item-icon`]:{minWidth:y,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${t}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${v}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${t}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${t}-item, ${t}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${S(C)} ${S(b)}`,color:e.colorText,fontWeight:"normal",fontSize:y,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${v}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},oe(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:d,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${S(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${n}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${n}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:u,fontStyle:"normal"}}}),[`${t}-item-group-list`]:{margin:`0 ${S(e.marginXS)}`,padding:0,listStyle:"none"},[`${t}-submenu-title`]:{paddingInlineEnd:e.calc(b).add(e.fontSizeSM).equal()},[`${t}-submenu-vertical`]:{position:"relative"},[`${t}-submenu${t}-submenu-disabled ${n}-menu-submenu-title`]:{[`&, ${n}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:d,cursor:"not-allowed"}},[`${t}-submenu-selected ${n}-menu-submenu-title`]:{color:e.colorPrimary}})})},[re(e,"slide-up"),re(e,"slide-down"),ie(e,"move-up"),ie(e,"move-down"),ge(e,"zoom-big")]]},We=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},ve({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),$e(e)),Fe=pe("Dropdown",e=>{const{marginXXS:n,sizePopupArrow:t,paddingXXS:i,componentCls:l}=e,s=ue(e,{menuCls:`${l}-menu`,dropdownArrowDistance:e.calc(t).div(2).add(n).equal(),dropdownEdgeChildPadding:i});return[Ve(s),_e(s)]},We,{resetStyle:!1}),A=e=>{var n;const{menu:t,arrow:i,prefixCls:l,children:s,trigger:o,disabled:c,dropdownRender:v,popupRender:C,getPopupContainer:y,overlayClassName:P,rootClassName:f,overlayStyle:u,open:b,onOpenChange:d,visible:M,onVisibleChange:x,mouseEnterDelay:L=.15,mouseLeaveDelay:X=.1,autoAdjustOverflow:_=!0,placement:m="",overlay:O,transitionName:I,destroyOnHidden:R,destroyPopupOnHide:V}=e,{getPopupContainer:W,getPrefixCls:E,direction:w,dropdown:$}=r.useContext(ae),N=C||v;Oe();const F=r.useMemo(()=>{const a=E();return I!==void 0?I:m.includes("top")?`${a}-slide-down`:`${a}-slide-up`},[E,m,I]),U=r.useMemo(()=>m?m.includes("Center")?m.slice(0,m.indexOf("Center")):m:w==="rtl"?"bottomRight":"bottomLeft",[m,w]),p=E("dropdown",l),z=fe(p),[q,D,j]=Fe(p,z),[,T]=we(),g=r.Children.only(Xe(s)?r.createElement("span",null,s):s),G=Ce(g,{className:H(`${p}-trigger`,{[`${p}-rtl`]:w==="rtl"},g.props.className),disabled:(n=g.props.disabled)!==null&&n!==void 0?n:c}),h=c?[]:o,Y=!!(h!=null&&h.includes("contextMenu")),[Z,B]=ye(!1,{value:b??M}),J=ne(a=>{d==null||d(a,{source:"trigger"}),x==null||x(a),B(a)}),K=H(P,f,D,j,z,$==null?void 0:$.className,{[`${p}-rtl`]:w==="rtl"}),Q=he({arrowPointAtCenter:typeof i=="object"&&i.pointAtCenter,autoAdjustOverflow:_,offset:T.marginXXS,arrowWidth:i?T.sizePopupArrow:0,borderRadius:T.borderRadius}),se=ne(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(d==null||d(!1,{source:"menu"}),B(!1))}),de=()=>{let a;return t!=null&&t.items?a=r.createElement(je,Object.assign({},t)):typeof O=="function"?a=O():a=O,N&&(a=N(a)),a=r.Children.only(typeof a=="string"?r.createElement("span",null,a):a),r.createElement(Te,{prefixCls:`${p}-menu`,rootClassName:H(j,z),expandIcon:r.createElement("span",{className:`${p}-menu-submenu-arrow`},w==="rtl"?r.createElement(ze,{className:`${p}-menu-submenu-arrow-icon`}):r.createElement(Ne,{className:`${p}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:se,validator:({mode:Ze})=>{}},a)},[ee,ce]=Se("Dropdown",u==null?void 0:u.zIndex);let k=r.createElement(De,Object.assign({alignPoint:Y},Pe(e,["rootClassName"]),{mouseEnterDelay:L,mouseLeaveDelay:X,visible:Z,builtinPlacements:Q,arrow:!!i,overlayClassName:K,prefixCls:p,getPopupContainer:y||W,transitionName:F,trigger:h,overlay:de,placement:U,onVisibleChange:J,overlayStyle:Object.assign(Object.assign(Object.assign({},$==null?void 0:$.style),u),{zIndex:ee}),autoDestroy:R??V}),G);return ee&&(k=r.createElement(xe.Provider,{value:ce},k)),q(k)},Ue=Ie(A,"align",void 0,"dropdown",e=>e),qe=e=>r.createElement(Ue,Object.assign({},e),r.createElement("span",null));A._InternalPanelDoNotUseOrYouWillBeFired=qe;var Ge=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(t[i[l]]=e[i[l]]);return t};const le=e=>{const{getPopupContainer:n,getPrefixCls:t,direction:i}=r.useContext(ae),{prefixCls:l,type:s="default",danger:o,disabled:c,loading:v,onClick:C,htmlType:y,children:P,className:f,menu:u,arrow:b,autoFocus:d,overlay:M,trigger:x,align:L,open:X,onOpenChange:_,placement:m,getPopupContainer:O,href:I,icon:R=r.createElement(Le,null),title:V,buttonsRender:W=Q=>Q,mouseEnterDelay:E,mouseLeaveDelay:w,overlayClassName:$,overlayStyle:N,destroyOnHidden:F,destroyPopupOnHide:U,dropdownRender:p,popupRender:z}=e,q=Ge(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),D=t("dropdown",l),j=`${D}-button`,g={menu:u,arrow:b,autoFocus:d,align:L,disabled:c,trigger:c?[]:x,onOpenChange:_,getPopupContainer:O||n,mouseEnterDelay:E,mouseLeaveDelay:w,overlayClassName:$,overlayStyle:N,destroyOnHidden:F,popupRender:z||p},{compactSize:G,compactItemClassnames:h}=Re(D,i),Y=H(j,h,f);"destroyPopupOnHide"in e&&(g.destroyPopupOnHide=U),"overlay"in e&&(g.overlay=M),"open"in e&&(g.open=X),"placement"in e?g.placement=m:g.placement=i==="rtl"?"bottomLeft":"bottomRight";const Z=r.createElement(te,{type:s,danger:o,disabled:c,loading:v,onClick:C,htmlType:y,href:I,title:V},P),B=r.createElement(te,{type:s,danger:o,icon:R}),[J,K]=W([Z,B]);return r.createElement(Ee.Compact,Object.assign({className:Y,size:G,block:!0},q),J,r.createElement(A,Object.assign({},g),K))};le.__ANT_BUTTON=!0;const Ye=A;Ye.Button=le;export{Ye as D};
