@duplicati/ngclient 0.0.205 → 0.0.207

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 (162) hide show
  1. package/assets/dest-icons/googleworkspace.png +0 -0
  2. package/assets/sh-bold.woff2 +0 -0
  3. package/assets/sh.woff2 +0 -0
  4. package/chunk-23UYU3M3.js +1 -0
  5. package/chunk-2FPYV4EW.js +1 -0
  6. package/chunk-2K74TI2N.js +1 -0
  7. package/{chunk-HCSB3IIB.js → chunk-2T4BMRWX.js} +1 -1
  8. package/{chunk-D6IP567E.js → chunk-3MS6SVET.js} +1 -1
  9. package/{chunk-BABBRM6A.js → chunk-3QS6DB3O.js} +1 -1
  10. package/chunk-4HB376H3.js +1 -0
  11. package/{chunk-VDSX2M4H.js → chunk-4VYR5E5I.js} +1 -1
  12. package/chunk-5MKFV3IB.js +1 -0
  13. package/chunk-5T2JCBPV.js +1 -0
  14. package/{chunk-GRVTXORM.js → chunk-6COK7FLL.js} +1 -1
  15. package/chunk-7E5J43IH.js +1 -0
  16. package/{chunk-BYUBKTO5.js → chunk-7HFTVA4J.js} +1 -1
  17. package/chunk-7JHU54QM.js +1 -0
  18. package/chunk-7MPZ3MRD.js +1 -0
  19. package/chunk-7PUXNL75.js +1 -0
  20. package/chunk-A57TBTOD.js +1 -0
  21. package/chunk-AG7H2MR5.js +1 -0
  22. package/chunk-AGMFKAHM.js +1 -0
  23. package/chunk-AI6EYFMY.js +1 -0
  24. package/chunk-AZEV3A4R.js +11 -0
  25. package/chunk-C5OYK6UC.js +2 -0
  26. package/chunk-CAJQ2FEU.js +1 -0
  27. package/{chunk-MZ5COKIP.js → chunk-CTQKCCGM.js} +1 -1
  28. package/chunk-DKPWJYG3.js +1 -0
  29. package/chunk-DRRYACBV.js +1 -0
  30. package/{chunk-SZUNW4JO.js → chunk-EG3PT3XW.js} +1 -1
  31. package/{chunk-QHBOEY2O.js → chunk-FJFREVRV.js} +1 -1
  32. package/chunk-G3FMV74P.js +1 -0
  33. package/{chunk-B62TPRVG.js → chunk-GGW26MAG.js} +1 -1
  34. package/chunk-GTZRHPRV.js +1 -0
  35. package/chunk-I2T6IA4K.js +1 -0
  36. package/chunk-I6PR2AV2.js +1 -0
  37. package/chunk-I7MAEY3S.js +1 -0
  38. package/chunk-IAZGVY3O.js +1 -0
  39. package/chunk-IPGH33MU.js +1 -0
  40. package/chunk-JJY6UOEY.js +1 -0
  41. package/chunk-JRXD2X7B.js +1 -0
  42. package/chunk-JWPG4EWG.js +1 -0
  43. package/{chunk-ZU6T3TW3.js → chunk-KLAJGS5T.js} +1 -1
  44. package/{chunk-ZWLAV6HO.js → chunk-KUGAORAS.js} +1 -1
  45. package/{chunk-7TWUW4XJ.js → chunk-KUX6NGQU.js} +1 -1
  46. package/chunk-KYTPZ3WD.js +1 -0
  47. package/chunk-L22UB6DH.js +1 -0
  48. package/{chunk-PO3L6MKW.js → chunk-LU7RSOI6.js} +1 -1
  49. package/chunk-MMF252RQ.js +1 -0
  50. package/chunk-NAMMULH4.js +1 -0
  51. package/{chunk-HUZXJWCG.js → chunk-NGKFJLI2.js} +1 -1
  52. package/chunk-NGPZXZJJ.js +1 -0
  53. package/chunk-NJBOYRXU.js +1 -0
  54. package/{chunk-TL4WOQKT.js → chunk-O3GGVB2B.js} +1 -1
  55. package/{chunk-7LTHH6OG.js → chunk-OAAXQ2BE.js} +1 -1
  56. package/chunk-OL5HI5OG.js +2 -0
  57. package/{chunk-37CUOEGJ.js → chunk-OOL5FC7N.js} +1 -1
  58. package/{chunk-EE5SIDTF.js → chunk-OVLGKJ3Z.js} +1 -1
  59. package/{chunk-NK5WD6WE.js → chunk-OWBBT5WF.js} +1 -1
  60. package/chunk-P7TJCJ64.js +3 -0
  61. package/{chunk-R5YJUVWW.js → chunk-PGISF7LM.js} +1 -1
  62. package/chunk-PVWYJV5Y.js +1 -0
  63. package/chunk-QY4Y5NJB.js +4 -0
  64. package/{chunk-5LBG6MOL.js → chunk-QY5UGQ3R.js} +1 -1
  65. package/chunk-R45TV6JI.js +1 -0
  66. package/{chunk-I3IIG2AK.js → chunk-R4E5IO3A.js} +1 -1
  67. package/chunk-RFCIV3AX.js +1 -0
  68. package/chunk-RJM43XMN.js +1 -0
  69. package/chunk-RNE4Z2E4.js +1 -0
  70. package/{chunk-6LAXPU22.js → chunk-RWDQ3L3C.js} +1 -1
  71. package/chunk-SFW3N5OL.js +1 -0
  72. package/chunk-SIMG6PGZ.js +2 -0
  73. package/chunk-SMUUHPDS.js +1 -0
  74. package/chunk-STB3WOIA.js +1 -0
  75. package/chunk-T2KOS3XX.js +1 -0
  76. package/{chunk-AIH3GSIT.js → chunk-TBQPNXMN.js} +1 -1
  77. package/{chunk-NGNWWP6M.js → chunk-UOZTEZ7B.js} +1 -1
  78. package/{chunk-VFBRHP2H.js → chunk-V63YAEPZ.js} +1 -1
  79. package/{chunk-KDSMLI73.js → chunk-VKNFRCHQ.js} +1 -1
  80. package/{chunk-7AVOHYTE.js → chunk-VLMNSWR3.js} +1 -1
  81. package/{chunk-T4IKTBRQ.js → chunk-VNF7NNO5.js} +1 -1
  82. package/{chunk-AODNZLCK.js → chunk-VPUFUCR3.js} +1 -1
  83. package/chunk-VUKQJ766.js +1 -0
  84. package/{chunk-MDXSNEQZ.js → chunk-WLAJ3YIP.js} +1 -1
  85. package/{chunk-G2FJM62F.js → chunk-XHDAWK7I.js} +1 -1
  86. package/chunk-XTFBRBQX.js +1 -0
  87. package/chunk-XZHXN75E.js +1 -0
  88. package/chunk-Y46QCSB5.js +1 -0
  89. package/chunk-Z2BNW4KI.js +1 -0
  90. package/chunk-ZFREX3ZV.js +1 -0
  91. package/chunk-ZPIR5QIQ.js +2 -0
  92. package/index.html +2 -2
  93. package/locale/messages.da.json +9 -23
  94. package/locale/messages.de.json +114 -60
  95. package/locale/messages.de_CH.json +80 -37
  96. package/locale/messages.en.json +73 -39
  97. package/locale/messages.en_GB.json +73 -39
  98. package/locale/messages.es.json +43 -10
  99. package/locale/messages.fr.json +611 -17
  100. package/locale/messages.it.json +104 -63
  101. package/locale/messages.json +73 -39
  102. package/locale/messages.pl.json +376 -12
  103. package/main-DIGDM6JP.js +1 -0
  104. package/package.json +1 -1
  105. package/ship-ui-assets/mcp/components.json +4388 -0
  106. package/styles-377DNUNK.css +1 -0
  107. package/chunk-26MRZAFB.js +0 -1
  108. package/chunk-26Z7TPJB.js +0 -4
  109. package/chunk-3K3BYB36.js +0 -1
  110. package/chunk-3QV6WLWV.js +0 -1
  111. package/chunk-4GXIF5HF.js +0 -1
  112. package/chunk-4RYK5OOO.js +0 -1
  113. package/chunk-5MHYH7GK.js +0 -2
  114. package/chunk-5QWAH3QX.js +0 -1
  115. package/chunk-5VE6P5U5.js +0 -1
  116. package/chunk-7DCQVM6E.js +0 -1
  117. package/chunk-AT64P6E5.js +0 -2
  118. package/chunk-BFTGDQ4K.js +0 -1
  119. package/chunk-BT2VIZXE.js +0 -1
  120. package/chunk-C25WT56X.js +0 -1
  121. package/chunk-C7N24TZM.js +0 -1
  122. package/chunk-CFNARBNK.js +0 -1
  123. package/chunk-COPBOHWE.js +0 -1
  124. package/chunk-DESKT7LH.js +0 -1
  125. package/chunk-EE27B3OV.js +0 -1
  126. package/chunk-F3JL4GJQ.js +0 -1
  127. package/chunk-G4IFZKMI.js +0 -1
  128. package/chunk-GJKZESBX.js +0 -1
  129. package/chunk-H4LQO7G2.js +0 -1
  130. package/chunk-HOGZ74SB.js +0 -1
  131. package/chunk-HSHF5HR7.js +0 -1
  132. package/chunk-I27PVH6D.js +0 -1
  133. package/chunk-I2RQR4CB.js +0 -1
  134. package/chunk-IGYSPFE7.js +0 -1
  135. package/chunk-JN4WCRAH.js +0 -1
  136. package/chunk-K34VOGDF.js +0 -1
  137. package/chunk-KV5UORE3.js +0 -1
  138. package/chunk-LT3AVRVP.js +0 -1
  139. package/chunk-LXSHDO5C.js +0 -11
  140. package/chunk-M7Y3VPRV.js +0 -1
  141. package/chunk-MIMGEZMT.js +0 -1
  142. package/chunk-MLNK7NFW.js +0 -2
  143. package/chunk-MMEFBZO4.js +0 -1
  144. package/chunk-NNNKIEPR.js +0 -1
  145. package/chunk-OIYIWMS7.js +0 -1
  146. package/chunk-OPLWAKSM.js +0 -3
  147. package/chunk-Q2UQ5J3C.js +0 -1
  148. package/chunk-Q74O3CWJ.js +0 -1
  149. package/chunk-S2RZQVCD.js +0 -1
  150. package/chunk-T4BXBCQI.js +0 -1
  151. package/chunk-U2E3ZQUP.js +0 -1
  152. package/chunk-UK7MV4OF.js +0 -1
  153. package/chunk-UNLX3IVU.js +0 -1
  154. package/chunk-UNMDSCAN.js +0 -1
  155. package/chunk-W3YBKYPJ.js +0 -1
  156. package/chunk-XIYAYCFU.js +0 -1
  157. package/chunk-XLMLR5EV.js +0 -1
  158. package/chunk-YHMXLWRX.js +0 -1
  159. package/chunk-YLQF5ATT.js +0 -1
  160. package/chunk-ZHGDQABC.js +0 -2
  161. package/main-HMCIC27B.js +0 -1
  162. package/styles-H32RJLOU.css +0 -1
