1import{o as e,t}from"./rolldown-runtime-C0FnF6B9.js";import{n}from"./jsx-runtime-D3F0h15I.js";import{p as r,y as i}from"./react-router-D0L-bsDO.js";import{t as a}from"./use-isomorphic-layout-effect.browser.esm-M-Y-iJel.js";var o=t(((e,t)=>{t.exports=()=>{let e=`\\ud800-\\udfff`,t=`[${e}]`,n=`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]`,r=`\\ud83c[\\udffb-\\udfff]`,i=`(?:${n}|${r})`,a=`[^${e}]`,o=`(?:\\uD83C[\\uDDE6-\\uDDFF]){2}`,s=`[\\ud800-\\udbff][\\udc00-\\udfff]`,c=`${i}?`,l=`[\\ufe0e\\ufe0f]?`,u=`(?:\\u200d(?:${[a,o,s].join(`|`)})${l+c})*`,d=l+c+u,f=`(?:${[`${a}${n}?`,n,o,s,t,`[\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93]`].join(`|`)})`;return RegExp(`(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)|${r}(?=${r})|${f+d}`,`g`)}})),s=t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var n=t(o());function r(e){if(typeof e!=`string`)throw Error(`Input must be a string`);var t=e.match(n.default());return t===null?0:t.length}e.length=r})),c=e(n()),l=function(e){var t=c.useRef(e);return a(function(){t.current=e}),t},u=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},d=function(e,t){var n=c.useRef();return c.useCallback(function(r){e.current=r,n.current&&u(n.current,null),n.current=t,t&&u(t,r)},[t])},f={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},p=function(e){Object.keys(f).forEach(function(t){e.style.setProperty(t,f[t],`important`)})},m=null,h=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function g(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),m||(m=document.createElement(`textarea`),m.setAttribute(`tabindex`,`-1`),m.setAttribute(`aria-hidden`,`true`),p(m)),m.parentNode===null&&document.body.appendChild(m);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;m.style[t]=o[t]}),p(m),m.value=t;var c=h(m,e);m.value=t,c=h(m,e),m.value=`x`;var l=m.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var _=function(){},v=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},y=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],b=!!document.documentElement.currentStyle,x=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=v(y,t),r=n.boxSizing;return r===``?null:(b&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function S(e,t,n){var r=l(n);c.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var C=function(e,t){S(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},w=function(e){S(window,`resize`,e)},T=function(e){S(document.fonts,`loadingdone`,e)},E=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],D=c.forwardRef(function(e,t){var n=e.cacheMeasurements,a=e.maxRows,o=e.minRows,s=e.onChange,l=s===void 0?_:s,u=e.onHeightChange,f=u===void 0?_:u,p=r(e,E),m=p.value!==void 0,h=c.useRef(null),v=d(h,t),y=c.useRef(0),b=c.useRef(),S=function(){var e=h.current,t=n&&b.current?b.current:x(e);if(t){b.current=t;var r=g(t,e.value||e.placeholder||`x`,o,a),i=r[0],s=r[1];y.current!==i&&(y.current=i,e.style.setProperty(`height`,i+`px`,`important`),f(i,{rowHeight:s}))}};return c.useLayoutEffect(S),C(h,function(){if(!m){var e=h.current.value;requestAnimationFrame(function(){var t=h.current;t&&e!==t.value&&S()})}}),w(S),T(S),c.createElement(`textarea`,i({},p,{onChange:function(e){m||S(),l(e)},ref:v}))});export{s as n,D as t}; 2//# sourceMappingURL=react-textarea-autosize.browser.esm-BMFnA-9M.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.