import{bp as M,aQ as g,aR as P,a7 as B,aP as j,D as q,E as J,ck as L,W as S,bx as Y,a0 as Z,d as N,a1 as U,ch as ee,r as ne,e1 as ae,K as oe,O as V,J as te,Q as R,f as b,U as k,e2 as le,ah as re,aF as se,aj as W,b8 as ie,ae as de,G as ce,aO as pe,aC as ue,aq as fe,ap as be,ar as ve}from"./outputWidgets.d94fff8c.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]="017a47ea-cc99-4d6f-b152-8315800bac2d",n._sentryDebugIdIdentifier="sentry-dbid-017a47ea-cc99-4d6f-b152-8315800bac2d")}catch{}})();const ge=()=>({prefixCls:String,activeKey:M([Array,Number,String]),defaultActiveKey:M([Array,Number,String]),accordion:g(),destroyInactivePanel:g(),bordered:g(),expandIcon:P(),openAnimation:B.object,expandIconPosition:j(),collapsible:j(),ghost:g(),onChange:P(),"onUpdate:activeKey":P()}),F=()=>({openAnimation:B.object,prefixCls:String,header:B.any,headerClass:String,showArrow:g(),isActive:g(),destroyInactivePanel:g(),disabled:g(),accordion:g(),forceRender:g(),expandIcon:P(),extra:B.any,panelKey:M(),collapsible:j(),role:String,onItemClick:P()}),$e=n=>{const{componentCls:e,collapseContentBg:o,padding:p,collapseContentPaddingHorizontal:s,collapseHeaderBg:i,collapseHeaderPadding:r,collapsePanelBorderRadius:u,lineWidth:v,lineType:m,colorBorder:A,colorText:x,colorTextHeading:$,colorTextDisabled:y,fontSize:I,lineHeight:h,marginSM:a,paddingSM:t,motionDurationSlow:l,fontSizeIcon:f}=n,d=`${v}px ${m} ${A}`;return{[e]:S(S({},Z(n)),{backgroundColor:i,border:d,borderBottom:0,borderRadius:`${u}px`,["&-rtl"]:{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:d,["&:last-child"]:{[`
            &,
            & > ${e}-header`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`> ${e}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:r,color:$,lineHeight:h,cursor:"pointer",transition:`all ${l}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:I*h,display:"flex",alignItems:"center",paddingInlineEnd:a},[`${e}-arrow`]:S(S({},Y()),{fontSize:f,svg:{transition:`transform ${l}`}}),[`${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:t}}},[`${e}-content`]:{color:x,backgroundColor:o,borderTop:d,[`& > ${e}-content-box`]:{padding:`${p}px ${s}px`},["&-hidden"]:{display:"none"}},[`${e}-item:last-child`]:{[`> ${e}-content`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`& ${e}-item-disabled > ${e}-header`]:{[`
          &,
          & > .arrow
        `]:{color:y,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:a}}}}})}},me=n=>{const{componentCls:e}=n,o=`> ${e}-item > ${e}-header ${e}-arrow svg`;return{[`${e}-rtl`]:{[o]:{transform:"rotate(180deg)"}}}},ye=n=>{const{componentCls:e,collapseHeaderBg:o,paddingXXS:p,colorBorder:s}=n;return{[`${e}-borderless`]:{backgroundColor:o,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${s}`},[`
        > ${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}}}},he=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}}}}}},xe=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[$e(e),ye(e),he(e),me(e),L(e)]});function G(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 Ie=N({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:U(ge(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,openAnimation:ee("ant-motion-collapse",!1),expandIconPosition:"start"}),slots:Object,setup(n,e){let{attrs:o,slots:p,emit:s}=e;const i=ne(G(ae([n.activeKey,n.defaultActiveKey])));oe(()=>n.activeKey,()=>{i.value=G(n.activeKey)},{deep:!0});const{prefixCls:r,direction:u}=V("collapse",n),[v,m]=xe(r),A=te(()=>{const{expandIconPosition:a}=n;return a!==void 0?a:u.value==="rtl"?"end":"start"}),x=a=>{const{expandIcon:t=p.expandIcon}=n,l=t?t(a):b(ie,{rotate:a.isActive?90:void 0},null);return b("div",{class:[`${r.value}-expand-icon`,m.value],onClick:()=>["header","icon"].includes(n.collapsible)&&y(a.panelKey)},[de(Array.isArray(t)?l[0]:l)?W(l,{class:`${r.value}-arrow`},!1):l])},$=a=>{n.activeKey===void 0&&(i.value=a);const t=n.accordion?a[0]:a;s("update:activeKey",t),s("change",t)},y=a=>{let t=i.value;if(n.accordion)t=t[0]===a?[]:[a];else{t=[...t];const l=t.indexOf(a);l>-1?t.splice(l,1):t.push(a)}$(t)},I=(a,t)=>{var l,f,d;if(se(a))return;const w=i.value,{accordion:c,destroyInactivePanel:E,collapsible:T,openAnimation:K}=n,C=String((l=a.key)!==null&&l!==void 0?l:t),{header:D=(d=(f=a.children)===null||f===void 0?void 0:f.header)===null||d===void 0?void 0:d.call(f),headerClass:Q,collapsible:_,disabled:z}=a.props||{};let H=!1;c?H=w[0]===C:H=w.indexOf(C)>-1;let O=_!=null?_:T;(z||z==="")&&(O="disabled");const X={key:C,panelKey:C,header:D,headerClass:Q,isActive:H,prefixCls:r.value,destroyInactivePanel:E,openAnimation:K,accordion:c,onItemClick:O==="disabled"?null:y,expandIcon:x,collapsible:O};return W(a,X)},h=()=>{var a;return re((a=p.default)===null||a===void 0?void 0:a.call(p)).map(I)};return()=>{const{accordion:a,bordered:t,ghost:l}=n,f=R(r.value,{[`${r.value}-borderless`]:!t,[`${r.value}-icon-position-${A.value}`]:!0,[`${r.value}-rtl`]:u.value==="rtl",[`${r.value}-ghost`]:!!l,[o.class]:!!o.class},m.value);return v(b("div",k(k({class:f},le(o)),{},{style:o.style,role:a?"tablist":null}),[h()]))}}}),Ce=N({compatConfig:{MODE:3},name:"PanelContent",props:F(),setup(n,e){let{slots:o}=e;const p=ce(!1);return pe(()=>{(n.isActive||n.forceRender)&&(p.value=!0)}),()=>{var s;if(!p.value)return null;const{prefixCls:i,isActive:r,role:u}=n;return b("div",{class:R(`${i}-content`,{[`${i}-content-active`]:r,[`${i}-content-inactive`]:!r}),role:u},[b("div",{class:`${i}-content-box`},[(s=o.default)===null||s===void 0?void 0:s.call(o)])])}}}),we=N({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:U(F(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(n,e){let{slots:o,emit:p,attrs:s}=e;ue(n.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:i}=V("collapse",n),r=()=>{p("itemClick",n.panelKey)},u=v=>{(v.key==="Enter"||v.keyCode===13||v.which===13)&&r()};return()=>{var v,m;const{header:A=(v=o.header)===null||v===void 0?void 0:v.call(o),headerClass:x,isActive:$,showArrow:y,destroyInactivePanel:I,accordion:h,forceRender:a,openAnimation:t,expandIcon:l=o.expandIcon,extra:f=(m=o.extra)===null||m===void 0?void 0:m.call(o),collapsible:d}=n,w=d==="disabled",c=i.value,E=R(`${c}-header`,{[x]:x,[`${c}-header-collapsible-only`]:d==="header",[`${c}-icon-collapsible-only`]:d==="icon"}),T=R({[`${c}-item`]:!0,[`${c}-item-active`]:$,[`${c}-item-disabled`]:w,[`${c}-no-arrow`]:!y,[`${s.class}`]:!!s.class});let K=b("i",{class:"arrow"},null);y&&typeof l=="function"&&(K=l(n));const C=fe(b(Ce,{prefixCls:c,isActive:$,forceRender:a,role:h?"tabpanel":null},{default:o.default}),[[ve,$]]),D=S({appear:!1,css:!1},t);return b("div",k(k({},s),{},{class:T}),[b("div",{class:E,onClick:()=>!["header","icon"].includes(d)&&r(),role:h?"tab":"button",tabindex:w?-1:0,"aria-expanded":$,onKeypress:u},[y&&K,b("span",{onClick:()=>d==="header"&&r(),class:`${c}-header-text`},[A]),f&&b("div",{class:`${c}-extra`},[f])]),b(be,D,{default:()=>[!I||$?C:null]})])}}});export{we as A,Ie as C};
//# sourceMappingURL=CollapsePanel.1d546a09.js.map
