import{f as l}from"./chunk-GTIDDZQJ.js";import{Da as n,Db as s,oc as u,rb as o}from"./chunk-42LKD4JQ.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};
