this.primereact=this.primereact||{},this.primereact.inputtextarea=function(t,e,o,r){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e);function s(){return s=Object.assign||function(t){for(var e=1;e0?o.DomHandler.addClass(t.target,"p-filled"):o.DomHandler.removeClass(t.target,"p-filled"),this.props.onInput&&this.props.onInput(t)}},{key:"resize",value:function(t){var e=this.elementRef&&this.elementRef.current;e&&o.DomHandler.isVisible(e)&&(this.cachedScrollHeight||(this.cachedScrollHeight=e.scrollHeight,e.style.overflow="hidden"),(this.cachedScrollHeight!==e.scrollHeight||t)&&(e.style.height="",e.style.height=e.scrollHeight+"px",parseFloat(e.style.height)>=parseFloat(e.style.maxHeight)?(e.style.overflowY="scroll",e.style.height=e.style.maxHeight):e.style.overflow="hidden",this.cachedScrollHeight=e.scrollHeight))}},{key:"isFilled",value:function(){return null!=this.props.value&&this.props.value.toString().length>0||null!=this.props.defaultValue&&this.props.defaultValue.toString().length>0||this.elementRef&&this.elementRef.current&&this.elementRef.current.value.toString().length>0}},{key:"updateForwardRef",value:function(){var t=this.props.forwardRef;t&&("function"==typeof t?t(this.elementRef.current):t.current=this.elementRef.current)}},{key:"componentDidMount",value:function(){this.updateForwardRef(),this.props.tooltip&&this.renderTooltip(),this.props.autoResize&&this.resize(!0)}},{key:"componentDidUpdate",value:function(t){t.tooltip===this.props.tooltip&&t.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(m({content:this.props.tooltip},this.props.tooltipOptions||{})):this.renderTooltip()),this.props.autoResize&&this.resize(!0)}},{key:"componentWillUnmount",value:function(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)}},{key:"renderTooltip",value:function(){this.tooltip=r.tip({target:this.elementRef.current,content:this.props.tooltip,options:this.props.tooltipOptions})}},{key:"render",value:function(){var t=o.classNames("p-inputtextarea p-inputtext p-component",{"p-disabled":this.props.disabled,"p-filled":this.isFilled(),"p-inputtextarea-resizable":this.props.autoResize},this.props.className),e=o.ObjectUtils.findDiffKeys(this.props,g.defaultProps);return i.default.createElement("textarea",s({ref:this.elementRef},e,{className:t,onFocus:this.onFocus,onBlur:this.onBlur,onKeyUp:this.onKeyUp,onInput:this.onInput}))}}])&&p(f.prototype,d),b&&p(f,b),Object.defineProperty(f,"prototype",{writable:!1}),g}(e.Component);return d(O,"defaultProps",{autoResize:!1,tooltip:null,tooltipOptions:null,onInput:null,forwardRef:null}),t.InputTextarea=i.default.forwardRef((function(t,e){return i.default.createElement(O,s({forwardRef:e},t))})),Object.defineProperty(t,"__esModule",{value:!0}),t}({},React,primereact.utils,primereact.tooltip);