1import{r as s,R as z}from"./chunk-LFPYN7LY-CxYJBB4n.js";function R(){return R=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)({}).hasOwnProperty.call(r,e)&&(n[e]=r[e])}return n},R.apply(null,arguments)}function O(n,t){if(n==null)return{};var r={};for(var e in n)if({}.hasOwnProperty.call(n,e)){if(t.indexOf(e)!==-1)continue;r[e]=n[e]}return r}var I=s.useLayoutEffect,j=function(t){var r=z.useRef(t);return I(function(){r.current=t}),r},C=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},B=function(t,r){var e=z.useRef();return z.useCallback(function(i){t.current=i,e.current&&C(e.current,null),e.current=r,r&&C(r,i)},[r])},E={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},M=function(t){Object.keys(E).forEach(function(r){t.style.setProperty(r,E[r],"important")})},F=M,o=null,T=function(t,r){var e=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?e+r.borderSize:e-r.paddingSize};function N(n,t,r,e){r===void 0&&(r=1),e===void 0&&(e=1/0),o||(o=document.createElement("textarea"),o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),F(o)),o.parentNode===null&&document.body.appendChild(o);var i=n.paddingSize,f=n.borderSize,a=n.sizingStyle,p=a.boxSizing;Object.keys(a).forEach(function(c){var b=c;o.style[b]=a[b]}),F(o),o.value=t;var u=T(o,n);o.value=t,u=T(o,n),o.value="x";var g=o.scrollHeight-i,l=g*r;p==="border-box"&&(l=l+i+f),u=Math.max(l,u);var h=g*e;return p==="border-box"&&(h=h+i+f),u=Math.min(h,u),[u,g]}var W=function(){},P=function(t,r){return t.reduce(function(e,i){return e[i]=r[i],e},{})},$=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],_=!!document.documentElement.currentStyle,G=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var e=P($,r),i=e.boxSizing;if(i==="")return null;_&&i==="border-box"&&(e.width=parseFloat(e.width)+parseFloat(e.borderRightWidth)+parseFloat(e.borderLeftWidth)+parseFloat(e.paddingRight)+parseFloat(e.paddingLeft)+"px");var f=parseFloat(e.paddingBottom)+parseFloat(e.paddingTop),a=parseFloat(e.borderBottomWidth)+parseFloat(e.borderTopWidth);return{sizingStyle:e,paddingSize:f,borderSize:a}},Y=G;function L(n,t,r){var e=j(r);s.useLayoutEffect(function(){var i=function(a){return e.current(a)};if(n)return n.addEventListener(t,i),function(){return n.removeEventListener(t,i)}},[])}var q=function(t,r){L(document.body,"reset",function(e){t.current.form===e.target&&r(e)})},U=function(t){L(window,"resize",t)},X=function(t){L(document.fonts,"loadingdone",t)},Z=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],D=function(t,r){var e=t.cacheMeasurements,i=t.maxRows,f=t.minRows,a=t.onChange,p=a===void 0?W:a,u=t.onHeightChange,g=u===void 0?W:u,l=O(t,Z),h=l.value!==void 0,c=s.useRef(null),b=B(c,r),w=s.useRef(0),S=s.useRef(),v=function(){var d=c.current,y=e&&S.current?S.current:Y(d);if(y){S.current=y;var H=N(y,d.value||d.placeholder||"x",f,i),m=H[0],A=H[1];w.current!==m&&(w.current=m,d.style.setProperty("height",m+"px","important"),g(m,{rowHeight:A}))}},k=function(d){h||v(),p(d)};return s.useLayoutEffect(v),q(c,function(){if(!h){var x=c.current.value;requestAnimationFrame(function(){var d=c.current;d&&x!==d.value&&v()})}}),U(v),X(v),s.createElement("textarea",R({},l,{onChange:k,ref:b}))},K=s.forwardRef(D);export{K as i};
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.