1import{k,t as H,l as w,b as x,j as B,B as q,c as $,Y as z,L as P,S as j,$ as D,a0 as T,a1 as Y,_ as J,a5 as K}from"./C6IAzeUg.js";const A="--vc-auto-duration",L=`height var(${A}) cubic-bezier(0.33, 1, 0.68, 1)`,c={padding:0},V=300,E={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"};function N(t){return t.value?parseFloat(getComputedStyle(t.value).height):0}function S(t){if(!t.value)return{};const{transition:l}=getComputedStyle(t.value);return l==="all 0s ease 0s"||l==="all"?{transition:L}:{transition:l}}function F(t){if(!t.value)return!0;const{transition:l}=getComputedStyle(t.value);return typeof window.requestAnimationFrame>"u"||window.matchMedia("(prefers-reduced-motion: reduce)").matches||l.includes("none")||l.includes("height 0s")}function G(t=0){if(t===0)return 0;const l=t/36,i=Math.round((4+15*l**.25+l/5)*10);return Number.isFinite(i)?i:0}const Q=k({inheritAttrs:!0,__name:"Collapse",props:{when:{type:Boolean},baseHeight:{default:0},as:{default:"div"}},emits:["collapse","expand","collapsed","expanded"],setup(t,{emit:l}){const i=t,r=l,o=H(i,"when"),n=H(i,"baseHeight"),v=w(()=>({overflow:"hidden",height:`${n.value}px`})),h=w(()=>({...c,...n.value===0?{display:"none"}:v.value})),a=x(null),g=x(o.value?"expanded":"collapsed"),d=e=>g.value=e;function M(){return o.value?c:n.value===0?E:h.value}const f=B(M()),s=e=>f.value=e,u=e=>s({...f.value,...e}),y=x(V),R=e=>y.value=e,b=w(()=>({[A]:`${y.value}ms`}));let p=NaN;function m(){s(c),d("expanded"),r("expanded")}function C(){s(h.value),d("collapsed"),r("collapsed")}q(()=>{if(!a.value)return;const e=G(a.value.scrollHeight-n.value);e>0&&R(e),!o.value&&n.value===0&&s(h.value)}),$(o,e=>{if(a.value)if(p=NaN,e){if(F(a))return m();d("expanding"),r("expand"),s({...c,...v.value,...b.value}),requestAnimationFrame(()=>{if(a.value.scrollHeight===0)return m();p=a.value.scrollHeight,u({...S(a),height:`${p}px`,willChange:"height"})})}else{if(F(a)||(d("collapsing"),r("collapse"),u({...b.value,height:`${a.value.scrollHeight}px`}),a.value.scrollHeight===0))return C();requestAnimationFrame(()=>{u({...v.value,...S(a),willChange:"height"})})}}),$(n,e=>{o.value||(e>0?u({display:void 0,height:`${e}px`}):u({display:"none"}))});function _(e){e.target&&e.target===a.value&&e.propertyName==="height"&&(o.value?Math.abs(a.value.scrollHeight-N(a))<1?m():p<a.value.scrollHeight&&u({height:`${a.value.scrollHeight}px`}):Math.abs(n.value-N(a))<1&&C())}return(e,I)=>(z(),P(K(i.as),{ref_key:"collapseRef",ref:a,style:J(f.value),onTransitionend:_,"data-collapse":g.value},{default:j(()=>[D(e.$slots,"default",T(Y({state:g.value})))]),_:3},40,["style","data-collapse"]))}});export{Q as J};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.