@iaforged/context-code 2.3.6 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/src/cli/handlers/auth.js +1 -1
  2. package/dist/src/commands/agent-spawn/agentSpawn.js +1 -0
  3. package/dist/src/commands/agent-spawn/index.js +1 -0
  4. package/dist/src/commands/login/login.js +1 -1
  5. package/dist/src/commands/skills/skills.js +1 -1
  6. package/dist/src/commands/swarm-init/index.js +1 -1
  7. package/dist/src/commands/swarm-init/swarmInit.js +1 -1
  8. package/dist/src/commands/swarm-list-teams/index.js +1 -0
  9. package/dist/src/commands/swarm-list-teams/swarmListTeams.js +1 -0
  10. package/dist/src/commands.js +1 -1
  11. package/dist/src/components/ConsoleOAuthFlow.js +1 -1
  12. package/dist/src/components/agents/agentFileUtils.js +1 -1
  13. package/dist/src/components/agents/new-agent-creation/wizard-steps/LocationStep.js +1 -1
  14. package/dist/src/components/agents/new-agent-creation/wizard-steps/MemoryStep.js +1 -1
  15. package/dist/src/components/permissions/ExitPlanModePermissionRequest/ExitPlanModePermissionRequest.js +1 -1
  16. package/dist/src/constants/oauth.js +1 -1
  17. package/dist/src/core/agents/blueprints.js +1 -1
  18. package/dist/src/core/agents/teams.js +1 -0
  19. package/dist/src/projectOnboardingState.js +1 -1
  20. package/dist/src/screens/Doctor.js +1 -1
  21. package/dist/src/services/api/openai.js +1 -1
  22. package/dist/src/services/oauth/copilotDevice.js +1 -0
  23. package/dist/src/skills/loadSkillsDir.js +1 -1
  24. package/dist/src/tools/AgentTool/agentMemory.js +1 -1
  25. package/dist/src/utils/auth.js +1 -1
  26. package/dist/src/utils/claudemd.js +1 -1
  27. package/dist/src/utils/cronTasks.js +1 -1
  28. package/dist/src/utils/cronTasksLock.js +1 -1
  29. package/dist/src/utils/doctorDiagnostic.js +1 -1
  30. package/dist/src/utils/envUtils.js +1 -1
  31. package/dist/src/utils/hooks/skillImprovement.js +1 -1
  32. package/dist/src/utils/markdownConfigLoader.js +1 -1
  33. package/dist/src/utils/metaMcp/common.js +1 -0
  34. package/dist/src/utils/metaMcp/mcpServer.js +1 -0
  35. package/dist/src/utils/metaMcp/server/index.js +1 -0
  36. package/dist/src/utils/metaMcp/setup.js +1 -0
  37. package/dist/src/utils/model/model.js +1 -1
  38. package/dist/src/utils/model/modelOptions.js +1 -1
  39. package/dist/src/utils/model/providerCatalog.js +1 -1
  40. package/dist/src/utils/model/providerModels.js +1 -1
  41. package/dist/src/utils/model/providerProfiles.js +1 -1
  42. package/dist/src/utils/model/providerProfilesDb.js +1 -1
  43. package/dist/src/utils/model/providers.js +1 -1
  44. package/dist/src/utils/nativeInstaller/installer.js +1 -1
  45. package/dist/src/utils/permissions/filesystem.js +1 -1
  46. package/dist/src/utils/plugins/addDirPluginSettings.js +1 -1
  47. package/dist/src/utils/sandbox/sandbox-adapter.js +1 -1
  48. package/dist/src/utils/settings/settings.js +1 -1
  49. package/dist/src/utils/skills/skillChangeDetector.js +1 -1
  50. package/dist/src/utils/worktree.js +1 -1
  51. package/dist/src/whatsapp/config.js +1 -1
  52. package/dist/webapp/chunk-OJZNEHPP.js +1 -1
  53. package/dist/webapp/chunk-VAB2VXFI.js +1 -1
  54. package/dist/webapp/ngsw-worker.js +1 -1
  55. package/dist/webapp/polyfills-7R4CRVNH.js +1 -1
  56. package/package.json +41 -3
