import{f as l}from"./chunk-NBWAUNUZ.js";import{Ga as n,Gb as s,rc as u,ub as o}from"./chunk-QVZULMP5.js";var h=(()=>{class e{constructor(t){this.ngControl=t,this.trimmed=new n}onBlur(){let t=this.ngControl.control;if(t&&typeof t.value=="string"){let i=t.value.trim();i!==t.value&&(t.setValue(i),this.trimmed.emit())}}onInput(t){let i=t.target;i.value.startsWith(" ")&&(i.value=i.value.trimStart(),this.ngControl.control?.setValue(i.value))}static{this.\u0275fac=function(i){return new(i||e)(o(l))}}static{this.\u0275dir=s({type:e,selectors:[["","appTrimEdges",""]],hostBindings:function(i,r){i&1&&u("blur",function(){return r.onBlur()})("input",function(m){return r.onInput(m)})},outputs:{trimmed:"trimmed"}})}}return e})();export{h as a};
