1import{r as f,j as x}from"./chunk-6CSD65Y2-BDCp14CY.js";import{M as W,D as ie,u as se,E as X,m as N,F as oe,G as ae,b as K}from"./react-HV0pzbkM.js";import{a as z}from"./index-D4Vv9Kts.js";import{A as Y}from"./index-CJnYBG3-.js";import{u as J}from"./use-motion-value-BSv8ZhgJ.js";function le({children:t,...e}){const i=f.useContext(W);e={...i,...e},e.transition=ie(e.transition,i.transition),e.isStatic=se(()=>e.isStatic);const o=f.useMemo(()=>e,[JSON.stringify(e.transition),e.transformPagePoint,e.reducedMotion,e.skipAnimations,e.isValidProp]);return x.jsx(W.Provider,{value:o,children:t})}const $="var(--mask-height, 0.15em)",E="var(--mask-width, 0.5em)",H="#000 0, transparent 71%",ce=`linear-gradient(to right, transparent 0, #000 ${E}, #000 calc(100% - ${E}), transparent),linear-gradient(to bottom, transparent 0, #000 ${$}, #000 calc(100% - ${$}), transparent 100%),radial-gradient(at bottom right, ${H}),radial-gradient(at bottom left, ${H}), radial-gradient(at top left, ${H}), radial-gradient(at top right, ${H})`,ue=`100% calc(100% - ${$} * 2),calc(100% - ${E} * 2) 100%,${E} ${$},${E} ${$},${E} ${$},${E} ${$}`;function fe({children:t}){return x.jsx("span",{"aria-hidden":!0,style:{display:"inline-flex",margin:`0 calc(-1*${E})`,padding:`calc(${$}/2) ${E}`,position:"relative",zIndex:-1,overflow:"clip",WebkitMaskImage:ce,WebkitMaskSize:ue,WebkitMaskPosition:"center, center, top left, top right, bottom right, bottom left",WebkitMaskRepeat:"no-repeat"},children:t})}function Q(){const t=f.useRef(!0);return f.useEffect(()=>{t.current=!1},[]),t.current}function G(t){const{width:e,fontSize:i}=getComputedStyle(t);return`${parseFloat(e)/parseFloat(i)}em`}const Z=new WeakMap;function q(t,e){return(t%e+e)%e}const de=f.forwardRef(function({value:e,initialValue:i=e,trend:o=0,...l},I){const{transition:w}=f.useContext(W),v=f.useRef(i).current,d=Q(),h=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(I,()=>p.current,[]);const u=f.useRef(new Array(10)),b=X(),a=b?e:0;f.useLayoutEffect(()=>{!h.current||!u.current[v]||(h.current.style.width=G(u.current[v]))},[]);const n=f.useRef(i);f.useLayoutEffect(()=>{var C;if(!h.current||a===n.current)return;const s=h.current.getBoundingClientRect(),j=(C=p.current)==null?void 0:C.getBoundingClientRect(),M=n.current;let k=a-M;o>0&&a<M?k=10-M+a:o<0&&a>M&&(k=a-10-M);const T=s.height*k+(s.top-(j?j.top||0:s.top));return z(h.current,{y:[T,0]},w),()=>{n.current=a}},[a]),f.useEffect(()=>{if(d&&v===a||!u.current[a])return;const s=G(u.current[a]);p.current&&Z.set(p.current,s),p.current&&z(p.current,{width:s},w)},[a]);const g=s=>x.jsx("span",{style:{display:"inline-block",padding:`calc(${$}/2) 0`},ref:j=>void(u.current[s]=j),children:s},s),m=[],c=[];for(let s=9;s>=1;s--)m.push(q(a-s,10));for(let s=1;s<=9;s++)c.push(q(a+s,10));return x.jsx(N.span,{...l,ref:p,"data-state":b?void 0:"exiting",style:{display:"inline-flex",justifyContent:"center"},children:x.jsxs("span",{ref:h,style:{display:"inline-flex",justifyContent:"center",flexDirection:"column",alignItems:"center",position:"relative"},children:[m.length>0&&x.jsx("span",{style:{...U,bottom:"100%",left:0},children:m.map(s=>g(s))}),g(a),c.length>0&&x.jsx("span",{style:{...U,top:"100%",left:0},children:c.map(s=>g(s))})]})})}),U={display:"flex",flexDirection:"column",alignItems:"center",position:"absolute",width:"100%"},ee=f.createContext({justify:"left"}),pe=f.forwardRef(function({partKey:e,type:i,children:o,...l},I){const w=X(),{justify:v}=f.useContext(ee);return x.jsx(N.span,{...l,"data-state":w?void 0:"exiting",style:{display:"inline-flex",justifyContent:v,padding:`calc(${$}/2) 0`,position:"relative"},ref:I,children:x.jsx(Y,{mode:"popLayout",anchorX:v,initial:!1,children:x.jsx(N.span,{initial:{opacity:0}
1,animate:{opacity:[null,1]},exit:{opacity:[null,0]},style:{display:"inline-block",whiteSpace:"pre"},children:o},o)})})}),O=f.forwardRef(function({parts:e,justify:i="left",mode:o,style:l,name:I,trend:w,...v},d){const h=f.useRef(null);f.useImperativeHandle(d,()=>h.current,[]);const p=f.useMemo(()=>({justify:i}),[i]),u=f.useRef(null),b=Q(),{transition:a}=f.useContext(W);return f.useEffect(()=>{if(!u.current||!h.current)return;if(b){h.current.style.width=G(u.current);return}const n=Array.from(u.current.children).map(m=>{if(!(m instanceof HTMLElement))return;if(m.dataset.state==="exiting"){const j=m.nextSibling;return m.remove(),()=>{u.current&&u.current.insertBefore(m,j)}}const c=Z.get(m);if(!c)return;const s=m.style.width;return m.style.width=c,()=>{m.style.width=s}}),g=G(u.current);for(let m=n.length-1;m>=0;m--){const c=n[m];c&&c()}z(h.current,{width:g},a)},[e.map(n=>n.value).join("")]),x.jsx(ee.Provider,{value:p,children:x.jsx("span",{...v,ref:h,className:`number-section-${I}`,style:{...l,display:"inline-flex",justifyContent:i},children:x.jsxs("span",{ref:u,style:{display:"inline-flex",justifyContent:"inherit",position:"relative"},children:["â",x.jsx(Y,{mode:o,anchorX:i,initial:!1,children:e.map(n=>n.type==="integer"||n.type==="fraction"?x.jsx(de,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},value:n.value,initialValue:b?void 0:0,trend:w},n.key):x.jsx(pe,{type:n.type,partKey:n.key,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:n.value},n.type==="literal"?`${n.key}:${n.value}`:n.key))})]})})})}),me=(t,{locales:e,format:i},o,l)=>{const w=new Intl.NumberFormat(e,i).formatToParts(Number(t));o&&w.unshift({type:"prefix",value:o}),l&&w.push({type:"suffix",value:l});const v=[],d=[],h=[],p=[],u={},b=c=>`${c}:${u[c]=(u[c]??-1)+1}`;let a="",n=!1,g=!1;for(const c of w){a+=c.value;const s=c.type==="minusSign"||c.type==="plusSign"?"sign":c.type;switch(s){case"integer":n=!0,d.push(...c.value.split("").map(j=>({type:s,value:parseInt(j)})));break;case"group":d.push({type:s,value:c.value});break;case"decimal":g=!0,h.push({type:s,value:c.value,key:b(s)});break;case"fraction":h.push(...c.value.split("").map(j=>({type:s,value:parseInt(j),key:b(s)})));break;default:(n||g?p:v).push({type:s,value:c.value,key:b(s)})}}const m=[];for(let c=d.length-1;c>=0;c--)m.unshift({...d[c],key:b(d[c].type)});return{pre:v,integer:m,fraction:h,post:p,formatted:a}},he={opacity:{duration:1,ease:oe},y:{type:"spring",duration:1,bounce:0},width:{type:"spring",duration:1,bounce:0}};f.forwardRef(function({children:e,locales:i,format:o,transition:l,style:I,suffix:w,prefix:v,trend:d,...h},p){const u=f.useMemo(()=>me(e,{locales:i,format:o},v,w),[e,i,o,v,w]),{pre:b,integer:a,fraction:n,post:g,formatted:m}=u,c=f.useContext(W).transition;l=l??c??he;const s=typeof e=="string"?parseFloat(e):Number(e),j=f.useRef(s),M=j.current;j.current=s;let k;return typeof d=="function"?k=d(M,s):d!==void 0?k=d:k=Math.sign(s-M),x.jsx(le,{transition:l,children:x.jsx(N.span,{...h,ref:p,style:{lineHeight:1,...I,display:"inline-flex",isolation:"isolate",whiteSpace:"nowrap"},children:x.jsxs("span",{"aria-label":m,style:{display:"inline-flex",direction:"ltr",isolation:"isolate",position:"relative",zIndex:-1},children:[x.jsx(O,{style:{padding:`calc(${$}/2) 0`},"aria-hidden":!0,justify:"right",mode:"popLayout",parts:b,name:"pre",trend:k}),x.jsxs(fe,{children:[x.jsx(O,{justify:"right",parts:a,name:"integer",trend:k}),x.jsx(O,{parts:n,name:"fraction",trend:k})]}),x.jsx(O,{style:{padding:`calc(${$}/2) 0`},"aria-hidden":!0,mode:"popLayout",parts:g,name:"post",trend:k})]})})})});N.create(f.Fragment);const ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function ge(t){const e=t??ye;return e[Math.floor(Math.random()*e.length)]}function L(t,e,i,o){return typeof t=="function"?t(e,i):t??o}function xe(t){return t!==null&&typeof t=="object"&&"set"in t&&typeof t.set=="function"}function be(t){return typeof t=="string"?document.querySelector(t):t}function ve(t,e={}){const{chars:i,delay:o=0,duration:l=1,interval:I=.05,onComplete:w}=e,v=xe(t);let d,h;if(v)d=t.get(),h=r=>t.set(r);else{const r=be(t);if(!r)return{stop:()=>{},play:()=>{},finish:()=>{},finished:Promise.resolve()};d=r.textContent||"",h=R=>{r.textContent=R}}const p=d.length,u=new Array(p).fill("idle"),b=new Array(p).fill(null);let a=null,n=!1,g=null;const m=new Promise(r=>{g=r});function c(){let r="";for(let R=0;R<p;R++){const y=d[R];y===" "||u[R]==="revealed"?r+=y:u[R]==="scrambling"?r+=ge(i):r+=y}h(r)}function s(){u.every((R,y)=>R==="revealed"||d[y]===" ")&&(M(),w==null||w(),g==null||g())}function j(){a||(a=setInterval(c,I*1e3))}function M(){a&&(clearInterval(a),a=null)}function k(){for(let r=0;r<b.length;r++)b[r]&&(b[r](),b[r]=null)}function T(r,R){const y=setTimeout(()=>{n&&(u[r]="revealed",c(),s())},R);b[r]=()=>clearTimeout(y)}function C(){if(!n){n=!0;for(let r=0;r<p;r++)if(d[r]===" ")u[r]="revealed";else{const R=L(o,r,p,0);u[r]=R===0?"scrambling":"idle"}j();for(let r=0;r<p;r++){if(d[r]===" ")continue;const R=L(o,r,p,0),y=L(l,r,p,0);if(R>0){const S=setTimeout(()=>{n&&(u[r]="scrambling",y!==1/0&&T(r,y*1e3))},R*1e3);b[r]=()=>clearTimeout(S)}else y!==1/0&&T(r,y*1e3)}c()}}function D(){if(n){n=!1,k();for(let r=0;r<p;r++)u[r]="revealed";M(),h(d),g==null||g()}}function V(){if(!n)return;n=!1,k();let r=1/0;for(let y=0;y<p;y++){if(d[y]===" ")continue;const S=L(l,y,p,0);S!==1/0&&(r=Math.min(r,S))}r===1/0&&(r=0);for(let y=0;y<p;y++){if(d[y]===" "){u[y]="revealed";continue}const S=L(l,y,p,0),P=S===1/0?0:S-r;if(P===0)u[y]="revealed";else{u[y]="scrambling";const B=setTimeout(()=>{u[y]="revealed",c(),s()},P*1e3);b[y]=()=>clearTimeout(B)}}u.some(y=>y==="scrambling")?j():M(),c(),s()}return C(),{stop:D,play:C,finish:V,finished:m}}function te(t,e){return t.length>e.length||t.length>0&&!e.startsWith(t)}function ne(t,e,i){return t+(e-t)*i}function we(t,e,i,o,l){if(te(e,t))return i*l;if(o==="natural")return Ie(t,e,i);if(typeof o=="number"&&o>0){const I=i*(o/100);return i+ne(-I,I,Math.random())}return i}function Ie(t,e,i){const o=e.length,l=t[o],I=t[o-1];if(!l)return i;const v=t.slice(0,o).lastIndexOf(" "),d=o-v-1,h=v+1,u=t.slice(o).indexOf(" "),a=(u===-1?t.length:o+u)-h;let n=1;
1if(I&&/[.!?]/.test(I)&&l===" "&&(n*=3),a<=3?n*=.7:(d===0&&l!==" "&&(n*=1.5),d===a-1&&(n*=1.4)),d>0&&d<a-1&&a>3){const s=Math.min(d/a,.4);n*=1-s}Re.has(l)&&(n*=1.5),je.has(l)&&(n*=1.5),/\d/.test(l)&&(n*=1.3),a>8&&(n*=1.3),l!==l.toLowerCase()&&(n*=1.25);const g=200;if(o>g){const s=Math.min((o-g)/1e3,.3);n*=1+s}const m=ne(-.25,.25,Math.random());n*=1+m;const c=i*n;return Math.max(i*.2,c)}const Re=new Set([".",",","!","?",":",";","'",'"',"-","(",")"]),je=new Set(["!","@","#","$","%","^","&","*","(",")","_","+","{","}","|",":",'"',"<",">","?"]);function ke(t,e){let i=e-1;for(;i>=0&&/\s/.test(t[i]);)i--;for(;i>=0&&!/\s/.test(t[i]);)i--;return Math.max(0,i+1)}function Se(t,e){const i=Math.min(t.length,e.length);let o=0;for(let l=0;l<i&&t[l]===e[l];l++)o=l+1;return o}function Me(t,e,i,o){if(i==="type"&&te(t,e)){if(o==="all")return e.slice(0,Se(t,e));if(o==="word"){const l=ke(t,t.length);return t.slice(0,l)}else return t.slice(0,-1)}return e.slice(0,t.length+1)}const Ce={slow:130,normal:75,fast:30},Pe=f.forwardRef(function({children:e="",as:i,speed:o="normal",variance:l="natural",cursorClassName:I="motion-typewriter-cursor",cursorStyle:w,cursorBlinkDuration:v=.5,cursorBlinkRepeat:d=1/0,onComplete:h,onChange:p,play:u=!0,"aria-label":b,textClassName:a,textStyle:n,replace:g="type",backspace:m="character",backspaceFactor:c=.2,...s},j){const M=i||"span",k=f.useRef(e),T=J(""),C=f.useRef(null),D=f.useRef(null),V=f.useRef(null),r=typeof o=="number"?o:Ce[o],R=()=>{var S;(S=C.current)==null||S.call(C),C.current=null},y=()=>{D.current=z(V.current,{opacity:[1,1,0,0]},{duration:v,times:[0,.5,.5,1],ease:"linear",repeat:Math.max(0,d)*2,repeatType:"reverse"}),D.current.finished.then(()=>{var S;(S=D.current)==null||S.cancel()})};return f.useEffect(()=>{g==="all"&&e!==k.current&&T.set(""),k.current=e},[e,g]),f.useEffect(()=>{var B;if(!u){y(),R();return}(B=D.current)==null||B.cancel();const S=()=>{const F=T.get(),A=Me(F,e,g,m);if(T.set(A),p){const _=A.length<F.length,re=_?F.slice(A.length):A.slice(F.length);p({text:A,character:re,isBackspace:_})}A!==e?P():(y(),h==null||h())},P=()=>{C.current=ae(S,we(e,T.get(),r,l,c))};return C.current||P(),R},[u,h,p,e,r,l,c,m]),x.jsxs(M,{ref:j,...s,"aria-label":b||e,children:[x.jsx(N.span,{className:a,style:n,children:T}),x.jsx(N.span,{ref:V,className:I,style:{display:"inline-block",width:"2px",height:"1em",backgroundColor:"currentColor",position:"relative",top:"0.1em",left:"0.2em",...w}})]})});function $e(t){return N[t||"span"]||N.span}f.forwardRef(function({children:e="",as:i,active:o=!0,delay:l,duration:I,interval:w,chars:v,onComplete:d,...h},p){const u=$e(i),b=J(e),a=f.useRef(null),n=f.useRef(d);return K(()=>{n.current=d}),K(()=>{b.set(e)},[e]),K(()=>{var g;return(g=a.current)==null||g.stop(),a.current=ve(b,{delay:l,duration:I,interval:w,chars:v,onComplete:()=>{var m;return(m=n.current)==null?void 0:m.call(n)}}),o||a.current.finish(),()=>{var m;return(m=a.current)==null?void 0:m.stop()}},[o,e,l,I,w,v]),x.jsx(u,{ref:p,...h,children:b})});export{Pe as T};
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.