import{n as s}from"./vueComponentNormalizer.87056a83.js";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.val,expression:"val"}],staticClass:"aioseo-textarea-autosize",style:t.computedStyles,domProps:{value:t.val},on:{focus:t.resize,input:function(n){n.target.composing||(t.val=n.target.value)}}})},o=[];const l={props:{value:{type:[String,Number],default:""},autosize:{type:Boolean,default:!0},minHeight:{type:[Number],default:null},maxHeight:{type:[Number],default:null},important:{type:[Boolean,Array],default:!1}},data(){return{val:null,maxHeightScroll:!1,height:"auto"}},computed:{computedStyles(){return this.autosize?{resize:this.isResizeImportant?"none !important":"none",height:this.height,overflow:this.maxHeightScroll?"auto":this.isOverflowImportant?"hidden !important":"hidden"}:{height:this.minHeight?this.minHeight+"px":""}},isResizeImportant(){const t=this.important;return t===!0||Array.isArray(t)&&t.includes("resize")},isOverflowImportant(){const t=this.important;return t===!0||Array.isArray(t)&&t.includes("overflow")},isHeightImportant(){const t=this.important;return t===!0||Array.isArray(t)&&t.includes("height")}},watch:{value(t){this.val=t},val(t){this.$nextTick(this.resize),this.$emit("input",t)},minHeight(){this.$nextTick(this.resize)},maxHeight(){this.$nextTick(this.resize)},autosize(t){t&&this.resize()}},methods:{resize(){const t=this.isHeightImportant?"important":"";return this.height=`auto${t?" !important":""}`,this.$nextTick(()=>{let e=this.$el.scrollHeight+1;this.minHeight&&(e=e<this.minHeight?this.minHeight:e),this.maxHeight&&(e>this.maxHeight?(e=this.maxHeight,this.maxHeightScroll=!0):this.maxHeightScroll=!1);const i=e+"px";this.height=`${i}${t?" !important":""}`}),this}},created(){this.val=this.value},mounted(){this.resize()}},r={};var u=s(l,a,o,!1,h,null,null,null);function h(t){for(let e in r)this[e]=r[e]}var m=function(){return u.exports}();export{m as B};
