1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{t as n}from"./jsx-runtime-BdxMnOeJ.js";import{T as r}from"./initial_state-DnZ5UeDQ.js";import{i,n as a,t as o}from"./react-spring_web.modern-C6ohYUSs.js";import{t as s}from"./classnames-CfLRLWYq.js";import{t as c}from"./short_number-Cg8abbMu.js";import{t as l}from"./icon-BNrUFRb_.js";var u=e(s()),d=e(t());function f(e){let[{previous:t,current:n},r]=(0,d.useState)(()=>({previous:void 0,current:e})),i=t;return e!==n&&(r({previous:n,current:e}),i=n),i}var p=n(),m=({value:e})=>{let[t,n]=(0,d.useState)(e),s=e>t?-1:1,[l,u]=i(()=>({from:{transform:`translateY(${100*s}%)`},to:{transform:`translateY(0%)`},onRest(){n(e)},config:{...a.gentle,duration:200},immediate:!0}),[e,t]);return(0,d.useEffect)(()=>{e!==t&&u.start({reset:!0})},[u,t,e]),r?(0,p.jsx)(c,{value:e}):(0,p.jsxs)(`span`,{className:`animated-number`,children:[(0,p.jsx)(o.span,{style:l,children:(0,p.jsx)(c,{value:e})}),e!==t&&(0,p.jsx)(o.span,{style:{...l,position:`absolute`,top:`${-100*s}%`},role:`presentation`,children:(0,p.jsx)(c,{value:t})})]})},h=(0,d.forwardRef)(({className:e,expanded:t,icon:n,iconComponent:r,inverted:i,title:a,counter:o,href:s,style:c,activeStyle:h,onClick:g,onKeyDown:_,onMouseDown:v,active:y=!1,disabled:b=!1,animate:x=!1,overlay:S=!1,tabIndex:C=0,ariaHidden:w=!1,ariaControls:T},E)=>{let D=(0,d.useCallback)(e=>{e.preventDefault(),b||g?.(e)},[b,g]),O=(0,d.useCallback)(e=>{b||v?.(e)},[b,v]),k=(0,d.useCallback)(e=>{b||_?.(e)},[b,_]),A={...c,...y?h:{}},j=f(y)??y,M=x&&y!==j,N=(0,u.default)(e,`icon-button`,{active:y,disabled:b,inverted:i,activate:M&&y,deactivate:M&&!y,overlayed:S,"icon-button--with-counter":o!==void 0}),P=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l,{id:n,icon:r,"aria-hidden":`true`}),` `,o!==void 0&&(0,p.jsx)(`span`,{className:`icon-button__counter`,children:(0,p.jsx)(m,{value:o})})]});return s!=null&&(P=(0,p.jsx)(`a`,{href:s,target:`_blank`,rel:`noopener noreferrer`,children:P})),(0,p.jsx)(`button`,{type:`button`,"aria-label":a,"aria-expanded":t,"aria-hidden":w,"aria-controls":T,title:a,className:N,onClick:D,onMouseDown:O,onKeyDown:k,style:A,tabIndex:C,disabled:b,ref:E,children:P})});h.displayName=`IconButton`;export{m as n,f as r,h as t}; 2//# sourceMappingURL=icon_button-DfNtv8BJ.js.map
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.