@whoz-oss/coday-client 0.201.1 → 0.202.0

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 (108) hide show
  1. package/browser/{chunk-5CIRBGG5.js → chunk-24EMVCMJ.js} +1 -1
  2. package/browser/{chunk-WQVPMMUH.js → chunk-2KD6MSFI.js} +1 -1
  3. package/browser/{chunk-6K5PHSHH.js → chunk-2XIUD7DV.js} +1 -1
  4. package/browser/{chunk-6WYTEAO6.js → chunk-34XXAW4B.js} +1 -1
  5. package/browser/{chunk-LPFJ4NAI.js → chunk-4OZZANXO.js} +1 -1
  6. package/browser/{chunk-PY5KASLV.js → chunk-4RQXBHNU.js} +1 -1
  7. package/browser/{chunk-3OKUQ4KY.js → chunk-4URCDOMP.js} +1 -1
  8. package/browser/{chunk-6B6PTATK.js → chunk-5RSIAFID.js} +1 -1
  9. package/browser/{chunk-KZ5F6HW3.js → chunk-5YY3K2H4.js} +1 -1
  10. package/browser/{chunk-GX3AY74Y.js → chunk-5ZZOXT2B.js} +1 -1
  11. package/browser/{chunk-WQNYPYF4.js → chunk-6J2HD2IJ.js} +1 -1
  12. package/browser/{chunk-6CNI4FAD.js → chunk-7BYLIOKV.js} +1 -1
  13. package/browser/{chunk-IEGEWPMW.js → chunk-7DUVQCGC.js} +1 -1
  14. package/browser/{chunk-YXOPY6VJ.js → chunk-7UX5UET4.js} +1 -1
  15. package/browser/{chunk-YC254XBK.js → chunk-ATOA52OV.js} +1 -1
  16. package/browser/{chunk-MOG6OBSN.js → chunk-AV7DTXWS.js} +1 -1
  17. package/browser/{chunk-5JNIHU3U.js → chunk-BM7HTRD4.js} +1 -1
  18. package/browser/chunk-BWBXJSAF.js +1 -0
  19. package/browser/{chunk-OW2INFPT.js → chunk-CREVHCXF.js} +1 -1
  20. package/browser/{chunk-V3T467QC.js → chunk-DIAV5ZVT.js} +1 -1
  21. package/browser/{chunk-ELHEGEQW.js → chunk-E5MP3JT3.js} +1 -1
  22. package/browser/{chunk-KPY6XGAS.js → chunk-EJH5VPZT.js} +1 -1
  23. package/browser/chunk-EKKLCTBV.js +1 -0
  24. package/browser/{chunk-KWZFKFOK.js → chunk-EMS3MOSZ.js} +1 -1
  25. package/browser/chunk-EN3JS6XQ.js +1 -0
  26. package/browser/{chunk-52BSDRXI.js → chunk-ETLSYFBB.js} +1 -1
  27. package/browser/chunk-EU6MUKDF.js +1 -0
  28. package/browser/{chunk-XYYLNQXO.js → chunk-FPE2L5B6.js} +1 -1
  29. package/browser/{chunk-S2OBMHZQ.js → chunk-FUVTYKQF.js} +1 -1
  30. package/browser/chunk-GN7KRTUQ.js +6 -0
  31. package/browser/chunk-GTY23DMS.js +1 -0
  32. package/browser/{chunk-5URVSSXV.js → chunk-H2NKOG3U.js} +1 -1
  33. package/browser/{chunk-4GVABYH4.js → chunk-H7A4LOFH.js} +1 -1
  34. package/browser/{chunk-PF22YVKT.js → chunk-HIUAVY64.js} +1 -1
  35. package/browser/chunk-HMFECYUP.js +1 -0
  36. package/browser/{chunk-A57ILNNE.js → chunk-IWORAUIR.js} +1 -1
  37. package/browser/{chunk-X36T53JY.js → chunk-IZ232KSX.js} +1 -1
  38. package/browser/{chunk-FU75LX2K.js → chunk-IZMOVLXM.js} +1 -1
  39. package/browser/{chunk-OUCV2HPU.js → chunk-J3CZ3MOZ.js} +1 -1
  40. package/browser/{chunk-SMT5YVCA.js → chunk-J6XN2QQO.js} +1 -1
  41. package/browser/{chunk-UB6F2VJU.js → chunk-JEGJL4TT.js} +1 -1
  42. package/browser/{chunk-SLBKHVIO.js → chunk-JLGR5C43.js} +1 -1
  43. package/browser/{chunk-ZYBOOLP5.js → chunk-JTM5UHB2.js} +1 -1
  44. package/browser/{chunk-CWCTGW6W.js → chunk-KP7JXEQ6.js} +1 -1
  45. package/browser/{chunk-33J6ILEN.js → chunk-LN6ED2HF.js} +1 -1
  46. package/browser/{chunk-FMBOAVWA.js → chunk-LT6BGRWZ.js} +1 -1
  47. package/browser/{chunk-IZDINSYR.js → chunk-MLSIHZ2T.js} +1 -1
  48. package/browser/{chunk-4HKV7PEE.js → chunk-MQIE2KBB.js} +1 -1
  49. package/browser/{chunk-4KVPUDL7.js → chunk-O4JNY3IM.js} +1 -1
  50. package/browser/{chunk-4ERYW25Y.js → chunk-OCT6NWLB.js} +1 -1
  51. package/browser/chunk-OQBPCHYW.js +1 -0
  52. package/browser/{chunk-ZT45DI6V.js → chunk-P6D3VN2I.js} +1 -1
  53. package/browser/{chunk-4KJQDGDQ.js → chunk-PN75DG7I.js} +1 -1
  54. package/browser/{chunk-XCZAPW4H.js → chunk-POQ6PK6P.js} +1 -1
  55. package/browser/{chunk-I7NYAA6B.js → chunk-PZWORCU2.js} +1 -1
  56. package/browser/{chunk-QPBFAKWK.js → chunk-Q7GPLEGX.js} +1 -1
  57. package/browser/{chunk-ZEMOOOQR.js → chunk-QJ3OBGZZ.js} +1 -1
  58. package/browser/{chunk-OC32WWAB.js → chunk-QWADOF7R.js} +1 -1
  59. package/browser/{chunk-Z7E7NSDY.js → chunk-RBAVAHXW.js} +1 -1
  60. package/browser/{chunk-JRJCV4WT.js → chunk-RFEQZZ65.js} +1 -1
  61. package/browser/{chunk-V363EHJE.js → chunk-RI2JQRSB.js} +1 -1
  62. package/browser/{chunk-B4RKRLIY.js → chunk-RYEX2DR7.js} +2 -2
  63. package/browser/{chunk-WKUVJT4A.js → chunk-S4E4KZRV.js} +1 -1
  64. package/browser/chunk-SK7JAK5K.js +1 -0
  65. package/browser/{chunk-CBYR4M6L.js → chunk-SR3JKZ3U.js} +1 -1
  66. package/browser/{chunk-6BKNE3NF.js → chunk-SUCGKO3W.js} +1 -1
  67. package/browser/chunk-T2LL5FG4.js +1 -0
  68. package/browser/{chunk-EQ7GIQF4.js → chunk-T6U3WDDW.js} +1 -1
  69. package/browser/{chunk-HGJB7HHB.js → chunk-T7LK5WIK.js} +1 -1
  70. package/browser/{chunk-PBL67GY2.js → chunk-TANV4K2Q.js} +1 -1
  71. package/browser/{chunk-FPNEFWYN.js → chunk-TIPIHEBG.js} +1 -1
  72. package/browser/{chunk-YQBY2QBZ.js → chunk-TJUGTTPT.js} +1 -1
  73. package/browser/{chunk-FBLKA2VP.js → chunk-TPZGV5NA.js} +1 -1
  74. package/browser/{chunk-EF2BOSEH.js → chunk-TZKO65ML.js} +1 -1
  75. package/browser/chunk-UFOTGZBF.js +1 -0
  76. package/browser/{chunk-6V7FXGUT.js → chunk-W2DFJLOU.js} +1 -1
  77. package/browser/{chunk-HHMFXFTY.js → chunk-WRTC44LF.js} +1 -1
  78. package/browser/{chunk-5GG3EOAD.js → chunk-X4OBCZKS.js} +1 -1
  79. package/browser/{chunk-HZF57OLY.js → chunk-XG3WOI3P.js} +1 -1
  80. package/browser/chunk-XI5EZONK.js +1 -0
  81. package/browser/{chunk-LS35GSEQ.js → chunk-XIWUSJ3U.js} +1 -1
  82. package/browser/{chunk-GQ4SCQGF.js → chunk-YJA5A4XF.js} +1 -1
  83. package/browser/{chunk-MUX7LGIM.js → chunk-YQAOEJN2.js} +1 -1
  84. package/browser/{chunk-T3IUNA6F.js → chunk-YTTJDHQV.js} +1 -1
  85. package/browser/{chunk-J753QAJ3.js → chunk-ZFLT2KNY.js} +1 -1
  86. package/browser/{chunk-WBJIWNTY.js → chunk-ZH3XQHLJ.js} +1 -1
  87. package/browser/{chunk-4DI7XR3B.js → chunk-ZTCAFSDX.js} +1 -1
  88. package/browser/index.html +1 -1
  89. package/browser/{main-5SVAR5D2.js → main-AUOPF3JJ.js} +1 -1
  90. package/package.json +1 -1
  91. package/browser/chunk-3BV5H657.js +0 -1
  92. package/browser/chunk-4KRYEFIY.js +0 -1
  93. package/browser/chunk-7EECSFOZ.js +0 -1
  94. package/browser/chunk-AOMZ5JRB.js +0 -1
  95. package/browser/chunk-BWTU7I6I.js +0 -1
  96. package/browser/chunk-CUZOUQER.js +0 -1
  97. package/browser/chunk-CXJWRGZE.js +0 -1
  98. package/browser/chunk-DCETCV67.js +0 -1
  99. package/browser/chunk-G7O6FLX7.js +0 -1
  100. package/browser/chunk-GW42T7BK.js +0 -1
  101. package/browser/chunk-JEDRTGW5.js +0 -6
  102. package/browser/chunk-JGDBHWKR.js +0 -1
  103. package/browser/chunk-JQ4DU7CQ.js +0 -1
  104. package/browser/chunk-M24DDSA5.js +0 -1
  105. package/browser/chunk-OKABGUO7.js +0 -1
  106. package/browser/chunk-PQK52BSF.js +0 -1
  107. package/browser/chunk-TXJ6RSOC.js +0 -1
  108. package/browser/chunk-WN43DASR.js +0 -1
