@duplicati/ngclient 0.0.55 → 0.0.56

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 (77) hide show
  1. package/chunk-2GC7SBMS.js +1 -0
  2. package/{chunk-RNJTHHRX.js → chunk-2SBFQL4K.js} +1 -1
  3. package/{chunk-YZWWCZIN.js → chunk-3FAE4RKT.js} +1 -1
  4. package/{chunk-7TAPZ3BZ.js → chunk-56AHOWAU.js} +1 -1
  5. package/{chunk-4ZZ73XVH.js → chunk-5FDI5MU5.js} +1 -1
  6. package/{chunk-4VCVYKCF.js → chunk-6H65UZ2P.js} +1 -1
  7. package/{chunk-X6YI2XBN.js → chunk-7C6ILTIP.js} +1 -1
  8. package/{chunk-ZXOBCX33.js → chunk-7JAY2YPN.js} +1 -1
  9. package/{chunk-UZD4ZUGC.js → chunk-7M6UFI5Y.js} +1 -1
  10. package/{chunk-RV5XJ2ME.js → chunk-ACQPX6N4.js} +1 -1
  11. package/{chunk-ZYWPO4S4.js → chunk-AX44W3BG.js} +1 -1
  12. package/{chunk-5FQGT7TQ.js → chunk-BUB2XBZH.js} +1 -1
  13. package/chunk-C5SNUVEC.js +1 -0
  14. package/{chunk-MOOX7YVA.js → chunk-CL6W3OLS.js} +1 -1
  15. package/{chunk-V3LU4BS4.js → chunk-CVMGHPI7.js} +1 -1
  16. package/{chunk-QR6M6QC2.js → chunk-DC7QVFBV.js} +1 -1
  17. package/chunk-DKRZJC7X.js +1 -0
  18. package/{chunk-HDRLFXSE.js → chunk-E4ISBSEL.js} +1 -1
  19. package/{chunk-A5RIRRJV.js → chunk-EAZGURHW.js} +1 -1
  20. package/{chunk-6MJTJEIZ.js → chunk-ENRVPUCB.js} +1 -1
  21. package/{chunk-PJ62WHUK.js → chunk-ERIN7FXX.js} +1 -1
  22. package/{chunk-XVRZCAFX.js → chunk-F4ZWNDPA.js} +1 -1
  23. package/{chunk-4M2KOHSQ.js → chunk-F6O4P5W4.js} +1 -1
  24. package/chunk-GFJZ5IJI.js +1 -0
  25. package/chunk-HFDDJLAI.js +1 -0
  26. package/{chunk-XQXVGMTX.js → chunk-ICXLTN4I.js} +1 -1
  27. package/{chunk-7XODEO3O.js → chunk-IOBGL3RY.js} +1 -1
  28. package/{chunk-GJPBEQ2P.js → chunk-K24PCFFN.js} +1 -1
  29. package/{chunk-2BX44Q6S.js → chunk-KY2RQ76O.js} +1 -1
  30. package/{chunk-4O464SE6.js → chunk-LBTXWNGE.js} +1 -1
  31. package/{chunk-76SXOHIV.js → chunk-LE75M3F5.js} +1 -1
  32. package/{chunk-LVAGIPHT.js → chunk-LEG3VUID.js} +1 -1
  33. package/chunk-LVU6VV6K.js +1 -0
  34. package/{chunk-UV6ZII6K.js → chunk-MBLB2X2V.js} +1 -1
  35. package/{chunk-P6JGC4A4.js → chunk-MJKHWRNQ.js} +1 -1
  36. package/{chunk-WBW4QTRC.js → chunk-MJMYUASP.js} +1 -1
  37. package/chunk-NEGT6KCV.js +1 -0
  38. package/{chunk-OJRUAAHE.js → chunk-NXFYBS5S.js} +1 -1
  39. package/{chunk-ZFWDSFTH.js → chunk-PLUKKU2C.js} +1 -1
  40. package/{chunk-UKNW3WA3.js → chunk-PUIARLRJ.js} +1 -1
  41. package/{chunk-LOSE4Q45.js → chunk-PYT62D3C.js} +1 -1
  42. package/{chunk-RMTDIYIF.js → chunk-RHYYHNXZ.js} +1 -1
  43. package/{chunk-MSLFDCH4.js → chunk-RQA4DOFL.js} +1 -1
  44. package/{chunk-M5PKXXDJ.js → chunk-S3X5GKHD.js} +1 -1
  45. package/{chunk-FYAAUQ4U.js → chunk-SD7AY2JD.js} +1 -1
  46. package/{chunk-XW3ZLB27.js → chunk-T5UIDW4M.js} +1 -1
  47. package/{chunk-NOXE2MQS.js → chunk-TH3GTINR.js} +1 -1
  48. package/{chunk-KFC3H4KB.js → chunk-TOLFT34P.js} +1 -1
  49. package/chunk-TOM6TEW4.js +1 -0
  50. package/{chunk-QPPZDOB4.js → chunk-UI7YZPLW.js} +2 -2
  51. package/{chunk-6R7AFT3Y.js → chunk-V3IF26PI.js} +1 -1
  52. package/chunk-V3SQQA7U.js +1 -0
  53. package/chunk-VC4Z6LFJ.js +1 -0
  54. package/chunk-VWFTXKNS.js +1 -0
  55. package/chunk-VWTABONU.js +1 -0
  56. package/chunk-WZYTVL3C.js +1 -0
  57. package/{chunk-WT7OD7CA.js → chunk-YGBHA2P6.js} +1 -1
  58. package/{chunk-VOKGT6LJ.js → chunk-YMACEDTD.js} +1 -1
  59. package/{chunk-2FIPFMHZ.js → chunk-Z6DKPRZO.js} +1 -1
  60. package/{chunk-LD6C6SVM.js → chunk-ZFV5KH42.js} +1 -1
  61. package/{chunk-5ZPDNNPN.js → chunk-ZG5RYKT7.js} +1 -1
  62. package/index.html +1 -1
  63. package/{main-EIMKMMIB.js → main-BYCXTMII.js} +1 -1
  64. package/package.json +1 -1
  65. package/chunk-2HDJ7RRK.js +0 -1
  66. package/chunk-ARY5C3CH.js +0 -1
  67. package/chunk-CC5NDKWK.js +0 -1
  68. package/chunk-CRRYENSB.js +0 -1
  69. package/chunk-FZOTDUVE.js +0 -1
  70. package/chunk-IDDKN7DJ.js +0 -1
  71. package/chunk-IOUIIMYX.js +0 -1
  72. package/chunk-NQNIYQJE.js +0 -1
  73. package/chunk-Q6OGCUFH.js +0 -1
  74. package/chunk-RPZN4LUB.js +0 -1
  75. package/chunk-TTKHY4MZ.js +0 -1
  76. package/chunk-Y4FDCCMH.js +0 -1
  77. package/chunk-YQGVSH43.js +0 -1
