vendor: 5,592 bytes, line 1
1import{$ as ve,$a as D,Fb as $,Gb as g,Hc as Ie,Ib as C,K as w,L as ee,La as h,M as te,O as M,Q as A,Qa as Ce,Rb as W,Sa as N,Ta as u,Tb as d,Ub as Se,V as F,Vb as y,W as x,Xb as Ee,Ya as Ve,Yb as we,Za as ne,Zb as Fe,_a as m,a as c,ac as k,b as f,ba as H,eb as De,fa as v,g as ge,hb as be,ia as V,j as pe,ja as ye,ka as L,kc as p,ma as I,nc as re,o as me,pb as O,pc as xe,qb as T,rc as oe,sb as Me,tb as Ae,u as _e,ub as ie,vb as s,wb as a}from"./chunk-XHTL5YS4.js";var Ue=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(u(N),u(I))};static \u0275dir=m({type:n})}return n})(),ce=(()=>{class n extends Ue{static \u0275fac=(()=>{let e;return function(r){return(e||(e=L(n)))(r||n)}})();static \u0275dir=m({type:n,features:[D]})}return n})(),Y=new M("");var ot={provide:Y,useExisting:w(()=>K),multi:!0};function st(){let n=oe()?oe().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var at=new M(""),K=(()=>{class n extends Ue{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!st())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(u(N),u(I),u(at,8))};static \u0275dir=m({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&g("input",function(l){return r._handleInput(l.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(l){return r._compositionEnd(l.target.value)})},standalone:!1,features:[k([ot]),D]})}return n})();var lt=new M(""),dt=new M("");function He(n){return n!=null}function Le(n){return De(n)?pe(n):n}function $e(n){let t={};return n.forEach(e=>{t=e!=null?c(c({},t),e):t}),Object.keys(t).length===0?null:t}function We(n,t){return t.map(e=>e(n))}function ut(n){return!n.validate}function qe(n){return n.map(t=>ut(t)?t:e=>t.validate(e))}function ct(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){return $e(We(e,t))}}function ze(n){return n!=null?ct(qe(n)):null}function ht(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){let i=We(e,t).map(Le);return _e(i).pipe(me($e))}}function Ze(n){return n!=null?ht(qe(n)):null}function Ne(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ft(n){return n._rawValidators}function gt(n){return n._rawAsyncValidators}function se(n){return n?Array.isArray(n)?n:[n]:[]}function z(n,t){return Array.isArray(n)?n.includes(t):n===t}function Oe(n,t){let e=se(t);return se(n).forEach(r=>{z(e,r)||e.push(r)}),e}function Te(n,t){return se(t).filter(e=>!z(n,e))}var Z=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ze(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ze(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control?.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},ae=class extends Z{name;get formDirective(){return null}get path(){return null}},B=class extends Z{_parent=null;name=null;valueAccessor=null},le=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}
vendor: 4,114 bytes, line 1
1get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Xe=(()=>{class n extends le{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(u(B,2))};static \u0275dir=m({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&W("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[D]})}return n})();var P="VALID",q="INVALID",S="PENDING",R="DISABLED",b=class{},X=class extends b{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends b{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends b{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},E=class extends b{status;source;constructor(t,e){super(),this.status=t,this.source=e}};var de=class extends b{source;constructor(t){super(),this.source=t}};function pt(n){return(J(n)?n.validators:n)||null}function mt(n){return Array.isArray(n)?ze(n):n||null}function _t(n,t){return(J(t)?t.asyncValidators:n)||null}function vt(n){return Array.isArray(n)?Ze(n):n||null}function J(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var ue=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return V(this.statusReactive)}set status(t){V(()=>this.statusReactive.set(t))}_status=p(()=>this.statusReactive());statusReactive=v(void 0);get valid(){return this.status===P}get invalid(){return this.status===q}get pending(){return this.status==S}get disabled(){return this.status===R}get enabled(){return this.status!==R}errors;get pristine(){return V(this.pristineReactive)}set pristine(t){V(()=>this.pristineReactive.set(t))}_pristine=p(()=>this.pristineReactive());pristineReactive=v(!0);get dirty(){return!this.pristine}get touched(){return V(this.touchedReactive)}set touched(t){V(()=>this.touchedReactive.set(t))}_touched=p(()=>this.touchedReactive());touchedReactive=v(!1);get untouched(){return!this.touched}_events=new ge;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Oe(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Oe(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Te(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Te(t,this._rawAsyncValidators))}hasValidator(t){return z(this._rawValidators,t)}hasAsyncValidator(t){return z(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(f(c({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;
1this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(f(c({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=S;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new E(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(f(c({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this.errors=null,this._forEachChild(r=>{r.disable(f(c({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new X(this.value,i)),this._events.next(new E(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(f(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this._forEachChild(i=>{i.enable(f(c({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(f(c({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===P||this.status===S)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new X(this.value,e)),this._events.next(new E(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(f(c({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?R:P}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=S,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Le(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new E(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new H,this.statusChanges=new H}_calculateStatus(){return this._allControlsDisabled()?R:this.errors?q:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(S)?S:this._anyControlsHaveStatus(q)?q:P}
vendor: 8,635 bytes, line 1
1_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){J(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=mt(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=vt(this._rawAsyncValidators)}};var Ye=new M("",{factory:()=>he}),he="always";function yt(n,t){return[...t.path,n]}function Ct(n,t,e=he){Dt(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),bt(n,t),At(n,t),Mt(n,t),Vt(n,t)}function ke(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Vt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function Dt(n,t){let e=ft(n);t.validator!==null?n.setValidators(Ne(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=gt(n);t.asyncValidator!==null?n.setAsyncValidators(Ne(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();ke(t._rawValidators,r),ke(t._rawAsyncValidators,r)}function bt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Ke(n,t)})}function Mt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Ke(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Ke(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function At(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function St(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Et(n){return Object.getPrototypeOf(n.constructor)===ce}function wt(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===K?e=o:Et(o)?i=o:r=o}),r||i||e||null}function Pe(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Re(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Ft=class extends ue{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(pt(e),_t(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),J(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Re(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new de(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Pe(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Pe(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Re(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var xt={provide:B,useExisting:w(()=>fe)},je=Promise.resolve(),fe=(()=>{class n extends B{_changeDetectorRef;callSetDisabledState;control=new Ft;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new H;constructor(e,i,r,o,l,_){super(),this._changeDetectorRef=l,this.callSetDisabledState=_,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=wt(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),St(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Ct(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){je.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&xe(i);je.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?yt(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(u(ae,9),u(lt,10),u(dt,10),u(Y,10),u(re,8),u(Ye,8))};static \u0275dir=m({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[k([xt]),D,ye]})}return n})();var It={provide:Y,useExisting:w(()=>Qe),multi:!0};function Je(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Nt(n){return n.split(":")[0]}var Qe=(()=>{class n extends ce{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=A(be).injector;destroyRef=A(ve);cdr=A(re);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Ce({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=Je(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=Nt(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=L(n)))(r||n)}})();static \u0275dir=m({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&g("change",function(l){return r.onChange(l.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"}
1,standalone:!1,features:[k([It]),D]})}return n})(),et=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(Je(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(i){return new(i||n)(u(I),u(N),u(Qe,9))};static \u0275dir=m({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),Ot={provide:Y,useExisting:w(()=>tt),multi:!0};function Ge(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Tt(n){return n.split(":")[0]}var tt=(()=>{class n extends ce{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(o=>this._getOptionId(o));i=(o,l)=>{o._setSelected(r.indexOf(l.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let l=o;for(let _=0;_<l.length;_++){let U=l[_],Q=this._getOptionValue(U.value);r.push(Q)}}else{let l=i.options;for(let _=0;_<l.length;_++){let U=l[_];if(U.selected){let Q=this._getOptionValue(U.value);r.push(Q)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Tt(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=L(n)))(r||n)}})();static \u0275dir=m({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&g("change",function(l){return r.onChange(l.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[k([Ot]),D]})}return n})(),nt=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Ge(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Ge(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(u(I),u(N),u(tt,9))};static \u0275dir=m({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var kt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ne({type:n});static \u0275inj=te({})}return n})();var it=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Ye,useValue:e.callSetDisabledState??he}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ne({type:n});static \u0275inj=te({imports:[kt]})}return n})();var rt=(()=>{class n{constructor(){this.todosSignal=v([]),this.appStateSignal=v({theme:"light",sidebarOpen:!1,language:"en"}),this.loadingSignal=v(!1),this.errorSignal=v(null),this.todos=this.todosSignal.asReadonly(),this.appState=this.appStateSignal.asReadonly(),this.loading=this.loadingSignal.asReadonly(),this.error=this.errorSignal.asReadonly(),this.completedTodos=p(()=>this.todosSignal().filter(e=>e.completed)),this.activeTodos=p(()=>this.todosSignal().filter(e=>!e.completed)),this.totalTodos=p(()=>this.todosSignal().length),this.completedCount=p(()=>this.completedTodos().length),this.completionPercentage=p(()=>{let e=this.totalTodos();return e===0?0:Math.round(this.completedCount()/e*100)}),this.isDarkMode=p(()=>this.appStateSignal().theme==="dark")}addTodo(e){let i={id:Date.now(),title:e,completed:!1,createdAt:new Date};this.todosSignal.update(r=>[...r,i])}removeTodo(e){this.todosSignal.update(i=>i.filter(r=>r.id!==e))}toggleTodo(e){this.todosSignal.update(i=>i.map(r=>r.id===e?f(c({},r),{completed:!r.completed}):r))}updateTodo(e,i){this.todosSignal.update(r=>r.map(o=>o.id===e?f(c({},o),{title:i}):o))}clearCompleted(){this.todosSignal.update(e=>e.filter(i=>!i.completed))}toggleTheme(){this.appStateSignal.update(e=>f(c({},e),{theme:e.theme==="light"?"dark":"light"}))}toggleSidebar(){this.appStateSignal.update(e=>f(c({},e),{sidebarOpen:!e.sidebarOpen}
1))}setLanguage(e){this.appStateSignal.update(i=>f(c({},i),{language:e}))}setLoading(e){this.loadingSignal.set(e)}setError(e){this.errorSignal.set(e)}clearError(){this.errorSignal.set(null)}async fetchTodos(){this.setLoading(!0),this.clearError();try{await new Promise(i=>setTimeout(i,1e3));let e=[{id:1,title:"Learn Angular 21",completed:!1,createdAt:new Date},{id:2,title:"Use Signals",completed:!0,createdAt:new Date},{id:3,title:"Try new control flow",completed:!1,createdAt:new Date}];this.todosSignal.set(e)}catch(e){this.setError("Failed to fetch todos"),console.error("Error fetching todos:",e)}finally{this.setLoading(!1)}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ee({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Rt=(n,t)=>t.id;function jt(n,t){n&1&&(s(0,"div",11),d(1,"Loading todos..."),a())}function Gt(n,t){if(n&1){let e=$();s(0,"div",12),d(1),s(2,"button",20),g("click",function(){F(e);let r=C();return x(r.stateService.clearError())}),d(3,"\xD7"),a()()}if(n&2){let e=C();h(),y(" ",e.stateService.error()," ")}}function Bt(n,t){n&1&&(s(0,"p",17),d(1,"No todos yet. Add one above!"),a())}function Ut(n,t){if(n&1){let e=$();s(0,"div",22)(1,"input",23),g("change",function(){let r=F(e).$implicit,o=C(2);return x(o.stateService.toggleTodo(r.id))}),a(),s(2,"span"),d(3),a(),s(4,"button",24),g("click",function(){let r=F(e).$implicit,o=C(2);return x(o.stateService.removeTodo(r.id))}),d(5," Delete "),a()()}if(n&2){let e=t.$implicit;W("completed",e.completed),h(),ie("checked",e.completed),h(2),Se(e.title)}}function Ht(n,t){if(n&1&&Me(0,Ut,6,4,"div",21,Rt),n&2){let e=C();Ae(e.stateService.todos())}}function Lt(n,t){if(n&1){let e=$();s(0,"button",25),g("click",function(){F(e);let r=C();return x(r.stateService.clearCompleted())}),d(1),a()}if(n&2){let e=C();h(),y(" Clear Completed (",e.stateService.completedCount(),") ")}}var Vn=(()=>{class n{constructor(){this.stateService=A(rt),this.newTodoTitle=""}ngOnInit(){}addTodo(){this.newTodoTitle.trim()&&(this.stateService.addTodo(this.newTodoTitle.trim()),this.newTodoTitle="")}loadTodos(){this.stateService.fetchTodos()}onLanguageChange(e){let i=e.target;this.stateService.setLanguage(i.value)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=Ve({type:n,selectors:[["app-signals-service-example"]],decls:42,vars:12,consts:[[1,"signals-service-example"],[1,"app-state"],[1,"state-controls"],[1,"btn","btn-primary",3,"click"],[1,"btn","btn-secondary",3,"click"],[1,"form-select",3,"change","value"],["value","en"],["value","es"],["value","fr"],[1,"todos-section"],[1,"stats"],[1,"loading"],[1,"alert","alert-danger"],[1,"add-todo"],["type","text","placeholder","Add a new todo...",1,"form-control",3,"ngModelChange","keyup.enter","ngModel"],[1,"btn","btn-success",3,"click"],[1,"todo-list"],[1,"empty-state"],[1,"btn","btn-warning"],[1,"btn","btn-info",3,"click"],[1,"btn","btn-sm",3,"click"],[1,"todo-item",3,"completed"],[1,"todo-item"],["type","checkbox",3,"change","checked"],[1,"btn","btn-danger","btn-sm",3,"click"],[1,"btn","btn-warning",3,"click"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"h2"),d(2,"Signals in Services Example"),a(),s(3,"section",1)(4,"h3"),d(5,"App Configuration"),a(),s(6,"div",2)(7,"button",3),g("click",function(){return r.stateService.toggleTheme()}),d(8),a(),s(9,"button",4),g("click",function(){return r.stateService.toggleSidebar()}),d(10),a(),s(11,"select",5),g("change",function(l){return r.onLanguageChange(l)}),s(12,"option",6),d(13,"English"),a(),s(14,"option",7),d(15,"Espa\xF1ol"),a(),s(16,"option",8),d(17,"Fran\xE7ais"),a()()()(),s(18,"section",9)(19,"h3"),d(20,"Todo List with Signals"),a(),s(21,"div",10)(22,"p"),d(23),a(),s(24,"p"),d(25),a(),s(26,"p"),d(27),a(),s(28,"p"),d(29),a()(),O(30,jt,2,0,"div",11),O(31,Gt,4,1,"div",12),s(32,"div",13)(33,"input",14),Fe("ngModelChange",function(l){return we(r.newTodoTitle,l)||(r.newTodoTitle=l),l}),g("keyup.enter",function(){return r.addTodo()}),a(),s(34,"button",15),g("click",function(){return r.addTodo()}),d(35,"Add"),a()(),s(36,"div",16),O(37,Bt,2,0,"p",17)(38,Ht,2,0),a(),O(39,Lt,2,1,"button",18),s(40,"button",19),g("click",function(){return r.loadTodos()}),d(41," Load Sample Todos "),a()()()),i&2&&(h(8),y(" Current Theme: ",r.stateService.appState().theme," (Click to toggle) "),h(2),y(" Sidebar: ",r.stateService.appState().sidebarOpen?"Open":"Closed"," "),h(),ie("value",r.stateService.appState().language),h(12),y("Total: ",r.stateService.totalTodos()),h(2),y("Active: ",r.stateService.activeTodos().length),h(2),y("Completed: ",r.stateService.completedCount()),h(2),y("Progress: ",r.stateService.completionPercentage(),"%"),h(),T(r.stateService.loading()?30:-1),h(),T(r.stateService.error()?31:-1),h(2),Ee("ngModel",r.newTodoTitle),h(4),T(r.stateService.todos().length===0?37:38),h(2),T(r.stateService.completedCount()>0?39:-1))},dependencies:[Ie,it,et,nt,K,Xe,fe],styles:[".signals-service-example[_ngcontent-%COMP%]{padding:2rem;max-width:800px;margin:0 auto}section[_ngcontent-%COMP%]{background:#f8f9fa;padding:1.5rem;border-radius:8px;margin-bottom:2rem}
1.state-controls[_ngcontent-%COMP%]{display:flex;gap:1rem;flex-wrap:wrap}.stats[_ngcontent-%COMP%]{display:flex;gap:1rem;background:#fff;padding:1rem;border-radius:6px;margin-bottom:1rem}.stats[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-weight:700}.add-todo[_ngcontent-%COMP%]{display:flex;gap:.5rem;margin-bottom:1rem}.todo-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:.75rem;background:#fff;border-radius:6px;margin-bottom:.5rem}.todo-item.completed[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:line-through;color:#999}.todo-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.empty-state[_ngcontent-%COMP%]{text-align:center;color:#999;padding:2rem}.loading[_ngcontent-%COMP%]{text-align:center;padding:1rem;color:#007bff}"]})}}return n})();export{Vn as SignalsServiceExampleComponent}; 2/*! Bundled license information: 3 4@angular/forms/fesm2022/forms.mjs: 5 (** 6 * @license Angular v21.1.4 7 * (c) 2010-2026 Google LLC. https://angular.dev/ 8 * License: MIT 9 *) 10*/
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.