@@ -0,0 +1 @@
1
+ import{_ as kt,fa as Rt,wa as fi}from"./chunk-VLMNSWR3.js";import{a as Ft}from"./chunk-VKNFRCHQ.js";import{$a as D,$b as P,Ab as Ie,Ac as lt,Bb as X,Bc as Ge,Cb as p,Cc as Vt,Db as m,Eb as ae,Fb as R,Gb as H,Hb as Me,Jc as hi,Kb as _e,Lb as q,Oc as Nt,Pc as b,R as ot,Ra as li,Sa as f,T as ee,Tc as le,U as Te,Uc as c,V as Be,Vc as te,X as he,Xa as Mt,Xc as It,Ya as st,Yb as w,Yc as W,Z as y,Zb as Ee,Zc as At,_a as ve,_b as g,a as ei,aa as si,ab as ci,ac as h,ba as ri,bd as pi,ca as O,da as T,dd as Pt,ec as xt,fb as V,fc as fe,g as ti,ga as Ve,gb as je,gc as se,ha as be,hb as B,hc as Ot,ia as ge,ic as K,jb as G,jc as A,k as ii,ka as me,kb as pe,kc as Tt,lc as F,mc as C,nb as Et,nc as Ae,oa as v,ob as di,oc as J,p as ni,pc as rt,qa as I,ra as ne,rb as wt,rc as Ue,sa as He,sc as We,ta as Se,tc as $e,ub as oe,uc as at,v as oi,va as k,vb as S,vc as re,wb as M,wc as U,xb as ze,yb as ui,za as ai,zb as Ne,zc as Q}from"./chunk-QY4Y5NJB.js";import{a as L,b as $,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(k))};static \u0275dir=B({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=B({type:i,features:[G]})}return i})(),ye=new he(""),Qi={provide:ye,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=B({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,n){t&1&&w("change",function(r){return n.onChange(r.target.checked)})("blur",function(){return n.onTouched()})},standalone:!1,features:[Q([Qi]),G]})}return i})(),Ki={provide:ye,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(k),D(en,8))};static \u0275dir=B({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&&w("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]),G]})}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 we=new he(""),xe=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 wi(i){return i!=null}function xi(i){return di(i)?ii(i):i}function Oi(i){let o={};return i.forEach(e=>{o=e!=null?L(L({},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(wi);return o.length==0?null:function(e){return Oi(Ti(e,o))}}function Ut(i){return i!=null?Ni(Vi(i)):null}function Ii(i){if(!i)return null;let o=i.filter(wi);return o.length==0?null:function(e){let t=Ti(e,o).map(xi);return oi(t).pipe(ni(Oi))}}function Wt(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=Ut(this._rawValidators)}_setAsyncValidators(o){this._rawAsyncValidators=o||[],this._composedAsyncValidatorFn=Wt(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&&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=B({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,n){t&2&&A("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:[G]})}return i})(),Er=(()=>{class i extends ht{constructor(e){super(e)}static \u0275fac=function(t){return new(t||i)(D(Z,10))};static \u0275dir=B({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(t,n){t&2&&A("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:[G]})}return i})();var qe="VALID",ct="INVALID",Pe="PENDING",Ye="DISABLED",Ce=class{},pt=class extends Ce{value;source;constructor(o,e){super(),this.value=o,this.source=e}},Qe=class extends Ce{pristine;source;constructor(o,e){super(),this.pristine=o,this.source=e}},Ze=class extends Ce{touched;source;constructor(o,e){super(),this.touched=o,this.source=e}},Fe=class extends Ce{status;source;constructor(o,e){super(),this.status=o,this.source=e}},ft=class extends Ce{source;constructor(o){super(),this.source=o}},Je=class extends Ce{source;constructor(o){super(),this.source=o}};function $t(i){return(_t(i)?i.validators:i)||null}function hn(i){return Array.isArray(i)?Ut(i):i||null}function Gt(i,o){return(_t(o)?o.asyncValidators:i)||null}function pn(i){return Array.isArray(i)?Wt(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 ne(this.statusReactive)}set status(o){ne(()=>this.statusReactive.set(o))}_status=b(()=>this.statusReactive());statusReactive=v(void 0);get valid(){return this.status===qe}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 ne(this.pristineReactive)}set pristine(o){ne(()=>this.pristineReactive.set(o))}_pristine=b(()=>this.pristineReactive());pristineReactive=v(!0);get dirty(){return!this.pristine}get touched(){return ne(this.touchedReactive)}set touched(o){ne(()=>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;this._parent&&!o.onlySelf&&this._parent.markAsTouched($(L({},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})}),this._parent&&!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;this._parent&&!o.onlySelf&&this._parent.markAsDirty($(L({},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})}),this._parent&&!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)),this._parent&&!o.onlySelf&&this._parent.markAsPending($(L({},o),{sourceControl:e}))}disable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=Ye,this.errors=null,this._forEachChild(n=>{n.disable($(L({},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($(L({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(o={}){let e=this._parentMarkedDirty(o.onlySelf);this.status=qe,this._forEachChild(t=>{t.enable($(L({},o),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:o.emitEvent}),this._updateAncestors($(L({},o),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(o,e){this._parent&&!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===qe||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)),this._parent&&!o.onlySelf&&this._parent.updateValueAndValidity($(L({},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:qe}_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=xi(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&&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:qe}_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,this._parent&&!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)),this._parent&&!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){let e=this._parent&&this._parent.dirty;return!o&&!!e&&!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($t(e),Gt(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,$(L({},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 Ct(i,o){return[...o.path,i]}function et(i,o,e=it){qt(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&&(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 qt(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,qt(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 Cn(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:Cn(s)?t=s:n=s}),n||t||e||null}function yn(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 ne(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({},Ut(e),Wt(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(()=>{let t=this._findContainer(e.path);t&&t.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(()=>{let t=this._findContainer(e.path);t&&t.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(we,10),D(xe,10),D(Oe,8))};static \u0275dir=B({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,n){t&1&&w("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]),G]})}return i})();function Ci(i,o){let e=i.indexOf(o);e>-1&&i.splice(e,1)}function yi(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($t(e),Gt(t,e)),this._applyFormState(o),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),_t(e)&&(e.nonNullable||e.initialValueIsDefault)&&(yi(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){Ci(this._onChange,o)}registerOnDisabledChange(o){this._onDisabledChange.push(o)}_unregisterOnDisabledChange(o){Ci(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){yi(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&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Ct(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=B({type:i,standalone:!1,features:[G]})}return i})();var En={provide:ce,useExisting:ee(()=>yt)},Di=Promise.resolve(),yt=(()=>{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&&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?Ct(e,this._parent):[e]}static \u0275fac=function(t){return new(t||i)(D(Z,9),D(we,10),D(xe,10),D(ye,10),D(At,8),D(Oe,8))};static \u0275dir=B({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]),G,He]})}return i})();var xr=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=B({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),wn={provide:ye,useExisting:ee(()=>xn),multi:!0},xn=(()=>{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=B({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,n){t&1&&w("input",function(r){return n.onChange(r.target.value)})("blur",function(){return n.onTouched()})},standalone:!1,features:[Q([wn]),G]})}return i})(),On={provide:ye,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=y(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(k),D(Tn),D(Ve))};static \u0275dir=B({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,n){t&1&&w("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[Q([On]),G]})}return i})(),Nn={provide:ye,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=B({type:i,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,n){t&1&&w("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]),G]})}return i})(),Ht=class extends ke{constructor(o,e,t){super($t(e),Gt(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],$(L({},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 ne(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),yn(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){if(this.form){let t=this.form.get(e.path);t&&_n(t,e)&&t.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){qt(this.form,this),this._oldForm&&vt(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(t){return new(t||i)(D(we,10),D(xe,10),D(Oe,8))};static \u0275dir=B({type:i,features:[G,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(we,10),D(xe,10),D(ye,10),D(Qt,8),D(Oe,8))};static \u0275dir=B({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]),G,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(){Ui(this._parent)}static \u0275fac=function(t){return new(t||i)(D(Z,13),D(we,10),D(xe,10))};static \u0275dir=B({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[Q([Fn]),G]})}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(){Ui(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 Ct(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(t){return new(t||i)(D(Z,13),D(we,10),D(xe,10))};static \u0275dir=B({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[Q([kn]),G]})}return i})();function Ui(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&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Ct(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(we,10),D(xe,10),D(ye,10),D(Qt,8))};static \u0275dir=B({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]),G,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=B({type:i,selectors:[["","formGroup",""]],hostBindings:function(t,n){t&1&&w("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]),G]})}return i})();var Wi=(()=>{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,$(L({},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:[Wi]})}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:[Wi]})}return i})();var ie=["*"],jn=[[["","icon",""]],[["sh-icon"]],[["","title",""]],"*",[["button"]],[["","actions",""]],[["","content",""]],[["p"]]],zn=["[icon]","sh-icon","[title]","*","button","[actions]","[content]","p"];function Un(i,o){i&1&&(p(0,"sh-icon",3),C(1,"info"),m())}function Wn(i,o){i&1&&(p(0,"sh-icon",3),C(1,"info"),m())}function $n(i,o){i&1&&(p(0,"sh-icon",3),C(1,"warning"),m())}function Gn(i,o){i&1&&(p(0,"sh-icon",3),C(1,"warning-octagon"),m())}function qn(i,o){i&1&&(p(0,"sh-icon",3),C(1,"check-circle"),m())}function Yn(i,o){i&1&&(p(0,"sh-icon",3),C(1,"question"),m())}function Xn(i,o){if(i&1){let e=q();p(0,"sh-icon",8),w("click",function(){O(e);let n=g();return T(n.removeAlert())}),C(1,"plus"),m()}}var Qn=["dialogRef"];function Zn(i,o){if(i&1){let e=q();R(0,"div",5),Ee("click",function(){O(e);let n=g(2);return T(n.isOpen.set(!1))}),H()}}function Kn(i,o){if(i&1&&(R(0,"dialog",2,0)(2,"div",3),h(3),H(),S(4,Zn,1,0,"div",4),H()),i&2){let e=g(),t=U(0);F(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&&C(0),i&2){let e=g();J(" - ",e.getMonthName(e.getLastVisibleMonth())," ")}}function io(i,o){if(i&1&&(p(0,"div"),C(1),m()),i&2){let e=o.$implicit;f(),Ae(e)}}function no(i,o){if(i&1){let e=q();p(0,"div",2,1),w("click",function(){let n=O(e).$implicit,s=Ot(1),r=g(2);return T(r.setDate(n,s))}),C(2),m()}if(i&2){let e=o.$implicit,t=g().$implicit,n=g();F(n.isDateSelected(e)),A("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=q();R(0,"div",6,1)(2,"div",7),Ee("click",function(n){O(e);let s=g();return T(s.eventClose(n))}),H(),R(3,"div",8,2),h(5,3),H()()}if(i&2){let e=g();oe("id",e.id()+"hello"),f(3),Tt(e.menuStyle()),K("position-anchor",e.id())}}var po=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["","popoverContent",""]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],fo=["label","[prefix]","[textPrefix]","input","[popoverContent]","textarea","[textSuffix]","[suffix]","[error]","[hint]"],$i=()=>({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),C(1),m()),i&2){let e=g();f(),J(" ",e._maskedDate()," ")}}function _o(i,o){if(i&1){let e=q();p(0,"sh-datepicker",7),w("dateChange",function(n){O(e);let s=g();return T(s.onDateChange(n))}),m()}if(i&2){let e=g();F(e.currentClass()),X("date",e.internalDate())}}function Co(i,o){}var yo=[[["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),C(1),m()),i&2){let e=g();f(),Ae(e.files()[0].name)}}function wo(i,o){if(i&1&&(p(0,"div",3),C(1),m()),i&2){let e=g();f(),J("",e.files().length," files selected")}}function xo(i,o){if(i&1&&(p(0,"div",4),C(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),C(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}),Gi=(i,o)=>({$implicit:i,last:o}),Dt=i=>({$implicit:i});function Bo(i,o){if(i&1&&C(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=U(3);X("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,Gi,t,n===s-1))}}function zo(i,o){if(i&1&&C(0),i&2){let e=g(3).$implicit,t=g(2);J(" ",t.getLabel(e)," ")}}function Uo(i,o){if(i&1){let e=q();p(0,"sh-chip",12),w("click",function(n){O(e);let s=g(2).$index,r=g(2);return T(r.removeSelectedOptionByIndex(n,s))}),S(1,jo,1,5,"ng-container")(2,zo,1,1),p(3,"sh-icon"),C(4,"x-bold"),m()()}if(i&2){let e=g(4),t=U(3);F(e.selectClasses()),f(),M(t?1:2)}}function Wo(i,o){i&1&&_e(0)}function $o(i,o){if(i&1&&pe(0,Wo,1,0,"ng-container",13),i&2){let e=g(4),t=e.$implicit,n=e.$index,s=e.$count;g(2);let r=U(3);X("ngTemplateOutlet",r)("ngTemplateOutletContext",Vt(2,Gi,t,n===s-1))}}function Go(i,o){if(i&1&&C(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 qo(i,o){if(i&1&&S(0,$o,1,5,"ng-container")(1,Go,1,1),i&2){g(5);let e=U(3);M(e?0:1)}}function Yo(i,o){if(i&1&&S(0,qo,2,1),i&2){g(4);let e=U(6);M(e?-1:0)}}function Xo(i,o){if(i&1&&S(0,Uo,5,3,"sh-chip",11)(1,Yo,1,1),i&2){g(3);let e=U(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=U(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=U(0);X("ngTemplateOutlet",e)}}function es(i,o){if(i&1&&C(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=U(0);M(e?0:1)}}function is(i,o){i&1&&(p(0,"sh-icon",6),C(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),C(1,"list-magnifying-glass"),m())}function ss(i,o){i&1&&(p(0,"sh-icon",6),C(1,"magnifying-glass"),m())}function rs(i,o){if(i&1){let e=q();p(0,"sh-icon",15),w("click",function(n){O(e);let s=g();return T(s.clear(n))}),C(1,"x-bold"),m()}}function as(i,o){i&1&&(p(0,"sh-icon",6),C(1,"caret-down"),m())}function ls(i,o){i&1&&(p(0,"sh-icon",6),C(1,"caret-up"),m())}function cs(i,o){if(i&1&&(p(0,"p",9),C(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=U(0);g();let t=U(1);X("ngTemplateOutlet",t)("ngTemplateOutletContext",Ge(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=U(0);g();let t=U(4);X("ngTemplateOutlet",t)("ngTemplateOutletContext",Ge(2,Dt,e))}}function fs(i,o){if(i&1&&C(0),i&2){g(2);let e=U(1);J(" ",e," ")}}function gs(i,o){i&1&&ae(0,"sh-divider")}function ms(i,o){if(i&1){let e=q();S(0,cs,2,1,"p",9),p(1,"li",16),w("click",function(){O(e);let n=g(2);return T(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=U(0),t=g(),n=U(1),s=U(4);M(t.freeTextTitle()?0:-1),f(),A("selected",t.isSelected(-1))("focused",t.focusedOptionIndex()===-1),X("id",t.getLabelAsSlug(e)),oe("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=re(e.computedFreeTextOption());f();let n=re(e.getValue(t));f(),M(n.length>0?2:-1)}}function _s(i,o){if(i&1&&(p(0,"p",9),C(1),m()),i&2){let e=g();f(),Ae(e.optionTitle())}}function Cs(i,o){if(i&1&&ae(0,"sh-checkbox"),i&2){let e=g().$index,t=g();F(t.selectClasses()),A("active",t.isSelected(e))}}function ys(i,o){i&1&&_e(0)}function Ds(i,o){if(i&1&&pe(0,ys,1,0,"ng-container",13),i&2){let e=g().$implicit;g();let t=U(4);X("ngTemplateOutlet",t)("ngTemplateOutletContext",Ge(2,Dt,e))}}function bs(i,o){if(i&1&&C(0),i&2){let e=g().$implicit,t=g();J(" ",t.getLabel(e)," ")}}function Ss(i,o){if(i&1){let e=q();p(0,"li",16),w("click",function(){let n=O(e).$index,s=g();return T(s.toggleOptionByIndex(n))}),S(1,Cs,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=U(4);A("selected",n.isSelected(t))("focused",t===n.focusedOptionIndex()),X("id",n.getLabelAsSlug(e)),oe("aria-selected",n.isSelected(t)),f(),M(n.selectMultiple()?1:-1),f(),M(s?2:3)}}var Ms=["dragImageElement"],Es=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],ws=["[sidenav]","[sidenav-closed-topbar]","*"];function xs(i,o){i&1&&Me(0,"div",1,0)}function Os(i,o){if(i&1){let e=q();R(0,"div",7),Ee("drop",function(n){O(e);let s=g();return T(s.drop(n))})("dragenter",function(){O(e);let n=g();return T(n.dragEnter())})("dragleave",function(){O(e);let n=g();return T(n.dragLeave())}),H()}}function Ts(i,o){if(i&1){let e=q();R(0,"div",8),Ee("dragstart",function(n){O(e);let s=g();return T(s.dragStart(n))})("dragend",function(n){O(e);let s=g();return T(s.dragEnd(n))})("drag",function(n){O(e);let s=g();return T(s.drag(n))})("touchstart",function(n){O(e);let s=g();return T(s.touchStart(n))})("touchmove",function(n){O(e);let s=g();return T(s.touchMove(n))})("touchend",function(n){O(e);let s=g();return T(s.touchEnd(n))})("touchcancel",function(n){O(e);let s=g();return T(s.touchCancel(n))}),H()}}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&&C(0,"Title")}function Bs(i,o){i&1&&(p(0,"sh-icon",1),C(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();X("ngTemplateOutlet",e.content())("ngTemplateOutletContext",Ge(2,Dt,e.tooltipContext))}}function zs(i,o){if(i&1&&C(0),i&2){let e=g();J(" ",e.content()," ")}}var qi=new he("Ship UI Config");function Y(i,o){let e=y(qi,{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 Us=["bold","thin","light","fill","duotone"],De=(()=>{class i{constructor(){this.#e=y(k),this.#n=y(ve),this.color=c(null),this.variant=c(null),this.size=c(null),this.hostClasses=Y("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&&Us.includes(t)&&this.#n.addClass(this.#e.nativeElement,t)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-icon"]],hostVars:2,hostBindings:function(t,n){t&2&&F(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(P(),h(0))},encapsulation:2,changeDetection:0})}}return i})(),ta=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.hostClasses=Y("alert",{color:this.color,variant:this.variant}),this._el=y(k),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=V({type:i,selectors:[["sh-alert"]],hostAttrs:[1,"sh-sheet"],hostVars:2,hostBindings:function(t,n){t&2&&F(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&&(P(jn),p(0,"div",1)(1,"div",2,0),h(3),h(4,1),m(),p(5,"div",2),S(6,Un,2,0,"sh-icon",3)(7,Wn,2,0,"sh-icon",3)(8,$n,2,0,"sh-icon",3)(9,Gn,2,0,"sh-icon",3)(10,qn,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=>[$(L({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...n]),setTimeout(()=>{this.alertHistory.update(n=>n.map(s=>$(L({},s),{animateIn:s.id===t?!1:s.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(n=>$(L({},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=>$(L({},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})(),Ws={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},$s=(()=>{class i{constructor(){this.#e=y(be),this.#n=y(qi,{optional:!0}),this.dialogRef=te("dialogRef"),this.isOpen=W(!1),this.options=c(),this.closed=le(),this.defaultOptionMerge=b(()=>L($(L({},Ws),{class:this.#n?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=I(()=>{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=V({type:i,selectors:[["sh-dialog"]],viewQuery:function(t,n){t&1&&fe(n.dialogRef,Qn,5),t&2&&se()},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&&(P(),at(0),S(1,Kn,5,11,"dialog",1)),t&2&&(re(n.defaultOptionMerge()),f(),M(n.isOpen()?1:-1))},encapsulation:2,changeDetection:0})}}return i})(),na=(()=>{class i{constructor(){this.#e=y(be),this.#n=this.#e.querySelector("body"),this.#t=y(wt),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,N=t||{},{data:a,closed:l}=N,d=Jt(N,["data","closed"]);this.compRef&&this.#o(!0),this.insertedCompRef=Pt(e,{environmentInjector:n}),this.compRef=Pt($s,{hostElement:s,environmentInjector:n,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let u=this.insertedCompRef.instance,_=u.data,x=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")}x instanceof Nt&&(this.closedFieldSub=x.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,x&&x instanceof Nt&&x.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??y(k).nativeElement;if(!o)return v("");let e=v(o.className);if(typeof MutationObserver>"u")return e.asReadonly();let t=y(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=Y("buttonGroup",{color:this.color,variant:this.variant,size:this.size})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-button-group"]],hostVars:4,hostBindings:function(t,n){t&2&&(F(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&&(P(),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=Y("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=V({type:i,selectors:[["","shButton",""]],hostAttrs:[1,"sh-sheet-h"],hostVars:2,hostBindings:function(t,n){t&2&&F(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&&(P(),h(0))},encapsulation:2,changeDetection:0})}}return i})(),ra=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.hostClasses=Y("card",{color:this.color,variant:this.variant})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-card"]],hostVars:2,hostBindings:function(t,n){t&2&&F(n.hostClasses())},inputs:{color:[1,"color"],variant:[1,"variant"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(P(),h(0))},encapsulation:2,changeDetection:0})}}return i})(),Gs=(()=>{class i{constructor(){this.currentClassList=bt(),this.color=c(null),this.variant=c(null),this.readonly=c(!1),this.hostClasses=Y("checkbox",{color:this.color,variant:this.variant,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-checkbox"]],hostVars:2,hostBindings:function(t,n){t&2&&F(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&&(P(),p(0,"div",0)(1,"sh-icon",1),C(2,"check-bold"),m(),p(3,"sh-icon",2),C(4,"minus-bold"),m()(),p(5,"div",3),h(6),m()),t&2&&F(n.currentClassList())},dependencies:[De],encapsulation:2,changeDetection:0})}}return i})(),qs=(()=>{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=Y("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=V({type:i,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],hostVars:2,hostBindings:function(t,n){t&2&&F(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&&(P(),R(0,"div"),h(1),H())},encapsulation:2,changeDetection:0})}}return i})();var Ys=(()=>{class i{constructor(){this.#e=this.#r(new Date),this.date=W(null),this.endDate=W(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=I(()=>{let e=this.currentClasses();this.#i()}),this.#n=I(()=>{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?$(L({},t),{opacity:"0"}):null);this.setSelectedDateStylePosition(e)})}#o(e,t){let n=e.getUTCFullYear(),s=e.getUTCMonth(),r=new Date(Date.UTC(n,s)).getUTCDay(),a=32-new Date(Date.UTC(n,s,32)).getUTCDate(),l=[],d=r-t;d<0&&(d+=7);let u=new Date(Date.UTC(n,s,0)).getUTCDate();for(let x=d-1;x>=0;x--){let z=new Date(Date.UTC(n,s-1,u-x));l.push(z)}for(let x=1;x<=a;x++)l.push(new Date(Date.UTC(n,s,x)));let _=1;for(;l.length%7!==0;)l.push(new Date(Date.UTC(n,s+1,_++)));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?.getUTCHours()??0,l=r?.getUTCMinutes()??0,d=r?.getUTCSeconds()??0,u=r?.getUTCMilliseconds()??0;return this.#r(new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate(),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(Date.UTC(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate(),0,0,0,0)),r=_=>new Date(Date.UTC(_.getUTCFullYear(),_.getUTCMonth(),_.getUTCDate(),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 N=a.getUTCDay(),ue=this.startOfWeek();N===ue&&u.push("week-start");let St=(ue+6)%7;N===St&&u.push("week-end")}let _=new Date(a);_.setUTCDate(a.getUTCDate()+1),new Date(a).setUTCDate(a.getUTCDate()-1);let z=a.getUTCDate()===1,E=_.getUTCMonth()!==a.getUTCMonth();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()}#r(e){let n=e.getTimezoneOffset()*60*1e3;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())+n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-datepicker"]],viewQuery:function(t,n){t&1&&fe(n.daysRef,eo,5),t&2&&se()},hostVars:6,hostBindings:function(t,n){t&2&&(F("columns-"+n.monthsToShow()),A("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),w("click",function(){return n.previousMonth()}),p(2,"sh-icon"),C(3,"caret-left"),m()(),p(4,"div",3),C(5),S(6,to,1,1),C(7),m(),p(8,"button",2),w("click",function(){return n.nextMonth()}),p(9,"sh-icon"),C(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=y(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=W(!1),this.options=c(),this.closed=le(),this.defaultOptionMerge=b(()=>L(L({},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=I(()=>{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=V({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&&se(3)},hostVars:2,hostBindings:function(t,n){t&2&&A("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){if(t&1){let s=q();P(co),R(0,"div",3,0),Ee("click",function(a){return O(s),T(n.toggleIsOpen(a))}),R(2,"div",4),h(3),h(4,1),h(5,2),H(),Me(6,"div",5),H(),S(7,ho,6,5,"div",6)}t&2&&(oe("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=y(k),this.isOpen=W(!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=V({type:i,selectors:[["sh-form-field-popover"]],hostBindings:function(t,n){t&1&&w("click",function(){return n.onClick()})},inputs:{isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:fo,decls:18,vars:3,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[3,"isOpenChange","closed","isOpen","options"],[1,"suffix-space"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(t,n){t&1&&(P(po),h(0),p(1,"div",0)(2,"div",1),h(3,1),h(4,2),m(),ae(5,"div",2),p(6,"sh-popover",3),$e("isOpenChange",function(r){return We(n.isOpen,r)||(n.isOpen=r),r}),w("closed",function(){return n.close()}),h(7,3,["trigger",""]),h(8,4),m(),h(9,5),h(10,6),ae(11,"div",4),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(6),Ue("isOpen",n.isOpen),X("options",lt(2,$i)))},dependencies:[Zt],encapsulation:2,changeDetection:0})}}return i})();function Ks(i){let o=y(k).nativeElement,e=y(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(yt),this.#e=y(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=W(!1),this.currentClass=bt(),this.#t=Ks("#input-wrap input"),this.#i=I(()=>{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?this.#r(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?this.#r(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}#r(e){let n=e.getTimezoneOffset()*60*1e3;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())+n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-datepicker-input"]],contentQueries:function(t,n,s){t&1&&xt(s,n.ngModels,yt,5),t&2&&se()},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=q();P(go),p(0,"sh-form-field-popover",1),w("closed",function(){return O(s),T(n.close())}),$e("isOpenChange",function(a){return O(s),We(n.isOpen,a)||(n.isOpen=a),T(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),C(10,"calendar"),m(),p(11,"div",5),S(12,_o,1,3,"sh-datepicker",6),m()(),pe(13,Co,0,0,"ng-template",null,0,hi)}t&2&&(Ue("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=V({type:i,selectors:[["sh-divider"]],ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(P(),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=y(k),this.color=c(null),this.variant=c(null),this.size=c(null),this.readonly=c(!1),this.hostClasses=Y("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=V({type:i,selectors:[["sh-form-field"]],hostVars:2,hostBindings:function(t,n){t&1&&w("click",function(){return n.onClick()}),t&2&&F(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&&(P(yo),h(0),R(1,"div",0)(2,"div",1),h(3,1),h(4,2),h(5,3),H(),h(6,4),h(7,5),R(8,"div",2),h(9,6),h(10,7),h(11,8),H()(),R(12,"div",3)(13,"div",4),h(14,9),H(),R(15,"div",5),h(16,10),H()())},encapsulation:2,changeDetection:0})}}return i})(),la=(()=>{class i{constructor(){this._el=y(k),this.inputRef=te.required("input"),this.filesOver=v(!1),this.multiple=c(),this.accept=c(null),this.placeholder=W("Click or drag files here"),this.overlayText=c("Drop files here"),this.files=W([]),this.fileUploadClasses=b(()=>this._el.nativeElement.classList.toString()),this.inputEffect=I(()=>{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=V({type:i,selectors:[["sh-file-upload"]],viewQuery:function(t,n){t&1&&fe(n.inputRef,bo,5),t&2&&se()},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&&(P(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,wo,2,1,"div",3)(6,xo,2,1,"div",4),ae(7,"input",5,1)(9,"div",6),m(),p(10,"sh-icon",7),C(11,"upload-simple"),m()()),t&2&&(F(n.fileUploadClasses()),f(4),M(n.files().length===1?4:n.files().length>1?5:6),f(3),oe("multiple",n.multiple())("accept",n.accept()),f(2),A("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=V({type:i,selectors:[["sh-list"]],ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(P(),h(0))},encapsulation:2,changeDetection:0})}}return i})();function er(i,o){let e=v(null),t=o.map(l=>l.toUpperCase()),n=y(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 k(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 k(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=y(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(x=>{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=I(()=>{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(y(k),o),t=v(void 0),n=y(Ve),s=n.get(ge),r=v(null);I(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 I(()=>{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}),I(()=>{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=y(be),this.#n=y(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=W(!1),this.closed=le(),this.searchable=c(!1),this.activeOptionIndex=v(-1),this.inputRef=te("inputRef"),this.optionsRef=te("optionsRef"),this.openMenusEffect=I(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=I(()=>{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=I(()=>{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=I(()=>{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=V({type:i,selectors:[["sh-menu"]],viewQuery:function(t,n){t&1&&fe(n.inputRef,Oo,5)(n.optionsRef,To,5),t&2&&se(2)},hostVars:6,hostBindings:function(t,n){t&1&&w("ship-menu-open",function(r){return n.onShipMenuOpen(r)}),t&2&&A("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=q();P(Vo),p(0,"sh-popover",3,0),$e("isOpenChange",function(a){return O(s),We(n.isOpen,a)||(n.isOpen=a),T(a)}),w("closed",function(){return O(s),T(n.close("fromPopover"))}),p(2,"div",4),w("click",function(a){return O(s),T(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),w("click",function(){return O(s),T(n.close("active"))}),h(11,1),m()()}t&2&&(Ue("isOpen",n.isOpen),X("disableOpenByClick",!0)("asMultiLayer",n.asMultiLayer())("options",lt(19,$i)),f(2),A("is-open",n.isOpen()),oe("aria-expanded",n.isOpen())("aria-controls",n.optionsId)("aria-activedescendant",n.activeOptionId()),f(2),M(n.openIndicator()?4:-1),f(2),A("hidden",n.searchable()===!1),f(),oe("aria-expanded",n.isOpen())("aria-controls",n.optionsId)("aria-activedescendant",n.activeOptionId()),f(2),A("searching",n.searchable()&&n.inputValue()!==""),X("id",n.optionsId),oe("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=Y("progressBar",{color:this.color,variant:this.variant})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-progress-bar"]],hostVars:2,hostBindings:function(t,n){t&2&&F(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=Y("radio",{color:this.color,variant:this.variant,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-radio"]],hostVars:2,hostBindings:function(t,n){t&2&&F(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&&(P(),Me(0,"div",0),h(1)),t&2&&F(n.currentClassList())},encapsulation:2,changeDetection:0})}}return i})(),ha=(()=>{class i{constructor(){this.#e=y(k),this.#n=null,this.#t=null,this.#i=0,this.unit=c(""),this.value=W(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=I(()=>{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 x=(s/r*u+a-a)/d,z=a+Math.round(x)*d,E=this.#a(d);z=parseFloat(z.toFixed(E));let N=Math.max(a,Math.min(l,z));this.value.set(N)}}#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=V({type:i,selectors:[["sh-range-slider"]],hostVars:2,hostBindings:function(t,n){t&2&&A("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&&(P(Ao),R(0,"div",0),h(1),H(),R(2,"div",1)(3,"div",2),C(4),H(),R(5,"div",3),Ee("click",function(r){return n.trackEvent(r)}),h(6,1),R(7,"div",4),Me(8,"div",5),H(),R(9,"div",6)(10,"div",7)(11,"div",8),C(12),H()()()(),R(13,"div",9),C(14),H()()),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=Y("spinner",{color:this.color})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-spinner"]],hostVars:2,hostBindings:function(t,n){t&2&&F(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=y(k),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=W(!1),this.disabled=W(!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=W(!1),this.isLoading=W(!1),this.options=W([]),this.selectedOptions=W([]),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 k(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(),x=((n?this.#s(u,n):u)??"").toString().toLowerCase(),z=a.test(_),E=a.test(x);return z||E}).map(u=>{let _=t?(this.#s(u,t)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),x=((n?this.#s(u,n):u)??"").toString().toLowerCase(),z=this.#i(_,r),E=this.#i(x,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=I(()=>{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=I(()=>{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=I(()=>{let e=this.inputValue();this._inputValue=e}),this.inputRefElEffect=I(()=>{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=I(()=>{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 k(e));return}let t=this.#e.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new k(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(),x=this.getValue(_);if(!(this.validateFreeText()??(N=>!0))(x))return;this.options.update(N=>N.findIndex(St=>this.getValue(St)===x)>-1?N:(this.onAddNewFreeTextOption.emit(x),[_,...N])),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 x=d.indexOf(u);if(x>-1){let z=[..._.slice(0,x),..._.slice(x+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=V({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,s){t&1&&xt(s,n.inlineTemplate,st,5),t&2&&se()},viewQuery:function(t,n){t&1&&fe(n.optionsWrapRef,Fo,5),t&2&&se()},hostVars:2,hostBindings:function(t,n){t&2&&A("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=q();P(ko),at(0)(1)(2)(3)(4)(5)(6),p(7,"sh-popover",2,0),$e("isOpenChange",function(a){return O(s),We(n.isOpen,a)||(n.isOpen=a),T(a)}),w("closed",function(){return O(s),T(n.close())}),p(9,"sh-form-field",3),w("click",function(){return O(s),T(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){re(n.placeholderTemplate());let s=n.optionTemplate();f(),re(n.freeTextOptionTemplate());let r=n.selectedOptionTemplate(),a=n.inlineTemplate();f();let l=re(n.selectedOptions()),d=n.inputState();f(),re(r||s||a),f(),re(s||a),f();let u=re(!n.asText()&&n.selectMultiple());f();let _=re(n.isOpen()&&n.hasSearch()&&(u||n.inputValue().length>-1));f(),Ue("isOpen",n.isOpen),X("disableOpenByClick",!0)("options",lt(24,Lo)),f(2),A("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),f(4),A("show-search-text",_),f(),A("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,Gs,or,qs,Js],encapsulation:2,changeDetection:0})}}return i})();function sr(i){let o=y(k),e=y(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=y(be),this.#n=y(k),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=c(!1),this.isOpen=W(!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=I(()=>{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=V({type:i,selectors:[["sh-sidenav"]],viewQuery:function(t,n){t&1&&fe(n.dragImageElement,Ms,5),t&2&&se()},hostVars:6,hostBindings:function(t,n){t&2&&A("open",n.isOpen())("closed",!n.isOpen())("is-dragging",n.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:ws,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&&(P(Es),S(0,xs,2,0,"div",1),S(1,Os,1,0,"div",2),R(2,"div",3),h(3),H(),R(4,"div",4),S(5,Ts,1,0,"div",5),R(6,"div",6),h(7,1),H(),R(8,"main"),h(9,2),H()()),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=Y("stepper",{color:this.color})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-stepper"]],hostVars:2,hostBindings:function(t,n){t&2&&F(n.hostClasses())},inputs:{color:[1,"color"]},ngContentSelectors:ie,decls:1,vars:0,template:function(t,n){t&1&&(P(),h(0))},encapsulation:2,changeDetection:0})}}return i})();var ma=(()=>{class i{constructor(){this.#e=y(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=B({type:i,selectors:[["","shSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(t,n){t&1&&w("mousedown",function(){return n.toggleSort()}),t&2&&A("sort-asc",n.sortAsc())("sort-desc",n.sortDesc())},inputs:{shSort:[1,"shSort"]}})}}return i})();var Le=1.5,rr=(()=>{class i{constructor(){this.#e=y(k),this.loading=c(!1),this.data=c([]),this.dataChange=le(),this.sortByColumn=W(null),this.color=c(null),this.variant=c(null),this.hostClasses=Y("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=I(()=>{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=I(()=>{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=V({type:i,selectors:[["sh-table"]],viewQuery:function(t,n){t&1&&fe(n.thead,Vs,5)(n.tbody,Ns,5),t&2&&se(2)},hostVars:18,hostBindings:function(t,n){t&1&&w("scroll",function(){return n.onScroll()})("resize",function(r){return n.onResize(r)},li),t&2&&(F(n.hostClasses()),K("grid-template-columns",n.columnSizes()),A("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&&(P(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=Y("tabs",{color:this.color,variant:this.variant})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-tabs"]],hostVars:4,hostBindings:function(t,n){t&2&&(F(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&&(P(),h(0))},encapsulation:2,changeDetection:0})}}return i})();var _a=(()=>{class i{constructor(){this.disableToggle=c(!1),this.isActive=W(),this.#e=I(()=>{this.disableToggle()&&this.isActive.set(!0)}),this.color=c(null),this.variant=c(null),this.hostClasses=Y("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=V({type:i,selectors:[["sh-toggle-card"]],hostVars:4,hostBindings:function(t,n){t&2&&(F(n.hostClasses()),A("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&&(P(ks),p(0,"h3",0),w("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})(),Ca=(()=>{class i{constructor(){this.color=c(null),this.variant=c(null),this.readonly=c(!1),this.hostClasses=Y("toggle",{color:this.color,variant:this.variant,readonly:this.readonly})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=V({type:i,selectors:[["sh-toggle"]],hostVars:2,hostBindings:function(t,n){t&2&&F(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&&(P(),R(0,"div",0),Me(1,"div",1),H(),h(2))},encapsulation:2,changeDetection:0})}}return i})();var ya=(()=>{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=B({type:i,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(t,n){t&1&&w("dragover",function(r){return n.onDragOver(r)})("dragleave",function(r){return n.onDragLeave(r)})("drop",function(r){return n.ondrop(r)}),t&2&&A("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=y(be),this.#n=y(k),this.#t=y(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=I(()=>{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,N)=>({left:E.left+E.width/2-N.width/2,top:E.top-N.height-s}),x=[r,(E,N)=>({left:E.right-N.width,top:E.top-N.height-s}),(E,N)=>({left:E.left,top:E.top-N.height-s}),(E,N)=>({left:E.left+E.width/2-N.width/2,top:E.bottom+s}),(E,N)=>({left:E.right-N.width,top:E.bottom+s}),(E,N)=>({left:E.left,top:E.bottom+s})];for(let E of x){let N=E(e,n);if(this.#a(N,n)){this.#r(N,t),this.isBelow.set(N.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=V({type:i,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(t,n){t&2&&(oe("popover","manual"),K("position-anchor",n.positionAnchorName()),A("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})(),j=null,Da=(()=>{class i{constructor(){this.shTooltip=c.required(),this.#e=I(()=>{let e=this.shTooltip();ne(()=>{this.isOpen()&&j?.component===this&&j?.wrapperComponentRef&&(j.wrapperComponentRef.setInput("content",e),j.wrapperComponentRef.changeDetectorRef.detectChanges())})}),this.#n=y(k),this.#t=y(ci),this.#i=y(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(),j?.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(j?.wrapperComponentRef||!this.shTooltip()){j?.component===this&&j?.wrapperComponentRef&&j.wrapperComponentRef.setInput("content",this.shTooltip());return}j={wrapperComponentRef:this.#t.createComponent(ar,{environmentInjector:this.#i}),component:this},j.wrapperComponentRef.setInput("positionAnchorName",this.anchorName),j.wrapperComponentRef.setInput("anchorEl",this.#n),j.wrapperComponentRef.setInput("isOpen",this.isOpen),j.wrapperComponentRef.setInput("content",this.shTooltip()),j.wrapperComponentRef.setInput("close",()=>this.cleanupTooltip()),j.wrapperComponentRef.changeDetectorRef.detectChanges(),j.wrapperComponentRef.location.nativeElement.addEventListener("mouseenter",e=>{e.stopPropagation(),this.cancelCleanupTimer()}),j.wrapperComponentRef.location.nativeElement.addEventListener("mouseleave",e=>{e.stopPropagation(),this.startCleanupTimer()}),setTimeout(()=>{this.isOpen.set(!0)})}cleanupTooltip(){j?.wrapperComponentRef&&(j.component.cancelCleanupTimer(),j.component.isOpen.set(!1),j.wrapperComponentRef.location.nativeElement.hidePopover(),this.destroyTimeout=setTimeout(()=>{queueMicrotask(()=>{j?.wrapperComponentRef.destroy(),j=null})},this.DEBOUNCE_DELAY))}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275dir=B({type:i,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(t,n){t&1&&w("mouseenter",function(r){return n.onMouseEnter(r)})("mouseleave",function(r){return n.onMouseLeave(r)}),t&2&&(K("anchor-name",n.anchorName),A("active",n.isOpen()))},inputs:{shTooltip:[1,"shTooltip"]}})}}return i})();export{ye as a,Zi as b,Mi as c,gi as d,Mr as e,Er as f,bn as g,Ke as h,yt as i,xr as j,xn 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,qi as u,De as v,ta as w,ia as x,$s as y,na as z,oa as A,sa as B,ra as C,Gs as D,qs 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,Ca as W,ya as X,Da as Y};
@@ -0,0 +1 @@
1
+ import{a as yt,b as $t,c as Ut,l as Lt,p as Rt,q as vt}from"./chunk-AZEV3A4R.js";import"./chunk-RWDQ3L3C.js";import"./chunk-CAJQ2FEU.js";import{b as Mt,c as Ft,d as wt}from"./chunk-ZPIR5QIQ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as It,C as ht,G as ft,H as Ot,K as Dt,L as Pt,V as xt,W as At,c as ct,e as dt,f as Ct,g as gt,i as ut,j as Tt,r as pt,s as mt,v as St,w as Nt,y as Et}from"./chunk-Y46QCSB5.js";import"./chunk-JJY6UOEY.js";import{b as lt,d as _t}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ab as F,Ac as rt,Bb as E,Cb as a,Db as s,Eb as I,Ib as L,Jb as R,Lb as N,Pc as w,Sa as d,Sb as f,Tb as O,Ub as S,Wc as st,Yb as C,Z as P,_b as r,ca as _,da as c,fb as nt,fc as it,ga as et,gc as ot,jc as v,mc as g,nc as D,oa as h,qa as U,rc as b,sc as G,tc as k,uc as at,vb as T,vc as B,wb as p,wc as x,xb as A,zb as M}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var bt=["testUrl"],Gt=()=>({maxWidth:"700px",width:"100%"});function kt(o,e){if(o&1){let t=N();a(0,"sh-card",30)(1,"div",32)(2,"h3"),S(3,4),s(),a(4,"button",33),C("click",function(){_(t);let i=r(3);return c(i.closeCustomList())}),g(5," Cancel "),a(6,"sh-icon"),g(7,"x-bold"),s()()(),a(8,"app-destination-list",34),C("setDestination",function(i){_(t);let l=r(3);return c(l.setDestination(i))}),s()()}}function Bt(o,e){if(o&1){let t=N();a(0,"div",40)(1,"sh-toggle",43),C("click",function(){_(t);let i=r(2).$index,l=r(2);return c(l.toggleSave(i))}),a(2,"span",44),S(3,8),s()()()}if(o&2){let t=r(2).$implicit;d(),v("active",t.save),E("color","primary")("variant","raised")}}function Vt(o,e){if(o&1){let t=N();a(0,"sh-toggle-card",31),L(1,35),a(2,"app-destination-list-item",36)(3,"button",33),C("click",function(){_(t);let i=r().$index,l=r(2);return c(l.changeDestination(i))}),g(4,"Change"),s(),a(5,"sh-menu",37),C("click",function(i){return _(t),c(i.stopPropagation())}),a(6,"button",38)(7,"sh-icon"),g(8,"dots-three-vertical"),s()(),L(9,39),a(10,"button",33),C("click",function(){_(t);let i=r().$index,l=r(2);return c(l.openTargetUrlDialog(i))}),f(11,5),I(12,"sh-icon"),O(),s(),a(13,"button",33),C("click",function(){_(t);let i=r().$index,l=r(2);return c(l.copyTargetUrl(i))}),f(14,6),I(15,"sh-icon"),O(),s(),a(16,"button",33),C("click",function(){_(t);let i=r().$index,l=r(2);return c(l.removeDestination(i))}),f(17,7),I(18,"sh-icon"),O(),s(),R(),s()(),R(),T(19,Bt,4,4,"div",40),a(20,"app-test-url",41,1),C("targetUrlChange",function(i){_(t);let l=r().$index,m=r(2);return c(m.updateTargetUrl(l,i))})("testSignalChange",function(i){_(t);let l=r().$index,m=r(2);return c(m.updateTestState(l,i))}),s(),a(22,"app-single-destination",42),C("targetUrlChange",function(i){_(t);let l=r().$index,m=r(2);return c(m.updateTargetUrl(l,i))}),s()()}if(o&2){let t=r(),n=t.$implicit,i=t.$index,l=r(2);E("disableToggle",!0)("isActive",!0),d(2),E("targetUrl",n.url)("connectionStringId",n.connectionStringId),d(17),p(n.connectionStringId?-1:19),d(),E("targetUrl",n.url)("testSignal",l.testStates()[i]||null)("backupId",l.backupId())("connectionStringId",n.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",l.isNew()?"destinationEmpty":"any")("moduleType","Backend"),d(2),E("targetUrl",n.url)("useBackupState",!0)}}function Kt(o,e){if(o&1&&T(0,kt,9,0,"sh-card",30)(1,Vt,23,16,"sh-toggle-card",31),o&2){let t=e.$index,n=r(2);p(n.showCustomList()&&n.currentEditingIndex()===t?0:1)}}function Jt(o,e){if(o&1&&M(0,Kt,2,1,null,null,A),o&2){r();let t=x(0);F(t)}}function Xt(o,e){o&1&&(a(0,"div",45),I(1,"sh-progress-bar",46),a(2,"div",47)(3,"h3"),S(4,9),s()()())}function zt(o,e){o&1&&(a(0,"sh-divider"),S(1,12),s())}function Ht(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit;d(),D(t.Description)}}function jt(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit,n=r(4);d(),D(n.getSimplePath(t.BaseUrl))}}function Wt(o,e){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=_(t).$implicit,l=r(4);return c(l.selectSavedDestination(i))}),a(1,"h3",51),g(2),s(),T(3,Ht,2,1,"p",52)(4,jt,2,1,"p",52),s()}if(o&2){let t=e.$implicit;E("targetUrl",t.BaseUrl),d(2),D(t.Name||t.BaseUrl),d(),p(t.Description?3:4)}}function Qt(o,e){if(o&1){let t=N();a(0,"sh-card",48),C("click",function(){_(t);let i=r(3);return c(i.toggleCustomList())}),a(1,"sh-icon"),g(2,"plus-circle"),s(),a(3,"div",47)(4,"h3"),S(5,10),s(),a(6,"p"),S(7,11),s()()(),T(8,zt,2,0,"sh-divider"),M(9,Wt,5,3,"app-destination-list-item",49,A)}if(o&2){let t=r(3);d(8),p(t.destinations().length>0?8:-1),d(),F(t.destinations())}}function qt(o,e){if(o&1&&T(0,Xt,5,0,"div",45)(1,Qt,11,1),o&2){let t=r(2);p(t.isLoadingDestinations()?0:1)}}function Yt(o,e){o&1&&(a(0,"sh-divider"),S(1,15),s())}function Zt(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit;d(),D(t.Description)}}function te(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit,n=r(3);d(),D(n.getSimplePath(t.BaseUrl))}}function ee(o,e){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=_(t).$implicit,l=r(3);return c(l.selectSavedDestination(i))}),a(1,"h3",51),g(2),s(),T(3,Zt,2,1,"p",52)(4,te,2,1,"p",52),s()}if(o&2){let t=e.$implicit;E("targetUrl",t.BaseUrl),d(2),D(t.Name||t.BaseUrl),d(),p(t.Description?3:4)}}function ne(o,e){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){_(t);let i=r(2);return c(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),s(),g(4," Back "),s()(),a(5,"sh-card",48),C("click",function(){_(t);let i=r(2);return c(i.toggleCustomList())}),a(6,"sh-icon"),g(7,"plus-circle"),s(),a(8,"div",47)(9,"h3"),S(10,13),s(),a(11,"p"),S(12,14),s()()(),T(13,Yt,2,0,"sh-divider"),M(14,ee,5,3,"app-destination-list-item",49,A)}if(o&2){let t=r(2);d(13),p(t.destinations().length>0?13:-1),d(),F(t.destinations())}}function ie(o,e){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){_(t);let i=r(3);return c(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),s()(),a(4,"h3"),S(5,16),s()()}}function oe(o,e){if(o&1){let t=N();T(0,ie,6,0,"div",53),a(1,"app-destination-list",34),C("setDestination",function(i){_(t);let l=r(2);return c(l.setDestination(i))}),s()}if(o&2){let t=r(2),n=x(0);p(t.destinations().length>0||n.length>0?0:-1)}}function ae(o,e){if(o&1&&T(0,qt,2,1)(1,ne,16,1)(2,oe,2,1),o&2){let t=r(),n=x(1);p(!t.showCustomList()&&!n&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2)}}function re(o,e){if(o&1){let t=N();a(0,"div",25)(1,"button",55),C("click",function(){_(t);let i=r();return c(i.startAddingNew())}),a(2,"sh-icon"),g(3,"plus"),s(),g(4," Add another destination "),s()()}}function se(o,e){o&1&&(a(0,"h2"),S(1,19),s())}function le(o,e){o&1&&(a(0,"h2"),S(1,20),s())}function _e(o,e){if(o&1){let t=N();a(0,"sh-dialog",56),k("isOpenChange",function(i){_(t);let l=r();return G(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),c(i)}),a(1,"header",57)(2,"div",58),T(3,se,2,0,"h2")(4,le,2,0,"h2"),a(5,"sh-alert",59),S(6,17),s()()(),a(7,"div",60)(8,"sh-form-field")(9,"textarea",61),k("ngModelChange",function(i){_(t);let l=r();return G(l.targetUrlCtrl,i)||(l.targetUrlCtrl=i),c(i)}),s()()(),a(10,"footer",62)(11,"button",27),C("click",function(){_(t);let i=r();return c(i.closeTargetUrlDialog(!1))}),g(12,"Cancel"),s(),a(13,"button",63),C("click",function(){_(t);let i=r();return c(i.closeTargetUrlDialog(!0))}),f(14,18),I(15,"sh-icon"),O(),s()()()}if(o&2){let t=r(),n=x(1);b("isOpen",t.targetUrlDialogOpen),E("options",rt(4,Gt)),d(3),p(n?4:3),d(6),b("ngModel",t.targetUrlCtrl)}}var y=new pt,Ae=(o={destinations:[]})=>y.group({destinations:y.array(o.destinations)}),Me=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>y.group({destinationType:y.control(o),custom:e,dynamic:t,advanced:n}),V=class o{#n=P(_t);#i=P(lt);#t=P(Rt);#e=P(yt);injector=P(et);testUrlComponents=st("testUrl");testStates=h([]);targetUrls=this.#t.targetUrls;targetUrlModel=w(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=h(null);targetUrlInitial=h(null);currentEditingIndex=h(null);targetUrlDialogOpen=h(!1);showCustomList=h(!1);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=w(()=>{let e=this.targetUrlModel();return e?Ft(e)??null:null});isLoadingDestinationEffect=U(()=>{let e=this.isLoadingDestinations(),t=this.destinations(),n=this.targetUrls();!e&&t.length==0&&n.length==0&&this.toggleCustomList()});selectedDestinationTypeOption=w(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon}:null});getConnectionString(e){let t=this.#e.destinations().find(n=>n.ID===e);return console.log("connection",t),t}getSimplePath(e){return e?Mt(e):""}copyTargetUrl(e=0){let t=this.targetUrls()[e]?.url;t&&navigator.clipboard.writeText(t)}openTargetUrlDialog(e=0){let t=this.targetUrls()[e]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();if(!e||t===n||!t)return;let i=this.currentEditingIndex();if(i!==null){let l=this.targetUrls()[i]?.connectionStringId??null,m=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,l,m)}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null)}setDestination(e){let t=wt(e??"");if(!t)return;let n=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${e}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),n,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(!1);return}this.showCustomList()?(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)):(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1))}targetUrlsEffect=U(()=>{let e=this.targetUrls();this.testStates.update(t=>{if(t.length===e.length)return t;let n=[...t];if(n.length<e.length)for(let i=n.length;i<e.length;i++)n.push(null);else n.length=e.length;return n})},{allowSignalWrites:!0});selectSavedDestination(e){e.BaseUrl&&e.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(e.BaseUrl,!0,e.ID,null):(this.#t.addTargetUrl(e.BaseUrl,e.ID,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)))}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(!0)}isAddingNew=h(!1);startAddingNew(){this.isAddingNew.set(!0),this.destinations().length===0&&this.showCustomList.set(!0)}changeDestination(e){this.currentEditingIndex.set(e),this.showCustomList.set(!0)}closeCustomList(){this.showCustomList.set(!1),this.currentEditingIndex.set(null),this.isAddingNew.set(!1)}removeDestination(e){this.#t.removeTargetUrl(e)}updateTargetUrl(e,t){if(!t)return;let n=this.targetUrls()[e]?.connectionStringId??null,i=this.targetUrls()[e]?.urlKey??null;this.#t.updateTargetUrl(e,t,n,i),this.updateTestState(e,null)}updateTestState(e,t){this.testStates.update(n=>{let i=[...n];return i[e]=t,i})}toggleSave(e){this.#t.toggleSaveConnectionString(e)}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent})}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents(),n=this.testStates();for(let i=0;i<t.length;i++){let l=t[i],m=this.testStates()[i];if(m&&typeof m!="string"&&m.action==="success")continue;if((await l.testDestination(!1))?.action!=="success")return}this.#o()}#o(){this.#t.shouldAutoSave()&&this.#t.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=nt({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&it(n.testUrlComponents,bt,5),t&2&&ot()},decls:19,vars:9,consts:()=>{let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let l;l=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let m;m=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let $;$=$localize`Save as connection string`;let K;K=$localize`Loading destinations...`;let J;J=$localize`Configure a new destination`;let X;X=$localize`Configure a one-off or new storage location.`;let z;z=$localize`Or select a saved destination`;let H;H=$localize`Configure a new destination`;let j;j=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let Q;Q=$localize`Select storage type`;let q;q=$localize`Be careful, this will overwrite everything you have in your destination.`;let Y;Y=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Z;Z=$localize`Set target URL`;let tt;return tt=$localize`Edit target URL`,[["formRef",""],["testUrl",""],e,t,n,i,l,m,$,K,J,X,z,H,j,W,Q,q,Y,Z,tt,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"click","color","variant"],["label",""],[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","variant","ghost","type","button",3,"click"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1){let i=N();at(0)(1),a(2,"form",21,0),C("submit",function(){return _(i),c(n.next())}),a(4,"div",22),I(5,"input",23)(6,"input",24),s(),a(7,"header"),T(8,Jt,2,0),s(),T(9,ae,3,1),T(10,re,5,0,"div",25),a(11,"div",26)(12,"button",27),C("click",function(){return _(i),c(n.goBack())}),f(13,2),I(14,"sh-icon"),O(),s(),a(15,"button",28),f(16,3),I(17,"sh-icon"),O(),s()()(),T(18,_e,16,5,"sh-dialog",29)}if(t&2){let i=B(n.targetUrls());d();let l=B(i.length>0);d(7),p(n.currentEditingIndex()!==null||!n.showCustomList()&&!n.isAddingNew()?8:-1),d(),p((!l||n.showCustomList()||n.isAddingNew())&&n.currentEditingIndex()===null?9:-1),d(),p(l&&!n.showCustomList()&&!n.isAddingNew()?10:-1),d(5),v("loading",n.isNew()&&n.testStates().length>0&&n.testStates()[0]==="testing"),E("disabled",!l),d(3),p(n.targetUrlDialogOpen()?18:-1)}},dependencies:[vt,Ut,$t,Lt,mt,Tt,ct,dt,Ct,ut,gt,It,Ot,Dt,St,Et,Nt,ht,ft,Pt,xt,At],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{Ae as createDestinationForm,Me as createDestinationFormGroup,V as default};
@@ -0,0 +1 @@
1
+ import{a as W}from"./chunk-5MKFV3IB.js";import"./chunk-7MPZ3MRD.js";import"./chunk-CTQKCCGM.js";import"./chunk-23UYU3M3.js";import{a as j}from"./chunk-GGW26MAG.js";import"./chunk-FJFREVRV.js";import"./chunk-OWBBT5WF.js";import"./chunk-6Q6SSTBK.js";import"./chunk-EG3PT3XW.js";import"./chunk-O3GGVB2B.js";import"./chunk-OAAXQ2BE.js";import"./chunk-7E5J43IH.js";import"./chunk-QY5UGQ3R.js";import"./chunk-3MS6SVET.js";import"./chunk-4VYR5E5I.js";import"./chunk-KLAJGS5T.js";import"./chunk-NGKFJLI2.js";import"./chunk-KUX6NGQU.js";import{B as m,C as N,G as w,L as z,v as O}from"./chunk-Y46QCSB5.js";import{d as H}from"./chunk-JJY6UOEY.js";import{e as g}from"./chunk-2K74TI2N.js";import"./chunk-G3FMV74P.js";import"./chunk-LU7RSOI6.js";import"./chunk-VLMNSWR3.js";import"./chunk-VKNFRCHQ.js";import{Ab as x,Ac as C,Bb as l,Bc as X,Cb as n,Db as o,Eb as r,Sa as s,Sb as E,Tb as S,Ub as a,Vb as v,Wb as B,Z as T,_b as u,fb as A,lb as D,mc as p,pc as J,sb as G,tb as k,vb as R,wb as d,xb as y,zb as b}from"./chunk-QY4Y5NJB.js";import"./chunk-7CGTOI24.js";var q=()=>[N,m,O,g],V=()=>["/restore-from-files"],K=()=>["/restore/from-config"],Q=t=>["/restore",t];function U(t,i){if(t&1&&(n(0,"sh-card",10),r(1,"img",15),n(2,"div",12)(3,"h3"),a(4,7),o(),n(5,"p"),p(6),o()(),n(7,"button",13),E(8,8),r(9,"sh-icon"),S(),o()()),t&2){let e=i.$implicit;l("routerLink",X(4,Q,e.Backup.ID)),s(4),v(e.Backup.Name??"Backup name missing"),B(4),s(2),J(" ",(e.Backup.Metadata==null?null:e.Backup.Metadata.SourceSizeString)??"-"," / ",(e.Backup.Metadata==null?null:e.Backup.Metadata.BackupListCount)??"-"," ")}}function Y(t,i){if(t&1&&b(0,U,10,6,"sh-card",10,y),t&2){let e=u(2);x(e.backups())}}function Z(t,i){if(t&1&&R(0,Y,2,0),t&2){let e=u();d(e.backups().length?0:-1)}}function ee(t,i){t&1&&(n(0,"div",16),r(1,"sh-progress-bar",17),n(2,"div",12)(3,"h3"),a(4,9),o()()())}function te(t,i){t&1&&(n(0,"sh-divider"),p(1,"Or without a local configuration"),o())}var P=class t{#e=T(j);#t=T(H);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups(!0)}restoreNow(i){this.#t.postApiV1BackupByIdRestore({id:i.Backup?.ID,requestBody:{}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=A({type:t,selectors:[["app-restore"]],decls:29,vars:6,consts:()=>{let i;i=$localize`Where do you want to restore from?`;let e;e=$localize`Direct restore from backup files`;let c;c=$localize`Point to your backup files and restore from there.`;let f;f=$localize` Start ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`;let F;F=$localize`Restore from configuration`;let M;M=$localize`Load destination from an exported job`;let h;h=$localize` Start ${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:play-circle${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let $;$=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let L;return L=$localize`Loading backups...`,[i,e,c,f,F,M,h,I,$,L,[1,"type-a","actionable",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["shButton",""],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(e,c){e&1&&(r(0,"app-status-bar"),n(1,"section")(2,"h2"),a(3,0),o(),D(4,Z,1,1)(5,ee,5,0),G(6,4,q,null,5),R(8,te,2,0,"sh-divider"),n(9,"sh-card",10),r(10,"img",11),n(11,"div",12)(12,"h3"),a(13,1),o(),n(14,"p"),a(15,2),o()(),n(16,"button",13),E(17,3),r(18,"sh-icon"),S(),o()(),n(19,"sh-card",10),r(20,"img",14),n(21,"div",12)(22,"h3"),a(23,4),o(),n(24,"p"),a(25,5),o()(),n(26,"button",13),E(27,6),r(28,"sh-icon"),S(),o()()()),e&2&&(s(6),k(!c.backupsLoading()),s(2),d(c.backups().length?8:-1),s(),l("routerLink",C(4,V)),s(10),l("routerLink",C(5,K)))},dependencies:[W,N,m,w,O,z,g],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}sh-divider[_ngcontent-%COMP%]{color:var(--base-8)}sh-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}sh-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}"],changeDetection:0})};export{P as default};
@@ -0,0 +1,2 @@
1
+ import{d as O,r as M}from"./chunk-Y46QCSB5.js";import{d as B}from"./chunk-JJY6UOEY.js";import{E as N,Pc as w,U as L,Z as I,oa as z,p as f}from"./chunk-QY4Y5NJB.js";import{a,b as D}from"./chunk-7CGTOI24.js";var y=class{constructor(t){this.loader=t}_data=z(void 0);_isLoading=!1;_loaded=!1;load(){return!this._loaded&&!this._isLoading&&(this._isLoading=!0,this.loader().pipe(N(()=>this._isLoading=!1)).subscribe(t=>{this._data.set(t),this._loaded=!0})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=!1}};var d=class e{#e=I(B);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=w(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return w(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(f(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(f(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(f(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(f(o=>this.#t(o)))}#t(t){return(t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(f(o=>this.#t(o)),f(o=>o.find(r=>r.key==="folders")?.value),f(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(f(r=>this.#t(r)),f(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new M,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},U={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:!0,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return a({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:100,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:!0}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return a({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:-2,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:!0,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>a({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[O.required,O.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:!0,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>z([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??!1}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>z([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:!0}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return a({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business`,description:$localize`Store backups in OneDrive Business.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint v2`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:!0},{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0,validate:e=>{function t(o){if(!o)return!1;let r=o.length;return!(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[O.email]),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:!0}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return V(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:i,path:u}=m(t);return{destinationType:e,dynamic:a({"rclone-remote-repository":i,"rclone-remote-path":u},n),advanced:a({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:!0},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return a({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:!0}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return V(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:!0},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:!0},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return a({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:!0},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,E(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),i=n.split("/")[0],u=n.split("/").slice(1).join("/");return a({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:U.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:!0},{name:"auth-password",isMandatory:!0},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:!0}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>a({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:!0},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:!0},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:!0},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:!0},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return`storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],a({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?!1:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:!0},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:!0},{name:"oss-access-key-id",isMandatory:!0},{name:"oss-access-key-secret",isMandatory:!0}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=D(a({},e),{advanced:D(a({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],a({destinationType:e,custom:{path:h(t),bucket:n}},r)}}},{key:"office365",displayName:$localize`Microsoft Office 365`,description:$localize`Create backups of Microsoft Office 365 data.`,icon:"assets/dest-icons/office365.png",isNonFree:!0,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:!0},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:!0},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:!0}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:a({},r),dynamic:a({},n)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:!0,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:!0},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:!0}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return{destinationType:e,advanced:a({},r),dynamic:a({},n)}}}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),g("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),g("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],he={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var x=new M,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?([^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return V(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function V(e,t,o,r,n){let i=b(n),u=encodeURIComponent(R(t)),k=u==""?"":u+H(o),S=r??"",A=S.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=E(k,W(S));return`${A}${$}${i}`}function T(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function E(...e){if(e.length===0)return"";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function W(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return"";if(typeof e=="string")try{e=new v(e)}catch{return""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function R(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function H(e){return e==null||e===""?"":":"+e.toString()}function _(e){try{let o=new v(e),r=P.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return C(t)}function C(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??a({key:e,displayName:e},U)}function ve(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return{bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.hostname),port:e.port,path:T(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=C(e);return t.searchParams.forEach((i,u)=>{n?.dynamicFields?.some(S=>S===u||S?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i)}),{advanced:o,dynamic:r}}function b(e,t=!1){let o=e.map(([n,i])=>`${n}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Fe(e){let t=e.destinationType??"";return C(t)?.mapper.to(e)??""}function Pe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let n=_(e),i="";if(`${n.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return C(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let k=o.split("?")[0].split("/")[0],S=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),G=k.split("."),A=G.length===4&&G.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return S&&!A?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function j(e){return typeof e!="string"||!e.trim()?[]:e.split(`
2
+ `).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function Oe(e){return j(e).map(([t,o])=>({Name:t,Value:o}))}function Me(e){return Object.fromEntries(j(e))}function Ve(e){if(!e)return!1;let t=e.length;return!(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function Ce(e){if(!e||e.length>253)return!1;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return!1;return!0}function g(e,t,o,r,n){return D(a({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:o??$localize`Store backups in ${t} storage.`,dynamicFields:[...(F.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>n.some(k=>u.value.endsWith(k))),isMandatory:!0,formElement:i=>x.control(i??"")}],mapper:D(a({},F.mapper),{to:i=>{let{bucket:u,path:k}=i.custom;return n.some(S=>i.dynamic["s3-server-name"]?.endsWith(S))&&(i.destinationType="s3"),c(i,u,null,k)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>n.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??!1})})}export{d as a,h as b,_ as c,C as d,ve as e,Fe as f,Pe as g,Oe as h,Me as i,Ve as j,Ce as k,he as l};