@duplicati/ngclient 0.0.207 → 0.0.208

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 (138) hide show
  1. package/chunk-2DOT6WAE.js +1 -0
  2. package/{chunk-JJY6UOEY.js → chunk-2LSZ2I43.js} +1 -1
  3. package/chunk-2T442RZU.js +1 -0
  4. package/chunk-2V75WWT2.js +1 -0
  5. package/chunk-3A4HTZ7B.js +1 -0
  6. package/{chunk-PGISF7LM.js → chunk-3KMV4PTJ.js} +1 -1
  7. package/{chunk-3MS6SVET.js → chunk-3SSB4QCJ.js} +1 -1
  8. package/chunk-3WOW2XM3.js +1 -0
  9. package/{chunk-WLAJ3YIP.js → chunk-3ZCJK7PY.js} +1 -1
  10. package/{chunk-VNF7NNO5.js → chunk-47PB4WN3.js} +1 -1
  11. package/chunk-4FDBDI3J.js +1 -0
  12. package/chunk-4KNVWFT2.js +1 -0
  13. package/chunk-4QE3MT56.js +1 -0
  14. package/chunk-54PAHILA.js +1 -0
  15. package/{chunk-OVLGKJ3Z.js → chunk-5ECY4LSP.js} +1 -1
  16. package/chunk-5KQZMHFN.js +1 -0
  17. package/{chunk-VUKQJ766.js → chunk-5VSRHMHD.js} +1 -1
  18. package/{chunk-2FPYV4EW.js → chunk-64IX6ISO.js} +1 -1
  19. package/{chunk-OL5HI5OG.js → chunk-7B4AIHYK.js} +1 -1
  20. package/{chunk-G3FMV74P.js → chunk-7FYL7MVA.js} +1 -1
  21. package/{chunk-NJBOYRXU.js → chunk-7YLK4QIL.js} +1 -1
  22. package/{chunk-XHDAWK7I.js → chunk-7ZA3Q6TS.js} +1 -1
  23. package/chunk-AYCSIHGS.js +1 -0
  24. package/chunk-AYOFR344.js +1 -0
  25. package/chunk-AZFGZQQK.js +1 -0
  26. package/{chunk-QY5UGQ3R.js → chunk-AZJ2P3YU.js} +1 -1
  27. package/{chunk-GGW26MAG.js → chunk-B35WNLRM.js} +1 -1
  28. package/chunk-B6CAREL6.js +1 -0
  29. package/{chunk-NGKFJLI2.js → chunk-BEXYTIOL.js} +1 -1
  30. package/{chunk-V63YAEPZ.js → chunk-BKQA64HZ.js} +1 -1
  31. package/chunk-BMWZYMK6.js +1 -0
  32. package/chunk-BSYMQ4VF.js +1 -0
  33. package/chunk-BT44N2RL.js +2 -0
  34. package/{chunk-R4E5IO3A.js → chunk-C6RVYQ4M.js} +1 -1
  35. package/chunk-CJ5SZZQC.js +1 -0
  36. package/chunk-CNUQWXBC.js +1 -0
  37. package/chunk-COKAO446.js +1 -0
  38. package/chunk-CPI5ZQUF.js +1 -0
  39. package/chunk-ERITO7WM.js +4 -0
  40. package/chunk-FSFXGPH3.js +11 -0
  41. package/chunk-G6ZV6LAU.js +1 -0
  42. package/chunk-GG5S6RWM.js +1 -0
  43. package/{chunk-P7TJCJ64.js → chunk-GLR4FXRG.js} +1 -1
  44. package/{chunk-3QS6DB3O.js → chunk-GROPRXXJ.js} +1 -1
  45. package/{chunk-O3GGVB2B.js → chunk-HA7XREWO.js} +1 -1
  46. package/chunk-I2HYK2BL.js +1 -0
  47. package/{chunk-EG3PT3XW.js → chunk-I4XRVBRQ.js} +1 -1
  48. package/{chunk-RWDQ3L3C.js → chunk-ITA7DTN3.js} +1 -1
  49. package/chunk-IXUAJIIQ.js +1 -0
  50. package/{chunk-7HFTVA4J.js → chunk-IZCDGVXJ.js} +1 -1
  51. package/chunk-J33RTTTX.js +1 -0
  52. package/{chunk-CTQKCCGM.js → chunk-JKIZ6U22.js} +1 -1
  53. package/chunk-JW6W3ER7.js +1 -0
  54. package/chunk-K32ZRHDV.js +1 -0
  55. package/chunk-KQZNQ7RD.js +1 -0
  56. package/{chunk-VPUFUCR3.js → chunk-LGILJ5LY.js} +1 -1
  57. package/{chunk-NAMMULH4.js → chunk-LJBFPDG2.js} +1 -1
  58. package/{chunk-KUX6NGQU.js → chunk-LO5YNFFR.js} +1 -1
  59. package/chunk-LQKADAHT.js +1 -0
  60. package/{chunk-ZPIR5QIQ.js → chunk-LSF3JCSI.js} +1 -1
  61. package/{chunk-6COK7FLL.js → chunk-MAKVVEKB.js} +1 -1
  62. package/{chunk-LU7RSOI6.js → chunk-NBTTYKXH.js} +2 -2
  63. package/chunk-NCN2TOJR.js +1 -0
  64. package/chunk-NDLPNBGE.js +1 -0
  65. package/chunk-O7MDPYFW.js +1 -0
  66. package/chunk-ODHFI4PA.js +1 -0
  67. package/{chunk-XTFBRBQX.js → chunk-OISQ63OG.js} +1 -1
  68. package/chunk-OQ6BKP5N.js +1 -0
  69. package/{chunk-OOL5FC7N.js → chunk-P5MXBPC4.js} +1 -1
  70. package/{chunk-TBQPNXMN.js → chunk-Q5WLMQD4.js} +1 -1
  71. package/chunk-Q72Y55NB.js +1 -0
  72. package/chunk-R63C22I3.js +1 -0
  73. package/{chunk-AI6EYFMY.js → chunk-RC3UQLPB.js} +1 -1
  74. package/chunk-RCZGOO7K.js +1 -0
  75. package/{chunk-7E5J43IH.js → chunk-RFB5A3B7.js} +1 -1
  76. package/{chunk-FJFREVRV.js → chunk-SLS3DCJP.js} +1 -1
  77. package/{chunk-OWBBT5WF.js → chunk-SUY5AQLW.js} +1 -1
  78. package/chunk-U3SGWHNI.js +1 -0
  79. package/chunk-UCR4I5MD.js +1 -0
  80. package/{chunk-KLAJGS5T.js → chunk-UUQWSINE.js} +1 -1
  81. package/{chunk-VKNFRCHQ.js → chunk-VAQ435AR.js} +1 -1
  82. package/{chunk-UOZTEZ7B.js → chunk-VTFVTC7O.js} +1 -1
  83. package/{chunk-7MPZ3MRD.js → chunk-W4HWOC3K.js} +1 -1
  84. package/chunk-WOZTK7S5.js +2 -0
  85. package/{chunk-SIMG6PGZ.js → chunk-WQVQC2MC.js} +1 -1
  86. package/{chunk-MMF252RQ.js → chunk-WZV32HLQ.js} +1 -1
  87. package/{chunk-OAAXQ2BE.js → chunk-X64LSE6Y.js} +1 -1
  88. package/chunk-XQTUBHIK.js +1 -0
  89. package/chunk-YCLTQEU6.js +1 -0
  90. package/{chunk-GTZRHPRV.js → chunk-YQD4QIGG.js} +1 -1
  91. package/index.html +2 -2
  92. package/{main-DIGDM6JP.js → main-BYMMXHVT.js} +1 -1
  93. package/package.json +1 -1
  94. package/ship-ui-assets/mcp/components.json +2404 -2404
  95. package/{styles-377DNUNK.css → styles-6WG7TD6T.css} +1 -1
  96. package/chunk-23UYU3M3.js +0 -1
  97. package/chunk-2K74TI2N.js +0 -1
  98. package/chunk-2T4BMRWX.js +0 -2
  99. package/chunk-4HB376H3.js +0 -1
  100. package/chunk-4VYR5E5I.js +0 -1
  101. package/chunk-5MKFV3IB.js +0 -1
  102. package/chunk-5T2JCBPV.js +0 -1
  103. package/chunk-7JHU54QM.js +0 -1
  104. package/chunk-7PUXNL75.js +0 -1
  105. package/chunk-A57TBTOD.js +0 -1
  106. package/chunk-AG7H2MR5.js +0 -1
  107. package/chunk-AGMFKAHM.js +0 -1
  108. package/chunk-AZEV3A4R.js +0 -11
  109. package/chunk-C5OYK6UC.js +0 -2
  110. package/chunk-CAJQ2FEU.js +0 -1
  111. package/chunk-DKPWJYG3.js +0 -1
  112. package/chunk-DRRYACBV.js +0 -1
  113. package/chunk-I2T6IA4K.js +0 -1
  114. package/chunk-I6PR2AV2.js +0 -1
  115. package/chunk-I7MAEY3S.js +0 -1
  116. package/chunk-IAZGVY3O.js +0 -1
  117. package/chunk-IPGH33MU.js +0 -1
  118. package/chunk-JRXD2X7B.js +0 -1
  119. package/chunk-JWPG4EWG.js +0 -1
  120. package/chunk-KUGAORAS.js +0 -1
  121. package/chunk-KYTPZ3WD.js +0 -1
  122. package/chunk-L22UB6DH.js +0 -1
  123. package/chunk-NGPZXZJJ.js +0 -1
  124. package/chunk-PVWYJV5Y.js +0 -1
  125. package/chunk-QY4Y5NJB.js +0 -4
  126. package/chunk-R45TV6JI.js +0 -1
  127. package/chunk-RFCIV3AX.js +0 -1
  128. package/chunk-RJM43XMN.js +0 -1
  129. package/chunk-RNE4Z2E4.js +0 -1
  130. package/chunk-SFW3N5OL.js +0 -1
  131. package/chunk-SMUUHPDS.js +0 -1
  132. package/chunk-STB3WOIA.js +0 -1
  133. package/chunk-T2KOS3XX.js +0 -1
  134. package/chunk-VLMNSWR3.js +0 -1
  135. package/chunk-XZHXN75E.js +0 -1
  136. package/chunk-Y46QCSB5.js +0 -1
  137. package/chunk-Z2BNW4KI.js +0 -1
  138. package/chunk-ZFREX3ZV.js +0 -1
