import{a_ as N,av as v,aw as P,a3 as R,au as j,y as q,z as J,c4 as Z,Q as w,b6 as ee,X as ne,d as z,Y as X,r as oe,dt as te,G as ae,K as F,F as le,L as T,f,O as _,du as re,ad as se,de as ie,c0 as de,an as V,aP as ce,aa as pe,D as ue,at as fe,bm as be,bh as ve,b_ as $e,b$ as ge}from"./outputWidgets.b00cf7e9.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]="29e4b58b-709f-485d-ade9-e3ee6b72fb1d",n._sentryDebugIdIdentifier="sentry-dbid-29e4b58b-709f-485d-ade9-e3ee6b72fb1d")}catch{}})();const me=()=>({prefixCls:String,activeKey:N([Array,Number,String]),defaultActiveKey:N([Array,Number,String]),accordion:v(),destroyInactivePanel:v(),bordered:v(),expandIcon:P(),openAnimation:R.object,expandIconPosition:j(),collapsible:j(),ghost:v(),onChange:P(),"onUpdate:activeKey":P()}),L=()=>({openAnimation:R.object,prefixCls:String,header:R.any,headerClass:String,showArrow:v(),isActive:v(),destroyInactivePanel:v(),disabled:v(),accordion:v(),forceRender:v(),expandIcon:P(),extra:R.any,panelKey:N(),collapsible:j(),role:String,onItemClick:P()}),ye=n=>{const{componentCls:e,collapseContentBg:t,padding:p,collapseContentPaddingHorizontal:i,collapseHeaderBg:d,collapseHeaderPadding:l,collapsePanelBorderRadius:u,lineWidth:b,lineType:g,colorBorder:h,colorText:x,colorTextHeading:$,colorTextDisabled:m,fontSize:C,lineHeight:y,marginSM:A,paddingSM:o,motionDurationSlow:a,fontSizeIcon:r}=n,s=`${b}px ${g} ${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:$,lineHeight:y,cursor:"pointer",transition:`all ${a}, 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 ${a}`}}),[`${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:o}}},[`${e}-content`]:{color:x,backgroundColor:t,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,t=`> ${e}-item > ${e}-header ${e}-arrow svg`;return{[`${e}-rtl`]:{[t]:{transform:"rotate(180deg)"}}}},xe=n=>{const{componentCls:e,collapseHeaderBg:t,paddingXXS:p,colorBorder:i}=n;return{[`${e}-borderless`]:{backgroundColor:t,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:t}=n;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:t}}}}}},Ae=q("Collapse",n=>{const e=J(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 W(n){let e=n;if(!Array.isArray(e)){const t=typeof e;e=t==="number"||t==="string"?[e]:[]}return e.map(t=>String(t))}const Pe=z({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:X(me(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(n,e){let{attrs:t,slots:p,emit:i}=e;const d=oe(W(te([n.activeKey,n.defaultActiveKey])));ae(()=>n.activeKey,()=>{d.value=W(n.activeKey)},{deep:!0});const{prefixCls:l,direction:u,rootPrefixCls:b}=F("collapse",n),[g,h]=Ae(l),x=le(()=>{const{expandIconPosition:o}=n;return o!==void 0?o:u.value==="rtl"?"end":"start"}),$=o=>{const{expandIcon:a=p.expandIcon}=n,r=a?a(o):f(ce,{rotate:o.isActive?90:void 0},null);return f("div",{class:[`${l.value}-expand-icon`,h.value],onClick:()=>["header","icon"].includes(n.collapsible)&&C(o.panelKey)},[pe(Array.isArray(a)?r[0]:r)?V(r,{class:`${l.value}-arrow`},!1):r])},m=o=>{n.activeKey===void 0&&(d.value=o);const a=n.accordion?o[0]:o;i("update:activeKey",a),i("change",a)},C=o=>{let a=d.value;if(n.accordion)a=a[0]===o?[]:[o];else{a=[...a];const r=a.indexOf(o);r>-1?a.splice(r,1):a.push(o)}m(a)},y=(o,a)=>{var r,s,I;if(ie(o))return;const c=d.value,{accordion:S,destroyInactivePanel:k,collapsible:K,openAnimation:E}=n,D=E||de(`${b.value}-motion-collapse`),B=String((r=o.key)!==null&&r!==void 0?r:a),{header:U=(I=(s=o.children)===null||s===void 0?void 0:s.header)===null||I===void 0?void 0:I.call(s),headerClass:Q,collapsible:H,disabled:G}=o.props||{};let M=!1;S?M=c[0]===B:M=c.indexOf(B)>-1;let O=H!=null?H:K;(G||G==="")&&(O="disabled");const Y={key:B,panelKey:B,header:U,headerClass:Q,isActive:M,prefixCls:l.value,destroyInactivePanel:k,openAnimation:D,accordion:S,onItemClick:O==="disabled"?null:C,expandIcon:$,collapsible:O};return V(o,Y)},A=()=>{var o;return se((o=p.default)===null||o===void 0?void 0:o.call(p)).map(y)};return()=>{const{accordion:o,bordered:a,ghost:r}=n,s=T(l.value,{[`${l.value}-borderless`]:!a,[`${l.value}-icon-position-${x.value}`]:!0,[`${l.value}-rtl`]:u.value==="rtl",[`${l.value}-ghost`]:!!r,[t.class]:!!t.class},h.value);return g(f("div",_(_({class:s},re(t)),{},{style:t.style,role:o?"tablist":null}),[A()]))}}}),Ie=z({compatConfig:{MODE:3},name:"PanelContent",props:L(),setup(n,e){let{slots:t}=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:T(`${d}-content`,{[`${d}-content-active`]:l,[`${d}-content-inactive`]:!l}),role:u},[f("div",{class:`${d}-content-box`},[(i=t.default)===null||i===void 0?void 0:i.call(t)])])}}}),Se=z({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:X(L(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(n,e){let{slots:t,emit:p,attrs:i}=e;be(n.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:d}=F("collapse",n),l=()=>{p("itemClick",n.panelKey)},u=b=>{(b.key==="Enter"||b.keyCode===13||b.which===13)&&l()};return()=>{var b,g;const{header:h=(b=t.header)===null||b===void 0?void 0:b.call(t),headerClass:x,isActive:$,showArrow:m,destroyInactivePanel:C,accordion:y,forceRender:A,openAnimation:o,expandIcon:a=t.expandIcon,extra:r=(g=t.extra)===null||g===void 0?void 0:g.call(t),collapsible:s}=n,I=s==="disabled",c=d.value,S=T(`${c}-header`,{[x]:x,[`${c}-header-collapsible-only`]:s==="header",[`${c}-icon-collapsible-only`]:s==="icon"}),k=T({[`${c}-item`]:!0,[`${c}-item-active`]:$,[`${c}-item-disabled`]:I,[`${c}-no-arrow`]:!m,[`${i.class}`]:!!i.class});let K=f("i",{class:"arrow"},null);m&&typeof a=="function"&&(K=a(n));const E=ve(f(Ie,{prefixCls:c,isActive:$,forceRender:A,role:y?"tabpanel":null},{default:t.default}),[[ge,$]]),D=w({appear:!1,css:!1},o);return f("div",_(_({},i),{},{class:k}),[f("div",{class:S,onClick:()=>!["header","icon"].includes(s)&&l(),role:y?"tab":"button",tabindex:I?-1:0,"aria-expanded":$,onKeypress:u},[m&&K,f("span",{onClick:()=>s==="header"&&l(),class:`${c}-header-text`},[h]),r&&f("div",{class:`${c}-extra`},[r])]),f($e,D,{default:()=>[!C||$?E:null]})])}}});export{Se as A,Pe as C};
//# sourceMappingURL=CollapsePanel.db0264d1.js.map