@@ -1 +1 @@
1
- import{B as e,D as s,E as i,H as a,I as o,K as l,L as h,M as u,O as d,U as c,a as _,b as p,ca as g,d as y,e as m,f as v,g as V,n as f,oa as C,p as A,q as b,qa as w,ra as D,sa as S,ta as O,u as k,va as P,z as x}from"./chunk-VAB2VXFI.js";var T=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,s){this._renderer=e,this._elementRef=s}setProperty(e,s){this._renderer.setProperty(this._elementRef.nativeElement,e,s)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static ɵfac=function(e){return new(e||n)(o(a),o(s))};static ɵdir=h({type:n})}return n})(),M=(()=>{class n extends T{static ɵfac=(()=>{let e;return function(s){return(e||(e=x(n)))(s||n)}})();static ɵdir=h({type:n,features:[u]})}return n})(),F=new b(""),R={provide:F,useExisting:f(()=>N),multi:!0};var U=new b(""),N=(()=>{class n extends T{_compositionMode;_composing=!1;constructor(e,s,i){super(e,s),this._compositionMode=i,null==this._compositionMode&&(this._compositionMode=!function(){let e=P()?P().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){let s=e??"";this.setProperty("value",s)}_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 ɵfac=function(e){return new(e||n)(o(a),o(s),o(U,8))};static ɵdir=h({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(e,s){1&e&&g("input",function(e){return s._handleInput(e.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(e){return s._compositionEnd(e.target.value)})},standalone:!1,features:[C([R]),u]})}return n})(),j=new b(""),H=new b("");function ue(e){return null!=e}function de(e){return d(e)?m(e):e}function ce(e){let s={};return e.forEach(e=>{s=null!=e?_(_({},s),e):s}),0===Object.keys(s).length?null:s}function he(e,s){return s.map(s=>s(e))}function fe(e){return e.map(e=>function(e){return!e.validate}(e)?e:s=>e.validate(s))}function ge(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){return ce(he(e,s))}}(fe(e)):null}function pe(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){let i=he(e,s).map(de);return V(i).pipe(v(ce))}}(fe(e)):null}function Q(e,s){return null===e?[s]:Array.isArray(e)?[...e,s]:[e,s]}function G(e){return e?Array.isArray(e)?e:[e]:[]}function E(e,s){return Array.isArray(e)?e.includes(s):e===s}function ee(e,s){let i=G(s);return G(e).forEach(e=>{E(i,e)||i.push(e)}),i}function te(e,s){return G(s).filter(s=>!E(e,s))}var B=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(e){this._rawValidators=e||[],this._composedValidatorFn=ge(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=pe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,s){return!!this.control&&this.control.hasError(e,s)}getError(e,s){return this.control?this.control.getError(e,s):null}},L=class extends B{name;get formDirective(){return null}get path(){return null}},q=class extends B{_parent=null;name=null;valueAccessor=null},$=class{_cd;constructor(e){this._cd=e}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}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},K=(p(_({},{"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"}),{"[class.ng-submitted]":"isSubmitted"}),(()=>{class n extends ${constructor(e){super(e)}static ɵfac=function(e){return new(e||n)(o(q,2))};static ɵdir=h({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,s){2&e&&c("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},standalone:!1,features:[u]})}return n})()),X="VALID",z="INVALID",J="PENDING",W="DISABLED",Y=class{},Z=class extends Y{value;source;constructor(e,s){super(),this.value=e,this.source=s}},tt=class extends Y{pristine;source;constructor(e,s){super(),this.pristine=e,this.source=s}},et=class extends Y{touched;source;constructor(e,s){super(),this.touched=e,this.source=s}},st=class extends Y{status;source;constructor(e,s){super(),this.status=e,this.source=s}};function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var nt=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,s){this._assignValidators(e),this._assignAsyncValidators(s)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return S(this.statusReactive)}set status(e){S(()=>this.statusReactive.set(e))}_status=O(()=>this.statusReactive());statusReactive=i(void 0);get valid(){return this.status===X}get invalid(){return this.status===z}get pending(){return this.status==J}get disabled(){return this.status===W}get enabled(){return this.status!==W}errors;get pristine(){return S(this.pristineReactive)}set pristine(e){S(()=>this.pristineReactive.set(e))}_pristine=O(()=>this.pristineReactive());pristineReactive=i(!0);get dirty(){return!this.pristine}get touched(){return S(this.touchedReactive)}set touched(e){S(()=>this.touchedReactive.set(e))}_touched=O(()=>this.touchedReactive());touchedReactive=i(!1);get untouched(){return!this.touched}_events=new y;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(ee(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(ee(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(te(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(te(e,this._rawAsyncValidators))}hasValidator(e){return E(this._rawValidators,e)}hasAsyncValidator(e){return E(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let s=!1===this.touched;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new et(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(s=>s.markAllAsTouched(e))}markAsUntouched(e={}){let s=!0===this.touched;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),s&&!1!==e.emitEvent&&this._events.next(new et(!1,i))}markAsDirty(e={}){let s=!0===this.pristine;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new tt(!1,i))}markAsPristine(e={}){let s=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),s&&!1!==e.emitEvent&&this._events.next(new tt(!0,i))}markAsPending(e={}){this.status=J;let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new st(this.status,s)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(p(_({},e),{sourceControl:s}))}disable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=W,this.errors=null,this._forEachChild(s=>{s.disable(p(_({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Z(this.value,i)),this._events.next(new st(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=X,this._forEachChild(s=>{s.enable(p(_({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,s){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},s),this._parent._updateTouched({},s))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let s=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===X||this.status===J)&&this._runAsyncValidator(s,e.emitEvent)}let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Z(this.value,s)),this._events.next(new st(this.status,s)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(p(_({},e),{sourceControl:s}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(s=>s._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?W:X}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,s){if(this.asyncValidator){this.status=J,this._hasOwnPendingAsyncValidator={emitEvent:!1!==s};let i=de(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:s,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,s={}){this.errors=e,this._updateControlsErrors(!1!==s.emitEvent,this,s.shouldHaveEmitted)}get(e){let s=e;return null==s||(Array.isArray(s)||(s=s.split(".")),0===s.length)?null:s.reduce((e,s)=>e&&e._find(s),this)}getError(e,s){let i=s?this.get(s):this;return i&&i.errors?i.errors[e]:null}hasError(e,s){return!!this.getError(e,s)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,s,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new st(this.status,s)),this._parent&&this._parent._updateControlsErrors(e,s,i)}_initObservables(){this.valueChanges=new e,this.statusChanges=new e}_calculateStatus(){return this._allControlsDisabled()?W:this.errors?z:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(J)?J:this._anyControlsHaveStatus(z)?z:X}_anyControlsHaveStatus(e){return this._anyControls(s=>s.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,s){let i=!this._anyControlsDirty(),a=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,s),a&&this._events.next(new tt(this.pristine,s))}_updateTouched(e={},s){this.touched=this._anyControlsTouched(),this._events.next(new et(this.touched,s)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,s)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){I(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let s=this._parent&&this._parent.dirty;return!e&&!!s&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){var s;this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=(s=this._rawValidators,Array.isArray(s)?ge(s):s||null)}_assignAsyncValidators(e){var s;this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=(s=this._rawAsyncValidators,Array.isArray(s)?pe(s):s||null)}},it=new b("",{providedIn:"root",factory:()=>rt}),rt="always";function Re(e,s,i=rt){(function(e,s){let i=function(e){return e._rawValidators}(e);null!==s.validator?e.setValidators(Q(i,s.validator)):"function"==typeof i&&e.setValidators([i]);let a=function(e){return e._rawAsyncValidators}(e);null!==s.asyncValidator?e.setAsyncValidators(Q(a,s.asyncValidator)):"function"==typeof a&&e.setAsyncValidators([a]);let r=()=>e.updateValueAndValidity();ne(s._rawValidators,r),ne(s._rawAsyncValidators,r)})(e,s),s.valueAccessor.writeValue(e.value),(e.disabled||"always"===i)&&s.valueAccessor.setDisabledState?.(e.disabled),function(e,s){s.valueAccessor.registerOnChange(i=>{e._pendingValue=i,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&_e(e,s)})}(e,s),function(e,s){let t=(e,i)=>{s.valueAccessor.writeValue(e),i&&s.viewToModelUpdate(e)};e.registerOnChange(t),s._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,s),function(e,s){s.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&_e(e,s),"submit"!==e.updateOn&&e.markAsTouched()})}(e,s),function(e,s){if(s.valueAccessor.setDisabledState){let t=e=>{s.valueAccessor.setDisabledState(e)};e.registerOnDisabledChange(t),s._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,s)}function ne(e,s){e.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(s)})}function _e(e,s){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),s.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function $e(e,s){if(!s)return null;let i,a,o;return Array.isArray(s),s.forEach(e=>{e.constructor===N?i=e:function(e){return Object.getPrototypeOf(e.constructor)===M}(e)?a=e:o=e}),o||a||i||null}function ie(e,s){let i=e.indexOf(s);i>-1&&e.splice(i,1)}function re(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}var at=class extends nt{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,s,i){var a;super((I(a=s)?a.validators:a)||null,function(e,s){return(I(s)?s.asyncValidators:e)||null}(i,s)),this._applyFormState(e),this._setUpdateStrategy(s),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),I(s)&&(s.nonNullable||s.initialValueIsDefault)&&(re(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,s={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==s.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==s.emitViewToModelChange)),this.updateValueAndValidity(s)}patchValue(e,s={}){this.setValue(e,s)}reset(e=this.defaultValue,s={}){this._applyFormState(e),this.markAsPristine(s),this.markAsUntouched(s),this.setValue(this.value,s),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ie(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ie(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){re(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},ot={provide:q,useExisting:f(()=>ht)},lt=Promise.resolve(),ht=(()=>{class n extends q{_changeDetectorRef;callSetDisabledState;control=new at;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new e;constructor(e,s,i,a,o,l){super(),this._changeDetectorRef=o,this.callSetDisabledState=l,this._parent=e,this._setValidators(s),this._setAsyncValidators(i),this.valueAccessor=$e(0,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let s=e.name.previousValue;this.formDirective.removeControl({name:s,path:this._getPath(s)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function(e,s){if(!e.hasOwnProperty("model"))return!1;let i=e.model;return!!i.isFirstChange()||!Object.is(s,i.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&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&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){Re(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){lt.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let s=e.isDisabled.currentValue,i=0!==s&&D(s);lt.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?function(e,s){return[...s.path,e]}(e,this._parent):[e]}static ɵfac=function(e){return new(e||n)(o(L,9),o(j,10),o(H,10),o(F,10),o(w,8),o(it,8))};static ɵdir=h({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:[C([ot]),u,k]})}return n})(),ut=(()=>{class n{static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({})}return n})(),dt=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:it,useValue:e.callSetDisabledState??rt}]}}static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({imports:[ut]})}return n})();export{N as a,K as b,ht as c,dt as d};
1
+ import{B as e,D as s,E as i,H as a,I as o,K as l,L as h,M as u,O as d,U as c,a as _,b as p,ca as g,d as y,e as m,f as v,g as V,n as f,oa as C,p as A,q as b,qa as w,ra as D,sa as S,ta as O,u as k,va as P,z as x}from"./chunk-VAB2VXFI.js";var T=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,s){this._renderer=e,this._elementRef=s}setProperty(e,s){this._renderer.setProperty(this._elementRef.nativeElement,e,s)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static ɵfac=function(e){return new(e||n)(o(a),o(s))};static ɵdir=h({type:n})}return n})(),M=(()=>{class n extends T{static ɵfac=(()=>{let e;return function(s){return(e||(e=x(n)))(s||n)}})();static ɵdir=h({type:n,features:[u]})}return n})(),F=new b(""),R={provide:F,useExisting:f(()=>N),multi:!0},U=new b(""),N=(()=>{class n extends T{_compositionMode;_composing=!1;constructor(e,s,i){super(e,s),this._compositionMode=i,null==this._compositionMode&&(this._compositionMode=!function(){let e=P()?P().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){let s=e??"";this.setProperty("value",s)}_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 ɵfac=function(e){return new(e||n)(o(a),o(s),o(U,8))};static ɵdir=h({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(e,s){1&e&&g("input",function(e){return s._handleInput(e.target.value)})("blur",function(){return s.onTouched()})("compositionstart",function(){return s._compositionStart()})("compositionend",function(e){return s._compositionEnd(e.target.value)})},standalone:!1,features:[C([R]),u]})}return n})(),j=new b(""),H=new b("");function ue(e){return null!=e}function de(e){return d(e)?m(e):e}function ce(e){let s={};return e.forEach(e=>{s=null!=e?_(_({},s),e):s}),0===Object.keys(s).length?null:s}function he(e,s){return s.map(s=>s(e))}function fe(e){return e.map(e=>function(e){return!e.validate}(e)?e:s=>e.validate(s))}function ge(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){return ce(he(e,s))}}(fe(e)):null}function pe(e){return null!=e?function(e){if(!e)return null;let s=e.filter(ue);return 0==s.length?null:function(e){let i=he(e,s).map(de);return V(i).pipe(v(ce))}}(fe(e)):null}function Q(e,s){return null===e?[s]:Array.isArray(e)?[...e,s]:[e,s]}function G(e){return e?Array.isArray(e)?e:[e]:[]}function E(e,s){return Array.isArray(e)?e.includes(s):e===s}function ee(e,s){let i=G(s);return G(e).forEach(e=>{E(i,e)||i.push(e)}),i}function te(e,s){return G(s).filter(s=>!E(e,s))}var B=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(e){this._rawValidators=e||[],this._composedValidatorFn=ge(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=pe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,s){return!!this.control&&this.control.hasError(e,s)}getError(e,s){return this.control?this.control.getError(e,s):null}},L=class extends B{name;get formDirective(){return null}get path(){return null}},q=class extends B{_parent=null;name=null;valueAccessor=null},z=class{_cd;constructor(e){this._cd=e}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}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},K=(p(_({},{"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"}),{"[class.ng-submitted]":"isSubmitted"}),(()=>{class n extends z{constructor(e){super(e)}static ɵfac=function(e){return new(e||n)(o(q,2))};static ɵdir=h({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,s){2&e&&c("ng-untouched",s.isUntouched)("ng-touched",s.isTouched)("ng-pristine",s.isPristine)("ng-dirty",s.isDirty)("ng-valid",s.isValid)("ng-invalid",s.isInvalid)("ng-pending",s.isPending)},standalone:!1,features:[u]})}return n})()),X="VALID",J="INVALID",W="PENDING",Y="DISABLED",Z=class{},$=class extends Z{value;source;constructor(e,s){super(),this.value=e,this.source=s}},tt=class extends Z{pristine;source;constructor(e,s){super(),this.pristine=e,this.source=s}},et=class extends Z{touched;source;constructor(e,s){super(),this.touched=e,this.source=s}},st=class extends Z{status;source;constructor(e,s){super(),this.status=e,this.source=s}};function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}var nt=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,s){this._assignValidators(e),this._assignAsyncValidators(s)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return S(this.statusReactive)}set status(e){S(()=>this.statusReactive.set(e))}_status=O(()=>this.statusReactive());statusReactive=i(void 0);get valid(){return this.status===X}get invalid(){return this.status===J}get pending(){return this.status==W}get disabled(){return this.status===Y}get enabled(){return this.status!==Y}errors;get pristine(){return S(this.pristineReactive)}set pristine(e){S(()=>this.pristineReactive.set(e))}_pristine=O(()=>this.pristineReactive());pristineReactive=i(!0);get dirty(){return!this.pristine}get touched(){return S(this.touchedReactive)}set touched(e){S(()=>this.touchedReactive.set(e))}_touched=O(()=>this.touchedReactive());touchedReactive=i(!1);get untouched(){return!this.touched}_events=new y;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(ee(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(ee(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(te(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(te(e,this._rawAsyncValidators))}hasValidator(e){return E(this._rawValidators,e)}hasAsyncValidator(e){return E(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let s=!1===this.touched;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new et(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(s=>s.markAllAsTouched(e))}markAsUntouched(e={}){let s=!0===this.touched;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),s&&!1!==e.emitEvent&&this._events.next(new et(!1,i))}markAsDirty(e={}){let s=!0===this.pristine;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(p(_({},e),{sourceControl:i})),s&&!1!==e.emitEvent&&this._events.next(new tt(!1,i))}markAsPristine(e={}){let s=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(s=>{s.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),s&&!1!==e.emitEvent&&this._events.next(new tt(!0,i))}markAsPending(e={}){this.status=W;let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new st(this.status,s)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(p(_({},e),{sourceControl:s}))}disable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=Y,this.errors=null,this._forEachChild(s=>{s.disable(p(_({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new $(this.value,i)),this._events.next(new st(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){let s=this._parentMarkedDirty(e.onlySelf);this.status=X,this._forEachChild(s=>{s.enable(p(_({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(p(_({},e),{skipPristineCheck:s}),this),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e,s){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},s),this._parent._updateTouched({},s))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let s=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===X||this.status===W)&&this._runAsyncValidator(s,e.emitEvent)}let s=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new $(this.value,s)),this._events.next(new st(this.status,s)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(p(_({},e),{sourceControl:s}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(s=>s._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Y:X}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,s){if(this.asyncValidator){this.status=W,this._hasOwnPendingAsyncValidator={emitEvent:!1!==s};let i=de(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:s,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,s={}){this.errors=e,this._updateControlsErrors(!1!==s.emitEvent,this,s.shouldHaveEmitted)}get(e){let s=e;return null==s||(Array.isArray(s)||(s=s.split(".")),0===s.length)?null:s.reduce((e,s)=>e&&e._find(s),this)}getError(e,s){let i=s?this.get(s):this;return i&&i.errors?i.errors[e]:null}hasError(e,s){return!!this.getError(e,s)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,s,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new st(this.status,s)),this._parent&&this._parent._updateControlsErrors(e,s,i)}_initObservables(){this.valueChanges=new e,this.statusChanges=new e}_calculateStatus(){return this._allControlsDisabled()?Y:this.errors?J:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(W)?W:this._anyControlsHaveStatus(J)?J:X}_anyControlsHaveStatus(e){return this._anyControls(s=>s.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,s){let i=!this._anyControlsDirty(),a=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,s),a&&this._events.next(new tt(this.pristine,s))}_updateTouched(e={},s){this.touched=this._anyControlsTouched(),this._events.next(new et(this.touched,s)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,s)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){I(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let s=this._parent&&this._parent.dirty;return!e&&!!s&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){var s;this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=(s=this._rawValidators,Array.isArray(s)?ge(s):s||null)}_assignAsyncValidators(e){var s;this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=(s=this._rawAsyncValidators,Array.isArray(s)?pe(s):s||null)}},it=new b("",{providedIn:"root",factory:()=>rt}),rt="always";function ne(e,s){e.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(s)})}function _e(e,s){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),s.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function ie(e,s){let i=e.indexOf(s);i>-1&&e.splice(i,1)}function re(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}var at=class extends nt{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,s,i){var a;super((I(a=s)?a.validators:a)||null,function(e,s){return(I(s)?s.asyncValidators:e)||null}(i,s)),this._applyFormState(e),this._setUpdateStrategy(s),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),I(s)&&(s.nonNullable||s.initialValueIsDefault)&&(re(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,s={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==s.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==s.emitViewToModelChange)),this.updateValueAndValidity(s)}patchValue(e,s={}){this.setValue(e,s)}reset(e=this.defaultValue,s={}){this._applyFormState(e),this.markAsPristine(s),this.markAsUntouched(s),this.setValue(this.value,s),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){ie(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){ie(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){re(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},ot={provide:q,useExisting:f(()=>ht)},lt=Promise.resolve(),ht=(()=>{class n extends q{_changeDetectorRef;callSetDisabledState;control=new at;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new e;constructor(e,s,i,a,o,l){super(),this._changeDetectorRef=o,this.callSetDisabledState=l,this._parent=e,this._setValidators(s),this._setAsyncValidators(i),this.valueAccessor=function(e,s){if(!s)return null;let i,a,o;return Array.isArray(s),s.forEach(e=>{e.constructor===N?i=e:function(e){return Object.getPrototypeOf(e.constructor)===M}(e)?a=e:o=e}),o||a||i||null}(0,a)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let s=e.name.previousValue;this.formDirective.removeControl({name:s,path:this._getPath(s)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),function(e,s){if(!e.hasOwnProperty("model"))return!1;let i=e.model;return!!i.isFirstChange()||!Object.is(s,i.currentValue)}(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&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&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){(function(e,s,i=rt){(function(e,s){let i=function(e){return e._rawValidators}(e);null!==s.validator?e.setValidators(Q(i,s.validator)):"function"==typeof i&&e.setValidators([i]);let a=function(e){return e._rawAsyncValidators}(e);null!==s.asyncValidator?e.setAsyncValidators(Q(a,s.asyncValidator)):"function"==typeof a&&e.setAsyncValidators([a]);let r=()=>e.updateValueAndValidity();ne(s._rawValidators,r),ne(s._rawAsyncValidators,r)})(e,s),s.valueAccessor.writeValue(e.value),(e.disabled||"always"===i)&&s.valueAccessor.setDisabledState?.(e.disabled),function(e,s){s.valueAccessor.registerOnChange(i=>{e._pendingValue=i,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&_e(e,s)})}(e,s),function(e,s){let t=(e,i)=>{s.valueAccessor.writeValue(e),i&&s.viewToModelUpdate(e)};e.registerOnChange(t),s._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,s),function(e,s){s.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&_e(e,s),"submit"!==e.updateOn&&e.markAsTouched()})}(e,s),function(e,s){if(s.valueAccessor.setDisabledState){let t=e=>{s.valueAccessor.setDisabledState(e)};e.registerOnDisabledChange(t),s._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,s)})(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){lt.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let s=e.isDisabled.currentValue,i=0!==s&&D(s);lt.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?function(e,s){return[...s.path,e]}(e,this._parent):[e]}static ɵfac=function(e){return new(e||n)(o(L,9),o(j,10),o(H,10),o(F,10),o(w,8),o(it,8))};static ɵdir=h({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:[C([ot]),u,k]})}return n})(),ut=(()=>{class n{static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({})}return n})(),dt=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:it,useValue:e.callSetDisabledState??rt}]}}static ɵfac=function(e){return new(e||n)};static ɵmod=l({type:n});static ɵinj=A({imports:[ut]})}return n})();export{N as a,K as b,ht as c,dt as d};