@@ -0,0 +1 @@
1
+ import{aa as kt,ha as Rt,ya as fi}from"./chunk-OQ6BKP5N.js";import{a as Ft}from"./chunk-VAQ435AR.js";import{$a as ci,$b as h,Ab as Y,Ac as qe,Bb as p,Bc as Vt,Cb as m,Db as ae,Eb as F,Fb as L,Gb as Me,Ic as hi,Jb as _e,Kb as X,Nc as Nt,Oc as re,Pc as b,Qa as li,R as ot,Ra as f,T as ee,U as Te,Uc as le,V as Be,Vc as c,Wa as Mt,Wc as te,X as he,Xa as st,Xb as x,Yb as Ee,Yc as It,Z as C,Za as ve,Zb as g,Zc as $,_a as D,_b as I,_c as At,a as ei,aa as si,ba as ri,ca as H,cd as pi,da as j,dc as wt,eb as O,ec as fe,ed as Pt,fb as je,fc as oe,g as ti,ga as Ve,gb as R,gc as Ot,ha as be,hc as K,ia as ge,ib as q,ic as N,jb as pe,jc as Tt,k as ii,ka as me,kc as A,lc as y,mb as Et,mc as Ae,nb as di,nc as J,oa as v,oc as rt,p as ni,qa as V,qb as xt,qc as We,ra as He,rc as $e,sa as Se,sc as Ge,tb as ne,tc as at,ua as P,ub as S,uc as se,v as oi,vb as M,vc as W,wb as ze,xb as ui,ya as ai,yb as Ne,yc as Q,zb as Ie,zc as lt}from"./chunk-ERITO7WM.js";import{a as k,b as G,c as Jt}from"./chunk-7CGTOI24.js";var Si=(()=>{class i{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,t){this._renderer=e,this._elementRef=t}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(t){return new(t||i)(D(ve),D(P))};static \u0275dir=R({type:i})}return i})(),tt=(()=>{class i extends Si{static \u0275fac=(()=>{let e;return function(n){return(e||(e=Se(i)))(n||i)}})();static \u0275dir=R({type:i,features:[q]})}return i})(),Ce=new he(""),Qi={provide:Ce,useExisting:ee(()=>Zi),multi:!0},Zi=(()=>{class i extends tt{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Se(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,n){t&1&&x("change",function(r){return n.onChange(r.target.checked)})("blur",function(){return n.onTouched()})},standalone:!1,features:[Q([Qi]),q]})}return i})(),Ki={provide:Ce,useExisting:ee(()=>Mi),multi:!0};function Ji(){let i=Ft()?Ft().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var en=new he(""),Mi=(()=>{class i extends Si{_compositionMode;_composing=!1;constructor(e,t,n){super(e,t),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!Ji())}writeValue(e){let t=e??"";this.setProperty("value",t)}_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(t){return new(t||i)(D(ve),D(P),D(en,8))};static \u0275dir=R({type:i,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(t,n){t&1&&x("input",function(r){return n._handleInput(r.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(r){return n._compositionEnd(r.target.value)})},standalone:!1,features:[Q([Ki]),q]})}return i})();function jt(i){return i==null||zt(i)===0}function zt(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var xe=new he(""),we=new he(""),tn=/^(?=.{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])?)*$/,gi=class{static min(o){return nn(o)}static max(o){return on(o)}static required(o){return sn(o)}static requiredTrue(o){return rn(o)}static email(o){return an(o)}static minLength(o){return ln(o)}static maxLength(o){return cn(o)}static pattern(o){return dn(o)}static nullValidator(o){return Ei()}static compose(o){return Ni(o)}static composeAsync(o){return Ii(o)}};function nn(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e<i?{min:{min:i,actual:o.value}}:null}}function on(i){return o=>{if(o.value==null||i==null)return null;let e=parseFloat(o.value);return!isNaN(e)&&e>i?{max:{max:i,actual:o.value}}:null}}function sn(i){return jt(i.value)?{required:!0}:null}function rn(i){return i.value===!0?null:{required:!0}}function an(i){return jt(i.value)||tn.test(i.value)?null:{email:!0}}function ln(i){return o=>{let e=o.value?.length??zt(o.value);return e===null||e===0?null:e<i?{minlength:{requiredLength:i,actualLength:e}}:null}}function cn(i){return o=>{let e=o.value?.length??zt(o.value);return e!==null&&e>i?{maxlength:{requiredLength:i,actualLength:e}}:null}}function dn(i){if(!i)return Ei;let o,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),o=new RegExp(e)):(e=i.toString(),o=i),t=>{if(jt(t.value))return null;let n=t.value;return o.test(n)?null:{pattern:{requiredPattern:e,actualValue:n}}}}function Ei(i){return null}function xi(i){return i!=null}function wi(i){return di(i)?ii(i):i}function Oi(i){let o={};return i.forEach(e=>{o=e!=null?k(k({},o),e):o}),Object.keys(o).length===0?null:o}function Ti(i,o){return o.map(e=>e(i))}function un(i){return!i.validate}function Vi(i){return i.map(o=>un(o)?o:e=>o.validate(e))}function Ni(i){if(!i)return null;let o=i.filter(xi);return o.length==0?null:function(e){return Oi(Ti(e,o))}}function Wt(i){return i!=null?Ni(Vi(i)):null}function Ii(i){if(!i)return null;let o=i.filter(xi);return o.length==0?null:function(e){let t=Ti(e,o).map(wi);return oi(t).pipe(ni(Oi))}}function $t(i){return i!=null?Ii(Vi(i)):null}function mi(i,o){return i===null?[o]:Array.isArray(i)?[...i,o]:[i,o]}function Ai(i){return i._rawValidators}function Pi(i){return i._rawAsyncValidators}function Lt(i){return i?Array.isArray(i)?i:[i]:[]}function dt(i,o){return Array.isArray(i)?i.includes(o):i===o}function vi(i,o){let e=Lt(o);return Lt(i).forEach(n=>{dt(e,n)||e.push(n)}),e}function _i(i,o){return Lt(o).filter(e=>!dt(i,e))}var ut=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(o){this._rawValidators=o||[],this._composedValidatorFn=Wt(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=$t(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(o){this._onDestroyCallbacks.push(o)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(o=>o()),this._onDestroyCallbacks=[]}reset(o=void 0){this.control?.reset(o)}hasError(o,e){return this.control?this.control.hasError(o,e):!1}getError(o,e){return this.control?this.control.getError(o,e):null}},Z=class extends ut{name;get formDirective(){return null}get path(){return null}},ce=class extends ut{_parent=null;name=null;valueAccessor=null},ht=class{_cd;constructor(o){this._cd=o}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 Mr=(()=>{class i extends ht{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(D(ce,2))};static \u0275dir=R({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&N("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[q]})}return i})(),Er=(()=>{class i extends ht{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(D(Z,10))};static \u0275dir=R({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&N("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},standalone:!1,features:[q]})}return i})();var Ue="VALID",ct="INVALID",Pe="PENDING",Ye="DISABLED",ye=class{},pt=class extends ye{value;source;constructor(o,e){super(),this.value=o,this.source=e}},Qe=class extends ye{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},Ze=class extends ye{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},Fe=class extends ye{status;source;constructor(o,e){super(),this.status=o,this.source=e}},ft=class extends ye{source;constructor(o){super(),this.source=o}},Je=class extends ye{source;constructor(o){super(),this.source=o}};function Gt(i){return(_t(i)?i.validators:i)||null}function hn(i){return Array.isArray(i)?Wt(i):i||null}function qt(i,o){return(_t(o)?o.asyncValidators:i)||null}function pn(i){return Array.isArray(i)?$t(i):i||null}function _t(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Fi(i,o,e){let t=i.controls;if(!(o?Object.keys(t):t).length)throw new ot(1e3,"");if(!t[e])throw new ot(1001,"")}function ki(i,o,e){i._forEachChild((t,n)=>{if(e[n]===void 0)throw new ot(1002,"")})}var ke=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(o,e){this._assignValidators(o),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(o){this._rawValidators=this._composedValidatorFn=o}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(o){this._rawAsyncValidators=this._composedAsyncValidatorFn=o}get parent(){return this._parent}get status(){return re(this.statusReactive)}set status(o){re(()=>this.statusReactive.set(o))}_status=b(()=>this.statusReactive());statusReactive=v(void 0);get valid(){return this.status===Ue}get invalid(){return this.status===ct}get pending(){return this.status==Pe}get disabled(){return this.status===Ye}get enabled(){return this.status!==Ye}errors;get pristine(){return re(this.pristineReactive)}set pristine(o){re(()=>this.pristineReactive.set(o))}_pristine=b(()=>this.pristineReactive());pristineReactive=v(!0);get dirty(){return!this.pristine}get touched(){return re(this.touchedReactive)}set touched(o){re(()=>this.touchedReactive.set(o))}_touched=b(()=>this.touchedReactive());touchedReactive=v(!1);get untouched(){return!this.touched}_events=new ti;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(o){this._assignValidators(o)}setAsyncValidators(o){this._assignAsyncValidators(o)}addValidators(o){this.setValidators(vi(o,this._rawValidators))}addAsyncValidators(o){this.setAsyncValidators(vi(o,this._rawAsyncValidators))}removeValidators(o){this.setValidators(_i(o,this._rawValidators))}removeAsyncValidators(o){this.setAsyncValidators(_i(o,this._rawAsyncValidators))}hasValidator(o){return dt(this._rawValidators,o)}hasAsyncValidator(o){return dt(this._rawAsyncValidators,o)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(o={}){let e=this.touched===!1;this.touched=!0;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsTouched(G(k({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Ze(!0,t))}markAllAsDirty(o={}){this.markAsDirty({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(o))}markAllAsTouched(o={}){this.markAsTouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(o))}markAsUntouched(o={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:o.emitEvent,sourceControl:t})}),o.onlySelf||this._parent?._updateTouched(o,t),e&&o.emitEvent!==!1&&this._events.next(new Ze(!1,t))}markAsDirty(o={}){let e=this.pristine===!0;this.pristine=!1;let t=o.sourceControl??this;o.onlySelf||this._parent?.markAsDirty(G(k({},o),{sourceControl:t})),e&&o.emitEvent!==!1&&this._events.next(new Qe(!1,t))}markAsPristine(o={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let t=o.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:o.emitEvent})}),o.onlySelf||this._parent?._updatePristine(o,t),e&&o.emitEvent!==!1&&this._events.next(new Qe(!0,t))}markAsPending(o={}){this.status=Pe;let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new Fe(this.status,e)),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.markAsPending(G(k({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Ye,this.errors=null,this._forEachChild(n=>{n.disable(G(k({},o),{onlySelf:!0}))}),this._updateValue();let t=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new pt(this.value,t)),this._events.next(new Fe(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(G(k({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Ue,this._forEachChild(t=>{t.enable(G(k({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors(G(k({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){o.onlySelf||(this._parent?.updateValueAndValidity(o),o.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(o){this._parent=o}getRawValue(){return this.value}updateValueAndValidity(o={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ue||this.status===Pe)&&this._runAsyncValidator(t,o.emitEvent)}let e=o.sourceControl??this;o.emitEvent!==!1&&(this._events.next(new pt(this.value,e)),this._events.next(new Fe(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),o.onlySelf||this._parent?.updateValueAndValidity(G(k({},o),{sourceControl:e}))}_updateTreeValidity(o={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(o)),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ye:Ue}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(o,e){if(this.asyncValidator){this.status=Pe,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:o!==!1};let t=wi(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:e,shouldHaveEmitted:o})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let o=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,o}return!1}setErrors(o,e={}){this.errors=o,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(o){let e=o;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((t,n)=>t&&t._find(n),this)}getError(o,e){let t=e?this.get(e):this;return t?.errors?t.errors[o]:null}hasError(o,e){return!!this.getError(o,e)}get root(){let o=this;for(;o._parent;)o=o._parent;return o}_updateControlsErrors(o,e,t){this.status=this._calculateStatus(),o&&this.statusChanges.emit(this.status),(o||t)&&this._events.next(new Fe(this.status,e)),this._parent&&this._parent._updateControlsErrors(o,e,t)}_initObservables(){this.valueChanges=new me,this.statusChanges=new me}_calculateStatus(){return this._allControlsDisabled()?Ye:this.errors?ct:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Pe)?Pe:this._anyControlsHaveStatus(ct)?ct:Ue}_anyControlsHaveStatus(o){return this._anyControls(e=>e.status===o)}_anyControlsDirty(){return this._anyControls(o=>o.dirty)}_anyControlsTouched(){return this._anyControls(o=>o.touched)}_updatePristine(o,e){let t=!this._anyControlsDirty(),n=this.pristine!==t;this.pristine=t,o.onlySelf||this._parent?._updatePristine(o,e),n&&this._events.next(new Qe(this.pristine,e))}_updateTouched(o={},e){this.touched=this._anyControlsTouched(),this._events.next(new Ze(this.touched,e)),o.onlySelf||this._parent?._updateTouched(o,e)}_onDisabledChange=[];_registerOnCollectionChange(o){this._onCollectionChange=o}_setUpdateStrategy(o){_t(o)&&o.updateOn!=null&&(this._updateOn=o.updateOn)}_parentMarkedDirty(o){return!o&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(o){return null}_assignValidators(o){this._rawValidators=Array.isArray(o)?o.slice():o,this._composedValidatorFn=hn(this._rawValidators)}_assignAsyncValidators(o){this._rawAsyncValidators=Array.isArray(o)?o.slice():o,this._composedAsyncValidatorFn=pn(this._rawAsyncValidators)}},Re=class extends ke{constructor(o,e,t){super(Gt(e),qt(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(o,e){return this.controls[o]?this.controls[o]:(this.controls[o]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(o,e,t={}){this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}removeControl(o,e={}){this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),delete this.controls[o],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(o,e,t={}){this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),delete this.controls[o],e&&this.registerControl(o,e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}contains(o){return this.controls.hasOwnProperty(o)&&this.controls[o].enabled}setValue(o,e={}){ki(this,!0,o),Object.keys(o).forEach(t=>{Fi(this,!0,t),this.controls[t].setValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(o,e={}){o!=null&&(Object.keys(o).forEach(t=>{let n=this.controls[t];n&&n.patchValue(o[t],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o={},e={}){this._forEachChild((t,n)=>{t.reset(o?o[n]:null,G(k({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Je(this))}getRawValue(){return this._reduceChildren({},(o,e,t)=>(o[t]=e.getRawValue(),o))}_syncPendingControls(){let o=this._reduceChildren(!1,(e,t)=>t._syncPendingControls()?!0:e);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){Object.keys(this.controls).forEach(e=>{let t=this.controls[e];t&&o(t,e)})}_setUpControls(){this._forEachChild(o=>{o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(o){for(let[e,t]of Object.entries(this.controls))if(this.contains(e)&&o(t))return!0;return!1}_reduceValue(){let o={};return this._reduceChildren(o,(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(o,e){let t=o;return this._forEachChild((n,s)=>{t=e(t,n,s)}),t}_allControlsDisabled(){for(let o of Object.keys(this.controls))if(this.controls[o].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(o){return this.controls.hasOwnProperty(o)?this.controls[o]:null}};var Bt=class extends Re{};var Oe=new he("",{factory:()=>it}),it="always";function yt(i,o){return[...o.path,i]}function et(i,o,e=it){Ut(i,o),o.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&o.valueAccessor.setDisabledState?.(i.disabled),gn(i,o),vn(i,o),mn(i,o),fn(i,o)}function gt(i,o,e=!0){let t=()=>{};o?.valueAccessor?.registerOnChange(t),o?.valueAccessor?.registerOnTouched(t),vt(i,o),i&&(o._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function mt(i,o){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(o)})}function fn(i,o){if(o.valueAccessor.setDisabledState){let e=t=>{o.valueAccessor.setDisabledState(t)};i.registerOnDisabledChange(e),o._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function Ut(i,o){let e=Ai(i);o.validator!==null?i.setValidators(mi(e,o.validator)):typeof e=="function"&&i.setValidators([e]);let t=Pi(i);o.asyncValidator!==null?i.setAsyncValidators(mi(t,o.asyncValidator)):typeof t=="function"&&i.setAsyncValidators([t]);let n=()=>i.updateValueAndValidity();mt(o._rawValidators,n),mt(o._rawAsyncValidators,n)}function vt(i,o){let e=!1;if(i!==null){if(o.validator!==null){let n=Ai(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(r=>r!==o.validator);s.length!==n.length&&(e=!0,i.setValidators(s))}}if(o.asyncValidator!==null){let n=Pi(i);if(Array.isArray(n)&&n.length>0){let s=n.filter(r=>r!==o.asyncValidator);s.length!==n.length&&(e=!0,i.setAsyncValidators(s))}}}let t=()=>{};return mt(o._rawValidators,t),mt(o._rawAsyncValidators,t),e}function gn(i,o){o.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ri(i,o)})}function mn(i,o){o.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ri(i,o),i.updateOn!=="submit"&&i.markAsTouched()})}function Ri(i,o){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),o.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function vn(i,o){let e=(t,n)=>{o.valueAccessor.writeValue(t),n&&o.viewToModelUpdate(t)};i.registerOnChange(e),o._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function Li(i,o){i==null,Ut(i,o)}function _n(i,o){return vt(i,o)}function Yt(i,o){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(o,e.currentValue)}function yn(i){return Object.getPrototypeOf(i.constructor)===tt}function Bi(i,o){i._syncPendingControls(),o.forEach(e=>{let t=e.control;t.updateOn==="submit"&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function Xt(i,o){if(!o)return null;Array.isArray(o);let e,t,n;return o.forEach(s=>{s.constructor===Mi?e=s:yn(s)?t=s:n=s}),n||t||e||null}function Cn(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}var Dn={provide:Z,useExisting:ee(()=>bn)},Xe=Promise.resolve(),bn=(()=>{class i extends Z{callSetDisabledState;get submitted(){return re(this.submittedReactive)}_submitted=b(()=>this.submittedReactive());submittedReactive=v(!1);_directives=new Set;form;ngSubmit=new me;options;constructor(e,t,n){super(),this.callSetDisabledState=n,this.form=new Re({},Wt(e),$t(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Xe.then(()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),et(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Xe.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Xe.then(()=>{let t=this._findContainer(e.path),n=new Re({});Li(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Xe.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){Xe.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),Bi(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ft(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(t){return new(t||i)(D(xe,10),D(we,10),D(Oe,8))};static \u0275dir=R({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&x("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Q([Dn]),q]})}return i})();function yi(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function Ci(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Ke=class extends ke{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(o=null,e,t){super(Gt(e),qt(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),_t(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ci(o)?this.defaultValue=o.value:this.defaultValue=o)}setValue(o,e={}){this.value=this._pendingValue=o,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(t=>t(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(o,e={}){this.setValue(o,e)}reset(o=this.defaultValue,e={}){this._applyFormState(o),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 Je(this))}_updateValue(){}_anyControls(o){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(o){this._onChange.push(o)}_unregisterOnChange(o){yi(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){yi(this._onDisabledChange,o)}_forEachChild(o){}_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(o){Ci(o)?(this.value=this._pendingValue=o.value,o.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=o}};var Sn=i=>i instanceof Ke,Mn=(()=>{class i extends Z{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective?.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return yt(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(n){return(e||(e=Se(i)))(n||i)}})();static \u0275dir=R({type:i,standalone:!1,features:[q]})}return i})();var En={provide:ce,useExisting:ee(()=>Ct)},Di=Promise.resolve(),Ct=(()=>{class i extends ce{_changeDetectorRef;callSetDisabledState;control=new Ke;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new me;constructor(e,t,n,s,r,a){super(),this._changeDetectorRef=r,this.callSetDisabledState=a,this._parent=e,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=Xt(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),Yt(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(){et(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){Di.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let t=e.isDisabled.currentValue,n=t!==0&&pi(t);Di.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?yt(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(D(Z,9),D(xe,10),D(we,10),D(Ce,10),D(At,8),D(Oe,8))};static \u0275dir=R({type:i,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:[Q([En]),q,He]})}return i})();var wr=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=R({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),xn={provide:Ce,useExisting:ee(()=>wn),multi:!0},wn=(()=>{class i extends tt{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Se(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,n){t&1&&x("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[Q([xn]),q]})}return i})(),On={provide:Ce,useExisting:ee(()=>Vn),multi:!0};var Tn=(()=>{class i{_accessors=[];add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e){this._accessors.splice(t,1);return}}select(e){this._accessors.forEach(t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)})}_isSameGroup(e,t){return e[0].control?e[0]._parent===t._control._parent&&e[1].name===t.name:!1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Vn=(()=>{class i extends tt{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=C(Oe,{optional:!0})??it;constructor(e,t,n,s){super(e,t),this._registry=n,this._injector=s}ngOnInit(){this._control=this._injector.get(ce),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(t){return new(t||i)(D(ve),D(P),D(Tn),D(Ve))};static \u0275dir=R({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,n){t&1&&x("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[Q([On]),q]})}return i})(),Nn={provide:Ce,useExisting:ee(()=>In),multi:!0},In=(()=>{class i extends tt{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=t=>{e(t==""?null:parseFloat(t))}}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Se(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,n){t&1&&x("change",function(r){return n.onChange(r.target.value)})("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[Q([Nn]),q]})}return i})(),Ht=class extends ke{constructor(o,e,t){super(Gt(e),qt(t,e)),this.controls=o,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(o){return this.controls[this._adjustIndex(o)]}push(o,e={}){Array.isArray(o)?o.forEach(t=>{this.controls.push(t),this._registerControl(t)}):(this.controls.push(o),this._registerControl(o)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(o,e,t={}){this.controls.splice(o,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent})}removeAt(o,e={}){let t=this._adjustIndex(o);t<0&&(t=0),this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(o,e,t={}){let n=this._adjustIndex(o);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),e&&(this.controls.splice(n,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(o,e={}){ki(this,!1,o),o.forEach((t,n)=>{Fi(this,!1,n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(o,e={}){o!=null&&(o.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(o=[],e={}){this._forEachChild((t,n)=>{t.reset(o[n],G(k({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new Je(this))}getRawValue(){return this.controls.map(o=>o.getRawValue())}clear(o={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:o.emitEvent}))}_adjustIndex(o){return o<0?o+this.length:o}_syncPendingControls(){let o=this.controls.reduce((e,t)=>t._syncPendingControls()?!0:e,!1);return o&&this.updateValueAndValidity({onlySelf:!0}),o}_forEachChild(o){this.controls.forEach((e,t)=>{o(e,t)})}_updateValue(){this.value=this.controls.filter(o=>o.enabled||this.disabled).map(o=>o.value)}_anyControls(o){return this.controls.some(e=>e.enabled&&o(e))}_setUpControls(){this._forEachChild(o=>this._registerControl(o))}_allControlsDisabled(){for(let o of this.controls)if(o.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(o){o.setParent(this),o._registerOnCollectionChange(this._onCollectionChange)}_find(o){return this.at(o)??null}};var Hi=(()=>{class i extends Z{callSetDisabledState;get submitted(){return re(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=b(()=>this._submittedReactive());_submittedReactive=v(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,t,n){super(),this.callSetDisabledState=n,this._setValidators(e),this._setAsyncValidators(t)}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&&(vt(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let t=this.form.get(e.path);return et(t,e,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){gt(e.control||null,e,!1),Cn(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,t){this.form.get(e.path).setValue(t)}onReset(){this.resetForm()}resetForm(e=void 0,t={}){this.form.reset(e,t),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,Bi(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ft(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let t=e.control,n=this.form.get(e.path);t!==n&&(gt(t||null,e),Sn(n)&&(et(n,e,this.callSetDisabledState),e.control=n))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);Li(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let t=this.form?.get(e.path);t&&_n(t,e)&&t.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){Ut(this.form,this),this._oldForm&&vt(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(D(xe,10),D(we,10),D(Oe,8))};static \u0275dir=R({type:i,features:[q,He]})}return i})();var Qt=new he(""),An={provide:ce,useExisting:ee(()=>Pn)},Pn=(()=>{class i extends ce{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new me;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,s,r){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(t),this.valueAccessor=Xt(this,n)}ngOnChanges(e){if(this._isControlChanged(e)){let t=e.form.previousValue;t&&gt(t,this,!1),et(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Yt(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&gt(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(t){return new(t||i)(D(xe,10),D(we,10),D(Ce,10),D(Qt,8),D(Oe,8))};static \u0275dir=R({type:i,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[Q([An]),q,He]})}return i})(),Fn={provide:Z,useExisting:ee(()=>ji)},ji=(()=>{class i extends Mn{name=null;constructor(e,t,n){super(),this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}_checkParentType(){Wi(this._parent)}static \u0275fac=function(t){return new(t||i)(D(Z,13),D(xe,10),D(we,10))};static \u0275dir=R({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[Q([Fn]),q]})}return i})(),kn={provide:Z,useExisting:ee(()=>zi)},zi=(()=>{class i extends Z{_parent;name=null;constructor(e,t,n){super(),this._parent=e,this._setValidators(t),this._setAsyncValidators(n)}ngOnInit(){Wi(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 yt(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(t){return new(t||i)(D(Z,13),D(xe,10),D(we,10))};static \u0275dir=R({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[Q([kn]),q]})}return i})();function Wi(i){return!(i instanceof ji)&&!(i instanceof Hi)&&!(i instanceof zi)}var Rn={provide:ce,useExisting:ee(()=>Ln)},Ln=(()=>{class i extends ce{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new me;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,t,n,s,r){super(),this._ngModelWarningConfig=r,this._parent=e,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=Xt(this,s)}ngOnChanges(e){this._added||this._setUpControl(),Yt(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 yt(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(t){return new(t||i)(D(Z,13),D(xe,10),D(we,10),D(Ce,10),D(Qt,8))};static \u0275dir=R({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[Q([Rn]),q,He]})}return i})();var Bn={provide:Z,useExisting:ee(()=>Hn)},Hn=(()=>{class i extends Hi{form=null;ngSubmit=new me;get control(){return this.form}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Se(i)))(n||i)}})();static \u0275dir=R({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&x("submit",function(r){return n.onSubmit(r)})("reset",function(){return n.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[Q([Bn]),q]})}return i})();var $i=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275mod=je({type:i});static \u0275inj=Be({})}return i})();function bi(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Or=(()=>{class i{useNonNullable=!1;get nonNullable(){let e=new i;return e.useNonNullable=!0,e}group(e,t=null){let n=this._reduceControls(e),s={};return bi(t)?s=t:t!==null&&(s.validators=t.validator,s.asyncValidators=t.asyncValidator),new Re(n,s)}record(e,t=null){let n=this._reduceControls(e);return new Bt(n,t)}control(e,t,n){let s={};return this.useNonNullable?(bi(t)?s=t:(s.validators=t,s.asyncValidators=n),new Ke(e,G(k({},s),{nonNullable:!0}))):new Ke(e,t,n)}array(e,t,n){let s=e.map(r=>this._createControl(r));return new Ht(s,t,n)}_reduceControls(e){let t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){if(e instanceof Ke)return e;if(e instanceof ke)return e;if(Array.isArray(e)){let t=e[0],n=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(t,n,s)}else return this.control(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Tr=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Oe,useValue:e.callSetDisabledState??it}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=je({type:i});static \u0275inj=Be({imports:[$i]})}return i})(),Vr=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:Qt,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Oe,useValue:e.callSetDisabledState??it}]}}static \u0275fac=function(t){return new(t||i)};static \u0275mod=je({type:i});static \u0275inj=Be({imports:[$i]})}return i})();var ie=["*"],jn=[[["","icon",""]],[["sh-icon"]],[["","title",""]],"*",[["button"]],[["","actions",""]],[["","content",""]],[["p"]]],zn=["[icon]","sh-icon","[title]","*","button","[actions]","[content]","p"];function Wn(i,o){i&1&&(p(0,"sh-icon",3),y(1,"info"),m())}function $n(i,o){i&1&&(p(0,"sh-icon",3),y(1,"info"),m())}function Gn(i,o){i&1&&(p(0,"sh-icon",3),y(1,"warning"),m())}function qn(i,o){i&1&&(p(0,"sh-icon",3),y(1,"warning-octagon"),m())}function Un(i,o){i&1&&(p(0,"sh-icon",3),y(1,"check-circle"),m())}function Yn(i,o){i&1&&(p(0,"sh-icon",3),y(1,"question"),m())}function Xn(i,o){if(i&1){let e=X();p(0,"sh-icon",8),x("click",function(){H(e);let n=g();return j(n.removeAlert())}),y(1,"plus"),m()}}var Qn=["dialogRef"];function Zn(i,o){if(i&1){let e=X();F(0,"div",5),Ee("click",function(){H(e);let n=g(2);return j(n.isOpen.set(!1))}),L()}}function Kn(i,o){if(i&1&&(F(0,"dialog",2,0)(2,"div",3),h(3),L(),S(4,Zn,1,0,"div",4),L()),i&2){let e=g(),t=W(0);A(t.class),K("width",t.width??"")("max-width",t.maxWidth??"")("max-height",t.maxHeight??"")("height",t.height??""),f(4),M(e.defaultOptionMerge().closeOnOutsideClick?4:-1)}}var Jn=["shButton",""];var eo=["daysRef"];function to(i,o){if(i&1&&y(0),i&2){let e=g();J(" - ",e.getMonthName(e.getLastVisibleMonth())," ")}}function io(i,o){if(i&1&&(p(0,"div"),y(1),m()),i&2){let e=o.$implicit;f(),Ae(e)}}function no(i,o){if(i&1){let e=X();p(0,"div",2,1),x("click",function(){let n=H(e).$implicit,s=Ot(1),r=g(2);return j(r.setDate(n,s))}),y(2),m()}if(i&2){let e=o.$implicit,t=g().$implicit,n=g();A(n.isDateSelected(e)),N("out-of-scope",!n.isCurrentMonth(e,t)),f(2),J(" ",e.getDate()," ")}}function oo(i,o){if(i&1&&(p(0,"article",7),ae(1,"div",9),m()),i&2){let e=g(2);f(),Tt(e.selectedDateStylePosition())}}function so(i,o){if(i&1&&(p(0,"div",5)(1,"nav",6),Ne(2,io,2,1,"div",null,ze),m(),p(4,"div",7,0),Ne(6,no,3,5,"div",8,ze),S(8,oo,2,2,"article",7),m()()),i&2){let e=o.$implicit,t=g();f(2),Ie(t.weekdays()),f(4),Ie(t.getMonthDates(e)),f(2),M(t.asRange()?-1:8)}}var ro=["triggerRef"],ao=["popoverRef"],lo=["popoverContentRef"],co=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],uo=["[trigger]","button","[shButton]","*"];function ho(i,o){if(i&1){let e=X();F(0,"div",6,1)(2,"div",7),Ee("click",function(n){H(e);let s=g();return j(s.eventClose(n))}),L(),F(3,"div",8,2),h(5,3),L()()}if(i&2){let e=g();ne("id",e.id()+"hello"),f(3),Tt(e.menuStyle()),K("position-anchor",e.id())}}var po=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","popoverContent",""]],[["","error",""]],[["","hint",""]]],fo=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[popoverContent]","[error]","[hint]"],Gi=()=>({closeOnButton:!1,closeOnEsc:!0}),go=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","textSuffix",""]],[["","suffix",""]]],mo=["label","[prefix]","[textPrefix]","input","[textSuffix]","[suffix]"];function vo(i,o){if(i&1&&(p(0,"div",3),y(1),m()),i&2){let e=g();f(),J(" ",e._maskedDate()," ")}}function _o(i,o){if(i&1){let e=X();p(0,"sh-datepicker",7),x("dateChange",function(n){H(e);let s=g();return j(s.onDateChange(n))}),m()}if(i&2){let e=g();A(e.currentClass()),Y("date",e.internalDate())}}function yo(i,o){}var Co=[[["label"]],[["","boxPrefix",""]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","boxSuffix",""]],[["","error",""]],[["","hint",""]]],Do=["label","[boxPrefix]","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[boxSuffix]","[error]","[hint]"],bo=["input"],So=[[["label"]]],Mo=["label"];function Eo(i,o){if(i&1&&(p(0,"div",3),y(1),m()),i&2){let e=g();f(),Ae(e.files()[0].name)}}function xo(i,o){if(i&1&&(p(0,"div",3),y(1),m()),i&2){let e=g();f(),J("",e.files().length," files selected")}}function wo(i,o){if(i&1&&(p(0,"div",4),y(1),m()),i&2){let e=g();f(),Ae(e.filesOver()?e.overlayText():e.placeholder())}}var Oo=["inputRef"],To=["optionsRef"],Vo=["*",[["","menu",""]]],No=["*","[menu]"];function Io(i,o){i&1&&(p(0,"sh-icon",5),y(1,"caret-down"),m())}var Ao=[[["label"]],[["input","type","range"]]],Po=["label","input[type=range]"],Fo=["optionsWrap"],ko=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],Ro=["label","[prefix]","[boxPrefix]","input","textarea"],Lo=()=>({closeOnButton:!1,closeOnEsc:!1}),qi=(i,o)=>({$implicit:i,last:o}),Dt=i=>({$implicit:i});function Bo(i,o){if(i&1&&y(0),i&2){let e=g();J(" ",e.inputValue()," ")}}function Ho(i,o){i&1&&_e(0)}function jo(i,o){if(i&1&&pe(0,Ho,1,0,"ng-container",13),i&2){let e=g(3),t=e.$implicit,n=e.$index,s=e.$count;g(2);let r=W(3);Y("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,qi,t,n===s-1))}}function zo(i,o){if(i&1&&y(0),i&2){let e=g(3).$implicit,t=g(2);J(" ",t.getLabel(e)," ")}}function Wo(i,o){if(i&1){let e=X();p(0,"sh-chip",12),x("click",function(n){H(e);let s=g(2).$index,r=g(2);return j(r.removeSelectedOptionByIndex(n,s))}),S(1,jo,1,5,"ng-container")(2,zo,1,1),p(3,"sh-icon"),y(4,"x-bold"),m()()}if(i&2){let e=g(4),t=W(3);A(e.selectClasses()),f(),M(t?1:2)}}function $o(i,o){i&1&&_e(0)}function Go(i,o){if(i&1&&pe(0,$o,1,0,"ng-container",13),i&2){let e=g(4),t=e.$implicit,n=e.$index,s=e.$count;g(2);let r=W(3);Y("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,qi,t,n===s-1))}}function qo(i,o){if(i&1&&y(0),i&2){let e=g(4),t=e.$implicit,n=e.$index,s=e.$count,r=g(2);J(" ",n===s-1?r.getLabel(t):r.getLabel(t)+","," ")}}function Uo(i,o){if(i&1&&S(0,Go,1,5,"ng-container")(1,qo,1,1),i&2){g(5);let e=W(3);M(e?0:1)}}function Yo(i,o){if(i&1&&S(0,Uo,2,1),i&2){g(4);let e=W(6);M(e?-1:0)}}function Xo(i,o){if(i&1&&S(0,Wo,5,3,"sh-chip",11)(1,Yo,1,1),i&2){g(3);let e=W(5);M(e?0:1)}}function Qo(i,o){if(i&1&&S(0,Xo,2,1),i&2){let e=o.$implicit;M(e?0:-1)}}function Zo(i,o){if(i&1&&Ne(0,Qo,1,1,null,null,ze),i&2){g();let e=W(2);Ie(e)}}function Ko(i,o){i&1&&_e(0)}function Jo(i,o){if(i&1&&pe(0,Ko,1,0,"ng-container",14),i&2){g(2);let e=W(0);Y("ngTemplateOutlet",e)}}function es(i,o){if(i&1&&y(0),i&2){let e=g(2);J(" ",e.placeholderText()??""," ")}}function ts(i,o){if(i&1&&S(0,Jo,1,1,"ng-container")(1,es,1,1),i&2){g();let e=W(0);M(e?0:1)}}function is(i,o){i&1&&(p(0,"sh-icon",6),y(1,"caret-down"),m())}function ns(i,o){i&1&&ae(0,"sh-spinner",7)}function os(i,o){i&1&&(p(0,"sh-icon",6),y(1,"list-magnifying-glass"),m())}function ss(i,o){i&1&&(p(0,"sh-icon",6),y(1,"magnifying-glass"),m())}function rs(i,o){if(i&1){let e=X();p(0,"sh-icon",15),x("click",function(n){H(e);let s=g();return j(s.clear(n))}),y(1,"x-bold"),m()}}function as(i,o){i&1&&(p(0,"sh-icon",6),y(1,"caret-down"),m())}function ls(i,o){i&1&&(p(0,"sh-icon",6),y(1,"caret-up"),m())}function cs(i,o){if(i&1&&(p(0,"p",9),y(1),m()),i&2){let e=g(3);f(),Ae(e.freeTextTitle())}}function ds(i,o){i&1&&_e(0)}function us(i,o){if(i&1&&pe(0,ds,1,0,"ng-container",13),i&2){g(2);let e=W(0);g();let t=W(1);Y("ngTemplateOutlet",t)("ngTemplateOutletContext",qe(2,Dt,e))}}function hs(i,o){i&1&&_e(0)}function ps(i,o){if(i&1&&pe(0,hs,1,0,"ng-container",13),i&2){g(2);let e=W(0);g();let t=W(4);Y("ngTemplateOutlet",t)("ngTemplateOutletContext",qe(2,Dt,e))}}function fs(i,o){if(i&1&&y(0),i&2){g(2);let e=W(1);J(" ",e," ")}}function gs(i,o){i&1&&ae(0,"sh-divider")}function ms(i,o){if(i&1){let e=X();S(0,cs,2,1,"p",9),p(1,"li",16),x("click",function(){H(e);let n=g(2);return j(n.toggleOptionByIndex(-1))}),S(2,us,1,4,"ng-container")(3,ps,1,4,"ng-container")(4,fs,1,1),m(),S(5,gs,1,0,"sh-divider")}if(i&2){g();let e=W(0),t=g(),n=W(1),s=W(4);M(t.freeTextTitle()?0:-1),f(),N("selected",t.isSelected(-1))("focused",t.focusedOptionIndex()===-1),Y("id",t.getLabelAsSlug(e)),ne("aria-selected",t.isSelected(-1)),f(),M(n?2:s?3:4),f(3),M(t.freeTextTitle()&&t.filteredOptions().length>0?5:-1)}}function vs(i,o){if(i&1&&(at(0)(1),S(2,ms,6,9)),i&2){let e=g(),t=se(e.computedFreeTextOption());f();let n=se(e.getValue(t));f(),M(n.length>0?2:-1)}}function _s(i,o){if(i&1&&(p(0,"p",9),y(1),m()),i&2){let e=g();f(),Ae(e.optionTitle())}}function ys(i,o){if(i&1&&ae(0,"sh-checkbox"),i&2){let e=g().$index,t=g();A(t.selectClasses()),N("active",t.isSelected(e))}}function Cs(i,o){i&1&&_e(0)}function Ds(i,o){if(i&1&&pe(0,Cs,1,0,"ng-container",13),i&2){let e=g().$implicit;g();let t=W(4);Y("ngTemplateOutlet",t)("ngTemplateOutletContext",qe(2,Dt,e))}}function bs(i,o){if(i&1&&y(0),i&2){let e=g().$implicit,t=g();J(" ",t.getLabel(e)," ")}}function Ss(i,o){if(i&1){let e=X();p(0,"li",16),x("click",function(){let n=H(e).$index,s=g();return j(s.toggleOptionByIndex(n))}),S(1,ys,1,4,"sh-checkbox",17),S(2,Ds,1,4,"ng-container")(3,bs,1,1),m()}if(i&2){let e=o.$implicit,t=o.$index,n=g(),s=W(4);N("selected",n.isSelected(t))("focused",t===n.focusedOptionIndex()),Y("id",n.getLabelAsSlug(e)),ne("aria-selected",n.isSelected(t)),f(),M(n.selectMultiple()?1:-1),f(),M(s?2:3)}}var Ms=["dragImageElement"],Es=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],xs=["[sidenav]","[sidenav-closed-topbar]","*"];function ws(i,o){i&1&&Me(0,"div",1,0)}function Os(i,o){if(i&1){let e=X();F(0,"div",7),Ee("drop",function(n){H(e);let s=g();return j(s.drop(n))})("dragenter",function(){H(e);let n=g();return j(n.dragEnter())})("dragleave",function(){H(e);let n=g();return j(n.dragLeave())}),L()}}function Ts(i,o){if(i&1){let e=X();F(0,"div",8),Ee("dragstart",function(n){H(e);let s=g();return j(s.dragStart(n))})("dragend",function(n){H(e);let s=g();return j(s.dragEnd(n))})("drag",function(n){H(e);let s=g();return j(s.drag(n))})("touchstart",function(n){H(e);let s=g();return j(s.touchStart(n))})("touchmove",function(n){H(e);let s=g();return j(s.touchMove(n))})("touchend",function(n){H(e);let s=g();return j(s.touchEnd(n))})("touchcancel",function(n){H(e);let s=g();return j(s.touchCancel(n))}),L()}}var Vs=["thead"],Ns=["tbody"],Is=[[["","actionbar",""]],[["th"]],[["","thead",""]],"*",[["","table-no-rows",""]]],As=["[actionbar]","th","[thead]","*","[table-no-rows]"];function Ps(i,o){i&1&&ae(0,"sh-progress-bar",3)}function Fs(i,o){i&1&&(p(0,"div",4),h(1,4),m())}var ks=[[["","title",""]],"*"],Rs=["[title]","*"];function Ls(i,o){i&1&&y(0,"Title")}function Bs(i,o){i&1&&(p(0,"sh-icon",1),y(1,"caret-down"),m())}function Hs(i,o){i&1&&_e(0)}function js(i,o){if(i&1&&pe(0,Hs,1,0,"ng-container",1),i&2){let e=g();Y("ngTemplateOutlet",e.content())("ngTemplateOutletContext",qe(2,Dt,e.tooltipContext))}}function zs(i,o){if(i&1&&y(0),i&2){let e=g();J(" ",e.content()," ")}}var Ui=new he("Ship UI Config");function U(i,o){let e=C(Ui,{optional:!0});return b(()=>{let t=e?.[i],n=o.variant?.();n||(n=t?.variant),!n&&i==="alert"&&e?.alertVariant&&(n=e.alertVariant),!n&&i==="card"&&e?.cardType&&(n=e.cardType),!n&&i==="table"&&e?.tableType&&(n=e.tableType);let s=o.color?.()||t?.color,r=o.size?.()||t?.size,a=(o.sharp?.()??t?.sharp)||!1,l=(o.dynamic?.()??t?.dynamic)||!1,d=(o.readonly?.()??t?.readonly)||!1,u=[];return s&&u.push(s),n&&(["a","b","c","d"].includes(n)?u.push(`type-${n}`):u.push(n)),r&&u.push(r),a&&u.push("sharp"),l&&u.push("dynamic"),d&&u.push("readonly"),u.join(" ")})}var Ws=["bold","thin","light","fill","duotone"],De=(()=>{class i{constructor(){this.#e=C(P),this.#n=C(ve),this.color=c(null),this.variant=c(null),this.size=c(null),this.hostClasses=U("icon",{color:this.color,variant:this.variant,size:this.size})}#e;#n;ngAfterContentInit(){let e=this.#e.nativeElement.textContent?.trim();if(!e)return;let t=e.split("-").at(-1);t&&Ws.includes(t)&&this.#n.addClass(this.#e.nativeElement,t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-icon"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})(),ta=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.hostClasses=U("alert",{color:this.color,variant:this.variant}),this._el=C(P),this.alertService=c(null),this.id=c(null)}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-alert"]],hostAttrs:[1,"sh-sheet"],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:zn,decls:22,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"actions"],[1,"content"],[1,"close-icon",3,"click"]],template:function(t,n){if(t&1&&(I(jn),p(0,"div",1)(1,"div",2,0),h(3),h(4,1),m(),p(5,"div",2),S(6,Wn,2,0,"sh-icon",3)(7,$n,2,0,"sh-icon",3)(8,Gn,2,0,"sh-icon",3)(9,qn,2,0,"sh-icon",3)(10,Un,2,0,"sh-icon",3)(11,Yn,2,0,"sh-icon",3),m(),p(12,"div",4),h(13,2),h(14,3),m(),S(15,Xn,2,0,"sh-icon",5),p(16,"div",6),h(17,4),h(18,5),m(),p(19,"div",7),h(20,6),h(21,7),m()()),t&2){let s=Ot(2);f(),K("display",s.children.length?"block":"none");let r=n.hostClasses();f(5),M(r.includes("primary")?6:r.includes("accent")?7:r.includes("warn")?8:r.includes("error")?9:r.includes("success")?10:11),f(9),M(n.id()?15:-1)}},dependencies:[De],encapsulation:2,changeDetection:0})}}return i})();function nt(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var ia=(()=>{class i{constructor(){this.alertHistory=v([]),this.alertHistoryIsOpen=v(!1),this.alertHistoryIsHidden=v(!0)}error(e){this.addAlert({type:"error",title:e??"An error occured"})}success(e){this.addAlert({type:"success",title:e})}question(e){this.addAlert({type:"question",title:e})}warning(e){this.addAlert({type:"warn",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=nt();this.alertHistory.update(n=>[G(k({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...n]),setTimeout(()=>{this.alertHistory.update(n=>n.map(s=>G(k({},s),{animateIn:s.id===t?!1:s.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(n=>G(k({},n),{animateOut:n.id===e?!1:n.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(n=>n.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(n=>G(k({},n),{isOpen:n.id===e?!1:n.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=Te({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),$s={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},Gs=(()=>{class i{constructor(){this.#e=C(be),this.#n=C(Ui,{optional:!0}),this.dialogRef=te("dialogRef"),this.isOpen=$(!1),this.options=c(),this.closed=le(),this.defaultOptionMerge=b(()=>k(G(k({},$s),{class:this.#n?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=V(()=>{let e=this.dialogRef()?.nativeElement;e&&(this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(e.showModal(),e.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),this.#e.addEventListener("keydown",t=>{t.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&t.preventDefault(),t.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(e.close(),queueMicrotask(()=>this.closed.emit())))})}#e;#n;ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-dialog"]],viewQuery:function(t,n){t&1&&fe(n.dialogRef,Qn,5),t&2&&oe()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ie,decls:2,vars:2,consts:[["dialogRef",""],["shDialog","",3,"class","width","max-width","max-height","height"],["shDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,n){t&1&&(I(),at(0),S(1,Kn,5,11,"dialog",1)),t&2&&(se(n.defaultOptionMerge()),f(),M(n.isOpen()?1:-1))},encapsulation:2,changeDetection:0})}}return i})(),na=(()=>{class i{constructor(){this.#e=C(be),this.#n=this.#e.querySelector("body"),this.#t=C(xt),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#n;#t;open(e,t){let n=this.#t.injector,s=this.#i(),r=!1,T=t||{},{data:a,closed:l}=T,d=Jt(T,["data","closed"]);this.compRef&&this.#o(!0),this.insertedCompRef=Pt(e,{environmentInjector:n}),this.compRef=Pt(Gs,{hostElement:s,environmentInjector:n,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let u=this.insertedCompRef.instance,_=u.data,w=u.closed;if(a){if(Et(_))this.insertedCompRef.setInput("data",a);else if(!Et(_))throw new Error("data is not an input signal on the passed component")}w instanceof Nt&&(this.closedFieldSub=w.subscribe(ue=>{this.#o(),!r&&(r=!0,l?.(ue),(this.compRef?.instance.closed).emit(ue))})),this.#t.attachView(this.insertedCompRef.hostView),this.#t.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",d),this.compClosedSub=this.compRef.instance.closed.subscribe(()=>E());let z=this;function E(ue=void 0){z.#o(),!r&&(r=!0,w&&w instanceof Nt&&w.emit(ue),l?.(ue))}return{component:this.insertedCompRef.instance,close:E,closed:this.compRef.instance.closed}}#i(){let e=this.#e.createElement("sh-dialog-ref");return e.id="sh-dialog-ref",this.#e.getElementById("sh-dialog-ref")||this.#n?.append(e),this.#e.getElementById("sh-dialog-ref")}#o(e=!1){let t=this;e||queueMicrotask(()=>n());function n(){t.insertedCompRef&&(t.#t.detachView(t.insertedCompRef.hostView),t.closedFieldSub?.unsubscribe(),t.insertedCompRef.destroy()),t.compRef&&(t.#t.detachView(t.compRef.hostView),t.compClosedSub?.unsubscribe(),t.compRef.destroy())}}ngOnDestroy(){this.#o(!0)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=Te({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function bt(i=null){let o=i??C(P).nativeElement;if(!o)return v("");let e=v(o.className);if(typeof MutationObserver>"u")return e.asReadonly();let t=C(ge),n=new MutationObserver(s=>{for(let r of s)if(r.type==="attributes"&&r.attributeName==="class"){let a=r.target;e.set(a.className)}});return n.observe(o,{attributes:!0,attributeFilter:["class"]}),t.onDestroy(()=>n.disconnect()),e.asReadonly()}var oa=(()=>{class i{constructor(){this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12),this.color=c(null),this.variant=c(null),this.size=c(null),this.hostClasses=U("buttonGroup",{color:this.color,variant:this.variant,size:this.size})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-button-group"]],hostVars:4,hostBindings:function(t,n){t&2&&(A(n.hostClasses()),K("--btng-id",n.id))},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})(),sa=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.size=c(null),this.readonly=c(!1),this.hostClasses=U("button",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["","shButton",""]],hostAttrs:[1,"sh-sheet-h"],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},attrs:Jn,ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})(),ra=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.hostClasses=U("card",{color:this.color,variant:this.variant})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-card"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})(),qs=(()=>{class i{constructor(){this.currentClassList=bt(),this.color=c(null),this.variant=c(null),this.readonly=c(!1),this.hostClasses=U("checkbox",{color:this.color,variant:this.variant,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-checkbox"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"]},ngContentSelectors:ie,decls:7,vars:2,consts:[[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"]],template:function(t,n){t&1&&(I(),p(0,"div",0)(1,"sh-icon",1),y(2,"check-bold"),m(),p(3,"sh-icon",2),y(4,"minus-bold"),m()(),p(5,"div",3),h(6),m()),t&2&&A(n.currentClassList())},dependencies:[De],encapsulation:2,changeDetection:0})}}return i})(),Us=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.size=c(null),this.sharp=c(void 0),this.dynamic=c(void 0),this.readonly=c(!1),this.hostClasses=U("chip",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,dynamic:this.dynamic,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],dynamic:[1,"dynamic"],readonly:[1,"readonly"]},ngContentSelectors:ie,decls:2,vars:0,template:function(t,n){t&1&&(I(),F(0,"div"),h(1),L())},encapsulation:2,changeDetection:0})}}return i})();var Ys=(()=>{class i{constructor(){this.#e=new Date(new Date().setHours(0,0,0,0)),this.date=$(null),this.endDate=$(null),this.asRange=c(!1),this.monthsToShow=c(1),this.disabled=c(!1),this.startOfWeek=c(1),this.weekdayLabels=c(["Su","Mo","Tu","We","Th","Fr","Sa"]),this.daysRef=te("daysRef"),this.currentDate=v(this.date()??this.#e),this.monthOffsets=b(()=>Array.from({length:this.monthsToShow()},(e,t)=>t)),this.selectedDateStylePosition=v(null),this.weekdays=b(()=>{let e=this.startOfWeek(),t=this.weekdayLabels();return t.slice(e).concat(t.slice(0,e))}),this.currentClasses=bt(),this.someEffect=V(()=>{let e=this.currentClasses();this.#i()}),this.#n=V(()=>{this.monthsToShow()>1||this.#t()})}#e;getLastVisibleMonth(){let e=this.monthsToShow()-1;return this.getOffsetDate(e)}getOffsetDate(e){let t=new Date(this.currentDate());return t.setMonth(t.getMonth()+e),t}getMonthDates(e){let t=this.getOffsetDate(e);return this.#o(t,this.startOfWeek())}#n;ngOnInit(){this.monthsToShow()!==1&&this.#t()}#t(){let e=this.date();e&&this.currentDate.set(e),this.#i()}#i(){setTimeout(()=>{let e=this.daysRef()?.nativeElement.querySelector(".sel");if(!e)return this.selectedDateStylePosition.update(t=>t?G(k({},t),{opacity:"0"}):null);this.setSelectedDateStylePosition(e)})}#o(e,t){let n=e.getFullYear(),s=e.getMonth(),r=new Date(n,s,1).getDay(),a=new Date(n,s+1,0).getDate(),l=[],d=r-t;d<0&&(d+=7);let u=new Date(n,s,0).getDate();for(let w=d-1;w>=0;w--)l.push(new Date(n,s-1,u-w,0,0,0,0));for(let w=1;w<=a;w++)l.push(new Date(n,s,w,0,0,0,0));let _=1;for(;l.length%7!==0;)l.push(new Date(n,s+1,_++,0,0,0,0));return l}nextMonth(){this.currentDate.update(e=>{let t=new Date(e);return t.setMonth(e.getMonth()+1),t}),this.#i()}previousMonth(){this.currentDate.update(e=>{let t=new Date(e);return t.setMonth(e.getMonth()-1),t}),this.#i()}setDate(e,t){let n=(s,r)=>{let a=r?.getHours()??0,l=r?.getMinutes()??0,d=r?.getSeconds()??0,u=r?.getMilliseconds()??0;return new Date(s.getFullYear(),s.getMonth(),s.getDate(),a,l,d,u)};if(!this.asRange())this.date.set(n(e,this.date())),this.endDate.set(null);else{let s=this.date(),r=this.endDate(),a=n(e,null);s?r?(this.date.set(a),this.endDate.set(null)):a<s?(this.date.set(a),this.endDate.set(null)):this.endDate.set(a):this.date.set(a)}this.asRange()||this.setSelectedDateStylePosition(t)}isDateSelected(e){let t=this.date(),n=this.endDate();if(t===null)return null;let s=_=>new Date(_.getFullYear(),_.getMonth(),_.getDate(),0,0,0,0),r=_=>new Date(_.getFullYear(),_.getMonth(),_.getDate(),23,59,59,999),a=s(e),l=s(t),d=n?r(n):null,u=[];if(this.asRange())if(d===null)a.getTime()===l.getTime()&&u.push("sel first last");else{if(a.getTime()===l.getTime()&&u.push("first"),a.getTime()===s(d).getTime()&&u.push("last"),a>=l&&a<=d){u.push("sel");let T=a.getDay(),ue=this.startOfWeek();T===ue&&u.push("week-start");let St=(ue+6)%7;T===St&&u.push("week-end")}let _=new Date(a);_.setDate(a.getDate()+1),new Date(a).setDate(a.getDate()-1);let z=a.getDate()===1,E=_.getMonth()!==a.getMonth();z&&u.push("month-start"),E&&u.push("month-end")}else a.getTime()===l.getTime()&&u.push("sel");return u.join(" ")||null}setSelectedDateStylePosition(e){this.selectedDateStylePosition.set({transform:`translate(${e.offsetLeft}px, ${e.offsetTop}px)`,opacity:"1"})}getMonthName(e){return e.toLocaleString("default",{month:"long"})}getFullYear(e){return e.getFullYear()}isCurrentMonth(e,t){let n=this.getOffsetDate(t);return e.getMonth()===n.getMonth()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-datepicker"]],viewQuery:function(t,n){t&1&&fe(n.daysRef,eo,5),t&2&&oe()},hostVars:6,hostBindings:function(t,n){t&2&&(A("columns-"+n.monthsToShow()),N("as-range",n.asRange())("disabled",n.disabled()))},inputs:{date:[1,"date"],endDate:[1,"endDate"],asRange:[1,"asRange"],monthsToShow:[1,"monthsToShow"],disabled:[1,"disabled"],startOfWeek:[1,"startOfWeek"],weekdayLabels:[1,"weekdayLabels"]},outputs:{date:"dateChange",endDate:"endDateChange"},decls:14,vars:3,consts:[["daysRef",""],["elementRef",""],[3,"click"],[1,"title"],[1,"months-container"],[1,"month"],[1,"weekdays"],[1,"days"],[3,"out-of-scope","class"],[1,"sel-el"]],template:function(t,n){t&1&&(p(0,"header")(1,"button",2),x("click",function(){return n.previousMonth()}),p(2,"sh-icon"),y(3,"caret-left"),m()(),p(4,"div",3),y(5),S(6,to,1,1),y(7),m(),p(8,"button",2),x("click",function(){return n.nextMonth()}),p(9,"sh-icon"),y(10,"caret-right"),m()()(),p(11,"section",4),Ne(12,so,9,1,"div",5,ui),m()),t&2&&(f(5),J(" ",n.getMonthName(n.currentDate())," "),f(),M(n.monthsToShow()>1?6:-1),f(),J(" ",n.getFullYear(n.currentDate())," "),f(5),Ie(n.monthOffsets()))},dependencies:[De],encapsulation:2,changeDetection:0})}}return i})(),de=4,Xs=["scroll","auto"],Qs={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Zt=(()=>{class i{constructor(){this.#e=C(be),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=c(!1),this.disableOpenByClick=c(!1),this.isOpen=$(!1),this.options=c(),this.closed=le(),this.defaultOptionMerge=b(()=>k(k({},Qs),this.options())),this.triggerRef=te.required("triggerRef"),this.popoverRef=te("popoverRef"),this.popoverContentRef=te("popoverContentRef"),this.id=v("--"+nt()),this.menuStyle=v(null),this.openAbort=null,this.openEffect=V(()=>{let e=this.isOpen();queueMicrotask(()=>{let t=this.popoverRef()?.nativeElement;if(!t){this.openAbort?.abort(),this.openAbort=null;return}if(e){if(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,this.#e.addEventListener("keydown",n=>{n.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&n.preventDefault(),n.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.openAbort?.signal}),!t.isConnected)return;t.showPopover(),this.SUPPORTS_ANCHOR||setTimeout(()=>{this.#n(t).addEventListener("scroll",()=>this.#u(),{signal:this.openAbort?.signal}),window?.addEventListener("resize",()=>this.#u(),{signal:this.openAbort?.signal}),this.#u()})}else this.closed.emit(),t.hidePopover(),this.openAbort?.abort(),this.openAbort=null})})}#e;toggleIsOpen(e){this.disableOpenByClick()||(e.preventDefault(),e.stopPropagation(),this.isOpen.set(!this.isOpen()))}eventClose(e){this.isOpen()&&this.isOpen.set(!1)}#n(e){let t=e.parentElement;for(;t;){if(Xs.indexOf(window?.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return this.#e.documentElement}#t(e,t){return{left:e.left,top:e.bottom+de}}#i(e,t){return{left:e.left,top:e.top-t.height-de}}#o(e,t){return{left:e.right-t.width,top:e.bottom+de}}#r(e,t){return{left:e.right-t.width,top:e.top-t.height-de}}#a(e,t){return{left:e.right+de,top:e.top}}#s(e,t){return{left:e.left-t.width-de,top:e.top}}#l(e,t){return{left:e.right+de,top:e.top+e.height/2-t.height/2}}#c(e,t){return{left:e.left-t.width-de,top:e.top+e.height/2-t.height/2}}#d(e,t){return{left:e.right+de,top:e.bottom-t.height}}#h(e,t){return{left:e.left-t.width-de,top:e.bottom-t.height}}#p(e,t){return e.left>=0&&e.top>=0&&e.left+t.width<=window.innerWidth&&e.top+t.height<=window.innerHeight}#f(e,t){return{left:Math.max(0,Math.min(e.left,window.innerWidth-t.width)),top:Math.max(0,Math.min(e.top,window.innerHeight-t.height))}}#u(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverContentRef()?.nativeElement.getBoundingClientRect();if(!e||!t)return;let n=[this.#t,this.#i,this.#o,this.#r,this.#a,this.#s,this.#l,this.#c,this.#d,this.#h],s=[this.#a,this.#d,this.#s,this.#h,this.#l,this.#c,this.#t,this.#i,this.#o,this.#r],r=this.asMultiLayer()?s:n;for(let l of r){let d=l.call(this,e,t);if(this.#p(d,t)){this.menuStyle.set({left:d.left+"px",top:d.top+"px"});return}}let a=this.#f(r[0].call(this,e,t),t);this.menuStyle.set({left:a.left+"px",top:a.top+"px"})}ngOnDestroy(){this.openAbort?.abort(),this.openAbort=null}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-popover"]],viewQuery:function(t,n){t&1&&fe(n.triggerRef,ro,5)(n.popoverRef,ao,5)(n.popoverContentRef,lo,5),t&2&&oe(3)},hostVars:2,hostBindings:function(t,n){t&2&&N("multi-layer",n.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:uo,decls:8,vars:4,consts:[["triggerRef",""],["popoverRef",""],["popoverContentRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","manual",1,"popover"],[1,"overlay",3,"click"],[1,"popover-content"]],template:function(t,n){t&1&&(I(co),F(0,"div",3,0),Ee("click",function(r){return n.toggleIsOpen(r)}),F(2,"div",4),h(3),h(4,1),h(5,2),L(),Me(6,"div",5),L(),S(7,ho,6,5,"div",6)),t&2&&(ne("popovertarget",n.id()+"hello"),f(6),K("anchor-name",n.id()),f(),M(n.isOpen()?7:-1))},encapsulation:2,changeDetection:0})}}return i})(),Zs=(()=>{class i{constructor(){this.#e=C(P),this.isOpen=$(!1),this.closed=le()}#e;onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}close(){this.closed.emit()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let a=function(){r.style.height="auto",r.style.height=r.scrollHeight+"px"},l=function(){setTimeout(a,0)};var n=a,s=l;let r=this.#e.nativeElement.querySelector("textarea");r&&(r.addEventListener("change",a),r.addEventListener("cut",l),r.addEventListener("paste",l),r.addEventListener("drop",l),r.addEventListener("keydown",l),r.focus(),r.select(),a())}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-form-field-popover"]],hostBindings:function(t,n){t&1&&x("click",function(){return n.onClick()})},inputs:{isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:fo,decls:18,vars:3,consts:[[3,"isOpenChange","closed","isOpen","options"],["trigger","",1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(t,n){t&1&&(I(po),h(0),p(1,"sh-popover",0),Ge("isOpenChange",function(r){return $e(n.isOpen,r)||(n.isOpen=r),r}),x("closed",function(){return n.close()}),p(2,"div",1)(3,"div",2),h(4,1),h(5,2),m(),ae(6,"div",3),h(7,3),h(8,4),h(9,5),ae(10,"div",4),h(11,6),m(),h(12,7),m(),p(13,"div",5)(14,"div",6),h(15,8),m(),p(16,"div",7),h(17,9),m()()),t&2&&(f(),We("isOpen",n.isOpen),Y("options",lt(2,Gi)))},dependencies:[Zt],encapsulation:2,changeDetection:0})}}return i})();function Ks(i){let o=C(P).nativeElement,e=C(ge),t=v([]),n=()=>{t.set(Array.from(o.querySelectorAll(i)))};if(n(),typeof MutationObserver>"u")return t.asReadonly();let s=new MutationObserver(r=>{r.some(l=>l.type==="childList")&&n()});return s.observe(o,{childList:!0}),e.onDestroy(()=>s.disconnect()),t.asReadonly()}var aa=(()=>{class i{constructor(){this.ngModels=It(Ct),this.#e=C(Rt),this.#n=v(null),this.masking=c("mediumDate"),this.closed=le(),this._maskedDate=b(()=>{let e=this.internalDate(),t=this.masking();return t?e?this.#e.transform(e,t):null:e}),this.internalDate=v(null),this.isOpen=$(!1),this.currentClass=bt(),this.#t=Ks("#input-wrap input"),this.#i=V(()=>{let e=this.#t();if(!e.length)return;let t=e[0];t&&(this.#o(t),t.addEventListener("inputValueChanged",n=>{this.internalDate.set(n.detail.value?new Date(n.detail.value):null)}),t.addEventListener("focus",()=>{this.isOpen.set(!0),t.blur()}),this.#n.set(t),t.autocomplete="off",typeof t.value=="string"&&this.internalDate.set(t.value?new Date(t.value):null))})}#e;#n;#t;onDateChange(e){this.internalDate.set(e);let t=this.#n();t&&(t.value=e?e.toString():"",t.dispatchEvent(new Event("input")))}close(){this.closed.emit(this.internalDate())}#i;#o(e){return Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}}),e}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(t,n,s){t&1&&wt(s,n.ngModels,Ct,5),t&2&&oe()},inputs:{masking:[1,"masking"],isOpen:[1,"isOpen"]},outputs:{closed:"closed",isOpen:"isOpenChange"},features:[Q([Rt])],ngContentSelectors:mo,decls:15,vars:3,consts:[["defaultIndicator",""],[3,"closed","isOpenChange","isOpen"],["id","input-wrap","ngProjectAs","input",5,["input"],1,"input"],[1,"masked-value"],["suffix","",1,"default-indicator"],["popoverContent",""],[3,"date","class"],[3,"dateChange","date"]],template:function(t,n){if(t&1){let s=X();I(go),p(0,"sh-form-field-popover",1),x("closed",function(){return n.close()}),Ge("isOpenChange",function(a){return H(s),$e(n.isOpen,a)||(n.isOpen=a),j(a)}),h(1,0,["ngProjectAs","label",5,["label"]]),h(2,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),h(3,2,["ngProjectAs","[textPrefix]",5,["","textPrefix",""]]),p(4,"div",2),S(5,vo,2,1,"div",3),h(6,3),m(),h(7,4,["ngProjectAs","[textSuffix]",5,["","textSuffix",""]]),h(8,5,["ngProjectAs","[suffix]",5,["","suffix",""]]),p(9,"sh-icon",4),y(10,"calendar"),m(),p(11,"div",5),S(12,_o,1,3,"sh-datepicker",6),m()(),pe(13,yo,0,0,"ng-template",null,0,hi)}t&2&&(We("isOpen",n.isOpen),f(5),M(n.masking()?5:-1),f(7),M(n.isOpen()?12:-1))},dependencies:[Ys,Zs,De],encapsulation:2,changeDetection:0})}}return i})();var Js=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-divider"]],ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})();var Kt=(()=>{class i{#e;onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}constructor(){this.#e=C(P),this.color=c(null),this.variant=c(null),this.size=c(null),this.readonly=c(!1),this.hostClasses=U("formField",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),Mt(()=>{let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let r=function(){t.style.height="auto",t.style.height=t.scrollHeight+"px"},a=function(){setTimeout(r,0)};var n=r,s=a;t.addEventListener("change",r),t.addEventListener("cut",a),t.addEventListener("paste",a),t.addEventListener("drop",a),t.addEventListener("keydown",a),t.focus(),t.select(),r()}})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-form-field"]],hostVars:2,hostBindings:function(t,n){t&1&&x("click",function(){return n.onClick()}),t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],readonly:[1,"readonly"]},ngContentSelectors:Do,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(t,n){t&1&&(I(Co),h(0),F(1,"div",0)(2,"div",1),h(3,1),h(4,2),h(5,3),L(),h(6,4),h(7,5),F(8,"div",2),h(9,6),h(10,7),h(11,8),L()(),F(12,"div",3)(13,"div",4),h(14,9),L(),F(15,"div",5),h(16,10),L()())},encapsulation:2,changeDetection:0})}}return i})(),la=(()=>{class i{constructor(){this._el=C(P),this.inputRef=te.required("input"),this.filesOver=v(!1),this.multiple=c(),this.accept=c(null),this.placeholder=$("Click or drag files here"),this.overlayText=c("Drop files here"),this.files=$([]),this.fileUploadClasses=b(()=>this._el.nativeElement.classList.toString()),this.inputEffect=V(()=>{let e=this.inputRef().nativeElement;e&&(e.placeholder&&this.placeholder.set(e.placeholder),e.addEventListener("dragover",t=>{t.preventDefault(),this.filesOver.set(!0)}),e.addEventListener("dragleave",t=>{t.preventDefault(),this.filesOver.set(!1)}),e.addEventListener("drop",t=>{t.preventDefault(),this.filesOver.set(!1);let n=t.dataTransfer?.files;n&&n.length>0&&(this.handleFileUpload(Array.from(n)),e.files=n)}),e.addEventListener("change",t=>{t.preventDefault(),this.handleFileUpload(Array.from(t.target.files))}))})}handleFileUpload(e){this.multiple()?this.files.update(t=>[...t,...e]):this.files.set(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-file-upload"]],viewQuery:function(t,n){t&1&&fe(n.inputRef,bo,5),t&2&&oe()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:Mo,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(t,n){t&1&&(I(So),p(0,"sh-form-field"),h(1,0,["ngProjectAs","label",5,["label"]]),p(2,"div",2,0),S(4,Eo,2,1,"div",3)(5,xo,2,1,"div",3)(6,wo,2,1,"div",4),ae(7,"input",5,1)(9,"div",6),m(),p(10,"sh-icon",7),y(11,"upload-simple"),m()()),t&2&&(A(n.fileUploadClasses()),f(4),M(n.files().length===1?4:n.files().length>1?5:6),f(3),ne("multiple",n.multiple())("accept",n.accept()),f(2),N("files-over",n.filesOver()))},dependencies:[Kt,De],encapsulation:2,changeDetection:0})}}return i})(),ca=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-list"]],ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})();function er(i,o){let e=v(null),t=o.map(l=>l.toUpperCase()),n=C(Ve),s=n.get(ge);if(fi(n.get(ai))||typeof MutationObserver>"u")return e.asReadonly();if(t.find(l=>i.nativeElement.querySelector(l)))return e.set(new P(i.nativeElement.querySelector(o[0]))),e.asReadonly();let a=new MutationObserver(l=>{for(let d of l)if(d.addedNodes){for(let u of Array.from(d.addedNodes))if(u.nodeType===Node.ELEMENT_NODE&&t.includes(u.nodeName)){e.set(new P(u)),a.disconnect();return}}});return a.observe(i.nativeElement,{childList:!0,subtree:!0}),s.onDestroy(()=>a.disconnect()),e.asReadonly()}function Yi(i,o){let e=C(Ve),t=e.get(ge),n=v([]),s=null,r=null,a=(d,u)=>{r&&r.disconnect();let _=Array.from(d.nativeElement.querySelectorAll(u.join(",")));n.set(_),typeof MutationObserver<"u"&&(r=new MutationObserver(w=>{queueMicrotask(()=>{let z=Array.from(d.nativeElement.querySelectorAll(u.join(",")));n.set(z)})}),r.observe(d.nativeElement,{childList:!0,subtree:!0})),t.onDestroy(()=>l())};s=V(()=>{let d=typeof i=="function"&&i[ei]?i():i,u=typeof o=="function"?o():o;d&&u?.length>0?a(d,u):(n.set([]),r&&(r.disconnect(),r=null))},{injector:e});function l(){s&&s.destroy(),r&&r.disconnect()}return{signal:n.asReadonly(),destroy:l}}function tr(i,o=["input","textarea"]){let e=i||er(C(P),o),t=v(void 0),n=C(Ve),s=n.get(ge),r=v(null);V(l=>{let d=e();if(!d)return;let u=d.nativeElement;u&&(ir(u),r.set(u),t.set(u.value??""),l(()=>{r.set(null)}))},{injector:n});let a=null;return V(()=>{let l=r();if(!l)return;a&&(a(),a=null);let d=_=>{t.set(_.detail.value)},u=_=>{t.set(_.target.value)};l.addEventListener("input",u),l.addEventListener("inputValueChanged",d),t.set(l.value),a=()=>{l.removeEventListener("input",u),l.removeEventListener("inputValueChanged",d)},s.onDestroy(()=>{a&&a()})},{injector:n}),V(()=>{let l=r();if(!l)return;let d=t();d&&(l.value=d,l.dispatchEvent(new Event("input")))},{injector:n}),t}function ir(i){return Object.defineProperty(i,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),"value").get.call(this)},set(o){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),"value").set.call(this,o);let t=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:o}});return this.dispatchEvent(t),o}}),i}var da=(()=>{class i{constructor(){this.#e=C(be),this.#n=C(ve),this.asMultiLayer=c(!1),this.openIndicator=c(!1),this.disabled=c(!1),this.customOptionElementSelectors=c(["button"]),this.keepClickedOptionActive=c(!1),this.closeOnClick=c(!0),this.isOpen=$(!1),this.closed=le(),this.searchable=c(!1),this.activeOptionIndex=v(-1),this.inputRef=te("inputRef"),this.optionsRef=te("optionsRef"),this.openMenusEffect=V(e=>{this.isOpen()&&i.openMenus.push(this),e(()=>{let t=i.openMenus.indexOf(this);t>-1&&i.openMenus.splice(t,1)})}),this.options=Yi(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=b(()=>this.options.signal().filter(e=>!e.disabled)),this.inputValue=tr(this.inputRef),this.optionsId=nt(),this.activeOptionId=v(void 0),this.abortController=null,this.optionsEffect=V(()=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;this.abortController=new AbortController,this.searchable()||this.#e.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),t.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal}),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let r=s.target,a=this.activeElements();if(!a.length){let d=this.optionsEl();this.activeElements.set(d),a=d}let l=a.findIndex(d=>d===r);l>-1&&(this.activeOptionIndex.set(l),t.focus())}))}),this.keyDownEventListener=e=>{if(i.openMenus.at(-1)!==this)return;let t=this.activeOptionIndex();if(e.key==="ArrowDown")e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(t));else if(e.key==="ArrowUp")e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(t));else if(e.key==="Enter"){if(e.preventDefault(),t>-1){let n=this.activeElements()[t];if(n.parentElement?.hasAttribute("trigger")){let r=new CustomEvent("ship-menu-open",{bubbles:!0,cancelable:!0});n.dispatchEvent(r)}else n.click(),queueMicrotask(()=>this.close("active"))}}else e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},this._lastElementList=[],this.activeElements=v([]),this.lastInputValue="",this.inputValueEffect=V(()=>{if(!this.searchable())return;let t=(this.inputValue()??"").toLowerCase();if(this.#i(),!t||t===""){let s=this.optionsEl();this.activeElements.set(s),this._lastElementList=s;for(let r=0;r<s.length;r++)this.#n.removeStyle(s[r],"order"),s[r].id||(s[r].id=`${this.optionsId}-option-${r}`),s[r].setAttribute("role","option");return}if(!t||t==="")return;let n=this._lastElementList.length&&t.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=t;for(let s=0;s<n.length;s++){let r=n[s],a=r.textContent?.toLowerCase()||"",l=this.#t(a,t);r.value=l}n=n.filter(s=>s.value>0).sort((s,r)=>r.value-s.value);for(let s=0;s<n.length;s++)this.#n.setStyle(n[s],"order",s);this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option")}),this.activeOptionIndexEffect=V(()=>{let e=this.activeElements(),t=this.activeOptionIndex();for(let n=0;n<e.length;n++)e[n].classList.remove("active"),e[n].removeAttribute("aria-selected");if(t>-1){let n=e[t];n.scrollIntoView({block:"center"}),n.classList.add("active"),n.setAttribute("aria-selected","true"),this.activeOptionId.set(n.id)}else this.activeOptionId.set(void 0)})}#e;#n;static{this.openMenus=[]}toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open())}open(){this.disabled()||(this.isOpen.set(!0),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()))}onShipMenuOpen(e){e.preventDefault(),e.stopPropagation(),this.open()}#t(e,t){if(!t)return 0;let n=0,s=-1,r=0,a=!0;for(let l=0;l<t.length;l++){let d=t[l];if(e.length>s+1&&e[s+1]===d)n+=l===0?100:150,s++,r++;else{let u=e.indexOf(d,s+1);if(l>0&&(a=!1),u===-1)return 0;n+=100,s=u,r++}}return a&&t.length===r&&(n+=1e3),n+=r*20,n}nextActiveIndex(e){let t=this.activeElements();if(!t.length){let s=this.optionsEl();this.activeElements.set(s),t=s}if(e===-1||e===t.length-1)return 0;let n=e+1;return t[n].disabled?this.nextActiveIndex(n):n}prevActiveIndex(e){let t=this.activeElements();if(!t.length){let s=this.optionsEl();this.activeElements.set(s),t=s}if(e===0||e===-1)return t.length-1;let n=e-1;return t[n].disabled?this.prevActiveIndex(n):n}close(e="closed",t){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||e==="closed")&&this.#i(),this.isOpen.set(!1),this.closed.emit(e==="active"))}#i(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active"),e[t].removeAttribute("aria-selected")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let e=i.openMenus.indexOf(this);e>-1&&i.openMenus.splice(e,1)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-menu"]],viewQuery:function(t,n){t&1&&fe(n.inputRef,Oo,5)(n.optionsRef,To,5),t&2&&oe(2)},hostVars:6,hostBindings:function(t,n){t&1&&x("ship-menu-open",function(r){return n.onShipMenuOpen(r)}),t&2&&N("disabled",n.disabled())("has-search",n.searchable())("multi-layer",n.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:No,decls:12,vars:20,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(t,n){if(t&1){let s=X();I(Vo),p(0,"sh-popover",3,0),Ge("isOpenChange",function(a){return H(s),$e(n.isOpen,a)||(n.isOpen=a),j(a)}),x("closed",function(){return n.close("fromPopover")}),p(2,"div",4),x("click",function(a){return n.toggleIsOpen(a)}),h(3),S(4,Io,2,0,"sh-icon",5),m(),p(5,"div",6)(6,"sh-form-field",7),ae(7,"input",8,1),m()(),p(9,"div",9,2),x("click",function(){return n.close("active")}),h(11,1),m()()}t&2&&(We("isOpen",n.isOpen),Y("disableOpenByClick",!0)("asMultiLayer",n.asMultiLayer())("options",lt(19,Gi)),f(2),N("is-open",n.isOpen()),ne("aria-expanded",n.isOpen())("aria-controls",n.optionsId)("aria-activedescendant",n.activeOptionId()),f(2),M(n.openIndicator()?4:-1),f(2),N("hidden",n.searchable()===!1),f(),ne("aria-expanded",n.isOpen())("aria-controls",n.optionsId)("aria-activedescendant",n.activeOptionId()),f(2),N("searching",n.searchable()&&n.inputValue()!==""),Y("id",n.optionsId),ne("aria-activedescendant",n.activeOptionId()))},dependencies:[Zt,Kt,De],encapsulation:2,changeDetection:0})}}return i})(),nr=(()=>{class i{constructor(){this.value=c(void 0),this.color=c(null),this.variant=c(null),this.hostClasses=U("progressBar",{color:this.color,variant:this.variant})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-progress-bar"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{value:[1,"value"],color:[1,"color"],variant:[1,"variant"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,n){t&1&&Me(0,"div",0),t&2&&K("width",n.value(),"%")},encapsulation:2,changeDetection:0})}}return i})(),ua=(()=>{class i{constructor(){this.currentClassList=bt(),this.color=c(null),this.variant=c(null),this.readonly=c(!1),this.hostClasses=U("radio",{color:this.color,variant:this.variant,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-radio"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"]},ngContentSelectors:ie,decls:2,vars:2,consts:[[1,"radio","sh-sheet"]],template:function(t,n){t&1&&(I(),Me(0,"div",0),h(1)),t&2&&A(n.currentClassList())},encapsulation:2,changeDetection:0})}}return i})(),ha=(()=>{class i{constructor(){this.#e=C(P),this.#n=null,this.#t=null,this.#i=0,this.unit=c(""),this.value=$(this.#i),this.inputState=v({min:0,max:100,step:1}),this.valuePercentage=b(()=>{let{min:e,max:t}=this.inputState(),n=this.value()??e;if(isNaN(n))return 0;let s=t-e;if(s===0)return 0;let r=(n-e)/s*100;return Math.max(0,Math.min(100,r))}),this.trackFilledPercentage=b(()=>this.valuePercentage()),this.thumbPositionPercentage=b(()=>this.valuePercentage()),this.syncModelToInputEffect=V(()=>{let e=this.value();if(this.#t){let t=parseFloat(this.#t.value);(isNaN(t)||String(t)!==String(e))&&(this.#t.value=String(e))}})}#e;#n;#t;#i;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#s(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",e=>{this.setNewInputValue(e.detail.value)}),queueMicrotask(()=>this.#o(!0)),this.#r()):console.error('ShipRangeSlider: No <input type="range"> element found projected inside.')}setNewInputValue(e){let t=parseFloat(e??"0");if(!isNaN(t)){let{min:n,max:s}=this.inputState();this.value.set(Math.max(n,Math.min(s,t)))}}trackEvent(e){if(!this.#t||this.#t.readOnly||this.#t.disabled){e.preventDefault(),e.stopPropagation();return}if(e.target===this.#t||e.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let n=e.currentTarget.getBoundingClientRect(),s=e.clientX-n.left,r=n.width,{min:a,max:l,step:d}=this.inputState(),u=l-a;if(r>0&&u!==0&&d>0){let w=(s/r*u+a-a)/d,z=a+Math.round(w)*d,E=this.#a(d);z=parseFloat(z.toFixed(E));let T=Math.max(a,Math.min(l,z));this.value.set(T)}}#o(e=!1){if(!this.#t)return;let t=parseFloat(this.#t.min??"0")??0,n=parseFloat(this.#t.max??"100")??100,s=this.#t.step,r=1;if(s&&s.toLowerCase()!=="any"){let l=parseFloat(s);!isNaN(l)&&l>0&&(r=l)}this.inputState.set({min:t,max:n,step:r});let a=parseFloat(this.#t.value??String(t))??t;if(e&&this.value()!==this.#i){let l=this.value(),d=Math.max(t,Math.min(n,l));a!==d&&(this.#t.value=String(d)),l!==d&&this.value.set(d)}else{let l=Math.max(t,Math.min(n,a));this.value()!==l&&this.value.set(l)}}#r(){if(!this.#t||typeof MutationObserver>"u")return;let e=["min","max","step","value","readonly","disabled"];this.#n=new MutationObserver(t=>{let n=!1;for(let s of t)if(s.type==="attributes"&&e.includes(s.attributeName??"")){n=!0;break}n&&this.#o(!1)}),this.#n.observe(this.#t,{attributes:!0,attributeFilter:e})}#a(e){if(isNaN(e)||Math.floor(e)===e)return 0;let n=e.toString().split(".")[1];return n?n.length:0}#s(e){Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}})}ngOnDestroy(){this.#n&&this.#n.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-range-slider"]],hostVars:2,hostBindings:function(t,n){t&2&&N("has-input",n.hasInputElement)},inputs:{unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:Po,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(t,n){t&1&&(I(Ao),F(0,"div",0),h(1),L(),F(2,"div",1)(3,"div",2),y(4),L(),F(5,"div",3),Ee("click",function(r){return n.trackEvent(r)}),h(6,1),F(7,"div",4),Me(8,"div",5),L(),F(9,"div",6)(10,"div",7)(11,"div",8),y(12),L()()()(),F(13,"div",9),y(14),L()()),t&2&&(f(4),rt("",n.inputState().min,"",n.unit()),f(4),K("width",n.trackFilledPercentage(),"%"),f(),K("left",n.thumbPositionPercentage(),"%"),f(3),rt("",n.value(),"",n.unit()),f(2),rt("",n.inputState().max,"",n.unit()))},encapsulation:2,changeDetection:0})}}return i})(),or=(()=>{class i{constructor(){this.color=c(null),this.hostClasses=U("spinner",{color:this.color})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-spinner"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})}}return i})(),pa=(()=>{class i{constructor(){this.#e=C(P),this.value=c(),this.label=c(),this.asFreeText=c(!1),this.optionTitle=c(null),this.freeTextTitle=c(null),this.freeTextPlaceholder=c("Type to create a new option"),this.validateFreeText=c(),this.placeholder=c(),this.readonly=$(!1),this.disabled=$(!1),this.lazySearch=c(!1),this.inlineSearch=c(!1),this.asText=c(!1),this.isClearable=c(!0),this.selectMultiple=c(!1),this.optionTemplate=c(null),this.selectedOptionTemplate=c(null),this.placeholderTemplate=c(null),this.freeTextOptionTemplate=c(null),this.isOpen=$(!1),this.isLoading=$(!1),this.options=$([]),this.selectedOptions=$([]),this.cleared=le(),this.onAddNewFreeTextOption=le(),this.computedFreeTextOption=b(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#n=v(null),this.inlineTemplate=It(st),this.optionsWrapRef=te.required("optionsWrap"),this.inputRefInput=v(null),this.#t=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new P(t.target)),this.#t.disconnect())}),this.inputValue=v(""),this.prevInputValue=v(null),this.focusedOptionIndex=v(-1),this._isClearable=b(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=b(()=>this.#e.nativeElement.classList.toString()),this.stretch=b(()=>this.selectClasses().includes("stretch")),this.small=b(()=>this.selectClasses().includes("small")),this.placeholderText=b(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=b(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#s(n,t)):e}),this.filteredOptions=b(()=>{let e=this.options()||[],t=this.label(),n=this.value(),s=this.inlineSearch(),r=this.inputValue().toLowerCase(),a=this.#c(r);if(e.length<=0)return[];if(!s||r==="")return e;let d=e.filter(u=>{let _=t?(this.#s(u,t)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),w=((n?this.#s(u,n):u)??"").toString().toLowerCase(),z=a.test(_),E=a.test(w);return z||E}).map(u=>{let _=t?(this.#s(u,t)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),w=((n?this.#s(u,n):u)??"").toString().toLowerCase(),z=this.#i(_,r),E=this.#i(w,r);return{item:u,score:Math.max(z,E)}});return d.sort((u,_)=>_.score-u.score),d.map(u=>u.item)}),this.#o=nt(),this.inputRefEl=b(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.#o}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns","optionsWrapId"),this.#l(t),t.addEventListener("focus",()=>{this.readonly()||this.open()}),t.addEventListener("input",n=>{let s=n.target.value,r=this.inputValue();s!==r&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(s),this.updateInputElValue())}),t.addEventListener("inputValueChanged",n=>{let s=n.detail.value,r=this.inputValue();if(s!==r){if(s===""){this.clear();return}this.setSelectedOptionsFromValue(s),this.setInputValueFromOptions(this.selectedOptions()),this.#a()}}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=V(()=>{let e=this.inputRefEl();if(!e)return;let t=this.getLabelAsSlug(this.filteredOptions()[this.focusedOptionIndex()]);t?e.setAttribute("aria-activedescendant",t):e.removeAttribute("aria-activedescendant")}),this.openAbortController=null,this.isOpenEffect=V(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),s=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",r=>{if((r.key==="Escape"||r.key==="Tab")&&(r.preventDefault(),this.close()),r.key==="Enter"&&(r.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,!0)),r.key==="ArrowDown"){r.preventDefault();let a=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(a>this.filteredOptions().length-1?s:a)}if(r.key==="ArrowUp"){r.preventDefault();let a=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(a<s?this.filteredOptions().length-1:a)}},{signal:this.openAbortController?.signal})}else{let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=V(()=>{let e=this.inputValue();this._inputValue=e}),this.inputRefElEffect=V(()=>{let e=this.inputRefEl();e&&e.value!==this._inputValue&&(this.disabled.set(e.disabled),this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions()))}),this.selectedLabels=b(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=b(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=b(()=>this.inlineSearch()||this.lazySearch()),this.#r=V(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(s=>t?this.#s(s,t):s).join(",");this.inputValue.set(n)})}#e;#n;#t;#i(e,t){if(!t)return 0;let n=0,s=-1,r=0,a=!0;for(let l=0;l<t.length;l++){let d=t[l];if(e.length>s+1&&e[s+1]===d)n+=l===0?100:150,s++,r++;else{let u=e.indexOf(d,s+1);if(l>0&&(a=!1),u===-1)return 0;n+=100,s=u,r++}}return a&&t.length===r&&(n+=1e3),n+=r*20,n}#o;#r;ngOnInit(){this.setInitInput()}setInitInput(){let e=this.#e.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new P(e));return}let t=this.#e.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new P(t));return}typeof MutationObserver<"u"&&this.#t.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),s=this.selectMultiple(),r=e.toString().split(",");if(r.length===0){this.selectedOptions.set([]);return}let a=s?r:[r[0]],l=t.filter(d=>{let u=n?this.#s(d,n)?.toString():d?.toString();return u&&a.includes(u)});this.selectedOptions.set(s?l:[l[0]])}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(s=>t?this.#s(s,t):s).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue())}getValue(e){let t=this.value();return t?this.#s(e,t):e}getLabel(e){let t=this.label();return t?this.#s(e,t):e}getLabelAsSlug(e){let t=this.getLabel(e);return!t||typeof t!="string"?"":t.replaceAll(" ","-")}toggleOptionByIndex(e,t,n=!1){let s=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let _=this.computedFreeTextOption(),w=this.getValue(_);if(!(this.validateFreeText()??(T=>!0))(w))return;this.options.update(T=>T.findIndex(St=>this.getValue(St)===w)>-1?T:(this.onAddNewFreeTextOption.emit(w),[_,...T])),e=0,s=_}else if(!s){this.close();return}t&&t.stopPropagation();let r=this.selectMultiple(),a=this._isClearable(),l=this.value(),d=this.selectedOptionValues(),u=l?this.#s(s,l):s;this.prevInputValue.set(null),this.#n.set(null),this.selectedOptions.update(_=>{let w=d.indexOf(u);if(w>-1){let z=[..._.slice(0,w),..._.slice(w+1)];return a||z.length>0?z:_}else return this.focusedOptionIndex.set(e),r?[..._,s]:[s]}),r?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromOptions(this.selectedOptions()),r&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions())}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],s=t?this.#s(n,t):n;return this.selectedOptionValues().indexOf(s)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#n.set(this.selectedOptions()),this.selectMultiple()||this.#a())}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(s=>t?this.#s(s,t)===e:s===e);this.focusedOptionIndex.set(n)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let e=this.prevInputValue(),t=this.#n();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions())}clear(e){e?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();e&&(e.value=t,e.dispatchEvent(new Event("input")))}#s(e,t){return t.split(".").reduce((n,s)=>n?.[s],e)}#l(e){Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let s=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(s),t}})}#c(e){let t=(e??"").toLowerCase(),n="^";for(let s of t)n+=".*"+this.#d(s);return n+=".*$",new RegExp(n,"i")}#d(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#t.disconnect()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,s){t&1&&wt(s,n.inlineTemplate,st,5),t&2&&oe()},viewQuery:function(t,n){t&1&&fe(n.optionsWrapRef,Fo,5),t&2&&oe()},hostVars:2,hostBindings:function(t,n){t&2&&N("multiple",n.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:Ro,decls:33,vars:25,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["id","optionsWrapId","role","listbox",1,"ship-options"],["title",""],[1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click","id"],[3,"class","active"]],template:function(t,n){if(t&1){let s=X();I(ko),at(0)(1)(2)(3)(4)(5)(6),p(7,"sh-popover",2,0),Ge("isOpenChange",function(a){return H(s),$e(n.isOpen,a)||(n.isOpen=a),j(a)}),x("closed",function(){return n.close()}),p(9,"sh-form-field",3),x("click",function(){return n.open()}),h(10,0,["ngProjectAs","label",5,["label"]]),h(11,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),h(12,2,["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]]),p(13,"div",4)(14,"div",5),S(15,Bo,1,1)(16,Zo,2,0)(17,ts,2,1),h(18,3),h(19,4),m()(),S(20,is,2,0,"sh-icon",6)(21,ns,1,0,"sh-spinner",7)(22,os,2,0,"sh-icon",6)(23,ss,2,0,"sh-icon",6)(24,rs,2,0,"sh-icon",6)(25,as,2,0,"sh-icon",6)(26,ls,2,0,"sh-icon",6),m(),p(27,"div",8,1),S(29,vs,3,3),S(30,_s,2,1,"p",9),Ne(31,Ss,4,8,"li",10,ze),m()()}if(t&2){se(n.placeholderTemplate());let s=n.optionTemplate();f(),se(n.freeTextOptionTemplate());let r=n.selectedOptionTemplate(),a=n.inlineTemplate();f();let l=se(n.selectedOptions()),d=n.inputState();f(),se(r||s||a),f(),se(s||a),f();let u=se(!n.asText()&&n.selectMultiple());f();let _=se(n.isOpen()&&n.hasSearch()&&(u||n.inputValue().length>-1));f(),We("isOpen",n.isOpen),Y("disableOpenByClick",!0)("options",lt(24,Lo)),f(2),N("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),f(4),N("show-search-text",_),f(),N("is-selected",d==="selected"),f(),M(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:l.length>0?16:_?-1:17),f(5),M(d==="closed"?20:d==="loading"?21:d==="open-searching"?22:d==="searching"?23:d==="selected"&&n._isClearable()?24:d==="selected"&&!n._isClearable()?25:26),f(9),M(n.asFreeText()?29:-1),f(),M(n.optionTitle()&&n.filteredOptions().length>0?30:-1),f(),Ie(n.filteredOptions())}},dependencies:[kt,Zt,Kt,De,qs,or,Us,Js],encapsulation:2,changeDetection:0})}}return i})();function sr(i){let o=C(P),e=C(ge),t=v(!1),n=typeof MutationObserver<"u"&&new MutationObserver(s=>{s.forEach(r=>{r.type==="attributes"&&r.attributeName==="class"&&t.set(o.nativeElement.classList.contains(i))})});return ri(o.nativeElement,()=>{n&&n.observe(o.nativeElement,{attributes:!0}),t.set(o.nativeElement.classList.contains(i))}),e.onDestroy(()=>{n&&n.disconnect()}),t}var fa=(()=>{class i{constructor(){this.#e=C(be),this.#n=C(P),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=c(!1),this.isOpen=$(!1),this.isOverlay=sr("overlay"),this.#t=this.#n.nativeElement.parentElement,this.#i=this.#t.getBoundingClientRect&&this.#t.getBoundingClientRect(),this.dragImageElement=te.required("dragImageElement"),this.dragIsEnding=v(!1),this.dragIsOnScreen=v(!0),this.isDragging=v(!1),this.dragPositionX=v(0),this.dragActualPositionX=b(()=>{let e=this.dragPositionX(),t=280,n=100,s=.008,r=t/2,a=r-n/2,l=r+n/2;if(e>l){let d=e-l,_=(t-l)*(1-Math.exp(-s*d));return l+_}else if(e<a){let d=a-e,_=a*(1-Math.exp(-s*d));return a-_}return e}),this.draggingStyle=b(()=>!this.isOverlay()||this.disableDrag()?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=V(()=>{this.disableDrag()||(this.isDragging()?this.#e.body.classList.add("dragging"):this.#e.body.classList.remove("dragging"))})}#e;#n;#t;#i;drop(e){e.stopPropagation(),this.#o(e.clientX-this.#i.left)}#o(e){this.isDragging.set(!1),e>=this.openWidthTreshold?this.isOpen.set(!0):this.isOpen.set(!1)}dragEnd(e){e.clientX-this.#i.left<0&&this.#o(0),e.clientX-this.#i.left>this.openWidthTreshold&&this.#o(this.openWidthTreshold)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragStart(e){e.stopPropagation(),this.#i=this.#t.getBoundingClientRect(),this.isDragging.set(!0)}drag(e){e.stopPropagation(),this.isDragging()&&(e.clientX!==0||e.clientY!==0)&&this.dragPositionX.set(e.clientX-this.#i.left)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#i=this.#t.getBoundingClientRect(),this.dragPositionX.set(0)}touchMove(e){e.stopPropagation(),this.isDragging()&&this.dragPositionX.set(e.touches[0].clientX-this.#i.left)}touchEnd(e){e.stopPropagation(),this.#o(e.changedTouches[0].clientX-this.#i.left)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-sidenav"]],viewQuery:function(t,n){t&1&&fe(n.dragImageElement,Ms,5),t&2&&oe()},hostVars:6,hostBindings:function(t,n){t&2&&N("open",n.isOpen())("closed",!n.isOpen())("is-dragging",n.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:xs,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,n){t&1&&(I(Es),S(0,ws,2,0,"div",1),S(1,Os,1,0,"div",2),F(2,"div",3),h(3),L(),F(4,"div",4),S(5,Ts,1,0,"div",5),F(6,"div",6),h(7,1),L(),F(8,"main"),h(9,2),L()()),t&2&&(M(n.isOverlay()&&!n.disableDrag()?0:-1),f(),M(n.isOverlay()&&n.isDragging()?1:-1),f(3),K("transform",!n.disableDrag()&&n.draggingStyle()),f(),M(n.isOverlay()&&!n.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return i})();var ga=(()=>{class i{constructor(){this.color=c(null),this.hostClasses=U("stepper",{color:this.color})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-stepper"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})();var ma=(()=>{class i{constructor(){this.#e=C(rr),this.shSort=c(),this.sortAsc=b(()=>{let e=this.#e.sortByColumn(),t=this.shSort();return!e||!t?!1:e===t}),this.sortDesc=b(()=>{let e=this.#e.sortByColumn(),t=this.shSort();return!e||!t?!1:e===`-${t}`})}#e;toggleSort(){let e=this.shSort();e&&this.#e.toggleSort(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(t,n){t&1&&x("mousedown",function(){return n.toggleSort()}),t&2&&N("sort-asc",n.sortAsc())("sort-desc",n.sortDesc())},inputs:{shSort:[1,"shSort"]}})}}return i})();var Le=1.5,rr=(()=>{class i{constructor(){this.#e=C(P),this.loading=c(!1),this.data=c([]),this.dataChange=le(),this.sortByColumn=$(null),this.color=c(null),this.variant=c(null),this.hostClasses=U("table",{color:this.color,variant:this.variant}),this.thead=te("thead"),this.tbody=te("tbody"),this.columns=Yi(this.thead,["tr:first-child th"]),this.stickyHeaderHeight=b(()=>{let e=this.hostClasses();return this.thead()?.nativeElement?.clientHeight??0}),this.bodyEffect=V(()=>{let e=this.tbody()?.nativeElement,t=this.thead()?.nativeElement;if(!e||!t)return;let n=this.stickyHeaderHeight();queueMicrotask(()=>{let s=t.querySelectorAll("tr.sticky").length>0,r=e.querySelectorAll("tr.sticky");if(r.length>0&&s)for(let l=0;l<r.length;l++)r[l].style.top=`${n}px`})}),this.resizing=v(!1),this.sizeTrigger=v(!0),this.#n=null,this.#t=v(!1),this.scrollXState=v(-1),this.scrollYState=v(-1),this.canScrollX=v(!1),this.canScrollY=v(!1),this.columnSizes=b(()=>{this.sizeTrigger();let e=this.columns.signal();return e.reduce((t,n,s)=>{let r=n,a=r.getAttribute("size"),l=s===e.length-1;return a?`${t} ${a}`:r.classList.contains("sticky")||r.classList.contains("sticky-end")?`${t} min-content`:l?`${t} 1fr`:`${t} 1fr`},"")}),this.e=V(()=>{let e=this.sortByColumn();if(e===null)return this.#t()||(this.#n=this.data(),this.#t.set(!0)),this.dataChange.emit(structuredClone(this.#n));let t=e.startsWith("-")?e.slice(1):e,n=e.startsWith("-"),s=this.data().sort((r,a)=>{let l=r[t],d=a[t],u=0;return typeof l=="number"&&typeof d=="number"&&(u=l-d),l instanceof Date&&d instanceof Date&&(u=l.getTime()-d.getTime()),typeof l=="string"&&typeof d=="string"&&(u=l.localeCompare(d,void 0,{sensitivity:"base"})),n?-u:u});this.dataChange.emit(s)})}#e;#n;#t;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#i()}onResize(e){this.#i()}ngAfterViewInit(){queueMicrotask(()=>this.#i())}toggleSort(e){let t=this.sortByColumn(),n=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(n)}#i(){let e=this.#e.nativeElement,t=-1,n=-1,s=e.scrollWidth>e.clientWidth+Le;if(s){let a=e.scrollLeft<=Le;e.scrollWidth-(e.scrollLeft+e.clientWidth)<Le?t=1:a||(t=0)}this.scrollXState.set(t),this.canScrollX.set(s);let r=e.scrollHeight>e.clientHeight+Le;if(r){let a=e.scrollTop<=Le;e.scrollHeight-(e.scrollTop+e.clientHeight)<Le?n=1:a||(n=0)}this.scrollYState.set(n),this.canScrollY.set(r)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-table"]],viewQuery:function(t,n){t&1&&fe(n.thead,Vs,5)(n.tbody,Ns,5),t&2&&oe(2)},hostVars:18,hostBindings:function(t,n){t&1&&x("scroll",function(){return n.onScroll()})("resize",function(r){return n.onResize(r)},li),t&2&&(A(n.hostClasses()),K("grid-template-columns",n.columnSizes()),N("resizing",n.resizing())("can-scroll-x",n.canScrollX())("can-scroll-y",n.canScrollY())("scrolled-x",n.scrollXState()>=0)("scrolled-x-end",n.scrollXState()===1)("scrolled-y",n.scrollYState()>=0)("scrolled-y-end",n.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"],color:[1,"color"],variant:[1,"variant"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:As,decls:11,vars:2,consts:[["thead",""],["tbody",""],[1,"actionbar"],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,n){t&1&&(I(Is),p(0,"div",2),h(1),m(),S(2,Ps,1,0,"sh-progress-bar",3),p(3,"thead",null,0),h(5,1),h(6,2),m(),p(7,"tbody",null,1),h(9,3),m(),S(10,Fs,2,0,"div",4)),t&2&&(f(2),M(n.loading()?2:-1),f(8),M(n.loading()?-1:10))},dependencies:[nr],encapsulation:2,changeDetection:0})}}return i})(),va=(()=>{class i{constructor(){this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12),this.color=c(null),this.variant=c(null),this.hostClasses=U("tabs",{color:this.color,variant:this.variant})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-tabs"]],hostVars:4,hostBindings:function(t,n){t&2&&(A(n.hostClasses()),K("--tabs-id",n.id))},inputs:{color:[1,"color"],variant:[1,"variant"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(I(),h(0))},encapsulation:2,changeDetection:0})}}return i})();var _a=(()=>{class i{constructor(){this.disableToggle=c(!1),this.isActive=$(),this.#e=V(()=>{this.disableToggle()&&this.isActive.set(!0)}),this.color=c(null),this.variant=c(null),this.hostClasses=U("card",{color:this.color,variant:this.variant})}#e;toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-toggle-card"]],hostVars:4,hostBindings:function(t,n){t&2&&(A(n.hostClasses()),N("active",n.isActive()))},inputs:{disableToggle:[1,"disableToggle"],isActive:[1,"isActive"],color:[1,"color"],variant:[1,"variant"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Rs,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(t,n){t&1&&(I(ks),p(0,"h3",0),x("click",function(){return!n.disableToggle()&&n.toggle()}),h(1,0,null,Ls,1,0),S(3,Bs,2,0,"sh-icon",1),m(),p(4,"div",2)(5,"div",3),h(6,1),m()()),t&2&&(f(3),M(n.disableToggle()?-1:3))},dependencies:[De],encapsulation:2,changeDetection:0})}}return i})(),ya=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.readonly=c(!1),this.hostClasses=U("toggle",{color:this.color,variant:this.variant,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["sh-toggle"]],hostVars:2,hostBindings:function(t,n){t&2&&A(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"]},ngContentSelectors:ie,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,n){t&1&&(I(),F(0,"div",0),Me(1,"div",1),L(),h(2))},encapsulation:2,changeDetection:0})}}return i})();var Ca=(()=>{class i{constructor(){this.filesOver=v(!1),this.filesDropped=le()}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1)}ondrop(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1);let t=e.dataTransfer?.files;t&&t.length>0&&this.filesDropped.emit(t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(t,n){t&1&&x("dragover",function(r){return n.onDragOver(r)})("dragleave",function(r){return n.onDragLeave(r)})("drop",function(r){return n.ondrop(r)}),t&2&&N("filesover",n.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return i})();var ar=(()=>{class i{constructor(){this.positionAnchorName=c.required(),this.anchorEl=c.required(),this.isOpen=c(!1),this.content=c(),this.close=c(()=>{}),this.tooltipContext={close:()=>this.close()()},this.isTemplate=b(()=>this.content()instanceof st),this.#e=C(be),this.#n=C(P),this.#t=C(ve),this.#i=null,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.isBelow=v(!1),this.openEffect=V(()=>{if(this.isOpen())queueMicrotask(()=>{let e=this.#n.nativeElement;!e||!e.isConnected||(this.#i&&this.#i.abort(),this.#i=new AbortController,e.showPopover(),this.SUPPORTS_ANCHOR||setTimeout(()=>{this.#o(e).addEventListener("scroll",()=>this.calculateTooltipPosition(),{signal:this.#i?.signal,passive:!0}),window?.addEventListener("resize",()=>this.calculateTooltipPosition(),{signal:this.#i?.signal,passive:!0}),this.calculateTooltipPosition()}))});else{let e=this.#n.nativeElement;if(e)try{e.matches(":popover-open")&&e.hidePopover()}catch{}this.#i?.abort(),this.#i=null}}),this.calculateTooltipPosition=()=>{if(!this.anchorEl())return;let e=this.anchorEl().nativeElement.getBoundingClientRect(),t=this.#n.nativeElement,n=t.getBoundingClientRect();if(n.width===0&&n.height===0)return;let s=8,r=(E,T)=>({left:E.left+E.width/2-T.width/2,top:E.top-T.height-s}),w=[r,(E,T)=>({left:E.right-T.width,top:E.top-T.height-s}),(E,T)=>({left:E.left,top:E.top-T.height-s}),(E,T)=>({left:E.left+E.width/2-T.width/2,top:E.bottom+s}),(E,T)=>({left:E.right-T.width,top:E.bottom+s}),(E,T)=>({left:E.left,top:E.bottom+s})];for(let E of w){let T=E(e,n);if(this.#a(T,n)){this.#r(T,t),this.isBelow.set(T.top>e.top);return}}let z=this.#s(r(e,n),n);this.#r(z,t),this.isBelow.set(z.top>e.top)}}#e;#n;#t;#i;ngOnDestroy(){this.#i?.abort(),this.#i=null}#o(e){let t=["scroll","auto"],n=e.parentElement;for(;n;){if(t.indexOf(window?.getComputedStyle(n).overflowY)>-1&&n.scrollHeight>n.clientHeight)return n;n=n.parentElement}return this.#e.documentElement}#r(e,t){this.#t.setStyle(t,"left",`${e.left}px`),this.#t.setStyle(t,"top",`${e.top}px`),this.#t.setStyle(t,"position","fixed"),this.#t.setStyle(t,"margin","0")}#a(e,t){return e.left>=0&&e.top>=0&&e.left+t.width<=window.innerWidth&&e.top+t.height<=window.innerHeight}#s(e,t){return{left:Math.max(0,Math.min(e.left,window.innerWidth-t.width)),top:Math.max(0,Math.min(e.top,window.innerHeight-t.height))}}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=O({type:i,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(t,n){t&2&&(ne("popover","manual"),K("position-anchor",n.positionAnchorName()),N("below",n.isBelow()))},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"],content:[1,"content"],close:[1,"close"]},decls:3,vars:1,consts:[[1,"tooltip-content"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,n){t&1&&(p(0,"div",0),S(1,js,1,4,"ng-container")(2,zs,1,1),m()),t&2&&(f(),M(n.isTemplate()?1:2))},dependencies:[kt],encapsulation:2})}}return i})(),B=null,Da=(()=>{class i{constructor(){this.shTooltip=c.required(),this.#e=V(()=>{let e=this.shTooltip();re(()=>{this.isOpen()&&B?.component===this&&B?.wrapperComponentRef&&(B.wrapperComponentRef.setInput("content",e),B.wrapperComponentRef.changeDetectorRef.detectChanges())})}),this.#n=C(P),this.#t=C(ci),this.#i=C(si),this.debounceTimer=null,this.DEBOUNCE_DELAY=50,this.anchorName=`--${nt()}`,this.isOpen=v(!1),this.destroyTimeout=null}#e;#n;#t;#i;onMouseEnter(e){e.stopPropagation(),B?.component.anchorName!==this.anchorName?this.cleanupTooltip():this.cancelCleanupTimer(),this.showTooltip()}onMouseLeave(e){e.stopPropagation(),this.startCleanupTimer()}ngOnDestroy(){this.cancelCleanupTimer(),this.cleanupTooltip()}startCleanupTimer(){this.cancelCleanupTimer(),this.debounceTimer=setTimeout(()=>{this.cleanupTooltip()},this.DEBOUNCE_DELAY)}cancelCleanupTimer(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.destroyTimeout&&(clearTimeout(this.destroyTimeout),this.destroyTimeout=null)}showTooltip(){if(B?.wrapperComponentRef||!this.shTooltip()){B?.component===this&&B?.wrapperComponentRef&&B.wrapperComponentRef.setInput("content",this.shTooltip());return}B={wrapperComponentRef:this.#t.createComponent(ar,{environmentInjector:this.#i}),component:this},B.wrapperComponentRef.setInput("positionAnchorName",this.anchorName),B.wrapperComponentRef.setInput("anchorEl",this.#n),B.wrapperComponentRef.setInput("isOpen",this.isOpen),B.wrapperComponentRef.setInput("content",this.shTooltip()),B.wrapperComponentRef.setInput("close",()=>this.cleanupTooltip()),B.wrapperComponentRef.changeDetectorRef.detectChanges(),B.wrapperComponentRef.location.nativeElement.addEventListener("mouseenter",e=>{e.stopPropagation(),this.cancelCleanupTimer()}),B.wrapperComponentRef.location.nativeElement.addEventListener("mouseleave",e=>{e.stopPropagation(),this.startCleanupTimer()}),setTimeout(()=>{this.isOpen.set(!0)})}cleanupTooltip(){B?.wrapperComponentRef&&(B.component.cancelCleanupTimer(),B.component.isOpen.set(!1),B.wrapperComponentRef.location.nativeElement.hidePopover(),this.destroyTimeout=setTimeout(()=>{queueMicrotask(()=>{B?.wrapperComponentRef.destroy(),B=null})},this.DEBOUNCE_DELAY))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=R({type:i,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(t,n){t&1&&x("mouseenter",function(r){return n.onMouseEnter(r)})("mouseleave",function(r){return n.onMouseLeave(r)}),t&2&&(K("anchor-name",n.anchorName),N("active",n.isOpen()))},inputs:{shTooltip:[1,"shTooltip"]}})}}return i})();export{Ce as a,Zi as b,Mi as c,gi as d,Mr as e,Er as f,bn as g,Ke as h,Ct as i,wr as j,wn as k,Vn as l,In as m,Pn as n,ji as o,Ln as p,Hn as q,Or as r,Tr as s,Vr as t,Ui as u,De as v,ta as w,ia as x,Gs as y,na as z,oa as A,sa as B,ra as C,qs as D,Us as E,aa as F,Js as G,Kt as H,la as I,ca as J,da as K,nr as L,ua as M,ha as N,or as O,pa as P,fa as Q,ga as R,ma as S,rr as T,va as U,_a as V,ya as W,Ca as X,Da as Y};
@@ -1 +1 @@
1
- import{d}from"./chunk-JJY6UOEY.js";import{E as o,Pc as s,U as n,Z as r,oa as l,qa as g}from"./chunk-QY4Y5NJB.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=r(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):this.clearPolling()});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(o(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling()}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling()}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0}static \u0275fac=function(i){return new(i||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
1
+ import{d}from"./chunk-2LSZ2I43.js";import{E as o,Pc as s,U as n,Z as r,oa as l,qa as g}from"./chunk-ERITO7WM.js";var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=r(d);#e=l([]);LOG_LEVELS=u;logLevel=l("Disabled");logLevelByLabel=s(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=l(null);backupIdFilter=l(null);id=l(0);logs=s(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=l(!1);isPolling=l(!1);pagination=l({offset:0,pagesize:100});logLevelEffect=g(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs()},3e3)):this.clearPolling()});setWhenFilter(e){this.whenFilter.set(e)}setBackupIdFilter(e){this.backupIdFilter.set(e)}loadLogs(){this.logsLoading.set(!0),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(o(()=>this.logsLoading.set(!1))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()])}})}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling()}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling()}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0}static \u0275fac=function(i){return new(i||a)};static \u0275prov=n({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v as a};
package/index.html CHANGED
@@ -120,9 +120,9 @@
120
120
  }
121
121
  }
122
122
  </style>
123
- <style>:root{--font-size:16px;font-size:var(--font-size)}html{color-scheme:light dark}html body{--primary-1:light-dark(oklch(.95 .02 260), oklch(.17 .05 260));--primary-2:light-dark(oklch(.9 .04 260), oklch(.25 .09 260));--primary-3:light-dark(oklch(.86 .07 260), oklch(.32 .12 260));--primary-4:light-dark(oklch(.81 .09 260), oklch(.38 .15 260));--primary-5:light-dark(oklch(.76 .11 260), oklch(.45 .18 260));--primary-6:light-dark(oklch(.71 .14 260), oklch(.51 .21 260));--primary-7:light-dark(oklch(.67 .16 260), oklch(.57 .22 260));--primary-8:light-dark(oklch(.63 .19 260), oklch(.63 .19 260));--primary-9:light-dark(oklch(.52 .21 260), oklch(.71 .14 260));--primary-10:light-dark(oklch(.41 .16 260), oklch(.81 .09 260));--primary-11:light-dark(oklch(.29 .11 260), oklch(.9 .04 260));--primary-12:light-dark(oklch(.15 .04 260), oklch(.95 .02 260));--primary-g2:linear-gradient(180deg, oklch(.71 .14 260) 0%, oklch(.63 .19 260) 50%);--primary-g3:linear-gradient(180deg, oklch(.81 .09 260.01) 0%, oklch(.63 .19 260) 50%);--accent-1:light-dark(hsl(258, 90%, 95.75%), hsl(258, 90%, 9.25%));--accent-2:light-dark(hsl(258, 90%, 91.5%), hsl(258, 90%, 16.5%));--accent-3:light-dark(hsl(258, 90%, 87.25%), hsl(258, 90%, 24.75%));--accent-4:light-dark(hsl(258, 90%, 83%), hsl(258, 90%, 33%));--accent-5:light-dark(hsl(258, 89%, 78%), hsl(258, 90%, 41.25%));--accent-6:light-dark(hsl(258, 90%, 74.5%), hsl(258, 90%, 49.5%));--accent-7:light-dark(hsl(258, 90%, 70.25%), hsl(258, 90%, 57.75%));--accent-8:light-dark(hsl(258, 90%, 66%), hsl(258, 90%, 66%));--accent-9:light-dark(hsl(258, 90%, 51.15%), hsl(258, 90%, 74.5%));--accent-10:light-dark(hsl(258, 90%, 36.3%), hsl(258, 90%, 83%));--accent-11:light-dark(hsl(258, 90%, 21.45%), hsl(258, 90%, 91.5%));--accent-12:light-dark(hsl(258, 90%, 6.6%), hsl(258, 90%, 100%));--accent-g2:linear-gradient(180deg, hsl(258, 90%, 74.5%) 0%, hsl(258, 90%, 66%) 50%);--accent-g3:linear-gradient(180deg, hsl(258, 90%, 83%) 0%, hsl(258, 90%, 66%) 50%);--warn-1:light-dark(hsl(37, 92%, 93.75%), hsl(37, 92%, 9.25%));--warn-2:light-dark(hsl(37, 92%, 87.5%), hsl(37, 92%, 12.5%));--warn-3:light-dark(hsl(37, 92%, 81.25%), hsl(37, 92%, 18.75%));--warn-4:light-dark(hsl(37, 92%, 75%), hsl(37, 92%, 25%));--warn-5:light-dark(hsl(37, 92%, 68.75%), hsl(37, 92%, 31.25%));--warn-6:light-dark(hsl(37, 92%, 62.5%), hsl(37, 92%, 37.5%));--warn-7:light-dark(hsl(37, 92%, 56.25%), hsl(37, 92%, 43.75%));--warn-8:light-dark(hsl(37, 92%, 50%), hsl(37, 92%, 50%));--warn-9:light-dark(hsl(37, 92%, 38.75%), hsl(37, 92%, 62.5%));--warn-10:light-dark(hsl(37, 92%, 27.5%), hsl(37, 92%, 75%));--warn-11:light-dark(hsl(37, 92%, 16.25%), hsl(37, 92%, 87.5%));--warn-12:light-dark(hsl(37, 92%, 5%), hsl(37, 92%, 100%));--warn-g2:linear-gradient(180deg, hsl(37, 92%, 62.5%) 0%, hsl(37, 92%, 50%) 50%);--warn-g3:linear-gradient(180deg, hsl(37, 92%, 75%) 0%, hsl(37, 92%, 50%) 50%);--error-1:light-dark(hsl(0, 84%, 95%), hsl(0, 84%, 7.5%));--error-2:light-dark(hsl(0, 84%, 90%), hsl(0, 84%, 15%));--error-3:light-dark(hsl(0, 84%, 85%), hsl(0, 84%, 22.5%));--error-4:light-dark(hsl(0, 84%, 80%), hsl(0, 84%, 30%));--error-5:light-dark(hsl(0, 84%, 75%), hsl(0, 27%, 10%));--error-6:light-dark(hsl(0, 84%, 70%), hsl(0, 84%, 45%));--error-7:light-dark(hsl(0, 84%, 65%), hsl(0, 84%, 52.5%));--error-8:light-dark(hsl(0, 84%, 60%), hsl(0, 84%, 60%));--error-9:light-dark(hsl(0, 84%, 46.5%), hsl(0, 84%, 70%));--error-10:light-dark(hsl(0, 84%, 33%), hsl(0, 84%, 80%));--error-11:light-dark(hsl(0, 84%, 19.5%), hsl(0, 84%, 90%));--error-12:light-dark(hsl(0, 84%, 6%), hsl(0, 84%, 100%));--error-g2:linear-gradient(180deg, hsl(0, 84%, 70%) 0%, hsl(0, 84%, 60%) 50%);--error-g3:linear-gradient(180deg, hsl(0, 84%, 80%) 0%, hsl(0, 84%, 60%) 50%);--success-1:light-dark(hsl(160, 84%, 92.38%), hsl(160, 84%, 7.88%));--success-2:light-dark(hsl(160, 84%, 84.75%), hsl(160, 3%, 17%));--success-3:light-dark(hsl(160, 84%, 77.13%), hsl(160, 84%, 14.63%));--success-4:light-dark(hsl(160, 84%, 69.5%), hsl(160, 84%, 19.5%));--success-5:light-dark(hsl(160, 84%, 61.88%), hsl(160, 84%, 24.38%));--success-6:light-dark(hsl(160, 84%, 54.25%), hsl(160, 84%, 29.25%));--success-7:light-dark(hsl(160, 84%, 46.63%), hsl(160, 84%, 34.13%));--success-8:light-dark(hsl(160, 84%, 39%), hsl(160, 84%, 39%));--success-9:light-dark(hsl(160, 84%, 30.23%), hsl(160, 84%, 54.25%));--success-10:light-dark(hsl(160, 84%, 21.45%), hsl(160, 84%, 69.5%));--success-11:light-dark(hsl(160, 84%, 12.67%), hsl(160, 84%, 84.75%));--success-12:light-dark(hsl(160, 84%, 3.9%), hsl(160, 84%, 100%));--success-g2:linear-gradient(180deg, hsl(160, 84%, 54.25%) 0%, hsl(160, 84%, 39%) 50%);--success-g3:linear-gradient(180deg, hsl(160, 84%, 69.5%) 0%, hsl(160, 84%, 39%) 50%);--base-1:light-dark(#fff, hsl(0, 0%, 5.75%));--base-2:light-dark(hsl(0, 0%, 98.05%), hsl(0, 0%, 8.75%));--base-3:light-dark(hsl(0, 0%, 94.5%), hsl(0, 0%, 11.5%));--base-4:light-dark(hsl(0, 0%, 84.75%), hsl(0, 0%, 17.25%));--base-5:light-dark(hsl(0, 0%, 79.75%), hsl(0, 0%, 21%));--base-6:light-dark(hsl(0, 0%, 66.25%), hsl(0, 0%, 28.75%));--base-7:light-dark(hsl(0, 0%, 54.5%), hsl(0, 0%, 34.5%));--base-8:light-dark(hsl(0, 0%, 46%), hsl(0, 0%, 54%));--base-9:light-dark(hsl(0, 0%, 35.65%), hsl(0, 0%, 64.5%));--base-10:light-dark(hsl(0, 0%, 25.3%), hsl(0, 0%, 73%));--base-11:light-dark(hsl(0, 0%, 14.95%), hsl(0, 0%, 86.5%));--base-12:light-dark(hsl(0, 0%, 4.6%), hsl(0, 0%, 100%));--base-g2:linear-gradient(180deg, hsl(0, 0%, 66.25%) 0%, hsl(0, 0%, 46%) 50%);--base-g3:linear-gradient(180deg, hsl(0, 0%, 73%) 0%, hsl(0, 0%, 46%) 50%);--base-g6:linear-gradient(180deg, hsl(0, 0%, 25.3%) 0%, hsl(0, 0%, 14.95%) 50%);--base-g7:linear-gradient(180deg, hsl(0, 0%, 35.65%) 0%, hsl(0, 0%, 14.95%) 50%);--primary-c8:var(--light-text);--accent-c8:var(--light-text);--warn-c8:var(--light-text);--error-c8:var(--light-text);--success-c8:var(--light-text);--display-10:600 5rem / normal Inter Tight, sans-serif;--display-20:600 4.5rem / normal Inter Tight, sans-serif;--display-30:600 4rem / normal Inter Tight, sans-serif;--display-40:600 3.5rem / normal Inter Tight, sans-serif;--display-50:600 3rem / normal Inter Tight, sans-serif;--title-10:500 2.5rem / normal Inter Tight, sans-serif;--title-20:500 2rem / normal Inter Tight, sans-serif;--title-30:500 1.5rem / normal Inter Tight, sans-serif;--title-10B:600 2.5rem / normal Inter Tight, sans-serif;--title-20B:600 2rem / normal Inter Tight, sans-serif;--title-30B:600 1.5rem / normal Inter Tight, sans-serif;--paragraph-10:500 1.125rem / normal Inter Tight, sans-serif;--paragraph-20:500 1rem / normal Inter Tight, sans-serif;--paragraph-30:500 .875rem / normal Inter Tight, sans-serif;--paragraph-40:500 .75rem / normal Inter Tight, sans-serif;--paragraph-10B:600 1.125rem / normal Inter Tight, sans-serif;--paragraph-20B:600 1rem / normal Inter Tight, sans-serif;--paragraph-30B:600 .875rem / 1.125rem Inter Tight, sans-serif;--paragraph-40B:600 .75rem / normal Inter Tight, sans-serif;--code-10:500 1rem / normal monospace;--code-20:500 .875rem / normal monospace;--code-30:500 .75rem / normal monospace;--shape-1:.25rem;--shape-2:.5rem;--shape-3:.75rem;--shape-4:1rem;--shape-5:1.25rem;--box-shadow-10:0 1px 2px 0 rgba(18, 18, 23, .07);--box-shadow-20:0 1px 3px 0 rgba(18, 18, 23, .1);--box-shadow-30:0 1px 4px -1px rgba(18, 18, 23, .08);--box-shadow-35:0 4px 6px -1px rgba(18, 18, 23, .08);--box-shadow-40:0 10px 15px -3px rgba(18, 18, 23, .08);--box-shadow-50:0 20px 25px -5px rgba(18, 18, 23, .1);--box-shadow-60:0 25px 50px -12px rgba(18, 18, 23, .25);--dark-text:#000;--light-text:#fff}*{box-sizing:border-box}html,body,app-root{width:100vw;min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--base-2)}body{margin:0;font:var(--paragraph-30);color:var(--base-12)}.loading{position:relative}.loading:after{content:"";width:1em;height:1em;border:2px solid var(--loader-c);border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@position-try --bottom-span-right{position-area:bottom span-right;inset:auto;top:.25rem}@position-try --bottom-span-left{position-area:bottom span-left;inset:auto;top:.25rem}@position-try --top-span-right{position-area:top span-right;inset:auto;bottom:.25rem}@position-try --top-span-left{position-area:top span-left;inset:auto;bottom:.25rem}@position-try --right-span-top{position-area:right span-top;inset:auto;left:.25rem}@position-try --left-span-top{position-area:left span-top;inset:auto;right:.25rem}@position-try --right-center{position-area:right center;inset:auto;left:.25rem}@position-try --left-center{position-area:left center;inset:auto;right:.25rem}@position-try --right-span-bottom{position-area:right span-bottom;inset:auto;left:.25rem}@position-try --left-span-bottom{position-area:left span-bottom;inset:auto;right:.25rem}</style><link rel="stylesheet" href="styles-377DNUNK.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-377DNUNK.css"></noscript></head>
123
+ <style>:root{--font-size:16px;font-size:var(--font-size)}html{color-scheme:light dark}html body{--primary-1:light-dark(oklch(.95 .02 260), oklch(.17 .05 260));--primary-2:light-dark(oklch(.9 .04 260), oklch(.25 .09 260));--primary-3:light-dark(oklch(.86 .07 260), oklch(.32 .12 260));--primary-4:light-dark(oklch(.81 .09 260), oklch(.38 .15 260));--primary-5:light-dark(oklch(.76 .11 260), oklch(.45 .18 260));--primary-6:light-dark(oklch(.71 .14 260), oklch(.51 .21 260));--primary-7:light-dark(oklch(.67 .16 260), oklch(.57 .22 260));--primary-8:light-dark(oklch(.63 .19 260), oklch(.63 .19 260));--primary-9:light-dark(oklch(.52 .21 260), oklch(.71 .14 260));--primary-10:light-dark(oklch(.41 .16 260), oklch(.81 .09 260));--primary-11:light-dark(oklch(.29 .11 260), oklch(.9 .04 260));--primary-12:light-dark(oklch(.15 .04 260), oklch(.95 .02 260));--primary-g2:linear-gradient(180deg, oklch(.71 .14 260) 0%, oklch(.63 .19 260) 50%);--primary-g3:linear-gradient(180deg, oklch(.81 .09 260.01) 0%, oklch(.63 .19 260) 50%);--accent-1:light-dark(hsl(258, 90%, 95.75%), hsl(258, 90%, 9.25%));--accent-2:light-dark(hsl(258, 90%, 91.5%), hsl(258, 90%, 16.5%));--accent-3:light-dark(hsl(258, 90%, 87.25%), hsl(258, 90%, 24.75%));--accent-4:light-dark(hsl(258, 90%, 83%), hsl(258, 90%, 33%));--accent-5:light-dark(hsl(258, 89%, 78%), hsl(258, 90%, 41.25%));--accent-6:light-dark(hsl(258, 90%, 74.5%), hsl(258, 90%, 49.5%));--accent-7:light-dark(hsl(258, 90%, 70.25%), hsl(258, 90%, 57.75%));--accent-8:light-dark(hsl(258, 90%, 66%), hsl(258, 90%, 66%));--accent-9:light-dark(hsl(258, 90%, 51.15%), hsl(258, 90%, 74.5%));--accent-10:light-dark(hsl(258, 90%, 36.3%), hsl(258, 90%, 83%));--accent-11:light-dark(hsl(258, 90%, 21.45%), hsl(258, 90%, 91.5%));--accent-12:light-dark(hsl(258, 90%, 6.6%), hsl(258, 90%, 100%));--accent-g2:linear-gradient(180deg, hsl(258, 90%, 74.5%) 0%, hsl(258, 90%, 66%) 50%);--accent-g3:linear-gradient(180deg, hsl(258, 90%, 83%) 0%, hsl(258, 90%, 66%) 50%);--warn-1:light-dark(hsl(37, 92%, 93.75%), hsl(37, 92%, 9.25%));--warn-2:light-dark(hsl(37, 92%, 87.5%), hsl(37, 92%, 12.5%));--warn-3:light-dark(hsl(37, 92%, 81.25%), hsl(37, 92%, 18.75%));--warn-4:light-dark(hsl(37, 92%, 75%), hsl(37, 92%, 25%));--warn-5:light-dark(hsl(37, 92%, 68.75%), hsl(37, 92%, 31.25%));--warn-6:light-dark(hsl(37, 92%, 62.5%), hsl(37, 92%, 37.5%));--warn-7:light-dark(hsl(37, 92%, 56.25%), hsl(37, 92%, 43.75%));--warn-8:light-dark(hsl(37, 92%, 50%), hsl(37, 92%, 50%));--warn-9:light-dark(hsl(37, 92%, 38.75%), hsl(37, 92%, 62.5%));--warn-10:light-dark(hsl(37, 92%, 27.5%), hsl(37, 92%, 75%));--warn-11:light-dark(hsl(37, 92%, 16.25%), hsl(37, 92%, 87.5%));--warn-12:light-dark(hsl(37, 92%, 5%), hsl(37, 92%, 100%));--warn-g2:linear-gradient(180deg, hsl(37, 92%, 62.5%) 0%, hsl(37, 92%, 50%) 50%);--warn-g3:linear-gradient(180deg, hsl(37, 92%, 75%) 0%, hsl(37, 92%, 50%) 50%);--error-1:light-dark(hsl(0, 84%, 95%), hsl(0, 84%, 7.5%));--error-2:light-dark(hsl(0, 84%, 90%), hsl(0, 84%, 15%));--error-3:light-dark(hsl(0, 84%, 85%), hsl(0, 84%, 22.5%));--error-4:light-dark(hsl(0, 84%, 80%), hsl(0, 84%, 30%));--error-5:light-dark(hsl(0, 84%, 75%), hsl(0, 27%, 10%));--error-6:light-dark(hsl(0, 84%, 70%), hsl(0, 84%, 45%));--error-7:light-dark(hsl(0, 84%, 65%), hsl(0, 84%, 52.5%));--error-8:light-dark(hsl(0, 84%, 60%), hsl(0, 84%, 60%));--error-9:light-dark(hsl(0, 84%, 46.5%), hsl(0, 84%, 70%));--error-10:light-dark(hsl(0, 84%, 33%), hsl(0, 84%, 80%));--error-11:light-dark(hsl(0, 84%, 19.5%), hsl(0, 84%, 90%));--error-12:light-dark(hsl(0, 84%, 6%), hsl(0, 84%, 100%));--error-g2:linear-gradient(180deg, hsl(0, 84%, 70%) 0%, hsl(0, 84%, 60%) 50%);--error-g3:linear-gradient(180deg, hsl(0, 84%, 80%) 0%, hsl(0, 84%, 60%) 50%);--success-1:light-dark(hsl(160, 84%, 92.38%), hsl(160, 84%, 7.88%));--success-2:light-dark(hsl(160, 84%, 84.75%), hsl(160, 3%, 17%));--success-3:light-dark(hsl(160, 84%, 77.13%), hsl(160, 84%, 14.63%));--success-4:light-dark(hsl(160, 84%, 69.5%), hsl(160, 84%, 19.5%));--success-5:light-dark(hsl(160, 84%, 61.88%), hsl(160, 84%, 24.38%));--success-6:light-dark(hsl(160, 84%, 54.25%), hsl(160, 84%, 29.25%));--success-7:light-dark(hsl(160, 84%, 46.63%), hsl(160, 84%, 34.13%));--success-8:light-dark(hsl(160, 84%, 39%), hsl(160, 84%, 39%));--success-9:light-dark(hsl(160, 84%, 30.23%), hsl(160, 84%, 54.25%));--success-10:light-dark(hsl(160, 84%, 21.45%), hsl(160, 84%, 69.5%));--success-11:light-dark(hsl(160, 84%, 12.67%), hsl(160, 84%, 84.75%));--success-12:light-dark(hsl(160, 84%, 3.9%), hsl(160, 84%, 100%));--success-g2:linear-gradient(180deg, hsl(160, 84%, 54.25%) 0%, hsl(160, 84%, 39%) 50%);--success-g3:linear-gradient(180deg, hsl(160, 84%, 69.5%) 0%, hsl(160, 84%, 39%) 50%);--base-1:light-dark(#fff, hsl(0, 0%, 5.75%));--base-2:light-dark(hsl(0, 0%, 98.05%), hsl(0, 0%, 8.75%));--base-3:light-dark(hsl(0, 0%, 94.5%), hsl(0, 0%, 11.5%));--base-4:light-dark(hsl(0, 0%, 84.75%), hsl(0, 0%, 17.25%));--base-5:light-dark(hsl(0, 0%, 79.75%), hsl(0, 0%, 21%));--base-6:light-dark(hsl(0, 0%, 66.25%), hsl(0, 0%, 28.75%));--base-7:light-dark(hsl(0, 0%, 54.5%), hsl(0, 0%, 34.5%));--base-8:light-dark(hsl(0, 0%, 46%), hsl(0, 0%, 54%));--base-9:light-dark(hsl(0, 0%, 35.65%), hsl(0, 0%, 64.5%));--base-10:light-dark(hsl(0, 0%, 25.3%), hsl(0, 0%, 73%));--base-11:light-dark(hsl(0, 0%, 14.95%), hsl(0, 0%, 86.5%));--base-12:light-dark(hsl(0, 0%, 4.6%), hsl(0, 0%, 100%));--base-g2:linear-gradient(180deg, hsl(0, 0%, 66.25%) 0%, hsl(0, 0%, 46%) 50%);--base-g3:linear-gradient(180deg, hsl(0, 0%, 73%) 0%, hsl(0, 0%, 46%) 50%);--base-g6:linear-gradient(180deg, hsl(0, 0%, 25.3%) 0%, hsl(0, 0%, 14.95%) 50%);--base-g7:linear-gradient(180deg, hsl(0, 0%, 35.65%) 0%, hsl(0, 0%, 14.95%) 50%);--primary-c8:var(--light-text);--accent-c8:var(--light-text);--warn-c8:var(--light-text);--error-c8:var(--light-text);--success-c8:var(--light-text);--display-10:600 5rem / normal Inter Tight, sans-serif;--display-20:600 4.5rem / normal Inter Tight, sans-serif;--display-30:600 4rem / normal Inter Tight, sans-serif;--display-40:600 3.5rem / normal Inter Tight, sans-serif;--display-50:600 3rem / normal Inter Tight, sans-serif;--title-10:500 2.5rem / normal Inter Tight, sans-serif;--title-20:500 2rem / normal Inter Tight, sans-serif;--title-30:500 1.5rem / normal Inter Tight, sans-serif;--title-10B:600 2.5rem / normal Inter Tight, sans-serif;--title-20B:600 2rem / normal Inter Tight, sans-serif;--title-30B:600 1.5rem / normal Inter Tight, sans-serif;--paragraph-10:500 1.125rem / normal Inter Tight, sans-serif;--paragraph-20:500 1rem / normal Inter Tight, sans-serif;--paragraph-30:500 .875rem / normal Inter Tight, sans-serif;--paragraph-40:500 .75rem / normal Inter Tight, sans-serif;--paragraph-10B:600 1.125rem / normal Inter Tight, sans-serif;--paragraph-20B:600 1rem / normal Inter Tight, sans-serif;--paragraph-30B:600 .875rem / 1.125rem Inter Tight, sans-serif;--paragraph-40B:600 .75rem / normal Inter Tight, sans-serif;--code-10:500 1rem / normal monospace;--code-20:500 .875rem / normal monospace;--code-30:500 .75rem / normal monospace;--shape-1:.25rem;--shape-2:.5rem;--shape-3:.75rem;--shape-4:1rem;--shape-5:1.25rem;--box-shadow-10:0 1px 2px 0 rgba(18, 18, 23, .07);--box-shadow-20:0 1px 3px 0 rgba(18, 18, 23, .1);--box-shadow-30:0 1px 4px -1px rgba(18, 18, 23, .08);--box-shadow-35:0 4px 6px -1px rgba(18, 18, 23, .08);--box-shadow-40:0 10px 15px -3px rgba(18, 18, 23, .08);--box-shadow-50:0 20px 25px -5px rgba(18, 18, 23, .1);--box-shadow-60:0 25px 50px -12px rgba(18, 18, 23, .25);--dark-text:#000;--light-text:#fff}*{box-sizing:border-box}html,body,app-root{width:100vw;min-height:100vh;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--base-2)}body{margin:0;font:var(--paragraph-30);color:var(--base-12)}.loading{position:relative}.loading:after{content:"";width:1em;height:1em;border:2px solid var(--loader-c);border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@position-try --bottom-span-right{position-area:bottom span-right;inset:auto;top:.25rem}@position-try --bottom-span-left{position-area:bottom span-left;inset:auto;top:.25rem}@position-try --top-span-right{position-area:top span-right;inset:auto;bottom:.25rem}@position-try --top-span-left{position-area:top span-left;inset:auto;bottom:.25rem}@position-try --right-span-top{position-area:right span-top;inset:auto;left:.25rem}@position-try --left-span-top{position-area:left span-top;inset:auto;right:.25rem}@position-try --right-center{position-area:right center;inset:auto;left:.25rem}@position-try --left-center{position-area:left center;inset:auto;right:.25rem}@position-try --right-span-bottom{position-area:right span-bottom;inset:auto;left:.25rem}@position-try --left-span-bottom{position-area:left span-bottom;inset:auto;right:.25rem}</style><link rel="stylesheet" href="styles-6WG7TD6T.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-6WG7TD6T.css"></noscript></head>
124
124
  <body>
125
125
  <app-root></app-root>
126
126
  <div class="loading">Connecting ...</div>
127
- <link rel="modulepreload" href="chunk-VPUFUCR3.js"><link rel="modulepreload" href="chunk-6COK7FLL.js"><link rel="modulepreload" href="chunk-WLAJ3YIP.js"><link rel="modulepreload" href="chunk-23UYU3M3.js"><link rel="modulepreload" href="chunk-GGW26MAG.js"><link rel="modulepreload" href="chunk-FJFREVRV.js"><link rel="modulepreload" href="chunk-OWBBT5WF.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-EG3PT3XW.js"><link rel="modulepreload" href="chunk-7E5J43IH.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-DIGDM6JP.js" type="module"></script></body>
127
+ <link rel="modulepreload" href="chunk-LGILJ5LY.js"><link rel="modulepreload" href="chunk-MAKVVEKB.js"><link rel="modulepreload" href="chunk-3ZCJK7PY.js"><link rel="modulepreload" href="chunk-I2HYK2BL.js"><link rel="modulepreload" href="chunk-B35WNLRM.js"><link rel="modulepreload" href="chunk-SLS3DCJP.js"><link rel="modulepreload" href="chunk-SUY5AQLW.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-I4XRVBRQ.js"><link rel="modulepreload" href="chunk-RFB5A3B7.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-BYMMXHVT.js" type="module"></script></body>
128
128
  </html>
@@ -1 +1 @@
1
- import{b as ke,c as Ae}from"./chunk-VPUFUCR3.js";import{a as Te}from"./chunk-6COK7FLL.js";import{a as Ie}from"./chunk-WLAJ3YIP.js";import{b as k}from"./chunk-23UYU3M3.js";import"./chunk-GGW26MAG.js";import{a as Me}from"./chunk-FJFREVRV.js";import{b as Ee}from"./chunk-OWBBT5WF.js";import{a as D}from"./chunk-6Q6SSTBK.js";import{a as Re}from"./chunk-EG3PT3XW.js";import"./chunk-7E5J43IH.js";import"./chunk-QY5UGQ3R.js";import"./chunk-KLAJGS5T.js";import{a as H}from"./chunk-NGKFJLI2.js";import{a as h,b as be,c as v,d as we,e as I}from"./chunk-KUX6NGQU.js";import{u as Ce,x as ve}from"./chunk-Y46QCSB5.js";import{a as ye,e as Se}from"./chunk-JJY6UOEY.js";import{c as me,d as de,g as ue,h as he,i as fe,j as ge}from"./chunk-2K74TI2N.js";import{a as re}from"./chunk-G3FMV74P.js";import{a as se,b as ie,c as ae,e as pe,f as le,g as ce}from"./chunk-LU7RSOI6.js";import{fa as oe,ka as ne}from"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{E as M,Eb as Z,I as K,K as T,Lc as ee,M as _,Mc as te,U as C,X as q,Z as s,f as W,fb as Y,g as $,ga as z,ha as X,l as G,m as B,oa as d,p as w,qa as Q,y as P,z as J}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var A=class e{#e=s(h);#a=s(v);ngOnInit(){be(),this.#a.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Y({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&Z(0,"router-outlet")},dependencies:[me],encapsulation:2})};var Ne={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new q("ENVIRONMENT");var N=class e{#e=s(Se);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#e.getApiV1Webmodules().pipe(_(n=>this.webmodules.set(n)),M(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=()=>{let e=s(I);return e.token()?!0:e.checkProxyAuthed().pipe(T(t=>t?G(!0):e.refreshToken().pipe(w(()=>!0))))},We=()=>{let e=s(v),t=s(k),o=s(z),n=e.relayIsEnabled()?"longpoll":"websocket",a=[o.get(H).preload(!0),o.get(H).preloadFilterGroups(!0),o.get(N).preload(!0)];return e.configLoaded===null?P(a).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(a)))},$e=()=>!0,Oe={path:"connect/:typeParam",loadComponent:()=>import("./chunk-NJBOYRXU.js")},Ge=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},xe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-7JHU54QM.js")},{path:"logout",loadComponent:()=>import("./chunk-OVLGKJ3Z.js")},{path:"",canActivate:[Fe],children:[{path:"",canActivate:[We,$e,Ge],children:[{path:"welcome",loadComponent:()=>import("./chunk-UOZTEZ7B.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-TBQPNXMN.js")},Oe]},{path:"",loadComponent:()=>import("./chunk-NGPZXZJJ.js"),children:[{path:"",loadComponent:()=>import("./chunk-STB3WOIA.js")},Oe,{path:"destinations",loadComponent:()=>import("./chunk-AG7H2MR5.js")},{path:"add-backup",loadComponent:()=>import("./chunk-I7MAEY3S.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-AI6EYFMY.js")},{path:"backup/import",loadComponent:()=>import("./chunk-XHDAWK7I.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-I2T6IA4K.js"),loadChildren:()=>import("./chunk-R45TV6JI.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-I2T6IA4K.js"),loadChildren:()=>import("./chunk-R45TV6JI.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-A57TBTOD.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-RNE4Z2E4.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-P7TJCJ64.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-XZHXN75E.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-KYTPZ3WD.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-ZFREX3ZV.js")},{path:"from-config",loadComponent:()=>import("./chunk-R4E5IO3A.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-JRXD2X7B.js"),loadChildren:()=>import("./chunk-SMUUHPDS.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-JRXD2X7B.js"),loadChildren:()=>import("./chunk-SMUUHPDS.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-JRXD2X7B.js"),loadChildren:()=>import("./chunk-SMUUHPDS.js")},{path:"status",loadComponent:()=>import("./chunk-2FPYV4EW.js")},{path:"settings",loadComponent:()=>import("./chunk-OL5HI5OG.js")},{path:"about",loadComponent:()=>import("./chunk-5T2JCBPV.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-MMF252RQ.js")},{path:"changelog",loadComponent:()=>import("./chunk-7HFTVA4J.js")},{path:"libraries",loadComponent:()=>import("./chunk-PGISF7LM.js")},{path:"system-info",loadComponent:()=>import("./chunk-SFW3N5OL.js")},{path:"server-settings",loadComponent:()=>import("./chunk-VNF7NNO5.js")},{path:"logs",loadChildren:()=>import("./chunk-RFCIV3AX.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-V63YAEPZ.js")}]}]}]}]}]}];var U=null,Le=(e,t)=>{let o=s(I),n=s(de),a=s(h),p=s(f),i=a.getItem("locale"),u=s(ve),l=ke(i),r=ye.BASE||"",m=e.url===`${r}/api/v1/auth/login`,S=e.url===`${r}/api/v1/auth/logout`,g=e.url===`${r}/api/v1/auth/refresh`,b=e.url===`${r}/api/v1/progressstate`,E=e.url===`${r}/api/v1/remoteoperation/test`,Ue=e.url===`${r}/api/v1/filesystem/validate`,je=e.url.startsWith(`${r}/api/v2/`),L=o.token(),j=e,F=e.headers.has("custom-proxy-check")||L===we;if(L&&e.url.startsWith(r+p.baseUrl)&&!F){let c=e.headers.set("Authorization",`Bearer ${L}`);i&&i!=="en-US"&&(c=c.set("X-Ui-Language",l)),j=e.clone({headers:c})}return t(j).pipe(w(c=>{if(c.type===4&&c.status===200&&je){let y=c.body;if(y?.Success===!1)throw{status:200,message:y?.Error??"Unknown error",error:{Error:y?.Error??"Unknown error"},requestBody:y}}return c}),J(c=>{let y=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;if(!F){let R=!0;if((b&&c.status===404||E||Ue)&&(R=!1),g&&c.status===401&&(R=!1,o.logout(),n.navigate(["/logout"])),!m&&!g&&!S&&c.status===401)return R=!1,U??=o.refreshToken().pipe(K()),U.pipe(T(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),M(()=>U=null));R&&u.error(y)}return B(()=>({error:c,message:y}))}))};var O=class e{#e=s(X);showError(t){let o=this.#e.querySelector("body > .loading");if(!o)return;o.classList.add("has-error"),o.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let a=this.#e.createElement("div");a.classList.add("loading-error"),a.textContent=t||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),o.append(n,a,p)}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Be="1.0.0",Pe=`portal-proxy-client-${D()}`,Je=1,x=class e{#e=1e3;#a=s(f);#d=s(O);#o=d("disconnected");#u=d(this.#e);#p=d(!1);#n=d(!1);#l=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#c=[];#r={};#t=null;#h=new TextDecoder("utf-8");#m=null;#g=Q(()=>{let t=this.#p(),o=this.#u(),n=this.#l();if(!n||!t||!o||o<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n)},o)});#i(t){this.#s||(this.#s=!0,this.#d.showError(t||"Unable to connect to the server."))}#f(){this.#s||(this.#s=!0)}utf8Atob(t){let o=Uint8Array.from(atob(t),a=>a.charCodeAt(0)),n=this.#h.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,a=this.wsState();(a==="disconnected"||a==="error"||n)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(this.#a.machineServerUrl),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#p.set(!1),this.#l.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#l.set(t),this.#p.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=p=>{let i=JSON.parse(p.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let l={token:t,publicKey:"",clientVersion:Be,protocolVersion:Je},r=this.createResponse(i,"authportal",l);this.#o.set("welcome"),this.#t?.send(r)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var u=JSON.parse(i.payload??"");if(u.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#c.length>0;){let l=this.#c.pop();l&&this.#r[l.messageId]&&this.activateCommand(l)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let l=this.#r[i.messageId];if(l){if(i.errorMessage)this.#i(i.errorMessage),l.reject(i.errorMessage);else{let r=JSON.parse(i.payload??"");r.statusCode>=400?this.#i(r.body||`Initial request failed with status code ${r.statusCode}`):this.#f(),r.body=r?.body==null?null:this.utf8Atob(r.body),l.resolve(r)}delete this.#r[i.messageId],window.clearTimeout(l.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let a={from:Pe,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(a)}sendCommand(t,o,n,a,p,i,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((l,r)=>{let m=D(),g={from:Pe,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:a,body:p,headers:i})},b={resolve:l,reject:r,timer:window.setTimeout(()=>{let E=this.#r[m];E&&(delete this.#r[m],this.#i("The request timed out before receiving a response."),E.reject("Timeout"))},u)};this.#r[m]=b,this.#n()?this.activateCommand(g):this.#c.push(g)})}activateCommand(t){this.#t?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ke(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function He(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let a=Ke(t.body),p={};t.headers.keys().forEach(r=>{p[r]=t.headers.get(r)??""});let i=t.headers.get("timeout"),u=i!==null?parseInt(i):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let l=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,a,p,u);return new W(r=>{l.then(m=>{let S=new se;p!=null&&Object.keys(p).forEach(b=>{S.set(b,p[b])});let g=new ie({body:m.body,status:m.statusCode,statusText:"OK",headers:S});r.next(g),r.complete()}).catch(m=>{r.error(new ae({error:m??"Unknown error",status:0,statusText:m??"Unknown error"}))})})}var De=(e,t)=>{let o={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(x)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let a=new $;return o.relayconfigState.configLoaded.subscribe(p=>{p&&He(o,e,t).subscribe(a)}),a}return He(o,e,t)};var Ve={providers:[ee(),he(xe,ge(),fe(ue)),pe(ce(),le([De,Le])),h,{provide:f,useValue:Ne},{provide:te,useValue:Ae()},{provide:Ce,useValue:{alertVariant:"simple"}},Te,k,Ee,ne,Re,oe,Me,Ie]};re(A,Ve);
1
+ import{b as ke,c as Ae}from"./chunk-LGILJ5LY.js";import{a as Te}from"./chunk-MAKVVEKB.js";import{a as Ie}from"./chunk-3ZCJK7PY.js";import{b as k}from"./chunk-I2HYK2BL.js";import"./chunk-B35WNLRM.js";import{a as Me}from"./chunk-SLS3DCJP.js";import{b as Ee}from"./chunk-SUY5AQLW.js";import{a as D}from"./chunk-6Q6SSTBK.js";import{a as Re}from"./chunk-I4XRVBRQ.js";import"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-UUQWSINE.js";import{a as H}from"./chunk-BEXYTIOL.js";import{a as h,b as be,c as v,d as we,e as I}from"./chunk-LO5YNFFR.js";import{u as Ce,x as ve}from"./chunk-YCLTQEU6.js";import{a as ye,e as Se}from"./chunk-2LSZ2I43.js";import{c as me,d as de,g as ue,h as he,i as fe,j as ge}from"./chunk-BMWZYMK6.js";import{a as re}from"./chunk-7FYL7MVA.js";import{a as se,b as ie,c as ae,e as pe,f as le,g as ce}from"./chunk-NBTTYKXH.js";import{ha as oe,ma as ne}from"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Db as Z,E as M,I as K,K as T,Kc as ee,Lc as te,M as _,U as C,X as q,Z as s,eb as Y,f as W,g as $,ga as z,ha as X,l as G,m as B,oa as d,p as w,qa as Q,y as P,z as J}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var A=class e{#e=s(h);#a=s(v);ngOnInit(){be(),this.#a.fetchConfig(),this.#e.clearAllNotCurrentVersion()}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=Y({type:e,selectors:[["app-root"]],decls:1,vars:0,template:function(o,n){o&1&&Z(0,"router-outlet")},dependencies:[me],encapsulation:2})};var Ne={production:!0,baseUrl:"/api",machineServerUrl:"${WS_URL}",defaultTimeout:3e4};var f=new q("ENVIRONMENT");var N=class e{#e=s(Se);isLoaded=d(!1);webmodules=d(null);preload(t=!1){let o=this.#e.getApiV1Webmodules().pipe(_(n=>this.webmodules.set(n)),M(()=>this.isLoaded.set(!0)));if(t)return o;o.subscribe()}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=()=>{let e=s(I);return e.token()?!0:e.checkProxyAuthed().pipe(T(t=>t?G(!0):e.refreshToken().pipe(w(()=>!0))))},We=()=>{let e=s(v),t=s(k),o=s(z),n=e.relayIsEnabled()?"longpoll":"websocket",a=[o.get(H).preload(!0),o.get(H).preloadFilterGroups(!0),o.get(N).preload(!0)];return e.configLoaded===null?P(a).pipe(w(()=>n)):e.configLoaded?.pipe(T(()=>P(a)))},$e=()=>!0,Oe={path:"connect/:typeParam",loadComponent:()=>import("./chunk-7YLK4QIL.js")},Ge=()=>{let e=s(h);return!e.getItem("locale")&&navigator.language&&e.setItem("locale",navigator.language),!0},xe=[{path:"",children:[{path:"login",canActivate:[],loadComponent:()=>import("./chunk-XQTUBHIK.js")},{path:"logout",loadComponent:()=>import("./chunk-5ECY4LSP.js")},{path:"",canActivate:[Fe],children:[{path:"",canActivate:[We,$e,Ge],children:[{path:"welcome",loadComponent:()=>import("./chunk-VTFVTC7O.js"),children:[{path:"",redirectTo:"select",pathMatch:"full"},{path:"select",loadComponent:()=>import("./chunk-Q5WLMQD4.js")},Oe]},{path:"",loadComponent:()=>import("./chunk-CPI5ZQUF.js"),children:[{path:"",loadComponent:()=>import("./chunk-KQZNQ7RD.js")},Oe,{path:"destinations",loadComponent:()=>import("./chunk-AYCSIHGS.js")},{path:"add-backup",loadComponent:()=>import("./chunk-CNUQWXBC.js")},{path:"backup/:id/export",loadComponent:()=>import("./chunk-RC3UQLPB.js")},{path:"backup/import",loadComponent:()=>import("./chunk-7ZA3Q6TS.js")},{path:"backup-draft/:id",loadComponent:()=>import("./chunk-LQKADAHT.js"),loadChildren:()=>import("./chunk-54PAHILA.js")},{path:"backup/:id",loadComponent:()=>import("./chunk-LQKADAHT.js"),loadChildren:()=>import("./chunk-54PAHILA.js")},{path:"backup/:id/log",loadComponent:()=>import("./chunk-5KQZMHFN.js")},{path:"backup/:id/database",loadComponent:()=>import("./chunk-2T442RZU.js")},{path:"backup/:id/commandline",loadComponent:()=>import("./chunk-GLR4FXRG.js")},{path:"backup/:id/commandline/:runId",loadComponent:()=>import("./chunk-ODHFI4PA.js")},{path:"backup/:id/delete",loadComponent:()=>import("./chunk-3WOW2XM3.js")},{path:"restore",children:[{path:"",loadComponent:()=>import("./chunk-BSYMQ4VF.js")},{path:"from-config",loadComponent:()=>import("./chunk-C6RVYQ4M.js")}]},{path:"restore-from-files",loadComponent:()=>import("./chunk-NCN2TOJR.js"),loadChildren:()=>import("./chunk-GG5S6RWM.js")},{path:"restore-draft/:id",loadComponent:()=>import("./chunk-NCN2TOJR.js"),loadChildren:()=>import("./chunk-GG5S6RWM.js")},{path:"restore/:id",loadComponent:()=>import("./chunk-NCN2TOJR.js"),loadChildren:()=>import("./chunk-GG5S6RWM.js")},{path:"status",loadComponent:()=>import("./chunk-64IX6ISO.js")},{path:"settings",loadComponent:()=>import("./chunk-7B4AIHYK.js")},{path:"about",loadComponent:()=>import("./chunk-AZFGZQQK.js"),children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-WZV32HLQ.js")},{path:"changelog",loadComponent:()=>import("./chunk-IZCDGVXJ.js")},{path:"libraries",loadComponent:()=>import("./chunk-3KMV4PTJ.js")},{path:"system-info",loadComponent:()=>import("./chunk-U3SGWHNI.js")},{path:"server-settings",loadComponent:()=>import("./chunk-47PB4WN3.js")},{path:"logs",loadChildren:()=>import("./chunk-NDLPNBGE.js")},{path:"crashlogs",loadComponent:()=>import("./chunk-BKQA64HZ.js")}]}]}]}]}]}];var U=null,Le=(e,t)=>{let o=s(I),n=s(de),a=s(h),p=s(f),i=a.getItem("locale"),u=s(ve),l=ke(i),r=ye.BASE||"",m=e.url===`${r}/api/v1/auth/login`,S=e.url===`${r}/api/v1/auth/logout`,g=e.url===`${r}/api/v1/auth/refresh`,b=e.url===`${r}/api/v1/progressstate`,E=e.url===`${r}/api/v1/remoteoperation/test`,Ue=e.url===`${r}/api/v1/filesystem/validate`,je=e.url.startsWith(`${r}/api/v2/`),L=o.token(),j=e,F=e.headers.has("custom-proxy-check")||L===we;if(L&&e.url.startsWith(r+p.baseUrl)&&!F){let c=e.headers.set("Authorization",`Bearer ${L}`);i&&i!=="en-US"&&(c=c.set("X-Ui-Language",l)),j=e.clone({headers:c})}return t(j).pipe(w(c=>{if(c.type===4&&c.status===200&&je){let y=c.body;if(y?.Success===!1)throw{status:200,message:y?.Error??"Unknown error",error:{Error:y?.Error??"Unknown error"},requestBody:y}}return c}),J(c=>{let y=c.error?.Error||`Error Code: ${c.status}, Message: ${c.message}`;if(!F){let R=!0;if((b&&c.status===404||E||Ue)&&(R=!1),g&&c.status===401&&(R=!1,o.logout(),n.navigate(["/logout"])),!m&&!g&&!S&&c.status===401)return R=!1,U??=o.refreshToken().pipe(K()),U.pipe(T(()=>t(e.clone({headers:e.headers.set("Authorization",`Bearer ${o.token()}`)}))),M(()=>U=null));R&&u.error(y)}return B(()=>({error:c,message:y}))}))};var O=class e{#e=s(X);showError(t){let o=this.#e.querySelector("body > .loading");if(!o)return;o.classList.add("has-error"),o.innerHTML="";let n=this.#e.createElement("div");n.classList.add("loading-title"),n.textContent="Unable to connect";let a=this.#e.createElement("div");a.classList.add("loading-error"),a.textContent=t||"Unknown error";let p=this.#e.createElement("button");p.type="button",p.classList.add("retry-button"),p.textContent="Retry",p.addEventListener("click",()=>{this.#e.defaultView?.location.reload()}),o.append(n,a,p)}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};var Be="1.0.0",Pe=`portal-proxy-client-${D()}`,Je=1,x=class e{#e=1e3;#a=s(f);#d=s(O);#o=d("disconnected");#u=d(this.#e);#p=d(!1);#n=d(!1);#l=d(null);#s=!1;isConnectedToMachineServer=this.#n.asReadonly();wsState=this.#o.asReadonly();#c=[];#r={};#t=null;#h=new TextDecoder("utf-8");#m=null;#g=Q(()=>{let t=this.#p(),o=this.#u(),n=this.#l();if(!n||!t||!o||o<this.#e){this.#m&&window.clearInterval(this.#m);return}this.#m=window.setInterval(()=>{this.connectToMachineServer(n)},o)});#i(t){this.#s||(this.#s=!0,this.#d.showError(t||"Unable to connect to the server."))}#f(){this.#s||(this.#s=!0)}utf8Atob(t){let o=Uint8Array.from(atob(t),a=>a.charCodeAt(0)),n=this.#h.decode(o);return n?JSON.parse(n):null}connectToMachineServer(t,o){let n=o?.reconnect??!1,a=this.wsState();(a==="disconnected"||a==="error"||n)&&(this.#t?.close(),this.#t=null),!this.#t&&(this.#s=!1,this.#t=new WebSocket(this.#a.machineServerUrl),this.#o.set("connecting"),this.#t.onopen=()=>{this.#o.set("connect"),this.#n.set(!0),this.#p.set(!1),this.#l.set(null)},this.#t.onclose=()=>{this.#o.set("disconnected"),this.#n.set(!1),this.#l.set(t),this.#p.set(!0)},this.#t.onerror=()=>{this.#o.set("error")},this.#t.onmessage=p=>{let i=JSON.parse(p.data);if(this.wsState()==="connect"){if(i.type!=="welcome"){this.disconnectFromMachineServer(`Unexpected message type, expected 'welcome' but got '${i.type}'`);return}let l={token:t,publicKey:"",clientVersion:Be,protocolVersion:Je},r=this.createResponse(i,"authportal",l);this.#o.set("welcome"),this.#t?.send(r)}else if(this.wsState()==="welcome"){if(i.type!=="authportal"){this.disconnectFromMachineServer(`Unexpected message type, expected 'authportal' but got '${i.type}'`);return}var u=JSON.parse(i.payload??"");if(u.accepted===!1){this.#i("Authentication failed"),this.disconnectFromMachineServer("Authentication failed");return}for(this.#o.set("authenticated"),this.#n.set(!0);this.#c.length>0;){let l=this.#c.pop();l&&this.#r[l.messageId]&&this.activateCommand(l)}}else if(this.wsState()==="authenticated"){if(i.type!=="command"){console.warn(`Unexpected message type, expected 'command' but got '${i.type}'`);return}let l=this.#r[i.messageId];if(l){if(i.errorMessage)this.#i(i.errorMessage),l.reject(i.errorMessage);else{let r=JSON.parse(i.payload??"");r.statusCode>=400?this.#i(r.body||`Initial request failed with status code ${r.statusCode}`):this.#f(),r.body=r?.body==null?null:this.utf8Atob(r.body),l.resolve(r)}delete this.#r[i.messageId],window.clearTimeout(l.timer)}}})}disconnectFromMachineServer(t=null){t&&console.error(t),this.#t?.close(),this.#t=null,this.#o.set("disconnected"),this.#n.set(!1)}createResponse(t,o,n){let a={from:Pe,to:t.from,type:o,messageId:t.messageId,payload:JSON.stringify(n)};return JSON.stringify(a)}sendCommand(t,o,n,a,p,i,u=5e3){return(this.wsState()==="disconnected"||this.wsState()==="error")&&this.connectToMachineServer(t),new Promise((l,r)=>{let m=D(),g={from:Pe,to:o,type:"command",messageId:m,payload:JSON.stringify({method:n,path:a,body:p,headers:i})},b={resolve:l,reject:r,timer:window.setTimeout(()=>{let E=this.#r[m];E&&(delete this.#r[m],this.#i("The request timed out before receiving a response."),E.reject("Timeout"))},u)};this.#r[m]=b,this.#n()?this.activateCommand(g):this.#c.push(g)})}activateCommand(t){this.#t?.send(JSON.stringify(t))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})};function Ke(e){if(typeof e!="string")return null;let o=new TextEncoder().encode(e);return window.btoa(String.fromCharCode(...o))}function He(e,t,o){let n=e.relayconfigState.config();if(n===null)return o(t);let a=Ke(t.body),p={};t.headers.keys().forEach(r=>{p[r]=t.headers.get(r)??""});let i=t.headers.get("timeout"),u=i!==null?parseInt(i):e.defaultTimeout;t.url.startsWith("/api/v1/serverstate")&&t.url.includes("longpoll=true")&&(u=1e3*99);let l=e.relayWebsocket.sendCommand(n.accessToken,n.clientId,t.method,t.url,a,p,u);return new W(r=>{l.then(m=>{let S=new se;p!=null&&Object.keys(p).forEach(b=>{S.set(b,p[b])});let g=new ie({body:m.body,status:m.statusCode,statusText:"OK",headers:S});r.next(g),r.complete()}).catch(m=>{r.error(new ae({error:m??"Unknown error",status:0,statusText:m??"Unknown error"}))})})}var De=(e,t)=>{let o={relayconfigState:s(v),defaultTimeout:s(f).defaultTimeout,relayWebsocket:s(x)},n=o.relayconfigState.config();if(o.relayconfigState.configLoaded!==null&&n===null){let a=new $;return o.relayconfigState.configLoaded.subscribe(p=>{p&&He(o,e,t).subscribe(a)}),a}return He(o,e,t)};var Ve={providers:[ee(),he(xe,ge(),fe(ue)),pe(ce(),le([De,Le])),h,{provide:f,useValue:Ne},{provide:te,useValue:Ae()},{provide:Ce,useValue:{alertVariant:"simple"}},Te,k,Ee,ne,Re,oe,Me,Ie]};re(A,Ve);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duplicati/ngclient",
3
- "version": "0.0.207",
3
+ "version": "0.0.208",
4
4
  "license": "MIT",
5
5
  "contributors": [
6
6
  "sp90",