(()=>{var v=!0;var{raw:vr,raw:Y}=String,X=v&&(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0})(),I=v&&typeof CSS<"u"&&CSS.supports&&CSS.supports("line-height","mod(1,1)"),L=v&&typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null,D="--_number-flow-d-opacity",O="--_number-flow-d-width",N="--_number-flow-dx",S="--_number-flow-d",B=(()=>{try{return CSS.registerProperty({name:D,syntax:"",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:N,syntax:"",inherits:!0,initialValue:"0px"}),CSS.registerProperty({name:O,syntax:"",inherits:!1,initialValue:"0"}),CSS.registerProperty({name:S,syntax:"",inherits:!0,initialValue:"0"}),!0}catch{return!1}})(),F="round(nearest, calc(var(--number-flow-mask-height, 0.25em) / 2), 1px)",x=`calc(${F} * 2)`,Q="var(--number-flow-mask-width, 0.5em)",e=`calc(${Q} / var(--scale-x))`,E="#000 0, transparent 71%",g=Y`:host{display:inline-block;direction:ltr;white-space:nowrap;isolation:isolate;line-height:1}.number,.number__inner{display:inline-block;transform-origin:left top}:host([data-will-change]) :is(.number,.number__inner,.section,.digit,.digit__num,.symbol){will-change:transform}.number{--scale-x:calc(1 + var(${O}) / var(--width));transform:translateX(var(${N})) scaleX(var(--scale-x));margin:0 calc(-1 * ${Q});position:relative;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 ${e},#000 calc(100% - ${e}),transparent ),linear-gradient(to bottom,transparent 0,#000 ${x},#000 calc(100% - ${x}),transparent 100% ),radial-gradient(at bottom right,${E}),radial-gradient(at bottom left,${E}),radial-gradient(at top left,${E}),radial-gradient(at top right,${E});-webkit-mask-size:100% calc(100% - ${x} * 2),calc(100% - ${e} * 2) 100%,${e} ${x},${e} ${x},${e} ${x},${e} ${x};-webkit-mask-position:center,center,top left,top right,bottom right,bottom left;-webkit-mask-repeat:no-repeat}.number__inner{padding:${F} ${Q};transform:scaleX(calc(1 / var(--scale-x))) translateX(calc(-1 * var(${N})))}:host > :not(.number){z-index:5}.section,.symbol{display:inline-block;position:relative;isolation:isolate}.section::after{content:'\200b';display:inline-block}.section--justify-left{transform-origin:center left}.section--justify-right{transform-origin:center right}.section > [inert],.symbol > [inert]{margin:0 !important;position:absolute !important;z-index:-1}.digit{display:inline-block;position:relative;--c:var(--current) + var(${S})}.digit__num,.number .section::after{padding:${F} 0}.digit__num{display:inline-block;--offset-raw:mod(var(--length) + var(--n) - mod(var(--c),var(--length)),var(--length));--offset:calc( var(--offset-raw) - var(--length) * round(down,var(--offset-raw) / (var(--length) / 2),1) );--y:clamp(-100%,var(--offset) * 100%,100%);transform:translateY(var(--y))}.digit__num[inert]{position:absolute;top:0;left:50%;transform:translateX(-50%) translateY(var(--y))}.digit:not(.is-spinning) .digit__num[inert]{display:none}.symbol__value{display:inline-block;mix-blend-mode:plus-lighter;white-space:pre}.section--justify-left .symbol > [inert]{left:0}.section--justify-right .symbol > [inert]{right:0}.animate-presence{opacity:calc(1 + var(${D}))}`,C=v&&typeof HTMLElement<"u"?HTMLElement:class{},$=Y`:host{display:inline-block;direction:ltr;white-space:nowrap;line-height:1}span{display:inline-block}:host([data-will-change]) span{will-change:transform}.number,.digit{padding:${F} 0}.symbol{white-space:pre}`;var j=(r="")=>Y`:where(number-flow${r}){line-height:1}number-flow${r} > span{font-kerning:none;display:inline-block;padding:${x} 0}`;var T=(r,o,a)=>{let u=document.createElement(r),[f,n]=Array.isArray(o)?[void 0,o]:[o,a];return f&&Object.assign(u,f),n==null||n.forEach((l)=>u.appendChild(l)),u},rr=(r,o)=>{var a;return o==="left"?r.offsetLeft:(((a=r.offsetParent instanceof HTMLElement?r.offsetParent:null)==null?void 0:a.offsetWidth)??0)-r.offsetWidth-r.offsetLeft},or=(r)=>r.offsetWidth>0&&r.offsetHeight>0,M=(r,o)=>{v&&typeof HTMLElement<"u"&&typeof customElements<"u"&&!customElements.get(r)&&customElements.define(r,o)};function ar(r,o,{reverse:a=!1}={}){let u=r.length;for(let f=a?u-1:0;a?f>=0:f`${m}:${d[m]=(d[m]??-1)+1}`,h="",w=!1,A=!1;for(let m of f){h+=m.value;let c=m.type==="minusSign"||m.type==="plusSign"?"sign":m.type;c==="integer"?(w=!0,l.push(...m.value.split("").map((K)=>({type:c,value:parseInt(K)})))):c==="group"?l.push({type:c,value:m.value}):c==="decimal"?(A=!0,p.push({type:c,value:m.value,key:b(c)})):c==="fraction"?p.push(...m.value.split("").map((K)=>({type:c,value:parseInt(K),key:b(c),pos:-1-d[c]}))):(w||A?s:n).push({type:c,value:m.value,key:b(c)})}let J=[];for(let m=l.length-1;m>=0;m--){let c=l[m];J.unshift(c.type==="integer"?{...c,key:b(c.type),pos:d[c.type]}:{...c,key:b(c.type)})}return{pre:n,integer:J,fraction:p,post:s,valueAsString:h,value:typeof r=="string"?parseFloat(r):r}}var Z=I&&X&&B;class V extends C{constructor(){super(),this.created=!1,this.batched=!1,this._preUpdated=!1;let{animated:r,...o}=this.constructor.defaultProps;this._animated=this.computedAnimated=r,Object.assign(this,o)}get animated(){return this._animated}set animated(r){var o;this.animated!==r&&(this._animated=r,(o=this.shadowRoot)==null||o.getAnimations().forEach((a)=>a.finish()))}set data(r){var o,a;if(r==null||r===this._data)return;let{pre:u,integer:f,fraction:n,post:l,value:p}=r;if(this.created){let s=this._data;this._data=r,this.computedTrend=typeof this.trend=="function"?this.trend(s.value,p):this.trend,this.computedAnimated=Z&&this._animated&&(!this.respectMotionPreference||!((o=L)!=null&&o.matches))&&or(this)&&this.ownerDocument.visibilityState==="visible",(a=this.plugins)==null||a.forEach((d)=>{var b;return(b=d.onUpdate)==null?void 0:b.call(d,r,s,this)}),this.batched||this.willUpdate(),this._pre.update(u),this._num.update({integer:f,fraction:n}),this._post.update(l),this.batched||this.didUpdate()}else{this._data=r,this.attachShadow({mode:"open"});try{this._internals??(this._internals=this.attachInternals()),this._internals.role="img"}catch{}let s=document.createElement("style");this.nonce&&(s.nonce=this.nonce),s.textContent=g,this.shadowRoot.appendChild(s),this._pre=new q(this,u,{justify:"right",part:"left"}),this.shadowRoot.appendChild(this._pre.el),this._num=new i(this,f,n),this.shadowRoot.appendChild(this._num.el),this._post=new q(this,l,{justify:"left",part:"right"}),this.shadowRoot.appendChild(this._post.el),this.created=!0}try{this._internals.ariaLabel=r.valueAsString}catch{}}willUpdate(){var r;this._preUpdated=Z&&this._animated&&(!this.respectMotionPreference||!((r=L)!=null&&r.matches))&&this.ownerDocument.visibilityState==="visible",this._preUpdated&&(this._pre.willUpdate(),this._num.willUpdate(),this._post.willUpdate())}didUpdate(){if(!this.computedAnimated||!this._preUpdated)return;this._abortAnimationsFinish?this._abortAnimationsFinish.abort():this.dispatchEvent(new Event("animationsstart")),this._pre.didUpdate(),this._num.didUpdate(),this._post.didUpdate();let r=new AbortController;Promise.all(this.shadowRoot.getAnimations().map((o)=>o.finished)).then(()=>{r.signal.aborted||(this.dispatchEvent(new Event("animationsfinish")),this._abortAnimationsFinish=void 0)}),this._abortAnimationsFinish=r}}V.defaultProps={transformTiming:{duration:900,easing:"linear(0,.005,.019,.039,.066,.096,.129,.165,.202,.24,.278,.316,.354,.39,.426,.461,.494,.526,.557,.586,.614,.64,.665,.689,.711,.731,.751,.769,.786,.802,.817,.831,.844,.856,.867,.877,.887,.896,.904,.912,.919,.925,.931,.937,.942,.947,.951,.955,.959,.962,.965,.968,.971,.973,.976,.978,.98,.981,.983,.984,.986,.987,.988,.989,.99,.991,.992,.992,.993,.994,.994,.995,.995,.996,.996,.9963,.9967,.9969,.9972,.9975,.9977,.9979,.9981,.9982,.9984,.9985,.9987,.9988,.9989,1)"},spinTiming:void 0,opacityTiming:{duration:450,easing:"ease-out"},animated:!0,trend:(r,o)=>Math.sign(o-r),respectMotionPreference:!0,plugins:void 0,digits:void 0};class i{constructor(r,o,a,{className:u,...f}={}){this.flow=r,this._integer=new k(r,o,{justify:"right",part:"integer"}),this._fraction=new k(r,a,{justify:"left",part:"fraction"}),this._inner=T("span",{className:"number__inner"},[this._integer.el,this._fraction.el]),this.el=T("span",{...f,part:"number",className:`number ${u??""}`},[this._inner])}willUpdate(){this._prevWidth=this.el.offsetWidth,this._prevLeft=this.el.getBoundingClientRect().left,this._integer.willUpdate(),this._fraction.willUpdate()}update({integer:r,fraction:o}){this._integer.update(r),this._fraction.update(o)}didUpdate(){let r=this.el.getBoundingClientRect();this._integer.didUpdate(),this._fraction.didUpdate();let o=this._prevLeft-r.left,a=this.el.offsetWidth,u=this._prevWidth-a;this.el.style.setProperty("--width",String(a)),this.el.animate({[N]:[`${o}px`,"0px"],[O]:[u,0]},{...this.flow.transformTiming,composite:"accumulate"})}}class y{constructor(r,o,{justify:a,className:u,...f},n){this.flow=r,this.children=new Map,this.onCharRemove=(p)=>()=>{this.children.delete(p)},this.justify=a;let l=o.map((p)=>this.addChar(p).el);this.el=T("span",{...f,className:`section section--justify-${a} ${u??""}`},n?n(l):l)}addChar(r,{startDigitsAtZero:o=!1,...a}={}){let u=r.type==="integer"||r.type==="fraction"?new W(this,r.type,o?0:r.value,r.pos,{...a,onRemove:this.onCharRemove(r.key)}):new R(this,r.type,r.value,{...a,onRemove:this.onCharRemove(r.key)});return this.children.set(r.key,u),u}unpop(r){r.el.removeAttribute("inert"),r.el.style.top="",r.el.style[this.justify]=""}pop(r){r.forEach((o)=>{o.el.style.top=`${o.el.offsetTop}px`,o.el.style[this.justify]=`${rr(o.el,this.justify)}px`}),r.forEach((o)=>{o.el.setAttribute("inert",""),o.present=!1})}addNewAndUpdateExisting(r){let o=new Map,a=new Map,u=this.justify==="left",f=u?"prepend":"append";if(ar(r,(n)=>{let l;this.children.has(n.key)?(l=this.children.get(n.key),a.set(n,l),this.unpop(l),l.present=!0):(l=this.addChar(n,{startDigitsAtZero:!0,animateIn:!0}),o.set(n,l)),this.el[f](l.el)},{reverse:u}),this.flow.computedAnimated){let n=this.el.getBoundingClientRect();o.forEach((l)=>{l.willUpdate(n)})}o.forEach((n,l)=>{n.update(l.value)}),a.forEach((n,l)=>{n.update(l.value)})}willUpdate(){let r=this.el.getBoundingClientRect();this._prevOffset=r[this.justify],this.children.forEach((o)=>o.willUpdate(r))}didUpdate(){let r=this.el.getBoundingClientRect();this.children.forEach((u)=>u.didUpdate(r));let o=r[this.justify],a=this._prevOffset-o;a&&this.children.size&&this.el.animate({transform:[`translateX(${a}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}class k extends y{update(r){let o=new Map;this.children.forEach((a,u)=>{r.find((f)=>f.key===u)||o.set(u,a),this.unpop(a)}),this.addNewAndUpdateExisting(r),o.forEach((a)=>{a instanceof W&&a.update(0)}),this.pop(o)}}class q extends y{update(r){let o=new Map;this.children.forEach((a,u)=>{r.find((f)=>f.key===u)||o.set(u,a)}),this.pop(o),this.addNewAndUpdateExisting(r)}}class H{constructor(r,o,{onRemove:a,animateIn:u=!1}={}){this.flow=r,this.el=o,this._present=!0,this._remove=()=>{var f;this.el.remove(),(f=this._onRemove)==null||f.call(this)},this.el.classList.add("animate-presence"),this.flow.computedAnimated&&u&&this.el.animate({[D]:[-0.9999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),this._onRemove=a}get present(){return this._present}set present(r){if(this._present!==r){if(this._present=r,r?this.el.removeAttribute("inert"):this.el.setAttribute("inert",""),!this.flow.computedAnimated){r||this._remove();return}this.el.style.setProperty("--_number-flow-d-opacity",r?"0":"-.999"),this.el.animate({[D]:r?[-0.9999,0]:[0.999,0]},{...this.flow.opacityTiming,composite:"accumulate"}),r?this.flow.removeEventListener("animationsfinish",this._remove):this.flow.addEventListener("animationsfinish",this._remove,{once:!0})}}}class z extends H{constructor(r,o,a,u){super(r.flow,a,u),this.section=r,this.value=o,this.el=a}}class W extends z{constructor(r,o,a,u,f){var n,l;let p=(((l=(n=r.flow.digits)==null?void 0:n[u])==null?void 0:l.max)??9)+1,s=Array.from({length:p}).map((b,h)=>{let w=T("span",{className:"digit__num"},[document.createTextNode(String(h))]);return h!==a&&w.setAttribute("inert",""),w.style.setProperty("--n",String(h)),w}),d=T("span",{part:`digit ${o}-digit`,className:"digit"},s);d.style.setProperty("--current",String(a)),d.style.setProperty("--length",String(p)),super(r,a,d,f),this.pos=u,this._onAnimationsFinish=()=>{this.el.classList.remove("is-spinning")},this._numbers=s,this.length=p}willUpdate(r){let o=this.el.getBoundingClientRect();this._prevValue=this.value;let a=o[this.section.justify]-r[this.section.justify],u=o.width/2;this._prevCenter=this.section.justify==="left"?a+u:a-u}update(r){this.el.style.setProperty("--current",String(r)),this._numbers.forEach((o,a)=>a===r?o.removeAttribute("inert"):o.setAttribute("inert","")),this.value=r}didUpdate(r){let o=this.el.getBoundingClientRect(),a=o[this.section.justify]-r[this.section.justify],u=o.width/2,f=this.section.justify==="left"?a+u:a-u,n=this._prevCenter-f;n&&this.el.animate({transform:[`translateX(${n}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"});let l=this.getDelta();l&&(this.el.classList.add("is-spinning"),this.el.animate({[S]:[-l,0]},{...this.flow.spinTiming??this.flow.transformTiming,composite:"accumulate"}),this.flow.addEventListener("animationsfinish",this._onAnimationsFinish,{once:!0}))}getDelta(){var r;if(this.flow.plugins)for(let u of this.flow.plugins){let f=(r=u.getDelta)==null?void 0:r.call(u,this.value,this._prevValue,this);if(f!=null)return f}let o=this.value-this._prevValue,a=this.flow.computedTrend||Math.sign(o);return a<0&&this.value>this._prevValue?this.value-this.length-this._prevValue:a>0&&this.value()=>{this._children.delete(n)},this._children.set(a,new H(this.flow,f,{onRemove:this._onChildRemove(a)}))}willUpdate(r){if(this.type==="decimal")return;let o=this.el.getBoundingClientRect();this._prevOffset=o[this.section.justify]-r[this.section.justify]}update(r){if(this.value!==r){let o=this._children.get(this.value);o&&(o.present=!1);let a=this._children.get(r);if(a)a.present=!0;else{let u=T("span",{className:"symbol__value",textContent:r});this.el.appendChild(u),this._children.set(r,new H(this.flow,u,{animateIn:!0,onRemove:this._onChildRemove(r)}))}}this.value=r}didUpdate(r){if(this.type==="decimal")return;let o=this.el.getBoundingClientRect()[this.section.justify]-r[this.section.justify],a=this._prevOffset-o;a&&this.el.animate({transform:[`translateX(${a}px)`,"none"]},{...this.flow.transformTiming,composite:"accumulate"})}}var U=(r)=>[$,j(r),g];var Wr=U(),ur="number-flow-connect",fr="number-flow-update";class G extends V{constructor(){super(...arguments),this.connected=!1}connectedCallback(){this.connected=!0,this.dispatchEvent(new Event(ur,{bubbles:!0}))}disconnectedCallback(){this.connected=!1}get value(){return this._value}update(r){(!this._formatter||this._prevFormat!==this.format||this._prevLocales!==this.locales)&&(this._formatter=new Intl.NumberFormat(this.locales,this.format),this._prevFormat=this.format,this._prevLocales=this.locales),r!=null&&(this._value=r),this.dispatchEvent(new Event(fr,{bubbles:!0})),this.data=P(this._value,this._formatter,this.numberPrefix,this.numberSuffix)}}M("number-flow",G);M("number-flow",G);})();