@@ -1 +1 @@
1
- import{Ab as he,Bb as r,Cb as a,Db as j,Hb as T,Jc as O,Lc as x,Nc as ie,Qa as y,T as $,Tb as S,Ua as le,Ub as v,Vb as g,Wa as z,Wb as l,Xa as h,Ya as M,Z as V,Za as N,_a as A,cc as G,db as m,dc as F,ea as d,ec as H,fa as u,fb as ce,fc as fe,gc as k,hc as me,ic as J,jb as E,lc as K,mc as Z,nc as ee,ob as pe,pa as U,qa as P,qc as te,ra as p,sa as B,sb as Y,tb as I,ub as L,vb as X,wb as Q,xb as b,yb as de,zb as ue}from"./chunk-QPPZDOB4.js";import{a as R,b as W,c as ae}from"./chunk-C6Q5SG76.js";var w=["*"],_e=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],ye=["[icon]","[title]","*","[content]"];function ke(n,C){n&1&&(r(0,"spk-icon",3),k(1,"info"),a())}function De(n,C){n&1&&(r(0,"spk-icon",3),k(1,"info"),a())}function we(n,C){n&1&&(r(0,"spk-icon",3),k(1,"check-circle"),a())}function be(n,C){n&1&&(r(0,"spk-icon",3),k(1,"warning-octagon"),a())}function Oe(n,C){n&1&&(r(0,"spk-icon",3),k(1,"warning"),a())}function xe(n,C){n&1&&(r(0,"spk-icon",3),k(1,"question"),a())}function Ee(n,C){if(n&1){let e=T();r(0,"spk-icon",7),S("click",function(){d(e);let i=v();return u(i.removeAlert())}),k(1,"plus"),a()}}var Te=["dialogRef"];function Me(n,C){if(n&1){let e=T();r(0,"div",4),S("click",function(){d(e);let i=v();return u(i.isOpen.set(!1))}),a()}}var Ie=["spk-button",""];var ve=["triggerRef"],Fe=["popoverRef"],Re=[[["","trigger",""]],"*"],Ve=["[trigger]","*"];var Pe=()=>({closeOnButton:!1,closeOnEsc:!0});var Ae=["inputWrap"];var je=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],He=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"];var Be=["option"],Le=["*",[["","menu",""]]],We=["*","[menu]"];var qe=["optionsRef"],Qe=["formFieldWrapper"],$e=[[["label"]],[["input"]],"*",[["","deselect-indicator",""]],[["","search-indicator",""]],[["","open-indicator",""]]],Ue=["label","input","*","[deselect-indicator]","[search-indicator]","[open-indicator]"],ze=()=>({closeOnButton:!1,closeOnEsc:!1});function Ne(n,C){if(n&1){let e=T();r(0,"spk-chip",12),S("click",function(i){let o=d(e).$implicit,s=v(3);return u(s.toggleOption(o,i))}),k(1),r(2,"spk-icon"),k(3,"x-circle"),a()()}if(n&2){let e,t=C.$implicit,i=v(3);Q(i.chipClass()),y(),J(" ",(e=(e=i.displayFn())==null?null:e(t))!==null&&e!==void 0?e:t," ")}}function Ye(n,C){if(n&1&&ue(0,Ne,4,3,"spk-chip",11,de),n&2){let e=v(2);he(e.inputValue().split(","))}}function Xe(n,C){if(n&1&&(r(0,"div",6),E(1,Ye,2,0),a()),n&2){let e=v();y(),b(e.inputValue().length>0?1:-1)}}function Ge(n,C){if(n&1&&(r(0,"div",6),k(1),a()),n&2){let e=v();y(),me(e._displayValue())}}function Je(n,C){if(n&1){let e=T();r(0,"div",13),S("click",function(i){d(e);let o=v();return u(o.deselect(i))}),l(1,3),r(2,"spk-icon",14),k(3,"x-circle"),a()()}}function Ke(n,C){n&1&&(r(0,"div",8),l(1,4),r(2,"spk-icon",14),k(3,"magnifying-glass"),a()())}function Ze(n,C){if(n&1&&(r(0,"div",15),l(1,5),r(2,"spk-icon",14),k(3,"caret-down"),a()()),n&2){let e=v();L("open",e.isOpen())}}var et=["dragImageElement"],tt=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],it=["[sidenav]","[sidenav-closed-topbar]","*"];function nt(n,C){n&1&&j(0,"div",1,0)}function ot(n,C){if(n&1){let e=T();r(0,"div",7),S("drop",function(i){d(e);let o=v();return u(o.drop(i))})("dragover",function(i){d(e);let o=v();return u(o.dragOver(i))})("dragenter",function(){d(e);let i=v();return u(i.dragEnter())})("dragleave",function(){d(e);let i=v();return u(i.dragLeave())}),a()}}function st(n,C){if(n&1){let e=T();r(0,"div",8),S("dragstart",function(i){d(e);let o=v();return u(o.dragStart(i))})("dragend",function(i){d(e);let o=v();return u(o.dragEnd(i))})("drag",function(i){d(e);let o=v();return u(o.drag(i))})("touchstart",function(i){d(e);let o=v();return u(o.touchStart(i))})("touchmove",function(i){d(e);let o=v();return u(o.touchMove(i))})("touchend",function(i){d(e);let o=v();return u(o.touchEnd(i))})("touchcancel",function(i){d(e);let o=v();return u(o.touchCancel(i))}),a()}}var rt=[[["","table-header",""]],"*",[["","table-no-rows",""]]],at=["[table-header]","*","[table-no-rows]"];function lt(n,C){n&1&&j(0,"spk-progress-bar",0)}function ct(n,C){n&1&&(r(0,"div",1),l(1,2),a())}var pt=["tooltipRef"],ne=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-icon"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),Ht=(()=>{class n{constructor(){this._el=V(B),this.alertService=p(null),this.type=p("error"),this.id=p(null)}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-alert"]],hostVars:2,hostBindings:function(t,i){t&2&&Q(i.type())},inputs:{alertService:[1,"alertService"],type:[1,"type"],id:[1,"id"]},ngContentSelectors:ye,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(t,i){if(t&1&&(g(_e),r(0,"div",1)(1,"div",2,0),l(3),a(),r(4,"div",2),E(5,ke,2,0,"spk-icon",3)(6,De,2,0,"spk-icon",3)(7,we,2,0,"spk-icon",3)(8,be,2,0,"spk-icon",3)(9,Oe,2,0,"spk-icon",3)(10,xe,2,0,"spk-icon",3),a(),r(11,"div",4),l(12,1),l(13,2),a(),E(14,Ee,2,0,"spk-icon",5),r(15,"div",6),l(16,3),a()()),t&2){let o,s=fe(2);y(),I("display",s.children.length?"block":"none"),y(4),b((o=i.type())==="primary"?5:o==="accent"?6:o==="success"?7:o==="error"?8:o==="warning"?9:10),y(9),b(i.id()?14:-1)}},dependencies:[ne],encapsulation:2,changeDetection:0})}}return n})();function oe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Bt=(()=>{class n{constructor(){this.alertHistory=h([]),this.alertHistoryIsOpen=h(!1),this.alertHistoryIsHidden=h(!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:"warning",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=oe();this.alertHistory.update(i=>[W(R({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>W(R({},o),{animateIn:o.id===t?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(i=>W(R({},i),{animateOut:i.id===e?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(i=>i.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(i=>W(R({},i),{isOpen:i.id===e?!1:i.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),dt={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},ut=(()=>{class n{constructor(){this.dialogRef=M("dialogRef"),this.isOpen=A(!1),this.options=p(),this.closed=P(),this.defaultOptionMerge=O(()=>R(R({},dt),this.options())),this.abortController=null,this.isOpenEffect=x(()=>{let e=this.dialogRef()?.nativeElement;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}),document.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})):(this.closed.emit(),e?.close())})}ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-dialog"]],viewQuery:function(t,i){t&1&&F(i.dialogRef,Te,5),t&2&&H()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:w,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,i){if(t&1&&(g(),r(0,"dialog",1,0)(2,"div",2),l(3),a(),E(4,Me,1,0,"div",3),a()),t&2){let o,s,c,f;I("width",(o=i.defaultOptionMerge().width)!==null&&o!==void 0?o:"")("max-width",(s=i.defaultOptionMerge().maxWidth)!==null&&s!==void 0?s:"")("max-height",(c=i.defaultOptionMerge().maxHeight)!==null&&c!==void 0?c:"")("height",(f=i.defaultOptionMerge().height)!==null&&f!==void 0?f:""),y(4),b(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),Lt=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=V(pe),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(e,t){let i=this.#i.injector,o=this.#o(),re=t||{},{data:s,closed:c}=re,f=ae(re,["data","closed"]);this.compRef&&this.#t(),this.insertedCompRef=ie(e,{environmentInjector:i}),this.compRef=ie(ut,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let D=this.insertedCompRef.instance?.data,_=this.insertedCompRef.instance?.closed;if(s){if(z(D))this.insertedCompRef.setInput("data",s);else if(!z(D))throw new Error("data is not an input signal on the passed component")}_ instanceof U&&(this.closedFieldSub=_.subscribe((...Se)=>{c?.(...Se),this.#t()})),this.#i.attachView(this.insertedCompRef.hostView),this.#i.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",f),this.compRef.instance.closed.subscribe(()=>se());let q=this;function se(){_&&_ instanceof U?_.emit(!1):c?.(void 0),q.#t()}return this.insertedCompRef.instance}#o(){let e=document.createElement("spk-dialog-ref");return e.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(e),document.getElementById("spk-dialog-ref")}#t(){this.insertedCompRef&&(this.#i.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#i.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#t()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Wt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-button-group"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),ht=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["","spk-button",""]],attrs:Ie,ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),qt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-card"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),Qt=(()=>{class n{#e=V(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-checkbox"]],hostBindings:function(t,i){t&1&&S("click",function(){return i.onClick()})},ngContentSelectors:w,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(t,i){t&1&&(g(),r(0,"div",0)(1,"spk-icon",1),k(2,"check"),a(),r(3,"spk-icon",2),k(4,"minus"),a()(),l(5))},dependencies:[ne],encapsulation:2,changeDetection:0})}}return n})(),ft=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-chip"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var mt=["scroll","auto"],gt={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Ce=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.disableOpenByClick=p(!1),this.isOpen=A(!1),this.options=p(),this.closed=P(),this.defaultOptionMerge=O(()=>R(R({},gt),this.options())),this.triggerRef=M.required("triggerRef"),this.popoverRef=M.required("popoverRef"),this.id=h("--"+oe()),this.menuStyle=h(null),this.openAbort=null,this.openEffect=x(()=>{let e=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};e?.showPopover(),document.addEventListener("keydown",o=>{o.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&o.preventDefault(),o.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},i),setTimeout(()=>{this.#i(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#o(),i),window.addEventListener("resize",()=>this.#o(),i),this.#o()})}else e.hidePopover(),this.openAbort?.abort(),this.closed.emit()})}#e;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}#i(e){let t=e.parentElement;for(;t;){if(mt.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}#o(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,D=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(D),this._right.set(f);else{if(s=i,c=o+this.#e,D){let q=e.top-t.height-this.#e;q<0||(c=q)}f&&(s=e.right-t.width,s<0&&(s=0));let _={left:s+"px",top:c+"px"};this.menuStyle.set(_)}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-popover"]],viewQuery:function(t,i){t&1&&(F(i.triggerRef,ve,5),F(i.popoverRef,Fe,5)),t&2&&H(2)},hostVars:4,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Ve,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(t,i){if(t&1){let o=T();g(Re),r(0,"div",2,0),S("click",function(c){return d(o),u(i.toggleIsOpen(c))}),r(2,"div",3),l(3),a(),r(4,"button",4),k(5,"Open popover"),a()(),r(6,"div",5,1)(8,"div",6),S("click",function(c){return d(o),u(i.isOpen()&&i.eventClose(c))}),a(),l(9,1),a()}t&2&&(I("anchor-name",i.id()),y(6),X(i.menuStyle()),I("position-anchor",i.id()))},dependencies:[ht],encapsulation:2,changeDetection:0})}}return n})();var $t=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-divider"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),vt=(()=>{class n{#e=V(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let c=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},f=function(){window.setTimeout(c,0)};var i=c,o=f;let s=this.#e.nativeElement.querySelector("textarea");s.addEventListener("change",c),s.addEventListener("cut",f),s.addEventListener("paste",f),s.addEventListener("drop",f),s.addEventListener("keydown",f),s.focus(),s.select(),c()}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-form-field"]],hostBindings:function(t,i){t&1&&S("click",function(){return i.onClick()})},ngContentSelectors:He,decls:16,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(t,i){t&1&&(g(je),l(0),r(1,"div",0)(2,"div",1),l(3,1),l(4,2),a(),j(5,"div",2),l(6,3),l(7,4),l(8,5),j(9,"div",3),l(10,6),a(),r(11,"div",4)(12,"div",5),l(13,7),a(),r(14,"div",6),l(15,8),a()())},encapsulation:2,changeDetection:0})}}return n})();var Ut=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-list"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),zt=(()=>{class n{constructor(){this.above=p(!1),this.right=p(!1),this.keepClickedOptionActive=p(!1),this.isOpen=A(!1),this.closed=P(),this.activeOptionIndex=h(-1),this.options=N("option"),this.optionsEl=O(()=>Array.from(this.options()).map(e=>e.nativeElement).filter(e=>e.disabled!==!0)),this.optionsEffect=x(()=>{if(!this.isOpen())return;let e=this.activeOptionIndex(),t=this.optionsEl();if(e>-1)for(let i=0;i<t.length;i++){if(i===e){t[i].scrollIntoView({block:"center"}),t[i].classList.add("active");continue}t[i].classList.remove("active")}})}onKeyDown(e){if(!this.isOpen())return;e.preventDefault();let t=this.optionsEl(),i=this.activeOptionIndex();e.key==="ArrowDown"?i===-1||i===t.length-1?this.activeOptionIndex.set(0):this.activeOptionIndex.set(i+1):e.key==="ArrowUp"?i===-1||i===0?this.activeOptionIndex.set(t.length-1):this.activeOptionIndex.set(i-1):e.key==="Enter"?i>-1&&(t[i].click(),setTimeout(()=>this.close("active"))):e.key==="Tab"?this.close("closed"):this.activeOptionIndex.set(-1)}close(e="closed",t){(!this.keepClickedOptionActive()||e==="closed")&&this.#e(),this.isOpen.set(!1),this.closed.emit(e==="active")}#e(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active")}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-menu"]],contentQueries:function(t,i,o){t&1&&G(o,i.options,Be,4),t&2&&H()},hostBindings:function(t,i){t&1&&S("keydown",function(s){return i.onKeyDown(s)})},inputs:{above:[1,"above"],right:[1,"right"],keepClickedOptionActive:[1,"keepClickedOptionActive"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:We,decls:6,vars:6,consts:[["formFieldWrapper",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"options",3,"click"]],template:function(t,i){if(t&1){let o=T();g(Le),r(0,"spk-popover",1,0),ee("isOpenChange",function(c){return d(o),Z(i.isOpen,c)||(i.isOpen=c),u(c)}),S("closed",function(){return d(o),u(i.close("fromPopover"))}),r(2,"div",2),S("click",function(){return d(o),u(i.isOpen.set(!0))}),l(3),a(),r(4,"div",3),S("click",function(){return d(o),u(i.close("active"))}),l(5,1),a()()}t&2&&(K("isOpen",i.isOpen),Y("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",te(5,Pe)))},dependencies:[Ce],encapsulation:2,changeDetection:0})}}return n})(),Ct=(()=>{class n{constructor(){this.value=p(void 0)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,i){t&1&&j(0,"div",0),t&2&&I("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),Nt=(()=>{class n{#e=V(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-radio"]],hostBindings:function(t,i){t&1&&S("click",function(){return i.onClick()})},ngContentSelectors:w,decls:2,vars:0,consts:[[1,"radio"]],template:function(t,i){t&1&&(g(),j(0,"div",0),l(1))},encapsulation:2,changeDetection:0})}}return n})();var ge=(()=>{class n{constructor(){this.#e=V(B),this.value=p(null),this.#i=x(()=>{this.#e.nativeElement.value=this.value()})}#e;#i;hasAttribute(e){return this.#e.nativeElement.hasAttribute(e)}removeAttribute(e){this.#e.nativeElement.removeAttribute(e)}setAttribute(e,t){this.#e.nativeElement.setAttribute(e,t)}getAttribute(e){return this.#e.nativeElement.getAttribute(e)}addClass(e){this.#e.nativeElement.classList.add(e)}removeClass(e){this.#e.nativeElement.classList.remove(e)}scrollIntoView(e){this.#e.nativeElement.scrollIntoView(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-option"]],inputs:{value:[1,"value"]},ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),St=["primary","accent","tertiary","warn","success"],Yt=(()=>{class n{constructor(){this.#e=V(le),this.#i=V(B),this.optionsRef=M("optionsRef"),this.options=N(ge),this.formFieldWrapperRef=M.required("formFieldWrapper"),this.inputWrapRef=M.required("inputWrap"),this.inputValue=A(""),this.readonly=p(!1),this.isFreeText=p(!1),this.selectMultiple=p(!1),this.hideClearButton=p(!1),this.displayValue=p(""),this.displayFn=p(e=>`${e}`),this.above=p(!1),this.right=p(!1),this.change=P(),this.#o=h(!1),this.#t=h(null),this.#s=h(null),this.#r=h(!1),this.#n=h(-1),this.isOpen=h(!1),this._isOpen=h(!1),this.isSearchInput=O(()=>this.#t()?.type==="search"),this.chipClass=O(()=>Array.from(this.#i.nativeElement.classList).filter(e=>St.includes(e)).join(" ")),this._displayValue=O(()=>this.displayFn()?this.displayFn()(this.inputValue()):this.displayValue()??this.inputValue()),this.selectedOption=O(()=>this.#s()?this.options().find(e=>e.value()===this.#s()):null),this.optionsOpenController=null,this.inputController=null,this.clickController=null,this.inputAbortController=null,this.#p=x(()=>{this.#o();let e=this.#i.nativeElement.querySelector("input");e&&(this.#v(e),e.addEventListener("inputValueChanged",t=>{this.inputValue.set(t.detail.value),this.selectMultiple()&&this.#l()}),this.#t.set(e),e.autocomplete="off",typeof e.value=="string"&&this.inputValue.set(e.value))}),this.#d=x(()=>{this.inputController&&this.inputController.abort(),this.inputController=new AbortController;let e=this.#t();e&&e.addEventListener("keydown",t=>{(this.selectMultiple()||!this.isSearchInput()&&!this.isFreeText())&&t.preventDefault(),t.key==="Escape"?this.close():t.key==="ArrowDown"?this.#n()===null||this.#n()<0||this.#n()===this.options().length-1?this.#n.set(this.#c()):this.#n.set(this.#n()+1):t.key==="ArrowUp"?this.#n()===null||this.#n()<0||this.#n()===0?this.#n.set(this.options().length-1):this.#n.set(this.#n()-1):t.key==="Enter"?(this.isFreeText()&&this.close(!0),this.#n()>-1&&this.selected(this.getOptionElement(this.#n()))):t.key==="Tab"?this.close(!0):(this.#n.set(-1),this.isFreeText()&&this.calculateSelectedOptions())},{signal:this.inputController?.signal})}),this.#u=x(()=>{this.isOpen()&&this.#g()}),this.#h=x(()=>{let e=this.inputValue();this.#t()&&(this.#t().value=e??"",this.#t().dispatchEvent(new Event("input")))}),this.#a=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t.type=="childList"&&t.target.classList.contains("input")&&this.#o.set(!this.#o())})}#e;#i;#o;#t;#s;#r;#n;#p;#d;#u;#h;ngOnInit(){typeof MutationObserver<"u"&&this.#a.observe(this.inputWrapRef().nativeElement,{attributes:!0,childList:!0,subtree:!0})}getOptionElement(e){return this.options()[e]}deselect(e,t=!1){e?.stopPropagation(),this.#t()&&(this.#t().value="",this.#t().dispatchEvent(new Event("input"))),this.#n.set(this.#c()),this.#r.set(!1),(t||!this.selectMultiple())&&(this.isOpen.set(!1),this.#t()?.blur())}selected(e){if(!e)return;let t=e.value(),i=this.options().indexOf(e);if(e.hasAttribute("deselect"))return this.deselect(null,!0);if(this.#n.set(i),e&&!this.selectMultiple()){this.inputValue.set(t);for(let o=0;o<this.options().length;o++){let s=this.options()[o];s.value()===t?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}}else e&&this.selectMultiple()&&(this.inputValue().includes(t)?(this.#e.removeAttribute(e,"selected"),this.toggleOption(t)):(this.#e.setAttribute(e,"selected","selected"),this.inputValue.set(this.inputValue().length?`${this.inputValue()},${t}`:t)));this.#r.set(!1),this.#s.set(null),this.selectMultiple()?this.#t()?.focus():(this.isOpen.set(!1),this.#t()?.blur()),this.change.emit(this.inputValue())}calculateSelectedOptions(){setTimeout(()=>{let e=this.options(),i=this.#t()?.value;for(let o=0;o<e.length;o++){let s=e[o];s.value()===i?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}})}toggleOption(e,t){t&&(t.preventDefault(),t.stopPropagation()),this.inputValue.set(this.inputValue().startsWith(e+",")?this.inputValue().replace(e+",",""):this.inputValue().includes(","+e)?this.inputValue().replace(","+e,""):this.inputValue().replace(e,""))}close(e=!1){let t=this.#s();this.isSearchInput()&&!this.isFreeText()&&t&&setTimeout(()=>this.inputValue.set(t)),this.isOpen.set(!1),this.#r.set(!1),e||this.#t()?.blur(),this.#m()}open(e){e.preventDefault(),!this.isOpen()&&(this.isSearchInput()&&!this.#r()&&!this.isFreeText()?(this.#s.set(this.inputValue()),this.inputValue.set(""),this.#t().focus(),this.#t().value="",this.#t().dispatchEvent(new Event("input")),this.#n.set(-1)):(this.isSearchInput()||this.selectMultiple())&&this.#t().focus(),this.isOpen.set(!0),this.#r.set(!0),this.#f(),this.#l())}#f(){this.clickController&&this.clickController.abort(),this.clickController=new AbortController,this.optionsRef()?.nativeElement?.addEventListener("click",e=>{if(!e.target)return;let t=e.target.closest("spk-option"),i=this.options().find(o=>o.value()===t.value);i&&this.selected(i)},{signal:this.clickController?.signal})}#m(){this.clickController&&this.clickController.abort()}#g(){for(let e=0;e<this.options().length;e++){let t=this.options()[e];t.removeClass("focused"),this.#n()===e&&(t.addClass("focused"),t.scrollIntoView({block:"center"}))}}#l(){let e=this.#t();if(!e)return;this.inputValue.set(e.value);let t=e.value.split(",");setTimeout(()=>{let i=this.options();for(let o=0;o<i.length;o++){let s=i[o].value();s&&t.includes(s)?this.#e.setAttribute(i[o],"selected","selected"):this.#e.removeAttribute(i[o],"selected")}})}#c(){let e=this.options();for(let t=0;t<e.length;t++)if(!e[t].hasAttribute("deselect"))return t;return-1}#a;#v(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 o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(o),t}}),e}ngOnDestroy(){this.clickController&&this.clickController.abort(),this.inputController&&this.inputController.abort(),this.optionsOpenController&&this.optionsOpenController.abort(),typeof MutationObserver<"u"&&this.#a.disconnect()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-select"]],contentQueries:function(t,i,o){t&1&&G(o,i.options,ge,4),t&2&&H()},viewQuery:function(t,i){t&1&&(F(i.optionsRef,qe,5),F(i.formFieldWrapperRef,Qe,5),F(i.inputWrapRef,Ae,5)),t&2&&H(3)},inputs:{inputValue:[1,"inputValue"],readonly:[1,"readonly"],isFreeText:[1,"isFreeText"],selectMultiple:[1,"selectMultiple"],hideClearButton:[1,"hideClearButton"],displayValue:[1,"displayValue"],displayFn:[1,"displayFn"],above:[1,"above"],right:[1,"right"]},outputs:{inputValue:"inputValueChange",change:"change"},ngContentSelectors:Ue,decls:15,vars:8,consts:[["formFieldWrapper",""],["inputWrap",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"display-value"],["suffix","",1,"deselect-indicator"],["suffix","",1,"search-indicator"],["suffix","",1,"select-open-indicator",3,"open"],[1,"sparkle-options"],[1,"small","simple",3,"class"],[1,"small","simple",3,"click"],["suffix","",1,"deselect-indicator",3,"click"],[1,"default-indicator"],["suffix","",1,"select-open-indicator"]],template:function(t,i){if(t&1){let o=T();g($e),r(0,"spk-popover",3,0),ee("isOpenChange",function(c){return d(o),Z(i.isOpen,c)||(i.isOpen=c),u(c)}),S("closed",function(){return d(o),u(i.close())}),r(2,"spk-form-field",4),S("click",function(c){return d(o),u(i.open(c))}),l(3,0,["ngProjectAs","label",5,["label"]]),r(4,"div",5,1),E(6,Xe,2,1,"div",6)(7,Ge,2,1,"div",6),l(8,1),a(),E(9,Je,4,0,"div",7)(10,Ke,4,0,"div",8)(11,Ze,4,2,"div",9),a(),r(12,"div",10,2),l(14,2),a()()}t&2&&(K("isOpen",i.isOpen),Y("disableOpenByClick",!0)("options",te(7,ze)),y(2),Q(i.readonly()?"readonly":""),y(4),b(i.selectMultiple()?6:i._displayValue()&&i.isSearchInput()&&!i.isOpen()||i._displayValue()&&!i.isSearchInput()?7:-1),y(3),b((i.inputValue()&&!i.isOpen()&&i.inputValue().length>0||i.selectedOption())&&!i.hideClearButton()?9:i.isSearchInput()&&!i.selectedOption()?10:11))},dependencies:[vt,ne,ft,Ce],encapsulation:2,changeDetection:0})}}return n})(),Xt=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=p(!1),this.isOpen=A(!1),this.type=p(""),this.dragImageElement=M.required("dragImageElement"),this.dragIsEnding=h(!1),this.dragIsOnScreen=h(!0),this.isDragging=h(!1),this.dragPositionX=h(0),this.dragActualPositionX=O(()=>{let e=this.dragPositionX(),t=.32;return e>this.openWidthTreshold?this.openWidthTreshold+(e-this.openWidthTreshold)*t:e}),this.draggingStyle=O(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=x(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(e){e.stopPropagation(),this.#e(e.clientX)}#e(e){this.isDragging.set(!1),e<=0?this.isOpen.set(!1):e>this.openWidthTreshold?this.isOpen.set(!0):e<this.openWidthTreshold&&(!this.isOpen()&&e<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(e){(e.clientX<0||!this.dragIsOnScreen())&&this.#e(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(e){e.preventDefault(),this.#i(e)}dragStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#i(e)}#i(e){e.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.clientX)}),this.#i(e)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0)}touchMove(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.touches[0].clientX)})}touchEnd(e){e.stopPropagation(),this.#e(e.changedTouches[0].clientX)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-sidenav"]],viewQuery:function(t,i){t&1&&F(i.dragImageElement,et,5),t&2&&H()},hostVars:10,hostBindings:function(t,i){t&2&&L("open",i.isOpen())("closed",!i.isOpen())("overlay",i.type()==="overlay")("simple",i.type()==="simple")("is-dragging",i.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:it,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","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,i){t&1&&(g(tt),E(0,nt,2,0,"div",1)(1,ot,1,0,"div",2),r(2,"div",3),l(3),a(),r(4,"div",4),E(5,st,1,0,"div",5),r(6,"div",6),l(7,1),a(),r(8,"main"),l(9,2),a()()),t&2&&(b(i.type()==="overlay"?0:-1),y(),b(i.type()==="overlay"&&i.isDragging()?1:-1),y(3),I("transform",i.draggingStyle()),y(),b(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var Gt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-stepper"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var Jt=(()=>{class n{constructor(){this.tableColumns=p([]),this.loading=p(!1),this.columnSizes=O(()=>this.tableColumns().reduce((e,t,i)=>i===this.tableColumns().length-1?`${e} max-content`:`${e} 1fr`,"")),this.data=p([]),this.dataChange=P(),this.#e=null,this.#i=h(!1),this.sortByColumn=A(null),this.e=x(()=>{let e=this.sortByColumn();if(e===null)return this.#i()||(this.#e=this.data(),this.#i.set(!0)),this.dataChange.emit(JSON.parse(JSON.stringify(this.#e)));let t=e.startsWith("-")?e.slice(1):e,i=e.startsWith("-"),o=this.data().sort((s,c)=>{let f=s[t],D=c[t],_=0;return typeof f=="number"&&typeof D=="number"&&(_=f-D),f instanceof Date&&D instanceof Date&&(_=f.getTime()-D.getTime()),typeof f=="string"&&typeof D=="string"&&(_=f.localeCompare(D,void 0,{sensitivity:"base"})),i?-_:_});this.dataChange.emit(o)})}#e;#i;toggleSort(e){let t=this.sortByColumn(),i=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-table"]],hostVars:2,hostBindings:function(t,i){t&2&&I("grid-template-columns",i.columnSizes())},inputs:{tableColumns:[1,"tableColumns"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:at,decls:6,vars:2,consts:[[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,i){t&1&&(g(rt),r(0,"thead"),l(1),E(2,lt,1,0,"spk-progress-bar",0),a(),r(3,"tbody"),l(4,1),a(),E(5,ct,2,0,"div",1)),t&2&&(y(2),b(i.loading()?2:-1),y(3),b(i.loading()?-1:5))},dependencies:[Ct],encapsulation:2,changeDetection:0})}}return n})(),Kt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-tabs"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var Zt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-toggle"]],ngContentSelectors:w,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,i){t&1&&(g(),r(0,"div",0),j(1,"div",1),a(),l(2))},encapsulation:2,changeDetection:0})}}return n})(),ei=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=p(!1),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.message=p.required(),this.isOpen=A(!1),this.closed=P(),this.triggerRef=M.required("triggerRef"),this.tooltipRef=M.required("tooltipRef"),this.id=h("--"+oe()),this.menuStyle=h(null),this.isCalculatingPosition=O(()=>{let e=this.tooltipRef()?.nativeElement;return this.isOpen()?(e?.showPopover(),!0):(e.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=x(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#i(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})}),this.scrollableStyles=["scroll","auto"]}#e;#i(e){let t=e.parentElement;for(;t;){if(this.scrollableStyles.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,D=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(D),this._right.set(f);else{if(this.above()){let _=e.top-t.height-this.#e;_>=0&&(c=_)}else D&&(c=e.top-t.height-this.#e);if(this.right()){let _=e.right-t.width;_>=0&&(s=_)}else f&&(c=D?e.top+e.height-t.height:e.top,s=e.left-t.width-this.#e);this.menuStyle.set({left:s+"px",top:c+"px"})}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-tooltip"]],viewQuery:function(t,i){t&1&&(F(i.triggerRef,ve,5),F(i.tooltipRef,pt,5)),t&2&&H(2)},hostVars:6,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())("disabled",i.disabled())},inputs:{disabled:[1,"disabled"],above:[1,"above"],right:[1,"right"],message:[1,"message"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:w,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(t,i){if(t&1){let o=T();g(),r(0,"div",2,0),S("mouseover",function(){return d(o),u(i.isOpen.set(!0))})("mouseout",function(){return d(o),u(i.isOpen.set(!1))}),l(2),a(),r(3,"div",3,1),k(5),a()}t&2&&(I("anchor-name",i.id()),y(3),X(i.menuStyle()),I("position-anchor",i.id()),y(2),J(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})(),ti=(()=>{class n{constructor(){this.filesOver=h(!1),this.filesDropped=P()}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||n)}}static{this.\u0275dir=ce({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(t,i){t&1&&S("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),t&2&&L("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{ne as a,Ht as b,Bt as c,ut as d,Lt as e,Wt as f,ht as g,qt as h,Qt as i,ft as j,$t as k,vt as l,Ut as m,zt as n,Ct as o,Nt as p,ge as q,Yt as r,Xt as s,Gt as t,Jt as u,Kt as v,Zt as w,ei as x,ti as y};
1
+ import{Ab as he,Bb as r,Cb as a,Db as j,Hb as T,Jc as O,Lc as x,Nc as ie,Qa as y,T as $,Tb as S,Ua as le,Ub as v,Vb as g,Wa as z,Wb as l,Xa as h,Ya as M,Z as V,Za as N,_a as A,cc as G,db as m,dc as F,ea as d,ec as H,fa as u,fb as ce,fc as fe,gc as k,hc as me,ic as J,jb as E,lc as K,mc as Z,nc as ee,ob as pe,pa as U,qa as P,qc as te,ra as p,sa as B,sb as Y,tb as I,ub as L,vb as X,wb as Q,xb as b,yb as de,zb as ue}from"./chunk-UI7YZPLW.js";import{a as R,b as W,c as ae}from"./chunk-C6Q5SG76.js";var w=["*"],_e=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],ye=["[icon]","[title]","*","[content]"];function ke(n,C){n&1&&(r(0,"spk-icon",3),k(1,"info"),a())}function De(n,C){n&1&&(r(0,"spk-icon",3),k(1,"info"),a())}function we(n,C){n&1&&(r(0,"spk-icon",3),k(1,"check-circle"),a())}function be(n,C){n&1&&(r(0,"spk-icon",3),k(1,"warning-octagon"),a())}function Oe(n,C){n&1&&(r(0,"spk-icon",3),k(1,"warning"),a())}function xe(n,C){n&1&&(r(0,"spk-icon",3),k(1,"question"),a())}function Ee(n,C){if(n&1){let e=T();r(0,"spk-icon",7),S("click",function(){d(e);let i=v();return u(i.removeAlert())}),k(1,"plus"),a()}}var Te=["dialogRef"];function Me(n,C){if(n&1){let e=T();r(0,"div",4),S("click",function(){d(e);let i=v();return u(i.isOpen.set(!1))}),a()}}var Ie=["spk-button",""];var ve=["triggerRef"],Fe=["popoverRef"],Re=[[["","trigger",""]],"*"],Ve=["[trigger]","*"];var Pe=()=>({closeOnButton:!1,closeOnEsc:!0});var Ae=["inputWrap"];var je=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],He=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"];var Be=["option"],Le=["*",[["","menu",""]]],We=["*","[menu]"];var qe=["optionsRef"],Qe=["formFieldWrapper"],$e=[[["label"]],[["input"]],"*",[["","deselect-indicator",""]],[["","search-indicator",""]],[["","open-indicator",""]]],Ue=["label","input","*","[deselect-indicator]","[search-indicator]","[open-indicator]"],ze=()=>({closeOnButton:!1,closeOnEsc:!1});function Ne(n,C){if(n&1){let e=T();r(0,"spk-chip",12),S("click",function(i){let o=d(e).$implicit,s=v(3);return u(s.toggleOption(o,i))}),k(1),r(2,"spk-icon"),k(3,"x-circle"),a()()}if(n&2){let e,t=C.$implicit,i=v(3);Q(i.chipClass()),y(),J(" ",(e=(e=i.displayFn())==null?null:e(t))!==null&&e!==void 0?e:t," ")}}function Ye(n,C){if(n&1&&ue(0,Ne,4,3,"spk-chip",11,de),n&2){let e=v(2);he(e.inputValue().split(","))}}function Xe(n,C){if(n&1&&(r(0,"div",6),E(1,Ye,2,0),a()),n&2){let e=v();y(),b(e.inputValue().length>0?1:-1)}}function Ge(n,C){if(n&1&&(r(0,"div",6),k(1),a()),n&2){let e=v();y(),me(e._displayValue())}}function Je(n,C){if(n&1){let e=T();r(0,"div",13),S("click",function(i){d(e);let o=v();return u(o.deselect(i))}),l(1,3),r(2,"spk-icon",14),k(3,"x-circle"),a()()}}function Ke(n,C){n&1&&(r(0,"div",8),l(1,4),r(2,"spk-icon",14),k(3,"magnifying-glass"),a()())}function Ze(n,C){if(n&1&&(r(0,"div",15),l(1,5),r(2,"spk-icon",14),k(3,"caret-down"),a()()),n&2){let e=v();L("open",e.isOpen())}}var et=["dragImageElement"],tt=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],it=["[sidenav]","[sidenav-closed-topbar]","*"];function nt(n,C){n&1&&j(0,"div",1,0)}function ot(n,C){if(n&1){let e=T();r(0,"div",7),S("drop",function(i){d(e);let o=v();return u(o.drop(i))})("dragover",function(i){d(e);let o=v();return u(o.dragOver(i))})("dragenter",function(){d(e);let i=v();return u(i.dragEnter())})("dragleave",function(){d(e);let i=v();return u(i.dragLeave())}),a()}}function st(n,C){if(n&1){let e=T();r(0,"div",8),S("dragstart",function(i){d(e);let o=v();return u(o.dragStart(i))})("dragend",function(i){d(e);let o=v();return u(o.dragEnd(i))})("drag",function(i){d(e);let o=v();return u(o.drag(i))})("touchstart",function(i){d(e);let o=v();return u(o.touchStart(i))})("touchmove",function(i){d(e);let o=v();return u(o.touchMove(i))})("touchend",function(i){d(e);let o=v();return u(o.touchEnd(i))})("touchcancel",function(i){d(e);let o=v();return u(o.touchCancel(i))}),a()}}var rt=[[["","table-header",""]],"*",[["","table-no-rows",""]]],at=["[table-header]","*","[table-no-rows]"];function lt(n,C){n&1&&j(0,"spk-progress-bar",0)}function ct(n,C){n&1&&(r(0,"div",1),l(1,2),a())}var pt=["tooltipRef"],ne=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-icon"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),Ht=(()=>{class n{constructor(){this._el=V(B),this.alertService=p(null),this.type=p("error"),this.id=p(null)}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-alert"]],hostVars:2,hostBindings:function(t,i){t&2&&Q(i.type())},inputs:{alertService:[1,"alertService"],type:[1,"type"],id:[1,"id"]},ngContentSelectors:ye,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(t,i){if(t&1&&(g(_e),r(0,"div",1)(1,"div",2,0),l(3),a(),r(4,"div",2),E(5,ke,2,0,"spk-icon",3)(6,De,2,0,"spk-icon",3)(7,we,2,0,"spk-icon",3)(8,be,2,0,"spk-icon",3)(9,Oe,2,0,"spk-icon",3)(10,xe,2,0,"spk-icon",3),a(),r(11,"div",4),l(12,1),l(13,2),a(),E(14,Ee,2,0,"spk-icon",5),r(15,"div",6),l(16,3),a()()),t&2){let o,s=fe(2);y(),I("display",s.children.length?"block":"none"),y(4),b((o=i.type())==="primary"?5:o==="accent"?6:o==="success"?7:o==="error"?8:o==="warning"?9:10),y(9),b(i.id()?14:-1)}},dependencies:[ne],encapsulation:2,changeDetection:0})}}return n})();function oe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Bt=(()=>{class n{constructor(){this.alertHistory=h([]),this.alertHistoryIsOpen=h(!1),this.alertHistoryIsHidden=h(!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:"warning",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=oe();this.alertHistory.update(i=>[W(R({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>W(R({},o),{animateIn:o.id===t?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(i=>W(R({},i),{animateOut:i.id===e?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(i=>i.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(i=>W(R({},i),{isOpen:i.id===e?!1:i.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),dt={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},ut=(()=>{class n{constructor(){this.dialogRef=M("dialogRef"),this.isOpen=A(!1),this.options=p(),this.closed=P(),this.defaultOptionMerge=O(()=>R(R({},dt),this.options())),this.abortController=null,this.isOpenEffect=x(()=>{let e=this.dialogRef()?.nativeElement;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}),document.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})):(this.closed.emit(),e?.close())})}ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-dialog"]],viewQuery:function(t,i){t&1&&F(i.dialogRef,Te,5),t&2&&H()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:w,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,i){if(t&1&&(g(),r(0,"dialog",1,0)(2,"div",2),l(3),a(),E(4,Me,1,0,"div",3),a()),t&2){let o,s,c,f;I("width",(o=i.defaultOptionMerge().width)!==null&&o!==void 0?o:"")("max-width",(s=i.defaultOptionMerge().maxWidth)!==null&&s!==void 0?s:"")("max-height",(c=i.defaultOptionMerge().maxHeight)!==null&&c!==void 0?c:"")("height",(f=i.defaultOptionMerge().height)!==null&&f!==void 0?f:""),y(4),b(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),Lt=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=V(pe),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(e,t){let i=this.#i.injector,o=this.#o(),re=t||{},{data:s,closed:c}=re,f=ae(re,["data","closed"]);this.compRef&&this.#t(),this.insertedCompRef=ie(e,{environmentInjector:i}),this.compRef=ie(ut,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let D=this.insertedCompRef.instance?.data,_=this.insertedCompRef.instance?.closed;if(s){if(z(D))this.insertedCompRef.setInput("data",s);else if(!z(D))throw new Error("data is not an input signal on the passed component")}_ instanceof U&&(this.closedFieldSub=_.subscribe((...Se)=>{c?.(...Se),this.#t()})),this.#i.attachView(this.insertedCompRef.hostView),this.#i.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",f),this.compRef.instance.closed.subscribe(()=>se());let q=this;function se(){_&&_ instanceof U?_.emit(!1):c?.(void 0),q.#t()}return this.insertedCompRef.instance}#o(){let e=document.createElement("spk-dialog-ref");return e.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(e),document.getElementById("spk-dialog-ref")}#t(){this.insertedCompRef&&(this.#i.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#i.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#t()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=$({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Wt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-button-group"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),ht=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["","spk-button",""]],attrs:Ie,ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),qt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-card"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),Qt=(()=>{class n{#e=V(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-checkbox"]],hostBindings:function(t,i){t&1&&S("click",function(){return i.onClick()})},ngContentSelectors:w,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(t,i){t&1&&(g(),r(0,"div",0)(1,"spk-icon",1),k(2,"check"),a(),r(3,"spk-icon",2),k(4,"minus"),a()(),l(5))},dependencies:[ne],encapsulation:2,changeDetection:0})}}return n})(),ft=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-chip"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var mt=["scroll","auto"],gt={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Ce=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.disableOpenByClick=p(!1),this.isOpen=A(!1),this.options=p(),this.closed=P(),this.defaultOptionMerge=O(()=>R(R({},gt),this.options())),this.triggerRef=M.required("triggerRef"),this.popoverRef=M.required("popoverRef"),this.id=h("--"+oe()),this.menuStyle=h(null),this.openAbort=null,this.openEffect=x(()=>{let e=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};e?.showPopover(),document.addEventListener("keydown",o=>{o.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&o.preventDefault(),o.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},i),setTimeout(()=>{this.#i(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#o(),i),window.addEventListener("resize",()=>this.#o(),i),this.#o()})}else e.hidePopover(),this.openAbort?.abort(),this.closed.emit()})}#e;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}#i(e){let t=e.parentElement;for(;t;){if(mt.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}#o(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,D=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(D),this._right.set(f);else{if(s=i,c=o+this.#e,D){let q=e.top-t.height-this.#e;q<0||(c=q)}f&&(s=e.right-t.width,s<0&&(s=0));let _={left:s+"px",top:c+"px"};this.menuStyle.set(_)}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-popover"]],viewQuery:function(t,i){t&1&&(F(i.triggerRef,ve,5),F(i.popoverRef,Fe,5)),t&2&&H(2)},hostVars:4,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Ve,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(t,i){if(t&1){let o=T();g(Re),r(0,"div",2,0),S("click",function(c){return d(o),u(i.toggleIsOpen(c))}),r(2,"div",3),l(3),a(),r(4,"button",4),k(5,"Open popover"),a()(),r(6,"div",5,1)(8,"div",6),S("click",function(c){return d(o),u(i.isOpen()&&i.eventClose(c))}),a(),l(9,1),a()}t&2&&(I("anchor-name",i.id()),y(6),X(i.menuStyle()),I("position-anchor",i.id()))},dependencies:[ht],encapsulation:2,changeDetection:0})}}return n})();var $t=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-divider"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),vt=(()=>{class n{#e=V(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let c=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},f=function(){window.setTimeout(c,0)};var i=c,o=f;let s=this.#e.nativeElement.querySelector("textarea");s.addEventListener("change",c),s.addEventListener("cut",f),s.addEventListener("paste",f),s.addEventListener("drop",f),s.addEventListener("keydown",f),s.focus(),s.select(),c()}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-form-field"]],hostBindings:function(t,i){t&1&&S("click",function(){return i.onClick()})},ngContentSelectors:He,decls:16,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(t,i){t&1&&(g(je),l(0),r(1,"div",0)(2,"div",1),l(3,1),l(4,2),a(),j(5,"div",2),l(6,3),l(7,4),l(8,5),j(9,"div",3),l(10,6),a(),r(11,"div",4)(12,"div",5),l(13,7),a(),r(14,"div",6),l(15,8),a()())},encapsulation:2,changeDetection:0})}}return n})();var Ut=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-list"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),zt=(()=>{class n{constructor(){this.above=p(!1),this.right=p(!1),this.keepClickedOptionActive=p(!1),this.isOpen=A(!1),this.closed=P(),this.activeOptionIndex=h(-1),this.options=N("option"),this.optionsEl=O(()=>Array.from(this.options()).map(e=>e.nativeElement).filter(e=>e.disabled!==!0)),this.optionsEffect=x(()=>{if(!this.isOpen())return;let e=this.activeOptionIndex(),t=this.optionsEl();if(e>-1)for(let i=0;i<t.length;i++){if(i===e){t[i].scrollIntoView({block:"center"}),t[i].classList.add("active");continue}t[i].classList.remove("active")}})}onKeyDown(e){if(!this.isOpen())return;e.preventDefault();let t=this.optionsEl(),i=this.activeOptionIndex();e.key==="ArrowDown"?i===-1||i===t.length-1?this.activeOptionIndex.set(0):this.activeOptionIndex.set(i+1):e.key==="ArrowUp"?i===-1||i===0?this.activeOptionIndex.set(t.length-1):this.activeOptionIndex.set(i-1):e.key==="Enter"?i>-1&&(t[i].click(),setTimeout(()=>this.close("active"))):e.key==="Tab"?this.close("closed"):this.activeOptionIndex.set(-1)}close(e="closed",t){(!this.keepClickedOptionActive()||e==="closed")&&this.#e(),this.isOpen.set(!1),this.closed.emit(e==="active")}#e(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active")}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-menu"]],contentQueries:function(t,i,o){t&1&&G(o,i.options,Be,4),t&2&&H()},hostBindings:function(t,i){t&1&&S("keydown",function(s){return i.onKeyDown(s)})},inputs:{above:[1,"above"],right:[1,"right"],keepClickedOptionActive:[1,"keepClickedOptionActive"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:We,decls:6,vars:6,consts:[["formFieldWrapper",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"options",3,"click"]],template:function(t,i){if(t&1){let o=T();g(Le),r(0,"spk-popover",1,0),ee("isOpenChange",function(c){return d(o),Z(i.isOpen,c)||(i.isOpen=c),u(c)}),S("closed",function(){return d(o),u(i.close("fromPopover"))}),r(2,"div",2),S("click",function(){return d(o),u(i.isOpen.set(!0))}),l(3),a(),r(4,"div",3),S("click",function(){return d(o),u(i.close("active"))}),l(5,1),a()()}t&2&&(K("isOpen",i.isOpen),Y("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",te(5,Pe)))},dependencies:[Ce],encapsulation:2,changeDetection:0})}}return n})(),Ct=(()=>{class n{constructor(){this.value=p(void 0)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,i){t&1&&j(0,"div",0),t&2&&I("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),Nt=(()=>{class n{#e=V(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-radio"]],hostBindings:function(t,i){t&1&&S("click",function(){return i.onClick()})},ngContentSelectors:w,decls:2,vars:0,consts:[[1,"radio"]],template:function(t,i){t&1&&(g(),j(0,"div",0),l(1))},encapsulation:2,changeDetection:0})}}return n})();var ge=(()=>{class n{constructor(){this.#e=V(B),this.value=p(null),this.#i=x(()=>{this.#e.nativeElement.value=this.value()})}#e;#i;hasAttribute(e){return this.#e.nativeElement.hasAttribute(e)}removeAttribute(e){this.#e.nativeElement.removeAttribute(e)}setAttribute(e,t){this.#e.nativeElement.setAttribute(e,t)}getAttribute(e){return this.#e.nativeElement.getAttribute(e)}addClass(e){this.#e.nativeElement.classList.add(e)}removeClass(e){this.#e.nativeElement.classList.remove(e)}scrollIntoView(e){this.#e.nativeElement.scrollIntoView(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-option"]],inputs:{value:[1,"value"]},ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),St=["primary","accent","tertiary","warn","success"],Yt=(()=>{class n{constructor(){this.#e=V(le),this.#i=V(B),this.optionsRef=M("optionsRef"),this.options=N(ge),this.formFieldWrapperRef=M.required("formFieldWrapper"),this.inputWrapRef=M.required("inputWrap"),this.inputValue=A(""),this.readonly=p(!1),this.isFreeText=p(!1),this.selectMultiple=p(!1),this.hideClearButton=p(!1),this.displayValue=p(""),this.displayFn=p(e=>`${e}`),this.above=p(!1),this.right=p(!1),this.change=P(),this.#o=h(!1),this.#t=h(null),this.#s=h(null),this.#r=h(!1),this.#n=h(-1),this.isOpen=h(!1),this._isOpen=h(!1),this.isSearchInput=O(()=>this.#t()?.type==="search"),this.chipClass=O(()=>Array.from(this.#i.nativeElement.classList).filter(e=>St.includes(e)).join(" ")),this._displayValue=O(()=>this.displayFn()?this.displayFn()(this.inputValue()):this.displayValue()??this.inputValue()),this.selectedOption=O(()=>this.#s()?this.options().find(e=>e.value()===this.#s()):null),this.optionsOpenController=null,this.inputController=null,this.clickController=null,this.inputAbortController=null,this.#p=x(()=>{this.#o();let e=this.#i.nativeElement.querySelector("input");e&&(this.#v(e),e.addEventListener("inputValueChanged",t=>{this.inputValue.set(t.detail.value),this.selectMultiple()&&this.#l()}),this.#t.set(e),e.autocomplete="off",typeof e.value=="string"&&this.inputValue.set(e.value))}),this.#d=x(()=>{this.inputController&&this.inputController.abort(),this.inputController=new AbortController;let e=this.#t();e&&e.addEventListener("keydown",t=>{(this.selectMultiple()||!this.isSearchInput()&&!this.isFreeText())&&t.preventDefault(),t.key==="Escape"?this.close():t.key==="ArrowDown"?this.#n()===null||this.#n()<0||this.#n()===this.options().length-1?this.#n.set(this.#c()):this.#n.set(this.#n()+1):t.key==="ArrowUp"?this.#n()===null||this.#n()<0||this.#n()===0?this.#n.set(this.options().length-1):this.#n.set(this.#n()-1):t.key==="Enter"?(this.isFreeText()&&this.close(!0),this.#n()>-1&&this.selected(this.getOptionElement(this.#n()))):t.key==="Tab"?this.close(!0):(this.#n.set(-1),this.isFreeText()&&this.calculateSelectedOptions())},{signal:this.inputController?.signal})}),this.#u=x(()=>{this.isOpen()&&this.#g()}),this.#h=x(()=>{let e=this.inputValue();this.#t()&&(this.#t().value=e??"",this.#t().dispatchEvent(new Event("input")))}),this.#a=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t.type=="childList"&&t.target.classList.contains("input")&&this.#o.set(!this.#o())})}#e;#i;#o;#t;#s;#r;#n;#p;#d;#u;#h;ngOnInit(){typeof MutationObserver<"u"&&this.#a.observe(this.inputWrapRef().nativeElement,{attributes:!0,childList:!0,subtree:!0})}getOptionElement(e){return this.options()[e]}deselect(e,t=!1){e?.stopPropagation(),this.#t()&&(this.#t().value="",this.#t().dispatchEvent(new Event("input"))),this.#n.set(this.#c()),this.#r.set(!1),(t||!this.selectMultiple())&&(this.isOpen.set(!1),this.#t()?.blur())}selected(e){if(!e)return;let t=e.value(),i=this.options().indexOf(e);if(e.hasAttribute("deselect"))return this.deselect(null,!0);if(this.#n.set(i),e&&!this.selectMultiple()){this.inputValue.set(t);for(let o=0;o<this.options().length;o++){let s=this.options()[o];s.value()===t?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}}else e&&this.selectMultiple()&&(this.inputValue().includes(t)?(this.#e.removeAttribute(e,"selected"),this.toggleOption(t)):(this.#e.setAttribute(e,"selected","selected"),this.inputValue.set(this.inputValue().length?`${this.inputValue()},${t}`:t)));this.#r.set(!1),this.#s.set(null),this.selectMultiple()?this.#t()?.focus():(this.isOpen.set(!1),this.#t()?.blur()),this.change.emit(this.inputValue())}calculateSelectedOptions(){setTimeout(()=>{let e=this.options(),i=this.#t()?.value;for(let o=0;o<e.length;o++){let s=e[o];s.value()===i?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}})}toggleOption(e,t){t&&(t.preventDefault(),t.stopPropagation()),this.inputValue.set(this.inputValue().startsWith(e+",")?this.inputValue().replace(e+",",""):this.inputValue().includes(","+e)?this.inputValue().replace(","+e,""):this.inputValue().replace(e,""))}close(e=!1){let t=this.#s();this.isSearchInput()&&!this.isFreeText()&&t&&setTimeout(()=>this.inputValue.set(t)),this.isOpen.set(!1),this.#r.set(!1),e||this.#t()?.blur(),this.#m()}open(e){e.preventDefault(),!this.isOpen()&&(this.isSearchInput()&&!this.#r()&&!this.isFreeText()?(this.#s.set(this.inputValue()),this.inputValue.set(""),this.#t().focus(),this.#t().value="",this.#t().dispatchEvent(new Event("input")),this.#n.set(-1)):(this.isSearchInput()||this.selectMultiple())&&this.#t().focus(),this.isOpen.set(!0),this.#r.set(!0),this.#f(),this.#l())}#f(){this.clickController&&this.clickController.abort(),this.clickController=new AbortController,this.optionsRef()?.nativeElement?.addEventListener("click",e=>{if(!e.target)return;let t=e.target.closest("spk-option"),i=this.options().find(o=>o.value()===t.value);i&&this.selected(i)},{signal:this.clickController?.signal})}#m(){this.clickController&&this.clickController.abort()}#g(){for(let e=0;e<this.options().length;e++){let t=this.options()[e];t.removeClass("focused"),this.#n()===e&&(t.addClass("focused"),t.scrollIntoView({block:"center"}))}}#l(){let e=this.#t();if(!e)return;this.inputValue.set(e.value);let t=e.value.split(",");setTimeout(()=>{let i=this.options();for(let o=0;o<i.length;o++){let s=i[o].value();s&&t.includes(s)?this.#e.setAttribute(i[o],"selected","selected"):this.#e.removeAttribute(i[o],"selected")}})}#c(){let e=this.options();for(let t=0;t<e.length;t++)if(!e[t].hasAttribute("deselect"))return t;return-1}#a;#v(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 o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(o),t}}),e}ngOnDestroy(){this.clickController&&this.clickController.abort(),this.inputController&&this.inputController.abort(),this.optionsOpenController&&this.optionsOpenController.abort(),typeof MutationObserver<"u"&&this.#a.disconnect()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-select"]],contentQueries:function(t,i,o){t&1&&G(o,i.options,ge,4),t&2&&H()},viewQuery:function(t,i){t&1&&(F(i.optionsRef,qe,5),F(i.formFieldWrapperRef,Qe,5),F(i.inputWrapRef,Ae,5)),t&2&&H(3)},inputs:{inputValue:[1,"inputValue"],readonly:[1,"readonly"],isFreeText:[1,"isFreeText"],selectMultiple:[1,"selectMultiple"],hideClearButton:[1,"hideClearButton"],displayValue:[1,"displayValue"],displayFn:[1,"displayFn"],above:[1,"above"],right:[1,"right"]},outputs:{inputValue:"inputValueChange",change:"change"},ngContentSelectors:Ue,decls:15,vars:8,consts:[["formFieldWrapper",""],["inputWrap",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"display-value"],["suffix","",1,"deselect-indicator"],["suffix","",1,"search-indicator"],["suffix","",1,"select-open-indicator",3,"open"],[1,"sparkle-options"],[1,"small","simple",3,"class"],[1,"small","simple",3,"click"],["suffix","",1,"deselect-indicator",3,"click"],[1,"default-indicator"],["suffix","",1,"select-open-indicator"]],template:function(t,i){if(t&1){let o=T();g($e),r(0,"spk-popover",3,0),ee("isOpenChange",function(c){return d(o),Z(i.isOpen,c)||(i.isOpen=c),u(c)}),S("closed",function(){return d(o),u(i.close())}),r(2,"spk-form-field",4),S("click",function(c){return d(o),u(i.open(c))}),l(3,0,["ngProjectAs","label",5,["label"]]),r(4,"div",5,1),E(6,Xe,2,1,"div",6)(7,Ge,2,1,"div",6),l(8,1),a(),E(9,Je,4,0,"div",7)(10,Ke,4,0,"div",8)(11,Ze,4,2,"div",9),a(),r(12,"div",10,2),l(14,2),a()()}t&2&&(K("isOpen",i.isOpen),Y("disableOpenByClick",!0)("options",te(7,ze)),y(2),Q(i.readonly()?"readonly":""),y(4),b(i.selectMultiple()?6:i._displayValue()&&i.isSearchInput()&&!i.isOpen()||i._displayValue()&&!i.isSearchInput()?7:-1),y(3),b((i.inputValue()&&!i.isOpen()&&i.inputValue().length>0||i.selectedOption())&&!i.hideClearButton()?9:i.isSearchInput()&&!i.selectedOption()?10:11))},dependencies:[vt,ne,ft,Ce],encapsulation:2,changeDetection:0})}}return n})(),Xt=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=p(!1),this.isOpen=A(!1),this.type=p(""),this.dragImageElement=M.required("dragImageElement"),this.dragIsEnding=h(!1),this.dragIsOnScreen=h(!0),this.isDragging=h(!1),this.dragPositionX=h(0),this.dragActualPositionX=O(()=>{let e=this.dragPositionX(),t=.32;return e>this.openWidthTreshold?this.openWidthTreshold+(e-this.openWidthTreshold)*t:e}),this.draggingStyle=O(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=x(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(e){e.stopPropagation(),this.#e(e.clientX)}#e(e){this.isDragging.set(!1),e<=0?this.isOpen.set(!1):e>this.openWidthTreshold?this.isOpen.set(!0):e<this.openWidthTreshold&&(!this.isOpen()&&e<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(e){(e.clientX<0||!this.dragIsOnScreen())&&this.#e(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(e){e.preventDefault(),this.#i(e)}dragStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#i(e)}#i(e){e.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.clientX)}),this.#i(e)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0)}touchMove(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.touches[0].clientX)})}touchEnd(e){e.stopPropagation(),this.#e(e.changedTouches[0].clientX)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-sidenav"]],viewQuery:function(t,i){t&1&&F(i.dragImageElement,et,5),t&2&&H()},hostVars:10,hostBindings:function(t,i){t&2&&L("open",i.isOpen())("closed",!i.isOpen())("overlay",i.type()==="overlay")("simple",i.type()==="simple")("is-dragging",i.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:it,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","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,i){t&1&&(g(tt),E(0,nt,2,0,"div",1)(1,ot,1,0,"div",2),r(2,"div",3),l(3),a(),r(4,"div",4),E(5,st,1,0,"div",5),r(6,"div",6),l(7,1),a(),r(8,"main"),l(9,2),a()()),t&2&&(b(i.type()==="overlay"?0:-1),y(),b(i.type()==="overlay"&&i.isDragging()?1:-1),y(3),I("transform",i.draggingStyle()),y(),b(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var Gt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-stepper"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var Jt=(()=>{class n{constructor(){this.tableColumns=p([]),this.loading=p(!1),this.columnSizes=O(()=>this.tableColumns().reduce((e,t,i)=>i===this.tableColumns().length-1?`${e} max-content`:`${e} 1fr`,"")),this.data=p([]),this.dataChange=P(),this.#e=null,this.#i=h(!1),this.sortByColumn=A(null),this.e=x(()=>{let e=this.sortByColumn();if(e===null)return this.#i()||(this.#e=this.data(),this.#i.set(!0)),this.dataChange.emit(JSON.parse(JSON.stringify(this.#e)));let t=e.startsWith("-")?e.slice(1):e,i=e.startsWith("-"),o=this.data().sort((s,c)=>{let f=s[t],D=c[t],_=0;return typeof f=="number"&&typeof D=="number"&&(_=f-D),f instanceof Date&&D instanceof Date&&(_=f.getTime()-D.getTime()),typeof f=="string"&&typeof D=="string"&&(_=f.localeCompare(D,void 0,{sensitivity:"base"})),i?-_:_});this.dataChange.emit(o)})}#e;#i;toggleSort(e){let t=this.sortByColumn(),i=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-table"]],hostVars:2,hostBindings:function(t,i){t&2&&I("grid-template-columns",i.columnSizes())},inputs:{tableColumns:[1,"tableColumns"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:at,decls:6,vars:2,consts:[[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,i){t&1&&(g(rt),r(0,"thead"),l(1),E(2,lt,1,0,"spk-progress-bar",0),a(),r(3,"tbody"),l(4,1),a(),E(5,ct,2,0,"div",1)),t&2&&(y(2),b(i.loading()?2:-1),y(3),b(i.loading()?-1:5))},dependencies:[Ct],encapsulation:2,changeDetection:0})}}return n})(),Kt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-tabs"]],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(g(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var Zt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-toggle"]],ngContentSelectors:w,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,i){t&1&&(g(),r(0,"div",0),j(1,"div",1),a(),l(2))},encapsulation:2,changeDetection:0})}}return n})(),ei=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=p(!1),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.message=p.required(),this.isOpen=A(!1),this.closed=P(),this.triggerRef=M.required("triggerRef"),this.tooltipRef=M.required("tooltipRef"),this.id=h("--"+oe()),this.menuStyle=h(null),this.isCalculatingPosition=O(()=>{let e=this.tooltipRef()?.nativeElement;return this.isOpen()?(e?.showPopover(),!0):(e.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=x(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#i(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})}),this.scrollableStyles=["scroll","auto"]}#e;#i(e){let t=e.parentElement;for(;t;){if(this.scrollableStyles.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,D=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(D),this._right.set(f);else{if(this.above()){let _=e.top-t.height-this.#e;_>=0&&(c=_)}else D&&(c=e.top-t.height-this.#e);if(this.right()){let _=e.right-t.width;_>=0&&(s=_)}else f&&(c=D?e.top+e.height-t.height:e.top,s=e.left-t.width-this.#e);this.menuStyle.set({left:s+"px",top:c+"px"})}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=m({type:n,selectors:[["spk-tooltip"]],viewQuery:function(t,i){t&1&&(F(i.triggerRef,ve,5),F(i.tooltipRef,pt,5)),t&2&&H(2)},hostVars:6,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())("disabled",i.disabled())},inputs:{disabled:[1,"disabled"],above:[1,"above"],right:[1,"right"],message:[1,"message"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:w,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(t,i){if(t&1){let o=T();g(),r(0,"div",2,0),S("mouseover",function(){return d(o),u(i.isOpen.set(!0))})("mouseout",function(){return d(o),u(i.isOpen.set(!1))}),l(2),a(),r(3,"div",3,1),k(5),a()}t&2&&(I("anchor-name",i.id()),y(3),X(i.menuStyle()),I("position-anchor",i.id()),y(2),J(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})(),ti=(()=>{class n{constructor(){this.filesOver=h(!1),this.filesDropped=P()}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||n)}}static{this.\u0275dir=ce({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(t,i){t&1&&S("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),t&2&&L("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{ne as a,Ht as b,Bt as c,ut as d,Lt as e,Wt as f,ht as g,qt as h,Qt as i,ft as j,$t as k,vt as l,Ut as m,zt as n,Ct as o,Nt as p,ge as q,Yt as r,Xt as s,Gt as t,Jt as u,Kt as v,Zt as w,ei as x,ti as y};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-ERIN7FXX.js";import"./chunk-BUB2XBZH.js";import"./chunk-UI7YZPLW.js";import"./chunk-C6Q5SG76.js";export{a as DurationFormatPipe};
@@ -1 +1 @@
1
- import{T as r,Xa as s,g as a}from"./chunk-QPPZDOB4.js";var o=class n{#s=s(null);#e=s(!1);#n=window.self!==window.top;relayIsEnabled=this.#e.asReadonly();config=this.#s.asReadonly();configLoaded=this.#n?new a:null;isLoading=s(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.#e.set(!0),this.parentIframeListner=new AbortController,this.#t("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let i=e.data.replace("access:",""),t=JSON.parse(i);if(!t?.accessToken||!t?.clientId){this.#t("error:invalid-config"),this.#e.set(!1);return}if(typeof t.clientId!="string"){this.#t("error:invalid-config"),this.#e.set(!1);return}if(typeof t.accessToken!="string"){this.#t("error:invalid-config"),this.#e.set(!1);return}console.info("postMessage config set"),this.#s.set(t),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#t("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#t(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#s.set(e)}clearConfig(){this.#s.set(null)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=r({token:n,factory:n.\u0275fac,providedIn:"root"})};export{o as a};
1
+ import{T as r,Xa as s,g as a}from"./chunk-UI7YZPLW.js";var o=class n{#s=s(null);#e=s(!1);#n=window.self!==window.top;relayIsEnabled=this.#e.asReadonly();config=this.#s.asReadonly();configLoaded=this.#n?new a:null;isLoading=s(this.#n);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#i(),this.#n&&(this.#e.set(!0),this.parentIframeListner=new AbortController,this.#t("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let i=e.data.replace("access:",""),t=JSON.parse(i);if(!t?.accessToken||!t?.clientId){this.#t("error:invalid-config"),this.#e.set(!1);return}if(typeof t.clientId!="string"){this.#t("error:invalid-config"),this.#e.set(!1);return}if(typeof t.accessToken!="string"){this.#t("error:invalid-config"),this.#e.set(!1);return}console.info("postMessage config set"),this.#s.set(t),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#t("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#t(e){window.parent.postMessage(e,"*")}#i(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#s.set(e)}clearConfig(){this.#s.set(null)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=r({token:n,factory:n.\u0275fac,providedIn:"root"})};export{o as a};
@@ -1 +1 @@
1
- import{b as o}from"./chunk-YZWWCZIN.js";import{C as a,F as i,P as r,T as u,Xa as s,Z as n}from"./chunk-QPPZDOB4.js";var l=class p{#s=n(o);#p=null;#t=s([]);#e=s([]);#a=s(!1);#i=s(!1);#r=s(null);backups=this.#e.asReadonly();backupsLoading=this.#a.asReadonly();startingBackup=this.#i.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#t.asReadonly();addDraftBackup(t){let e=crypto.randomUUID();return this.#t.set([...this.#t(),{id:e,data:t}]),e}removeDraftBackupById(t){this.#t.set(this.#t().filter(e=>e.id!==t))}getBackupById(t){return this.#e().find(e=>e.Backup?.ID===t)??null}getBackups(t=!1){let e=this.#p,c=Date.now(),k=e&&c-e<15*60*1e3;!1||!t&&k&&this.#e().length||(this.#p=c,this.#a.set(!0),this.#s.getApiV1Backups().pipe(a(1),r(B=>this.#e.set(B)),i(()=>this.#a.set(!1))).subscribe())}startBackup(t){this.#i.set(!0),this.#s.postApiV1BackupByIdStart({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#i.set(!1))).subscribe()}deleteBackup(t){this.#r.set(t),this.#s.deleteApiV1BackupById({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#r.set(null))).subscribe()}static \u0275fac=function(e){return new(e||p)};static \u0275prov=u({token:p,factory:p.\u0275fac,providedIn:"root"})};export{l as a};
1
+ import{b as o}from"./chunk-3FAE4RKT.js";import{C as a,F as i,P as r,T as u,Xa as s,Z as n}from"./chunk-UI7YZPLW.js";var l=class p{#s=n(o);#p=null;#t=s([]);#e=s([]);#a=s(!1);#i=s(!1);#r=s(null);backups=this.#e.asReadonly();backupsLoading=this.#a.asReadonly();startingBackup=this.#i.asReadonly();deletingBackup=this.#r.asReadonly();draftBackups=this.#t.asReadonly();addDraftBackup(t){let e=crypto.randomUUID();return this.#t.set([...this.#t(),{id:e,data:t}]),e}removeDraftBackupById(t){this.#t.set(this.#t().filter(e=>e.id!==t))}getBackupById(t){return this.#e().find(e=>e.Backup?.ID===t)??null}getBackups(t=!1){let e=this.#p,c=Date.now(),k=e&&c-e<15*60*1e3;!1||!t&&k&&this.#e().length||(this.#p=c,this.#a.set(!0),this.#s.getApiV1Backups().pipe(a(1),r(B=>this.#e.set(B)),i(()=>this.#a.set(!1))).subscribe())}startBackup(t){this.#i.set(!0),this.#s.postApiV1BackupByIdStart({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#i.set(!1))).subscribe()}deleteBackup(t){this.#r.set(t),this.#s.deleteApiV1BackupById({id:t}).pipe(a(1),r(()=>this.getBackups()),i(()=>this.#r.set(null))).subscribe()}static \u0275fac=function(e){return new(e||p)};static \u0275prov=u({token:p,factory:p.\u0275fac,providedIn:"root"})};export{l as a};
@@ -1,2 +1,2 @@
1
- import{W as A}from"./chunk-QR6M6QC2.js";var p=":",v="|",S="@@",z="\u241F",L;function N(t){L??=new TextEncoder;let e=L.encode(t),n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=U(n,e.length,0),o=U(n,e.length,102072);return i==0&&(o==0||o==1)&&(i=i^319790063,o=o^-1801410264),BigInt.asUintN(32,BigInt(i))<<BigInt(32)|BigInt.asUintN(32,BigInt(o))}function k(t,e=""){let n=N(t);return e&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=N(e)),BigInt.asUintN(63,n).toString()}function U(t,e,n){let i=2654435769,o=2654435769,r=0,f=e-12;for(;r<=f;r+=12){i+=t.getUint32(r,!0),o+=t.getUint32(r+4,!0),n+=t.getUint32(r+8,!0);let s=E(i,o,n);i=s[0],o=s[1],n=s[2]}let a=e-r;return n+=e,a>=4?(i+=t.getUint32(r,!0),r+=4,a>=8?(o+=t.getUint32(r,!0),r+=4,a>=9&&(n+=t.getUint8(r++)<<8),a>=10&&(n+=t.getUint8(r++)<<16),a===11&&(n+=t.getUint8(r++)<<24)):(a>=5&&(o+=t.getUint8(r++)),a>=6&&(o+=t.getUint8(r++)<<8),a===7&&(o+=t.getUint8(r++)<<16))):(a>=1&&(i+=t.getUint8(r++)),a>=2&&(i+=t.getUint8(r++)<<8),a===3&&(i+=t.getUint8(r++)<<16)),E(i,o,n)[2]}function E(t,e,n){return t-=e,t-=n,t^=n>>>13,e-=n,e-=t,e^=t<<8,n-=t,n-=e,n^=e>>>13,t-=e,t-=n,t^=n>>>12,e-=n,e-=t,e^=t<<16,n-=t,n-=e,n^=e>>>5,t-=e,t-=n,t^=n>>>3,e-=n,e-=t,e^=t<<10,n-=t,n-=e,n^=e>>>15,[t,e,n]}function w(t,e,n,i,o=[]){let r={},f={},a={},s=b(t[0],t.raw[0]),c=[s.text],$=[],g=s.text;for(let l=1;l<t.length;l++){let{messagePart:I,placeholderName:d=P(l),associatedMessageId:T}=C(t[l],t.raw[l]);g+=`{$${d}}${I}`,e!==void 0&&(r[d]=e[l-1],f[d]=o[l-1]),$.push(d),T!==void 0&&(a[d]=T),c.push(I)}let x=s.customId||k(g,s.meaning||""),j=s.legacyIds?s.legacyIds.filter(l=>l!==x):[];return{id:x,legacyIds:j,substitutions:r,substitutionLocations:f,text:g,customId:s.customId,meaning:s.meaning||"",description:s.description||"",messageParts:c,messagePartLocations:i,placeholderNames:$,associatedMessageIds:a,location:n}}function b(t,e){let{text:n,block:i}=y(t,e);if(i===void 0)return{text:n};{let[o,...r]=i.split(z),[f,a]=o.split(S,2),[s,c]=f.split(v,2);return c===void 0&&(c=s,s=void 0),c===""&&(c=void 0),{text:n,meaning:s,description:c,customId:a,legacyIds:r}}}function C(t,e){let{text:n,block:i}=y(t,e);if(i===void 0)return{messagePart:n};{let[o,r]=i.split(S);return{messagePart:n,placeholderName:o,associatedMessageId:r}}}function y(t,e){if(e.charAt(0)!==p)return{text:t};{let n=B(t,e);return{block:t.substring(1,n),text:t.substring(n+1)}}}function P(t){return t===1?"PH":`PH_${t-1}`}function B(t,e){for(let n=1,i=1;n<t.length;n++,i++)if(e[i]==="\\")i++;else if(t[n]===p)return n;throw new Error(`Unterminated $localize metadata block in "${e}".`)}var m=class extends Error{parsedMessage;type="MissingTranslationError";constructor(e){super(`No translation found for ${D(e)}.`),this.parsedMessage=e}};function _(t,e,n){let i=w(e,n),o=t[i.id];if(i.legacyIds!==void 0)for(let r=0;r<i.legacyIds.length&&o===void 0;r++)o=t[i.legacyIds[r]];if(o===void 0)throw new m(i);return[o.messageParts,o.placeholderNames.map(r=>{if(i.substitutions.hasOwnProperty(r))return i.substitutions[r];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${D(i)}.
1
+ import{W as A}from"./chunk-DC7QVFBV.js";var p=":",v="|",S="@@",z="\u241F",L;function N(t){L??=new TextEncoder;let e=L.encode(t),n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=U(n,e.length,0),o=U(n,e.length,102072);return i==0&&(o==0||o==1)&&(i=i^319790063,o=o^-1801410264),BigInt.asUintN(32,BigInt(i))<<BigInt(32)|BigInt.asUintN(32,BigInt(o))}function k(t,e=""){let n=N(t);return e&&(n=BigInt.asUintN(64,n<<BigInt(1))|n>>BigInt(63)&BigInt(1),n+=N(e)),BigInt.asUintN(63,n).toString()}function U(t,e,n){let i=2654435769,o=2654435769,r=0,f=e-12;for(;r<=f;r+=12){i+=t.getUint32(r,!0),o+=t.getUint32(r+4,!0),n+=t.getUint32(r+8,!0);let s=E(i,o,n);i=s[0],o=s[1],n=s[2]}let a=e-r;return n+=e,a>=4?(i+=t.getUint32(r,!0),r+=4,a>=8?(o+=t.getUint32(r,!0),r+=4,a>=9&&(n+=t.getUint8(r++)<<8),a>=10&&(n+=t.getUint8(r++)<<16),a===11&&(n+=t.getUint8(r++)<<24)):(a>=5&&(o+=t.getUint8(r++)),a>=6&&(o+=t.getUint8(r++)<<8),a===7&&(o+=t.getUint8(r++)<<16))):(a>=1&&(i+=t.getUint8(r++)),a>=2&&(i+=t.getUint8(r++)<<8),a===3&&(i+=t.getUint8(r++)<<16)),E(i,o,n)[2]}function E(t,e,n){return t-=e,t-=n,t^=n>>>13,e-=n,e-=t,e^=t<<8,n-=t,n-=e,n^=e>>>13,t-=e,t-=n,t^=n>>>12,e-=n,e-=t,e^=t<<16,n-=t,n-=e,n^=e>>>5,t-=e,t-=n,t^=n>>>3,e-=n,e-=t,e^=t<<10,n-=t,n-=e,n^=e>>>15,[t,e,n]}function w(t,e,n,i,o=[]){let r={},f={},a={},s=b(t[0],t.raw[0]),c=[s.text],$=[],g=s.text;for(let l=1;l<t.length;l++){let{messagePart:I,placeholderName:d=P(l),associatedMessageId:T}=C(t[l],t.raw[l]);g+=`{$${d}}${I}`,e!==void 0&&(r[d]=e[l-1],f[d]=o[l-1]),$.push(d),T!==void 0&&(a[d]=T),c.push(I)}let x=s.customId||k(g,s.meaning||""),j=s.legacyIds?s.legacyIds.filter(l=>l!==x):[];return{id:x,legacyIds:j,substitutions:r,substitutionLocations:f,text:g,customId:s.customId,meaning:s.meaning||"",description:s.description||"",messageParts:c,messagePartLocations:i,placeholderNames:$,associatedMessageIds:a,location:n}}function b(t,e){let{text:n,block:i}=y(t,e);if(i===void 0)return{text:n};{let[o,...r]=i.split(z),[f,a]=o.split(S,2),[s,c]=f.split(v,2);return c===void 0&&(c=s,s=void 0),c===""&&(c=void 0),{text:n,meaning:s,description:c,customId:a,legacyIds:r}}}function C(t,e){let{text:n,block:i}=y(t,e);if(i===void 0)return{messagePart:n};{let[o,r]=i.split(S);return{messagePart:n,placeholderName:o,associatedMessageId:r}}}function y(t,e){if(e.charAt(0)!==p)return{text:t};{let n=B(t,e);return{block:t.substring(1,n),text:t.substring(n+1)}}}function P(t){return t===1?"PH":`PH_${t-1}`}function B(t,e){for(let n=1,i=1;n<t.length;n++,i++)if(e[i]==="\\")i++;else if(t[n]===p)return n;throw new Error(`Unterminated $localize metadata block in "${e}".`)}var m=class extends Error{parsedMessage;type="MissingTranslationError";constructor(e){super(`No translation found for ${D(e)}.`),this.parsedMessage=e}};function _(t,e,n){let i=w(e,n),o=t[i.id];if(i.legacyIds!==void 0)for(let r=0;r<i.legacyIds.length&&o===void 0;r++)o=t[i.legacyIds[r]];if(o===void 0)throw new m(i);return[o.messageParts,o.placeholderNames.map(r=>{if(i.substitutions.hasOwnProperty(r))return i.substitutions[r];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${D(i)}.
2
2
  The translation contains a placeholder with name ${r}, which does not exist in the message.`)})]}function F(t){let e=t.split(/{\$([^}]*)}/),n=[e[0]],i=[];for(let r=1;r<e.length-1;r+=2)i.push(e[r]),n.push(`${e[r+1]}`);let o=n.map(r=>r.charAt(0)===p?"\\"+r:r);return{text:t,messageParts:K(n,o),placeholderNames:i}}function K(t,e){return Object.defineProperty(t,"raw",{value:e}),t}function D(t){let e=t.meaning&&` - "${t.meaning}"`,n=t.legacyIds&&t.legacyIds.length>0?` [${t.legacyIds.map(i=>`"${i}"`).join(", ")}]`:"";return`"${t.id}"${n} ("${t.text}"${e})`}function M(t){$localize.translate||($localize.translate=G),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(t).forEach(e=>{$localize.TRANSLATIONS[e]=F(t[e])})}function G(t,e){try{return _($localize.TRANSLATIONS,t,e)}catch(n){return console.warn(n.message),[t,e]}}var u=function(t,...e){if(u.translate){let i=u.translate(t,e);t=i[0],e=i[1]}let n=O(t[0],t.raw[0]);for(let i=1;i<t.length;i++)n+=e[i-1]+O(t[i],t.raw[i]);return n},H=":";function O(t,e){return e.charAt(0)===H?t.substring(B(t,e)+1):t}globalThis.$localize=u;var h="en-US",V=["en-US","de-DE","fr-FR","da-DK"],R={"en-US":"en","da-DK":"da","de-DE":"de","fr-FR":"fr"},tt=[{value:"en-US",label:"English"},{value:"fr-FR",label:"French"},{value:"de-DE",label:"German"},{value:"da-DK",label:"Danish"}];function et(t){return t?R[t]??"en":"en"}function nt(){let t=localStorage.getItem("v1:duplicati:locale")||h,e=V.find(i=>i===t)??h,n=R[e];return e===h||(import(`/locale/angular/${n}.mjs`).then(i=>A(i.default)),fetch(`/locale/messages.${e}.json`).then(i=>i.json()).then(i=>{M(i.translations),u.locale=e})),e}export{tt as a,et as b,nt as c};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-7C6ILTIP.js";import"./chunk-DC7QVFBV.js";import"./chunk-UI7YZPLW.js";import"./chunk-C6Q5SG76.js";export{a as BytesPipe};
@@ -1 +1 @@
1
- import{a as se}from"./chunk-QR6M6QC2.js";import{Dc as Ae,Hc as Me,Jc as O,Kc as m,Q as j,Ra as o,S as f,T as ie,Tb as D,U as B,Ua as H,W as y,Xa as N,Z as Ve,da as I,eb as L,fb as l,g as _e,ha as S,hb as u,ja as De,k as ve,lb as be,ma as C,pc as p,q as ye,sa as U,ub as re,w as Ce}from"./chunk-QPPZDOB4.js";import{a as d,b as h}from"./chunk-C6Q5SG76.js";var Pe=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U))};static \u0275dir=l({type:n})}return n})(),ee=(()=>{class n extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),V=new y(""),rt={provide:V,useExisting:f(()=>st),multi:!0},st=(()=>{class n extends ee{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&D("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[p([rt]),u]})}return n})(),ot={provide:V,useExisting:f(()=>ke),multi:!0};function at(){let n=se()?se().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var lt=new y(""),ke=(()=>{class n extends Pe{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!at())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(lt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&D("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[p([ot]),u]})}return n})();function _(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Ge(n){return n!=null&&typeof n.length=="number"}var E=new y(""),F=new y(""),ut=/^(?=.{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])?)*$/,Ee=class{static min(t){return dt(t)}static max(t){return ct(t)}static required(t){return ht(t)}static requiredTrue(t){return ft(t)}static email(t){return pt(t)}static minLength(t){return gt(t)}static maxLength(t){return mt(t)}static pattern(t){return _t(t)}static nullValidator(t){return Re(t)}static compose(t){return Le(t)}static composeAsync(t){return We(t)}};function dt(n){return t=>{if(_(t.value)||_(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function ct(n){return t=>{if(_(t.value)||_(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ht(n){return _(n.value)?{required:!0}:null}function ft(n){return n.value===!0?null:{required:!0}}function pt(n){return _(n.value)||ut.test(n.value)?null:{email:!0}}function gt(n){return t=>_(t.value)||!Ge(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function mt(n){return t=>Ge(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function _t(n){if(!n)return Re;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(_(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Re(n){return null}function Te(n){return n!=null}function je(n){return be(n)?ve(n):n}function Be(n){let t={};return n.forEach(e=>{t=e!=null?d(d({},t),e):t}),Object.keys(t).length===0?null:t}function Ue(n,t){return t.map(e=>e(n))}function vt(n){return!n.validate}function He(n){return n.map(t=>vt(t)?t:e=>t.validate(e))}function Le(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){return Be(Ue(e,t))}}function $e(n){return n!=null?Le(He(n)):null}function We(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){let i=Ue(e,t).map(je);return Ce(i).pipe(ye(Be))}}function qe(n){return n!=null?We(He(n)):null}function Fe(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ze(n){return n._rawValidators}function Ze(n){return n._rawAsyncValidators}function oe(n){return n?Array.isArray(n)?n:[n]:[]}function W(n,t){return Array.isArray(n)?n.includes(t):n===t}function we(n,t){let e=oe(t);return oe(n).forEach(r=>{W(e,r)||e.push(r)}),e}function Ie(n,t){return oe(t).filter(e=>!W(n,e))}var q=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=$e(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=qe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},c=class extends q{name;get formDirective(){return null}get path(){return null}},g=class extends q{_parent=null;name=null;valueAccessor=null},z=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},yt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},hn=h(d({},yt),{"[class.ng-submitted]":"isSubmitted"}),fn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(g,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),pn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(c,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var x="VALID",$="INVALID",b="PENDING",P="DISABLED",v=class{},Z=class extends v{value;source;constructor(t,e){super(),this.value=t,this.source=e}},k=class extends v{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends v{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},A=class extends v{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ae=class extends v{source;constructor(t){super(),this.source=t}},le=class extends v{source;constructor(t){super(),this.source=t}};function ce(n){return(te(n)?n.validators:n)||null}function Ct(n){return Array.isArray(n)?$e(n):n||null}function he(n,t){return(te(t)?t.asyncValidators:n)||null}function Vt(n){return Array.isArray(n)?qe(n):n||null}function te(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Xe(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new j(1e3,"");if(!i[e])throw new j(1001,"")}function Ye(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new j(1002,"")})}var M=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=O(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===x}get invalid(){return this.status===$}get pending(){return this.status==b}get disabled(){return this.status===P}get enabled(){return this.status!==P}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new _e;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(we(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(we(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Ie(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Ie(t,this._rawAsyncValidators))}hasValidator(t){return W(this._rawValidators,t)}hasAsyncValidator(t){return W(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(h(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(h(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new k(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new k(!0,i))}markAsPending(t={}){this.status=b;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new A(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(h(d({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this.errors=null,this._forEachChild(r=>{r.disable(h(d({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,i)),this._events.next(new A(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(h(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=x,this._forEachChild(i=>{i.enable(h(d({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(h(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===x||this.status===b)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,e)),this._events.next(new A(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(h(d({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?P:x}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=b,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=je(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new A(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?P:this.errors?$:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(b)?b:this._anyControlsHaveStatus($)?$:x}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new k(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){te(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ct(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Vt(this._rawAsyncValidators)}},X=class extends M{constructor(t,e,i){super(ce(e),he(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Ye(this,!0,t),Object.keys(t).forEach(i=>{Xe(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var ue=class extends X{};var w=new y("CallSetDisabledState",{providedIn:"root",factory:()=>T}),T="always";function ne(n,t){return[...t.path,n]}function Y(n,t,e=T){fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),bt(n,t),Mt(n,t),At(n,t),Dt(n,t)}function K(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Q(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function J(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Dt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function fe(n,t){let e=ze(n);t.validator!==null?n.setValidators(Fe(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Ze(n);t.asyncValidator!==null?n.setAsyncValidators(Fe(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();J(t._rawValidators,r),J(t._rawAsyncValidators,r)}function Q(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return J(t._rawValidators,i),J(t._rawAsyncValidators,i),e}function bt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Ke(n,t)})}function At(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Ke(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Ke(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Mt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Et(n,t){n==null,fe(n,t)}function Ft(n,t){return Q(n,t)}function pe(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function wt(n){return Object.getPrototypeOf(n.constructor)===ee}function It(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function ge(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===ke?e=s:wt(s)?i=s:r=s}),r||i||e||null}function St(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Se(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ne(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var R=class extends M{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(ce(e),he(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),te(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ne(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Se(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Se(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ne(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Nt=n=>n instanceof R,Ot=(()=>{class n extends c{_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 ne(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var xt={provide:g,useExisting:f(()=>Pt)},Oe=Promise.resolve(),Pt=(()=>{class n extends g{_changeDetectorRef;callSetDisabledState;control=new R;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,it){super(),this._changeDetectorRef=a,this.callSetDisabledState=it,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ge(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),pe(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(){Y(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Oe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Me(i);Oe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ne(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(c,9),o(E,10),o(F,10),o(V,10),o(Ae,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[p([xt]),u,I]})}return n})(),mn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),kt={provide:V,useExisting:f(()=>Gt),multi:!0},Gt=(()=>{class n extends ee{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&D("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[p([kt]),u]})}return n})(),Rt={provide:V,useExisting:f(()=>jt),multi:!0};var Tt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),jt=(()=>{class n extends ee{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=Ve(w,{optional:!0})??T;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(Tt),o(De))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&D("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[p([Rt]),u]})}return n})();var me=new y(""),Bt={provide:g,useExisting:f(()=>Ut)},Ut=(()=>{class n extends g{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=ge(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&K(i,this,!1),Y(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}pe(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&K(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(V,10),o(me,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[p([Bt]),u,I]})}return n})(),Ht={provide:c,useExisting:f(()=>Je)},Je=(()=>{class n extends c{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=N(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Q(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Y(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){K(e.control||null,e,!1),St(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),It(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ae(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new le(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(K(i||null,e),Nt(r)&&(Y(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Et(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Ft(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){fe(this.form,this),this._oldForm&&Q(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&D("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[p([Ht]),u,I]})}return n})(),Lt={provide:c,useExisting:f(()=>Qe)},Qe=(()=>{class n extends Ot{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){tt(this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[p([Lt]),u]})}return n})(),$t={provide:c,useExisting:f(()=>et)},et=(()=>{class n extends c{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ne(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){tt(this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[p([$t]),u]})}return n})();function tt(n){return!(n instanceof Qe)&&!(n instanceof Je)&&!(n instanceof et)}var Wt={provide:g,useExisting:f(()=>qt)},qt=(()=>{class n extends g{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ge(this,s)}ngOnChanges(e){this._added||this._setUpControl(),pe(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 ne(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10),o(V,10),o(me,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[p([Wt]),u,I]})}return n})();var nt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({})}return n})(),de=class extends M{constructor(t,e,i){super(ce(e),he(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Ye(this,!1,t),t.forEach((i,r)=>{Xe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function xe(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var _n=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return xe(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new X(r,s)}record(e,i=null){let r=this._reduceControls(e);return new ue(r,i)}control(e,i,r){let s={};return this.useNonNullable?(xe(i)?s=i:(s.validators=i,s.asyncValidators=r),new R(e,h(d({},s),{nonNullable:!0}))):new R(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new de(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof R)return e;if(e instanceof M)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var vn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})(),yn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:me,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})();export{st as a,ke as b,Ee as c,fn as d,pn as e,R as f,Pt as g,mn as h,Gt as i,jt as j,Ut as k,Je as l,Qe as m,et as n,qt as o,_n as p,vn as q,yn as r};
1
+ import{a as se}from"./chunk-DC7QVFBV.js";import{Dc as Ae,Hc as Me,Jc as O,Kc as m,Q as j,Ra as o,S as f,T as ie,Tb as D,U as B,Ua as H,W as y,Xa as N,Z as Ve,da as I,eb as L,fb as l,g as _e,ha as S,hb as u,ja as De,k as ve,lb as be,ma as C,pc as p,q as ye,sa as U,ub as re,w as Ce}from"./chunk-UI7YZPLW.js";import{a as d,b as h}from"./chunk-C6Q5SG76.js";var Pe=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U))};static \u0275dir=l({type:n})}return n})(),ee=(()=>{class n extends Pe{static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),V=new y(""),rt={provide:V,useExisting:f(()=>st),multi:!0},st=(()=>{class n extends ee{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&D("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[p([rt]),u]})}return n})(),ot={provide:V,useExisting:f(()=>ke),multi:!0};function at(){let n=se()?se().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var lt=new y(""),ke=(()=>{class n extends Pe{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!at())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(lt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&D("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[p([ot]),u]})}return n})();function _(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Ge(n){return n!=null&&typeof n.length=="number"}var E=new y(""),F=new y(""),ut=/^(?=.{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])?)*$/,Ee=class{static min(t){return dt(t)}static max(t){return ct(t)}static required(t){return ht(t)}static requiredTrue(t){return ft(t)}static email(t){return pt(t)}static minLength(t){return gt(t)}static maxLength(t){return mt(t)}static pattern(t){return _t(t)}static nullValidator(t){return Re(t)}static compose(t){return Le(t)}static composeAsync(t){return We(t)}};function dt(n){return t=>{if(_(t.value)||_(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function ct(n){return t=>{if(_(t.value)||_(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function ht(n){return _(n.value)?{required:!0}:null}function ft(n){return n.value===!0?null:{required:!0}}function pt(n){return _(n.value)||ut.test(n.value)?null:{email:!0}}function gt(n){return t=>_(t.value)||!Ge(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function mt(n){return t=>Ge(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function _t(n){if(!n)return Re;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(_(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Re(n){return null}function Te(n){return n!=null}function je(n){return be(n)?ve(n):n}function Be(n){let t={};return n.forEach(e=>{t=e!=null?d(d({},t),e):t}),Object.keys(t).length===0?null:t}function Ue(n,t){return t.map(e=>e(n))}function vt(n){return!n.validate}function He(n){return n.map(t=>vt(t)?t:e=>t.validate(e))}function Le(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){return Be(Ue(e,t))}}function $e(n){return n!=null?Le(He(n)):null}function We(n){if(!n)return null;let t=n.filter(Te);return t.length==0?null:function(e){let i=Ue(e,t).map(je);return Ce(i).pipe(ye(Be))}}function qe(n){return n!=null?We(He(n)):null}function Fe(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function ze(n){return n._rawValidators}function Ze(n){return n._rawAsyncValidators}function oe(n){return n?Array.isArray(n)?n:[n]:[]}function W(n,t){return Array.isArray(n)?n.includes(t):n===t}function we(n,t){let e=oe(t);return oe(n).forEach(r=>{W(e,r)||e.push(r)}),e}function Ie(n,t){return oe(t).filter(e=>!W(n,e))}var q=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=$e(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=qe(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},c=class extends q{name;get formDirective(){return null}get path(){return null}},g=class extends q{_parent=null;name=null;valueAccessor=null},z=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},yt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},hn=h(d({},yt),{"[class.ng-submitted]":"isSubmitted"}),fn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(g,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),pn=(()=>{class n extends z{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(c,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&re("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var x="VALID",$="INVALID",b="PENDING",P="DISABLED",v=class{},Z=class extends v{value;source;constructor(t,e){super(),this.value=t,this.source=e}},k=class extends v{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},G=class extends v{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},A=class extends v{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ae=class extends v{source;constructor(t){super(),this.source=t}},le=class extends v{source;constructor(t){super(),this.source=t}};function ce(n){return(te(n)?n.validators:n)||null}function Ct(n){return Array.isArray(n)?$e(n):n||null}function he(n,t){return(te(t)?t.asyncValidators:n)||null}function Vt(n){return Array.isArray(n)?qe(n):n||null}function te(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Xe(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new j(1e3,"");if(!i[e])throw new j(1001,"")}function Ye(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new j(1002,"")})}var M=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return m(this.statusReactive)}set status(t){m(()=>this.statusReactive.set(t))}_status=O(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===x}get invalid(){return this.status===$}get pending(){return this.status==b}get disabled(){return this.status===P}get enabled(){return this.status!==P}errors;get pristine(){return m(this.pristineReactive)}set pristine(t){m(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return m(this.touchedReactive)}set touched(t){m(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new _e;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(we(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(we(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Ie(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Ie(t,this._rawAsyncValidators))}hasValidator(t){return W(this._rawValidators,t)}hasAsyncValidator(t){return W(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(h(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new G(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new G(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(h(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new k(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new k(!0,i))}markAsPending(t={}){this.status=b;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new A(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(h(d({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=P,this.errors=null,this._forEachChild(r=>{r.disable(h(d({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,i)),this._events.next(new A(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(h(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=x,this._forEachChild(i=>{i.enable(h(d({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(h(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===x||this.status===b)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Z(this.value,e)),this._events.next(new A(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(h(d({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?P:x}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=b,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=je(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new A(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new C,this.statusChanges=new C}_calculateStatus(){return this._allControlsDisabled()?P:this.errors?$:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(b)?b:this._anyControlsHaveStatus($)?$:x}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new k(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new G(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){te(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ct(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Vt(this._rawAsyncValidators)}},X=class extends M{constructor(t,e,i){super(ce(e),he(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){Ye(this,!0,t),Object.keys(t).forEach(i=>{Xe(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var ue=class extends X{};var w=new y("CallSetDisabledState",{providedIn:"root",factory:()=>T}),T="always";function ne(n,t){return[...t.path,n]}function Y(n,t,e=T){fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),bt(n,t),Mt(n,t),At(n,t),Dt(n,t)}function K(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Q(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function J(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Dt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function fe(n,t){let e=ze(n);t.validator!==null?n.setValidators(Fe(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Ze(n);t.asyncValidator!==null?n.setAsyncValidators(Fe(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();J(t._rawValidators,r),J(t._rawAsyncValidators,r)}function Q(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Ze(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return J(t._rawValidators,i),J(t._rawAsyncValidators,i),e}function bt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Ke(n,t)})}function At(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Ke(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function Ke(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Mt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Et(n,t){n==null,fe(n,t)}function Ft(n,t){return Q(n,t)}function pe(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function wt(n){return Object.getPrototypeOf(n.constructor)===ee}function It(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function ge(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===ke?e=s:wt(s)?i=s:r=s}),r||i||e||null}function St(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Se(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ne(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var R=class extends M{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(ce(e),he(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),te(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ne(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Se(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Se(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ne(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Nt=n=>n instanceof R,Ot=(()=>{class n extends c{_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 ne(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var xt={provide:g,useExisting:f(()=>Pt)},Oe=Promise.resolve(),Pt=(()=>{class n extends g{_changeDetectorRef;callSetDisabledState;control=new R;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new C;constructor(e,i,r,s,a,it){super(),this._changeDetectorRef=a,this.callSetDisabledState=it,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ge(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),pe(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(){Y(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){Oe.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Me(i);Oe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?ne(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(c,9),o(E,10),o(F,10),o(V,10),o(Ae,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[p([xt]),u,I]})}return n})(),mn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),kt={provide:V,useExisting:f(()=>Gt),multi:!0},Gt=(()=>{class n extends ee{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=S(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&D("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[p([kt]),u]})}return n})(),Rt={provide:V,useExisting:f(()=>jt),multi:!0};var Tt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),jt=(()=>{class n extends ee{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=Ve(w,{optional:!0})??T;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(o(H),o(U),o(Tt),o(De))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&D("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[p([Rt]),u]})}return n})();var me=new y(""),Bt={provide:g,useExisting:f(()=>Ut)},Ut=(()=>{class n extends g{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=ge(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&K(i,this,!1),Y(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}pe(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&K(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(V,10),o(me,8),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[p([Bt]),u,I]})}return n})(),Ht={provide:c,useExisting:f(()=>Je)},Je=(()=>{class n extends c{callSetDisabledState;get submitted(){return m(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=N(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new C;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Q(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Y(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){K(e.control||null,e,!1),St(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),It(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ae(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new le(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(K(i||null,e),Nt(r)&&(Y(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Et(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&Ft(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){fe(this.form,this),this._oldForm&&Q(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(o(E,10),o(F,10),o(w,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&D("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[p([Ht]),u,I]})}return n})(),Lt={provide:c,useExisting:f(()=>Qe)},Qe=(()=>{class n extends Ot{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){tt(this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[p([Lt]),u]})}return n})(),$t={provide:c,useExisting:f(()=>et)},et=(()=>{class n extends c{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ne(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){tt(this._parent)}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[p([$t]),u]})}return n})();function tt(n){return!(n instanceof Qe)&&!(n instanceof Je)&&!(n instanceof et)}var Wt={provide:g,useExisting:f(()=>qt)},qt=(()=>{class n extends g{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new C;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ge(this,s)}ngOnChanges(e){this._added||this._setUpControl(),pe(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 ne(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(c,13),o(E,10),o(F,10),o(V,10),o(me,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[p([Wt]),u,I]})}return n})();var nt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({})}return n})(),de=class extends M{constructor(t,e,i){super(ce(e),he(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){Ye(this,!1,t),t.forEach((i,r)=>{Xe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function xe(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var _n=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return xe(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new X(r,s)}record(e,i=null){let r=this._reduceControls(e);return new ue(r,i)}control(e,i,r){let s={};return this.useNonNullable?(xe(i)?s=i:(s.validators=i,s.asyncValidators=r),new R(e,h(d({},s),{nonNullable:!0}))):new R(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new de(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof R)return e;if(e instanceof M)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var vn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})(),yn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:me,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:w,useValue:e.callSetDisabledState??T}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=B({imports:[nt]})}return n})();export{st as a,ke as b,Ee as c,fn as d,pn as e,R as f,Pt as g,mn as h,Gt as i,jt as j,Ut as k,Je as l,Qe as m,et as n,qt as o,_n as p,vn as q,yn as r};
@@ -1 +1 @@
1
- import{a as ce}from"./chunk-NOXE2MQS.js";import{q as de}from"./chunk-OJRUAAHE.js";import{b as ae}from"./chunk-YZWWCZIN.js";import{a as pe,f as ue,l as he,m as _e,o as fe,w as ge}from"./chunk-LVAGIPHT.js";import{ia as le}from"./chunk-QR6M6QC2.js";import{Ab as Y,Bb as _,Cb as g,Db as Z,F as B,Gb as G,Hb as k,Jc as A,Lc as w,Pb as R,Qa as f,Qb as ee,Rb as te,Tb as N,Ub as p,Vb as ne,Wb as I,Xa as x,Ya as H,Z as D,db as K,dc as q,ea as F,ec as ie,fa as O,fc as X,gc as y,ic as oe,jb as v,qa as V,ra as C,rc as L,sb as j,sc as re,tb as U,ub as P,w as z,xb as b,xc as se,zb as J}from"./chunk-QPPZDOB4.js";import{a as W,b as $}from"./chunk-C6Q5SG76.js";var Pe=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=(r,t)=>t.id,Se=r=>({children:r,level:0}),me=r=>({$implicit:r}),Fe=(r,t)=>({children:r,level:t});function Oe(r,t){if(r&1){let e=k();_(0,"spk-button-group")(1,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("browse"))}),R(2,4),g(),_(3,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("path"))}),R(4,5),g()()}if(r&2){let e=p();f(),P("active",e.pathDiscoveryMethod()==="browse"),f(2),P("active",e.pathDiscoveryMethod()==="path")}}function Ne(r,t){r&1&&Z(0,"spk-progress-bar",9)}function ye(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder-open"),g())}function we(r,t){r&1&&(_(0,"spk-icon"),y(1,"file"),g())}function ke(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder"),g())}function Re(r,t){if(r&1&&v(0,ye,2,0,"spk-icon",16)(1,we,2,0,"spk-icon")(2,ke,2,0,"spk-icon",16),r&2){let e=p(2).$implicit;b(e.children.length?0:e.cls==="file"?1:2)}}function Ie(r,t){r&1&&(_(0,"spk-icon",16),y(1,"desktop-tower"),g())}function Le(r,t){r&1&&G(0)}function Ae(r,t){if(r&1&&v(0,Le,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let s=X(7);j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(5,me,re(2,Fe,e.children,n.level+1)))}}function We(r,t){if(r&1){let e=k();_(0,"div",14,3),N("click",function(){F(e);let s=p().$implicit,i=p(2);return O(i.toggleNode(s.id,s))}),_(2,"div",15),v(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),g(),_(5,"div",17),N("click",function(s){F(e);let i=p().$implicit,o=p(2);return O(o.toggleSelectedNode(s,i))}),y(6),g()(),v(7,Ae,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p(2);P("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),f(3),b(e.id!=="/"?3:4),f(3),oe(" ",e.text," "),f(),b(e.children.length>0?7:-1)}}function $e(r,t){if(r&1&&v(0,We,8,13),r&2){let e=t.$implicit,n=p(2);b(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Be(r,t){if(r&1&&(_(0,"spk-list"),J(1,$e,1,1,null,null,Me),g()),r&2){let e=t.$implicit;U("padding-left",e.level*.25,"rem"),f(),Y(e.children)}}function De(r,t){r&1&&G(0)}function Ve(r,t){if(r&1){let e=k();_(0,"spk-toggle",18),N("click",function(){F(e);let s=p();return O(s._showHiddenNodes.set(!s._showHiddenNodes()))}),R(1,6),g()}if(r&2){let e=p();P("active",e._showHiddenNodes()),f(),ee(e.showFiles()?"files":"folders"),te(1)}}var Ce=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Ce||{}),Q=class r{#t=D(ae);#r=D(ce);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPath=C(void 0);backupSettings=C(null);showHiddenNodes=C(!1);hideShortcuts=C(!1);includes=V();excludes=V();_showHiddenNodes=x(!1);treeContainerRef=H("treeContainer");formRef=H("formRef");pathDiscoveryMethod=x("browse");isLoading=x(!1);currentPath=x("/");#e=x(null);treeSearchQuery=x("");treeNodes=x([]);filterGroups=this.#r.filterGroups();isByBackupSettings=A(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ce;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let u=n[a].slice(1);if(u.startsWith("{")&&u.endsWith("}")){let h=u.slice(1,-1),d=this.filterGroups?.FilterGroups[h];if(d&&d.length){let T=d.map(E=>`-${E}`);n.splice(a,1,...T)}}}let s=this.searchableTreeNodes(),i=new Map,o=this.rootPath(),m=this.accepts(),l=o?{id:o,resolvedpath:o,text:o?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};m&&(l.accepted=!0),i.set("/",l);for(let a of s){let u=a.id.replace(o??"","").split("/").filter(Boolean),h="",d=l;for(let T of u){if(h+="/"+T,!i.has(h)){let E=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),M={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:E,parentPath:h,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":h,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};m&&(M.accepted=this.matchAccepts(m,M)),i.set(h,M),d.children.push(M)}d=i.get(h)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let i=0,o=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),m=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(o.length===0)return i;for(let l=0;l<o.length;l++){let a=o[l];if(e?.startsWith(a)){i=1;break}}if(m.length===0)return i;for(let l=0;l<m.length;l++){let a=m[l],c=a.slice(1),u=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){i=u==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){i=u==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),T=this.translateCSharpRegex(d);if(new RegExp(`${T}`).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,i,o)=>`(${o})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=w(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=w(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(i=>s.endsWith(i)):!1}currentPathEffect=w(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=w(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(console.log(t),this.currentPath.set(t),this.#p(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(o=>o!==""&&o!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):s.some(o=>o.startsWith(i))?this.currentPath.set(s.filter(o=>o!==i).join("\0")):this.currentPath.set([...s,i].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(o=>o.startsWith("-")).map(o=>o.slice(1,-1)),n=t.split("\0").filter(o=>!o.startsWith("-")).filter(Boolean),s=n.map(o=>o.split("/").filter(Boolean)),i=[this.rootPath()??"/"];s.forEach(o=>{o.forEach((m,l)=>{let a=o.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;i.includes(c)||i.push(c)})}),this.isLoading.set(!0),z([...i.map(o=>this.#i(o))]).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:o=>{this.treeNodes.update(m=>{let l=o.flatMap(c=>c.map(u=>{let h=u.id,d=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),E="/"+(h&&h.split("/").filter(Boolean).join("/")),M=n.findIndex(S=>this.multiSelect()?E.startsWith(S):E===S)>-1,Ee=n.findIndex(S=>S===h)>-1,ve=e.findIndex(S=>S===E)>-1;return $(W({},u),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:M&&!ve||Ee})})),a=[...new Map([...m,...l].map(c=>[c.resolvedpath??c.id,c])).values()];return this.#l(),a})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(o=>o!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let o=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return $(W({},l),{cls:a,parentPath:e})}),m=[...new Map([...i,...o].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=K({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(q(n.treeContainerRef,Pe,5),q(n.formRef,Te,5)),e&2&&ie(2)},hostVars:2,hostBindings:function(e,n){e&2&&P("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(ne(xe),v(0,Oe,5,4,"spk-button-group"),_(1,"div",7),I(2,0,["ngProjectAs","label",5,["label"]]),_(3,"div",8,0),v(5,Ne,1,0,"spk-progress-bar",9)(6,Be,3,2,"ng-template",null,1,se)(8,De,1,0,"ng-container",10),g(),v(9,Ve,2,3,"spk-toggle",11),g(),_(10,"div",12,2)(12,"spk-form-field"),I(13,1,["ngProjectAs","label",5,["label"]]),I(14,2,["ngProjectAs","input",5,["input"]]),g()()),e&2){let s=X(7);b(n.multiSelect()?-1:0),f(),P("hidden",n.pathDiscoveryMethod()!=="browse"),f(2),P("visualize-accepted",n.accepts()),f(2),b(n.isLoading()?5:-1),f(3),j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(13,me,L(11,Se,n.treeStructure()))),f(),b(n.accepts()?-1:9),f(),P("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ue,ge,pe,he,_e,fe,le,de],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Q as a};
1
+ import{a as ce}from"./chunk-TH3GTINR.js";import{q as de}from"./chunk-NXFYBS5S.js";import{b as ae}from"./chunk-3FAE4RKT.js";import{a as pe,f as ue,l as he,m as _e,o as fe,w as ge}from"./chunk-LEG3VUID.js";import{ia as le}from"./chunk-DC7QVFBV.js";import{Ab as Y,Bb as _,Cb as g,Db as Z,F as B,Gb as G,Hb as k,Jc as A,Lc as w,Pb as R,Qa as f,Qb as ee,Rb as te,Tb as N,Ub as p,Vb as ne,Wb as I,Xa as x,Ya as H,Z as D,db as K,dc as q,ea as F,ec as ie,fa as O,fc as X,gc as y,ic as oe,jb as v,qa as V,ra as C,rc as L,sb as j,sc as re,tb as U,ub as P,w as z,xb as b,xc as se,zb as J}from"./chunk-UI7YZPLW.js";import{a as W,b as $}from"./chunk-C6Q5SG76.js";var Pe=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=(r,t)=>t.id,Se=r=>({children:r,level:0}),me=r=>({$implicit:r}),Fe=(r,t)=>({children:r,level:t});function Oe(r,t){if(r&1){let e=k();_(0,"spk-button-group")(1,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("browse"))}),R(2,4),g(),_(3,"button",13),N("click",function(){F(e);let s=p();return O(s.pathDiscoveryMethod.set("path"))}),R(4,5),g()()}if(r&2){let e=p();f(),P("active",e.pathDiscoveryMethod()==="browse"),f(2),P("active",e.pathDiscoveryMethod()==="path")}}function Ne(r,t){r&1&&Z(0,"spk-progress-bar",9)}function ye(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder-open"),g())}function we(r,t){r&1&&(_(0,"spk-icon"),y(1,"file"),g())}function ke(r,t){r&1&&(_(0,"spk-icon",16),y(1,"folder"),g())}function Re(r,t){if(r&1&&v(0,ye,2,0,"spk-icon",16)(1,we,2,0,"spk-icon")(2,ke,2,0,"spk-icon",16),r&2){let e=p(2).$implicit;b(e.children.length?0:e.cls==="file"?1:2)}}function Ie(r,t){r&1&&(_(0,"spk-icon",16),y(1,"desktop-tower"),g())}function Le(r,t){r&1&&G(0)}function Ae(r,t){if(r&1&&v(0,Le,1,0,"ng-container",10),r&2){let e=p(2).$implicit,n=p().$implicit;p();let s=X(7);j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(5,me,re(2,Fe,e.children,n.level+1)))}}function We(r,t){if(r&1){let e=k();_(0,"div",14,3),N("click",function(){F(e);let s=p().$implicit,i=p(2);return O(i.toggleNode(s.id,s))}),_(2,"div",15),v(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),g(),_(5,"div",17),N("click",function(s){F(e);let i=p().$implicit,o=p(2);return O(o.toggleSelectedNode(s,i))}),y(6),g()(),v(7,Ae,1,7,"ng-container")}if(r&2){let e=p().$implicit,n=p(2);P("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),f(3),b(e.id!=="/"?3:4),f(3),oe(" ",e.text," "),f(),b(e.children.length>0?7:-1)}}function $e(r,t){if(r&1&&v(0,We,8,13),r&2){let e=t.$implicit,n=p(2);b(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Be(r,t){if(r&1&&(_(0,"spk-list"),J(1,$e,1,1,null,null,Me),g()),r&2){let e=t.$implicit;U("padding-left",e.level*.25,"rem"),f(),Y(e.children)}}function De(r,t){r&1&&G(0)}function Ve(r,t){if(r&1){let e=k();_(0,"spk-toggle",18),N("click",function(){F(e);let s=p();return O(s._showHiddenNodes.set(!s._showHiddenNodes()))}),R(1,6),g()}if(r&2){let e=p();P("active",e._showHiddenNodes()),f(),ee(e.showFiles()?"files":"folders"),te(1)}}var Ce=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Ce||{}),Q=class r{#t=D(ae);#r=D(ce);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPath=C(void 0);backupSettings=C(null);showHiddenNodes=C(!1);hideShortcuts=C(!1);includes=V();excludes=V();_showHiddenNodes=x(!1);treeContainerRef=H("treeContainer");formRef=H("formRef");pathDiscoveryMethod=x("browse");isLoading=x(!1);currentPath=x("/");#e=x(null);treeSearchQuery=x("");treeNodes=x([]);filterGroups=this.#r.filterGroups();isByBackupSettings=A(()=>this.rootPath()&&this.backupSettings()?.id&&this.backupSettings()?.time);searchableTreeNodes=A(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ce;treeStructure=A(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let u=n[a].slice(1);if(u.startsWith("{")&&u.endsWith("}")){let h=u.slice(1,-1),d=this.filterGroups?.FilterGroups[h];if(d&&d.length){let T=d.map(E=>`-${E}`);n.splice(a,1,...T)}}}let s=this.searchableTreeNodes(),i=new Map,o=this.rootPath(),m=this.accepts(),l=o?{id:o,resolvedpath:o,text:o?.replaceAll("/",""),parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};m&&(l.accepted=!0),i.set("/",l);for(let a of s){let u=a.id.replace(o??"","").split("/").filter(Boolean),h="",d=l;for(let T of u){if(h+="/"+T,!i.has(h)){let E=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),M={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:E,parentPath:h,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":h,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};m&&(M.accepted=this.matchAccepts(m,M)),i.set(h,M),d.children.push(M)}d=i.get(h)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let i=0,o=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),m=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(o.length===0)return i;for(let l=0;l<o.length;l++){let a=o[l];if(e?.startsWith(a)){i=1;break}}if(m.length===0)return i;for(let l=0;l<m.length;l++){let a=m[l],c=a.slice(1),u=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){i=u==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){i=u==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),T=this.translateCSharpRegex(d);if(new RegExp(`${T}`).test(e)){i=u==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){i=u==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,i,o)=>`(${o})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=w(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=w(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(i=>s.endsWith(i)):!1}currentPathEffect=w(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=w(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(console.log(t),this.currentPath.set(t),this.#p(t)):this.#o(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(o=>o!==""&&o!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):s.some(o=>o.startsWith(i))?this.currentPath.set(s.filter(o=>o!==i).join("\0")):this.currentPath.set([...s,i].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(o=>o!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#o(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id,time:e.time,prefixOnly:!1,folderContents:!0};return t&&(n.filter="@"+t),this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(o=>o.startsWith("-")).map(o=>o.slice(1,-1)),n=t.split("\0").filter(o=>!o.startsWith("-")).filter(Boolean),s=n.map(o=>o.split("/").filter(Boolean)),i=[this.rootPath()??"/"];s.forEach(o=>{o.forEach((m,l)=>{let a=o.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;i.includes(c)||i.push(c)})}),this.isLoading.set(!0),z([...i.map(o=>this.#i(o))]).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:o=>{this.treeNodes.update(m=>{let l=o.flatMap(c=>c.map(u=>{let h=u.id,d=h&&h.split("/").filter(Boolean).slice(0,-1).join("/"),E="/"+(h&&h.split("/").filter(Boolean).join("/")),M=n.findIndex(S=>this.multiSelect()?E.startsWith(S):E===S)>-1,Ee=n.findIndex(S=>S===h)>-1,ve=e.findIndex(S=>S===E)>-1;return $(W({},u),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:M&&!ve||Ee})})),a=[...new Map([...m,...l].map(c=>[c.resolvedpath??c.id,c])).values()];return this.#l(),a})}})}#o(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(o=>o!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let o=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return $(W({},l),{cls:a,parentPath:e})}),m=[...new Map([...i,...o].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=K({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(q(n.treeContainerRef,Pe,5),q(n.formRef,Te,5)),e&2&&ie(2)},hostVars:2,hostBindings:function(e,n){e&2&&P("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(ne(xe),v(0,Oe,5,4,"spk-button-group"),_(1,"div",7),I(2,0,["ngProjectAs","label",5,["label"]]),_(3,"div",8,0),v(5,Ne,1,0,"spk-progress-bar",9)(6,Be,3,2,"ng-template",null,1,se)(8,De,1,0,"ng-container",10),g(),v(9,Ve,2,3,"spk-toggle",11),g(),_(10,"div",12,2)(12,"spk-form-field"),I(13,1,["ngProjectAs","label",5,["label"]]),I(14,2,["ngProjectAs","input",5,["input"]]),g()()),e&2){let s=X(7);b(n.multiSelect()?-1:0),f(),P("hidden",n.pathDiscoveryMethod()!=="browse"),f(2),P("visualize-accepted",n.accepts()),f(2),b(n.isLoading()?5:-1),f(3),j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(13,me,L(11,Se,n.treeStructure()))),f(),b(n.accepts()?-1:9),f(),P("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ue,ge,pe,he,_e,fe,le,de],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:.25rem;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:var(--base-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Q as a};