import{a_ as N,aE as b,aF as S,am as R,aD as j,a3 as q,a4 as Y,dH as Z,S as w,b9 as ee,ag as ne,d as z,ah as G,e as ae,dI as oe,g as te,a8 as Q,f as le,a9 as E,b as f,ab as T,dJ as re,au as se,dv as ie,dK as de,aw as W,bm as ce,ar as pe,Q as ue,aC as fe,c0 as ve,aR as be,aQ as ge,aS as $e}from"./vue-router.33ac8cf0.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="14d33f26-710c-498d-aa25-874676fe6c1e",n._sentryDebugIdIdentifier="sentry-dbid-14d33f26-710c-498d-aa25-874676fe6c1e")}catch{}})();const me=()=>({prefixCls:String,activeKey:N([Array,Number,String]),defaultActiveKey:N([Array,Number,String]),accordion:b(),destroyInactivePanel:b(),bordered:b(),expandIcon:S(),openAnimation:R.object,expandIconPosition:j(),collapsible:j(),ghost:b(),onChange:S(),"onUpdate:activeKey":S()}),U=()=>({openAnimation:R.object,prefixCls:String,header:R.any,headerClass:String,showArrow:b(),isActive:b(),destroyInactivePanel:b(),disabled:b(),accordion:b(),forceRender:b(),expandIcon:S(),extra:R.any,panelKey:N(),collapsible:j(),role:String,onItemClick:S()}),ye=n=>{const{componentCls:e,collapseContentBg:o,padding:p,collapseContentPaddingHorizontal:i,collapseHeaderBg:d,collapseHeaderPadding:l,collapsePanelBorderRadius:u,lineWidth:v,lineType:$,colorBorder:h,colorText:x,colorTextHeading:g,colorTextDisabled:m,fontSize:C,lineHeight:y,marginSM:A,paddingSM:a,motionDurationSlow:t,fontSizeIcon:r}=n,s=`${v}px ${$} ${h}`;return{[e]:w(w({},ne(n)),{backgroundColor:d,border:s,borderBottom:0,borderRadius:`${u}px`,["&-rtl"]:{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:s,["&:last-child"]:{[`
            &,
            & > ${e}-header`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`> ${e}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:l,color:g,lineHeight:y,cursor:"pointer",transition:`all ${t}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:C*y,display:"flex",alignItems:"center",paddingInlineEnd:A},[`${e}-arrow`]:w(w({},ee()),{fontSize:r,svg:{transition:`transform ${t}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}},[`${e}-header-collapsible-only`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-icon-collapsible-only`]:{cursor:"default",[`${e}-expand-icon`]:{cursor:"pointer"}},[`&${e}-no-arrow`]:{[`> ${e}-header`]:{paddingInlineStart:a}}},[`${e}-content`]:{color:x,backgroundColor:o,borderTop:s,[`& > ${e}-content-box`]:{padding:`${p}px ${i}px`},["&-hidden"]:{display:"none"}},[`${e}-item:last-child`]:{[`> ${e}-content`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`& ${e}-item-disabled > ${e}-header`]:{[`
          &,
          & > .arrow
        `]:{color:m,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:A}}}}})}},he=n=>{const{componentCls:e}=n,o=`> ${e}-item > ${e}-header ${e}-arrow svg`;return{[`${e}-rtl`]:{[o]:{transform:"rotate(180deg)"}}}},xe=n=>{const{componentCls:e,collapseHeaderBg:o,paddingXXS:p,colorBorder:i}=n;return{[`${e}-borderless`]:{backgroundColor:o,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${i}`},[`
        > ${e}-item:last-child,
        > ${e}-item:last-child ${e}-header
      `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:p}}}},Ce=n=>{const{componentCls:e,paddingSM:o}=n;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:o}}}}}},Ae=q("Collapse",n=>{const e=Y(n,{collapseContentBg:n.colorBgContainer,collapseHeaderBg:n.colorFillAlter,collapseHeaderPadding:`${n.paddingSM}px ${n.padding}px`,collapsePanelBorderRadius:n.borderRadiusLG,collapseContentPaddingHorizontal:16});return[ye(e),xe(e),Ce(e),he(e),Z(e)]});function F(n){let e=n;if(!Array.isArray(e)){const o=typeof e;e=o==="number"||o==="string"?[e]:[]}return e.map(o=>String(o))}const Se=z({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:G(me(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(n,e){let{attrs:o,slots:p,emit:i}=e;const d=ae(F(oe([n.activeKey,n.defaultActiveKey])));te(()=>n.activeKey,()=>{d.value=F(n.activeKey)},{deep:!0});const{prefixCls:l,direction:u,rootPrefixCls:v}=Q("collapse",n),[$,h]=Ae(l),x=le(()=>{const{expandIconPosition:a}=n;return a!==void 0?a:u.value==="rtl"?"end":"start"}),g=a=>{const{expandIcon:t=p.expandIcon}=n,r=t?t(a):f(ce,{rotate:a.isActive?90:void 0},null);return f("div",{class:[`${l.value}-expand-icon`,h.value],onClick:()=>["header","icon"].includes(n.collapsible)&&C(a.panelKey)},[pe(Array.isArray(t)?r[0]:r)?W(r,{class:`${l.value}-arrow`},!1):r])},m=a=>{n.activeKey===void 0&&(d.value=a);const t=n.accordion?a[0]:a;i("update:activeKey",t),i("change",t)},C=a=>{let t=d.value;if(n.accordion)t=t[0]===a?[]:[a];else{t=[...t];const r=t.indexOf(a);r>-1?t.splice(r,1):t.push(a)}m(t)},y=(a,t)=>{var r,s,I;if(ie(a))return;const c=d.value,{accordion:P,destroyInactivePanel:k,collapsible:K,openAnimation:_}=n,D=_||de(`${v.value}-motion-collapse`),B=String((r=a.key)!==null&&r!==void 0?r:t),{header:X=(I=(s=a.children)===null||s===void 0?void 0:s.header)===null||I===void 0?void 0:I.call(s),headerClass:J,collapsible:H,disabled:V}=a.props||{};let M=!1;P?M=c[0]===B:M=c.indexOf(B)>-1;let O=H!=null?H:K;(V||V==="")&&(O="disabled");const L={key:B,panelKey:B,header:X,headerClass:J,isActive:M,prefixCls:l.value,destroyInactivePanel:k,openAnimation:D,accordion:P,onItemClick:O==="disabled"?null:C,expandIcon:g,collapsible:O};return W(a,L)},A=()=>{var a;return se((a=p.default)===null||a===void 0?void 0:a.call(p)).map(y)};return()=>{const{accordion:a,bordered:t,ghost:r}=n,s=E(l.value,{[`${l.value}-borderless`]:!t,[`${l.value}-icon-position-${x.value}`]:!0,[`${l.value}-rtl`]:u.value==="rtl",[`${l.value}-ghost`]:!!r,[o.class]:!!o.class},h.value);return $(f("div",T(T({class:s},re(o)),{},{style:o.style,role:a?"tablist":null}),[A()]))}}}),Ie=z({compatConfig:{MODE:3},name:"PanelContent",props:U(),setup(n,e){let{slots:o}=e;const p=ue(!1);return fe(()=>{(n.isActive||n.forceRender)&&(p.value=!0)}),()=>{var i;if(!p.value)return null;const{prefixCls:d,isActive:l,role:u}=n;return f("div",{class:E(`${d}-content`,{[`${d}-content-active`]:l,[`${d}-content-inactive`]:!l}),role:u},[f("div",{class:`${d}-content-box`},[(i=o.default)===null||i===void 0?void 0:i.call(o)])])}}}),Pe=z({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:G(U(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(n,e){let{slots:o,emit:p,attrs:i}=e;ve(n.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:d}=Q("collapse",n),l=()=>{p("itemClick",n.panelKey)},u=v=>{(v.key==="Enter"||v.keyCode===13||v.which===13)&&l()};return()=>{var v,$;const{header:h=(v=o.header)===null||v===void 0?void 0:v.call(o),headerClass:x,isActive:g,showArrow:m,destroyInactivePanel:C,accordion:y,forceRender:A,openAnimation:a,expandIcon:t=o.expandIcon,extra:r=($=o.extra)===null||$===void 0?void 0:$.call(o),collapsible:s}=n,I=s==="disabled",c=d.value,P=E(`${c}-header`,{[x]:x,[`${c}-header-collapsible-only`]:s==="header",[`${c}-icon-collapsible-only`]:s==="icon"}),k=E({[`${c}-item`]:!0,[`${c}-item-active`]:g,[`${c}-item-disabled`]:I,[`${c}-no-arrow`]:!m,[`${i.class}`]:!!i.class});let K=f("i",{class:"arrow"},null);m&&typeof t=="function"&&(K=t(n));const _=be(f(Ie,{prefixCls:c,isActive:g,forceRender:A,role:y?"tabpanel":null},{default:o.default}),[[$e,g]]),D=w({appear:!1,css:!1},a);return f("div",T(T({},i),{},{class:k}),[f("div",{class:P,onClick:()=>!["header","icon"].includes(s)&&l(),role:y?"tab":"button",tabindex:I?-1:0,"aria-expanded":g,onKeypress:u},[m&&K,f("span",{onClick:()=>s==="header"&&l(),class:`${c}-header-text`},[h]),r&&f("div",{class:`${c}-extra`},[r])]),f(ge,D,{default:()=>[!C||g?_:null]})])}}});export{Pe as A,Se as C};
//# sourceMappingURL=CollapsePanel.c823c0f2.js.map