@@ -1 +1 @@
1
- import{$a as u,$b as c,Db as _,Ma as xe,Pa as N,Qa as s,Rb as ce,W as Z,Xa as Y,Y as d,Ya as l,Z as Se,_ as X,a as f,aa as A,b as p,ca as R,eb as Pe,h as Fe,ib as Re,jb as k,jc as V,ka as Ne,kc as O,l as Ee,ma as Oe,oa as D,t as we,ta as w,tc as he,uc as fe,va as I,wa as g,ya as S,z as Ie,zc as ge}from"./chunk-B4RKRLIY.js";var We=(()=>{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)(s(N),s(S))};static \u0275dir=l({type:n})}return n})(),M=(()=>{class n extends We{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),y=new A(""),Vt={provide:y,useExisting:d(()=>Dt),multi:!0},Dt=(()=>{class n extends M{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Vt]),u]})}return n})(),bt={provide:y,useExisting:d(()=>qe),multi:!0};function At(){let n=ge()?ge().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Mt=new A(""),qe=(()=>{class n extends We{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!At())}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)(s(N),s(S),s(Mt,8))};static \u0275dir=l({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&&_("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([bt]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var m=new A(""),F=new A(""),Ft=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ke=class{static min(t){return ze(t)}static max(t){return Ze(t)}static required(t){return Xe(t)}static requiredTrue(t){return Et(t)}static email(t){return wt(t)}static minLength(t){return It(t)}static maxLength(t){return Ye(t)}static pattern(t){return St(t)}static nullValidator(t){return J()}static compose(t){return nt(t)}static composeAsync(t){return it(t)}};function ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Xe(n){return me(n.value)?{required:!0}:null}function Et(n){return n.value===!0?null:{required:!0}}function wt(n){return me(n.value)||Ft.test(n.value)?null:{email:!0}}function It(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Ye(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function St(n){if(!n)return J;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function J(n){return null}function Ke(n){return n!=null}function Je(n){return Pe(n)?Ee(n):n}function Qe(n){let t={};return n.forEach(e=>{t=e!=null?f(f({},t),e):t}),Object.keys(t).length===0?null:t}function et(n,t){return t.map(e=>e(n))}function Nt(n){return!n.validate}function tt(n){return n.map(t=>Nt(t)?t:e=>t.validate(e))}function nt(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){return Qe(et(e,t))}}function ve(n){return n!=null?nt(tt(n)):null}function it(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){let i=et(e,t).map(Je);return Ie(i).pipe(we(Qe))}}function ye(n){return n!=null?it(tt(n)):null}function je(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function rt(n){return n._rawValidators}function ot(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function Q(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ge(n,t){let e=pe(t);return pe(n).forEach(r=>{Q(e,r)||e.push(r)}),e}function Te(n,t){return pe(t).filter(e=>!Q(n,e))}var ee=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=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(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}},h=class extends ee{name;get formDirective(){return null}get path(){return null}},v=class extends ee{_parent=null;name=null;valueAccessor=null},te=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}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Tn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ce("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:[u]})}return n})(),Bn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(h,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ce("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)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var j="VALID",K="INVALID",x="PENDING",G="DISABLED",b=class{},ne=class extends b{value;source;constructor(t,e){super(),this.value=t,this.source=e}},B=class extends b{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},U=class extends b{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},P=class extends b{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ie=class extends b{source;constructor(t){super(),this.source=t}},H=class extends b{source;constructor(t){super(),this.source=t}};function Ce(n){return(ae(n)?n.validators:n)||null}function Ot(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(ae(t)?t.asyncValidators:n)||null}function xt(n){return Array.isArray(n)?ye(n):n||null}function ae(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function st(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new Z(1e3,"");if(!i[e])throw new Z(1001,"")}function at(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new Z(1002,"")})}var L=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=O(()=>this.statusReactive());statusReactive=w(void 0);get valid(){return this.status===j}get invalid(){return this.status===K}get pending(){return this.status==x}get disabled(){return this.status===G}get enabled(){return this.status!==G}errors;get pristine(){return V(this.pristineReactive)}set pristine(t){V(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=w(!0);get dirty(){return!this.pristine}get touched(){return V(this.touchedReactive)}set touched(t){V(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=w(!1);get untouched(){return!this.touched}_events=new Fe;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(Ge(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Te(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Te(t,this._rawAsyncValidators))}hasValidator(t){return Q(this._rawValidators,t)}hasAsyncValidator(t){return Q(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(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new U(!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;this._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 U(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!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 B(!0,i))}markAsPending(t={}){this.status=x;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new P(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(p(f({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=G,this.errors=null,this._forEachChild(r=>{r.disable(p(f({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,i)),this._events.next(new P(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(f({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(p(f({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(p(f({},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===j||this.status===x)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,e)),this._events.next(new P(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(p(f({},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()?G:j}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=x,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Je(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 P(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new D,this.statusChanges=new D}_calculateStatus(){return this._allControlsDisabled()?G:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(x)?x:this._anyControlsHaveStatus(K)?K:j}_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 B(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new U(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ae(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=Ot(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=xt(this._rawAsyncValidators)}},$=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){at(this,!0,t),Object.keys(t).forEach(i=>{st(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Un=$;var E=new A("",{factory:()=>q}),q="always";function le(n,t){return[...t.path,n]}function W(n,t,e=q){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Rt(n,t),jt(n,t),kt(n,t),Pt(n,t)}function re(n,t,e=!0){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function oe(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Pt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=rt(n);t.validator!==null?n.setValidators(je(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ot(n);t.asyncValidator!==null?n.setAsyncValidators(je(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();oe(t._rawValidators,r),oe(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=rt(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=ot(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return oe(t._rawValidators,i),oe(t._rawAsyncValidators,i),e}function Rt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&lt(n,t)})}function kt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&lt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function lt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function jt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function ut(n,t){n==null,De(n,t)}function Gt(n,t){return se(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Tt(n){return Object.getPrototypeOf(n.constructor)===M}function dt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===qe?e=o:Tt(o)?i=o:r=o}),r||i||e||null}function Bt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Ut={provide:h,useExisting:d(()=>Ht)},T=Promise.resolve(),Ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this.submittedReactive)}_submitted=O(()=>this.submittedReactive());submittedReactive=w(!1);_directives=new Set;form;ngSubmit=new D;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new $({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){T.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),W(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){T.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){T.then(()=>{let i=this._findContainer(e.path),r=new $({});ut(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){T.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){T.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),dt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([Ut]),u]})}return n})();function Be(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ue(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var ct=class extends L{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ae(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ue(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 H(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Be(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Be(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){Ue(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 Lt=n=>n instanceof ct,$t=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective?.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var Wt={provide:v,useExisting:d(()=>qt)},He=Promise.resolve(),qt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new ct;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new D;constructor(e,i,r,o,a,C){super(),this._changeDetectorRef=a,this.callSetDisabledState=C,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(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),be(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(){W(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){He.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&fe(i);He.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?le(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(s(h,9),s(m,10),s(F,10),s(y,10),s(he,8),s(E,8))};static \u0275dir=l({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([Wt]),u,I]})}return n})();var Ln=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),zt={provide:y,useExisting:d(()=>Zt),multi:!0},Zt=(()=>{class n extends M{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&_("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([zt]),u]})}return n})(),Xt={provide:y,useExisting:d(()=>Kt),multi:!0};var Yt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Kt=(()=>{class n extends M{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=R(E,{optional:!0})??q;constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o}ngOnInit(){this._control=this._injector.get(v),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(s(N),s(S),s(Yt),s(Ne))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[c([Xt]),u]})}return n})(),Jt={provide:y,useExisting:d(()=>Qt),multi:!0},Qt=(()=>{class n extends M{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Jt]),u]})}return n})(),Le=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i)}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){at(this,!1,t),t.forEach((i,r)=>{st(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};var ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=w(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(se(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let i=this.form.get(e.path);return W(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){re(e.control||null,e,!1),Bt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,i){this.form.get(e.path).setValue(i)}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,dt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(re(i||null,e),Lt(r)&&(W(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);ut(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&Gt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&se(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,features:[u,I]})}return n})();var Me=new A(""),en={provide:v,useExisting:d(()=>tn)},tn=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&re(i,this,!1),W(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&re(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(y,10),s(Me,8),s(E,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([en]),u,I]})}return n})(),nn={provide:h,useExisting:d(()=>ft)},ft=(()=>{class n extends $t{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){pt(this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[c([nn]),u]})}return n})(),rn={provide:h,useExisting:d(()=>gt)},gt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[c([rn]),u]})}return n})();function pt(n){return!(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var on={provide:v,useExisting:d(()=>sn)},sn=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,o)}ngOnChanges(e){this._added||this._setUpControl(),be(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10),s(y,10),s(Me,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([on]),u,I]})}return n})();var an={provide:h,useExisting:d(()=>ln)},ln=(()=>{class n extends ht{form=null;ngSubmit=new D;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([an]),u]})}return n})(),un={provide:y,useExisting:d(()=>_t),multi:!0};function mt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function dn(n){return n.split(":")[0]}var _t=(()=>{class n extends M{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=R(Re).injector;destroyRef=R(Oe);cdr=R(he);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,xe({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=mt(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=dn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([un]),u]})}return n})(),$n=(()=>{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(mt(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)(s(S),s(N),s(_t,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),cn={provide:y,useExisting:d(()=>vt),multi:!0};function $e(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function hn(n){return n.split(":")[0]}var vt=(()=>{class n extends M{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,a)=>{o._setSelected(r.indexOf(a.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 a=o;for(let C=0;C<a.length;C++){let z=a[C],de=this._getOptionValue(z.value);r.push(de)}}else{let a=i.options;for(let C=0;C<a.length;C++){let z=a[C];if(z.selected){let de=this._getOptionValue(z.value);r.push(de)}}}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=hn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([cn]),u]})}return n})(),Wn=(()=>{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($e(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue($e(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)(s(S),s(N),s(vt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function fn(n){return typeof n=="number"?n:parseInt(n,10)}function yt(n){return typeof n=="number"?n:parseFloat(n)}var ue=(()=>{class n{_validator=J;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):J,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[I]})}return n})(),gn={provide:m,useExisting:d(()=>pn),multi:!0},pn=(()=>{class n extends ue{max;inputName="max";normalizeInput=e=>yt(e);createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([gn]),u]})}return n})(),mn={provide:m,useExisting:d(()=>_n),multi:!0},_n=(()=>{class n extends ue{min;inputName="min";normalizeInput=e=>yt(e);createValidator=e=>ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([mn]),u]})}return n})(),vn={provide:m,useExisting:d(()=>yn),multi:!0};var yn=(()=>{class n extends ue{required;inputName="required";normalizeInput=fe;createValidator=e=>Xe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&k("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([vn]),u]})}return n})();var Cn={provide:m,useExisting:d(()=>Vn),multi:!0},Vn=(()=>{class n extends ue{maxlength;inputName="maxlength";normalizeInput=e=>fn(e);createValidator=e=>Ye(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[c([Cn]),u]})}return n})();var Ct=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({})}return n})();var qn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})(),zn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Me,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})();export{y as a,Dt as b,qe as c,m as d,ke as e,v as f,Tn as g,Bn as h,$ as i,Un as j,Ht as k,ct as l,qt as m,Ln as n,Zt as o,Kt as p,Qt as q,Le as r,tn as s,ft as t,gt as u,sn as v,ln as w,_t as x,$n as y,Wn as z,pn as A,_n as B,yn as C,Vn as D,qn as E,zn as F};
1
+ import{$a as u,$b as c,Db as _,Ma as xe,Pa as N,Qa as s,Rb as ce,W as Z,Xa as Y,Y as d,Ya as l,Z as Se,_ as X,a as f,aa as A,b as p,ca as R,eb as Pe,h as Fe,ib as Re,jb as k,jc as V,ka as Ne,kc as O,l as Ee,ma as Oe,oa as D,t as we,ta as w,tc as he,uc as fe,va as I,wa as g,ya as S,z as Ie,zc as ge}from"./chunk-RYEX2DR7.js";var We=(()=>{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)(s(N),s(S))};static \u0275dir=l({type:n})}return n})(),M=(()=>{class n extends We{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),y=new A(""),Vt={provide:y,useExisting:d(()=>Dt),multi:!0},Dt=(()=>{class n extends M{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Vt]),u]})}return n})(),bt={provide:y,useExisting:d(()=>qe),multi:!0};function At(){let n=ge()?ge().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Mt=new A(""),qe=(()=>{class n extends We{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!At())}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)(s(N),s(S),s(Mt,8))};static \u0275dir=l({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&&_("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([bt]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var m=new A(""),F=new A(""),Ft=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ke=class{static min(t){return ze(t)}static max(t){return Ze(t)}static required(t){return Xe(t)}static requiredTrue(t){return Et(t)}static email(t){return wt(t)}static minLength(t){return It(t)}static maxLength(t){return Ye(t)}static pattern(t){return St(t)}static nullValidator(t){return J()}static compose(t){return nt(t)}static composeAsync(t){return it(t)}};function ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Xe(n){return me(n.value)?{required:!0}:null}function Et(n){return n.value===!0?null:{required:!0}}function wt(n){return me(n.value)||Ft.test(n.value)?null:{email:!0}}function It(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Ye(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function St(n){if(!n)return J;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function J(n){return null}function Ke(n){return n!=null}function Je(n){return Pe(n)?Ee(n):n}function Qe(n){let t={};return n.forEach(e=>{t=e!=null?f(f({},t),e):t}),Object.keys(t).length===0?null:t}function et(n,t){return t.map(e=>e(n))}function Nt(n){return!n.validate}function tt(n){return n.map(t=>Nt(t)?t:e=>t.validate(e))}function nt(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){return Qe(et(e,t))}}function ve(n){return n!=null?nt(tt(n)):null}function it(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){let i=et(e,t).map(Je);return Ie(i).pipe(we(Qe))}}function ye(n){return n!=null?it(tt(n)):null}function je(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function rt(n){return n._rawValidators}function ot(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function Q(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ge(n,t){let e=pe(t);return pe(n).forEach(r=>{Q(e,r)||e.push(r)}),e}function Te(n,t){return pe(t).filter(e=>!Q(n,e))}var ee=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=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(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}},h=class extends ee{name;get formDirective(){return null}get path(){return null}},v=class extends ee{_parent=null;name=null;valueAccessor=null},te=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}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Tn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ce("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:[u]})}return n})(),Bn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(h,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ce("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)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var j="VALID",K="INVALID",x="PENDING",G="DISABLED",b=class{},ne=class extends b{value;source;constructor(t,e){super(),this.value=t,this.source=e}},B=class extends b{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},U=class extends b{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},P=class extends b{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ie=class extends b{source;constructor(t){super(),this.source=t}},H=class extends b{source;constructor(t){super(),this.source=t}};function Ce(n){return(ae(n)?n.validators:n)||null}function Ot(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(ae(t)?t.asyncValidators:n)||null}function xt(n){return Array.isArray(n)?ye(n):n||null}function ae(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function st(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new Z(1e3,"");if(!i[e])throw new Z(1001,"")}function at(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new Z(1002,"")})}var L=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=O(()=>this.statusReactive());statusReactive=w(void 0);get valid(){return this.status===j}get invalid(){return this.status===K}get pending(){return this.status==x}get disabled(){return this.status===G}get enabled(){return this.status!==G}errors;get pristine(){return V(this.pristineReactive)}set pristine(t){V(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=w(!0);get dirty(){return!this.pristine}get touched(){return V(this.touchedReactive)}set touched(t){V(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=w(!1);get untouched(){return!this.touched}_events=new Fe;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(Ge(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Te(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Te(t,this._rawAsyncValidators))}hasValidator(t){return Q(this._rawValidators,t)}hasAsyncValidator(t){return Q(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(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new U(!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;this._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 U(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!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 B(!0,i))}markAsPending(t={}){this.status=x;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new P(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(p(f({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=G,this.errors=null,this._forEachChild(r=>{r.disable(p(f({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,i)),this._events.next(new P(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(f({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(p(f({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(p(f({},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===j||this.status===x)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,e)),this._events.next(new P(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(p(f({},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()?G:j}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=x,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Je(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 P(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new D,this.statusChanges=new D}_calculateStatus(){return this._allControlsDisabled()?G:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(x)?x:this._anyControlsHaveStatus(K)?K:j}_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 B(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new U(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ae(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=Ot(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=xt(this._rawAsyncValidators)}},$=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){at(this,!0,t),Object.keys(t).forEach(i=>{st(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Un=$;var E=new A("",{factory:()=>q}),q="always";function le(n,t){return[...t.path,n]}function W(n,t,e=q){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Rt(n,t),jt(n,t),kt(n,t),Pt(n,t)}function re(n,t,e=!0){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function oe(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Pt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=rt(n);t.validator!==null?n.setValidators(je(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ot(n);t.asyncValidator!==null?n.setAsyncValidators(je(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();oe(t._rawValidators,r),oe(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=rt(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=ot(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return oe(t._rawValidators,i),oe(t._rawAsyncValidators,i),e}function Rt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&lt(n,t)})}function kt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&lt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function lt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function jt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function ut(n,t){n==null,De(n,t)}function Gt(n,t){return se(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Tt(n){return Object.getPrototypeOf(n.constructor)===M}function dt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===qe?e=o:Tt(o)?i=o:r=o}),r||i||e||null}function Bt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Ut={provide:h,useExisting:d(()=>Ht)},T=Promise.resolve(),Ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this.submittedReactive)}_submitted=O(()=>this.submittedReactive());submittedReactive=w(!1);_directives=new Set;form;ngSubmit=new D;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new $({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){T.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),W(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){T.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){T.then(()=>{let i=this._findContainer(e.path),r=new $({});ut(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){T.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){T.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),dt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([Ut]),u]})}return n})();function Be(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ue(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var ct=class extends L{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ae(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ue(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 H(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Be(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Be(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){Ue(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 Lt=n=>n instanceof ct,$t=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective?.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var Wt={provide:v,useExisting:d(()=>qt)},He=Promise.resolve(),qt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new ct;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new D;constructor(e,i,r,o,a,C){super(),this._changeDetectorRef=a,this.callSetDisabledState=C,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(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),be(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(){W(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){He.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&fe(i);He.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?le(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(s(h,9),s(m,10),s(F,10),s(y,10),s(he,8),s(E,8))};static \u0275dir=l({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([Wt]),u,I]})}return n})();var Ln=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),zt={provide:y,useExisting:d(()=>Zt),multi:!0},Zt=(()=>{class n extends M{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&_("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([zt]),u]})}return n})(),Xt={provide:y,useExisting:d(()=>Kt),multi:!0};var Yt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Kt=(()=>{class n extends M{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=R(E,{optional:!0})??q;constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o}ngOnInit(){this._control=this._injector.get(v),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(s(N),s(S),s(Yt),s(Ne))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[c([Xt]),u]})}return n})(),Jt={provide:y,useExisting:d(()=>Qt),multi:!0},Qt=(()=>{class n extends M{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Jt]),u]})}return n})(),Le=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i)}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){at(this,!1,t),t.forEach((i,r)=>{st(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};var ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=w(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(se(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let i=this.form.get(e.path);return W(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){re(e.control||null,e,!1),Bt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,i){this.form.get(e.path).setValue(i)}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,dt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(re(i||null,e),Lt(r)&&(W(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);ut(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&Gt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&se(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,features:[u,I]})}return n})();var Me=new A(""),en={provide:v,useExisting:d(()=>tn)},tn=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&re(i,this,!1),W(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&re(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(y,10),s(Me,8),s(E,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([en]),u,I]})}return n})(),nn={provide:h,useExisting:d(()=>ft)},ft=(()=>{class n extends $t{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){pt(this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[c([nn]),u]})}return n})(),rn={provide:h,useExisting:d(()=>gt)},gt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[c([rn]),u]})}return n})();function pt(n){return!(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var on={provide:v,useExisting:d(()=>sn)},sn=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,o)}ngOnChanges(e){this._added||this._setUpControl(),be(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10),s(y,10),s(Me,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([on]),u,I]})}return n})();var an={provide:h,useExisting:d(()=>ln)},ln=(()=>{class n extends ht{form=null;ngSubmit=new D;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([an]),u]})}return n})(),un={provide:y,useExisting:d(()=>_t),multi:!0};function mt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function dn(n){return n.split(":")[0]}var _t=(()=>{class n extends M{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=R(Re).injector;destroyRef=R(Oe);cdr=R(he);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,xe({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=mt(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=dn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([un]),u]})}return n})(),$n=(()=>{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(mt(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)(s(S),s(N),s(_t,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),cn={provide:y,useExisting:d(()=>vt),multi:!0};function $e(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function hn(n){return n.split(":")[0]}var vt=(()=>{class n extends M{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,a)=>{o._setSelected(r.indexOf(a.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 a=o;for(let C=0;C<a.length;C++){let z=a[C],de=this._getOptionValue(z.value);r.push(de)}}else{let a=i.options;for(let C=0;C<a.length;C++){let z=a[C];if(z.selected){let de=this._getOptionValue(z.value);r.push(de)}}}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=hn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([cn]),u]})}return n})(),Wn=(()=>{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($e(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue($e(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)(s(S),s(N),s(vt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function fn(n){return typeof n=="number"?n:parseInt(n,10)}function yt(n){return typeof n=="number"?n:parseFloat(n)}var ue=(()=>{class n{_validator=J;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):J,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[I]})}return n})(),gn={provide:m,useExisting:d(()=>pn),multi:!0},pn=(()=>{class n extends ue{max;inputName="max";normalizeInput=e=>yt(e);createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([gn]),u]})}return n})(),mn={provide:m,useExisting:d(()=>_n),multi:!0},_n=(()=>{class n extends ue{min;inputName="min";normalizeInput=e=>yt(e);createValidator=e=>ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([mn]),u]})}return n})(),vn={provide:m,useExisting:d(()=>yn),multi:!0};var yn=(()=>{class n extends ue{required;inputName="required";normalizeInput=fe;createValidator=e=>Xe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&k("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([vn]),u]})}return n})();var Cn={provide:m,useExisting:d(()=>Vn),multi:!0},Vn=(()=>{class n extends ue{maxlength;inputName="maxlength";normalizeInput=e=>fn(e);createValidator=e=>Ye(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[c([Cn]),u]})}return n})();var Ct=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({})}return n})();var qn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})(),zn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Me,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})();export{y as a,Dt as b,qe as c,m as d,ke as e,v as f,Tn as g,Bn as h,$ as i,Un as j,Ht as k,ct as l,qt as m,Ln as n,Zt as o,Kt as p,Qt as q,Le as r,tn as s,ft as t,gt as u,sn as v,ln as w,_t as x,$n as y,Wn as z,pn as A,_n as B,yn as C,Vn as D,qn as E,zn as F};
@@ -0,0 +1 @@
1
+ import{c as ne}from"./chunk-J6XN2QQO.js";import{c as De}from"./chunk-Q7GPLEGX.js";import{a as Ve}from"./chunk-TPZGV5NA.js";import{a as J,e as Z,h as Oe}from"./chunk-J3CZ3MOZ.js";import{a as Pe,b as Ie,c as Ne}from"./chunk-TIPIHEBG.js";import{a as z,c as X}from"./chunk-H7A4LOFH.js";import{o as te,t as Re}from"./chunk-GN7KRTUQ.js";import{a as ee,c as H}from"./chunk-RI2JQRSB.js";import{Ab as ce,Bb as y,Db as m,Fb as l,Ga as ve,Gc as ke,Jb as F,Jc as Te,Ka as s,Kb as R,Lb as D,Ma as j,Pb as G,Qb as K,Rb as E,S as q,Sb as de,Tb as c,Tc as Y,Ub as f,Vb as A,Wa as N,Wc as Ee,Z as ge,a as B,ab as Q,b as W,bc as be,ca as x,cc as ye,dc as we,ec as Se,ga as g,ha as C,hc as me,i as he,jb as le,kb as xe,kc as k,lb as u,ma as U,mb as h,oa as se,oc as Me,pa as Ce,pb as O,qb as P,rb as S,sb as a,t as $,ta as b,tb as r,ua as V,ub as w,va as fe}from"./chunk-RYEX2DR7.js";var ze=["caseItemTpl"],Le=o=>({node:o,depth:0}),$e=(o,t)=>({node:o,depth:t}),qe=(o,t)=>t.id;function He(o,t){o&1&&ce(0)}function Be(o,t){if(o&1&&Q(0,He,1,0,"ng-container",3),o&2){let e=t.$implicit;l();let n=G(4);S("ngTemplateOutlet",n)("ngTemplateOutletContext",be(2,Le,e))}}function We(o,t){if(o&1){let e=y();a(0,"button",9),m("click",function(i){g(e);let d=l().node,v=l();return C(v.toggleExpand(i,d.id))}),a(1,"span",10),c(2,"\u203A"),r()()}if(o&2){let e=l().node,n=l();S("title",n.isExpanded(e.id)?"Collapse":"Expand"),s(),E("case-tree-node__toggle-icon--open",n.isExpanded(e.id))}}function Ue(o,t){o&1&&ce(0)}function je(o,t){if(o&1&&Q(0,Ue,1,0,"ng-container",3),o&2){let e=t.$implicit,n=l(2).depth;l();let i=G(4);S("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,$e,e,n+1))}}function Qe(o,t){if(o&1&&O(0,je,1,5,"ng-container",null,qe),o&2){let e=l().node;P(e.children)}}function Ge(o,t){if(o&1){let e=y();a(0,"div",4)(1,"button",5),m("click",function(){let i=g(e).node,d=l();return C(d.onItemSelected(i.id))}),a(2,"span",6),u(3,We,3,3,"button",7),r(),a(4,"span",8),c(5),r()(),u(6,Qe,2,0),r()}if(o&2){let e=t.node,n=t.depth,i=l();K("--depth",n),s(),E("case-tree-node__row--active",e.id===i.activeCaseId),s(2),h(e.children.length?3:-1),s(2),f(e.name),s(),h(i.isExpanded(e.id)&&e.children.length?6:-1)}}var oe=class o{cases=[];activeCaseId=null;caseSelected=new se;createRequested=new se;caseItemTpl;rootItems=[];expandedIds=new Set;ngOnChanges(t){t.cases&&(this.rootItems=Ke(this.cases)),(t.cases||t.activeCaseId)&&this.autoExpandAncestors()}autoExpandAncestors(){if(!this.activeCaseId)return;let t=(e,n)=>{for(let i of e){if(i.id===n)return!0;if(i.children.length&&t(i.children,n))return this.expandedIds.add(i.id),!0}return!1};t(this.rootItems,this.activeCaseId)}isExpanded(t){return this.expandedIds.has(t)}toggleExpand(t,e){t.stopPropagation(),this.expandedIds.has(e)?this.expandedIds.delete(e):this.expandedIds.add(e)}onItemSelected(t){this.caseSelected.emit(t)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-drawer"]],viewQuery:function(e,n){if(e&1&&F(ze,7),e&2){let i;R(i=D())&&(n.caseItemTpl=i.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested"},features:[fe],decls:5,vars:3,consts:[["caseItemTpl",""],["caseRowTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"case-tree-node"],["type","button",1,"case-tree-node__row",3,"click"],[1,"case-tree-node__expand-slot"],["type","button",1,"case-tree-node__toggle",3,"title"],[1,"case-tree-node__name"],["type","button",1,"case-tree-node__toggle",3,"click","title"],[1,"case-tree-node__toggle-icon"]],template:function(e,n){if(e&1&&(a(0,"ds-entity-list",2),m("itemSelected",function(d){return n.onItemSelected(d)})("createRequested",function(){return n.onCreateRequested()}),r(),Q(1,Be,1,4,"ng-template",null,0,me)(3,Ge,7,7,"ng-template",null,1,me)),e&2){let i=G(2);S("items",n.rootItems)("itemTemplate",i)("showCreate",!0)}},dependencies:[Re,ke],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-tree-node[_ngcontent-%COMP%]{width:100%}.case-tree-node__row[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:.375rem .5rem;padding-left:calc(.5rem + var(--depth, 0) * 1.25rem);border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);border-radius:6px;gap:.375rem;transition:background .12s ease;box-sizing:border-box}.case-tree-node__row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-tree-node__row--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-tree-node__row--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-tree-node__expand-slot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;flex-shrink:0}.case-tree-node__toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:none;background:transparent;cursor:pointer;color:inherit;border-radius:3px;transition:background .1s ease}.case-tree-node__toggle[_ngcontent-%COMP%]:hover{background:#00000014}.case-tree-node__toggle-icon[_ngcontent-%COMP%]{display:inline-block;font-size:1.1rem;line-height:1;transition:transform .15s ease;transform:rotate(0)}.case-tree-node__toggle-icon--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.case-tree-node__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function Ke(o){let t=new Set(o.map(_=>_.id??"")),e=new Map(o.map(_=>[_.id??"",_.created??""])),n=_=>({id:_.id??"",name:_.title??_.id??"\u2014",children:[]}),i=new Map;for(let _ of o)i.set(_.id??"",n(_));let d=[];for(let _ of o){let p=i.get(_.id??""),T=_.parentCaseId;T&&t.has(T)?i.get(T).children.push(p):d.push(p)}let v=_=>_.sort((p,T)=>(e.get(T.id)??"")>(e.get(p.id)??"")?1:-1).map(p=>W(B({},p),{children:v(p.children)}));return v(d)}var L=class o{caseController=x(Z);cases=b([]);loadSubscription=null;loadCases(t){this.loadSubscription?.unsubscribe(),this.loadSubscription=this.caseController.listByParentCase(t).subscribe(e=>{this.cases.set(e),this.loadSubscription=null})}addCase(t){this.cases.update(e=>[t,...e])}updateCaseTitle(t,e){this.cases.update(n=>n.map(i=>i.id===t?W(B({},i),{title:e}):i))}static \u0275fac=function(e){return new(e||o)};static \u0275prov=ge({token:o,factory:o.\u0275fac,providedIn:"root"})};var Ye=["composerInput"],Xe=["messagesContainer"],Je=(o,t)=>t.phaseIndex;function Ze(o,t){o&1&&(a(0,"div",4)(1,"p"),c(2,"No messages yet."),r()())}function et(o,t){if(o&1&&(a(0,"div",18)(1,"span",21),c(2,"session context"),r(),a(3,"pre",22),c(4),we(5,"json"),r()()),o&2){let e=l(2).$implicit;s(4),f(Se(5,1,e.event.sessionContext))}}function tt(o,t){if(o&1&&(a(0,"div",17),u(1,et,6,3,"div",18),a(2,"span",19),c(3),r(),w(4,"div",20),r()),o&2){let e=l().$implicit,n=l(2);E("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),s(),h(n.showTechnical()&&e.event.sessionContext?1:-1),s(2),f(e.event.actor.displayName),s(),S("innerHTML",e.html,ve)}}function nt(o,t){if(o&1&&(a(0,"div",14)(1,"span",19),c(2),r(),a(3,"p",23),c(4),r()()),o&2){let e=l().$implicit,n=l(2);s(2),f(n.agentDisplayName()),s(2),f(e.text)}}function ot(o,t){if(o&1&&(a(0,"div",28),c(1),r()),o&2){let e=l(3).$implicit;s(),f(e.item.detail)}}function it(o,t){if(o&1){let e=y();a(0,"button",26),m("click",function(){g(e);let i=l(2).$implicit,d=l(2);return C(d.toggleTechnical(i.eventId))}),a(1,"span",25),c(2),r(),a(3,"span",27),c(4),r()(),u(5,ot,2,1,"div",28)}if(o&2){let e=l(2).$implicit,n=l(2);le("aria-expanded",n.isTechnicalExpanded(e.eventId)),s(2),f(e.item.label),s(2),f(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),s(),h(n.isTechnicalExpanded(e.eventId)?5:-1)}}function at(o,t){if(o&1&&(a(0,"span",25),c(1),r()),o&2){let e=l(2).$implicit;s(),f(e.item.label)}}function rt(o,t){if(o&1&&(a(0,"div",24),u(1,it,6,4)(2,at,2,1,"span",25),r()),o&2){let e=l().$implicit;E("case-chat__technical--warn",e.item.type==="WarnEvent")("case-chat__technical--error",e.item.type==="ErrorEvent"),s(),h(e.item.detail?1:2)}}function st(o,t){o&1&&c(0," \u23F3 ")}function lt(o,t){o&1&&c(0," \u2705 ")}function ct(o,t){o&1&&c(0," \u274C ")}function dt(o,t){if(o&1&&(a(0,"div",45)(1,"span",46),c(2,"Enrichment content"),r(),a(3,"pre"),c(4),r()()),o&2){let e=l().$implicit;s(4),f(e.enrichmentContent)}}function mt(o,t){if(o&1&&(a(0,"div",41)(1,"div",42)(2,"span",43),c(3),r(),a(4,"span",44),c(5),r()(),a(6,"div",45)(7,"span",46),c(8,"Prompt"),r(),a(9,"pre"),c(10),r()(),a(11,"div",45)(12,"span",46),c(13,"LLM output"),r(),a(14,"pre"),c(15),r()(),u(16,dt,5,1,"div",45),r()),o&2){let e=t.$implicit;E("case-chat__enrichment-phase--failed",!e.success),s(3),A("Phase ",e.phaseIndex),s(2),f(e.success?"\u2705":"\u274C"),s(5),f(e.prompt),s(5),f(e.llmOutput),s(),h(e.enrichmentContent?16:-1)}}function _t(o,t){if(o&1&&(a(0,"div",35)(1,"span",37),c(2,"Enrichment phases"),r(),O(3,mt,17,7,"div",40,Je),r()),o&2){let e=l(3).$implicit;s(3),P(e.call.enrichmentPhases)}}function pt(o,t){if(o&1&&(a(0,"div",36)(1,"span",37),c(2,"Payload"),r(),a(3,"pre"),c(4),r()()),o&2){let e=l(3).$implicit;s(4),f(e.call.args)}}function ut(o,t){o&1&&(a(0,"pre"),c(1),r()),o&2&&(s(),f(t))}function ht(o,t){o&1&&(a(0,"span",38),c(1,"Running\u2026"),r())}function gt(o,t){o&1&&(a(0,"span",39),c(1,"No output"),r())}function Ct(o,t){if(o&1&&(a(0,"div",34),u(1,_t,5,0,"div",35),u(2,pt,5,1,"div",36),a(3,"div",36)(4,"span",37),c(5,"Output"),r(),u(6,ut,2,1,"pre")(7,ht,2,0,"span",38)(8,gt,2,0,"span",39),r()()),o&2){let e,n=l(2).$implicit,i=l(2);s(),h(i.showTechnical()&&(n.call.enrichmentPhases!=null&&n.call.enrichmentPhases.length)?1:-1),s(),h(n.call.args?2:-1),s(4),h((e=i.extractToolOutput(n.call))?6:n.call.response?8:7,e)}}function ft(o,t){if(o&1){let e=y();a(0,"div",29)(1,"button",30),m("click",function(){g(e);let i=l().$implicit,d=l(2);return C(d.toggleToolCall(i.call.requestId))}),a(2,"span",31),u(3,st,1,0)(4,lt,1,0)(5,ct,1,0),r(),a(6,"span",32),c(7),r(),a(8,"span",33),c(9),r()(),u(10,Ct,9,3,"div",34),r()}if(o&2){let e=l().$implicit,n=l(2);E("case-chat__tool-call--pending",!e.call.response)("case-chat__tool-call--success",(e.call.response==null?null:e.call.response.success)===!0)("case-chat__tool-call--error",(e.call.response==null?null:e.call.response.success)===!1),s(),le("aria-expanded",n.isToolCallExpanded(e.call.requestId)),s(2),h(e.call.response?e.call.response.success?4:5:3),s(4),f(e.call.toolName),s(2),f(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),s(),h(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function vt(o,t){if(o&1&&u(0,tt,5,7,"div",13)(1,nt,5,2,"div",14)(2,rt,3,5,"div",15)(3,ft,11,11,"div",16),o&2){let e=t.$implicit;h(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function xt(o,t){if(o&1&&O(0,vt,4,1,null,null,xe().trackTimelineItem,!0),o&2){let e=l();P(e.timeline())}}function bt(o,t){o&1&&(a(0,"div",5),w(1,"span",47)(2,"span",47)(3,"span",47),r())}function yt(o,t){if(o&1){let e=y();a(0,"div",6)(1,"ds-icon-button",48),m("action",function(){g(e);let i=l();return C(i.onScrollToBottomClick())}),r()()}}function wt(o,t){if(o&1){let e=y();a(0,"ds-icon-button",49),m("action",function(){g(e);let i=l();return C(i.interrupt())}),r()}}function St(o,t){if(o&1){let e=y();a(0,"ds-icon-button",50),m("action",function(){g(e);let i=l();return C(i.submit())}),r()}if(o&2){let e=l();S("title",e.preferences.composerHint())("disabled",!e.canSend)}}var Mt=64,ae=class o{route=x(z);http=x(Y);zone=x(Ce);destroyRef=x(U);domSanitizer=x(Ee);config=x(J);preferences=x(ne);caseState=x(L);caseId=this.route.snapshot.queryParams.case;namespaceId=this.route.snapshot.queryParams.ns;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=k(()=>{let t=this.events();for(let e=t.length-1;e>=0;e--){let n=t[e];if(n){if(n.type==="AgentRunningEvent"||n.type==="AgentSelectedEvent"||n.type==="AgentFinishedEvent"){let i=n.agentName;if(i&&i.trim().length>0)return i}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;events=b([]);messageHtmlCache=new Map;inputValue=b("");isRunning=b(!1);isTerminal=b(!1);static SHOW_TECHNICAL_KEY="agentos.case-chat.showTechnical";showTechnical=b(localStorage.getItem(o.SHOW_TECHNICAL_KEY)==="true");showTechnicalOverride=Me(!1);streamingText=b("");collapsedTools=b(new Set);expandedTechnicals=b(new Set);isAtBottom=b(!0);scrollListenerCleanup=null;constructor(){V(()=>{this.showTechnical.set(this.showTechnicalOverride())}),V(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),V(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),j(()=>{this.attachScrollListener()})}baseTimeline=k(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let v of t)if(v.type==="ToolRequestEvent"){let _=v,p=_.toolRequestId??v.id,T=n.get(p);n.set(p,{requestId:p,toolName:_.toolName??"unknown",args:_.args??null,response:T?.response,enrichmentPhases:_.enrichmentPhases??null})}else if(v.type==="ToolResponseEvent"){let _=v,p=_.toolRequestId??v.id,T=n.get(p);n.set(p,{requestId:p,toolName:T?.toolName??_.toolName??"unknown",args:T?.args??null,response:_,enrichmentPhases:T?.enrichmentPhases??null})}let i=[],d=new Set;for(let v of t)if(v.type==="MessageEvent"){let _=v;i.push({kind:"message",event:_,html:this.messageHtmlCache.get(v.id)??""})}else if(v.type==="ToolRequestEvent"||v.type==="ToolResponseEvent"){let _=v.toolRequestId??v.id;d.has(_)||(d.add(_),i.push({kind:"tool",call:n.get(_)}))}else if(e){let _=this.toTechnicalItem(v);_&&i.push({kind:"technical",item:_,eventId:v.id})}return i});timeline=k(()=>{let t=this.baseTimeline(),e=this.streamingText();return e.trim().length===0?t:[...t,{kind:"streaming",text:e}]});trackTimelineItem(t,e){switch(e.kind){case"message":return e.event.id;case"tool":return e.call.requestId;case"technical":return e.eventId;case"streaming":return"streaming"}}get canSend(){return!!this.inputValue().trim()&&!this.isRunning()&&!this.isTerminal()}ngOnInit(){this.connectSse(),this.route.queryParams.pipe(ee(this.destroyRef)).subscribe(t=>{let e=t.case;e&&e!==this.caseId&&(this.caseId=e,this.reinitialise())})}ngOnDestroy(){this.eventSource?.close(),this.scrollListenerCleanup?.()}attachScrollListener(){let t=this.messagesContainer?.nativeElement;if(!t)return;let e=()=>{let n=t.scrollHeight-t.scrollTop-t.clientHeight;this.isAtBottom.set(n<=Mt)};t.addEventListener("scroll",e,{passive:!0}),this.scrollListenerCleanup=()=>t.removeEventListener("scroll",e)}scrollToBottom(){let t=this.messagesContainer?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}onScrollToBottomClick(){this.isAtBottom.set(!0),this.scrollToBottom()}connectSse(){let t=`${this.config.basePath}/api/cases/${this.caseId}/events`;console.log("[AgentOS SSE] connecting",{url:t,basePath:this.config.basePath,caseId:this.caseId,namespaceId:this.namespaceId,now:new Date().toISOString()}),this.eventSource=this.zone.runOutsideAngular(()=>new EventSource(t));let e=i=>{let d=performance.now(),v=i.type,_=i.data;console.log("[AgentOS SSE] frame received",{sseEventName:v,dataLength:_?.length??0,dataPreview:_?.slice(0,120),receivedAtMs:d});try{let p=JSON.parse(_);this.zone.run(()=>{let T=this.events().length;if(p.type==="MessageEvent"){let M=p,I=this.extractText(M);this.messageHtmlCache.has(p.id)||this.messageHtmlCache.set(p.id,this.renderMarkdown(I))}this.events.update(M=>M.some(I=>I.id===p.id)?M:[...M,p]);let Ae=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:v,eventType:p.type,eventId:p.id,beforeLen:T,afterLen:Ae,running:this.isRunning(),terminal:this.isTerminal()}),p.type==="TextChunkEvent"){let M=p.chunk;M&&this.streamingText.update(I=>I+M);return}if(p.type==="CaseUpdatedEvent"){let M=p;M.title&&this.caseState.updateCaseTitle(p.caseId,M.title);return}if(p.type==="CaseStatusEvent"){let M=p.status,I=M==="KILLED"||M==="ERROR";if(this.isTerminal.set(I),I)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let ue=M==="RUNNING";this.isRunning.set(ue),ue||this.streamingText.set("")}return}if(p.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(p){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:v,error:p,dataPreview:_?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","CaseUpdatedEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","ErrorEvent","WarnEvent","IntentionGeneratedEvent"];for(let i of n)console.log("[AgentOS SSE] addEventListener",i),this.eventSource.addEventListener(i,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=i=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:i.data?.length??0,dataPreview:i.data?.slice(0,120)})},this.eventSource.onerror=i=>{console.warn("[AgentOS SSE] connection error",{err:i,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}reinitialise(){this.eventSource?.close(),this.eventSource=null,this.events.set([]),this.messageHtmlCache.clear(),this.inputValue.set(""),this.isRunning.set(!1),this.isTerminal.set(!1),this.streamingText.set(""),this.collapsedTools.set(new Set),this.isAtBottom.set(!0),this.connectSse()}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.sendMessage(t)}sendMessage(t){this.isRunning.set(!0),this.streamingText.set(""),this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/messages`,{content:t,userId:"default-user"}).subscribe({error:e=>{console.error("[CaseChat] Failed to send message",e),this.isRunning.set(!1)}})}interrupt(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/interrupt`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to interrupt case",t)})}kill(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/kill`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to kill case",t)})}extractText(t){return t.content?.filter(e=>"content"in e).map(e=>e.content).join("")??""}extractToolOutput(t){if(!t.response)return null;let e=t.response.output;return e?e.content??null:null}toggleToolCall(t){this.collapsedTools.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isToolCallExpanded(t){return this.collapsedTools().has(t)}toggleShowTechnical(){this.showTechnical.update(t=>{let e=!t;return localStorage.setItem(o.SHOW_TECHNICAL_KEY,String(e)),e})}toggleTechnical(t){this.expandedTechnicals.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isTechnicalExpanded(t){return this.expandedTechnicals().has(t)}renderMarkdown(t){if(!t)return"";let e=Ie.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=Ne.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.domSanitizer.bypassSecurityTrustHtml(n)}buildMarkdownRenderer(){let t=new Pe,e=t.link.bind(t);return t.link=n=>{let i=e(n);return this.isExternalLink(n.href)&&(i=i.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),i},t}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(e){return!1}}toTechnicalItem(t){switch(t.type){case"WarnEvent":return{type:"WarnEvent",label:"\u26A0\uFE0F Warn",detail:t.message};case"ErrorEvent":return{type:"ErrorEvent",label:"\u274C Error",detail:t.message};case"CaseStatusEvent":return{type:"CaseStatusEvent",label:`\u{1F7E1} Status: ${t.status}`};case"AgentRunningEvent":return{type:"AgentRunningEvent",label:`\u25B6\uFE0F Agent running: ${t.agentName}`};case"AgentFinishedEvent":return{type:"AgentFinishedEvent",label:`\u2705 Agent finished: ${t.agentName}`};case"AgentSelectedEvent":return{type:"AgentSelectedEvent",label:`\u{1F3AF} Agent selected: ${t.agentName}`};case"IntentionGeneratedEvent":{let e=t;return{type:"IntentionGeneratedEvent",label:`\u{1F9E0} Intention \u2192 ${e.toolName}`,detail:e.intention}}default:return null}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&F(Ye,5)(Xe,5),e&2){let i;R(i=D())&&(n.composerInput=i.first),R(i=D())&&(n.messagesContainer=i.first)}},inputs:{showTechnicalOverride:[1,"showTechnicalOverride"]},decls:14,vars:7,consts:[["messagesContainer",""],["composerInput",""],[1,"case-chat"],[1,"case-chat__messages"],[1,"case-chat__empty"],[1,"case-chat__thinking"],[1,"case-chat__scroll-anchor"],[1,"case-chat__composer"],["placeholder","Reply\u2026","rows","3",1,"case-chat__input",3,"input","keydown","value","disabled"],[1,"case-chat__actions"],["icon","stop","variant","danger","title","Interrupt"],["icon","send","variant","primary",3,"title","disabled"],["icon","cancel","variant","danger","title","Kill",3,"action","disabled"],[1,"case-chat__message",3,"case-chat__message--user","case-chat__message--agent"],[1,"case-chat__message","case-chat__message--agent","case-chat__message--streaming"],[1,"case-chat__technical",3,"case-chat__technical--warn","case-chat__technical--error"],[1,"case-chat__tool-call",3,"case-chat__tool-call--pending","case-chat__tool-call--success","case-chat__tool-call--error"],[1,"case-chat__message"],[1,"case-chat__session-context"],[1,"case-chat__message-author"],[1,"case-chat__message-text","case-chat__message-text--markdown",3,"innerHTML"],[1,"case-chat__session-context-label"],[1,"case-chat__session-context-body"],[1,"case-chat__message-text"],[1,"case-chat__technical"],[1,"case-chat__technical-label"],["type","button",1,"case-chat__technical-header",3,"click"],[1,"case-chat__technical-chevron"],[1,"case-chat__technical-body"],[1,"case-chat__tool-call"],["type","button",1,"case-chat__tool-call-header",3,"click"],[1,"case-chat__tool-call-icon"],[1,"case-chat__tool-call-name"],[1,"case-chat__tool-call-chevron"],[1,"case-chat__tool-call-output"],[1,"case-chat__tool-call-section","case-chat__enrichment-section"],[1,"case-chat__tool-call-section"],[1,"case-chat__tool-call-label"],[1,"case-chat__tool-call-pending"],[1,"case-chat__tool-call-empty"],[1,"case-chat__enrichment-phase",3,"case-chat__enrichment-phase--failed"],[1,"case-chat__enrichment-phase"],[1,"case-chat__enrichment-phase-header"],[1,"case-chat__enrichment-phase-index"],[1,"case-chat__enrichment-phase-status"],[1,"case-chat__enrichment-phase-row"],[1,"case-chat__enrichment-phase-label"],[1,"thinking-dot"],["icon","keyboard_arrow_down","variant","default","title","Scroll to bottom",3,"action"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary",3,"action","title","disabled"]],template:function(e,n){e&1&&(a(0,"div",2)(1,"div",3,0),u(3,Ze,3,0,"div",4)(4,xt,2,0),u(5,bt,4,0,"div",5),r(),u(6,yt,2,0,"div",6),a(7,"div",7)(8,"textarea",8,1),m("input",function(d){return n.onInput(d)})("keydown",function(d){return n.onKeydown(d)}),r(),a(10,"div",9),u(11,wt,1,0,"ds-icon-button",10)(12,St,1,2,"ds-icon-button",11),a(13,"ds-icon-button",12),m("action",function(){return n.kill()}),r()()()()),e&2&&(s(3),h(n.timeline().length===0?3:4),s(2),h(n.isRunning()?5:-1),s(),h(n.isAtBottom()?-1:6),s(2),S("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),s(3),h(n.isRunning()?11:12),s(2),S("disabled",n.isTerminal()))},dependencies:[te,Te],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.case-chat[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;max-width:800px;width:100%;margin:0 auto;padding:1.5rem;gap:1rem;position:relative}.case-chat__messages[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding-bottom:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--color-border, rgba(0, 0, 0, .15)) transparent}.case-chat__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1}.case-chat__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-chat__tool-calls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;margin-top:.25rem}.case-chat__tool-call[_ngcontent-%COMP%]{flex-shrink:0;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));font-size:.8rem;overflow:hidden;transition:border-color .2s ease}.case-chat__tool-call--pending[_ngcontent-%COMP%]{border-color:var(--color-warning, #f5a623);opacity:.8}.case-chat__tool-call--success[_ngcontent-%COMP%]{border-color:var(--color-success, #34c759)}.case-chat__tool-call--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.case-chat__tool-call-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .6rem;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--color-text, #1d1d1f);font-family:inherit;font-size:.8rem}.case-chat__tool-call-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__tool-call-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem}.case-chat__tool-call-name[_ngcontent-%COMP%]{font-weight:600;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);color:var(--color-primary, #0071e3);flex-shrink:0}.case-chat__tool-call-args[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-chat__tool-call-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__tool-call-output[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));display:flex;flex-direction:column}.case-chat__tool-call-section[_ngcontent-%COMP%]{padding:.4rem .6rem .5rem}.case-chat__tool-call-section[_ngcontent-%COMP%] + .case-chat__tool-call-section[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__tool-call-section[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.25rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:200px;overflow-y:auto}.case-chat__tool-call-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-section[_ngcontent-%COMP%]{background:var(--color-surface-secondary, rgba(0, 0, 0, .02))}.case-chat__enrichment-phase[_ngcontent-%COMP%]{margin-top:.35rem;border-radius:4px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .6));overflow:hidden}.case-chat__enrichment-phase--failed[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30);background:#ff3b300a}.case-chat__enrichment-phase-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.2rem .5rem;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__enrichment-phase-index[_ngcontent-%COMP%]{font-weight:600;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-phase-status[_ngcontent-%COMP%]{font-size:.7rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%]{padding:.25rem .5rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] + .case-chat__enrichment-phase-row[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .04))}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.15rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.7rem;color:var(--color-text, #1d1d1f);max-height:150px;overflow-y:auto}.case-chat__enrichment-phase-label[_ngcontent-%COMP%]{display:block;font-size:.6rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__tool-call-pending[_ngcontent-%COMP%], .case-chat__tool-call-empty[_ngcontent-%COMP%]{display:block;margin-top:.25rem;color:var(--color-text-secondary, #6e6e73);font-style:italic;font-size:.75rem}.case-chat__technical[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-border, rgba(0, 0, 0, .12));font-size:.78rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__technical--warn[_ngcontent-%COMP%]{border-left-color:var(--color-warning, #f5a623);background:#f5a6230f;color:var(--color-text, #1d1d1f)}.case-chat__technical--error[_ngcontent-%COMP%]{border-left-color:var(--color-error, #ff3b30);background:#ff3b300f;color:var(--color-text, #1d1d1f)}.case-chat__technical-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.2rem .75rem;background:transparent;border:none;cursor:pointer;text-align:left;color:inherit;font-family:inherit;font-size:inherit}.case-chat__technical-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__technical-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.case-chat__technical-label[_ngcontent-%COMP%]:only-child{display:block;padding:.2rem .75rem}.case-chat__technical-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__technical-body[_ngcontent-%COMP%]{padding:.3rem .75rem .5rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.5;color:var(--color-text, #1d1d1f)}.case-chat__session-context[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-primary, #0071e3);padding:.25rem .75rem .4rem;margin-bottom:.25rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__session-context-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary, #0071e3);margin-bottom:.2rem}.case-chat__session-context-body[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:160px;overflow-y:auto}.case-chat__message[_ngcontent-%COMP%]{flex-shrink:0}.case-chat__thinking[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:.3rem;padding:.75rem 1rem;align-self:flex-start}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5em}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.case-chat__message-text--markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.25em 0 .5em;padding-left:1.4em}.case-chat__message-text--markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.2em}.case-chat__message-text--markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.85em;background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:3px;padding:.1em .35em}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:6px;padding:.6em .8em;overflow-x:auto;margin:.4em 0}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;padding:0;font-size:.8rem}.case-chat__message-text--markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.4em 0;padding-left:.8em;border-left:3px solid var(--color-border, rgba(0, 0, 0, .15));color:var(--color-text-secondary, #6e6e73)}.case-chat__message-text--markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #0071e3);text-decoration:underline}.case-chat__message-text--markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:.5em 0 .25em;font-size:1em;font-weight:600}.case-chat__message-text--markdown[_ngcontent-%COMP%] .external-link-icon[_ngcontent-%COMP%]{font-size:.75em;margin-left:.15em;vertical-align:super}.case-chat__message--streaming[_ngcontent-%COMP%]{opacity:.95}.case-chat__scroll-anchor[_ngcontent-%COMP%]{position:absolute;bottom:calc(2rem + 80px);left:50%;transform:translate(-50%);z-index:10;background:var(--glass-bg, rgba(255, 255, 255, .88));border:1px solid var(--glass-border, rgba(255, 255, 255, .3));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:50%;box-shadow:0 2px 12px var(--color-shadow, rgba(0, 0, 0, .12));animation:_ngcontent-%COMP%_scroll-anchor-in .15s ease}.case-chat__composer[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:flex-end;gap:.5rem;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;padding:.5rem .5rem .5rem 1rem}.case-chat__input[_ngcontent-%COMP%]{flex:1;resize:none;padding:.5rem 0;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;min-height:40px}.case-chat__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-chat__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-chat__actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.thinking-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:var(--color-text-secondary, #6e6e73);animation:_ngcontent-%COMP%_thinking-bounce 1.2s ease-in-out infinite}.thinking-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.thinking-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes _ngcontent-%COMP%_scroll-anchor-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}']})};var kt=["composerInput"],re=class o{http=x(Y);router=x(X);route=x(z);config=x(J);caseState=x(L);destroyRef=x(U);preferences=x(ne);composerInput;namespaceId=this.route.snapshot.queryParams.ns;inputValue=b("");isCreating=b(!1);constructor(){j(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(q(e=>(this.caseState.addCase(e),this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe($(()=>e)))),ee(this.destroyRef)).subscribe({next:e=>{this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e.id??""}})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-home"]],viewQuery:function(e,n){if(e&1&&F(kt,5),e&2){let i;R(i=D())&&(n.composerInput=i.first)}},decls:11,vars:4,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case",3,"action","disabled"]],template:function(e,n){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),c(3,"What can I help you with?"),r(),a(4,"div",4)(5,"textarea",5,0),m("input",function(d){return n.onInput(d)})("keydown",function(d){return n.onKeydown(d)}),r(),a(7,"div",6)(8,"span",7),c(9),r(),a(10,"ds-icon-button",8),m("action",function(){return n.submit()}),r()()()()()),e&2&&(s(5),S("value",n.inputValue())("disabled",n.isCreating()),s(4),f(n.preferences.composerHint()),s(),S("disabled",!n.canSend))},dependencies:[te],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px var(--color-shadow, rgba(0, 0, 0, .07));overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};var pe=(o,t)=>t.id;function Tt(o,t){o&1&&(a(0,"span"),c(1,"\u2713"),r())}function Et(o,t){if(o&1){let e=y();a(0,"button",34),m("click",function(){let i=g(e).$implicit,d=l(2);return C(d.onNamespaceSelected(i))}),w(1,"span",35),a(2,"span",36),c(3),r(),u(4,Tt,2,0,"span"),r()}if(o&2){let e,n,i=t.$implicit,d=l(2);E("case-shell__ns-item--active",i.id===((e=d.selectedNamespace())==null?null:e.id)),s(3),f(i.name),s(),h(i.id===((n=d.selectedNamespace())==null?null:n.id)?4:-1)}}function Ot(o,t){if(o&1){let e=y();a(0,"div",31),m("click",function(i){g(e);let d=l();return C(d.closeNsMenu(i))})("keyup.escape",function(i){g(e);let d=l();return C(d.closeNsMenu(i))}),r(),a(1,"div",32),O(2,Et,5,4,"button",33,pe),r()}if(o&2){let e=l();s(2),P(e.namespaces())}}function Pt(o,t){if(o&1){let e=y();a(0,"button",39),m("click",function(){g(e);let i=l(2);return C(i.onMenuNavigate("/agentos/admin"))}),c(1," \u2699\uFE0F Admin "),r()}}function It(o,t){o&1&&c(0," \u2600\uFE0F Light mode ")}function Nt(o,t){o&1&&c(0," \u{1F319} Dark mode ")}function Rt(o,t){if(o&1){let e=y();a(0,"div",37),m("click",function(i){g(e);let d=l();return C(d.closeMenu(i))})("keyup.escape",function(i){g(e);let d=l();return C(d.closeMenu(i))}),r(),a(1,"div",38)(2,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/user"))}),c(3,"\u{1F464} User"),r(),u(4,Pt,2,0,"button",40),w(5,"div",41),a(6,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/namespaces"))}),c(7," \u{1F310} Namespaces "),r(),w(8,"div",41),a(9,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleTheme())}),u(10,It,1,0)(11,Nt,1,0),r(),a(12,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleLogs())}),c(13," </> Technical logs "),r()()}if(o&2){let e=l();s(4),h(e.isAdmin()?4:-1),s(6),h(e.isDark()?10:11),s(2),E("case-shell__menu-item--active",e.showTechnical())}}function Dt(o,t){if(o&1){let e=y();a(0,"div",45),m("click",function(){g(e);let i=l().$implicit,d=l(2);return C(d.onMobileCaseSelect(i.id??""))})("keyup.enter",function(){g(e);let i=l().$implicit,d=l(2);return C(d.onMobileCaseSelect(i.id??""))}),w(1,"span",13),a(2,"span",14),c(3),r(),a(4,"span",15),c(5),r()()}if(o&2){let e=l().$implicit,n=l(2);s(),de("case-shell__mobile-dot--"+n.deriveMobileStatus(e.status)),s(2),f(e.title??e.id),s(2),f(e.status.toLowerCase())}}function Vt(o,t){if(o&1&&u(0,Dt,6,4,"div",44),o&2){let e=t.$implicit,n=l(2);h(e.id!==n.activeCaseId()?0:-1)}}function Ft(o,t){if(o&1){let e=y();a(0,"div",16)(1,"div",42),m("click",function(){g(e);let i=l();return C(i.onMobileCreateCase())})("keyup.enter",function(){g(e);let i=l();return C(i.onMobileCreateCase())}),a(2,"span",43),c(3,"+"),r(),a(4,"span",14),c(5,"New case"),r()(),O(6,Vt,1,1,null,null,pe),r()}if(o&2){let e=l();s(6),P(e.cases())}}function At(o,t){if(o&1&&c(0),o&2){let e=l();A(" ",e.userInitials()," ")}}function zt(o,t){o&1&&c(0," \u2022\u2022\u2022 ")}function Lt(o,t){if(o&1){let e=y();a(0,"button",39),m("click",function(){g(e);let i=l(2);return C(i.onMenuNavigate("/agentos/admin"))}),c(1," \u2699\uFE0F Admin "),r()}}function $t(o,t){o&1&&c(0," \u2600\uFE0F Light mode ")}function qt(o,t){o&1&&c(0," \u{1F319} Dark mode ")}function Ht(o,t){if(o&1){let e=y();a(0,"div",37),m("click",function(i){g(e);let d=l();return C(d.closeMenu(i))})("keyup.escape",function(i){g(e);let d=l();return C(d.closeMenu(i))}),r(),a(1,"div",46)(2,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/user"))}),c(3," \u{1F464} User "),r(),u(4,Lt,2,0,"button",40),w(5,"div",41),a(6,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuNavigate("/agentos/namespaces"))}),c(7," \u{1F310} Namespaces "),r(),w(8,"div",41),a(9,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleTheme())}),u(10,$t,1,0)(11,qt,1,0),r(),a(12,"button",39),m("click",function(){g(e);let i=l();return C(i.onMenuToggleLogs())}),c(13," </> Technical logs "),r()()}if(o&2){let e=l();s(4),h(e.isAdmin()?4:-1),s(6),h(e.isDark()?10:11),s(2),E("case-shell__menu-item--active",e.showTechnical())}}function Bt(o,t){o&1&&(a(0,"span"),c(1,"\u2713"),r())}function Wt(o,t){if(o&1){let e=y();a(0,"button",34),m("click",function(){let i=g(e).$implicit,d=l(3);return C(d.onNamespaceSelected(i))}),w(1,"span",35),a(2,"span",36),c(3),r(),u(4,Bt,2,0,"span"),r()}if(o&2){let e,n,i=t.$implicit,d=l(3);E("case-shell__ns-item--active",i.id===((e=d.selectedNamespace())==null?null:e.id)),s(3),f(i.name),s(),h(i.id===((n=d.selectedNamespace())==null?null:n.id)?4:-1)}}function Ut(o,t){if(o&1&&(a(0,"div",50),O(1,Wt,5,4,"button",33,pe),r()),o&2){let e=l(2);s(),P(e.namespaces())}}function jt(o,t){if(o&1){let e=y();a(0,"div",24)(1,"button",47),m("click",function(){g(e);let i=l();return C(i.toggleNsMenu())}),w(2,"span",35),a(3,"span",48),c(4),r(),a(5,"span",49),c(6,"\u25BE"),r()(),u(7,Ut,3,0,"div",50),r()}if(o&2){let e,n=l();s(4),f(((e=n.selectedNamespace())==null?null:e.name)??"Select namespace"),s(3),h(n.nsMenuOpen()?7:-1)}}function Qt(o,t){if(o&1&&(a(0,"span",25),c(1),r()),o&2){let e,n=l();s(),f((e=n.selectedNamespace())==null?null:e.name)}}function Gt(o,t){if(o&1&&w(0,"agentos-case-chat",30),o&2){let e=l();S("showTechnicalOverride",e.showTechnical())}}function Kt(o,t){o&1&&w(0,"agentos-case-home")}var Fe=class o{router=x(X);route=x(z);caseController=x(Z);namespaceController=x(Oe);themePort=x(De);userState=x(Ve);isAdmin=k(()=>this.userState.currentUser()?.isAdmin===!0);nsMenuOpen=b(!1);sidebarWidth=b(300);isDark=k(()=>{let t=this.themePort.theme();return t==="dark"?!0:t==="light"?!1:typeof document<"u"&&document.documentElement.hasAttribute("data-theme")});showTechnical=b(!1);showNsPicker=k(()=>this.isAdmin()||this.namespaces().length>1);menuOpen=b(!1);mobileSwitcherOpen=b(!1);namespaceId$=this.route.queryParams.pipe($(t=>t.ns??null));_namespaceIdRaw=H(this.namespaceId$);namespaceId=k(()=>this._namespaceIdRaw()??null);_activeCaseIdRaw=H(this.route.queryParams.pipe($(t=>t.case??null)));activeCaseId=k(()=>this._activeCaseIdRaw()??null);refresh$=new he(void 0);cases$=this.namespaceId$.pipe(q(t=>t?this.refresh$.pipe(q(()=>this.caseController.listByParentCase(t))):[[]]));cases=H(this.cases$,{initialValue:[]});namespaces=H(this.namespaceController.listAllNamespace(),{initialValue:[]});selectedNamespace=b(null);userInitials=k(()=>{let t=this.userState.currentUser();if(!t)return"";let e=t.firstname?.[0]??"",n=t.lastname?.[0]??"";return(e+n).toUpperCase()||t.email?.[0]?.toUpperCase()||""});constructor(){V(()=>{let t=this.namespaces(),e=this.namespaceId();if(t.length)if(e){let n=t.find(i=>i.id===e);this.selectedNamespace.set(n??t[0]??null)}else{let n=t[0];n?.id&&this.router.navigate(["/agentos/home"],{queryParams:{ns:n.id},replaceUrl:!0})}})}toggleNsMenu(t){t?.stopPropagation(),t?.preventDefault(),this.nsMenuOpen.update(e=>!e)}closeNsMenu(t){t.stopPropagation(),this.nsMenuOpen.set(!1)}onNamespaceSelected(t){this.selectedNamespace.set(t),this.nsMenuOpen.set(!1),this.router.navigate(["/agentos/home"],{queryParams:{ns:t.id}})}onCaseSelected(t){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId(),case:t}})}onCreateRequested(){this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId()}})}navigateHome(){this.router.navigate(["/agentos/home"])}navigateToNamespaces(){this.router.navigate(["/agentos/namespaces"])}navigateToAdmin(){this.router.navigate(["/agentos/admin"])}navigateToProfile(){this.router.navigate(["/agentos/user"])}toggleTheme(){let t=this.isDark()?"light":"dark";this.themePort.setTheme(t)}toggleMenu(t){t?.stopPropagation(),t?.preventDefault(),this.menuOpen.update(e=>!e)}closeMenu(t){t.stopPropagation(),this.menuOpen.set(!1)}onMenuNavigate(t){this.menuOpen.set(!1),this.router.navigate([t])}onMenuToggleTheme(){this.menuOpen.set(!1),this.toggleTheme()}onMenuToggleLogs(){this.menuOpen.set(!1),this.showTechnical.update(t=>!t)}toggleMobileSwitcher(){this.mobileSwitcherOpen.update(t=>!t)}onMobileCaseSelect(t){this.mobileSwitcherOpen.set(!1),this.onCaseSelected(t)}onMobileCreateCase(){this.mobileSwitcherOpen.set(!1),this.onCreateRequested()}activeCaseTitle=k(()=>{let t=this.activeCaseId();return t?this.cases().find(n=>n.id===t)?.title??t:"New case"});activeCaseStatus=k(()=>{let t=this.activeCaseId();if(!t)return"idle";let e=this.cases().find(n=>n.id===t);return this.deriveMobileStatus(e?.status)});activeCaseStatusLabel=k(()=>{let t=this.activeCaseId();return t?this.cases().find(n=>n.id===t)?.status?.toLowerCase()??"":""});deriveMobileStatus(t){switch(t){case"RUNNING":return"run";case"KILLED":return"killed";case"ERROR":return"error";default:return"idle"}}onResizeStart(t){t.preventDefault();let e=t.clientX,n=this.sidebarWidth(),i=v=>{let _=v.clientX-e,p=Math.max(200,Math.min(500,n+_));this.sidebarWidth.set(p)},d=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",d)}refreshCases(){this.refresh$.next()}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=N({type:o,selectors:[["agentos-case-shell"]],decls:50,vars:17,consts:[[1,"case-shell"],[1,"case-shell__mobile-topbar"],[1,"case-shell__mobile-brand"],["type","button","title","Home",1,"case-shell__brand","case-shell__brand--mobile",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"case-shell__logo-img"],[1,"case-shell__logo-text"],[1,"case-shell__mobile-sep"],[1,"case-shell__mobile-ns-wrap"],["type","button",1,"case-shell__mobile-ns",3,"click"],[1,"case-shell__mobile-chevron"],["tabindex","0","role","button","aria-label","User menu",1,"case-shell__mobile-avatar",3,"click","keyup.enter"],[1,"case-shell__mobile-switcher"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-trigger",3,"click","keyup.enter"],[1,"case-shell__mobile-dot"],[1,"case-shell__mobile-case-title"],[1,"case-shell__mobile-case-status"],[1,"case-shell__mobile-switcher-list"],[1,"case-shell__sidebar"],[1,"case-shell__sb-top"],["type","button","title","Home",1,"case-shell__brand",3,"click"],[1,"case-shell__user-menu"],["type","button","title","Menu",1,"case-shell__user-btn",3,"click"],[1,"case-shell__ns-wrap"],[1,"case-shell__ns-label"],[1,"case-shell__ns-picker"],[1,"case-shell__ns-name-static"],[1,"case-shell__cases-scroll"],[3,"caseSelected","createRequested","cases","activeCaseId"],["role","separator","tabindex","-1","aria-label","Resize sidebar",1,"case-shell__resize-handle",3,"mousedown"],[1,"case-shell__main"],[3,"showTechnicalOverride"],["role","presentation","tabindex","-1",1,"case-shell__ns-backdrop",3,"click","keyup.escape"],[1,"case-shell__ns-menu","case-shell__ns-menu--mobile"],[1,"case-shell__ns-item",3,"case-shell__ns-item--active"],[1,"case-shell__ns-item",3,"click"],[1,"case-shell__ns-dot"],[1,"case-shell__ns-item-name"],["role","presentation","tabindex","-1",1,"case-shell__menu-backdrop",3,"click","keyup.escape"],[1,"case-shell__menu-overlay","case-shell__menu-overlay--mobile"],["type","button",1,"case-shell__menu-item",3,"click"],["type","button",1,"case-shell__menu-item"],[1,"case-shell__menu-separator"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-item","case-shell__mobile-switcher-item--new",3,"click","keyup.enter"],[1,"case-shell__mobile-new-icon"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-item"],["tabindex","0","role","button",1,"case-shell__mobile-switcher-item",3,"click","keyup.enter"],[1,"case-shell__menu-overlay"],[1,"case-shell__ns-trigger",3,"click"],[1,"case-shell__ns-name"],[1,"case-shell__ns-chevron"],[1,"case-shell__ns-menu"]],template:function(e,n){if(e&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),m("click",function(){return n.navigateHome()}),w(4,"img",4),a(5,"span",5),c(6,"Coday"),r()(),a(7,"span",6),c(8,"/"),r(),a(9,"div",7)(10,"button",8),m("click",function(d){return n.toggleNsMenu(d)}),c(11),a(12,"span",9),c(13,"\u25BE"),r()(),u(14,Ot,4,0),r()(),a(15,"div",10),m("click",function(d){return n.toggleMenu(d)})("keyup.enter",function(){return n.toggleMenu()}),c(16),r(),u(17,Rt,14,4),r(),a(18,"div",11)(19,"div",12),m("click",function(){return n.toggleMobileSwitcher()})("keyup.enter",function(){return n.toggleMobileSwitcher()}),w(20,"span",13),a(21,"span",14),c(22),r(),a(23,"span",15),c(24),r(),a(25,"span",9),c(26,"\u2304"),r()(),u(27,Ft,8,0,"div",16),r(),a(28,"aside",17)(29,"div",18)(30,"button",19),m("click",function(){return n.navigateHome()}),w(31,"img",4),a(32,"span",5),c(33,"Coday"),r()(),a(34,"div",20)(35,"button",21),m("click",function(d){return n.toggleMenu(d)}),u(36,At,1,1)(37,zt,1,0),r(),u(38,Ht,14,4),r()(),a(39,"div",22)(40,"div",23),c(41,"Namespace"),r(),u(42,jt,8,2,"div",24)(43,Qt,2,1,"span",25),r(),a(44,"div",26)(45,"agentos-case-drawer",27),m("caseSelected",function(d){return n.onCaseSelected(d)})("createRequested",function(){return n.onCreateRequested()}),r()()(),a(46,"div",28),m("mousedown",function(d){return n.onResizeStart(d)}),r(),a(47,"main",29),u(48,Gt,1,1,"agentos-case-chat",30)(49,Kt,1,0,"agentos-case-home"),r()()),e&2){let i;s(11),A(" ",((i=n.selectedNamespace())==null?null:i.name)??""),s(3),h(n.nsMenuOpen()?14:-1),s(2),A(" ",n.userInitials()||"\xB7\xB7\xB7"," "),s(),h(n.menuOpen()?17:-1),s(3),de("case-shell__mobile-dot--"+n.activeCaseStatus()),s(2),f(n.activeCaseTitle()),s(2),f(n.activeCaseStatusLabel()),s(3),h(n.mobileSwitcherOpen()?27:-1),s(),K("width",n.sidebarWidth(),"px"),s(8),h(n.userInitials()?36:37),s(2),h(n.menuOpen()?38:-1),s(4),h(n.showNsPicker()?42:43),s(3),S("cases",n.cases())("activeCaseId",n.activeCaseId()),s(3),h(n.activeCaseId()?48:49)}},dependencies:[oe,ae,re],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;height:100%;overflow:hidden}.case-shell__sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;border-right:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg, #f4f3ef);flex-shrink:0}.case-shell__sb-top[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 12px 6px;flex-shrink:0}.case-shell__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:8px;border:none;background:transparent;cursor:pointer;transition:background .14s}.case-shell__brand[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.case-shell__logo-img[_ngcontent-%COMP%]{width:24px;height:24px;border-radius:6px;object-fit:contain}.case-shell__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:800;letter-spacing:-.02em;color:var(--color-text, #1b1916);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__user-menu[_ngcontent-%COMP%]{position:relative;flex-shrink:0}.case-shell__user-btn[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50%;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:color-mix(in srgb,var(--color-primary, #016b71) 15%,transparent);cursor:pointer;display:grid;place-items:center;font-size:.7rem;font-weight:700;letter-spacing:.02em;color:var(--color-primary, #016b71);transition:all .14s}.case-shell__user-btn[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-primary, #016b71) 25%,transparent)}.case-shell__menu-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:199}.case-shell__menu-overlay[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 6px);right:0;min-width:180px;background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:200;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.case-shell__menu-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;text-align:left;transition:all .13s}.case-shell__menu-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.case-shell__menu-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.case-shell__menu-separator[_ngcontent-%COMP%]{height:1px;background:var(--color-border, rgba(0, 0, 0, .09));margin:4px 6px}.case-shell__resize-handle[_ngcontent-%COMP%]{width:4px;flex-shrink:0;cursor:col-resize;background:var(--color-border, rgba(0, 0, 0, .09));transition:background .15s;position:relative;z-index:10}.case-shell__resize-handle[_ngcontent-%COMP%]:hover, .case-shell__resize-handle[_ngcontent-%COMP%]:active{background:var(--color-primary, #016b71)}.case-shell__ns-wrap[_ngcontent-%COMP%]{padding:12px 12px 6px;position:relative}.case-shell__ns-label[_ngcontent-%COMP%]{padding:0 2px 7px;font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-tertiary, #5a5449)}.case-shell__ns-picker[_ngcontent-%COMP%]{position:relative}.case-shell__ns-trigger[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .09));background:var(--color-bg-secondary, #faf9f7);cursor:pointer;color:var(--color-text, #1b1916);transition:all .15s;font:inherit;font-size:.82rem;font-weight:700}.case-shell__ns-trigger[_ngcontent-%COMP%]:hover{border-color:var(--color-border-light, rgba(0, 0, 0, .15))}.case-shell__ns-dot[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%;background:var(--color-primary, #5aadb5);flex-shrink:0}.case-shell__ns-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__ns-chevron[_ngcontent-%COMP%]{color:var(--color-text-secondary, #968f85);font-size:.75rem}.case-shell__ns-menu[_ngcontent-%COMP%]{position:absolute;left:0;right:0;top:calc(100% + 4px);background:var(--color-bg, #f4f3ef);border:1px solid var(--color-border, rgba(0, 0, 0, .09));border-radius:14px;padding:6px;z-index:100;box-shadow:0 6px 20px #00000017,0 1px 4px #0000000d}.case-shell__ns-item[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;border:none;background:transparent;cursor:pointer;color:var(--color-text, #1b1916);font:inherit;font-size:.8rem;transition:all .13s}.case-shell__ns-item[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .05))}.case-shell__ns-item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-primary, #016b71) 12%,transparent);color:var(--color-primary, #016b71)}.case-shell__ns-item-name[_ngcontent-%COMP%]{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__ns-name-static[_ngcontent-%COMP%]{display:block;padding:10px 12px;font-size:.82rem;font-weight:700;color:var(--color-text, #1b1916);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.case-shell__cases-scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding-bottom:16px}.case-shell__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.case-shell__cases-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-border-light, rgba(255, 255, 255, .12));border-radius:999px}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}.case-shell__mobile-topbar[_ngcontent-%COMP%], .case-shell__mobile-switcher[_ngcontent-%COMP%]{display:none}@media(max-width:900px){.case-shell[_ngcontent-%COMP%]{flex-direction:column;overflow:hidden}.case-shell__sidebar[_ngcontent-%COMP%], .case-shell__resize-handle[_ngcontent-%COMP%]{display:none!important}.case-shell__mobile-topbar[_ngcontent-%COMP%], .case-shell__mobile-switcher[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.case-shell__mobile-topbar[_ngcontent-%COMP%]{position:relative;align-items:center;justify-content:space-between;gap:8px;padding:0 16px;min-height:44px;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff)}.case-shell__mobile-brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;min-width:0;flex:1;overflow:hidden}.case-shell__brand--mobile[_ngcontent-%COMP%]{flex:none;padding:0}.case-shell__brand--mobile[_ngcontent-%COMP%] .case-shell__logo-img[_ngcontent-%COMP%]{width:20px;height:20px}.case-shell__brand--mobile[_ngcontent-%COMP%] .case-shell__logo-text[_ngcontent-%COMP%]{font-size:.82rem}.case-shell__mobile-sep[_ngcontent-%COMP%]{color:#00000040;font:400 12px Inter,sans-serif;flex:none}.case-shell__mobile-ns-wrap[_ngcontent-%COMP%]{position:static;min-width:0}.case-shell__mobile-ns[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:3px;cursor:pointer;background:none;border:none;padding:0}.case-shell__ns-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:299}.case-shell__ns-menu--mobile[_ngcontent-%COMP%]{position:fixed;top:44px;left:16px;min-width:180px;z-index:300}.case-shell__mobile-avatar[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;background:#dfedff;background:oklch(94% .03 255deg);border:1px solid oklch(82% .06 255deg);color:#2a5fc9;display:flex;align-items:center;justify-content:center;font:600 10px Inter,sans-serif;flex:none;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}.case-shell__mobile-avatar[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;border-radius:50%}.case-shell__mobile-chevron[_ngcontent-%COMP%]{color:#00000059;font-size:9px;flex:none}.case-shell__menu-overlay--mobile[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:16px;left:auto;z-index:300}.case-shell__mobile-switcher[_ngcontent-%COMP%]{flex-direction:column;border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-bg, #fff)}.case-shell__mobile-switcher-trigger[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:10px 16px;min-height:44px;cursor:pointer;-webkit-user-select:none;user-select:none}.case-shell__mobile-switcher-trigger[_ngcontent-%COMP%]:hover{background:#00000005}.case-shell__mobile-case-title[_ngcontent-%COMP%]{font:600 12.5px Inter,sans-serif;color:var(--color-text, #161616);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-shell__mobile-case-status[_ngcontent-%COMP%]{font:400 11px Inter,sans-serif;color:#0006;flex:none}.case-shell__mobile-switcher-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-top:1px solid rgba(0,0,0,.06);max-height:60vh;overflow-y:auto}.case-shell__mobile-switcher-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;padding:0 16px;height:44px;flex-shrink:0;cursor:pointer}.case-shell__mobile-switcher-item[_ngcontent-%COMP%] .case-shell__mobile-case-title[_ngcontent-%COMP%]{font-weight:500;color:#000000b3}.case-shell__mobile-switcher-item[_ngcontent-%COMP%]:hover{background:#00000008}.case-shell__mobile-switcher-item--new[_ngcontent-%COMP%]{border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .08))}.case-shell__mobile-switcher-item--new[_ngcontent-%COMP%] .case-shell__mobile-case-title[_ngcontent-%COMP%]{font-weight:600;color:var(--color-primary, #016b71)}.case-shell__mobile-new-icon[_ngcontent-%COMP%]{width:6px;height:6px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:300;color:var(--color-primary, #016b71);flex:none}.case-shell__mobile-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;flex:none}.case-shell__mobile-dot--run[_ngcontent-%COMP%]{background:#2a9d4a}.case-shell__mobile-dot--idle[_ngcontent-%COMP%]{background:#0003}.case-shell__mobile-dot--killed[_ngcontent-%COMP%], .case-shell__mobile-dot--error[_ngcontent-%COMP%]{background:#dc2614}.case-shell__main[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}}'],changeDetection:0})};export{oe as a,ae as b,re as c,Fe as d};