@duplicati/ngclient 0.0.119 → 0.0.121
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.
- package/{chunk-WZRSQ7XL.js → chunk-2CXHZS6X.js} +1 -1
- package/{chunk-3KUVV3SB.js → chunk-2XYBW2LY.js} +1 -1
- package/{chunk-GYUN7KFJ.js → chunk-3UPH6V5C.js} +1 -1
- package/{chunk-KHGD372Q.js → chunk-43BIRTPL.js} +1 -1
- package/{chunk-NPZU4SBS.js → chunk-45N5IP3N.js} +1 -1
- package/{chunk-2GE6FFGI.js → chunk-4DR45FFH.js} +1 -1
- package/{chunk-4RIDBZOK.js → chunk-4HPQY7IN.js} +1 -1
- package/chunk-4KE2I7OA.js +7 -0
- package/{chunk-NF3MS2YP.js → chunk-4V45XF67.js} +1 -1
- package/{chunk-CH7FSO4Y.js → chunk-5C7A7QU6.js} +1 -1
- package/{chunk-XWF632WO.js → chunk-65U4B3NQ.js} +1 -1
- package/{chunk-4FUHLIJW.js → chunk-6B67AJC3.js} +1 -1
- package/{chunk-A6XWHATE.js → chunk-6DNRCK5D.js} +1 -1
- package/{chunk-HTX2RSBS.js → chunk-6EWRKJSC.js} +1 -1
- package/chunk-6LCXRM3A.js +1 -0
- package/chunk-7BATQNXR.js +1 -0
- package/chunk-7DNC2MPD.js +1 -0
- package/chunk-7GXTLCJB.js +1 -0
- package/{chunk-65UN5LE6.js → chunk-7V4TPS4B.js} +1 -1
- package/{chunk-5ENRUF35.js → chunk-ABANCAM5.js} +1 -1
- package/{chunk-WU3ALGNP.js → chunk-BLKMQJR5.js} +1 -1
- package/{chunk-7NBGN46A.js → chunk-C5X6HJ3T.js} +1 -1
- package/chunk-CZDE5P4F.js +1 -0
- package/chunk-DLJSVAM2.js +1 -0
- package/{chunk-HFNFJ7G2.js → chunk-DYTQQHMA.js} +1 -1
- package/{chunk-M3WT5B3C.js → chunk-EBXJGPRA.js} +1 -1
- package/{chunk-UXUVYBYP.js → chunk-ED7PHXLX.js} +1 -1
- package/{chunk-CZUGA62N.js → chunk-ERHGJIOQ.js} +1 -1
- package/{chunk-AL5KGNEF.js → chunk-ESAGJOZZ.js} +1 -1
- package/{chunk-LDJVMU7P.js → chunk-FP6LM56A.js} +1 -1
- package/{chunk-3XVU2YA6.js → chunk-FQ55IACT.js} +1 -1
- package/{chunk-ZQSBINUM.js → chunk-FSKPPAVO.js} +1 -1
- package/chunk-FWQNZX5S.js +1 -0
- package/chunk-FY7G24UA.js +1 -0
- package/{chunk-RHII5WE3.js → chunk-GQGMGFDX.js} +1 -1
- package/chunk-GUKBMCIX.js +1 -0
- package/chunk-HIW2CN45.js +1 -0
- package/{chunk-2SQBD7LN.js → chunk-IVGY6D4N.js} +1 -1
- package/{chunk-K5C3JCVH.js → chunk-KAFLAM3J.js} +1 -1
- package/{chunk-T6KX6ACI.js → chunk-KPH4ZAFT.js} +1 -1
- package/{chunk-3AIKVVWP.js → chunk-LUKUBN2Z.js} +1 -1
- package/{chunk-LJDOQTEF.js → chunk-M5RL4LRX.js} +1 -1
- package/{chunk-CPTR6AJI.js → chunk-MO2LFPIR.js} +1 -1
- package/{chunk-DX6BDDDV.js → chunk-MOSJ6KI7.js} +1 -1
- package/{chunk-FRSQ5NDX.js → chunk-N5FH4YAX.js} +1 -1
- package/{chunk-4YUBZYBH.js → chunk-O7TLFEOP.js} +1 -1
- package/chunk-OAWADV5X.js +1 -0
- package/{chunk-2P3DXYGR.js → chunk-OQPUBCLB.js} +1 -1
- package/chunk-PDODLSPH.js +1 -0
- package/{chunk-AACJQG7X.js → chunk-PSVKQSIF.js} +1 -1
- package/{chunk-RLUT4FSI.js → chunk-QMFHJSCY.js} +1 -1
- package/{chunk-TCDECRYI.js → chunk-QUOBR5MG.js} +1 -1
- package/chunk-QXUYK52Y.js +1 -0
- package/{chunk-X6PSFVBL.js → chunk-S75WBVE3.js} +1 -1
- package/{chunk-BAX2AJJJ.js → chunk-SFV445TF.js} +1 -1
- package/{chunk-6KSS7VQS.js → chunk-SIHNMW2E.js} +1 -1
- package/chunk-SPAJFGWZ.js +1 -0
- package/{chunk-4LLC3Q7O.js → chunk-SX2OA5DO.js} +1 -1
- package/chunk-T5WAKBP3.js +1 -0
- package/{chunk-OEIF7NQ5.js → chunk-T7QZL5YJ.js} +1 -1
- package/{chunk-SSJ4VQB4.js → chunk-TCEYGZ6D.js} +1 -1
- package/chunk-U4XTHU5I.js +1 -0
- package/chunk-U7YVVKGQ.js +1 -0
- package/{chunk-XR4SRVOQ.js → chunk-UEYPJIJG.js} +1 -1
- package/chunk-UI4M5G5W.js +1 -0
- package/{chunk-ELZWH543.js → chunk-URJQR7VG.js} +1 -1
- package/{chunk-YY3JAYQZ.js → chunk-UTNP2VHH.js} +1 -1
- package/{chunk-Q6M5VRZV.js → chunk-V7XW25LT.js} +1 -1
- package/chunk-VPTXHYYV.js +6 -0
- package/chunk-VTTBYFSH.js +1 -0
- package/chunk-VYAA7G37.js +1 -0
- package/{chunk-TJJORMQV.js → chunk-VZBWK3XF.js} +1 -1
- package/chunk-W66AXGSW.js +1 -0
- package/{chunk-YW5R7NEG.js → chunk-WOTGLW6Y.js} +1 -1
- package/{chunk-5LKXKKAK.js → chunk-WRKRV6RQ.js} +1 -1
- package/chunk-XATCN7MB.js +1 -0
- package/{chunk-OHZGASM5.js → chunk-XHPURHO2.js} +1 -1
- package/{chunk-VGAQB3OD.js → chunk-XUPWJEL7.js} +1 -1
- package/{chunk-B3WLZK7W.js → chunk-XWYNCG3P.js} +1 -1
- package/chunk-YUZKJZ22.js +1 -0
- package/chunk-YZDNOP4R.js +1 -0
- package/index.html +1 -1
- package/main-DG325IZ3.js +1 -0
- package/package.json +1 -1
- package/chunk-3GGSYR5J.js +0 -1
- package/chunk-6WZGDK7U.js +0 -1
- package/chunk-ADO3ABTT.js +0 -1
- package/chunk-AHUC7M75.js +0 -7
- package/chunk-B64M2BXZ.js +0 -1
- package/chunk-CRJHIWSF.js +0 -1
- package/chunk-DCYB2NQH.js +0 -1
- package/chunk-G5CT45UH.js +0 -1
- package/chunk-HHSMSBNM.js +0 -1
- package/chunk-HXN7IX3Q.js +0 -1
- package/chunk-JRZGF4BZ.js +0 -1
- package/chunk-KBJGYXKV.js +0 -1
- package/chunk-KYQWUXYN.js +0 -1
- package/chunk-MUBWT5H2.js +0 -1
- package/chunk-PHIZVVHX.js +0 -1
- package/chunk-PKRMVTCU.js +0 -1
- package/chunk-QVNFX6ZC.js +0 -1
- package/chunk-RKAIZDDW.js +0 -1
- package/chunk-RSZISHXB.js +0 -1
- package/chunk-RXHYUPYG.js +0 -6
- package/chunk-UABJ67OY.js +0 -1
- package/chunk-W4RKRM2O.js +0 -1
- package/chunk-WFM6YWRN.js +0 -1
- package/chunk-Z45ZPMZS.js +0 -1
- package/chunk-ZHMYBX5F.js +0 -1
- package/main-PDJMO4FF.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ia as ze}from"./chunk-M3WT5B3C.js";import{$a as U,Ab as ge,Bb as ve,Cb as Ce,Db as a,Eb as c,Fb as q,Ib as ie,Ic as qe,Jb as z,Pc as D,Qc as R,Sc as xe,T as pe,Ta as Pe,Ua as m,Vb as E,W as Ie,Wa as oe,Wb as f,Xb as x,Ya as me,Yb as h,Z as b,_a as Ae,a as Me,aa as Re,ab as Fe,bb as A,ca as Ve,ea as k,fa as y,fc as Be,gb as S,gc as N,hc as Y,ib as se,ic as We,jc as _,ka as de,kc as _e,la as ue,lb as O,lc as K,mc as re,oc as Se,pc as ke,qa as he,qb as He,qc as ye,ra as X,rc as ae,sa as g,sc as J,ta as H,tb as Le,tc as B,ua as fe,ub as G,va as C,vb as j,vc as De,wb as I,wc as le,xb as je,yb as Q,zb as T}from"./chunk-AHUC7M75.js";import{a as $,b as Z,c as Te}from"./chunk-7CGTOI24.js";var L=["*"],Ke=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Je=["[icon]","[title]","*","[content]"];function Ze(n,d){n&1&&(a(0,"spk-icon",3),_(1,"info"),c())}function et(n,d){n&1&&(a(0,"spk-icon",3),_(1,"info"),c())}function tt(n,d){n&1&&(a(0,"spk-icon",3),_(1,"warning"),c())}function it(n,d){n&1&&(a(0,"spk-icon",3),_(1,"warning-octagon"),c())}function nt(n,d){n&1&&(a(0,"spk-icon",3),_(1,"check-circle"),c())}function ot(n,d){n&1&&(a(0,"spk-icon",3),_(1,"question"),c())}function st(n,d){if(n&1){let t=z();a(0,"spk-icon",7),E("click",function(){k(t);let i=f();return y(i.removeAlert())}),_(1,"plus"),c()}}var rt=["dialogRef"];function at(n,d){if(n&1){let t=z();a(0,"div",4),E("click",function(){k(t);let i=f();return y(i.isOpen.set(!1))}),c()}}var lt=["spk-button",""];var ct=["triggerRef"],pt=["popoverRef"],dt=[[["","trigger",""]],"*"],ut=["[trigger]","*"];var ht=()=>({closeOnButton:!1,closeOnEsc:!0});var ft=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],mt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],Ue=["input"],gt=[[["label"]]],vt=["label"];function Ct(n,d){if(n&1&&(a(0,"div",3),_(1),c()),n&2){let t=f();m(),_e(t.files()[0].name)}}function _t(n,d){if(n&1&&(a(0,"div",3),_(1),c()),n&2){let t=f();m(),K("",t.files().length," files selected")}}function St(n,d){if(n&1&&(a(0,"div",4),_(1),c()),n&2){let t=f();m(),_e(t.filesOver()?t.overlayText():t.placeholder())}}var kt=["optionsRef"],yt=["*",[["","menu",""]]],Dt=["*","[menu]"];function xt(n,d){n&1&&(a(0,"spk-icon",5),_(1,"caret-down"),c())}var wt=[[["label"]],[["input","type","range"]]],bt=["label","input[type=range]"],Ot=["optionsWrap"],Et=[[["label"]],[["input"]],[["textarea"]]],Tt=["label","input","textarea"],Mt=()=>({closeOnButton:!1,closeOnEsc:!1}),be=n=>({$implicit:n});function It(n,d){if(n&1&&_(0),n&2){let t=f();K(" ",t.inputValue()," ")}}function Rt(n,d){n&1&&ie(0)}function Vt(n,d){if(n&1&&O(0,Rt,1,0,"ng-container",13),n&2){let t=f(3).$implicit;f(2);let e=B(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function Pt(n,d){if(n&1&&_(0),n&2){let t=f(3).$implicit,e=f(2);K(" ",e.getLabel(t)," ")}}function At(n,d){if(n&1){let t=z();a(0,"spk-chip",11),O(1,Vt,1,4,"ng-container")(2,Pt,1,1),a(3,"spk-icon",12),E("click",function(i){k(t);let o=f(2).$index,s=f(2);return y(s.removeSelectedOptionByIndex(i,o))}),_(4,"x-bold"),c()()}if(n&2){let t=f(4),e=B(6);Q(t.selectClasses()),m(),T(e?1:2)}}function Ft(n,d){n&1&&ie(0)}function Ht(n,d){if(n&1&&O(0,Ft,1,0,"ng-container",13),n&2){let t=f(4).$implicit;f(2);let e=B(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function Lt(n,d){if(n&1&&_(0),n&2){let t=f(4).$implicit,e=f(2);K(" ",e.getLabel(t)," ")}}function jt(n,d){if(n&1&&O(0,Ht,1,4,"ng-container")(1,Lt,1,1),n&2){f(5);let t=B(6);T(t?0:1)}}function Bt(n,d){if(n&1&&O(0,jt,2,1),n&2){f(4);let t=B(9);T(t?-1:0)}}function Wt(n,d){if(n&1&&O(0,At,5,3,"spk-chip",10)(1,Bt,1,1),n&2){f(3);let t=B(8);T(t?0:1)}}function qt(n,d){if(n&1&&O(0,Wt,2,1),n&2){let t=d.$implicit;T(t?0:-1)}}function zt(n,d){if(n&1&&ve(0,qt,1,1,null,null,ge),n&2){f();let t=B(4);Ce(t)}}function Ut(n,d){n&1&&ie(0)}function Nt(n,d){if(n&1&&O(0,Ut,1,0,"ng-container",14),n&2){f(2);let t=B(0);G("ngTemplateOutlet",t)}}function $t(n,d){if(n&1&&_(0),n&2){let t,e=f(2);K(" ",(t=e.placeholderText())!==null&&t!==void 0?t:""," ")}}function Qt(n,d){if(n&1&&O(0,Nt,1,1,"ng-container")(1,$t,1,1),n&2){f();let t=B(0);T(t?0:1)}}function Yt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),c())}function Xt(n,d){n&1&&q(0,"spk-spinner",7)}function Gt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"list-magnifying-glass"),c())}function Kt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"magnifying-glass"),c())}function Jt(n,d){if(n&1){let t=z();a(0,"spk-icon",15),E("click",function(i){k(t);let o=f();return y(o.clear(i))}),_(1,"x-bold"),c()}}function Zt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),c())}function ei(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-up"),c())}function ti(n,d){if(n&1&&q(0,"spk-checkbox"),n&2){let t=f().$index,e=f();Q(e.selectClasses()),I("active",e.isSelected(t))}}function ii(n,d){n&1&&ie(0)}function ni(n,d){if(n&1&&O(0,ii,1,0,"ng-container",13),n&2){let t=f().$implicit;f();let e=B(7);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function oi(n,d){if(n&1&&_(0),n&2){let t=f().$implicit,e=f();K(" ",e.getLabel(t)," ")}}function si(n,d){if(n&1){let t=z();a(0,"li",16),E("click",function(){let i=k(t).$index,o=f();return y(o.toggleOptionByIndex(i))}),O(1,ti,1,4,"spk-checkbox",17)(2,ni,1,4,"ng-container")(3,oi,1,1),c()}if(n&2){let t=d.$index,e=f(),i=B(7);I("selected",e.isSelected(t))("focused",t===e.focusedOptionIndex()),m(),T(e.selectMultiple()?1:-1),m(),T(i?2:3)}}var ri=["dragImageElement"],ai=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],li=["[sidenav]","[sidenav-closed-topbar]","*"];function ci(n,d){n&1&&q(0,"div",1,0)}function pi(n,d){if(n&1){let t=z();a(0,"div",7),E("drop",function(i){k(t);let o=f();return y(o.drop(i))})("dragover",function(i){k(t);let o=f();return y(o.dragOver(i))})("dragenter",function(){k(t);let i=f();return y(i.dragEnter())})("dragleave",function(){k(t);let i=f();return y(i.dragLeave())}),c()}}function di(n,d){if(n&1){let t=z();a(0,"div",8),E("dragstart",function(i){k(t);let o=f();return y(o.dragStart(i))})("dragend",function(i){k(t);let o=f();return y(o.dragEnd(i))})("drag",function(i){k(t);let o=f();return y(o.drag(i))})("touchstart",function(i){k(t);let o=f();return y(o.touchStart(i))})("touchmove",function(i){k(t);let o=f();return y(o.touchMove(i))})("touchend",function(i){k(t);let o=f();return y(o.touchEnd(i))})("touchcancel",function(i){k(t);let o=f();return y(o.touchCancel(i))}),c()}}var ui=["thead"],hi=[[["","table-header",""]],"*",[["","table-no-rows",""]]],fi=["[table-header]","*","[table-no-rows]"];function mi(n,d){n&1&&q(0,"spk-progress-bar",1)}function gi(n,d){n&1&&(a(0,"div",2),h(1,2),c())}var vi=[[["","title",""]],"*"],Ci=["[title]","*"];function _i(n,d){n&1&&_(0,"Title")}function Si(n,d){n&1&&(a(0,"spk-icon",1),_(1,"caret-down"),c())}var we=["bold","thin","light","fill"],te=(()=>{class n{#e=b(H);get currentClass(){let t=this.#e.nativeElement.innerText;for(let e=0;e<we.length;e++)if(t.endsWith(we[e]))return we[e];return""}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(e,i){e&2&&Q(i.currentClass)},ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ji=(()=>{class n{constructor(){this._el=b(H),this.alertService=g(null),this.id=g(null),this.alertClasses=D(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Je,decls:18,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(e,i){if(e&1&&(x(Ke),a(0,"div",1)(1,"div",2,0),h(3),c(),a(4,"div",2),ae(5),O(6,Ze,2,0,"spk-icon",3)(7,et,2,0,"spk-icon",3)(8,tt,2,0,"spk-icon",3)(9,it,2,0,"spk-icon",3)(10,nt,2,0,"spk-icon",3)(11,ot,2,0,"spk-icon",3),c(),a(12,"div",4),h(13,1),h(14,2),c(),O(15,st,2,0,"spk-icon",5),a(16,"div",6),h(17,3),c()()),e&2){let o=We(2);m(),j("display",o.children.length?"block":"none");let s=i.alertClasses();m(5),T(s.includes("primary")?6:s.includes("accent")?7:s.includes("warn")?8:s.includes("error")?9:s.includes("success")?10:11),m(9),T(i.id()?15:-1)}},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})();function Oe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Zi=(()=>{class n{constructor(){this.alertHistory=C([]),this.alertHistoryIsOpen=C(!1),this.alertHistoryIsHidden=C(!0)}error(t){this.addAlert({type:"error",title:t??"An error occured"})}success(t){this.addAlert({type:"success",title:t})}question(t){this.addAlert({type:"question",title:t})}warning(t){this.addAlert({type:"warn",title:t})}info(t){this.addAlert({type:"primary",title:t})}addAlert(t){let e=Oe();this.alertHistory.update(i=>[Z($({},t),{isOpen:!0,animateIn:!0,animateOut:!1,id:e}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>Z($({},o),{animateIn:o.id===e?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(e)},2500)}removeAlert(t){this.alertHistory.update(e=>e.map(i=>Z($({},i),{animateOut:i.id===t?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(e=>e.filter(i=>i.id!==t))},300)}hideAlert(t){this.alertHistory.update(e=>e.map(i=>Z($({},i),{isOpen:i.id===t?!1:i.isOpen})))}setHidden(t){this.alertHistoryIsHidden.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=pe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ce=new Ie("Sparkle UI Config"),ki={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},yi=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.dialogRef=U("dialogRef"),this.isOpen=A(!1),this.options=g(),this.closed=X(),this.defaultOptionMerge=D(()=>$(Z($({},ki),{class:this.#e?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=R(()=>{let t=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(t?.showModal(),t?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",e=>{e.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&e.preventDefault(),e.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),t?.close())})}#e;ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-dialog"]],viewQuery:function(e,i){e&1&&N(i.dialogRef,rt,5),e&2&&Y()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:L,decls:6,vars:11,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(e,i){if(e&1&&(x(),ae(0),a(1,"dialog",1,0)(3,"div",2),h(4),c(),O(5,at,1,0,"div",3),c()),e&2){let o,s,r,p,l=i.defaultOptionMerge();m(),Q(l.class),j("width",(o=l.width)!==null&&o!==void 0?o:"")("max-width",(s=l.maxWidth)!==null&&s!==void 0?s:"")("max-height",(r=l.maxHeight)!==null&&r!==void 0?r:"")("height",(p=l.height)!==null&&p!==void 0?p:""),m(4),T(i.defaultOptionMerge().closeOnOutsideClick?5:-1)}},encapsulation:2,changeDetection:0})}}return n})(),en=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=b(He),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(t,e){let i=this.#i.injector,o=this.#t(),P=e||{},{data:s,closed:r}=P,p=Te(P,["data","closed"]);this.compRef&&this.#n(),this.insertedCompRef=xe(t,{environmentInjector:i}),this.compRef=xe(yi,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let l=this.insertedCompRef.instance?.data,u=this.insertedCompRef.instance?.closed;if(s){if(fe(l))this.insertedCompRef.setInput("data",s);else if(!fe(l))throw new Error("data is not an input signal on the passed component")}u instanceof he&&(this.closedFieldSub=u.subscribe((...F)=>{r?.(...F),this.#n()})),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",p),this.compRef.instance.closed.subscribe(()=>V());let w=this;function V(){u&&u instanceof he?u.emit(!1):r?.(void 0),w.#n()}return{component:this.insertedCompRef.instance,close:V}}#t(){let t=document.createElement("spk-dialog-ref");return t.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(t),document.getElementById("spk-dialog-ref")}#n(){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.#n()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=pe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),tn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-button-group"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Di=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["","spk-button",""]],attrs:lt,ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),nn=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.class=C(this.#e?.cardType??"default")}#e;static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-card"]],hostVars:2,hostBindings:function(e,i){e&2&&Q(i.class())},ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),xi=(()=>{class n{#e=b(H);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-checkbox"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:L,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(e,i){e&1&&(x(),a(0,"div",0)(1,"spk-icon",1),_(2,"check"),c(),a(3,"spk-icon",2),_(4,"minus"),c()(),h(5))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),wi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-chip"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var bi=["scroll","auto"],Oi={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Ne=(()=>{class n{constructor(){this.#e=b(qe),this.#i=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=g(!1),this.right=g(!1),this.markForCheck=g(null),this._above=C(this.above()),this._right=C(this.right()),this.disableOpenByClick=g(!1),this.isOpen=A(!1),this.options=g(),this.closed=X(),this.defaultOptionMerge=D(()=>$($({},Oi),this.options())),this.triggerRef=U.required("triggerRef"),this.popoverRef=U.required("popoverRef"),this.id=C("--"+Oe()),this.menuStyle=C(null),this.openAbort=null,this.openEffect=R(()=>{let t=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};t?.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.#t(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#n(),i),window.addEventListener("resize",()=>this.#n(),i),this.#n()})}else t.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=R(()=>{this.markForCheck()&&this.#e.markForCheck()})}#e;#i;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}#t(t){let e=t.parentElement;for(;e;){if(bi.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}#n(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=t.left,o=t.bottom,s=i,r=o+this.#i,p=s+e.width>window.innerWidth,l=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(l),this._right.set(p);else{if(s=i,r=o+this.#i,l){let w=t.top-e.height-this.#i;w<0||(r=w)}p&&(s=t.right-e.width,s<0&&(s=0));let u={left:s+"px",top:r+"px"};this.menuStyle.set(u)}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-popover"]],viewQuery:function(e,i){e&1&&(N(i.triggerRef,ct,5),N(i.popoverRef,pt,5)),e&2&&Y(2)},hostVars:4,hostBindings:function(e,i){e&2&&I("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ut,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(e,i){if(e&1){let o=z();x(dt),a(0,"div",2,0),E("click",function(r){return k(o),y(i.toggleIsOpen(r))}),a(2,"div",3),h(3),c(),a(4,"button",4),_(5,"Open popover"),c()(),a(6,"div",5,1)(8,"div",6),E("click",function(r){return k(o),y(i.isOpen()&&i.eventClose(r))}),c(),h(9,1),c()}e&2&&(j("anchor-name",i.id()),m(6),je(i.menuStyle()),j("position-anchor",i.id()))},dependencies:[Di],encapsulation:2,changeDetection:0})}}return n})();var on=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-divider"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ee=(()=>{class n{#e=b(H);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 t=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!t&&e!==null){let s=function(){e.style.height="auto",e.style.height=e.scrollHeight+"px"},r=function(){window.setTimeout(s,0)};var i=s,o=r;e.addEventListener("change",s),e.addEventListener("cut",r),e.addEventListener("paste",r),e.addEventListener("drop",r),e.addEventListener("keydown",r),e.focus(),e.select(),s()}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-form-field"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:mt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(e,i){e&1&&(x(ft),h(0),a(1,"div",0)(2,"div",1),h(3,1),h(4,2),c(),h(5,3),h(6,4),a(7,"div",2),h(8,5),h(9,6),c()(),a(10,"div",3)(11,"div",4),h(12,7),c(),a(13,"div",5),h(14,8),c()())},encapsulation:2,changeDetection:0})}}return n})(),sn=(()=>{class n{constructor(){this._el=b(H),this.inputRef=U.required("input"),this.filesOver=C(!1),this.multiple=g(),this.accept=g(null),this.placeholder=A("Click or drag files here"),this.overlayText=g("Drop files here"),this.files=A([]),this.fileUploadClasses=D(()=>this._el.nativeElement.classList.toString()),this.inputEffect=R(()=>{let t=this.inputRef().nativeElement;t&&(t.placeholder&&this.placeholder.set(t.placeholder),t.addEventListener("dragover",e=>{e.preventDefault(),this.filesOver.set(!0)}),t.addEventListener("dragleave",e=>{e.preventDefault(),this.filesOver.set(!1)}),t.addEventListener("drop",e=>{e.preventDefault(),this.filesOver.set(!1);let i=e.dataTransfer?.files;i&&i.length>0&&(this.handleFileUpload(Array.from(i)),t.files=i)}),t.addEventListener("change",e=>{e.preventDefault(),this.handleFileUpload(Array.from(e.target.files))}))})}handleFileUpload(t){this.multiple()?this.files.update(e=>[...e,...t]):this.files.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-file-upload"]],viewQuery:function(e,i){e&1&&N(i.inputRef,Ue,5),e&2&&Y()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:vt,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(e,i){e&1&&(x(gt),a(0,"spk-form-field"),h(1,0,["ngProjectAs","label",5,["label"]]),a(2,"div",2,0),O(4,Ct,2,1,"div",3)(5,_t,2,1,"div",3)(6,St,2,1,"div",4),q(7,"input",5,1)(9,"div",6),c(),a(10,"spk-icon",7),_(11,"upload-simple"),c()()),e&2&&(Q(i.fileUploadClasses()),m(4),T(i.files().length===1?4:i.files().length>1?5:6),m(3),Le("multiple",i.multiple())("accept",i.accept()),m(2),I("files-over",i.filesOver()))},dependencies:[Ee,te],encapsulation:2,changeDetection:0})}}return n})(),rn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-list"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();function $e(n,d){let t=d?.injector||(Ve($e),b(de)),{debounce:e=0,initialValue:i=void 0,transform:o=v=>v,compare:s=(v,M)=>v===M,forceType:r=void 0,returnPreviousValue:p=!0}=d||{},l=C(i),u=t.get(ue),w=D(()=>{let v=n()?.nativeElement;if(v instanceof HTMLInputElement||v instanceof HTMLTextAreaElement)return Ye(v)}),V=!1,P,F=null;return R(()=>{let v=w();if(!v)return l.set(p&&P?o(P):void 0);i!==void 0&&v.value===""?l.set(i):v.value!==""&&ne();let M=W=>{F!==null&&clearTimeout(F),F=setTimeout(()=>{F=null,ne()},e)};v.addEventListener("input",M),v.addEventListener("inputValueChanged",M),u.onDestroy(()=>{v.removeEventListener("input",M),v.removeEventListener("inputValueChanged",M),F!==null&&clearTimeout(F)})},{injector:t}),R(()=>{let v=w();if(!v)return;let M=l()??"",W=M==null?"":String(M);v.value!==W&&(P=W,v.value=W,v.dispatchEvent(new Event("input")))},{injector:t}),l;function ne(){if(!V){V=!0;try{let v=w();if(!v)return;let M=v.value,W=r?Xe(M,r):o(M);P=M,s(l(),W)||l.set(W)}finally{V=!1}}}function Ye(v){return Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(M){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,M);let Ge=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:M}});return this.dispatchEvent(Ge),M}}),v}function Xe(v,M){switch(M){case"string":return v.toString();case"number":let W=Number(v);return isNaN(W)?void 0:W;case"boolean":return v.toLowerCase()==="true"?!0:v.toLowerCase()==="false"?!1:void 0;default:return v}}}function Qe(n,d){let t=b(de),e=t.get(ue),i=C([]),o=null,s=null,r=(l,u)=>{s&&s.disconnect();let w=Array.from(l.nativeElement.querySelectorAll(u.join(",")));i.set(w),s=new MutationObserver(V=>{requestAnimationFrame(()=>{let P=Array.from(l.nativeElement.querySelectorAll(u.join(",")));i.set(P)})}),s.observe(l.nativeElement,{childList:!0,subtree:!0}),e.onDestroy(()=>p())};o=R(()=>{let l=typeof n=="function"&&n[Me]?n():n,u=typeof d=="function"?d():d;l&&u?.length>0?r(l,u):(i.set([]),s&&(s.disconnect(),s=null))},{injector:t});function p(){o&&o.destroy(),s&&s.disconnect()}return{signal:i.asReadonly(),destroy:p}}var an=(()=>{class n{constructor(){this.#e=b(me),this.above=g(!1),this.right=g(!1),this.openIndicator=g(!1),this.disabled=g(!1),this.customOptionElementSelectors=g(["button"]),this.keepClickedOptionActive=g(!1),this.closeOnClick=g(!0),this.isOpen=A(!1),this.closed=X(),this.searchable=g(!1),this.activeOptionIndex=C(-1),this.inputRef=U("input"),this.optionsRef=U("optionsRef"),this.options=Qe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=D(()=>this.options.signal().filter(t=>!t.disabled)),this.inputValue=$e(this.inputRef),this.abortController=null,this.optionsEffect=R(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",i=>{let o=i.target,s=this.activeElements();if(!s.length){let p=this.optionsEl();this.activeElements.set(p),s=p}let r=s.findIndex(p=>p===o);r>-1&&(this.activeOptionIndex.set(r),t.focus())}),t.addEventListener("keydown",e=>{let i=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):e.key==="Enter"?(e.preventDefault(),i>-1&&(this.activeElements()[i].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=C([]),this.lastInputValue="",this.inputValueEffect=R(()=>{if(!this.searchable())return;let e=(this.inputValue()??"").toLowerCase();if(this.#t(),!e||e==="")return;let i=this._lastElementList.length&&e.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=e;for(let o=0;o<i.length;o++){let s=i[o],r=s.textContent?.toLowerCase()||"",p=this.#i(r,e);s.value=p}i=i.filter(o=>o.value>0).sort((o,s)=>s.value-o.value);for(let o=0;o<i.length;o++)this.#e.setStyle(i[o],"order",o);this.activeElements.set(i),this._lastElementList=i}),this.activeOptionIndexEffect=R(()=>{let t=this.activeElements(),e=this.activeOptionIndex();for(let i=0;i<t.length;i++)t[i].classList.remove("active");e>-1&&(t[e].scrollIntoView({block:"center"}),t[e].classList.add("active"))})}#e;#i(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let p=0;p<e.length;p++){let l=e[p];if(t.length>o+1&&t[o+1]===l)i+=p===0?100:150,o++,s++;else{let u=t.indexOf(l,o+1);if(p>0&&(r=!1),u===-1)return 0;i+=100,o=u,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}nextActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===-1||t===e.length-1)return 0;let i=t+1;return e[i].disabled?this.nextActiveIndex(i):i}prevActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===0||t===-1)return e.length-1;let i=t-1;return e[i].disabled?this.prevActiveIndex(i):i}close(t="closed",e){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#t(),this.isOpen.set(!1),this.closed.emit(t==="active"))}#t(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let e=0;e<t.length;e++)t[e].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-menu"]],viewQuery:function(e,i){e&1&&(N(i.inputRef,Ue,5),N(i.optionsRef,kt,5)),e&2&&Y(2)},hostVars:4,hostBindings:function(e,i){e&2&&I("disabled",i.disabled())("has-search",i.searchable())},inputs:{above:[1,"above"],right:[1,"right"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Dt,decls:12,vars:13,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(e,i){if(e&1){let o=z();x(yt),a(0,"spk-popover",3,0),ye("isOpenChange",function(r){return k(o),ke(i.isOpen,r)||(i.isOpen=r),y(r)}),E("closed",function(){return k(o),y(i.close("fromPopover"))}),a(2,"div",4),E("click",function(){return k(o),y(!i.disabled()&&i.isOpen.set(!0))}),h(3),O(4,xt,2,0,"spk-icon",5),c(),a(5,"div",6)(6,"spk-form-field",7),q(7,"input",8,1),c()(),a(9,"div",9,2),E("click",function(){return k(o),y(i.close("active"))}),h(11,1),c()()}e&2&&(Se("isOpen",i.isOpen),G("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",De(12,ht)),m(2),I("is-open",i.isOpen()),m(2),T(i.openIndicator()?4:-1),m(2),I("hidden",i.searchable()===!1),m(3),I("searching",i.searchable()&&i.inputValue()!==""))},dependencies:[Ne,Ee,te],encapsulation:2,changeDetection:0})}}return n})(),Ei=(()=>{class n{constructor(){this.value=g(void 0)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(e,i){e&1&&q(0,"div",0),e&2&&j("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),ln=(()=>{class n{#e=b(H);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-radio"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:L,decls:2,vars:0,consts:[[1,"radio"]],template:function(e,i){e&1&&(x(),q(0,"div",0),h(1))},encapsulation:2,changeDetection:0})}}return n})(),cn=(()=>{class n{constructor(){this.#e=b(H),this.#i=null,this.#t=null,this.#n=0,this.alwaysShowThumb=g(!1),this.unit=g(""),this.value=A(this.#n),this.inputState=C({min:0,max:100,step:1}),this.valuePercentage=D(()=>{let{min:t,max:e}=this.inputState(),i=this.value()??t;if(isNaN(i))return 0;let o=e-t;if(o===0)return 0;let s=(i-t)/o*100;return Math.max(0,Math.min(100,s))}),this.trackFilledPercentage=D(()=>this.valuePercentage()),this.thumbPositionPercentage=D(()=>this.valuePercentage()),this.syncModelToInputEffect=R(()=>{let t=this.value();if(this.#t){let e=parseFloat(this.#t.value);(isNaN(e)||String(e)!==String(t))&&(this.#t.value=String(t))}})}#e;#i;#t;#n;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#a(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",t=>{this.setNewInputValue(t.detail.value)}),queueMicrotask(()=>this.#s(!0)),this.#o()):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(t){let e=parseFloat(t??"0");if(!isNaN(e)){let{min:i,max:o}=this.inputState();this.value.set(Math.max(i,Math.min(o,e)))}}trackEvent(t){if(!this.#t||this.#t.readOnly||this.#t.disabled){t.preventDefault(),t.stopPropagation();return}if(t.target===this.#t||t.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let i=t.currentTarget.getBoundingClientRect(),o=t.clientX-i.left,s=i.width,{min:r,max:p,step:l}=this.inputState(),u=p-r;if(s>0&&u!==0&&l>0){let V=(o/s*u+r-r)/l,P=r+Math.round(V)*l,F=this.#r(l);P=parseFloat(P.toFixed(F));let ne=Math.max(r,Math.min(p,P));this.value.set(ne)}}#s(t=!1){if(!this.#t)return;let e=parseFloat(this.#t.min??"0")??0,i=parseFloat(this.#t.max??"100")??100,o=this.#t.step,s=1;if(o&&o.toLowerCase()!=="any"){let p=parseFloat(o);!isNaN(p)&&p>0&&(s=p)}this.inputState.set({min:e,max:i,step:s});let r=parseFloat(this.#t.value??String(e))??e;if(t&&this.value()!==this.#n){let p=this.value(),l=Math.max(e,Math.min(i,p));r!==l&&(this.#t.value=String(l)),p!==l&&this.value.set(l)}else{let p=Math.max(e,Math.min(i,r));this.value()!==p&&this.value.set(p)}}#o(){if(!this.#t||typeof MutationObserver>"u")return;let t=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(e=>{let i=!1;for(let o of e)if(o.type==="attributes"&&t.includes(o.attributeName??"")){i=!0;break}i&&this.#s(!1)}),this.#i.observe(this.#t,{attributes:!0})}#r(t){if(isNaN(t)||Math.floor(t)===t)return 0;let i=t.toString().split(".")[1];return i?i.length:0}#a(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(e,i){e&2&&I("has-input",i.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:bt,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(e,i){e&1&&(x(wt),a(0,"div",0),h(1),c(),a(2,"div",1)(3,"div",2),_(4),c(),a(5,"div",3),E("click",function(s){return i.trackEvent(s)}),h(6,1),a(7,"div",4),q(8,"div",5),c(),a(9,"div",6)(10,"div",7)(11,"div",8),_(12),c()()()(),a(13,"div",9),_(14),c()()),e&2&&(m(4),re("",i.inputState().min,"",i.unit(),""),m(4),j("width",i.trackFilledPercentage(),"%"),m(),j("left",i.thumbPositionPercentage(),"%"),m(),I("always-show",i.alwaysShowThumb()),m(2),re("",i.value(),"",i.unit(),""),m(2),re("",i.inputState().max,"",i.unit(),""))},encapsulation:2,changeDetection:0})}}return n})(),Ti=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0})}}return n})(),pn=(()=>{class n{constructor(){this.#e=b(H),this.value=g(),this.label=g(),this.asFreeText=g(!1),this.placeholder=g(),this.readonly=A(!1),this.disabled=A(!1),this.lazySearch=g(!1),this.inlineSearch=g(!1),this.asText=g(!1),this.isClearable=g(!0),this.selectMultiple=g(!1),this.optionTemplate=g(null),this.selectedOptionTemplate=g(null),this.placeholderTemplate=g(null),this.isOpen=A(!1),this.isLoading=A(!1),this.options=A([]),this.selectedOptions=A([]),this.cleared=X(),this.inlineTemplate=Fe(oe),this.optionsWrapRef=U.required("optionsWrap"),this.inputRefInput=C(null),this.#i=typeof MutationObserver<"u"&&new MutationObserver(t=>{for(var e of t)e&&(e.target.nodeName==="INPUT"||e.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new H(e.target)),this.#i.disconnect())}),this.inputValue=C(""),this.prevInputValue=C(null),this.focusedOptionIndex=C(-1),this._isClearable=D(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=D(()=>this.#e.nativeElement.classList.toString()),this.stretch=D(()=>this.selectClasses().includes("stretch")),this.placeholderText=D(()=>{let t=this.placeholder(),e=this.inputRefEl();return t||e?.placeholder||null}),this.selectedOptionValues=D(()=>{let t=this.selectedOptions(),e=this.value();return e?t.map(i=>this.#o(i,e)):t}),this.filteredOptions=D(()=>{let t=this.options()||[],e=this.label(),i=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),r=this.#a(s);if(t.length<=0)return[];if(!o||s==="")return t;let l=t.filter(u=>{let w=e?(this.#o(u,e)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),V=((i?this.#o(u,i):u)??"").toString().toLowerCase(),P=r.test(w),F=r.test(V);return P||F}).map(u=>{let w=e?(this.#o(u,e)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),V=((i?this.#o(u,i):u)??"").toString().toLowerCase(),P=this.#t(w,s),F=this.#t(V,s);return{item:u,score:Math.max(P,F)}});return l.sort((u,w)=>w.score-u.score),l.map(u=>u.item)}),this.inputRefEl=D(()=>{let t=this.inputRefInput();if(t===null)return;let e=t?t.nativeElement:null;return e?(e.autocomplete="off",this.#r(e),e.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&e.addEventListener("input",i=>{let o=i.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue())}),e.addEventListener("inputValueChanged",i=>{let o=i.detail.value,s=this.inputValue();if(o!==s){if(o===""){this.clear();return}this.setSelectedOptionsFromValue(o),this.setInputValueFromSelectedOptions(),this.#s()}}),e):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=R(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let e=this.inputRefEl();if(!e)return;e.addEventListener("keydown",i=>{if((i.key==="Escape"||i.key==="Tab")&&(i.preventDefault(),this.close()),(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),i.key==="ArrowDown"){i.preventDefault();let o=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(o>this.filteredOptions().length-1?0:o)}if(i.key==="ArrowUp"){i.preventDefault();let o=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(o<0?this.filteredOptions().length-1:o)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=R(()=>{let t=this.inputValue();this._inputValue=t}),this.inputRefElEffect=R(()=>{let t=this.inputRefEl();t&&t.value!==this._inputValue&&(this.disabled.set(t.disabled),this.setSelectedOptionsFromValue(t.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=D(()=>{let t=this.selectedOptions();return this.label()?t.map(i=>this.getLabel(i)).join(", "):t.join(", ")}),this.inputState=D(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=D(()=>this.inlineSearch()||this.lazySearch()),this.#n=R(()=>{if(this.selectMultiple()&&this.hasSearch())return;let t=this.selectedOptions(),e=this.value(),i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i)})}#e;#i;#t(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let p=0;p<e.length;p++){let l=e[p];if(t.length>o+1&&t[o+1]===l)i+=p===0?100:150,o++,s++;else{let u=t.indexOf(l,o+1);if(p>0&&(r=!1),u===-1)return 0;i+=100,o=u,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}#n;ngOnInit(){this.setInitInput()}setInitInput(){let t=this.#e.nativeElement.querySelector("input");if(t){this.inputRefInput.set(new H(t));return}let e=this.#e.nativeElement.querySelector("textarea");if(e){this.inputRefInput.set(new H(e));return}typeof MutationObserver<"u"&&this.#i.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(t){let e=this.options()||[],i=this.value(),o=this.selectMultiple(),s=t.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let r=o?s:[s[0]],p=e.filter(l=>{let u=i?this.#o(l,i)?.toString():l?.toString();return u&&r.includes(u)});this.selectedOptions.set(o?p:[p[0]])}setInputValueFromSelectedOptions(){let t=this.selectedOptions(),e=this.value();if(t.length===0){this.inputValue.set(""),this.updateInputElValue();return}let i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i),this.updateInputElValue()}getLabel(t){let e=this.label();return e?this.#o(t,e):t}toggleOptionByIndex(t,e){let i=this.filteredOptions()[t];if(this.asFreeText()&&t===-1||!i){this.close();return}e&&e.stopPropagation();let o=this.selectMultiple(),s=this._isClearable(),r=this.value(),p=this.selectedOptionValues(),l=r?this.#o(i,r):i;this.prevInputValue.set(null),this.selectedOptions.update(u=>{let w=p.indexOf(l);if(w>-1){let V=[...u.slice(0,w),...u.slice(w+1)];return s||V.length>0?V:u}else return this.focusedOptionIndex.set(t),o?[...u,i]:[i]}),o?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),o&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(t,e){t.stopPropagation(),this.selectedOptions.update(i=>[...i.slice(0,e),...i.slice(e+1)]),this.setInputValueFromSelectedOptions()}isSelected(t){let e=this.value(),i=this.filteredOptions()[t],o=e?this.#o(i,e):i;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||this.#s())}#s(){let t=this.selectedOptionValues()[0],e=this.value();if(t){let i=this.filteredOptions().findIndex(o=>e?this.#o(o,e)===t:o===t);this.focusedOptionIndex.set(i)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let t=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&t&&(this.inputValue.set(t),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(t){t?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let t=this.inputRefEl(),e=this.inputValue();t&&(t.value=e,t.dispatchEvent(new Event("input")))}#o(t,e){return e.split(".").reduce((i,o)=>i?.[o],t)}#r(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}#a(t){let e=(t??"").toLowerCase(),i="^";for(let o of e)i+=".*"+this.#l(o);return i+=".*$",new RegExp(i,"i")}#l(t){return t.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#i.disconnect()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-select"]],contentQueries:function(e,i,o){e&1&&Be(o,i.inlineTemplate,oe,5),e&2&&Y()},viewQuery:function(e,i){e&1&&N(i.optionsWrapRef,Ot,5),e&2&&Y()},hostVars:2,hostBindings:function(e,i){e&2&&I("multiple",i.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:Tt,decls:32,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(e,i){if(e&1){let o=z();x(Et),ae(0)(1)(2)(3)(4)(5)(6)(7)(8)(9),a(10,"spk-popover",2,0),ye("isOpenChange",function(r){return k(o),ke(i.isOpen,r)||(i.isOpen=r),y(r)}),E("closed",function(){return k(o),y(i.close())}),a(12,"spk-form-field",3),E("click",function(){return k(o),y(i.open())}),h(13,0,["ngProjectAs","label",5,["label"]]),a(14,"div",4)(15,"div",5),O(16,It,1,1)(17,zt,2,0)(18,Qt,2,1),h(19,1),h(20,2),c()(),O(21,Yt,2,0,"spk-icon",6)(22,Xt,1,0,"spk-spinner",7)(23,Gt,2,0,"spk-icon",6)(24,Kt,2,0,"spk-icon",6)(25,Jt,2,0,"spk-icon",6)(26,Zt,2,0,"spk-icon",6)(27,ei,2,0,"spk-icon",6),c(),a(28,"div",8,1),ve(30,si,4,6,"li",9,ge),c()()}if(e&2){J(i.placeholderTemplate());let o=i.optionTemplate(),s=i.selectedOptionTemplate(),r=i.inlineTemplate();m(4);let p=J(i.selectedOptions()),l=i.inputState();m(2),J(s||o||r),m(),J(o||r),m();let u=J(!i.asText()&&i.selectMultiple());m();let w=J(i.isOpen()&&i.hasSearch()&&(u||i.inputValue().length>0));m(),Se("isOpen",i.isOpen),G("disableOpenByClick",!0)("options",De(21,Mt)),m(2),I("stretch",i.stretch())("autosize",i.selectMultiple())("readonly",i.readonly()||i.disabled()),m(2),I("show-search-text",w),m(),I("is-selected",l==="selected"),m(),T(i.asFreeText()&&i.inputValue().length>0&&!i.isOpen()?16:p.length>0?17:w?-1:18),m(5),T(l==="closed"?21:l==="loading"?22:l==="open-searching"?23:l==="searching"?24:l==="selected"&&i._isClearable()?25:l==="selected"&&!i._isClearable()?26:27),m(9),Ce(i.filteredOptions())}},dependencies:[ze,Ne,Ee,te,xi,Ti,wi],encapsulation:2,changeDetection:0})}}return n})(),dn=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.#i=C(this.#e?.sidenavType),this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=g(!1),this.isOpen=A(!1),this.type=g(void 0),this._type=D(()=>this.type()?this.type():this.#e?.sidenavType),this.dragImageElement=U.required("dragImageElement"),this.dragIsEnding=C(!1),this.dragIsOnScreen=C(!0),this.isDragging=C(!1),this.dragPositionX=C(0),this.dragActualPositionX=D(()=>{let t=this.dragPositionX(),e=.32;return t>this.openWidthTreshold?this.openWidthTreshold+(t-this.openWidthTreshold)*e:t}),this.draggingStyle=D(()=>this._type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=R(()=>{this.isDragging()&&document.body.classList.add("dragging")})}#e;#i;drop(t){t.stopPropagation(),this.#t(t.clientX)}#t(t){this.isDragging.set(!1),t<=0?this.isOpen.set(!1):t>this.openWidthTreshold?this.isOpen.set(!0):t<this.openWidthTreshold&&(!this.isOpen()&&t<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(t){(t.clientX<0||!this.dragIsOnScreen())&&this.#t(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(t){t.preventDefault(),this.#n(t)}dragStart(t){t.stopPropagation(),this.isDragging.set(!0),this.#n(t)}#n(t){t.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.clientX)}),this.#n(t)}touchStart(t){t.stopPropagation(),this.isDragging.set(!0)}touchMove(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.touches[0].clientX)})}touchEnd(t){t.stopPropagation(),this.#t(t.changedTouches[0].clientX)}touchCancel(t){t.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-sidenav"]],viewQuery:function(e,i){e&1&&N(i.dragImageElement,ri,5),e&2&&Y()},hostVars:8,hostBindings:function(e,i){e&2&&(Q(i._type()),I("open",i.isOpen())("closed",!i.isOpen())("is-dragging",i.isDragging()))},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:li,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(e,i){e&1&&(x(ai),O(0,ci,2,0,"div",1)(1,pi,1,0,"div",2),a(2,"div",3),h(3),c(),a(4,"div",4),O(5,di,1,0,"div",5),a(6,"div",6),h(7,1),c(),a(8,"main"),h(9,2),c()()),e&2&&(T(i.type()==="overlay"?0:-1),m(),T(i.type()==="overlay"&&i.isDragging()?1:-1),m(3),j("transform",i.draggingStyle()),m(),T(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var un=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-stepper"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var hn=(()=>{class n{constructor(){this.#e=b(Mi),this.spkSort=g(),this.sortAsc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===e}),this.sortDesc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===`-${e}`})}#e;toggleSort(){let t=this.spkSort();t&&this.#e.toggleSort(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(e,i){e&1&&E("mousedown",function(){return i.toggleSort()}),e&2&&I("sort-asc",i.sortAsc())("sort-desc",i.sortDesc())},inputs:{spkSort:[1,"spkSort"]}})}}return n})();var ee=1.5,Mi=(()=>{class n{constructor(){this.#e=b(H),this.#i=b(ce,{optional:!0}),this.loading=g(!1),this.data=g([]),this.dataChange=X(),this.sortByColumn=A(null),this.thead=U("thead"),this.columns=Qe(this.thead,["TH"]),this.class=C(this.#i?.tableType??"default"),this.resizing=C(!1),this.sizeTrigger=C(!0),this.#t=null,this.#n=C(!1),this.scrollXState=C(-1),this.scrollYState=C(-1),this.canScrollX=C(!1),this.canScrollY=C(!1),this.columnSizes=D(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,o)=>{let s=i,r=o===t.length-1;return s.dataset.size?`${e} ${s.dataset.size}`:s.classList.contains("sticky")||s.classList.contains("sticky-end")?`${e} min-content`:r?`${e} 1fr`:`${e} 1fr`},"")}),this.e=R(()=>{let t=this.sortByColumn();if(t===null)return this.#n()||(this.#t=this.data(),this.#n.set(!0)),this.dataChange.emit(structuredClone(this.#t));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data().sort((s,r)=>{let p=s[e],l=r[e],u=0;return typeof p=="number"&&typeof l=="number"&&(u=p-l),p instanceof Date&&l instanceof Date&&(u=p.getTime()-l.getTime()),typeof p=="string"&&typeof l=="string"&&(u=p.localeCompare(l,void 0,{sensitivity:"base"})),i?-u:u});this.dataChange.emit(o)})}#e;#i;#t;#n;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#s()}onResize(t){this.#s()}ngAfterViewInit(){queueMicrotask(()=>this.#s())}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i)}#s(){let t=this.#e.nativeElement,e=-1,i=-1,o=t.scrollWidth>t.clientWidth+ee;if(o){let r=t.scrollLeft<=ee;t.scrollWidth-(t.scrollLeft+t.clientWidth)<ee?e=1:r||(e=0)}this.scrollXState.set(e),this.canScrollX.set(o);let s=t.scrollHeight>t.clientHeight+ee;if(s){let r=t.scrollTop<=ee;t.scrollHeight-(t.scrollTop+t.clientHeight)<ee?i=1:r||(i=0)}this.scrollYState.set(i),this.canScrollY.set(s)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-table"]],viewQuery:function(e,i){e&1&&N(i.thead,ui,5),e&2&&Y()},hostVars:18,hostBindings:function(e,i){e&1&&E("scroll",function(){return i.onScroll()})("resize",function(s){return i.onResize(s)},!1,Pe),e&2&&(Q(i.class()),j("grid-template-columns",i.columnSizes()),I("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:fi,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(e,i){e&1&&(x(hi),a(0,"thead",null,0),h(2),O(3,mi,1,0,"spk-progress-bar",1),c(),a(4,"tbody"),h(5,1),c(),O(6,gi,2,0,"div",2)),e&2&&(m(3),T(i.loading()?3:-1),m(3),T(i.loading()?-1:6))},dependencies:[Ei],encapsulation:2,changeDetection:0})}}return n})(),fn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-tabs"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),mn=(()=>{class n{constructor(){this.isActive=A(!1),this.disallowToggle=g(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&I("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Ci,decls:6,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"content"]],template:function(e,i){e&1&&(x(vi),a(0,"h3",0),E("click",function(){return i.disallowToggle()||i.toggle()}),h(1,0,null,_i,1,0),O(3,Si,2,0,"spk-icon",1),c(),a(4,"div",2),h(5,1),c()),e&2&&(m(3),T(i.disallowToggle()?-1:3))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),gn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-toggle"]],ngContentSelectors:L,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(e,i){e&1&&(x(),a(0,"div",0),q(1,"div",1),c(),h(2))},encapsulation:2,changeDetection:0})}}return n})();var vn=(()=>{class n{constructor(){this.filesOver=C(!1),this.filesDropped=X()}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!0)}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1)}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&E("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),e&2&&I("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();var Ii=(()=>{class n{constructor(){this.positionAnchorName=g.required()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["sparkle-tooltip-wrapper"]],hostVars:2,hostBindings:function(e,i){e&2&&j("position-anchor",i.positionAnchorName())},inputs:{positionAnchorName:[1,"positionAnchorName"]},ngContentSelectors:L,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(e,i){e&1&&(x(),a(0,"div",0),h(1),c())},encapsulation:2})}}return n})(),Cn=(()=>{class n{constructor(){this.spkTooltip=g.required(),this.#e=b(H),this.#i=b(Ae),this.#t=b(Re),this.#n=b(me),this.#s=null,this.#o=null,this.anchorName=C(`--${Oe()}`),this.manageWrapperEffect=R(()=>{let t=this.spkTooltip();if(this.cleanupTooltip(),t){let e;typeof t=="string"?e=[this.#n.createText(t)]:t instanceof oe?(this.#o=t.createEmbeddedView(null),this.#o.detectChanges(),e=this.#o.rootNodes):e=[],e.length>0&&(this.#s=this.#i.createComponent(Ii,{environmentInjector:this.#t,projectableNodes:[e]}),this.#s.setInput("positionAnchorName",this.anchorName()),this.#s.changeDetectorRef.detectChanges())}})}#e;#i;#t;#n;#s;#o;onClick(t){let e=this.#e.nativeElement;(e.hasAttribute("disabled")||e.hasAttribute("readonly"))&&(t.preventDefault(),t.stopPropagation())}cleanupTooltip(){this.#s&&(this.#s.destroy(),this.#s=null),this.#o&&(this.#o.destroy(),this.#o=null)}ngOnDestroy(){this.cleanupTooltip()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:2,hostBindings:function(e,i){e&1&&E("click",function(s){return i.onClick(s)}),e&2&&j("anchor-name",i.anchorName())},inputs:{spkTooltip:[1,"spkTooltip"]}})}}return n})();export{te as a,Ji as b,Zi as c,yi as d,en as e,tn as f,Di as g,nn as h,xi as i,wi as j,on as k,Ee as l,sn as m,rn as n,an as o,Ei as p,ln as q,cn as r,Ti as s,pn as t,dn as u,un as v,hn as w,Mi as x,fn as y,mn as z,gn as A,vn as B,Cn as C};
|
|
1
|
+
import{ia as ze}from"./chunk-EBXJGPRA.js";import{$a as U,Ab as ge,Bb as ve,Cb as Ce,Db as a,Eb as c,Fb as q,Ib as ie,Jb as z,Jc as qe,Qc as D,Rc as R,T as pe,Ta as Pe,Tc as xe,Ua as m,Vb as E,W as Ie,Wa as oe,Wb as f,Xb as x,Ya as me,Yb as h,Z as b,_a as Ae,a as Me,aa as Re,ab as Fe,bb as A,ca as Ve,ea as k,fa as y,fc as Be,gb as S,gc as N,hc as Y,ib as se,ic as We,jc as _,ka as de,kc as _e,la as ue,lb as O,lc as K,mc as re,oc as Se,pc as ke,qa as he,qb as He,qc as ye,ra as X,rc as ae,sa as g,sc as J,ta as H,tb as Le,tc as B,ua as fe,ub as G,va as C,vb as j,vc as De,wb as I,wc as le,xb as je,yb as Q,zb as T}from"./chunk-4KE2I7OA.js";import{a as $,b as Z,c as Te}from"./chunk-7CGTOI24.js";var L=["*"],Ke=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Je=["[icon]","[title]","*","[content]"];function Ze(n,d){n&1&&(a(0,"spk-icon",3),_(1,"info"),c())}function et(n,d){n&1&&(a(0,"spk-icon",3),_(1,"info"),c())}function tt(n,d){n&1&&(a(0,"spk-icon",3),_(1,"warning"),c())}function it(n,d){n&1&&(a(0,"spk-icon",3),_(1,"warning-octagon"),c())}function nt(n,d){n&1&&(a(0,"spk-icon",3),_(1,"check-circle"),c())}function ot(n,d){n&1&&(a(0,"spk-icon",3),_(1,"question"),c())}function st(n,d){if(n&1){let t=z();a(0,"spk-icon",7),E("click",function(){k(t);let i=f();return y(i.removeAlert())}),_(1,"plus"),c()}}var rt=["dialogRef"];function at(n,d){if(n&1){let t=z();a(0,"div",4),E("click",function(){k(t);let i=f();return y(i.isOpen.set(!1))}),c()}}var lt=["spk-button",""];var ct=["triggerRef"],pt=["popoverRef"],dt=[[["","trigger",""]],"*"],ut=["[trigger]","*"];var ht=()=>({closeOnButton:!1,closeOnEsc:!0});var ft=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],mt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],Ue=["input"],gt=[[["label"]]],vt=["label"];function Ct(n,d){if(n&1&&(a(0,"div",3),_(1),c()),n&2){let t=f();m(),_e(t.files()[0].name)}}function _t(n,d){if(n&1&&(a(0,"div",3),_(1),c()),n&2){let t=f();m(),K("",t.files().length," files selected")}}function St(n,d){if(n&1&&(a(0,"div",4),_(1),c()),n&2){let t=f();m(),_e(t.filesOver()?t.overlayText():t.placeholder())}}var kt=["optionsRef"],yt=["*",[["","menu",""]]],Dt=["*","[menu]"];function xt(n,d){n&1&&(a(0,"spk-icon",5),_(1,"caret-down"),c())}var wt=[[["label"]],[["input","type","range"]]],bt=["label","input[type=range]"],Ot=["optionsWrap"],Et=[[["label"]],[["input"]],[["textarea"]]],Tt=["label","input","textarea"],Mt=()=>({closeOnButton:!1,closeOnEsc:!1}),be=n=>({$implicit:n});function It(n,d){if(n&1&&_(0),n&2){let t=f();K(" ",t.inputValue()," ")}}function Rt(n,d){n&1&&ie(0)}function Vt(n,d){if(n&1&&O(0,Rt,1,0,"ng-container",13),n&2){let t=f(3).$implicit;f(2);let e=B(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function Pt(n,d){if(n&1&&_(0),n&2){let t=f(3).$implicit,e=f(2);K(" ",e.getLabel(t)," ")}}function At(n,d){if(n&1){let t=z();a(0,"spk-chip",11),O(1,Vt,1,4,"ng-container")(2,Pt,1,1),a(3,"spk-icon",12),E("click",function(i){k(t);let o=f(2).$index,s=f(2);return y(s.removeSelectedOptionByIndex(i,o))}),_(4,"x-bold"),c()()}if(n&2){let t=f(4),e=B(6);Q(t.selectClasses()),m(),T(e?1:2)}}function Ft(n,d){n&1&&ie(0)}function Ht(n,d){if(n&1&&O(0,Ft,1,0,"ng-container",13),n&2){let t=f(4).$implicit;f(2);let e=B(6);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function Lt(n,d){if(n&1&&_(0),n&2){let t=f(4).$implicit,e=f(2);K(" ",e.getLabel(t)," ")}}function jt(n,d){if(n&1&&O(0,Ht,1,4,"ng-container")(1,Lt,1,1),n&2){f(5);let t=B(6);T(t?0:1)}}function Bt(n,d){if(n&1&&O(0,jt,2,1),n&2){f(4);let t=B(9);T(t?-1:0)}}function Wt(n,d){if(n&1&&O(0,At,5,3,"spk-chip",10)(1,Bt,1,1),n&2){f(3);let t=B(8);T(t?0:1)}}function qt(n,d){if(n&1&&O(0,Wt,2,1),n&2){let t=d.$implicit;T(t?0:-1)}}function zt(n,d){if(n&1&&ve(0,qt,1,1,null,null,ge),n&2){f();let t=B(4);Ce(t)}}function Ut(n,d){n&1&&ie(0)}function Nt(n,d){if(n&1&&O(0,Ut,1,0,"ng-container",14),n&2){f(2);let t=B(0);G("ngTemplateOutlet",t)}}function $t(n,d){if(n&1&&_(0),n&2){let t,e=f(2);K(" ",(t=e.placeholderText())!==null&&t!==void 0?t:""," ")}}function Qt(n,d){if(n&1&&O(0,Nt,1,1,"ng-container")(1,$t,1,1),n&2){f();let t=B(0);T(t?0:1)}}function Yt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),c())}function Xt(n,d){n&1&&q(0,"spk-spinner",7)}function Gt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"list-magnifying-glass"),c())}function Kt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"magnifying-glass"),c())}function Jt(n,d){if(n&1){let t=z();a(0,"spk-icon",15),E("click",function(i){k(t);let o=f();return y(o.clear(i))}),_(1,"x-bold"),c()}}function Zt(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-down"),c())}function ei(n,d){n&1&&(a(0,"spk-icon",6),_(1,"caret-up"),c())}function ti(n,d){if(n&1&&q(0,"spk-checkbox"),n&2){let t=f().$index,e=f();Q(e.selectClasses()),I("active",e.isSelected(t))}}function ii(n,d){n&1&&ie(0)}function ni(n,d){if(n&1&&O(0,ii,1,0,"ng-container",13),n&2){let t=f().$implicit;f();let e=B(7);G("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,be,t))}}function oi(n,d){if(n&1&&_(0),n&2){let t=f().$implicit,e=f();K(" ",e.getLabel(t)," ")}}function si(n,d){if(n&1){let t=z();a(0,"li",16),E("click",function(){let i=k(t).$index,o=f();return y(o.toggleOptionByIndex(i))}),O(1,ti,1,4,"spk-checkbox",17)(2,ni,1,4,"ng-container")(3,oi,1,1),c()}if(n&2){let t=d.$index,e=f(),i=B(7);I("selected",e.isSelected(t))("focused",t===e.focusedOptionIndex()),m(),T(e.selectMultiple()?1:-1),m(),T(i?2:3)}}var ri=["dragImageElement"],ai=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],li=["[sidenav]","[sidenav-closed-topbar]","*"];function ci(n,d){n&1&&q(0,"div",1,0)}function pi(n,d){if(n&1){let t=z();a(0,"div",7),E("drop",function(i){k(t);let o=f();return y(o.drop(i))})("dragover",function(i){k(t);let o=f();return y(o.dragOver(i))})("dragenter",function(){k(t);let i=f();return y(i.dragEnter())})("dragleave",function(){k(t);let i=f();return y(i.dragLeave())}),c()}}function di(n,d){if(n&1){let t=z();a(0,"div",8),E("dragstart",function(i){k(t);let o=f();return y(o.dragStart(i))})("dragend",function(i){k(t);let o=f();return y(o.dragEnd(i))})("drag",function(i){k(t);let o=f();return y(o.drag(i))})("touchstart",function(i){k(t);let o=f();return y(o.touchStart(i))})("touchmove",function(i){k(t);let o=f();return y(o.touchMove(i))})("touchend",function(i){k(t);let o=f();return y(o.touchEnd(i))})("touchcancel",function(i){k(t);let o=f();return y(o.touchCancel(i))}),c()}}var ui=["thead"],hi=[[["","table-header",""]],"*",[["","table-no-rows",""]]],fi=["[table-header]","*","[table-no-rows]"];function mi(n,d){n&1&&q(0,"spk-progress-bar",1)}function gi(n,d){n&1&&(a(0,"div",2),h(1,2),c())}var vi=[[["","title",""]],"*"],Ci=["[title]","*"];function _i(n,d){n&1&&_(0,"Title")}function Si(n,d){n&1&&(a(0,"spk-icon",1),_(1,"caret-down"),c())}var we=["bold","thin","light","fill"],te=(()=>{class n{#e=b(H);get currentClass(){let t=this.#e.nativeElement.innerText;for(let e=0;e<we.length;e++)if(t.endsWith(we[e]))return we[e];return""}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(e,i){e&2&&Q(i.currentClass)},ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ji=(()=>{class n{constructor(){this._el=b(H),this.alertService=g(null),this.id=g(null),this.alertClasses=D(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Je,decls:18,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(e,i){if(e&1&&(x(Ke),a(0,"div",1)(1,"div",2,0),h(3),c(),a(4,"div",2),ae(5),O(6,Ze,2,0,"spk-icon",3)(7,et,2,0,"spk-icon",3)(8,tt,2,0,"spk-icon",3)(9,it,2,0,"spk-icon",3)(10,nt,2,0,"spk-icon",3)(11,ot,2,0,"spk-icon",3),c(),a(12,"div",4),h(13,1),h(14,2),c(),O(15,st,2,0,"spk-icon",5),a(16,"div",6),h(17,3),c()()),e&2){let o=We(2);m(),j("display",o.children.length?"block":"none");let s=i.alertClasses();m(5),T(s.includes("primary")?6:s.includes("accent")?7:s.includes("warn")?8:s.includes("error")?9:s.includes("success")?10:11),m(9),T(i.id()?15:-1)}},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})();function Oe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var Zi=(()=>{class n{constructor(){this.alertHistory=C([]),this.alertHistoryIsOpen=C(!1),this.alertHistoryIsHidden=C(!0)}error(t){this.addAlert({type:"error",title:t??"An error occured"})}success(t){this.addAlert({type:"success",title:t})}question(t){this.addAlert({type:"question",title:t})}warning(t){this.addAlert({type:"warn",title:t})}info(t){this.addAlert({type:"primary",title:t})}addAlert(t){let e=Oe();this.alertHistory.update(i=>[Z($({},t),{isOpen:!0,animateIn:!0,animateOut:!1,id:e}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>Z($({},o),{animateIn:o.id===e?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(e)},2500)}removeAlert(t){this.alertHistory.update(e=>e.map(i=>Z($({},i),{animateOut:i.id===t?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(e=>e.filter(i=>i.id!==t))},300)}hideAlert(t){this.alertHistory.update(e=>e.map(i=>Z($({},i),{isOpen:i.id===t?!1:i.isOpen})))}setHidden(t){this.alertHistoryIsHidden.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=pe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ce=new Ie("Sparkle UI Config"),ki={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},yi=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.dialogRef=U("dialogRef"),this.isOpen=A(!1),this.options=g(),this.closed=X(),this.defaultOptionMerge=D(()=>$(Z($({},ki),{class:this.#e?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=R(()=>{let t=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(t?.showModal(),t?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",e=>{e.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&e.preventDefault(),e.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),t?.close())})}#e;ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-dialog"]],viewQuery:function(e,i){e&1&&N(i.dialogRef,rt,5),e&2&&Y()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:L,decls:6,vars:11,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(e,i){if(e&1&&(x(),ae(0),a(1,"dialog",1,0)(3,"div",2),h(4),c(),O(5,at,1,0,"div",3),c()),e&2){let o,s,r,p,l=i.defaultOptionMerge();m(),Q(l.class),j("width",(o=l.width)!==null&&o!==void 0?o:"")("max-width",(s=l.maxWidth)!==null&&s!==void 0?s:"")("max-height",(r=l.maxHeight)!==null&&r!==void 0?r:"")("height",(p=l.height)!==null&&p!==void 0?p:""),m(4),T(i.defaultOptionMerge().closeOnOutsideClick?5:-1)}},encapsulation:2,changeDetection:0})}}return n})(),en=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=b(He),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(t,e){let i=this.#i.injector,o=this.#t(),P=e||{},{data:s,closed:r}=P,p=Te(P,["data","closed"]);this.compRef&&this.#n(),this.insertedCompRef=xe(t,{environmentInjector:i}),this.compRef=xe(yi,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let l=this.insertedCompRef.instance?.data,u=this.insertedCompRef.instance?.closed;if(s){if(fe(l))this.insertedCompRef.setInput("data",s);else if(!fe(l))throw new Error("data is not an input signal on the passed component")}u instanceof he&&(this.closedFieldSub=u.subscribe((...F)=>{r?.(...F),this.#n()})),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",p),this.compRef.instance.closed.subscribe(()=>V());let w=this;function V(){u&&u instanceof he?u.emit(!1):r?.(void 0),w.#n()}return{component:this.insertedCompRef.instance,close:V}}#t(){let t=document.createElement("spk-dialog-ref");return t.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(t),document.getElementById("spk-dialog-ref")}#n(){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.#n()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275prov=pe({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),tn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-button-group"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Di=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["","spk-button",""]],attrs:lt,ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),nn=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.class=C(this.#e?.cardType??"default")}#e;static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-card"]],hostVars:2,hostBindings:function(e,i){e&2&&Q(i.class())},ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),xi=(()=>{class n{#e=b(H);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-checkbox"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:L,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(e,i){e&1&&(x(),a(0,"div",0)(1,"spk-icon",1),_(2,"check"),c(),a(3,"spk-icon",2),_(4,"minus"),c()(),h(5))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),wi=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-chip"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var bi=["scroll","auto"],Oi={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},Ne=(()=>{class n{constructor(){this.#e=b(qe),this.#i=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=g(!1),this.right=g(!1),this.markForCheck=g(null),this._above=C(this.above()),this._right=C(this.right()),this.disableOpenByClick=g(!1),this.isOpen=A(!1),this.options=g(),this.closed=X(),this.defaultOptionMerge=D(()=>$($({},Oi),this.options())),this.triggerRef=U.required("triggerRef"),this.popoverRef=U.required("popoverRef"),this.id=C("--"+Oe()),this.menuStyle=C(null),this.openAbort=null,this.openEffect=R(()=>{let t=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};t?.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.#t(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#n(),i),window.addEventListener("resize",()=>this.#n(),i),this.#n()})}else t.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=R(()=>{this.markForCheck()&&this.#e.markForCheck()})}#e;#i;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(t){t.stopPropagation(),t.preventDefault(),this.isOpen.set(!1)}#t(t){let e=t.parentElement;for(;e;){if(bi.indexOf(window.getComputedStyle(e).overflowY)>-1&&e.scrollHeight>e.clientHeight)return e;e=e.parentElement}return document.documentElement}#n(){let t=this.triggerRef()?.nativeElement.getBoundingClientRect(),e=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=t.left,o=t.bottom,s=i,r=o+this.#i,p=s+e.width>window.innerWidth,l=r+e.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(l),this._right.set(p);else{if(s=i,r=o+this.#i,l){let w=t.top-e.height-this.#i;w<0||(r=w)}p&&(s=t.right-e.width,s<0&&(s=0));let u={left:s+"px",top:r+"px"};this.menuStyle.set(u)}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-popover"]],viewQuery:function(e,i){e&1&&(N(i.triggerRef,ct,5),N(i.popoverRef,pt,5)),e&2&&Y(2)},hostVars:4,hostBindings:function(e,i){e&2&&I("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:ut,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(e,i){if(e&1){let o=z();x(dt),a(0,"div",2,0),E("click",function(r){return k(o),y(i.toggleIsOpen(r))}),a(2,"div",3),h(3),c(),a(4,"button",4),_(5,"Open popover"),c()(),a(6,"div",5,1)(8,"div",6),E("click",function(r){return k(o),y(i.isOpen()&&i.eventClose(r))}),c(),h(9,1),c()}e&2&&(j("anchor-name",i.id()),m(6),je(i.menuStyle()),j("position-anchor",i.id()))},dependencies:[Di],encapsulation:2,changeDetection:0})}}return n})();var on=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-divider"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),Ee=(()=>{class n{#e=b(H);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 t=typeof CSS<"u"&&CSS.supports("field-sizing","content"),e=this.#e.nativeElement.querySelector("textarea");if(!t&&e!==null){let s=function(){e.style.height="auto",e.style.height=e.scrollHeight+"px"},r=function(){window.setTimeout(s,0)};var i=s,o=r;e.addEventListener("change",s),e.addEventListener("cut",r),e.addEventListener("paste",r),e.addEventListener("drop",r),e.addEventListener("keydown",r),e.focus(),e.select(),s()}}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-form-field"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:mt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(e,i){e&1&&(x(ft),h(0),a(1,"div",0)(2,"div",1),h(3,1),h(4,2),c(),h(5,3),h(6,4),a(7,"div",2),h(8,5),h(9,6),c()(),a(10,"div",3)(11,"div",4),h(12,7),c(),a(13,"div",5),h(14,8),c()())},encapsulation:2,changeDetection:0})}}return n})(),sn=(()=>{class n{constructor(){this._el=b(H),this.inputRef=U.required("input"),this.filesOver=C(!1),this.multiple=g(),this.accept=g(null),this.placeholder=A("Click or drag files here"),this.overlayText=g("Drop files here"),this.files=A([]),this.fileUploadClasses=D(()=>this._el.nativeElement.classList.toString()),this.inputEffect=R(()=>{let t=this.inputRef().nativeElement;t&&(t.placeholder&&this.placeholder.set(t.placeholder),t.addEventListener("dragover",e=>{e.preventDefault(),this.filesOver.set(!0)}),t.addEventListener("dragleave",e=>{e.preventDefault(),this.filesOver.set(!1)}),t.addEventListener("drop",e=>{e.preventDefault(),this.filesOver.set(!1);let i=e.dataTransfer?.files;i&&i.length>0&&(this.handleFileUpload(Array.from(i)),t.files=i)}),t.addEventListener("change",e=>{e.preventDefault(),this.handleFileUpload(Array.from(e.target.files))}))})}handleFileUpload(t){this.multiple()?this.files.update(e=>[...e,...t]):this.files.set(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-file-upload"]],viewQuery:function(e,i){e&1&&N(i.inputRef,Ue,5),e&2&&Y()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:vt,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(e,i){e&1&&(x(gt),a(0,"spk-form-field"),h(1,0,["ngProjectAs","label",5,["label"]]),a(2,"div",2,0),O(4,Ct,2,1,"div",3)(5,_t,2,1,"div",3)(6,St,2,1,"div",4),q(7,"input",5,1)(9,"div",6),c(),a(10,"spk-icon",7),_(11,"upload-simple"),c()()),e&2&&(Q(i.fileUploadClasses()),m(4),T(i.files().length===1?4:i.files().length>1?5:6),m(3),Le("multiple",i.multiple())("accept",i.accept()),m(2),I("files-over",i.filesOver()))},dependencies:[Ee,te],encapsulation:2,changeDetection:0})}}return n})(),rn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-list"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();function $e(n,d){let t=d?.injector||(Ve($e),b(de)),{debounce:e=0,initialValue:i=void 0,transform:o=v=>v,compare:s=(v,M)=>v===M,forceType:r=void 0,returnPreviousValue:p=!0}=d||{},l=C(i),u=t.get(ue),w=D(()=>{let v=n()?.nativeElement;if(v instanceof HTMLInputElement||v instanceof HTMLTextAreaElement)return Ye(v)}),V=!1,P,F=null;return R(()=>{let v=w();if(!v)return l.set(p&&P?o(P):void 0);i!==void 0&&v.value===""?l.set(i):v.value!==""&&ne();let M=W=>{F!==null&&clearTimeout(F),F=setTimeout(()=>{F=null,ne()},e)};v.addEventListener("input",M),v.addEventListener("inputValueChanged",M),u.onDestroy(()=>{v.removeEventListener("input",M),v.removeEventListener("inputValueChanged",M),F!==null&&clearTimeout(F)})},{injector:t}),R(()=>{let v=w();if(!v)return;let M=l()??"",W=M==null?"":String(M);v.value!==W&&(P=W,v.value=W,v.dispatchEvent(new Event("input")))},{injector:t}),l;function ne(){if(!V){V=!0;try{let v=w();if(!v)return;let M=v.value,W=r?Xe(M,r):o(M);P=M,s(l(),W)||l.set(W)}finally{V=!1}}}function Ye(v){return Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(M){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,M);let Ge=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:M}});return this.dispatchEvent(Ge),M}}),v}function Xe(v,M){switch(M){case"string":return v.toString();case"number":let W=Number(v);return isNaN(W)?void 0:W;case"boolean":return v.toLowerCase()==="true"?!0:v.toLowerCase()==="false"?!1:void 0;default:return v}}}function Qe(n,d){let t=b(de),e=t.get(ue),i=C([]),o=null,s=null,r=(l,u)=>{s&&s.disconnect();let w=Array.from(l.nativeElement.querySelectorAll(u.join(",")));i.set(w),s=new MutationObserver(V=>{requestAnimationFrame(()=>{let P=Array.from(l.nativeElement.querySelectorAll(u.join(",")));i.set(P)})}),s.observe(l.nativeElement,{childList:!0,subtree:!0}),e.onDestroy(()=>p())};o=R(()=>{let l=typeof n=="function"&&n[Me]?n():n,u=typeof d=="function"?d():d;l&&u?.length>0?r(l,u):(i.set([]),s&&(s.disconnect(),s=null))},{injector:t});function p(){o&&o.destroy(),s&&s.disconnect()}return{signal:i.asReadonly(),destroy:p}}var an=(()=>{class n{constructor(){this.#e=b(me),this.above=g(!1),this.right=g(!1),this.openIndicator=g(!1),this.disabled=g(!1),this.customOptionElementSelectors=g(["button"]),this.keepClickedOptionActive=g(!1),this.closeOnClick=g(!0),this.isOpen=A(!1),this.closed=X(),this.searchable=g(!1),this.activeOptionIndex=C(-1),this.inputRef=U("input"),this.optionsRef=U("optionsRef"),this.options=Qe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=D(()=>this.options.signal().filter(t=>!t.disabled)),this.inputValue=$e(this.inputRef),this.abortController=null,this.optionsEffect=R(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",i=>{let o=i.target,s=this.activeElements();if(!s.length){let p=this.optionsEl();this.activeElements.set(p),s=p}let r=s.findIndex(p=>p===o);r>-1&&(this.activeOptionIndex.set(r),t.focus())}),t.addEventListener("keydown",e=>{let i=this.activeOptionIndex();e.key==="ArrowDown"?(e.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i))):e.key==="ArrowUp"?(e.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):e.key==="Enter"?(e.preventDefault(),i>-1&&(this.activeElements()[i].click(),queueMicrotask(()=>this.close("active")))):e.key==="Tab"&&(e.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=C([]),this.lastInputValue="",this.inputValueEffect=R(()=>{if(!this.searchable())return;let e=(this.inputValue()??"").toLowerCase();if(this.#t(),!e||e==="")return;let i=this._lastElementList.length&&e.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=e;for(let o=0;o<i.length;o++){let s=i[o],r=s.textContent?.toLowerCase()||"",p=this.#i(r,e);s.value=p}i=i.filter(o=>o.value>0).sort((o,s)=>s.value-o.value);for(let o=0;o<i.length;o++)this.#e.setStyle(i[o],"order",o);this.activeElements.set(i),this._lastElementList=i}),this.activeOptionIndexEffect=R(()=>{let t=this.activeElements(),e=this.activeOptionIndex();for(let i=0;i<t.length;i++)t[i].classList.remove("active");e>-1&&(t[e].scrollIntoView({block:"center"}),t[e].classList.add("active"))})}#e;#i(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let p=0;p<e.length;p++){let l=e[p];if(t.length>o+1&&t[o+1]===l)i+=p===0?100:150,o++,s++;else{let u=t.indexOf(l,o+1);if(p>0&&(r=!1),u===-1)return 0;i+=100,o=u,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}nextActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===-1||t===e.length-1)return 0;let i=t+1;return e[i].disabled?this.nextActiveIndex(i):i}prevActiveIndex(t){let e=this.activeElements();if(!e.length){let o=this.optionsEl();this.activeElements.set(o),e=o}if(t===0||t===-1)return e.length-1;let i=t-1;return e[i].disabled?this.prevActiveIndex(i):i}close(t="closed",e){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#t(),this.isOpen.set(!1),this.closed.emit(t==="active"))}#t(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let e=0;e<t.length;e++)t[e].classList.remove("active")}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-menu"]],viewQuery:function(e,i){e&1&&(N(i.inputRef,Ue,5),N(i.optionsRef,kt,5)),e&2&&Y(2)},hostVars:4,hostBindings:function(e,i){e&2&&I("disabled",i.disabled())("has-search",i.searchable())},inputs:{above:[1,"above"],right:[1,"right"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Dt,decls:12,vars:13,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(e,i){if(e&1){let o=z();x(yt),a(0,"spk-popover",3,0),ye("isOpenChange",function(r){return k(o),ke(i.isOpen,r)||(i.isOpen=r),y(r)}),E("closed",function(){return k(o),y(i.close("fromPopover"))}),a(2,"div",4),E("click",function(){return k(o),y(!i.disabled()&&i.isOpen.set(!0))}),h(3),O(4,xt,2,0,"spk-icon",5),c(),a(5,"div",6)(6,"spk-form-field",7),q(7,"input",8,1),c()(),a(9,"div",9,2),E("click",function(){return k(o),y(i.close("active"))}),h(11,1),c()()}e&2&&(Se("isOpen",i.isOpen),G("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",De(12,ht)),m(2),I("is-open",i.isOpen()),m(2),T(i.openIndicator()?4:-1),m(2),I("hidden",i.searchable()===!1),m(3),I("searching",i.searchable()&&i.inputValue()!==""))},dependencies:[Ne,Ee,te],encapsulation:2,changeDetection:0})}}return n})(),Ei=(()=>{class n{constructor(){this.value=g(void 0)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(e,i){e&1&&q(0,"div",0),e&2&&j("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),ln=(()=>{class n{#e=b(H);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-radio"]],hostBindings:function(e,i){e&1&&E("click",function(){return i.onClick()})},ngContentSelectors:L,decls:2,vars:0,consts:[[1,"radio"]],template:function(e,i){e&1&&(x(),q(0,"div",0),h(1))},encapsulation:2,changeDetection:0})}}return n})(),cn=(()=>{class n{constructor(){this.#e=b(H),this.#i=null,this.#t=null,this.#n=0,this.alwaysShowThumb=g(!1),this.unit=g(""),this.value=A(this.#n),this.inputState=C({min:0,max:100,step:1}),this.valuePercentage=D(()=>{let{min:t,max:e}=this.inputState(),i=this.value()??t;if(isNaN(i))return 0;let o=e-t;if(o===0)return 0;let s=(i-t)/o*100;return Math.max(0,Math.min(100,s))}),this.trackFilledPercentage=D(()=>this.valuePercentage()),this.thumbPositionPercentage=D(()=>this.valuePercentage()),this.syncModelToInputEffect=R(()=>{let t=this.value();if(this.#t){let e=parseFloat(this.#t.value);(isNaN(e)||String(e)!==String(t))&&(this.#t.value=String(t))}})}#e;#i;#t;#n;get hasInputElement(){return!!this.#t}ngAfterViewInit(){this.#t=this.#e.nativeElement.querySelector('input[type="range"]'),this.#t?(this.#a(this.#t),this.#t.oninput=()=>{this.setNewInputValue(this.#t.value)},this.#t.addEventListener("inputValueChanged",t=>{this.setNewInputValue(t.detail.value)}),queueMicrotask(()=>this.#s(!0)),this.#o()):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(t){let e=parseFloat(t??"0");if(!isNaN(e)){let{min:i,max:o}=this.inputState();this.value.set(Math.max(i,Math.min(o,e)))}}trackEvent(t){if(!this.#t||this.#t.readOnly||this.#t.disabled){t.preventDefault(),t.stopPropagation();return}if(t.target===this.#t||t.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let i=t.currentTarget.getBoundingClientRect(),o=t.clientX-i.left,s=i.width,{min:r,max:p,step:l}=this.inputState(),u=p-r;if(s>0&&u!==0&&l>0){let V=(o/s*u+r-r)/l,P=r+Math.round(V)*l,F=this.#r(l);P=parseFloat(P.toFixed(F));let ne=Math.max(r,Math.min(p,P));this.value.set(ne)}}#s(t=!1){if(!this.#t)return;let e=parseFloat(this.#t.min??"0")??0,i=parseFloat(this.#t.max??"100")??100,o=this.#t.step,s=1;if(o&&o.toLowerCase()!=="any"){let p=parseFloat(o);!isNaN(p)&&p>0&&(s=p)}this.inputState.set({min:e,max:i,step:s});let r=parseFloat(this.#t.value??String(e))??e;if(t&&this.value()!==this.#n){let p=this.value(),l=Math.max(e,Math.min(i,p));r!==l&&(this.#t.value=String(l)),p!==l&&this.value.set(l)}else{let p=Math.max(e,Math.min(i,r));this.value()!==p&&this.value.set(p)}}#o(){if(!this.#t||typeof MutationObserver>"u")return;let t=["min","max","step","value","readonly","disabled"];this.#i=new MutationObserver(e=>{let i=!1;for(let o of e)if(o.type==="attributes"&&t.includes(o.attributeName??"")){i=!0;break}i&&this.#s(!1)}),this.#i.observe(this.#t,{attributes:!0})}#r(t){if(isNaN(t)||Math.floor(t)===t)return 0;let i=t.toString().split(".")[1];return i?i.length:0}#a(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}ngOnDestroy(){this.#i&&this.#i.disconnect(),this.#t&&(this.#t.oninput=null)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(e,i){e&2&&I("has-input",i.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:bt,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(e,i){e&1&&(x(wt),a(0,"div",0),h(1),c(),a(2,"div",1)(3,"div",2),_(4),c(),a(5,"div",3),E("click",function(s){return i.trackEvent(s)}),h(6,1),a(7,"div",4),q(8,"div",5),c(),a(9,"div",6)(10,"div",7)(11,"div",8),_(12),c()()()(),a(13,"div",9),_(14),c()()),e&2&&(m(4),re("",i.inputState().min,"",i.unit(),""),m(4),j("width",i.trackFilledPercentage(),"%"),m(),j("left",i.thumbPositionPercentage(),"%"),m(),I("always-show",i.alwaysShowThumb()),m(2),re("",i.value(),"",i.unit(),""),m(2),re("",i.inputState().max,"",i.unit(),""))},encapsulation:2,changeDetection:0})}}return n})(),Ti=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0})}}return n})(),pn=(()=>{class n{constructor(){this.#e=b(H),this.value=g(),this.label=g(),this.asFreeText=g(!1),this.placeholder=g(),this.readonly=A(!1),this.disabled=A(!1),this.lazySearch=g(!1),this.inlineSearch=g(!1),this.asText=g(!1),this.isClearable=g(!0),this.selectMultiple=g(!1),this.optionTemplate=g(null),this.selectedOptionTemplate=g(null),this.placeholderTemplate=g(null),this.isOpen=A(!1),this.isLoading=A(!1),this.options=A([]),this.selectedOptions=A([]),this.cleared=X(),this.inlineTemplate=Fe(oe),this.optionsWrapRef=U.required("optionsWrap"),this.inputRefInput=C(null),this.#i=typeof MutationObserver<"u"&&new MutationObserver(t=>{for(var e of t)e&&(e.target.nodeName==="INPUT"||e.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new H(e.target)),this.#i.disconnect())}),this.inputValue=C(""),this.prevInputValue=C(null),this.focusedOptionIndex=C(-1),this._isClearable=D(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=D(()=>this.#e.nativeElement.classList.toString()),this.stretch=D(()=>this.selectClasses().includes("stretch")),this.placeholderText=D(()=>{let t=this.placeholder(),e=this.inputRefEl();return t||e?.placeholder||null}),this.selectedOptionValues=D(()=>{let t=this.selectedOptions(),e=this.value();return e?t.map(i=>this.#o(i,e)):t}),this.filteredOptions=D(()=>{let t=this.options()||[],e=this.label(),i=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),r=this.#a(s);if(t.length<=0)return[];if(!o||s==="")return t;let l=t.filter(u=>{let w=e?(this.#o(u,e)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),V=((i?this.#o(u,i):u)??"").toString().toLowerCase(),P=r.test(w),F=r.test(V);return P||F}).map(u=>{let w=e?(this.#o(u,e)??"").toString().toLowerCase():(u??"").toString().toLowerCase(),V=((i?this.#o(u,i):u)??"").toString().toLowerCase(),P=this.#t(w,s),F=this.#t(V,s);return{item:u,score:Math.max(P,F)}});return l.sort((u,w)=>w.score-u.score),l.map(u=>u.item)}),this.inputRefEl=D(()=>{let t=this.inputRefInput();if(t===null)return;let e=t?t.nativeElement:null;return e?(e.autocomplete="off",this.#r(e),e.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&e.addEventListener("input",i=>{let o=i.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue())}),e.addEventListener("inputValueChanged",i=>{let o=i.detail.value,s=this.inputValue();if(o!==s){if(o===""){this.clear();return}this.setSelectedOptionsFromValue(o),this.setInputValueFromSelectedOptions(),this.#s()}}),e):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=R(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let e=this.inputRefEl();if(!e)return;e.addEventListener("keydown",i=>{if((i.key==="Escape"||i.key==="Tab")&&(i.preventDefault(),this.close()),(i.key==="Enter"||i.key===" ")&&(i.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),i.key==="ArrowDown"){i.preventDefault();let o=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(o>this.filteredOptions().length-1?0:o)}if(i.key==="ArrowUp"){i.preventDefault();let o=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(o<0?this.filteredOptions().length-1:o)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=R(()=>{let t=this.inputValue();this._inputValue=t}),this.inputRefElEffect=R(()=>{let t=this.inputRefEl();t&&t.value!==this._inputValue&&(this.disabled.set(t.disabled),this.setSelectedOptionsFromValue(t.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=D(()=>{let t=this.selectedOptions();return this.label()?t.map(i=>this.getLabel(i)).join(", "):t.join(", ")}),this.inputState=D(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=D(()=>this.inlineSearch()||this.lazySearch()),this.#n=R(()=>{if(this.selectMultiple()&&this.hasSearch())return;let t=this.selectedOptions(),e=this.value(),i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i)})}#e;#i;#t(t,e){if(!e)return 0;let i=0,o=-1,s=0,r=!0;for(let p=0;p<e.length;p++){let l=e[p];if(t.length>o+1&&t[o+1]===l)i+=p===0?100:150,o++,s++;else{let u=t.indexOf(l,o+1);if(p>0&&(r=!1),u===-1)return 0;i+=100,o=u,s++}}return r&&e.length===s&&(i+=1e3),i+=s*20,i}#n;ngOnInit(){this.setInitInput()}setInitInput(){let t=this.#e.nativeElement.querySelector("input");if(t){this.inputRefInput.set(new H(t));return}let e=this.#e.nativeElement.querySelector("textarea");if(e){this.inputRefInput.set(new H(e));return}typeof MutationObserver<"u"&&this.#i.observe(this.#e.nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(t){let e=this.options()||[],i=this.value(),o=this.selectMultiple(),s=t.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let r=o?s:[s[0]],p=e.filter(l=>{let u=i?this.#o(l,i)?.toString():l?.toString();return u&&r.includes(u)});this.selectedOptions.set(o?p:[p[0]])}setInputValueFromSelectedOptions(){let t=this.selectedOptions(),e=this.value();if(t.length===0){this.inputValue.set(""),this.updateInputElValue();return}let i=t.map(o=>e?this.#o(o,e):o).join(",");this.inputValue.set(i),this.updateInputElValue()}getLabel(t){let e=this.label();return e?this.#o(t,e):t}toggleOptionByIndex(t,e){let i=this.filteredOptions()[t];if(this.asFreeText()&&t===-1||!i){this.close();return}e&&e.stopPropagation();let o=this.selectMultiple(),s=this._isClearable(),r=this.value(),p=this.selectedOptionValues(),l=r?this.#o(i,r):i;this.prevInputValue.set(null),this.selectedOptions.update(u=>{let w=p.indexOf(l);if(w>-1){let V=[...u.slice(0,w),...u.slice(w+1)];return s||V.length>0?V:u}else return this.focusedOptionIndex.set(t),o?[...u,i]:[i]}),o?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),o&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(t,e){t.stopPropagation(),this.selectedOptions.update(i=>[...i.slice(0,e),...i.slice(e+1)]),this.setInputValueFromSelectedOptions()}isSelected(t){let e=this.value(),i=this.filteredOptions()[t],o=e?this.#o(i,e):i;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||this.#s())}#s(){let t=this.selectedOptionValues()[0],e=this.value();if(t){let i=this.filteredOptions().findIndex(o=>e?this.#o(o,e)===t:o===t);this.focusedOptionIndex.set(i)}else this.focusedOptionIndex.set(-1)}close(){this.isOpen.set(!1);let t=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&t&&(this.inputValue.set(t),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(t){t?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let t=this.inputRefEl(),e=this.inputValue();t&&(t.value=e,t.dispatchEvent(new Event("input")))}#o(t,e){return e.split(".").reduce((i,o)=>i?.[o],t)}#r(t){Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").get.call(this)},set(e){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value").set.call(this,e);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}});return this.dispatchEvent(o),e}})}#a(t){let e=(t??"").toLowerCase(),i="^";for(let o of e)i+=".*"+this.#l(o);return i+=".*$",new RegExp(i,"i")}#l(t){return t.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#i.disconnect()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-select"]],contentQueries:function(e,i,o){e&1&&Be(o,i.inlineTemplate,oe,5),e&2&&Y()},viewQuery:function(e,i){e&1&&N(i.optionsWrapRef,Ot,5),e&2&&Y()},hostVars:2,hostBindings:function(e,i){e&2&&I("multiple",i.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:Tt,decls:32,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(e,i){if(e&1){let o=z();x(Et),ae(0)(1)(2)(3)(4)(5)(6)(7)(8)(9),a(10,"spk-popover",2,0),ye("isOpenChange",function(r){return k(o),ke(i.isOpen,r)||(i.isOpen=r),y(r)}),E("closed",function(){return k(o),y(i.close())}),a(12,"spk-form-field",3),E("click",function(){return k(o),y(i.open())}),h(13,0,["ngProjectAs","label",5,["label"]]),a(14,"div",4)(15,"div",5),O(16,It,1,1)(17,zt,2,0)(18,Qt,2,1),h(19,1),h(20,2),c()(),O(21,Yt,2,0,"spk-icon",6)(22,Xt,1,0,"spk-spinner",7)(23,Gt,2,0,"spk-icon",6)(24,Kt,2,0,"spk-icon",6)(25,Jt,2,0,"spk-icon",6)(26,Zt,2,0,"spk-icon",6)(27,ei,2,0,"spk-icon",6),c(),a(28,"div",8,1),ve(30,si,4,6,"li",9,ge),c()()}if(e&2){J(i.placeholderTemplate());let o=i.optionTemplate(),s=i.selectedOptionTemplate(),r=i.inlineTemplate();m(4);let p=J(i.selectedOptions()),l=i.inputState();m(2),J(s||o||r),m(),J(o||r),m();let u=J(!i.asText()&&i.selectMultiple());m();let w=J(i.isOpen()&&i.hasSearch()&&(u||i.inputValue().length>0));m(),Se("isOpen",i.isOpen),G("disableOpenByClick",!0)("options",De(21,Mt)),m(2),I("stretch",i.stretch())("autosize",i.selectMultiple())("readonly",i.readonly()||i.disabled()),m(2),I("show-search-text",w),m(),I("is-selected",l==="selected"),m(),T(i.asFreeText()&&i.inputValue().length>0&&!i.isOpen()?16:p.length>0?17:w?-1:18),m(5),T(l==="closed"?21:l==="loading"?22:l==="open-searching"?23:l==="searching"?24:l==="selected"&&i._isClearable()?25:l==="selected"&&!i._isClearable()?26:27),m(9),Ce(i.filteredOptions())}},dependencies:[ze,Ne,Ee,te,xi,Ti,wi],encapsulation:2,changeDetection:0})}}return n})(),dn=(()=>{class n{constructor(){this.#e=b(ce,{optional:!0}),this.#i=C(this.#e?.sidenavType),this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=g(!1),this.isOpen=A(!1),this.type=g(void 0),this._type=D(()=>this.type()?this.type():this.#e?.sidenavType),this.dragImageElement=U.required("dragImageElement"),this.dragIsEnding=C(!1),this.dragIsOnScreen=C(!0),this.isDragging=C(!1),this.dragPositionX=C(0),this.dragActualPositionX=D(()=>{let t=this.dragPositionX(),e=.32;return t>this.openWidthTreshold?this.openWidthTreshold+(t-this.openWidthTreshold)*e:t}),this.draggingStyle=D(()=>this._type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=R(()=>{this.isDragging()&&document.body.classList.add("dragging")})}#e;#i;drop(t){t.stopPropagation(),this.#t(t.clientX)}#t(t){this.isDragging.set(!1),t<=0?this.isOpen.set(!1):t>this.openWidthTreshold?this.isOpen.set(!0):t<this.openWidthTreshold&&(!this.isOpen()&&t<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(t){(t.clientX<0||!this.dragIsOnScreen())&&this.#t(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(t){t.preventDefault(),this.#n(t)}dragStart(t){t.stopPropagation(),this.isDragging.set(!0),this.#n(t)}#n(t){t.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.clientX)}),this.#n(t)}touchStart(t){t.stopPropagation(),this.isDragging.set(!0)}touchMove(t){t.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(t.touches[0].clientX)})}touchEnd(t){t.stopPropagation(),this.#t(t.changedTouches[0].clientX)}touchCancel(t){t.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-sidenav"]],viewQuery:function(e,i){e&1&&N(i.dragImageElement,ri,5),e&2&&Y()},hostVars:8,hostBindings:function(e,i){e&2&&(Q(i._type()),I("open",i.isOpen())("closed",!i.isOpen())("is-dragging",i.isDragging()))},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:li,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(e,i){e&1&&(x(ai),O(0,ci,2,0,"div",1)(1,pi,1,0,"div",2),a(2,"div",3),h(3),c(),a(4,"div",4),O(5,di,1,0,"div",5),a(6,"div",6),h(7,1),c(),a(8,"main"),h(9,2),c()()),e&2&&(T(i.type()==="overlay"?0:-1),m(),T(i.type()==="overlay"&&i.isDragging()?1:-1),m(3),j("transform",i.draggingStyle()),m(),T(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var un=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-stepper"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})();var hn=(()=>{class n{constructor(){this.#e=b(Mi),this.spkSort=g(),this.sortAsc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===e}),this.sortDesc=D(()=>{let t=this.#e.sortByColumn(),e=this.spkSort();return!t||!e?!1:t===`-${e}`})}#e;toggleSort(){let t=this.spkSort();t&&this.#e.toggleSort(t)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(e,i){e&1&&E("mousedown",function(){return i.toggleSort()}),e&2&&I("sort-asc",i.sortAsc())("sort-desc",i.sortDesc())},inputs:{spkSort:[1,"spkSort"]}})}}return n})();var ee=1.5,Mi=(()=>{class n{constructor(){this.#e=b(H),this.#i=b(ce,{optional:!0}),this.loading=g(!1),this.data=g([]),this.dataChange=X(),this.sortByColumn=A(null),this.thead=U("thead"),this.columns=Qe(this.thead,["TH"]),this.class=C(this.#i?.tableType??"default"),this.resizing=C(!1),this.sizeTrigger=C(!0),this.#t=null,this.#n=C(!1),this.scrollXState=C(-1),this.scrollYState=C(-1),this.canScrollX=C(!1),this.canScrollY=C(!1),this.columnSizes=D(()=>{this.sizeTrigger();let t=this.columns.signal();return t.reduce((e,i,o)=>{let s=i,r=o===t.length-1;return s.dataset.size?`${e} ${s.dataset.size}`:s.classList.contains("sticky")||s.classList.contains("sticky-end")?`${e} min-content`:r?`${e} 1fr`:`${e} 1fr`},"")}),this.e=R(()=>{let t=this.sortByColumn();if(t===null)return this.#n()||(this.#t=this.data(),this.#n.set(!0)),this.dataChange.emit(structuredClone(this.#t));let e=t.startsWith("-")?t.slice(1):t,i=t.startsWith("-"),o=this.data().sort((s,r)=>{let p=s[e],l=r[e],u=0;return typeof p=="number"&&typeof l=="number"&&(u=p-l),p instanceof Date&&l instanceof Date&&(u=p.getTime()-l.getTime()),typeof p=="string"&&typeof l=="string"&&(u=p.localeCompare(l,void 0,{sensitivity:"base"})),i?-u:u});this.dataChange.emit(o)})}#e;#i;#t;#n;updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){this.#s()}onResize(t){this.#s()}ngAfterViewInit(){queueMicrotask(()=>this.#s())}toggleSort(t){let e=this.sortByColumn(),i=e===t?`-${t}`:e===`-${t}`?null:t;this.sortByColumn.set(i)}#s(){let t=this.#e.nativeElement,e=-1,i=-1,o=t.scrollWidth>t.clientWidth+ee;if(o){let r=t.scrollLeft<=ee;t.scrollWidth-(t.scrollLeft+t.clientWidth)<ee?e=1:r||(e=0)}this.scrollXState.set(e),this.canScrollX.set(o);let s=t.scrollHeight>t.clientHeight+ee;if(s){let r=t.scrollTop<=ee;t.scrollHeight-(t.scrollTop+t.clientHeight)<ee?i=1:r||(i=0)}this.scrollYState.set(i),this.canScrollY.set(s)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-table"]],viewQuery:function(e,i){e&1&&N(i.thead,ui,5),e&2&&Y()},hostVars:18,hostBindings:function(e,i){e&1&&E("scroll",function(){return i.onScroll()})("resize",function(s){return i.onResize(s)},!1,Pe),e&2&&(Q(i.class()),j("grid-template-columns",i.columnSizes()),I("resizing",i.resizing())("can-scroll-x",i.canScrollX())("can-scroll-y",i.canScrollY())("scrolled-x",i.scrollXState()>=0)("scrolled-x-end",i.scrollXState()===1)("scrolled-y",i.scrollYState()>=0)("scrolled-y-end",i.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:fi,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(e,i){e&1&&(x(hi),a(0,"thead",null,0),h(2),O(3,mi,1,0,"spk-progress-bar",1),c(),a(4,"tbody"),h(5,1),c(),O(6,gi,2,0,"div",2)),e&2&&(m(3),T(i.loading()?3:-1),m(3),T(i.loading()?-1:6))},dependencies:[Ei],encapsulation:2,changeDetection:0})}}return n})(),fn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-tabs"]],ngContentSelectors:L,decls:1,vars:0,template:function(e,i){e&1&&(x(),h(0))},encapsulation:2,changeDetection:0})}}return n})(),mn=(()=>{class n{constructor(){this.isActive=A(!1),this.disallowToggle=g(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(e,i){e&2&&I("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Ci,decls:6,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"content"]],template:function(e,i){e&1&&(x(vi),a(0,"h3",0),E("click",function(){return i.disallowToggle()||i.toggle()}),h(1,0,null,_i,1,0),O(3,Si,2,0,"spk-icon",1),c(),a(4,"div",2),h(5,1),c()),e&2&&(m(3),T(i.disallowToggle()?-1:3))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),gn=(()=>{class n{static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["spk-toggle"]],ngContentSelectors:L,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(e,i){e&1&&(x(),a(0,"div",0),q(1,"div",1),c(),h(2))},encapsulation:2,changeDetection:0})}}return n})();var vn=(()=>{class n{constructor(){this.filesOver=C(!1),this.filesDropped=X()}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!0)}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1)}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(!1);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e)}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&E("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),e&2&&I("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();var Ii=(()=>{class n{constructor(){this.positionAnchorName=g.required()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275cmp=S({type:n,selectors:[["sparkle-tooltip-wrapper"]],hostVars:2,hostBindings:function(e,i){e&2&&j("position-anchor",i.positionAnchorName())},inputs:{positionAnchorName:[1,"positionAnchorName"]},ngContentSelectors:L,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(e,i){e&1&&(x(),a(0,"div",0),h(1),c())},encapsulation:2})}}return n})(),Cn=(()=>{class n{constructor(){this.spkTooltip=g.required(),this.#e=b(H),this.#i=b(Ae),this.#t=b(Re),this.#n=b(me),this.#s=null,this.#o=null,this.anchorName=C(`--${Oe()}`),this.manageWrapperEffect=R(()=>{let t=this.spkTooltip();if(this.cleanupTooltip(),t){let e;typeof t=="string"?e=[this.#n.createText(t)]:t instanceof oe?(this.#o=t.createEmbeddedView(null),this.#o.detectChanges(),e=this.#o.rootNodes):e=[],e.length>0&&(this.#s=this.#i.createComponent(Ii,{environmentInjector:this.#t,projectableNodes:[e]}),this.#s.setInput("positionAnchorName",this.anchorName()),this.#s.changeDetectorRef.detectChanges())}})}#e;#i;#t;#n;#s;#o;onClick(t){let e=this.#e.nativeElement;(e.hasAttribute("disabled")||e.hasAttribute("readonly"))&&(t.preventDefault(),t.stopPropagation())}cleanupTooltip(){this.#s&&(this.#s.destroy(),this.#s=null),this.#o&&(this.#o.destroy(),this.#o=null)}ngOnDestroy(){this.cleanupTooltip()}static{this.\u0275fac=function(e){return new(e||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:2,hostBindings:function(e,i){e&1&&E("click",function(s){return i.onClick(s)}),e&2&&j("anchor-name",i.anchorName())},inputs:{spkTooltip:[1,"spkTooltip"]}})}}return n})();export{te as a,Ji as b,Zi as c,yi as d,en as e,tn as f,Di as g,nn as h,xi as i,wi as j,on as k,Ee as l,sn as m,rn as n,an as o,Ei as p,ln as q,cn as r,Ti as s,pn as t,dn as u,un as v,hn as w,Mi as x,fn as y,mn as z,gn as A,vn as B,Cn as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as be}from"./chunk-WZRSQ7XL.js";import{s as xe}from"./chunk-5ENRUF35.js";import{A as Te,a as ge,f as me,l as Ce,n as Pe,p as Ee}from"./chunk-AL5KGNEF.js";import{h as ve}from"./chunk-FRSQ5NDX.js";import{ia as fe}from"./chunk-M3WT5B3C.js";import{$a as K,B as ne,Bb as re,Cb as oe,Cc as _e,Db as h,Eb as f,F as q,Fb as le,Ib as z,Jb as B,Pc as W,Qc as A,Rb as $,Sb as ae,Tb as ce,Ua as m,Vb as R,Wb as u,Xb as de,Yb as D,Z as X,ea as N,fa as k,gb as ie,gc as J,hc as pe,ic as Y,jc as S,lb as M,lc as ue,n as ee,r as L,ra as Q,sa as T,ub as U,va as O,vb as se,wb as v,wc as V,x as te,xc as he,zb as F}from"./chunk-AHUC7M75.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var we=["treeContainer"],ye=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),Me=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&1){let e=B();h(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),f(),h(3,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),f()()}if(s&2){let e=u();m(),v("active",e.pathDiscoveryMethod()==="browse"),m(2),v("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&le(0,"spk-progress-bar",9)}function Be(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(s,t){s&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(s,t){if(s&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),s&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(s,t){s&1&&z(0)}function Ge(s,t){if(s&1&&M(0,je,1,0,"ng-container",10),s&2){let e=u(2).$implicit,n=u().$implicit;u();let i=Y(7);U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Me,he(2,Ie,e.children,n.level+1)))}}function qe(s,t){if(s&1){let e=B();h(0,"div",14,3),R("click",function(){N(e);let i=u().$implicit,o=u(2);return k(o.toggleNode(i.id,i))}),h(2,"div",15),M(3,Ve,3,1)(4,He,2,0,"spk-icon",16),f(),h(5,"div",17),R("click",function(i){N(e);let o=u().$implicit,a=u(2);return k(a.toggleSelectedNode(i,o))}),S(6),f()(),M(7,Ge,1,7,"ng-container")}if(s&2){let e=u().$implicit,n=u().$implicit,i=u();v("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),v("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),ue(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(s,t){if(s&1&&M(0,qe,8,17),s&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),s&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(s,t){s&1&&z(0)}function Ue(s,t){if(s&1){let e=B();h(0,"spk-toggle",19),R("click",function(){N(e);let i=u();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),f()}if(s&2){let e=u();v("active",e._showHiddenNodes()),m(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Oe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Oe||{}),Z=class s{#e=X(ve);#t=X(be);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);hideShortcuts=T(!1);includes=Q();excludes=Q();_showHiddenNodes=O(!1);treeContainerRef=K("treeContainer");formRef=K("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#n=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Oe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),n=structuredClone(e);for(let r=0;r<n.length;r++){let c=n[r].slice(1);if(c.startsWith("{")&&c.endsWith("}")){let p=c.slice(1,-1),d=this.filterGroups?.FilterGroups[p];if(d&&d.length){let b=d.map(P=>`-${P}`);n.splice(r,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(r=>({id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(r=>{let g=new Map,c=r?.id;a&&(r.accepted=!0),g.set(r.id,r);let p=o.length>0?i.filter(d=>d.parentPath===r.id):i;for(let d of p){let b=o.length>0?d.id.replace(c??"",""):d.id,P=C?"\\":"/",_=b.split(P).filter(Boolean),E="",x=r;for(let H of _){if(E+=H+P,!g.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,C),w={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};a&&(w.accepted=this.matchAccepts(a,w)),g.set(E,w),x.children.push(w)}x=g.get(E)}}return r}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(r=>!r.startsWith("-")&&!r.startsWith("+")),l=t.filter(r=>r.startsWith("-")||r.startsWith("+"));if(C.length===0)return a;for(let r=0;r<C.length;r++){let g=C[r];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let r=0;r<l.length;r++){let g=l[r],c=g.slice(1),p=g.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?c.slice(2):c).startsWith(d)&&c.endsWith(d)){if(n!=="folder")continue;if(e===c){a=p==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith(`*${d}`)){if(n!=="folder")continue;let _=c.slice(1,-2);if(_==="")break;if(e?.includes(_+d)){a=p==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let _=c.slice(3,-7);if(new RegExp(_).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let _=c.slice(1,-1),E=this.translateCSharpRegex(_);if(new RegExp(`${E}`).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}if(c==="")continue;if(c===e){a=p==="include"?1:-1;break}if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}return a}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();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 i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{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.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}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 i=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):i.some(a=>a.startsWith(o))?this.currentPath.set(i.filter(a=>a!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==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(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(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.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>l.split(e?"\\":"/").filter(r=>r.includes(".")?!1:r)),a=["/"];o.forEach(l=>{l.forEach((r,g)=>{let c=l.slice(0,g+1).join(e?"\\":"/"),p=c;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+c),a.includes(p)||a.push(p)})}),this.isLoading.set(!0);let C=a.map(l=>this.#r(l).pipe(L(r=>({status:"success",value:r,url:l})),ne(r=>ee({status:"error",value:r,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let r=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=r.flatMap(b=>b.value.map(P=>{let _=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=_&&_.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(_&&_.split("/").filter(Boolean).join("/")),w=i.findIndex(y=>this.multiSelect()?I.startsWith(y):I===y)>-1,Fe=i.findIndex(y=>y===_)>-1,Se=n.findIndex(y=>y===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:w&&!Se||Fe})})),d=[...new Map([...c,...p].map(b=>[b.id,b])).values()];return this.#l(),d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let C=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(C).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(C)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let g=l.id.includes("\\")?"\\":"/",c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(g)?"folder":"file";return G(j({},l),{cls:c,parentPath:e})}),C=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?C.filter(l=>!l.id.startsWith("%")):C})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=ie({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,we,5),J(n.formRef,ye,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&v("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browse 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,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(Ne),M(0,Ae,5,4,"spk-button-group"),h(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),h(3,"div",8,0),M(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,_e)(8,Ke,1,0,"ng-container",10),f(),M(9,Ue,2,3,"spk-toggle",11),f(),h(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),f()()),e&2){let i=Y(7);F(n.multiSelect()?-1:0),m(),v("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),v("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Me,V(11,Re,n.treeStructure()))),m(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),m(),v("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[me,Te,ge,Ce,Pe,Ee,fe,xe],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-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);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-3);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:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.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:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
|
|
1
|
+
import{a as be}from"./chunk-2CXHZS6X.js";import{s as xe}from"./chunk-ABANCAM5.js";import{A as Te,a as ge,f as me,l as Ce,n as Pe,p as Ee}from"./chunk-ESAGJOZZ.js";import{h as ve}from"./chunk-N5FH4YAX.js";import{ia as fe}from"./chunk-EBXJGPRA.js";import{$a as K,B as ne,Bb as re,Cb as oe,Db as h,Dc as _e,Eb as f,F as q,Fb as le,Ib as z,Jb as B,Qc as W,Rb as $,Rc as A,Sb as ae,Tb as ce,Ua as m,Vb as R,Wb as u,Xb as de,Yb as D,Z as X,ea as N,fa as k,gb as ie,gc as J,hc as pe,ic as Y,jc as S,lb as M,lc as ue,n as ee,r as L,ra as Q,sa as T,ub as U,va as O,vb as se,wb as v,wc as V,x as te,xc as he,zb as F}from"./chunk-4KE2I7OA.js";import{a as j,b as G}from"./chunk-7CGTOI24.js";var we=["treeContainer"],ye=["formRef"],Ne=[[["label"]],[["label"]],[["input"]]],ke=["label","label","input"],Re=s=>({children:s,level:0}),Me=s=>({$implicit:s}),Ie=(s,t)=>({children:s,level:t}),We=(s,t)=>t.id;function Ae(s,t){if(s&1){let e=B();h(0,"spk-button-group")(1,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("browse"))}),$(2,4),f(),h(3,"button",13),R("click",function(){N(e);let i=u();return k(i.pathDiscoveryMethod.set("path"))}),$(4,5),f()()}if(s&2){let e=u();m(),v("active",e.pathDiscoveryMethod()==="browse"),m(2),v("active",e.pathDiscoveryMethod()==="path")}}function Le(s,t){s&1&&le(0,"spk-progress-bar",9)}function Be(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-down"),f(),h(2,"spk-icon",16),S(3,"folder-open"),f())}function $e(s,t){s&1&&(h(0,"spk-icon"),S(1,"file"),f())}function De(s,t){s&1&&(h(0,"spk-icon",18),S(1,"caret-right"),f(),h(2,"spk-icon",16),S(3,"folder"),f())}function Ve(s,t){if(s&1&&M(0,Be,4,0)(1,$e,2,0,"spk-icon")(2,De,4,0),s&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2)}}function He(s,t){s&1&&(h(0,"spk-icon",16),S(1,"desktop-tower"),f())}function je(s,t){s&1&&z(0)}function Ge(s,t){if(s&1&&M(0,je,1,0,"ng-container",10),s&2){let e=u(2).$implicit,n=u().$implicit;u();let i=Y(7);U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(5,Me,he(2,Ie,e.children,n.level+1)))}}function qe(s,t){if(s&1){let e=B();h(0,"div",14,3),R("click",function(){N(e);let i=u().$implicit,o=u(2);return k(o.toggleNode(i.id,i))}),h(2,"div",15),M(3,Ve,3,1)(4,He,2,0,"spk-icon",16),f(),h(5,"div",17),R("click",function(i){N(e);let o=u().$implicit,a=u(2);return k(a.toggleSelectedNode(i,o))}),S(6),f()(),M(7,Ge,1,7,"ng-container")}if(s&2){let e=u().$implicit,n=u().$implicit,i=u();v("accepted",e.accepted===!0)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0),m(2),v("file",e.cls==="file"),m(),F(e.id!=="/"?3:4),m(3),ue(" ",e.text," "),m(),F(e.children.length>0?7:-1)}}function Xe(s,t){if(s&1&&M(0,qe,8,17),s&2){let e=t.$implicit,n=u(2);F(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Qe(s,t){if(s&1&&(h(0,"spk-list"),re(1,Xe,1,1,null,null,We),f()),s&2){let e=t.$implicit;se("padding-left",e.level*.25,"rem"),m(),oe(e.children)}}function Ke(s,t){s&1&&z(0)}function Ue(s,t){if(s&1){let e=B();h(0,"spk-toggle",19),R("click",function(){N(e);let i=u();return k(i._showHiddenNodes.set(!i._showHiddenNodes()))}),$(1,6),f()}if(s&2){let e=u();v("active",e._showHiddenNodes()),m(),ae(e.showFiles()?"files":"folders"),ce(1)}}var Oe=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(Oe||{}),Z=class s{#e=X(ve);#t=X(be);multiSelect=T(!1);disabled=T(!1);showFiles=T(!1);selectFiles=T(!1);accepts=T(null);startingPath=T(null);rootPaths=T([]);backupSettings=T(null);pathRefreshTrigger=T(!1);showHiddenNodes=T(!1);hideShortcuts=T(!1);includes=Q();excludes=Q();_showHiddenNodes=O(!1);treeContainerRef=K("treeContainer");formRef=K("formRef");pathDiscoveryMethod=O("browse");isLoading=O(!1);currentPath=O("/");#n=O(null);treeSearchQuery=O("");treeNodes=O([]);isWindows=W(()=>this.#t.systemInfo()?.OSType==="Windows");filterGroups=this.#t.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Oe;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),n=structuredClone(e);for(let r=0;r<n.length;r++){let c=n[r].slice(1);if(c.startsWith("{")&&c.endsWith("}")){let p=c.slice(1,-1),d=this.filterGroups?.FilterGroups[p];if(d&&d.length){let b=d.map(P=>`-${P}`);n.splice(r,1,...b)}}}let i=this.searchableTreeNodes(),o=this.rootPaths(),a=this.accepts(),C=this.isWindows(),l=[];return o.length>0?l=o.map(r=>({id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"})):l=[{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],l.map(r=>{let g=new Map,c=r?.id;a&&(r.accepted=!0),g.set(r.id,r);let p=o.length>0?i.filter(d=>d.parentPath===r.id):i;for(let d of p){let b=o.length>0?d.id.replace(c??"",""):d.id,P=C?"\\":"/",_=b.split(P).filter(Boolean),E="",x=r;for(let H of _){if(E+=H+P,!g.has(E)){let I=d.hidden===!0&&t?0:this.#o(n,d.id,d.cls,x,C),w={id:d.id,isIndeterminate:this.isIndeterminate(n,d.id),evalState:I,parentPath:E,resolvedpath:d.id?.startsWith("%")?d.resolvedpath+P:E,hidden:d.hidden,text:d.text,cls:d.cls,children:[]};a&&(w.accepted=this.matchAccepts(a,w)),g.set(E,w),x.children.push(w)}x=g.get(E)}}return r}),l});#o(t,e,n,i,o){if(i.evalState===-1)return-2;let a=0,C=t.filter(r=>!r.startsWith("-")&&!r.startsWith("+")),l=t.filter(r=>r.startsWith("-")||r.startsWith("+"));if(C.length===0)return a;for(let r=0;r<C.length;r++){let g=C[r];if(e?.startsWith(g)){a=1;break}}if(l.length===0)return a;for(let r=0;r<l.length;r++){let g=l[r],c=g.slice(1),p=g.startsWith("-")?"exclude":"include",d=o?"\\":"/";if((o?c.slice(2):c).startsWith(d)&&c.endsWith(d)){if(n!=="folder")continue;if(e===c){a=p==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith(`*${d}`)){if(n!=="folder")continue;let _=c.slice(1,-2);if(_==="")break;if(e?.includes(_+d)){a=p==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith(`[^\\${d}]*]`)){if(n!=="file")continue;let _=c.slice(3,-7);if(new RegExp(_).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let _=c.slice(1,-1),E=this.translateCSharpRegex(_);if(new RegExp(`${E}`).test(e)){a=p==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}if(c==="")continue;if(c===e){a=p==="include"?1:-1;break}if(this.#s(e,c,!0)){a=p==="include"?1:-1;break}}return a}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#s(t,e,n=!1){let i=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${i}${n?"$":""}`).test(t)}showHiddenNodesEffect=A(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=A(()=>{let t=this.pathDiscoveryMethod(),e=this.#n();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 i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):!1}currentPathEffect=A(()=>{let t=this.#n();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=A(()=>{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.#n.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#p(t);else{let e=this.rootPaths();e&&e.length>0?this.#i(null,e[0]):this.#i(null,"/")}}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 i=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),o=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==e.id).join("\0")):i.some(a=>a.startsWith(o))?this.currentPath.set(i.filter(a=>a!==o).join("\0")):this.currentPath.set([...i,o].join("\0")):i.includes(e.id)?this.currentPath.set(i.filter(a=>a!==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(i=>!i.id?.startsWith(e.id)||i.id===e.id)):this.#i(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.#e.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(L(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(L(i=>i.Files??[]))}}#r(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=this.isWindows(),n=t.split("\0").filter(l=>l.startsWith("-")).map(l=>l.slice(1,-1)),i=t.split("\0").filter(l=>!l.startsWith("-")).filter(Boolean),o=i.map(l=>l.split(e?"\\":"/").filter(r=>r.includes(".")?!1:r)),a=["/"];o.forEach(l=>{l.forEach((r,g)=>{let c=l.slice(0,g+1).join(e?"\\":"/"),p=c;p.indexOf(":")===-1&&!p.startsWith("%")&&(p="/"+c),a.includes(p)||a.push(p)})}),this.isLoading.set(!0);let C=a.map(l=>this.#r(l).pipe(L(r=>({status:"success",value:r,url:l})),ne(r=>ee({status:"error",value:r,url:l}))));te(C).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:l=>{let r=l.filter(c=>c.status==="success"),g=l.filter(c=>c.status==="error");this.treeNodes.update(c=>{let p=r.flatMap(b=>b.value.map(P=>{let _=P.id,E=P.id.startsWith("%")&&P.id.endsWith("%")?P.resolvedpath+"/":P.id,x=_&&_.split("/").filter(Boolean).slice(0,-1).join("/"),I="/"+(_&&_.split("/").filter(Boolean).join("/")),w=i.findIndex(y=>this.multiSelect()?I.startsWith(y):I===y)>-1,Fe=i.findIndex(y=>y===_)>-1,Se=n.findIndex(y=>y===I)>-1;return G(j({},P),{cls:E.endsWith("/")||E.endsWith("\\")?"folder":"file",parentPath:x.startsWith("%")?x:"/"+x,isSelected:w&&!Se||Fe})})),d=[...new Map([...c,...p].map(b=>[b.id,b])).values()];return this.#l(),d})}})}#i(t=null,e="/"){this.isLoading.set(!0),this.#r(e).pipe(q(()=>this.isLoading.set(!1))).subscribe({next:n=>{let i=this.isByBackupSettings()?n.map(o=>{let C=o.Path.includes("\\")?"\\":"/";return{text:o.Path.split(C).filter(l=>l!=="").pop(),id:o.Path,cls:o.Path.endsWith(C)?"folder":"file",leaf:t!==null,resolvedpath:o.Path,hidden:!1}}):n;this.treeNodes.update(o=>{let a=i.map(l=>{let g=l.id.includes("\\")?"\\":"/",c=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith(g)?"folder":"file";return G(j({},l),{cls:c,parentPath:e})}),C=[...new Map([...o,...a].map(l=>[l.id,l])).values()];return this.hideShortcuts()?C.filter(l=>!l.id.startsWith("%")):C})}})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=ie({type:s,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(J(n.treeContainerRef,we,5),J(n.formRef,ye,5)),e&2&&pe(2)},hostVars:2,hostBindings:function(e,n){e&2&&v("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:ke,decls:15,vars:15,consts:()=>{let t;t=$localize` Browse 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,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(de(Ne),M(0,Ae,5,4,"spk-button-group"),h(1,"div",7),D(2,0,["ngProjectAs","label",5,["label"]]),h(3,"div",8,0),M(5,Le,1,0,"spk-progress-bar",9)(6,Qe,3,2,"ng-template",null,1,_e)(8,Ke,1,0,"ng-container",10),f(),M(9,Ue,2,3,"spk-toggle",11),f(),h(10,"div",12,2)(12,"spk-form-field"),D(13,1,["ngProjectAs","label",5,["label"]]),D(14,2,["ngProjectAs","input",5,["input"]]),f()()),e&2){let i=Y(7);F(n.multiSelect()?-1:0),m(),v("hidden",n.pathDiscoveryMethod()!=="browse"),m(2),v("visualize-accepted",n.accepts()),m(2),F(n.isLoading()?5:-1),m(3),U("ngTemplateOutlet",i)("ngTemplateOutletContext",V(13,Me,V(11,Re,n.treeStructure()))),m(),F(!n.accepts()&&!n.isByBackupSettings()?9:-1),m(),v("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[me,Te,ge,Ce,Pe,Ee,fe,xe],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-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);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-3);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:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(spk-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.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:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ba as s,Ca as r}from"./chunk-
|
|
1
|
+
import{Ba as s,Ca as r}from"./chunk-EBXJGPRA.js";import{T as l,Z as a,za as o}from"./chunk-4KE2I7OA.js";var n=class i{platformId=a(o);STORAGE_VERSION="v1";APP_NAME="duplicati";getItemParsed(t,e=!1){return r(this.platformId)?null:JSON.parse(localStorage.getItem(`${this.STORAGE_VERSION}:${e?"presist-duplicati":this.APP_NAME}:${t}`)??"null")}setItemParsed(t,e,m=!1){if(!r(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${m?"presist-duplicati":this.APP_NAME}:${t}`,JSON.stringify(e))}get length(){return s(this.platformId)?localStorage.length:0}getItem(t){return r(this.platformId)?null:localStorage.getItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)??null}setItem(t,e){if(!r(this.platformId))return localStorage.setItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`,e)}removeItem(t){r(this.platformId)||localStorage.removeItem(`${this.STORAGE_VERSION}:${this.APP_NAME}:${t}`)}clearAllNotCurrentVersion(){if(!r(this.platformId))for(var t in localStorage)!t.startsWith(this.STORAGE_VERSION)&&t.includes(this.APP_NAME)&&localStorage.removeItem(t)}clearAll(){r(this.platformId)||localStorage.clear()}clear(){if(!r(this.platformId))for(var t in localStorage)t.includes(this.APP_NAME)&&!t.includes(`presist-${this.APP_NAME}`)&&localStorage.removeItem(t)}key(t){return r(this.platformId)?null:localStorage.key(t)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=l({token:i,factory:i.\u0275fac})};export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as L}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-FQ55IACT.js";import{d as A}from"./chunk-WRKRV6RQ.js";import{a as k,c as I,h as w}from"./chunk-N5FH4YAX.js";import{B as m,E as o,F as y,P as l,T as a,Z as i,f as h,k as u,n as g,r as d,va as n}from"./chunk-4KE2I7OA.js";var c=class s{#r=i(L);#i=n(null);#t=window.self!==window.top;#s=n(this.#t);relayIsEnabled=this.#s.asReadonly();config=this.#i.asReadonly();configLoaded=this.#t?new u:null;isLoading=n(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#n(),this.#t&&(this.#s.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let t=e.data.replace("access:",""),r=JSON.parse(t);if(!r?.accessToken||!r?.clientId){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof r.clientId!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof r.accessToken!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}let R=this.#r.getItem("locale")??"en-US",p=r.locale??"en-US";R!==p&&(this.#r.setItem("locale",p),window.location.reload()),this.#i.set(r),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#n(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#i.set(e)}clearConfig(){this.#i.set(null)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=a({token:s,factory:s.\u0275fac,providedIn:"root"})};var f="PROXY_AUTHED_FAKE_TOKEN",b=class s{#r=i(A);#i=i(I);#t=i(w);#s=i(c);#e=n(null);#n=n(!1);token=this.#e.asReadonly();isLoggingOut=this.#n.asReadonly();login(e){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(o(1),l(t=>t.AccessToken&&this.#e.set(t.AccessToken)))}refreshToken(){return this.#s.relayIsEnabled()?(this.#e.set(f),new h(e=>{e.next({AccessToken:f}),e.complete()})):this.#t.postApiV1AuthRefresh().pipe(o(1),l(e=>e.AccessToken&&this.#e.set(e.AccessToken)))}checkProxyAuthed(){let e=new k({"custom-proxy-check":"true"});return this.#i.get("/api/v1/systeminfo",{headers:e}).pipe(d(()=>(this.#e.set(f),!0)),m(()=>g(!1)))}logout(){this.#n.set(!0),this.#t.postApiV1AuthRefreshLogout().pipe(o(1),y(()=>{this.#n.set(!1),this.#e.set(null),this.#r.navigate(["/login"])})).subscribe()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=a({token:s,factory:s.\u0275fac,providedIn:"root"})};export{c as a,f as b,b as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as a,f as b}from"./chunk-V7XW25LT.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-UEYPJIJG.js";import"./chunk-2CXHZS6X.js";import"./chunk-LUKUBN2Z.js";import"./chunk-ABANCAM5.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import"./chunk-ESAGJOZZ.js";import"./chunk-N5FH4YAX.js";import"./chunk-EBXJGPRA.js";import"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as te}from"./chunk-KPH4ZAFT.js";import{a as gt}from"./chunk-XWYNCG3P.js";import{l as ae}from"./chunk-VPTXHYYV.js";import"./chunk-43BIRTPL.js";import"./chunk-FP6LM56A.js";import"./chunk-M5RL4LRX.js";import"./chunk-HIW2CN45.js";import"./chunk-4V45XF67.js";import"./chunk-UEYPJIJG.js";import{a as Tt}from"./chunk-T7QZL5YJ.js";import{a as K}from"./chunk-2CXHZS6X.js";import{a as St}from"./chunk-VZBWK3XF.js";import"./chunk-XHPURHO2.js";import"./chunk-7V4TPS4B.js";import"./chunk-T5WAKBP3.js";import{a as ct}from"./chunk-LUKUBN2Z.js";import"./chunk-RHW5QVAY.js";import"./chunk-DLJSVAM2.js";import{c as Q,e as Z,h as J,l as pt,s as Y,t as ee}from"./chunk-ABANCAM5.js";import"./chunk-FSKPPAVO.js";import{a as nt}from"./chunk-FQ55IACT.js";import"./chunk-WRKRV6RQ.js";import"./chunk-DYTQQHMA.js";import{A as _t,C as dt,a as W,b as H,e as it,g as q,k as ot,l as j,p as st,q as at,r as lt,t as rt}from"./chunk-ESAGJOZZ.js";import{h as k}from"./chunk-N5FH4YAX.js";import"./chunk-GQGMGFDX.js";import"./chunk-EBXJGPRA.js";import"./chunk-QUOBR5MG.js";import{$a as je,B as b,Db as i,Eb as o,F as R,Fb as I,Jb as P,Pb as X,Qb as V,Qc as F,Ra as qe,Rb as l,Rc as $,Sb as oe,T as He,Tb as se,Ua as r,Ub as Ze,Vb as S,Wb as p,Z as E,Zb as Je,a as Ue,b as Be,c as We,ea as u,fa as m,gb as w,gc as Ye,hc as et,jc as O,kc as z,lb as f,lc as U,n as v,oc as y,pc as G,qc as A,rb as Ke,sb as Qe,ub as h,uc as tt,va as c,vc as B,wb as N,zb as C}from"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";var Ct=["formRef"],Et=()=>[import("./chunk-W66AXGSW.js").then(s=>s.OptionsListComponent)];function ft(s,e){s&1&&(i(0,"spk-alert",3),l(1,1),o())}function Nt(s,e){if(s&1){let t=P();i(0,"app-options-list",5),A("optionsChange",function(a){u(t);let _=p();return G(_.settings,a)||(_.settings=a),m(a)}),o()}if(s&2){let t=p();y("options",t.settings),h("hasFreeTextSettings",!0)}}var Mt=["Bytes","KB","MB","GB","TB","PB"],x=class s{#e=E(ae);#t=E(te);#i=E(k);formRef=je.required("formRef");settings=this.#e.settings;isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);sizeOptions=c(Mt);lastRecievedServerSettings=c({});serverSettingsEffect=$(()=>{let e=this.#t.serverSettings();if(e===void 0)return;this.lastRecievedServerSettings.set(e),this.isLoadingOptions.set(!0);let t=Object.entries(e);t.forEach(([n,a],_)=>{if(n.startsWith("--")){let T=n.replace("--","");this.settings.update(g=>(g.some(M=>M.Name===T)||g.push({Name:T,Value:a}),g))}_===t.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let e=this.settings(),t=this.lastRecievedServerSettings(),n=e.map(g=>g.Name),_=Object.keys(t).filter(g=>!n.includes(g.replace("--",""))),T=e.reduce((g,M)=>(g[`--${M.Name}`]=M.Value,g),{});_.forEach(g=>{T[g]=null}),this.#i.patchApiV1Serversettings({requestBody:T}).pipe(R(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#t.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(t,n){t&1&&Ye(n.formRef,Ct,5),t&2&&et()},features:[tt([ae])],decls:8,vars:4,consts:()=>{let e;e=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPK_ICON: Save settings `;let t;return t=$localize`Settings saved`,[e,t,[1,"actions"],[1,"success"],["spk-button","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(t,n){t&1&&(i(0,"div",2),f(1,ft,2,0,"spk-alert",3),i(2,"button",4),S("click",function(){return n.submit()}),X(3,0),I(4,"spk-icon"),V(),o()(),f(5,Nt,1,2),Ke(6,5,Et)),t&2&&(r(),C(n.saved()?1:-1),r(),N("loader",n.isSubmitting()),r(4),Qe(!n.isLoadingOptions()))},dependencies:[ee,q,W,H],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var L=class s{#e=E(it);#t=E(k);#i=E(K);repeatRegisterTimer=null;state=c("unknown");claimUrl=c(null);registerUrl=c("");status=F(()=>{let e=this.state();return e==="enabled"?"Remote control is enabled but not connected":e==="connected"?"Remote control is connected":e==="registering"?"Registering machine...":e==="registeringfaulted"?"Registration failed":e==="registered"?"Registered, waiting for accept":e==="disabled"?"Remote control is configured but not enabled":e==="unknown"?"...loading...":"Remote control is not set up"});sysInfoEffect=$(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#n(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("enabled"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");let t=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#n(n),error:n=>this.#o(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#n(n)})}#o(e){this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#n(t)})}refreshRemoteControlStatus(){this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#n(e),error:e=>this.#o(e)})}deleteRemoteControl(){let e=this;this.#e.open(ct,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the remote control registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:t=>{t&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:n=>e.#n(n),error:n=>e.#o(n)})}})}static \u0275fac=function(t){return new(t||s)};static \u0275prov=He({token:s,factory:s.\u0275fac,providedIn:"root"})};function Pt(s,e){if(s&1){let t=P();i(0,"spk-form-field",10)(1,"input",11),A("ngModelChange",function(a){u(t);let _=p(2);return G(_.registerUrl,a)||(_.registerUrl=a),m(a)}),o()(),i(2,"button",12),S("click",function(){u(t);let a=p(2);return m(a.register())}),l(3,0),o()}if(s&2){let t=p(2);r(),y("ngModel",t.registerUrl)}}function Ot(s,e){if(s&1&&(i(0,"div",8)(1,"label"),l(2,1),o(),i(3,"a",13),O(4),o()()),s&2){let t=p(2);r(3),Je("href",t.claimUrl(),qe),r(),z(t.claimUrl())}}function Rt(s,e){s&1&&(i(0,"div",8)(1,"label"),l(2,2),o()())}function It(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.cancel())}),l(1,3),o()}}function yt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.disable())}),l(1,4),o()}}function Gt(s,e){if(s&1){let t=P();i(0,"button",12),S("click",function(){u(t);let a=p(2);return m(a.enable())}),l(1,5),o(),i(2,"button",14),S("click",function(){u(t);let a=p(2);return m(a.delete())}),l(3,6),o()}}function At(s,e){if(s&1&&(i(0,"div",7),f(1,Pt,4,1)(2,Ot,5,2,"div",8)(3,Rt,3,0,"div",8)(4,It,2,0,"button",9)(5,yt,2,0,"button",9)(6,Gt,4,0),o()),s&2){let t=p();r(),C(t.state()==="inactive"?1:-1),r(),C(t.state()==="registered"?2:-1),r(),C(t.state()==="registering"?3:-1),r(),C(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),r(),C(t.state()==="connected"||t.state()==="enabled"?5:-1),r(),C(t.state()==="disabled"?6:-1)}}var ne=class s{#e=E(L);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let e;e=$localize`Register for remote control`;let t;t=$localize`Machine is now registered, open this link to add it to your account:`;let n;n=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let _;_=$localize`Disable remote control`;let T;T=$localize`Enable remote control`;let g;return g=$localize`Delete remote control setup`,[e,t,n,a,_,T,g,[1,"field-row"],[1,"field-col"],["type","button","spk-button","",1,"raised"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","spk-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","spk-button","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","spk-button","",1,"raised","error",3,"click"]]},template:function(t,n){t&1&&f(0,At,7,6,"div",7),t&2&&C(n.state()!=="unknown"?0:-1)},dependencies:[Y,Q,Z,J,j],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};function mt(...s){let e=c(...s);return Object.defineProperty(e,"value",{get:e.asReadonly(),set:e.set.bind(e)})}var re=()=>({standalone:!0});function $t(s,e){s&1&&(i(0,"spk-icon",69),O(1,"check"),o())}function vt(s,e){s&1&&(i(0,"spk-icon",70),O(1,"prohibit"),o())}function bt(s,e){if(s&1){let t=P();i(0,"button",74),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,34),o()}if(s&2){let t=p(2);N("loader",t.isUpdating())}}function wt(s,e){if(s&1){let t=P();i(0,"button",75),S("click",function(){u(t);let a=p(2);return m(a.updatePassphrase())}),l(1,35),o()}if(s&2){let t=p(2);N("loader",t.isUpdating()),h("disabled",!0)}}function kt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",65),l(2,31),o(),i(3,"input",66),A("ngModelChange",function(a){u(t);let _=p();return G(_.passphrase,a)||(_.passphrase=a),m(a)}),o()(),i(4,"spk-form-field")(5,"label",67),l(6,32),o(),i(7,"input",68),A("ngModelChange",function(a){u(t);let _=p();return G(_.repeatPassphrase,a)||(_.repeatPassphrase=a),m(a)}),o(),f(8,$t,2,0,"spk-icon",69)(9,vt,2,0,"spk-icon",70),o(),i(10,"div",48)(11,"button",71),S("click",function(){u(t);let a=p();return m(a.cancelPasswordChange())}),l(12,33),o(),f(13,bt,2,2,"button",72)(14,wt,2,3,"button",73),o()}if(s&2){let t=p();r(3),y("ngModel",t.passphrase),r(4),h("disabled",t.passphrase().length===0),y("ngModel",t.repeatPassphrase),r(),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?8:9),r(3),N("loader",t.isUpdating()),r(2),C(t.passphrase().length!==0&&t.passphrase()===t.repeatPassphrase()?13:14)}}function Lt(s,e){s&1&&(i(0,"spk-icon",76),O(1,"check"),o())}function Ft(s,e){if(s&1){let t=P();i(0,"div",48)(1,"button",71),S("click",function(){u(t);let a=p();return m(a.openPassphraseForm())}),l(2,36),o(),f(3,Lt,2,0,"spk-icon",76),o()}if(s&2){let t=p();r(3),C(t.passwordUpdated()?3:-1)}}function xt(s,e){if(s&1){let t=P();i(0,"spk-form-field")(1,"label",77),l(2,37),o(),i(3,"textarea",78),A("ngModelChange",function(a){u(t);let _=p();return G(_.allowedHostnames,a)||(_.allowedHostnames=a),m(a)}),o()(),i(4,"spk-alert",79),l(5,38),o(),i(6,"button",74),S("click",function(){u(t);let a=p();return m(a.updateAllowedHostnames())}),l(7,39),o()}if(s&2){let t=p();r(3),y("ngModel",t.allowedHostnames),r(3),N("loader",t.updatingAllowedHosts())}}function Dt(s,e){if(s&1&&O(0),s&2){let t,n=p();U(" ",(t=n.sysinfo())==null?null:t.ServerVersion," ")}}function Xt(s,e){s&1&&I(0,"spk-progress-bar",53)}function Vt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function zt(s,e){if(s&1&&O(0),s&2){let t=e.$implicit;U(" ",t.label," ")}}function Ut(s,e,t){let n=mt(s),a=n[Ue];t?.equal&&(a.equal=t.equal);let _;return n.set=T=>{clearTimeout(_),_=setTimeout(()=>Be(a,T),e)},n.update=T=>{clearTimeout(_),_=setTimeout(()=>We(a,T),e)},n}var Bt=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],Wt=[{value:"none",label:$localize`System default (information)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"none",label:$localize`None / disabled`}],_e=class s{#e=E(St);#t=E(K);#i=E(k);#n=E(te);#o=E(L);#s=E(nt);#a=this.#s.getItem("locale")??"en-US";sysinfo=this.#t.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=c("list");previousLang=this.#a;langCtrl=c(this.#a);usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#o.status;updatingChannel=c(!1);updateChannel=c("");setNewChannel(e){let t=this.updateChannel();this.updateChannel.set(e),this.#i.patchApiV1Serversettings({requestBody:{"update-channel":e}}).pipe(R(()=>this.updatingChannel.set(!1)),b(()=>(this.updateChannel.set(t),v(null)))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updateRemoteAccess(){let e=this.allowRemoteAccess(),t=!e;this.allowRemoteAccess.set(t),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":t?"any":"loopback"}}).pipe(R(()=>this.updatingRemoteAccess.set(!1)),b(()=>(this.allowRemoteAccess.set(e),v(null)))).subscribe()}updateAllowedHostnames(){let e=this.loadedAllowedHostnames(),t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-listen-interface":"any","allowed-hostnames":t}}).pipe(R(()=>this.updatingAllowedHosts.set(!1)),b(()=>(this.allowedHostnames.set(e),v(null)))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=this.disableTrayIconLogin(),t=!e;this.updatingDisableTrayIconLogin.set(!0),this.disableTrayIconLogin.set(t),this.#i.patchApiV1Serversettings({requestBody:{"disable-tray-icon-login":t?"True":"False"}}).pipe(R(()=>this.updatingDisableTrayIconLogin.set(!1)),b(()=>(this.disableTrayIconLogin.set(e),v(null)))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"server-passphrase":this.passphrase()}}).pipe(R(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(Tt);usageStatisticsOptions=c(Wt);timeTypeOptions=c(Bt);timeType=c("none");timeValue=Ut(0,300);timeRange=F(()=>this.timeType()==="h"?[0,24]:[0,60]);timeValueEffect=$(()=>{let e=this.timeValue();this.updateStartupDelay()});updateLocale(e){!e||e===""||e===this.previousLang||(this.#s.setItem("locale",e),window.location.reload())}updateStartupDelay(){let e=this.timeValue(),t=this.timeType(),n="";t!=="none"&&e!==0&&(n=`${e}${t}`),this.#i.patchApiV1Serversettings({requestBody:{"startup-delay":n}}).subscribe()}updateTimeType(e){this.timeType()==="none"&&this.timeValue.set(0),this.timeType.set(e)}updateUsageStatistics(e){let t=this.usageStatistics();!e||e===""||e===t||(this.usageStatistics.set(e),this.updatingUsageStatistics.set(!0),this.#i.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.usageStatistics()==="none"?"":this.usageStatistics()}}).pipe(R(()=>this.updatingUsageStatistics.set(!1)),b(()=>(this.usageStatistics.set(t),v(null)))).subscribe())}serverSettingsEffect=$(()=>{let e=this.#n.serverSettings();if(e===void 0)return;let t=e["startup-delay"],n=t.slice(-1),a=t.slice(0,-1),_=["s","m","h"];this.disableTrayIconLogin.set(e["disable-tray-icon-login"]!=="False"),this.updateChannel.set(e["update-channel"]),this.allowRemoteAccess.set(e["server-listen-interface"]==="any"),this.allowedHostnames.set(e["allowed-hostnames"]),this.loadedAllowedHostnames.set(e["allowed-hostnames"]),this.usageStatistics.set(e["usage-reporter-level"]===""?"none":e["usage-reporter-level"]),this.timeType.set(t==""?"none":_.includes(n)?n:"none"),this.timeValue.set(t==""?0:parseInt(a))});setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=w({type:s,selectors:[["app-settings"]],decls:132,vars:46,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Remote access control`;let a;a=$localize`Color theme`;let _;_=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let g;g=$localize`Change server passphrase`;let M;M=$localize`Language`;let de;de=$localize`Select a language for the platform`;let ce;ce=$localize`Allow remote access (requires restart)`;let pe;pe=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let Se;Se=$localize`Allow remote access`;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Te;Te=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ue;ue=$localize`Prevent tray icon automatic log-in`;let me;me=$localize`Update channel`;let Ce;Ce=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let Ee;Ee=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Stable`;let Ne;Ne=$localize`Official releases`;let Me;Me=$localize`Beta`;let he;he=$localize` Try out the new features that we are working on. Currently the most stable version available. Test Restore data before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Oe;Oe=$localize`Specific builds for developers only. Not for use with important data.`;let Re;Re=$localize`Canary`;let Ie;Ie=$localize`Individual builds for developers only. Not for use with important data.`;let ye;ye=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Ae;Ae=$localize`Usage statistics`;let D;D=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#119\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#119\uFFFD"}:CLOSE_LINK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK:${"[\uFFFD#120\uFFFD\uFFFD/#120\uFFFD|\uFFFD#121\uFFFD\uFFFD/#121\uFFFD]"}:LINE_BREAK: All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,D=Ze(D);let $e;$e=$localize`Advanced options`;let ve;ve=$localize`Enter new password`;let be;be=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let we;we=$localize`Passphrase`;let ke;ke=$localize`Repeat passphrase`;let Le;Le=$localize`Cancel`;let Fe;Fe=$localize` Update passphrase `;let xe;xe=$localize` Update passphrase `;let De;De=$localize`Change password`;let Xe;Xe=$localize`Allowed hostnames`;let Ve;Ve=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let ze;return ze=$localize` Update allowed hostnames `,[e,t,n,a,_,T,g,M,de,ce,pe,Se,ge,Te,ue,me,Ce,Ee,fe,Ne,Me,he,Pe,Oe,Re,Ie,ye,Ge,Ae,D,$e,we,ke,Le,Fe,xe,De,Xe,Ve,ze,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],["href","#"],["label","label","value","value",3,"options","isLoading"],[1,"advanced-settings"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",ve,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",be,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"spk-success"],["suffix",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"loader"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"loader","disabled"],["spk-button","",1,"raised","primary",3,"click"],["spk-button","","spkTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"spk-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"]]},template:function(t,n){if(t&1&&(I(0,"app-status-bar"),i(1,"div",40)(2,"header")(3,"div",41)(4,"h2"),l(5,0),o(),i(6,"p"),l(7,1),o()()(),i(8,"section")(9,"div",42)(10,"h3"),l(11,2),o(),i(12,"p"),O(13),o()(),i(14,"div",43),I(15,"app-remote-control"),o()(),i(16,"section")(17,"div",42)(18,"h3"),l(19,3),o(),i(20,"p"),l(21,4),o()(),i(22,"div",43)(23,"div",44)(24,"img",45),S("click",function(){return n.setLightMode()}),o(),i(25,"img",46),S("click",function(){return n.setDarkMode()}),o()()()(),i(26,"section")(27,"div",42)(28,"h3"),l(29,5),o(),i(30,"p"),l(31,6),o()(),i(32,"div",47),f(33,kt,15,7)(34,Ft,4,1,"div",48),o()(),i(35,"section")(36,"div",42)(37,"h3"),l(38,7),o(),i(39,"p"),l(40,8),o()(),i(41,"div",43)(42,"spk-select",49)(43,"input",50),S("ngModelChange",function(_){return n.updateLocale(_)}),o()()()(),i(44,"section")(45,"div",42)(46,"h3"),l(47,9),o(),i(48,"p"),l(49,10),o()(),i(50,"div",51)(51,"spk-toggle",52),S("click",function(){return n.updateRemoteAccess()}),i(52,"label"),l(53,11),o()(),f(54,xt,8,3),o()(),i(55,"section")(56,"div",42)(57,"h3"),l(58,12),o(),i(59,"p"),l(60,13),o()(),i(61,"div",43)(62,"spk-toggle",52),S("click",function(){return n.saveDisableTrayIconLogin()}),i(63,"label"),l(64,14),o()()()(),i(65,"section")(66,"div",42)(67,"h3"),l(68,15),o(),i(69,"p"),f(70,Dt,1,1),o(),f(71,Xt,1,0,"spk-progress-bar",53),o(),i(72,"div",54)(73,"div",55),S("click",function(){return n.setNewChannel("")}),i(74,"spk-radio",56),l(75,16),o(),i(76,"p"),l(77,17),o()(),i(78,"div",55),S("click",function(){return n.setNewChannel("stable")}),i(79,"spk-radio",56),l(80,18),o(),i(81,"p"),l(82,19),o()(),i(83,"div",55),S("click",function(){return n.setNewChannel("beta")}),i(84,"spk-radio",56),l(85,20),o(),i(86,"p"),l(87,21),o()(),i(88,"div",55),S("click",function(){return n.setNewChannel("experimental")}),i(89,"spk-radio",56),l(90,22),o(),i(91,"p"),l(92,23),o()(),i(93,"div",55),S("click",function(){return n.setNewChannel("canary")}),i(94,"spk-radio",56),l(95,24),o(),i(96,"p"),l(97,25),o()()()()(),I(98,"spk-divider"),i(99,"div",40)(100,"section")(101,"div",42)(102,"h3"),l(103,26),o(),i(104,"p"),l(105,27),o()(),i(106,"div",43)(107,"div",57)(108,"spk-range-slider",58)(109,"input",59),A("ngModelChange",function(_){return G(n.timeValue,_)||(n.timeValue=_),_}),o()(),i(110,"spk-select",60)(111,"input",61),S("ngModelChange",function(_){return n.updateTimeType(_)}),o(),f(112,Vt,1,1,"ng-template"),o()()()(),i(113,"section")(114,"div",42)(115,"h3"),l(116,28),o(),i(117,"p"),X(118,29),I(119,"a",62)(120,"br")(121,"br"),V(),o()(),i(122,"div",43)(123,"spk-select",63)(124,"input",50),S("ngModelChange",function(_){return n.updateUsageStatistics(_)}),o(),f(125,zt,1,1,"ng-template"),o()()()(),i(126,"div",40)(127,"section")(128,"div",64)(129,"h3"),l(130,30),o(),I(131,"app-advanced-options-settings"),o()()()),t&2){let a,_,T;r(13),z(n.remoteControlStatus()),r(11),N("active",!n.isDarkMode()),r(),N("active",n.isDarkMode()),r(8),C(n.showPassphraseForm()?33:34),r(9),h("options",n.languageOptions())("isClearable",!1)("inlineSearch",!0),r(),h("ngModel",n.langCtrl())("ngModelOptions",B(43,re)),r(8),N("active",n.allowRemoteAccess()),r(3),C(n.allowRemoteAccess()?54:-1),r(8),N("active",n.disableTrayIconLogin()),r(8),C(n.updateChannel()!==""&&((a=n.sysinfo())!=null&&a.ServerVersion)?70:-1),r(),C(n.updatingChannel()?71:-1),r(3),N("active",n.updateChannel()===""),r(),oe((_=n.sysinfo())==null?null:_.DefaultUpdateChannel),se(75),r(2),oe((T=n.sysinfo())==null?null:T.ServerVersionType),se(77),r(2),N("active",n.updateChannel()==="stable"),r(5),N("active",n.updateChannel()==="beta"),r(5),N("active",n.updateChannel()==="experimental"),r(5),N("active",n.updateChannel()==="canary"),r(14),h("unit",n.timeType()==="none"?"s":n.timeType()),r(),h("min",n.timeRange()[0])("max",n.timeRange()[1])("disabled",n.timeType()==="none"),y("ngModel",n.timeValue),h("ngModelOptions",B(44,re)),r(),h("options",n.timeTypeOptions())("isClearable",!1),r(),h("ngModel",n.timeType()),r(12),h("options",n.usageStatisticsOptions())("isLoading",n.updatingUsageStatistics()),r(),h("ngModel",n.usageStatistics())("ngModelOptions",B(45,re))}},dependencies:[Y,Q,pt,Z,J,ee,gt,ne,x,q,at,lt,st,_t,dt,j,W,ot,H,rt],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;position:sticky;top:0;background:var(--base-1);z-index:1000;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] spk-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-500)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] spk-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] spk-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] spk-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}"],changeDetection:0})};export{Ut as debounceSignal,_e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{pa as o}from"./chunk-
|
|
1
|
+
import{pa as o}from"./chunk-EBXJGPRA.js";import{a as s}from"./chunk-QUOBR5MG.js";import{Z as e,jb as n}from"./chunk-4KE2I7OA.js";var m=class i{#t=e(s);#r=e(o);convertTimestamp(t){let r=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/.exec(t);if(r){let[a,p,f,c,d,u,h]=r;return`${p}-${f}-${c}T${d}:${u}:${h}Z`}return t}transform(t,r=!1,...a){return t?r?this.#r.transform(t,"short"):(this.#t.locale(),typeof t=="string"&&(t=this.convertTimestamp(t)),this.#t(t).fromNow()):"N/A"}static \u0275fac=function(r){return new(r||i)};static \u0275pipe=n({name:"relativeTime",type:i,pure:!0})};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-OQPUBCLB.js";import"./chunk-QUOBR5MG.js";import"./chunk-4KE2I7OA.js";import"./chunk-7CGTOI24.js";export{a as DurationFormatPipe};
|