@duplicati/ngclient 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/{chunk-A27JK2VW.js → chunk-2HBUGBA5.js} +1 -1
  2. package/{chunk-6SKCAZOP.js → chunk-5554FPJD.js} +1 -1
  3. package/chunk-6A5PS6I6.js +6 -0
  4. package/chunk-7A5XJPT7.js +1 -0
  5. package/{chunk-M76F7EZP.js → chunk-7PTK4MN5.js} +1 -1
  6. package/chunk-7TWD5GBS.js +1 -0
  7. package/{chunk-4VPUEZIU.js → chunk-C7X2VVRU.js} +1 -1
  8. package/{chunk-OZQD3PLH.js → chunk-E44GSPZB.js} +1 -1
  9. package/chunk-ED3PEZLO.js +1 -0
  10. package/chunk-FF6U3HJW.js +1 -0
  11. package/chunk-FN7XSDHO.js +1 -0
  12. package/chunk-I3CYX5BU.js +1 -0
  13. package/chunk-JAXQGUIS.js +1 -0
  14. package/{chunk-TW4633HQ.js → chunk-KKAMLP6E.js} +1 -1
  15. package/chunk-LB7YC2O6.js +1 -0
  16. package/chunk-MRR352S2.js +1 -0
  17. package/{chunk-DAXEWTI7.js → chunk-O2AA7G55.js} +1 -1
  18. package/{chunk-DFKPVTYK.js → chunk-QN6FTJWE.js} +1 -1
  19. package/{chunk-SAKG3775.js → chunk-RBJW3AZS.js} +1 -1
  20. package/chunk-RQVSGVED.js +1 -0
  21. package/{chunk-DFT2UYO6.js → chunk-SHTDZDEX.js} +1 -1
  22. package/{chunk-RDUEFPJ3.js → chunk-U6BEBH6T.js} +1 -1
  23. package/{chunk-7KKPI5E4.js → chunk-UNTMRP6X.js} +1 -1
  24. package/{chunk-EV37MCYP.js → chunk-URDSNDPP.js} +1 -1
  25. package/{chunk-LSBOVSYF.js → chunk-UWT5CUW4.js} +1 -1
  26. package/chunk-VED3WGNF.js +1 -0
  27. package/{chunk-3WCWZJYH.js → chunk-VU5DK3QN.js} +1 -1
  28. package/{chunk-XYNM2UME.js → chunk-ZOIP6MPW.js} +1 -1
  29. package/{chunk-73OFEMRU.js → chunk-ZVU4LS6E.js} +1 -1
  30. package/index.html +1 -1
  31. package/{main-YZOCOTGC.js → main-FIK2YK65.js} +1 -1
  32. package/package.json +1 -1
  33. package/chunk-4XJFGB4E.js +0 -6
  34. package/chunk-7SJHYZC5.js +0 -1
  35. package/chunk-AUUCT7OA.js +0 -1
  36. package/chunk-GL2OCAVZ.js +0 -1
  37. package/chunk-HGQLQ733.js +0 -1
  38. package/chunk-IO5IBATB.js +0 -1
  39. package/chunk-JAY2DGID.js +0 -1
  40. package/chunk-JY2MTE7P.js +0 -1
  41. package/chunk-M4CEGBQO.js +0 -1
  42. package/chunk-WKYWPXQ6.js +0 -1
  43. package/chunk-YXIGPDXN.js +0 -1
  44. package/chunk-Z4XFPOPE.js +0 -1
package/chunk-4XJFGB4E.js DELETED
@@ -1,6 +0,0 @@
1
- import{a as Xe,b as ve}from"./chunk-3WCWZJYH.js";import{a as At,b as Ht}from"./chunk-DNHLTHLR.js";import{a as pt}from"./chunk-V7APGUBT.js";import{b as W}from"./chunk-KFGIVU27.js";import{a as Ie,b as ne,c as ye,d as ie,e as fe,f as ct,g as Ut,h as Se,i as $e,k as _t,l as Te,m as Me,n as Bt,o as Ee,p as oe,q as re,r as ee,s as mt,t as De}from"./chunk-7SJHYZC5.js";import{a as ae,b as ut,d as Kt,e as Xt,g as we,i as dt,k as le,m as Ft,n as zt,p as gt,q as se,v as Re,w as Ke}from"./chunk-AUUCT7OA.js";import{a as Be}from"./chunk-PIDBEXSZ.js";import{H as Ce,X as te}from"./chunk-J3H4BCHI.js";import{c as Lt}from"./chunk-5XX7BU4I.js";import{ia as st}from"./chunk-5ZK3D2RS.js";import{$b as X,Ab as g,Bb as w,Cb as R,Db as v,E as Ye,Eb as a,Fb as r,Gb as m,Hb as I,Ib as $,Jb as be,Kb as P,Kc as H,Mc as lt,Qb as E,R as xe,Ra as l,Rb as D,Sb as A,Tb as Je,Ub as et,Vb as Oe,Wb as C,X as y,Xb as p,Za as x,_a as ue,_b as U,ac as V,ea as S,fa as T,fb as J,fc as de,gc as Fe,hc as ge,ic as c,ja as Mt,jc as L,kc as b,lb as F,lc as wt,mc as Rt,nc as vt,oc as Gt,p as Qe,qa as Ze,ra as rt,rc as bt,sc as Ve,tc as Vt,uc as tt,vb as _,xb as he,yc as at}from"./chunk-MR4RE3IB.js";import{a as Z,c as $t}from"./chunk-C6Q5SG76.js";function nn(n,i){if(n&1&&(a(0,"p"),c(1),r()),n&2){let e=p();l(),L(e._data().message)}}var on={title:$localize`Are you sure?`,confirmText:$localize`Confirm`,cancelText:$localize`Cancel`},Le=class n{data=rt();_data=H(()=>Z(Z({},on),this.data()));closed=Ze();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,t){e&1&&(a(0,"header",0)(1,"h3"),c(2),r()(),a(3,"div",1),F(4,nn,2,1,"p"),r(),a(5,"footer",2)(6,"button",3),C("click",function(){return t.close("cancel")}),c(7),r(),a(8,"button",4),C("click",function(){return t.close("confirm")}),c(9),r()()),e&2&&(l(2),L(t._data().title),l(2),g(t._data().message?4:-1),l(3),L(t._data().cancelText),l(2),L(t._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var Ct=class n{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ue=class n{#e=y(Be);s3Providers=W(this.getS3Config("Providers"));s3Regions=W(this.getS3Config("Regions"));s3RegionHosts=W(this.getS3Config("RegionHosts"));s3StorageClasses=W(this.getS3Config("StorageClasses"));storjSatellites=W(this.getStorjConfig("Satellites"));storjAuthenticationMethods=W(this.getStorjConfig("AuthenticationMethods"));openstackProviders=W(this.getOpenstackConfig("Providers"));openstackVersions=W(this.getOpenstackConfig("Versions"));gcsLocations=W(this.getGcsConfig("Locations"));gcsStorageClasses=W(this.getGcsConfig("StorageClasses"));getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(Qe(e=>this.#n(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(Qe(e=>this.#n(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(Qe(e=>this.#n(e)))}getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(Qe(e=>this.#n(e)))}#n(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,t])=>({key:e,value:t})))??[]}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ge=new ee,nt={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:n=>Ge.control(n??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:n=>Ge.control(n??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:n=>Ge.control(n??"",[ye.required,ye.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Ge.control(n??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).s3StorageClasses}]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:n=>Ge.control(n??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:n=>n.get(Ue).gcsStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:n=>Ge.control(n??"")}},dynamicFields:["authid"]}};function He(n,i){let e={},t={};return i.searchParams.forEach((o,s)=>{nt[n].dynamicFields?.includes(s)?t[s]=decodeURIComponent(o):e[s]=decodeURIComponent(o)}),{advanced:e,dynamic:t}}function it(n){let i=n.map(([e,t])=>`${e}=${t?encodeURIComponent(t.toString()):""}`).join("&");return i?"?"+i:""}var We={file:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let t=e.indexOf("file:///")===0,o=e.split(t?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return Z({destinationType:n,custom:{path:`${t?"/":""}${o}${i.pathname}`}},He(n,i))}},ssh:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.server}${n.custom.port?":"+n.custom.port:""}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{server:i.hostname,port:i.port,path:i.pathname}},He(n,i))},s3:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.bucket}${n.custom.path.startsWith("/")?n.custom.path:"/"+n.custom.path}${i}`},from:(n,i,e)=>Z({destinationType:n,custom:{path:i.pathname,bucket:i.hostname}},He(n,i))},gcs:{to:n=>{let i=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${n.custom.path}${i}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=He(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},googledrive:{to:n=>{let i=n.custom.path,e=it([...Object.entries(n.advanced),...Object.entries(n.dynamic)]);return`${n.destinationType}://${i}${e}`},from:(n,i,e)=>{let{advanced:t,dynamic:o}=He(n,i);return{destinationType:n,custom:{path:i.hostname+i.pathname},dynamic:o,advanced:t}}},fallbackMapper:{to:n=>"",from:(n,i,e)=>Z({destinationType:n},He(n,i))}};function ft(n){let i=n.destinationType;return!i||!We.hasOwnProperty(i)?We.fallbackMapper.to(n)??"":We[i].to(n)??""}function ht(n){let i=URL.canParse(n),e=n.split("://")[0],t="http://"+n.split("://")[1],o=new URL(t);if(!We.hasOwnProperty(e))return We.fallbackMapper.from(e,o);if(!i)throw new Error("Invalid target path");return We[e].from(e,o,n)}var Wt=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,St=class n{generate(i,e=Wt){let t;do t=this.generatePassword(i,e);while(this.calculatePasswordStrength(t)<5);return t}generatePassword(i,e=Wt){let t=this;return Array.apply(null,{length:i}).map(()=>{let o;for(;;)if(o=String.fromCharCode(t.#e()),e.test(o))return o},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var rn=["formRef"];function an(n,i){if(n&1&&(a(0,"option",27),c(1),r()),n&2){let e=i.$implicit;_("value",e.Key),l(),L(e.DisplayName)}}function ln(n,i){if(n&1&&m(0,"spk-progress-bar",38),n&2){let e=p(3);he("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),_("value",e.calculatePasswordStrength()*(100/5))}}function sn(n,i){n&1&&(a(0,"span",33),A(1,9),r())}function pn(n,i){n&1&&(E(0,7,1),m(1,"spk-icon"),D())}function cn(n,i){n&1&&(E(0,7,2),m(1,"spk-icon"),D())}function _n(n,i){n&1&&(E(0,10,1),m(1,"spk-icon",40),D())}function mn(n,i){n&1&&(E(0,10,2),m(1,"spk-icon"),D())}function un(n,i){if(n&1){let e=P();a(0,"button",39),C("click",function(){S(e);let o=p(3);return T(o.copyPassword())}),E(1,10),F(2,_n,2,0)(3,mn,2,0),D(),r()}if(n&2){let e=p(3);l(2),g(e.copiedPassword()?2:3)}}function dn(n,i){n&1&&(a(0,"spk-alert",37),A(1,11),r())}function Fn(n,i){if(n&1){let e=P();a(0,"div",28)(1,"spk-form-field")(2,"label",29),E(3,6),m(4,"sup"),D(),r(),m(5,"input",30),r(),F(6,ln,1,9,"spk-progress-bar",31),a(7,"spk-form-field"),m(8,"input",32),F(9,sn,2,0,"span",33),r(),a(10,"div",34)(11,"button",35),C("click",function(){S(e);let o=p(2);return T(o.showPassword.set(!o.showPassword()))}),E(12,7),F(13,pn,2,0)(14,cn,2,0),D(),r(),a(15,"button",35),C("click",function(){S(e);let o=p(2);return T(o.generatePassword())}),E(16,8),m(17,"spk-icon"),D(),r(),F(18,un,4,1,"button",36),r(),F(19,dn,2,0,"spk-alert",37),r()}if(n&2){let e=p(2);l(5),_("type",e.showPassword()?"text":"password"),l(),g(e.generalForm.value.password?6:-1),l(2),_("type",e.showPassword()?"text":"password"),l(),g(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),l(4),g(e.showPassword()?13:14),l(5),g(e.showCopyPassword()?18:-1),l(),g(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function gn(n,i){if(n&1&&(a(0,"spk-select",24)(1,"label",25),A(2,5),r(),m(3,"input",26),R(4,an,2,2,"option",27,w),r(),F(6,Fn,20,7,"div",28)),n&2){let e=p();_("displayFn",e.displayFn()),l(4),v(e.encryptionOptions()),l(2),g(e.encryptionFieldSignal()!==""?6:-1)}}function Cn(n,i){if(n&1&&(a(0,"button",22),E(1,12),m(2,"spk-icon"),D(),r()),n&2){let e=p();_("disabled",e.generalForm.invalid)}}function fn(n,i){if(n&1&&(a(0,"spk-tooltip",23)(1,"button",22),E(2,13),m(3,"spk-icon"),D(),r()()),n&2){let e=p();_("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),l(),_("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var je=new ee,jt=(n={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>je.group({name:je.control(n.name,[ye.required]),description:je.control(n.description),encryption:je.control(n.encryption,[Ht()]),password:je.control(n.password,[At(i=>i?.value.encryption!=="",[ye.required])]),repeatPassword:je.control(n.repeatPassword,[At(i=>i?.value.encryption!=="",[ye.required])])}),yt={Key:"",DisplayName:"None"},Ot=class n{#e=y(te);#n=y(Ce);#i=y(St);#o=y(pe);#t=y(pt);formRef=ue.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=x(!1);copiedPassword=x(!1);showCopyPassword=x(!1);encryptionEffect=lt(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});calculatePasswordStrength=H(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let t=document.createElement("textarea");t.value=i,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}displayFn(){let i=this.#t.systemInfo()?.EncryptionModules??[];return e=>{let t=[yt,...i].find(o=>o.Key===e);return t?`${t.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-general"]],viewQuery:function(e,t){e&1&&de(t.formRef,rn,5),e&2&&Fe()},decls:20,vars:3,consts:()=>{let i;i=$localize`Your backup name`;let e;e=$localize`Your backup description`;let t;t=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#7\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#7\uFFFD"}:CLOSE_SUPERSCRIPT:`;let s;s=$localize`Backup description`;let d;d=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let k;k=$localize`Encryption`;let M;M=$localize`Encryption`;let h;h=$localize`Password`;let Q;Q=$localize`Repeat password`;let Y;Y=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let B;B=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,B=Oe(B);let K;K=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let j;j=$localize`Passwords do not match`;let N;N=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,N=Oe(N);let u;u=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let f;f=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let z;return z=$localize` Continue ${"\uFFFD#3\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],t,o,s,d,M,Y,B,K,j,N,u,f,z,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder",i,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",Q,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",14,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",15),A(3,1),r(),a(4,"spk-form-field")(5,"label",16),E(6,2),m(7,"sup"),D(),r(),m(8,"input",17),r(),a(9,"spk-form-field")(10,"label",18),A(11,3),r(),m(12,"textarea",19),r(),F(13,gn,7,2),a(14,"div",20)(15,"button",21),C("click",function(){return S(o),T(t.exit())}),E(16,4),m(17,"spk-icon"),D(),r(),F(18,Cn,3,1,"button",22)(19,fn,4,2,"spk-tooltip",23),r()()}e&2&&(_("formGroup",t.generalForm),l(13),g(t.isNew()?13:-1),l(5),g(t.encryptionFieldSignal()===""?18:19))},dependencies:[De,Se,oe,re,ne,ie,fe,Te,Ee,le,se,we,ae,zt,ut,Ke],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var Sn=["formRef"],Tn=(n,i)=>({index:n,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),En=n=>({$implicit:n});function Dn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function Nn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.name)}}function An(n,i){if(n&1){let e=P();E(0,7,1),a(1,"button",30,2),C("click",function(){let o=S(e).$implicit,s=p();return T(s.addNewOption(o))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function hn(n,i){n&1&&be(0)}function On(n,i){if(n&1&&F(0,hn,1,0,"ng-container",31),n&2){let e=i.$implicit,t=i.$index;p();let o=ge(36);_("ngTemplateOutlet",o)("ngTemplateOutletContext",Ve(5,En,Vt(2,Tn,t,e)))}}function yn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Pn(n,i){if(n&1&&(a(0,"app-file-tree",34)(1,"label",40),c(2),F(3,yn,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function kn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function xn(n,i){if(n&1&&(a(0,"app-file-tree",35)(1,"label",40),c(2),F(3,kn,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit,o=p();_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function In(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function $n(n,i){n&1&&(a(0,"spk-icon",43),c(1,"link"),r())}function Mn(n,i){n&1&&(a(0,"spk-icon",43),c(1,"textbox"),r())}function wn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,In,3,1,"spk-tooltip",41),r(),m(4,"input",42),F(5,$n,2,0,"spk-icon",43)(6,Mn,2,0,"spk-icon",43),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),l(),g(t.formView.type==="Path"?5:6)}}function Rn(n,i){if(n&1){let e=P();a(0,"span",47),C("click",function(){S(e);let o=p(2).$implicit,s=p();return T(s.oauthStartTokenCreation(o.formViewType))}),c(1,"AuthID"),r()}}function vn(n,i){n&1&&(a(0,"spk-icon",43),c(1,"password"),r())}function Gn(n,i){if(n&1){let e=P();a(0,"spk-icon",48),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function bn(n,i){if(n&1){let e=P();a(0,"spk-icon",48),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Vn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),r(),m(3,"input",44),F(4,Rn,2,0,"span",45)(5,vn,2,0,"spk-icon",43)(6,Gn,2,0,"spk-icon",46)(7,bn,2,0,"spk-icon",46),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),g(t.oauthField===t.formView.name?4:5),l(2),g(t.formView.showPassword?6:7)}}function Ln(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Un(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function Bn(n,i){if(n&1&&(a(0,"spk-select")(1,"label",40),c(2),F(3,Ln,3,1,"spk-tooltip",41),r(),m(4,"input",49),I(5,17),R(6,Un,2,2,"option",18,w),$(),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function Kn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Xn(n,i){if(n&1&&(a(0,"option",18),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function zn(n,i){if(n&1&&(a(0,"div",36)(1,"label",40),c(2),F(3,Kn,3,1,"spk-tooltip",41),r(),a(4,"div",50)(5,"spk-form-field"),m(6,"input",51),a(7,"spk-icon",43),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",52),I(12,17),R(13,Xn,2,2,"option",18,w),$(),r()()()),n&2){let e,t=p().$implicit,o=p();_("formGroupName",t.formView.name),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(3),X("id","destination-",t.formGroupName,"-",t.index,""),l(7),v(o.sizeOptions())}}function Hn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Wn(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,Hn,3,1,"spk-tooltip",41),r(),m(4,"input",53),a(5,"spk-icon",43),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function jn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function qn(n,i){if(n&1&&(a(0,"spk-toggle",37)(1,"label",40),c(2),F(3,jn,3,1,"spk-tooltip",41),r(),m(4,"input",54),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function Qn(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Yn(n,i){n&1&&(a(0,"spk-option",56),c(1,"None"),r()),n&2&&_("value","None")}function Zn(n,i){if(n&1&&(a(0,"spk-option",18),c(1),m(2,"spk-checkbox",57),r()),n&2){let e=p().$implicit;_("value",e),l(),b(" ",e," ")}}function Jn(n,i){if(n&1&&F(0,Yn,2,1,"spk-option",56)(1,Zn,3,2,"spk-option",18),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function ei(n,i){if(n&1&&(a(0,"spk-select",38)(1,"label",40),c(2),F(3,Qn,3,1,"spk-tooltip",41),r(),m(4,"input",55),I(5,17),R(6,Jn,2,1,null,null,w),$(),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function ti(n,i){if(n&1&&(a(0,"spk-tooltip",41)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function ni(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",40),c(2),F(3,ti,3,1,"spk-tooltip",41),r(),m(4,"input",42),r()),n&2){let e,t=p().$implicit;l(),X("for","destination-",t.formGroupName,"-",t.index,""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),X("id","destination-",t.formGroupName,"-",t.index,""),U("formControlName",t.formView.name)}}function ii(n,i){if(n&1){let e=P();a(0,"div",32),I(1,33),F(2,Pn,5,14,"app-file-tree",34)(3,xn,5,10,"app-file-tree",35)(4,wn,7,10,"spk-form-field")(5,Vn,8,11,"spk-form-field")(6,Bn,8,9,"spk-select")(7,zn,15,9,"div",36)(8,Wn,7,9,"spk-form-field")(9,qn,5,9,"spk-toggle",37)(10,ei,8,7,"spk-select",38)(11,ni,5,9,"spk-form-field"),$(),a(12,"button",39),C("click",function(){let o=S(e).$implicit,s=p();return T(s.removeFormView(o.formView,0))}),a(13,"spk-icon"),c(14,"x-circle"),r()()()}if(n&2){let e=i.$implicit;l(),_("formGroupName",e.formGroupName),l(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var Pe=new ee,oi=["Bytes","KB","MB","GB","TB","PB"],ri=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],qt=(n={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Pe.group({remoteVolumeSize:Pe.group({size:Pe.control(n.remoteVolumeSize),unit:Pe.control(n.size)}),backupRetention:Pe.control(n.backupRetention),advancedOptions:Pe.group({})}),gr=(n,i)=>Pe.group({name:Pe.control(n),value:Pe.control(i)}),Pt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=x(oi);rentationOptions=x(ri);oauthStartTokenCreation(i){}getFormFieldValue(i,e,t){return this.optionsForm.controls.advancedOptions.controls[t].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let t=i.find(o=>o.value===e);return t?t.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let t=i.find(o=>o.name===e);return t?`${t.name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-options"]],viewQuery:function(e,t){e&1&&de(t.formRef,Sn,5),e&2&&Fe()},decls:44,vars:5,consts:()=>{let i;i=$localize`Select an option...`;let e;e=$localize`Options`;let t;t=$localize`Remote volume size`;let o;o=$localize` The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. ${"\uFFFD#17\uFFFD"}:START_LINK:Read more${"\uFFFD/#17\uFFFD"}:CLOSE_LINK:`;let s;s=$localize`Backup retention`;let d;d=$localize` Advanced options ${"\uFFFD#27\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#28\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#29\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#29\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#28\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#30\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*32:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1:${"\uFFFD0:1\uFFFD"}:INTERPOLATION:${"[\uFFFD/#28\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*32:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SPK_MENU:`,d=Oe(d);let k;k=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let M;return M=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SPK_ICON: Submit `,[["formRef",""],["fieldTemplate",""],["option",""],e,t,o,s,d,k,M,[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder",i,"formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",10,0),C("submit",function(){return S(o),T(t.submit())}),a(2,"h3",11),A(3,3),r(),a(4,"div",12)(5,"div",13)(6,"spk-form-field")(7,"label",14),A(8,4),r(),m(9,"input",15),r(),a(10,"spk-select"),m(11,"input",16),I(12,17),R(13,Dn,2,2,"option",18,w),$(),r()(),a(15,"p"),E(16,5),m(17,"a",19),D(),r()(),a(18,"spk-select",20)(19,"label",14),A(20,6),r(),m(21,"input",21),R(22,Nn,2,2,"option",18,w),r(),a(24,"app-toggle-card",22),I(25,23),E(26,7),a(27,"spk-menu")(28,"button",24),m(29,"spk-icon"),r(),I(30,25),R(31,An,3,1,"button",26,w),$(),r(),D(),$(),R(33,On,1,7,"ng-container",null,w),r(),F(35,ii,15,2,"ng-template",null,1,at),a(37,"div",27)(38,"button",28),C("click",function(){return S(o),T(t.goBack())}),E(39,8),m(40,"spk-icon"),D(),r(),a(41,"button",29),E(42,9),m(43,"spk-icon"),D(),r()()()}e&2&&(_("formGroup",t.optionsForm),l(13),v(t.sizeOptions()),l(5),_("displayFn",t.retentionOptionDisplayFn()),l(4),v(t.rentationOptions()),l(2),_("disallowToggle",!0),l(7),v(t.nonSelectedOptions()),l(2),v(t.selectedOptions()),l(8),he("loader",t.isSubmitting()))},dependencies:[De,Se,oe,re,ne,$e,Ie,ie,fe,Te,Ee,Me,st,Ft,se,we,ae,le,Re,dt,gt,Ke,Xe,ve],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.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}.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 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ai=["formRef"];function li(n,i){if(n&1&&(a(0,"option",39),c(1),r()),n&2){let e=i.$implicit;_("value",e.key),l(),L(e.label)}}function si(n,i){if(n&1){let e=P();a(0,"div",26)(1,"spk-form-field")(2,"label",27),A(3,8),r(),a(4,"input",28,1),C("focus",function(){S(e);let o=ge(5);return T(o.showPicker())}),r(),a(6,"spk-icon",29),c(7,"clock"),r()(),a(8,"spk-form-field"),m(9,"label",30),a(10,"input",31,2),C("focus",function(){S(e);let o=ge(11);return T(o.showPicker())}),r(),a(12,"spk-icon",29),c(13,"calendar"),r()()(),I(14,32),a(15,"div",33)(16,"spk-form-field")(17,"label",34),A(18,9),r(),m(19,"input",35),r(),a(20,"spk-select",36),m(21,"input",37),I(22,38),R(23,li,2,2,"option",39,w),$(),r()(),a(25,"app-toggle-card",40),I(26,41),A(27,10),$(),a(28,"div",42)(29,"spk-toggle",21),E(30,11),m(31,"input",43),D(),r(),a(32,"spk-toggle",21),E(33,12),m(34,"input",44),D(),r(),a(35,"spk-toggle",21),E(36,13),m(37,"input",45),D(),r(),a(38,"spk-toggle",21),E(39,14),m(40,"input",46),D(),r(),a(41,"spk-toggle",21),E(42,15),m(43,"input",47),D(),r(),a(44,"spk-toggle",21),E(45,16),m(46,"input",48),D(),r(),a(47,"spk-toggle",21),E(48,17),m(49,"input",49),D(),r()()(),$()}if(n&2){let e=p();l(20),_("displayFn",e.displayFn),l(3),v(e.unitOptions),l(2),_("disallowToggle",!0)}}var q=new ee,Qt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],Yt=(n={autoRun:!1,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>q.group({autoRun:q.control(n.autoRun),nextTime:q.group({time:q.control(n.nextTime.time),date:q.control(n.nextTime.date)}),runAgain:q.group({repeatValue:q.control(n.runAgain.repeatValue),repeatUnit:q.control(n.runAgain.repeatUnit),allowedDays:q.group({mon:q.control(n.runAgain.allowedDays.mon),tue:q.control(n.runAgain.allowedDays.tue),wed:q.control(n.runAgain.allowedDays.wed),thu:q.control(n.runAgain.allowedDays.thu),fri:q.control(n.runAgain.allowedDays.fri),sat:q.control(n.runAgain.allowedDays.sat),sun:q.control(n.runAgain.allowedDays.sun)})})}),kt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Qt;displayFn(i){let e=Qt.find(t=>t.key===i);return e?`${e.label}`:""}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-schedule"]],viewQuery:function(e,t){e&1&&de(t.formRef,ai,5),e&2&&Fe()},decls:18,vars:2,consts:()=>{let i;i=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#7\uFFFD\uFFFD/#7\uFFFD"}:TAG_INPUT:`;let t;t=$localize`If a date was missed, the job will run as soon as possible.`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let s;s=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let d;d=$localize`Next time`;let k;k=$localize`Run again every`;let M;M=$localize`Allowed days`;let h;h=$localize` Monday ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let Q;Q=$localize` Tuesday ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let Y;Y=$localize` Wednesday ${"\uFFFD#37\uFFFD\uFFFD/#37\uFFFD"}:TAG_INPUT:`;let B;B=$localize` Thursday ${"\uFFFD#40\uFFFD\uFFFD/#40\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#43\uFFFD\uFFFD/#43\uFFFD"}:TAG_INPUT:`;let j;j=$localize` Saturday ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let N;return N=$localize` Sunday ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`,[["formRef",""],["timeRef",""],["dateRef",""],i,e,t,o,s,d,k,M,h,Q,Y,B,K,j,N,[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",18,0),C("submit",function(){return S(o),T(t.next())}),a(2,"h3",19),A(3,3),r(),a(4,"div",20)(5,"spk-toggle",21),E(6,4),m(7,"input",22),D(),r(),a(8,"p"),A(9,5),r()(),F(10,si,50,2),a(11,"div",23)(12,"button",24),C("click",function(){return S(o),T(t.goBack())}),E(13,6),m(14,"spk-icon"),D(),r(),a(15,"button",25),E(16,7),m(17,"spk-icon"),D(),r()()()}if(e&2){let o;_("formGroup",t.scheduleForm),l(10),g((o=t.scheduleFormSignal())!=null&&o.autoRun?10:-1)}},dependencies:[De,Se,oe,re,ne,$e,Ie,ie,fe,Te,Ee,Me,le,se,Re,ae,we,ve],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function pi(n,i){if(n&1&&(a(0,"option",3),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.key)}}function ci(n,i){if(n&1&&(a(0,"option",3),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),L(e.key)}}function _i(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",6),C("ngModelChange",function(o){S(e);let s=p(2);return T(s.updateStateExpression(o))}),r(),R(2,ci,2,2,"option",3,w),r()}if(n&2){let e,t=p(2);_("hideClearButton",!0)("displayFn",t.displayFn),l(),_("ngModel",(e=t.pathState())==null?null:e.expression),l(),v(t.fileGroupOptions())}}function mi(n,i){if(n&1){let e=P();a(0,"spk-form-field")(1,"input",6),C("ngModelChange",function(o){S(e);let s=p(2);return T(s.updateStateExpression(o))}),r()()}if(n&2){let e,t=p(2);l(),_("ngModel",(e=t.pathState())==null?null:e.expression)}}function ui(n,i){if(n&1){let e=P();a(0,"spk-select",0)(1,"input",1),C("ngModelChange",function(o){S(e);let s=p();return T(s.updateStateType(o))}),r(),I(2,2),R(3,pi,2,2,"option",3,w),$(),r(),F(5,_i,4,3,"spk-select",0)(6,mi,2,1,"spk-form-field"),a(7,"div",4),C("click",function(){S(e);let o=p();return T(o.removeFilter())}),a(8,"spk-icon",5),c(9,"x-circle"),r()()}if(n&2){let e,t,o=p();_("hideClearButton",!0)("displayFn",o.displayFn),l(),_("ngModel",(e=o.pathState())==null?null:e.type),l(2),v(o.expressionOptions()),l(2),g(((t=o.pathState())==null?null:t.type)==="-FileGroup"||((t=o.pathState())==null?null:t.type)==="+FileGroup"?5:6)}}var Zt=[{key:"Excludes folders where name contains",value:"-FolderNameIncludes"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileNameIncludes"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"}],di=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],Tt=class n{path=rt.required();pathChange=Ze();remove=Ze();expressionOptions=x(Zt);fileGroupOptions=x(di);pathState=x(null);pathEffect=lt(()=>{let i=this.path(),e=i.slice(1),t=i.startsWith("-")?"-":"+";return e.startsWith("/")&&e.endsWith("/")?this.pathState.set({type:`${t}Folder`,path:e,expression:e}):e.startsWith("*")&&e.endsWith("*/")?this.pathState.set({type:`${t}FolderNameIncludes`,path:e,expression:e.slice(1,-2)}):e.startsWith("[.*")&&e.endsWith("[^\\/]*]")?this.pathState.set({type:`${t}FileNameIncludes`,path:e,expression:e.slice(3,-7)}):e.startsWith("{")&&e.endsWith("}")?this.pathState.set({type:`${t}FileGroup`,path:e,expression:e.slice(1,-1)}):e.startsWith("[")&&e.endsWith("]")?this.pathState.set({type:`${t}Regex`,path:e,expression:e.slice(1,-1)}):e.startsWith("*.")?this.pathState.set({type:`${t}Extension`,path:e,expression:e.slice(2)}):this.pathState.set({type:`${t}Expression`,path:e,expression:e})});updateStateType(i){this.pathState.update(e=>(e.type=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}updateStateExpression(i){this.pathState.update(e=>(e.expression=i,e.path=this.#e(e),e)),this.pathChange.emit(this.pathState().path)}#e(i){let e=i.type.slice(0,1),t=i.type.slice(1);if(t==="Folder"){let o=i.expression.endsWith("/"),s=i.expression.startsWith("/");return o&&s?`${e}${i.expression}`:o?`${e}${i.expression}/`:s?`${e}/${i.expression}`:`${e}/${i.expression}/`}return t==="FolderNameIncludes"?`${e}*${i.expression}*/`:t==="FileNameIncludes"?`${e}[.*${i.expression}[^\\/]*]`:t==="FileGroup"?`${e}{${i.expression}}`:t==="Regex"?`${e}[${i.expression}]`:t==="Extension"?`${e}*.${i.expression}`:`${e}${i.expression}`}removeFilter(){this.remove.emit()}displayFn(i){let e=Zt.find(t=>t.value===i);return e?e.key:""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-filter"]],inputs:{path:[1,"path"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:1,vars:1,consts:()=>{let i;return i=$localize`Select an option...`,[[3,"hideClearButton","displayFn"],["type","text","placeholder",i,3,"ngModelChange","ngModel"],["options",""],[3,"value"],[1,"filter-removal",3,"click"],[1,"spk-primary"],["type","text",3,"ngModelChange","ngModel"]]},template:function(e,t){e&1&&F(0,ui,10,4),e&2&&g(t.pathState()?0:-1)},dependencies:[mt,oe,re,ne,ie,Ut,se,ae,le],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{--miw: initial}[_nghost-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Fi=["formRef"];function gi(n,i){if(n&1){let e=P();a(0,"app-filter",41),C("pathChange",function(o){let s=S(e).$index,d=p();return T(d.patchPathAt(o,s))})("remove",function(){let o=S(e).$index,s=p();return T(s.removePathAt(o))}),r()}if(n&2){let e=i.$implicit;_("path",e)}}function Ci(n,i){if(n&1&&(a(0,"option",45),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function fi(n,i){if(n&1&&(a(0,"div",40)(1,"spk-form-field"),m(2,"input",42),r(),a(3,"spk-select"),m(4,"input",43),I(5,44),R(6,Ci,2,2,"option",45,w),$(),r()()),n&2){let e=p();l(6),v(e.sizeOptions())}}var ke=new ee,Si=["Bytes","KB","MB","GB","TB","PB"],Jt=(n={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>ke.group({path:ke.control(n.path),excludes:ke.group({hidden:ke.control(n.excludes.hidden),system:ke.control(n.excludes.system),temporary:ke.control(n.excludes.temporary),filesLargerThan:ke.group({size:ke.control(null),unit:ke.control(null)})})}),xt=class n{#e=y(pe);#n=y(te);#i=y(Ce);formRef=ue.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new ct("");filesLargerThan=H(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=x(Si);pathSignal=W(this.sourceDataForm.controls.path.valueChanges);pathArray=H(()=>this.pathSignal()?.split("\0").filter(i=>i.startsWith("-")||i.startsWith("+"))??[]);addFilter(i="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${i}`)}patchPathAt(i,e){let o=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),s=this.pathArray().map((d,k)=>k===e?`${i}`:`${d}`).join("\0");this.sourceDataForm.controls.path.setValue(`${o}\0${s}`)}removePathAt(i){let t=this.sourceDataForm.controls.path.value.split("\0").filter(s=>!s.startsWith("-")&&!s.startsWith("+")).join("\0"),o=this.pathArray().filter((s,d)=>d!==i).join("\0");this.sourceDataForm.controls.path.setValue(`${t}\0${o}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let i=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${i}\0${this.newPathCtrl.value}`),this.newPathCtrl.setValue("")}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-source-data"]],viewQuery:function(e,t){e&1&&de(t.formRef,Fi,5),e&2&&Fe()},decls:56,vars:11,consts:()=>{let i;i=$localize`Path`;let e;e=$localize`Add a direct path`;let t;t=$localize`Hidden files`;let o;o=$localize`System files`;let s;s=$localize`Temporary files`;let d;d=$localize`Source Data`;let k;k=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let M;M=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let h;h=$localize`Source Data`;let Q;Q=$localize`Add Path`;let Y;Y=$localize`Add a path directly from your machine.`;let B;B=$localize`Filters`;let K;K=$localize`Customize your filters.`;let j;j=$localize`Add filter`;let N;N=$localize`Exclude`;let u;u=$localize`Choose if there’s any files you want to exclude.`;let f;f=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let z;z=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files larger than `;let Ae;return Ae=$localize`Select an option...`,[["formRef",""],d,k,M,h,Q,Y,B,K,j,N,u,f,z,O,_e,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",i,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],[3,"path"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",t,"formControlName","hidden"],["type","checkbox","placeholder",o,"formControlName","system"],["type","checkbox","placeholder",s,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[3,"pathChange","remove","path"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder",Ae],["options",""],[3,"value"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",16,0),C("submit",function(){return S(o),T(t.next())}),a(2,"div",17)(3,"h3",18),A(4,1),r(),a(5,"app-file-tree",19)(6,"label",20),c(7,"Folder path"),r(),m(8,"input",21),r(),a(9,"div",22)(10,"button",23),C("click",function(){return S(o),T(t.goBack())}),E(11,2),m(12,"spk-icon"),D(),r(),a(13,"button",24),E(14,3),m(15,"spk-icon"),D(),r()()(),a(16,"div",25)(17,"h3",18),A(18,4),r(),a(19,"app-toggle-card",26),I(20,27),A(21,5),$(),a(22,"p",28),A(23,6),r(),a(24,"div",29)(25,"spk-form-field"),m(26,"input",30),r(),a(27,"button",31),C("click",function(){return S(o),T(t.addNewPath())}),a(28,"spk-icon"),c(29,"plus"),r()()()(),a(30,"app-toggle-card",26),I(31,27),A(32,7),$(),a(33,"p",28),A(34,8),r(),a(35,"button",32),C("click",function(){return S(o),T(t.addFilter())}),A(36,9),r(),R(37,gi,1,1,"app-filter",33,w),r(),a(39,"app-toggle-card",34),I(40,27),A(41,10),$(),a(42,"p",28),A(43,11),r(),a(44,"spk-toggle",35),E(45,12),m(46,"input",36),D(),r(),a(47,"spk-toggle",35),E(48,13),m(49,"input",37),D(),r(),a(50,"spk-toggle",35),E(51,14),m(52,"input",38),D(),r(),a(53,"spk-toggle",39),C("click",function(){return S(o),T(t.toggleFilesLargerThan())}),A(54,15),r(),F(55,fi,8,0,"div",40),r()()()}e&2&&(_("formGroup",t.sourceDataForm),l(5),_("multiSelect",!0)("startingPath",t.getPath())("showFiles",!0),l(14),_("disallowToggle",!0),l(7),_("formControl",t.newPathCtrl),l(4),_("disallowToggle",!0),l(7),v(t.pathArray()),l(2),_("disallowToggle",!0),l(14),he("active",t.filesLargerThan()),l(2),g(t.filesLargerThan()?55:-1))},dependencies:[mt,Se,oe,re,ne,$e,Ie,ie,fe,De,_t,Te,Ee,Me,le,ae,we,se,Re,Xe,ve,Tt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-level-40)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}"],changeDetection:0})};var ce=new ee,pe=class n{#e=y(te);#n=y(pt);#i=y(Be);#o=y(Ct);generalForm=jt();sourceDataForm=Jt();scheduleForm=Yt();destinationForm=en();optionsForm=qt();isDraft=x(!1);backupId=x(null);isSubmitting=x(!1);finishedLoading=x(!1);backupDefaults=x(null);isNew=H(()=>this.backupId()==="new");selectedOptions=x([]);selectedAdvancedFormPair=x([]);destinationFormPair=x({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=H(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});selectedHttpOptions=x([]);notSelectedHttpOptions=H(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(t=>e.findIndex(o=>o.name===t.name)===-1)});sourceDataFormSignal=W(this.sourceDataForm.valueChanges);destinationFormSignal=W(this.destinationForm.valueChanges);generalFormSignal=W(this.generalForm.valueChanges);encryptionFieldSignal=W(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=W(this.scheduleForm.valueChanges);destinationOptions=H(()=>this.#n.backendModules()??[]);httpOptions=H(()=>this.#n.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=H(()=>this.#n.systemInfo()?.Options?.map(this.#t)??[]);#t(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=H(()=>{let i=this.#n.systemInfo()?.EncryptionModules??[];return[yt,...i]});nonSelectedOptions=H(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,t){let o=this.notSelectedAdvancedFormPair().find(s=>s.name===i);o&&this.addAdvancedFormPair(o,e,t)}addHttpOptionByName(i,e,t){let o=this.notSelectedHttpOptions().find(s=>s.name===i);o&&this.addHttpOption(o,e,t)}addAdvancedFormPair(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,s=t??i.defaultValue;this.createFormField(o,i,s),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,t){let o=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,s=t??i.defaultValue;this.createFormField(o,i,s),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(o=>o.name===i.name)!==-1?this.selectedAdvancedFormPair.update(o=>(o=o.filter(s=>s.name!==i.name),o)):this.selectedHttpOptions.update(o=>(o=o.filter(s=>s.name!==i.name),o))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(t=>(t=t.filter(o=>o.name!==i.name),t))}submit(){this.isSubmitting.set(!0);let i=this.#s(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(Ye(()=>this.isSubmitting.set(!1))).subscribe({next:t=>{console.log("submitted res",t),this.exit()},error:t=>{console.error("submitted error",t)}})}exit(){this.#c(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#l(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",t=i.Filters?.map(h=>`${h.Include?"":"-"}${h.Expression}`)??[],o=i.Settings?.find(h=>h.Name==="--exclude-files-attributes")?.Value??"",s=i.Settings?.find(h=>h.Name==="--skip-files-larger-than")??null,d=s?.Value.replace(/[0-9]/g,"")??null,k=s?.Value.replace(/[^0-9]/g,"")??null,M={path:[...e,...t].join("\0"),excludes:{hiddenFiles:o.includes("hidden"),systemFiles:o.includes("system"),tempFiles:o.includes("temporary"),filesLargerThan:d&&k?{size:parseInt(k),unit:d.toUpperCase()}:null}};this.sourceDataForm.patchValue(M)}mapDestinationToForm(i){let e=i.TargetURL?ht(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#l(i){let e=ht(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(s=>s.Name==="encryption-module"),t=e?.Value&&e.Value.length?e.Value:"",o={name:i.Name??"",description:i.Description??""};t&&t!==""&&(o.encryption=t),this.generalForm.patchValue(o)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,o={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(o)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],t=this.advancedOptions();i.Settings?.forEach(o=>{if(o.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(o.Value??"");if(!(o.Name&&e.includes(o.Name))){if(o.Name==="dblock-size"){let s=o.Value?.replace(/[^0-9]/g,""),d=o.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:s?parseInt(s):null,unit:d?d.toUpperCase():null})}if(o.Name&&o.Value){let s=t.find(d=>d.name===o.Name);if(!s)return;this.addOptionToFormGroup(s,o.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#s(){let i=this.generalForm.value,e=this.optionsForm.value,t=this.scheduleForm.value,o=this.sourceDataForm.value,d=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],k=null;t.runAgain?.repeatUnit&&t.runAgain?.repeatValue&&(k=this.#o.toString(t.runAgain.repeatValue,t.runAgain.repeatUnit));let M=t.runAgain?.allowedDays?Object.entries(t.runAgain?.allowedDays).filter(([u,f])=>f).map(([u,f])=>u):[],h=o.path?.split("\0")??[],Q=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},Y=this.advancedOptions(),B=Object.entries(e.advancedOptions??{}).filter(([u,f])=>u&&f).map(([u,f])=>{let z=Y.find(O=>O.name===u);return z?.type==="Size"?{Name:u,Value:`${f.size}${f.unit.toLowerCase()}`}:z?.type==="Integer"?{Name:u,Value:f.toString()}:z?.type==="Boolean"?{Name:u,Value:f.toString()}:{Name:u,Value:f}}),K=[Q,...B],j=Object.entries(o.excludes??{}).filter(([u,f])=>f&&u!=="filesLargerThan").map(([u])=>u),N=o.excludes?.filesLargerThan;return j.length&&K.push({Name:"--exclude-files-attributes",Value:j.join(",")}),N&&N.size!==null&&N.unit!==null&&K.push({Name:"--skip-files-larger-than",Value:`${N.size}${N.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:d[0]??null,Sources:h.filter(u=>!u.startsWith("-")),Settings:K,Filters:h.filter(u=>u.startsWith("-")).map((u,f)=>({Order:f,Include:!1,Expression:u.slice(1)}))},Schedule:t.autoRun?{Repeat:k,Time:t.nextTime?.date?new Date(`${t.nextTime.date}T${t.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:M}:null}}#a(i){return i.controls.map(e=>ft(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),t={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(t.date=e.toISOString().split("T")[0]),t}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(t=>(t=t.filter(o=>o.name!==e),t)))}addOptionToFormGroup(i,e){let t=this.optionsForm.controls.advancedOptions;this.createFormField(t,i,e??i.defaultValue),this.selectedOptions.update(o=>(o.push(i),o))}createFormField(i,e,t){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,ce.control(t));return}if(e.type==="Size"){let o=t.replace(/[0-9]/g,""),s=t.replace(/[^0-9]/g,"");i.addControl(e.name,ce.group({size:ce.control(s?parseInt(s):50),unit:ce.control(o?o.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,ce.control(t?parseInt(t):0));return}if(e.type==="Boolean"){i.addControl(e.name,ce.control(t==="true"));return}if(e.type==="Flags"){i.addControl(e.name,ce.control(t??""));return}if(e.type==="Timespan"){i.addControl(e.name,ce.control(t,[ye.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,t=!1){let o=this.destinationOptions().find(N=>N.Key===i),s=this.httpOptions();if(!o||!o.Options)return;let d=nt.hasOwnProperty(i)&&nt[i],k=d&&d.oauthField?d.oauthField:null,M=d&&d.customFields?d.customFields:{},h=d&&d.dynamicFields?d.dynamicFields:[],Q=d&&d.advancedFields?d.advancedFields:[],Y=d&&d.ignoredAdvancedFields?d.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:k,custom:[],dynamic:[],advanced:[]});let B=ce.group({}),K=ce.group({}),j=ce.group({});M&&Object.entries(M).forEach(([N,u],f)=>{let _e=u,{formElement:z}=_e,O=$t(_e,["formElement"]);B.addControl(N,z(e?.custom[N])),this.destinationFormPair.update(Ae=>(Ae.custom.push(Z({order:900+f},O)),Ae))});for(let N=0;N<o.Options.length;N++){let u=o.Options[N];if(u.Deprecated)continue;let f=h.find(z=>z===u.Name||z.name===u.Name);if(f){let z=f&&typeof f!="string",O={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+N},_e=z?Z(Z({},O),f):O,G=e?.dynamic[u.Name]??u.DefaultValue;this.createFormField(K,_e,G),this.destinationFormPair.update(qe=>(qe.dynamic.push(_e),qe))}else{if(Y.find(me=>me===u.Name))continue;let O=Q.find(me=>me===u.Name||me.name===u.Name),_e=O&&typeof O!="string",Ae=e?.advanced[u.Name],G=Ae??u.DefaultValue,qe={name:u.Name,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:G,order:900+N},Nt=_e?Z(Z({},qe),O):qe;t&&Ae&&(this.createFormField(j,Nt,G),this.selectedAdvancedFormPair.update(me=>(me.push(Nt),me))),this.destinationFormPair.update(me=>(me.advanced.push(Nt),me))}}for(let N=0;N<s.length;N++){let u=s[N],f=e?.advanced[u.name],z=f??u.defaultValue;t&&f&&(this.createFormField(j,u,z),this.selectedHttpOptions.update(O=>(O.push(u),O)))}this.destinationFormPair.update(N=>({oauthField:N.oauthField,custom:N.custom.sort((u,f)=>u.order-f.order),dynamic:N.dynamic.sort((u,f)=>u.order-f.order),advanced:N.advanced.sort((u,f)=>u.order-f.order)})),this.destinationForm.controls.destinations.push(tn({key:o.Key,customGroup:B,dynamicGroup:K,advancedGroup:j}))}#c(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=xe({token:n,factory:n.\u0275fac,providedIn:"root"})};var Ti=["formRef"],Ei=(n,i,e,t)=>({index:n,formView:i,formGroupName:"custom",destinationType:e,oauthField:t}),Dt=n=>({$implicit:n}),Di=(n,i,e,t)=>({index:n,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:t}),Ni=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",destinationType:e,oauthField:t}),Ai=(n,i,e,t)=>({index:n,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:t}),hi=()=>({maxWidth:"700px",width:"100%"});function Oi(n,i){n&1&&(E(0,2,2),m(1,"spk-icon"),D())}function yi(n,i){n&1&&A(0,2,3)}function Pi(n,i){if(n&1){let e=P();E(0,2,1),a(1,"button",24),C("click",function(){S(e);let o=p();return T(o.testDestination())}),F(2,Oi,2,0)(3,yi,1,0),r(),D()}if(n&2){let e=p();l(),he("success",e.successfulTest()),l(),g(e.successfulTest()?2:3)}}function ki(n,i){if(n&1){let e=P();a(0,"p",30),C("click",function(){S(e);let o=p();return T(o.removeDestinationFormGroup(o.destinationCount()-1))}),E(1,5),m(2,"span",31),D(),r()}}function xi(n,i){if(n&1){let e=P();a(0,"div",32)(1,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("file"))}),a(2,"h3"),A(3,6),r(),a(4,"p"),A(5,7),r()(),a(6,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("gcs"))}),a(7,"h3"),c(8,"Google Cloud Storage"),r(),a(9,"p"),A(10,8),r()(),a(11,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("s3"))}),a(12,"h3"),c(13,"S3 compatible bucket"),r(),a(14,"p"),A(15,9),r()(),a(16,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("ssh"))}),a(17,"h3"),c(18,"SSH"),r(),a(19,"p"),A(20,10),r()(),a(21,"div",33),C("click",function(){S(e);let o=p();return T(o.addDestinationFormGroup("googledrive"))}),a(22,"h3"),c(23,"Google Drive"),r(),a(24,"p"),A(25,11),r()()(),a(26,"p"),A(27,12),r()}}function Ii(n,i){n&1&&be(0)}function $i(n,i){if(n&1&&F(0,Ii,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ei,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Mi(n,i){n&1&&be(0)}function wi(n,i){if(n&1&&F(0,Mi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Di,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Ri(n,i){if(n&1){let e=P();E(0,13,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,s=p(2);return T(s.addAdvancedFormPair(o,0))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function vi(n,i){n&1&&be(0)}function Gi(n,i){if(n&1&&F(0,vi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ni,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function bi(n,i){if(n&1){let e=P();E(0,14,1),a(1,"button",40),C("click",function(){let o=S(e).$implicit,s=p(2);return T(s.addHttpOption(o,0))}),r(),D()}if(n&2){let e=i.$implicit;l(),Je(e.name),et(0)}}function Vi(n,i){n&1&&be(0)}function Li(n,i){if(n&1&&F(0,Vi,1,0,"ng-container",39),n&2){let e,t=i.$implicit,o=i.$index;p();let s=ge(29),d=p();_("ngTemplateOutlet",s)("ngTemplateOutletContext",Ve(7,Dt,tt(2,Ai,o,t,(e=d.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,d.destinationFormPair().oauthField)))}}function Ui(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Bi(n,i){if(n&1&&(a(0,"app-file-tree",43)(1,"label",50),c(2),F(3,Ui,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name))("accepts",t.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function Ki(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Xi(n,i){if(n&1&&(a(0,"app-file-tree",44)(1,"label",50),c(2),F(3,Ki,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit,o=p(2);_("startingPath",o.getFormFieldValue(0,t.formGroupName,t.formView.name)),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function zi(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Hi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"link"),r())}function Wi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"textbox"),r())}function ji(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,zi,3,1,"spk-tooltip",51),r(),m(4,"input",52),F(5,Hi,2,0,"spk-icon",53)(6,Wi,2,0,"spk-icon",53),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(),g(t.formView.type==="Path"?5:6)}}function qi(n,i){if(n&1){let e=P();a(0,"span",57),C("click",function(){S(e);let o=p(2).$implicit,s=p(2);return T(s.oauthStartTokenCreation(o.destinationType))}),c(1,"AuthID"),r()}}function Qi(n,i){n&1&&(a(0,"spk-icon",53),c(1,"password"),r())}function Yi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye "),r()}}function Zi(n,i){if(n&1){let e=P();a(0,"spk-icon",58),C("click",function(){S(e);let o=p(2).$implicit;return T(o.formView.showPassword=!o.formView.showPassword)}),c(1," eye-slash "),r()}}function Ji(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),r(),m(3,"input",54),F(4,qi,2,0,"span",55)(5,Qi,2,0,"spk-icon",53)(6,Yi,2,0,"spk-icon",56)(7,Zi,2,0,"spk-icon",56),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),_("type",t.formView.showPassword?"text":"password"),l(),g(t.oauthField===t.formView.name?4:5),l(2),g(t.formView.showPassword?6:7)}}function eo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function to(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function no(n,i){if(n&1&&(a(0,"spk-select")(1,"label",50),c(2),F(3,eo,3,1,"spk-tooltip",51),r(),m(4,"input",59),I(5,60),R(6,to,2,2,"option",61,w),$(),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function io(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function oo(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e.value),l(),wt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function ro(n,i){if(n&1&&(a(0,"spk-select",45)(1,"label",50),c(2),F(3,io,3,1,"spk-tooltip",51),r(),m(4,"input",59),I(5,60),R(6,oo,2,3,"option",61,w),$(),r()),n&2){let e,t=p().$implicit,o=p(2);_("isFreeText",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name),l(2),v(t.formView.loadOptions(o.injector)())}}function ao(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function lo(n,i){if(n&1&&(a(0,"option",61),c(1),r()),n&2){let e=i.$implicit;_("value",e),l(),L(e)}}function so(n,i){if(n&1&&(a(0,"div",46)(1,"label",50),c(2),F(3,ao,3,1,"spk-tooltip",51),r(),a(4,"div",62)(5,"spk-form-field"),m(6,"input",63),a(7,"spk-icon",53),c(8,"resize"),r()(),a(9,"spk-select"),m(10,"label")(11,"input",64),I(12,60),R(13,lo,2,2,"option",61,w),$(),r()()()),n&2){let e,t=p().$implicit,o=p(2);_("formGroupName",t.formView.name),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(3),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(7),v(o.sizeOptions())}}function po(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function co(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,po,3,1,"spk-tooltip",51),r(),m(4,"input",65),a(5,"spk-icon",53),c(6,"numpad"),r()()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function _o(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function mo(n,i){if(n&1&&(a(0,"spk-toggle",47)(1,"label",50),c(2),F(3,_o,3,1,"spk-tooltip",51),r(),m(4,"input",66),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function uo(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function Fo(n,i){n&1&&(a(0,"spk-option",68),c(1,"None"),r()),n&2&&_("value","None")}function go(n,i){if(n&1&&(a(0,"spk-option",61),c(1),m(2,"spk-checkbox",69),r()),n&2){let e=p().$implicit;_("value",e),l(),b(" ",e," ")}}function Co(n,i){if(n&1&&F(0,Fo,2,1,"spk-option",68)(1,go,3,2,"spk-option",61),n&2){let e=i.$implicit;g(e==="None"?0:1)}}function fo(n,i){if(n&1&&(a(0,"spk-select",48)(1,"label",50),c(2),F(3,uo,3,1,"spk-tooltip",51),r(),m(4,"input",67),I(5,60),R(6,Co,2,1,null,null,w),$(),r()),n&2){let e,t=p().$implicit;_("selectMultiple",!0),l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),U("formControlName",t.formView.name),l(2),v(t.formView.options)}}function So(n,i){if(n&1&&(a(0,"spk-tooltip",51)(1,"spk-icon"),c(2,"question"),r()()),n&2){let e=p(2).$implicit;_("message",e.formView.longDescription)}}function To(n,i){if(n&1&&(a(0,"spk-form-field")(1,"label",50),c(2),F(3,So,3,1,"spk-tooltip",51),r(),m(4,"input",52),r()),n&2){let e,t=p().$implicit;l(),V("for","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),l(),b(" ",(e=t.formView.shortDescription)!==null&&e!==void 0?e:t.formView.name," "),l(),g(t.formView.longDescription?3:-1),l(),V("id","destination-",t.formGroupName,"-",t.index,"-",t.asHttpOptions?"http":"other",""),U("formControlName",t.formView.name)}}function Eo(n,i){if(n&1){let e=P();a(0,"button",70),C("click",function(){S(e);let o=p().$implicit,s=p(2);return T(s.removeFormView(o.formView,0))}),a(1,"spk-icon"),c(2,"x-circle"),r()()}}function Do(n,i){if(n&1&&(a(0,"div",41),I(1,42),F(2,Bi,5,16,"app-file-tree",43)(3,Xi,5,12,"app-file-tree",44)(4,ji,7,12,"spk-form-field")(5,Ji,8,13,"spk-form-field")(6,no,8,11,"spk-select")(7,ro,8,12,"spk-select",45)(8,so,15,11,"div",46)(9,co,7,11,"spk-form-field")(10,mo,5,11,"spk-toggle",47)(11,fo,8,8,"spk-select",48)(12,To,5,11,"spk-form-field"),$(),F(13,Eo,3,0,"button",49),r()),n&2){let e=i.$implicit;he("single-field",e.formGroupName!=="advanced"),l(),_("formGroupName",e.formGroupName),l(),g(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),l(11),g(e.formGroupName==="advanced"?13:-1)}}function No(n,i){if(n&1&&(I(0,25)(1,34),R(2,$i,1,9,"ng-container",null,w),R(4,wi,1,9,"ng-container",null,w),a(6,"app-toggle-card",35),I(7,36),E(8,13),a(9,"spk-menu")(10,"button",37),m(11,"spk-icon"),r(),I(12,23),R(13,Ri,2,1,"button",38,w),$(),r(),D(),$(),R(15,Gi,1,9,"ng-container",null,w),r(),a(17,"app-toggle-card",35),I(18,36),E(19,14),a(20,"spk-menu")(21,"button",37),m(22,"spk-icon"),r(),I(23,23),R(24,bi,2,1,"button",38,w),$(),r(),D(),$(),R(26,Li,1,9,"ng-container",null,w),r(),F(28,Do,14,5,"ng-template",null,1,at),$()()),n&2){let e=p();l(2),v(e.destinationFormPair().custom),l(2),v(e.destinationFormPair().dynamic),l(2),_("disallowToggle",!0),l(4),_("disabled",e.notSelectedAdvancedFormPair().length===0),l(3),v(e.notSelectedAdvancedFormPair()),l(2),v(e.selectedAdvancedFormPair()),l(2),_("disallowToggle",!0),l(4),_("disabled",e.notSelectedHttpOptions().length===0),l(3),v(e.notSelectedHttpOptions()),l(2),v(e.selectedHttpOptions())}}function Ao(n,i){if(n&1){let e=P();a(0,"spk-dialog",71),Gt("isOpenChange",function(o){S(e);let s=p();return vt(s.targetUrlDialogOpen,o)||(s.targetUrlDialogOpen=o),T(o)}),a(1,"header",72)(2,"h2"),A(3,15),r(),a(4,"spk-alert",73),A(5,16),r()(),a(6,"div",74)(7,"spk-form-field"),m(8,"textarea",75),r()(),a(9,"footer",76)(10,"button",27),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!1))}),c(11,"Cancel"),r(),a(12,"button",77),C("click",function(){S(e);let o=p();return T(o.closeTargetUrlDialog(!0))}),E(13,17),m(14,"spk-icon"),D(),r()()()}if(n&2){let e=p();Rt("isOpen",e.targetUrlDialogOpen),_("options",bt(3,hi)),l(8),_("formControl",e.targetUrlCtrl)}}var ho=["Bytes","KB","MB","GB","TB","PB"],Et=new ee,en=(n={destinations:[]})=>Et.group({destinations:Et.array(n.destinations)}),tn=({key:n,customGroup:i,dynamicGroup:e,advancedGroup:t})=>Et.group({destinationType:Et.control(n),custom:i,dynamic:e,advanced:t}),It=class n{#e=y(te);#n=y(Ce);#i=y(Lt);#o=y(Be);#t=y(pe);#r=y(Xt);injector=y(Mt);formRef=ue.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=H(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=x(ho);successfulTest=x(!1);getFormFieldValue(i,e,t){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[t].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#t.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#t.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#t.addHttpOption(i,e)}targetUrl=H(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new ct;targetUrlInitial=x(null);targetUrlDialogOpen=x(!1);openTargetUrlDialog(){let e=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,t=this.targetUrlInitial();!i||e===t||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let t=this.#t.getCurrentTargetUrl()[i];t&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:t}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:o=>{let s=o.error.error.Error;if(s==="missing-folder"&&this.#r.open(Le,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:d=>{d&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:t}}).subscribe()}}),s.startsWith("incorrect-cert:")){let d=s.split("incorrect-cert:")[1];this.#r.open(Le,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
2
- If this is a self-signed certificate, you can choose to trust this certificate.
3
- The server reported the certificate hash: ${d}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:k=>{k&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",d)}})}if(s.startsWith("incorrect-host-key:")){let d=s.split('incorrect-host-key:"')[1].split('",')[0],k=s.split('accepted-host-key:"')[1].split('",')[0];k?this.#r.open(Le,{maxWidth:"500px",data:{title:"The host key has changed",message:`The host key has changed, please check with the server administrator if this is correct,
4
- otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
5
- Do you want to REPLACE your CURRENT host key ${k}
6
- with the REPORTED host key: ${d}?`,confirmText:"Approve",cancelText:"Cancel"},closed:M=>{M&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,d)}}):this.#r.open(Le,{maxWidth:"500px",data:{title:"Approve host key?",message:`No certificate was specified, please verify that the reported host key is correct: ${d}`,confirmText:"Approve",cancelText:"Cancel"},closed:M=>{M&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,d)}})}}})}mapToTargetUrl(i){return ft(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let e=this.destinationOptions().find(t=>t.Key===i);return e?`${e.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#n.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#n.parent})}#l=x("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=x(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=x(!1);#p=x(null);keyCreation(){}oauthStartTokenCreation(i){this.#a.set(!0);let e=450,t=600,o=this.#l()+"?type="+i+"&token="+this.#s(),s=screen.width/2-e/2,d=screen.height/2-t/2,k=window.open(o,"_blank","height="+t+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+s+",top="+d);k?.addEventListener("blur",M=>{console.log("event blur",M)}),k?.addEventListener("beforeunload",M=>{console.log("event beforeunload",M),this.#i.get(this.#l()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#s()}}).pipe(Ye(()=>this.#a.set(!1))).subscribe({next:h=>{console.log("res",h),h?.authid&&this.#p.set(h.authid)}})})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=J({type:n,selectors:[["app-destination"]],viewQuery:function(e,t){e&1&&de(t.formRef,Ti,5),e&2&&Fe()},decls:24,vars:6,consts:()=>{let i;i=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"\uFFFD*6:1\uFFFD"}:START_BLOCK_IF_1:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON:${"\uFFFD*2:2\uFFFD"}:START_BLOCK_IF: Connected ${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*3:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*3:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*2:2\uFFFD|\uFFFD/*6:1\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:dots-three-vertical${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#1:2\uFFFD|\uFFFD#9\uFFFD|\uFFFD#12\uFFFD]"}:START_TAG_SPK_ICON:link${"[\uFFFD/#1:2\uFFFD|\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD]"}:CLOSE_TAG_SPK_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SPK_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,i=Oe(i);let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let t;t=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let o;o=$localize` Want to select another destination? ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let s;s=$localize`File system`;let d;d=$localize`Store backups on your local file system.`;let k;k=$localize`Store backups in Google Cloud Storage.`;let M;M=$localize`Store backups in any S3 compatible bucket.`;let h;h=$localize`Store backups in SSH.`;let Q;Q=$localize`Store backups in Google Drive.`;let Y;Y=$localize`More destinations are coming soon.`;let B;B=$localize` Advanced options ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#10\uFFFD"}:START_TAG_BUTTON: Add advanced option ${"\uFFFD#11\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#11\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#12\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*14:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#10\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*14:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_MENU:`,B=Oe(B);let K;K=$localize` Http options ${"\uFFFD#20\uFFFD"}:START_TAG_SPK_MENU:${"\uFFFD#21\uFFFD"}:START_TAG_BUTTON: Add http option ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#23\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD*25:1\uFFFD"}:START_BLOCK_FOR:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON_1: ${"\uFFFD0:1\uFFFD"}:INTERPOLATION: ${"[\uFFFD/#21\uFFFD|\uFFFD/#1:1\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/*25:1\uFFFD"}:CLOSE_BLOCK_FOR:${"\uFFFD/#23\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#20\uFFFD"}:CLOSE_TAG_SPK_MENU:`,K=Oe(K);let j;j=$localize`Edit target URL`;let N;N=$localize` Be careful, this will overwrite everything you have in your destination. `;let u;return u=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SPK_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],["fieldTemplate",""],i,e,t,o,s,d,k,M,h,Q,Y,B,K,j,N,u,[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["item","","type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["item","","type","button",3,"click"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],["options",""],[3,"value"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]]},template:function(e,t){if(e&1){let o=P();a(0,"form",18,0),C("submit",function(){return S(o),T(t.next())}),a(2,"header")(3,"h3",19),E(4,2),a(5,"div",20),F(6,Pi,4,3,"button",21),a(7,"spk-menu")(8,"button",22),m(9,"spk-icon"),r(),I(10,23),a(11,"button",24),C("click",function(){return S(o),T(t.openTargetUrlDialog())}),m(12,"spk-icon"),r(),$(),r()(),D(),r(),F(13,ki,3,0,"p"),r(),F(14,xi,28,0)(15,No,30,4,"ng-container",25),a(16,"div",26)(17,"button",27),C("click",function(){return S(o),T(t.goBack())}),E(18,3),m(19,"spk-icon"),D(),r(),a(20,"button",28),E(21,4),m(22,"spk-icon"),D(),r()()(),F(23,Ao,15,4,"spk-dialog",29)}if(e&2){let o;_("formGroup",t.destinationForm),l(6),g(t.destinationCount()>0?6:-1),l(7),g(t.destinationCount()>0?13:-1),l(),g(t.destinationCount()===0?14:-1),l(),g(!((o=t.destinationFormSignal())==null||o.destinations==null)&&o.destinations.length?15:-1),l(8),g(t.targetUrlDialogOpen()?23:-1)}},dependencies:[De,Se,oe,re,ne,$e,Ie,ie,fe,_t,Te,Ee,Me,Bt,st,le,se,Ft,dt,gt,ae,Re,Ke,Kt,ut,ve,Xe],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{en as a,tn as b,It as c,jt as d,yt as e,Ot as f,qt as g,gr as h,Pt as i,Yt as j,kt as k,Jt as l,xt as m,pe as n};
package/chunk-7SJHYZC5.js DELETED
@@ -1 +0,0 @@
1
- import{a as le}from"./chunk-5ZK3D2RS.js";import{Ec as Fe,Ic as we,Kc as G,Lc as y,O as $,Q as c,R as oe,S as W,Sa as o,U as D,Wa as E,Wb as v,X as Ae,Za as k,da as P,g as Ce,gb as q,ha as b,hb as l,ja as Me,jb as u,k as Ve,ma as A,nb as Ee,p as De,qc as h,sa as M,v as be,xb as ae}from"./chunk-MR4RE3IB.js";import{a as d,b as p}from"./chunk-C6Q5SG76.js";var Te=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(o(E),o(M))};static \u0275dir=l({type:n})}return n})(),S=(()=>{class n extends Te{static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),_=new D(""),dt={provide:_,useExisting:c(()=>ct),multi:!0},ct=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[h([dt]),u]})}return n})(),ht={provide:_,useExisting:c(()=>je),multi:!0};function ft(){let n=le()?le().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var pt=new D(""),je=(()=>{class n extends Te{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!ft())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(o(E),o(M),o(pt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&v("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[h([ht]),u]})}return n})();function C(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function Be(n){return n!=null&&typeof n.length=="number"}var N=new D(""),O=new D(""),gt=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ie=class{static min(t){return mt(t)}static max(t){return _t(t)}static required(t){return vt(t)}static requiredTrue(t){return yt(t)}static email(t){return Ct(t)}static minLength(t){return Vt(t)}static maxLength(t){return Dt(t)}static pattern(t){return bt(t)}static nullValidator(t){return Ue(t)}static compose(t){return ze(t)}static composeAsync(t){return Xe(t)}};function mt(n){return t=>{if(C(t.value)||C(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function _t(n){return t=>{if(C(t.value)||C(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function vt(n){return C(n.value)?{required:!0}:null}function yt(n){return n.value===!0?null:{required:!0}}function Ct(n){return C(n.value)||gt.test(n.value)?null:{email:!0}}function Vt(n){return t=>C(t.value)||!Be(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function Dt(n){return t=>Be(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function bt(n){if(!n)return Ue;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(C(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function Ue(n){return null}function He(n){return n!=null}function Le(n){return Ee(n)?Ve(n):n}function $e(n){let t={};return n.forEach(e=>{t=e!=null?d(d({},t),e):t}),Object.keys(t).length===0?null:t}function We(n,t){return t.map(e=>e(n))}function At(n){return!n.validate}function qe(n){return n.map(t=>At(t)?t:e=>t.validate(e))}function ze(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){return $e(We(e,t))}}function Ze(n){return n!=null?ze(qe(n)):null}function Xe(n){if(!n)return null;let t=n.filter(He);return t.length==0?null:function(e){let i=We(e,t).map(Le);return be(i).pipe(De($e))}}function Ye(n){return n!=null?Xe(qe(n)):null}function Se(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Ke(n){return n._rawValidators}function Je(n){return n._rawAsyncValidators}function ue(n){return n?Array.isArray(n)?n:[n]:[]}function Z(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ne(n,t){let e=ue(t);return ue(n).forEach(r=>{Z(e,r)||e.push(r)}),e}function Oe(n,t){return ue(t).filter(e=>!Z(n,e))}var X=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=Ze(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ye(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},f=class extends X{name;get formDirective(){return null}get path(){return null}},g=class extends X{_parent=null;name=null;valueAccessor=null},Y=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Mt={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Dn=p(d({},Mt),{"[class.ng-submitted]":"isSubmitted"}),bn=(()=>{class n extends Y{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(g,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ae("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),An=(()=>{class n extends Y{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(o(f,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ae("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var R="VALID",z="INVALID",F="PENDING",T="DISABLED",V=class{},K=class extends V{value;source;constructor(t,e){super(),this.value=t,this.source=e}},j=class extends V{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},B=class extends V{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},w=class extends V{status;source;constructor(t,e){super(),this.status=t,this.source=e}},de=class extends V{source;constructor(t){super(),this.source=t}},ce=class extends V{source;constructor(t){super(),this.source=t}};function pe(n){return(ie(n)?n.validators:n)||null}function Et(n){return Array.isArray(n)?Ze(n):n||null}function ge(n,t){return(ie(t)?t.asyncValidators:n)||null}function Ft(n){return Array.isArray(n)?Ye(n):n||null}function ie(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function Qe(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new $(1e3,"");if(!i[e])throw new $(1001,"")}function et(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new $(1002,"")})}var I=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return y(this.statusReactive)}set status(t){y(()=>this.statusReactive.set(t))}_status=G(()=>this.statusReactive());statusReactive=k(void 0);get valid(){return this.status===R}get invalid(){return this.status===z}get pending(){return this.status==F}get disabled(){return this.status===T}get enabled(){return this.status!==T}errors;get pristine(){return y(this.pristineReactive)}set pristine(t){y(()=>this.pristineReactive.set(t))}_pristine=G(()=>this.pristineReactive());pristineReactive=k(!0);get dirty(){return!this.pristine}get touched(){return y(this.touchedReactive)}set touched(t){y(()=>this.touchedReactive.set(t))}_touched=G(()=>this.touchedReactive());touchedReactive=k(!1);get untouched(){return!this.touched}_events=new Ce;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ne(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ne(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Oe(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Oe(t,this._rawAsyncValidators))}hasValidator(t){return Z(this._rawValidators,t)}hasAsyncValidator(t){return Z(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(p(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new B(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(p(d({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new j(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new j(!0,i))}markAsPending(t={}){this.status=F;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new w(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(p(d({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=T,this.errors=null,this._forEachChild(r=>{r.disable(p(d({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new K(this.value,i)),this._events.next(new w(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=R,this._forEachChild(i=>{i.enable(p(d({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(p(d({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===R||this.status===F)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new K(this.value,e)),this._events.next(new w(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(p(d({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?T:R}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=F,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Le(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new w(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new A,this.statusChanges=new A}_calculateStatus(){return this._allControlsDisabled()?T:this.errors?z:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(F)?F:this._anyControlsHaveStatus(z)?z:R}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new j(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new B(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ie(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Et(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ft(this._rawAsyncValidators)}},J=class extends I{constructor(t,e,i){super(pe(e),ge(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){et(this,!0,t),Object.keys(t).forEach(i=>{Qe(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var he=class extends J{};var x=new D("CallSetDisabledState",{providedIn:"root",factory:()=>H}),H="always";function re(n,t){return[...t.path,n]}function Q(n,t,e=H){me(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),It(n,t),Nt(n,t),St(n,t),wt(n,t)}function ee(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),ne(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function te(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function wt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function me(n,t){let e=Ke(n);t.validator!==null?n.setValidators(Se(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Je(n);t.asyncValidator!==null?n.setAsyncValidators(Se(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();te(t._rawValidators,r),te(t._rawAsyncValidators,r)}function ne(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=Ke(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=!0,n.setValidators(s))}}if(t.asyncValidator!==null){let r=Je(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=!0,n.setAsyncValidators(s))}}}let i=()=>{};return te(t._rawValidators,i),te(t._rawAsyncValidators,i),e}function It(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&tt(n,t)})}function St(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&tt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function tt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Nt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function Ot(n,t){n==null,me(n,t)}function xt(n,t){return ne(n,t)}function _e(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Pt(n){return Object.getPrototypeOf(n.constructor)===S}function kt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function ve(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(s=>{s.constructor===je?e=s:Pt(s)?i=s:r=s}),r||i||e||null}function Gt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function xe(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Pe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var U=class extends I{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(pe(e),ge(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ie(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Pe(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){xe(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){xe(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Pe(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Rt=n=>n instanceof U,Tt=(()=>{class n extends f{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return re(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var jt={provide:g,useExisting:c(()=>Bt)},ke=Promise.resolve(),Bt=(()=>{class n extends g{_changeDetectorRef;callSetDisabledState;control=new U;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new A;constructor(e,i,r,s,a,m){super(),this._changeDetectorRef=a,this.callSetDisabledState=m,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ve(this,s)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),_e(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Q(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){ke.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&we(i);ke.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?re(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(o(f,9),o(N,10),o(O,10),o(_,10),o(Fe,8),o(x,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[h([jt]),u,P]})}return n})(),En=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),Ut={provide:_,useExisting:c(()=>Ht),multi:!0},Ht=(()=>{class n extends S{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&v("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[h([Ut]),u]})}return n})(),Lt={provide:_,useExisting:c(()=>Wt),multi:!0};var $t=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Wt=(()=>{class n extends S{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=Ae(x,{optional:!0})??H;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(o(E),o(M),o($t),o(Me))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[h([Lt]),u]})}return n})();var ye=new D(""),qt={provide:g,useExisting:c(()=>zt)},zt=(()=>{class n extends g{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new A;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=ve(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&ee(i,this,!1),Q(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}_e(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&ee(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(o(N,10),o(O,10),o(_,10),o(ye,8),o(x,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[h([qt]),u,P]})}return n})(),Zt={provide:f,useExisting:c(()=>nt)},nt=(()=>{class n extends f{callSetDisabledState;get submitted(){return y(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=G(()=>this._submittedReactive());_submittedReactive=k(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new A;constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(ne(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return Q(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ee(e.control||null,e,!1),Gt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),kt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new de(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new ce(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ee(i||null,e),Rt(r)&&(Q(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);Ot(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&xt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){me(this.form,this),this._oldForm&&ne(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(o(N,10),o(O,10),o(x,8))};static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&v("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[h([Zt]),u,P]})}return n})(),Xt={provide:f,useExisting:c(()=>it)},it=(()=>{class n extends Tt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){st(this._parent)}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[h([Xt]),u]})}return n})(),Yt={provide:f,useExisting:c(()=>rt)},rt=(()=>{class n extends f{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return re(this.name==null?this.name:this.name.toString(),this._parent)}_checkParentType(){st(this._parent)}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[h([Yt]),u]})}return n})();function st(n){return!(n instanceof it)&&!(n instanceof nt)&&!(n instanceof rt)}var Kt={provide:g,useExisting:c(()=>Jt)},Jt=(()=>{class n extends g{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new A;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,s,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ve(this,s)}ngOnChanges(e){this._added||this._setUpControl(),_e(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return re(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(o(f,13),o(N,10),o(O,10),o(_,10),o(ye,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[h([Kt]),u,P]})}return n})(),Qt={provide:_,useExisting:c(()=>at),multi:!0};function ot(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function en(n){return n.split(":")[0]}var at=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i=this._getOptionId(e),r=ot(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=en(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[h([Qt]),u]})}return n})(),Fn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(ot(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(o(M),o(E),o(at,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),tn={provide:_,useExisting:c(()=>lt),multi:!0};function Ge(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function nn(n){return n.split(":")[0]}var lt=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let m=0;m<a.length;m++){let L=a[m],se=this._getOptionValue(L.value);r.push(se)}}else{let a=i.options;for(let m=0;m<a.length;m++){let L=a[m];if(L.selected){let se=this._getOptionValue(L.value);r.push(se)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=nn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=b(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&v("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[h([tn]),u]})}return n})(),wn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Ge(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(Ge(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(o(M),o(E),o(lt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var ut=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({})}return n})(),fe=class extends I{constructor(t,e,i){super(pe(e),ge(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){et(this,!1,t),t.forEach((i,r)=>{Qe(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};function Re(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var In=(()=>{class n{useNonNullable=!1;get nonNullable(){let e=new n;return e.useNonNullable=!0,e}group(e,i=null){let r=this._reduceControls(e),s={};return Re(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new J(r,s)}record(e,i=null){let r=this._reduceControls(e);return new he(r,i)}control(e,i,r){let s={};return this.useNonNullable?(Re(i)?s=i:(s.validators=i,s.asyncValidators=r),new U(e,p(d({},s),{nonNullable:!0}))):new U(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new fe(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){if(e instanceof U)return e;if(e instanceof I)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=oe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Sn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:x,useValue:e.callSetDisabledState??H}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({imports:[ut]})}return n})(),Nn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:ye,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:x,useValue:e.callSetDisabledState??H}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=q({type:n});static \u0275inj=W({imports:[ut]})}return n})();export{ct as a,je as b,Ie as c,bn as d,An as e,U as f,Bt as g,En as h,Ht as i,Wt as j,zt as k,nt as l,it as m,rt as n,Jt as o,Fn as p,wn as q,In as r,Sn as s,Nn as t};
package/chunk-AUUCT7OA.js DELETED
@@ -1 +0,0 @@
1
- import{$a as oe,Ab as w,Bb as le,Cb as ae,Db as ce,Eb as r,Fb as l,Gb as j,Kb as T,Kc as b,Mc as E,Nc as Z,R as U,Ra as y,Wa as ne,Wb as _,X as F,Xb as C,Ya as N,Yb as v,Za as h,Zb as a,_a as M,ab as P,ea as d,ec as pe,fa as u,fb as g,fc as V,gc as H,hb as se,hc as de,ic as k,jc as ue,kc as X,lb as x,mc as z,nc as G,oc as K,pa as Q,qa as R,ra as p,rb as re,rc as J,sa as B,vb as $,wb as I,xb as L,yb as Y,zb as q}from"./chunk-MR4RE3IB.js";import{a as A,b as W,c as ie}from"./chunk-C6Q5SG76.js";var O=["*"],Ce=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Se=["[icon]","[title]","*","[content]"];function _e(n,S){n&1&&(r(0,"spk-icon",3),k(1,"info"),l())}function ye(n,S){n&1&&(r(0,"spk-icon",3),k(1,"info"),l())}function ke(n,S){n&1&&(r(0,"spk-icon",3),k(1,"check-circle"),l())}function De(n,S){n&1&&(r(0,"spk-icon",3),k(1,"warning-octagon"),l())}function be(n,S){n&1&&(r(0,"spk-icon",3),k(1,"warning"),l())}function Oe(n,S){n&1&&(r(0,"spk-icon",3),k(1,"question"),l())}function we(n,S){if(n&1){let e=T();r(0,"spk-icon",7),_("click",function(){d(e);let i=C();return u(i.removeAlert())}),k(1,"plus"),l()}}var Ee=["dialogRef"];function xe(n,S){if(n&1){let e=T();r(0,"div",4),_("click",function(){d(e);let i=C();return u(i.isOpen.set(!1))}),l()}}var Te=["spk-button",""],Me=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],Ie=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],he=["triggerRef"],Ve=["popoverRef"],Ae=[[["","trigger",""]],"*"],Fe=["[trigger]","*"];var Re=["inputWrap"];var Pe=()=>({closeOnButton:!1,closeOnEsc:!0});var je=["option"],He=["*",[["","menu",""]]],Be=["*","[menu]"];var Le=["optionsRef"],We=["formFieldWrapper"],qe=[[["label"]],[["input"]],"*",[["","deselect-indicator",""]],[["","search-indicator",""]],[["","open-indicator",""]]],Ue=["label","input","*","[deselect-indicator]","[search-indicator]","[open-indicator]"],Qe=()=>({closeOnButton:!1,closeOnEsc:!1});function Ne(n,S){if(n&1){let e=T();r(0,"spk-chip",12),_("click",function(i){let o=d(e).$implicit,s=C(3);return u(s.toggleOption(o,i))}),k(1),r(2,"spk-icon"),k(3,"x-circle"),l()()}if(n&2){let e,t=S.$implicit,i=C(3);q(i.chipClass()),y(),X(" ",(e=(e=i.displayFn())==null?null:e(t))!==null&&e!==void 0?e:t," ")}}function $e(n,S){if(n&1&&ae(0,Ne,4,3,"spk-chip",11,le),n&2){let e=C(2);ce(e.inputValue().split(","))}}function Ye(n,S){if(n&1&&(r(0,"div",6),x(1,$e,2,0),l()),n&2){let e=C();y(),w(e.inputValue().length>0?1:-1)}}function Xe(n,S){if(n&1&&(r(0,"div",6),k(1),l()),n&2){let e=C();y(),ue(e._displayValue())}}function ze(n,S){if(n&1){let e=T();r(0,"div",13),_("click",function(i){d(e);let o=C();return u(o.deselect(i))}),a(1,3),r(2,"spk-icon",14),k(3,"x-circle"),l()()}}function Ge(n,S){n&1&&(r(0,"div",8),a(1,4),r(2,"spk-icon",14),k(3,"magnifying-glass"),l()())}function Ke(n,S){if(n&1&&(r(0,"div",15),a(1,5),r(2,"spk-icon",14),k(3,"caret-down"),l()()),n&2){let e=C();L("open",e.isOpen())}}var Je=["dragImageElement"],Ze=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],et=["[sidenav]","[sidenav-closed-topbar]","*"];function tt(n,S){n&1&&j(0,"div",1,0)}function it(n,S){if(n&1){let e=T();r(0,"div",7),_("drop",function(i){d(e);let o=C();return u(o.drop(i))})("dragover",function(i){d(e);let o=C();return u(o.dragOver(i))})("dragenter",function(){d(e);let i=C();return u(i.dragEnter())})("dragleave",function(){d(e);let i=C();return u(i.dragLeave())}),l()}}function nt(n,S){if(n&1){let e=T();r(0,"div",8),_("dragstart",function(i){d(e);let o=C();return u(o.dragStart(i))})("dragend",function(i){d(e);let o=C();return u(o.dragEnd(i))})("drag",function(i){d(e);let o=C();return u(o.drag(i))})("touchstart",function(i){d(e);let o=C();return u(o.touchStart(i))})("touchmove",function(i){d(e);let o=C();return u(o.touchMove(i))})("touchend",function(i){d(e);let o=C();return u(o.touchEnd(i))})("touchcancel",function(i){d(e);let o=C();return u(o.touchCancel(i))}),l()}}var ot=[[["","table-header",""]],"*",[["","table-no-rows",""]]],st=["[table-header]","*","[table-no-rows]"];function rt(n,S){n&1&&j(0,"spk-progress-bar",0)}function lt(n,S){n&1&&(r(0,"div",1),a(1,2),l())}var at=["tooltipRef"],ee=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-icon"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Ft=(()=>{class n{constructor(){this._el=F(B),this.alertService=p(null),this.type=p("error"),this.id=p(null)}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-alert"]],hostVars:2,hostBindings:function(t,i){t&2&&q(i.type())},inputs:{alertService:[1,"alertService"],type:[1,"type"],id:[1,"id"]},ngContentSelectors:Se,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(t,i){if(t&1&&(v(Ce),r(0,"div",1)(1,"div",2,0),a(3),l(),r(4,"div",2),x(5,_e,2,0,"spk-icon",3)(6,ye,2,0,"spk-icon",3)(7,ke,2,0,"spk-icon",3)(8,De,2,0,"spk-icon",3)(9,be,2,0,"spk-icon",3)(10,Oe,2,0,"spk-icon",3),l(),r(11,"div",4),a(12,1),a(13,2),l(),x(14,we,2,0,"spk-icon",5),r(15,"div",6),a(16,3),l()()),t&2){let o,s=de(2);y(),I("display",s.children.length?"block":"none"),y(4),w((o=i.type())==="primary"?5:o==="accent"?6:o==="success"?7:o==="error"?8:o==="warning"?9:10),y(9),w(i.id()?14:-1)}},dependencies:[ee],encapsulation:2,changeDetection:0})}}return n})();var Rt=(()=>{class n{constructor(){this.alertHistory=h([]),this.alertHistoryIsOpen=h(!1),this.alertHistoryIsHidden=h(!0)}error(e){this.addAlert({type:"error",title:e??"An error occured"})}success(e){this.addAlert({type:"success",title:e})}question(e){this.addAlert({type:"question",title:e})}warning(e){this.addAlert({type:"warning",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=crypto.randomUUID();this.alertHistory.update(i=>[W(A({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>W(A({},o),{animateIn:o.id===t?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(i=>W(A({},i),{animateOut:i.id===e?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(i=>i.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(i=>W(A({},i),{isOpen:i.id===e?!1:i.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=U({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ct={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},pt=(()=>{class n{constructor(){this.dialogRef=M("dialogRef"),this.isOpen=P(!1),this.options=p(),this.closed=R(),this.defaultOptionMerge=b(()=>A(A({},ct),this.options())),this.abortController=null,this.isOpenEffect=E(()=>{let e=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(e?.showModal(),e?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",t=>{t.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&t.preventDefault(),t.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),e?.close())})}ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-dialog"]],viewQuery:function(t,i){t&1&&V(i.dialogRef,Ee,5),t&2&&H()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:O,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,i){if(t&1&&(v(),r(0,"dialog",1,0)(2,"div",2),a(3),l(),x(4,xe,1,0,"div",3),l()),t&2){let o,s,c,f;I("width",(o=i.defaultOptionMerge().width)!==null&&o!==void 0?o:"")("max-width",(s=i.defaultOptionMerge().maxWidth)!==null&&s!==void 0?s:"")("max-height",(c=i.defaultOptionMerge().maxHeight)!==null&&c!==void 0?c:"")("height",(f=i.defaultOptionMerge().height)!==null&&f!==void 0?f:""),y(4),w(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),Pt=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#t=F(re),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#t;open(e,t){let i=this.#t.injector,o=this.#l(),te=t||{},{data:s,closed:c}=te,f=ie(te,["data","closed"]);this.compRef&&this.#r(),this.insertedCompRef=Z(e,{environmentInjector:i}),this.compRef=Z(pt,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let D=this.insertedCompRef.instance?.data,m=this.insertedCompRef.instance?.closed;if(s){if(N(D))this.insertedCompRef.setInput("data",s);else if(!N(D))throw new Error("data is not an input signal on the passed component")}m instanceof Q&&(this.closedFieldSub=m.subscribe((...ve)=>{c?.(...ve),this.#r()})),this.#t.attachView(this.insertedCompRef.hostView),this.#t.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",f),this.compRef.instance.closed.subscribe(()=>ge());let me=this;function ge(){m&&m instanceof Q?m.emit(!1):c?.(void 0),me.#r()}return this.insertedCompRef.instance}#l(){let e=document.createElement("spk-dialog-ref");return e.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(e),document.getElementById("spk-dialog-ref")}#r(){this.insertedCompRef&&(this.#t.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#t.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#r()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=U({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),jt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-button-group"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),dt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["","spk-button",""]],attrs:Te,ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Ht=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-card"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Bt=(()=>{class n{#e=F(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-checkbox"]],hostBindings:function(t,i){t&1&&_("click",function(){return i.onClick()})},ngContentSelectors:O,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(t,i){t&1&&(v(),r(0,"div",0)(1,"spk-icon",1),k(2,"check"),l(),r(3,"spk-icon",2),k(4,"minus"),l()(),a(5))},dependencies:[ee],encapsulation:2,changeDetection:0})}}return n})(),ut=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-chip"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),ht=(()=>{class n{#e=F(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let c=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},f=function(){window.setTimeout(c,0)};var i=c,o=f;let s=this.#e.nativeElement.querySelector("textarea");s.addEventListener("change",c),s.addEventListener("cut",f),s.addEventListener("paste",f),s.addEventListener("drop",f),s.addEventListener("keydown",f),s.focus(),s.select(),c()}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-form-field"]],hostBindings:function(t,i){t&1&&_("click",function(){return i.onClick()})},ngContentSelectors:Ie,decls:16,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(t,i){t&1&&(v(Me),a(0),r(1,"div",0)(2,"div",1),a(3,1),a(4,2),l(),j(5,"div",2),a(6,3),a(7,4),a(8,5),j(9,"div",3),a(10,6),l(),r(11,"div",4)(12,"div",5),a(13,7),l(),r(14,"div",6),a(15,8),l()())},encapsulation:2,changeDetection:0})}}return n})(),ft={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},fe=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.disableOpenByClick=p(!1),this.isOpen=P(!1),this.options=p(),this.closed=R(),this.defaultOptionMerge=b(()=>A(A({},ft),this.options())),this.triggerRef=M.required("triggerRef"),this.popoverRef=M.required("popoverRef"),this.id=h("--"+crypto.randomUUID()),this.menuStyle=h(null),this.openAbort=null,this.isCalculatingPosition=b(()=>{let e=this.popoverRef()?.nativeElement;return this.isOpen()?(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,e?.showPopover(),document.addEventListener("keydown",i=>{i.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&i.preventDefault(),i.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{capture:!0,signal:this.abortController?.signal}),!0):(e.hidePopover(),this.abortController?.abort(),this.openAbort?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=E(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#t(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})}),this.scrollableStyles=["scroll","auto"]}#e;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}#t(e){let t=e.parentElement;for(;t;){if(this.scrollableStyles.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,D=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(D),this._right.set(f);else{if(this.above()){let m=e.top-t.height-this.#e;m>=0&&(c=m)}else D&&(c=e.top-t.height-this.#e);if(this.right()){let m=e.right-t.width;m>=0&&(s=m)}else f&&(c=D?e.top+e.height-t.height:e.top,s=e.left-t.width-this.#e);this.menuStyle.set({left:s+"px",top:c+"px"})}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-popover"]],viewQuery:function(t,i){t&1&&(V(i.triggerRef,he,5),V(i.popoverRef,Ve,5)),t&2&&H(2)},hostVars:4,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Fe,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(t,i){if(t&1){let o=T();v(Ae),r(0,"div",2,0),_("click",function(c){return d(o),u(i.toggleIsOpen(c))}),r(2,"div",3),a(3),l(),r(4,"button",4),k(5,"Open popover"),l()(),r(6,"div",5,1)(8,"div",6),_("click",function(c){return d(o),u(i.isOpen()&&i.eventClose(c))}),l(),a(9,1),l()}t&2&&(I("anchor-name",i.id()),y(6),Y(i.menuStyle()),I("position-anchor",i.id()))},dependencies:[dt],encapsulation:2,changeDetection:0})}}return n})();var Lt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-list"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Wt=(()=>{class n{constructor(){this.above=p(!1),this.right=p(!1),this.keepClickedOptionActive=p(!1),this.isOpen=P(!1),this.closed=R(),this.activeOptionIndex=h(-1),this.options=oe("option"),this.optionsEl=b(()=>Array.from(this.options()).map(e=>e.nativeElement).filter(e=>e.disabled!==!0)),this.optionsEffect=E(()=>{if(!this.isOpen())return;let e=this.activeOptionIndex(),t=this.optionsEl();if(e>-1)for(let i=0;i<t.length;i++){if(i===e){t[i].scrollIntoView({block:"center"}),t[i].classList.add("active");continue}t[i].classList.remove("active")}})}onKeyDown(e){if(!this.isOpen())return;e.preventDefault();let t=this.optionsEl(),i=this.activeOptionIndex();e.key==="ArrowDown"?i===-1||i===t.length-1?this.activeOptionIndex.set(0):this.activeOptionIndex.set(i+1):e.key==="ArrowUp"?i===-1||i===0?this.activeOptionIndex.set(t.length-1):this.activeOptionIndex.set(i-1):e.key==="Enter"?i>-1&&(t[i].click(),setTimeout(()=>this.close("active"))):e.key==="Tab"?this.close("closed"):this.activeOptionIndex.set(-1)}close(e="closed",t){(!this.keepClickedOptionActive()||e==="closed")&&this.#e(),this.isOpen.set(!1),this.closed.emit(e==="active")}#e(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active")}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-menu"]],contentQueries:function(t,i,o){t&1&&pe(o,i.options,je,4),t&2&&H()},hostBindings:function(t,i){t&1&&_("keydown",function(s){return i.onKeyDown(s)})},inputs:{above:[1,"above"],right:[1,"right"],keepClickedOptionActive:[1,"keepClickedOptionActive"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Be,decls:6,vars:6,consts:[["formFieldWrapper",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"options",3,"click"]],template:function(t,i){if(t&1){let o=T();v(He),r(0,"spk-popover",1,0),K("isOpenChange",function(c){return d(o),G(i.isOpen,c)||(i.isOpen=c),u(c)}),_("closed",function(){return d(o),u(i.close("fromPopover"))}),r(2,"div",2),_("click",function(){return d(o),u(i.isOpen.set(!0))}),a(3),l(),r(4,"div",3),_("click",function(){return d(o),u(i.close("active"))}),a(5,1),l()()}t&2&&(z("isOpen",i.isOpen),$("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",J(5,Pe)))},dependencies:[fe],encapsulation:2,changeDetection:0})}}return n})(),mt=(()=>{class n{constructor(){this.value=p(void 0)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,i){t&1&&j(0,"div",0),t&2&&I("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),qt=(()=>{class n{#e=F(B);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-radio"]],hostBindings:function(t,i){t&1&&_("click",function(){return i.onClick()})},ngContentSelectors:O,decls:2,vars:0,consts:[[1,"radio"]],template:function(t,i){t&1&&(v(),j(0,"div",0),a(1))},encapsulation:2,changeDetection:0})}}return n})();var Ut=(()=>{class n{constructor(){this.value=p(null)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-option"]],inputs:{value:[1,"value"]},ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),gt=["primary","accent","tertiary","warn","success"],Qt=(()=>{class n{constructor(){this.#e=F(ne),this.#t=F(B),this.#l=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(let t of e)if(t.type==="childList"&&t.target instanceof HTMLElement){let i=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let o=0;o<i.length;o++){let s=i[o];(s.nodeName==="OPTION"||s.nodeName==="SPK-OPTION")&&this.#s.set(!this.#s())}}}),this.optionsRef=M("optionsRef"),this.formFieldWrapperRef=M.required("formFieldWrapper"),this.inputWrapRef=M.required("inputWrap"),this.inputValue=P(""),this.readonly=p(!1),this.isFreeText=p(!1),this.selectMultiple=p(!1),this.hideClearButton=p(!1),this.displayValue=p(""),this.displayFn=p(e=>`${e}`),this.above=p(!1),this.right=p(!1),this.change=R(),this.#r=h(!1),this.#s=h(!1),this.#i=h(null),this.#a=h(null),this.#c=h(!1),this.#n=h(-1),this.isOpen=h(!1),this._isOpen=h(!1),this.#h=E(()=>{this._isOpen.set(this.isOpen()&&this.#o().length>0)}),this.isSearchInput=b(()=>this.#i()?.type==="search"),this.optionsEl=b(()=>this.optionsRef()?.nativeElement),this.#o=b(()=>{this.#s();let e=this.optionsRef()?.nativeElement.querySelectorAll("option"),t=this.optionsRef()?.nativeElement.querySelectorAll("spk-option");return e?.length?Array.from(e):t?.length?Array.from(t):[]}),this.chipClass=b(()=>Array.from(this.#t.nativeElement.classList).filter(e=>gt.includes(e)).join(" ")),this._displayValue=b(()=>this.displayFn()?this.displayFn()(this.inputValue()):this.displayValue()??this.inputValue()),this.selectedOption=b(()=>this.#a()?this.#o().find(e=>(e.getAttribute("value")||e.getAttribute("ng-reflect-value"))===this.#a()):null),this.optionsOpenController=null,this.inputController=null,this.clickController=null,this.inputAbortController=null,this.#f=E(()=>{this.#r();let e=this.#t.nativeElement.querySelector("input");e&&(this.#y(e),e.addEventListener("inputValueChanged",t=>{this.inputValue.set(t.detail.value),this.selectMultiple()&&this.#d()}),this.#i.set(e),e.autocomplete="off",typeof e.value=="string"&&this.inputValue.set(e.value))}),this.#m=E(()=>{this.inputController&&this.inputController.abort(),this.inputController=new AbortController;let e=this.#i();e&&e.addEventListener("keydown",t=>{(this.selectMultiple()||!this.isSearchInput()&&!this.isFreeText())&&t.preventDefault(),t.key==="Escape"?this.close():t.key==="ArrowDown"?this.#n()===null||this.#n()<0||this.#n()===this.#o().length-1?this.#n.set(this.#u()):this.#n.set(this.#n()+1):t.key==="ArrowUp"?this.#n()===null||this.#n()<0||this.#n()===0?this.#n.set(this.#o().length-1):this.#n.set(this.#n()-1):t.key==="Enter"?(this.isFreeText()&&this.close(!0),this.#n()>-1&&this.selected(this.getOptionElement(this.#n()))):t.key==="Tab"?this.close(!0):(this.#n.set(-1),this.isFreeText()&&this.calculateSelectedOptions())},{signal:this.inputController?.signal})}),this.#g=E(()=>{this.isOpen()&&this.#_()}),this.#v=E(()=>{let e=this.inputValue();this.#i()&&(this.#i().value=e??"",this.#i().dispatchEvent(new Event("input")))}),this.#p=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t.type=="childList"&&t.target.classList.contains("input")&&this.#r.set(!this.#r())})}#e;#t;#l;#r;#s;#i;#a;#c;#n;#h;#o;#f;#m;#g;#v;ngOnInit(){typeof MutationObserver<"u"&&this.#p.observe(this.inputWrapRef().nativeElement,{attributes:!0,childList:!0,subtree:!0})}getOptionElement(e){return this.#o()[e]}deselect(e,t=!1){e?.stopPropagation(),this.#i()&&(this.#i().value="",this.#i().dispatchEvent(new Event("input"))),this.#n.set(this.#u()),this.#c.set(!1),(t||!this.selectMultiple())&&(this.isOpen.set(!1),this.#i()?.blur())}selected(e){if(!e)return;let t=(e.getAttribute("value")||e.getAttribute("ng-reflect-value"))??"",i=this.#o().indexOf(e);if(e.hasAttribute("deselect"))return this.deselect(null,!0);if(this.#n.set(i),e&&!this.selectMultiple()){this.inputValue.set(t);for(let o=0;o<this.#o().length;o++){let s=this.#o()[o];(s.getAttribute("value")||s.getAttribute("ng-reflect-value"))===t?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}}else e&&this.selectMultiple()&&(this.inputValue().includes(t)?(this.#e.removeAttribute(e,"selected"),this.toggleOption(t)):(this.#e.setAttribute(e,"selected","selected"),this.inputValue.set(this.inputValue().length?`${this.inputValue()},${t}`:t)));this.#c.set(!1),this.#a.set(null),this.selectMultiple()?this.#i()?.focus():(this.isOpen.set(!1),this.#i()?.blur()),this.change.emit(this.inputValue())}calculateSelectedOptions(){setTimeout(()=>{let e=this.#o(),i=this.#i()?.value;for(let o=0;o<e.length;o++){let s=e[o];(s.getAttribute("value")||s.getAttribute("ng-reflect-value"))===i?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}})}toggleOption(e,t){t&&(t.preventDefault(),t.stopPropagation()),this.inputValue.set(this.inputValue().startsWith(e+",")?this.inputValue().replace(e+",",""):this.inputValue().includes(","+e)?this.inputValue().replace(","+e,""):this.inputValue().replace(e,""))}close(e=!1){this.#s.set(!this.#s());let t=this.#a();this.isSearchInput()&&!this.isFreeText()&&t&&setTimeout(()=>this.inputValue.set(t)),this.isOpen.set(!1),this.#c.set(!1),e||this.#i()?.blur(),typeof MutationObserver<"u"&&this.#l.disconnect(),this.#S()}open(e){e.preventDefault(),!this.isOpen()&&(typeof MutationObserver<"u"&&this.#l.observe(this.optionsEl(),{childList:!0,subtree:!0}),this.isSearchInput()&&!this.#c()&&!this.isFreeText()?(this.#a.set(this.inputValue()),this.inputValue.set(""),this.#i().focus(),this.#i().value="",this.#i().dispatchEvent(new Event("input")),this.#n.set(-1)):(this.isSearchInput()||this.selectMultiple())&&this.#i().focus(),this.#s.set(!this.#s()),this.isOpen.set(!0),this.#c.set(!0),this.#C(),this.#d())}#C(){this.clickController&&this.clickController.abort(),this.clickController=new AbortController,this.optionsEl()?.addEventListener("click",e=>{if(!e.target)return;this.#s.set(!this.#s());let t=e.target.closest("option"),i=e.target.closest("spk-option"),o=t||i;this.#o().indexOf(o)>-1&&this.selected(o)},{signal:this.clickController?.signal})}#S(){this.clickController&&this.clickController.abort()}#_(){for(let e=0;e<this.#o().length;e++){let t=this.#o()[e];this.#e.removeClass(t,"focused"),this.#n()===e&&(this.#e.addClass(t,"focused"),t.scrollIntoView({block:"center"}))}}#d(){let e=this.#i();if(!e)return;this.inputValue.set(e.value);let t=e.value.split(",");setTimeout(()=>{let i=this.#o();for(let o=0;o<i.length;o++){let s=i[o].getAttribute("ng-reflect-value");s&&t.includes(s)?this.#e.setAttribute(i[o],"selected","selected"):this.#e.removeAttribute(i[o],"selected")}})}#u(){let e=this.#o();for(let t=0;t<e.length;t++)if(!e[t].hasAttribute("deselect"))return t;return-1}#p;#y(e){return Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(o),t}}),e}ngOnDestroy(){this.clickController&&this.clickController.abort(),this.inputController&&this.inputController.abort(),this.optionsOpenController&&this.optionsOpenController.abort(),typeof MutationObserver<"u"&&(this.#p.disconnect(),this.#l.disconnect())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-select"]],viewQuery:function(t,i){t&1&&(V(i.optionsRef,Le,5),V(i.formFieldWrapperRef,We,5),V(i.inputWrapRef,Re,5)),t&2&&H(3)},inputs:{inputValue:[1,"inputValue"],readonly:[1,"readonly"],isFreeText:[1,"isFreeText"],selectMultiple:[1,"selectMultiple"],hideClearButton:[1,"hideClearButton"],displayValue:[1,"displayValue"],displayFn:[1,"displayFn"],above:[1,"above"],right:[1,"right"]},outputs:{inputValue:"inputValueChange",change:"change"},ngContentSelectors:Ue,decls:15,vars:8,consts:[["formFieldWrapper",""],["inputWrap",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"display-value"],["suffix","",1,"deselect-indicator"],["suffix","",1,"search-indicator"],["suffix","",1,"select-open-indicator",3,"open"],[1,"sparkle-options"],[1,"small","simple",3,"class"],[1,"small","simple",3,"click"],["suffix","",1,"deselect-indicator",3,"click"],[1,"default-indicator"],["suffix","",1,"select-open-indicator"]],template:function(t,i){if(t&1){let o=T();v(qe),r(0,"spk-popover",3,0),K("isOpenChange",function(c){return d(o),G(i.isOpen,c)||(i.isOpen=c),u(c)}),_("closed",function(){return d(o),u(i.close())}),r(2,"spk-form-field",4),_("click",function(c){return d(o),u(i.open(c))}),a(3,0,["ngProjectAs","label",5,["label"]]),r(4,"div",5,1),x(6,Ye,2,1,"div",6)(7,Xe,2,1,"div",6),a(8,1),l(),x(9,ze,4,0,"div",7)(10,Ge,4,0,"div",8)(11,Ke,4,2,"div",9),l(),r(12,"div",10,2),a(14,2),l()()}t&2&&(z("isOpen",i.isOpen),$("disableOpenByClick",!0)("options",J(7,Qe)),y(2),q(i.readonly()?"readonly":""),y(4),w(i.selectMultiple()?6:i._displayValue()&&i.isSearchInput()&&!i.isOpen()||i._displayValue()&&!i.isSearchInput()?7:-1),y(3),w((i.inputValue()&&!i.isOpen()&&i.inputValue().length>0||i.selectedOption())&&!i.hideClearButton()?9:i.isSearchInput()&&!i.selectedOption()?10:11))},dependencies:[ht,ee,ut,fe],encapsulation:2,changeDetection:0})}}return n})(),Nt=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=p(!1),this.isOpen=P(!1),this.type=p(""),this.dragImageElement=M.required("dragImageElement"),this.dragIsEnding=h(!1),this.dragIsOnScreen=h(!0),this.isDragging=h(!1),this.dragPositionX=h(0),this.dragActualPositionX=b(()=>{let e=this.dragPositionX(),t=.32;return e>this.openWidthTreshold?this.openWidthTreshold+(e-this.openWidthTreshold)*t:e}),this.draggingStyle=b(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=E(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(e){e.stopPropagation(),this.#e(e.clientX)}#e(e){this.isDragging.set(!1),e<=0?this.isOpen.set(!1):e>this.openWidthTreshold?this.isOpen.set(!0):e<this.openWidthTreshold&&(!this.isOpen()&&e<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(e){(e.clientX<0||!this.dragIsOnScreen())&&this.#e(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(e){e.preventDefault(),this.#t(e)}dragStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#t(e)}#t(e){e.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.clientX)}),this.#t(e)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0)}touchMove(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.touches[0].clientX)})}touchEnd(e){e.stopPropagation(),this.#e(e.changedTouches[0].clientX)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-sidenav"]],viewQuery:function(t,i){t&1&&V(i.dragImageElement,Je,5),t&2&&H()},hostVars:10,hostBindings:function(t,i){t&2&&L("open",i.isOpen())("closed",!i.isOpen())("overlay",i.type()==="overlay")("simple",i.type()==="simple")("is-dragging",i.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:et,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(t,i){t&1&&(v(Ze),x(0,tt,2,0,"div",1)(1,it,1,0,"div",2),r(2,"div",3),a(3),l(),r(4,"div",4),x(5,nt,1,0,"div",5),r(6,"div",6),a(7,1),l(),r(8,"main"),a(9,2),l()()),t&2&&(w(i.type()==="overlay"?0:-1),y(),w(i.type()==="overlay"&&i.isDragging()?1:-1),y(3),I("transform",i.draggingStyle()),y(),w(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var $t=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-stepper"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})();var Yt=(()=>{class n{constructor(){this.tableColumns=p([]),this.loading=p(!1),this.columnSizes=b(()=>this.tableColumns().reduce((e,t,i)=>i===this.tableColumns().length-1?`${e} max-content`:`${e} 1fr`,"")),this.data=p([]),this.dataChange=R(),this.#e=null,this.#t=h(!1),this.sortByColumn=P(null),this.e=E(()=>{let e=this.sortByColumn();if(e===null)return this.#t()||(this.#e=this.data(),this.#t.set(!0)),this.dataChange.emit(JSON.parse(JSON.stringify(this.#e)));let t=e.startsWith("-")?e.slice(1):e,i=e.startsWith("-"),o=this.data().sort((s,c)=>{let f=s[t],D=c[t],m=0;return typeof f=="number"&&typeof D=="number"&&(m=f-D),f instanceof Date&&D instanceof Date&&(m=f.getTime()-D.getTime()),typeof f=="string"&&typeof D=="string"&&(m=f.localeCompare(D,void 0,{sensitivity:"base"})),i?-m:m});this.dataChange.emit(o)})}#e;#t;toggleSort(e){let t=this.sortByColumn(),i=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-table"]],hostVars:2,hostBindings:function(t,i){t&2&&I("grid-template-columns",i.columnSizes())},inputs:{tableColumns:[1,"tableColumns"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:st,decls:6,vars:2,consts:[[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,i){t&1&&(v(ot),r(0,"thead"),a(1),x(2,rt,1,0,"spk-progress-bar",0),l(),r(3,"tbody"),a(4,1),l(),x(5,lt,2,0,"div",1)),t&2&&(y(2),w(i.loading()?2:-1),y(3),w(i.loading()?-1:5))},dependencies:[mt],encapsulation:2,changeDetection:0})}}return n})(),Xt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-tabs"]],ngContentSelectors:O,decls:1,vars:0,template:function(t,i){t&1&&(v(),a(0))},encapsulation:2,changeDetection:0})}}return n})();var zt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-toggle"]],ngContentSelectors:O,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,i){t&1&&(v(),r(0,"div",0),j(1,"div",1),l(),a(2))},encapsulation:2,changeDetection:0})}}return n})(),Gt=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=p(!1),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.message=p.required(),this.isOpen=P(!1),this.closed=R(),this.triggerRef=M.required("triggerRef"),this.tooltipRef=M.required("tooltipRef"),this.id=h("--"+crypto.randomUUID()),this.menuStyle=h(null),this.isCalculatingPosition=b(()=>{let e=this.tooltipRef()?.nativeElement;return this.isOpen()?(e?.showPopover(),!0):(e.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=E(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#t(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})}),this.scrollableStyles=["scroll","auto"]}#e;#t(e){let t=e.parentElement;for(;t;){if(this.scrollableStyles.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,f=s+t.width>window.innerWidth,D=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(D),this._right.set(f);else{if(this.above()){let m=e.top-t.height-this.#e;m>=0&&(c=m)}else D&&(c=e.top-t.height-this.#e);if(this.right()){let m=e.right-t.width;m>=0&&(s=m)}else f&&(c=D?e.top+e.height-t.height:e.top,s=e.left-t.width-this.#e);this.menuStyle.set({left:s+"px",top:c+"px"})}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=g({type:n,selectors:[["spk-tooltip"]],viewQuery:function(t,i){t&1&&(V(i.triggerRef,he,5),V(i.tooltipRef,at,5)),t&2&&H(2)},hostVars:6,hostBindings:function(t,i){t&2&&L("above",i._above())("right",i._right())("disabled",i.disabled())},inputs:{disabled:[1,"disabled"],above:[1,"above"],right:[1,"right"],message:[1,"message"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:O,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(t,i){if(t&1){let o=T();v(),r(0,"div",2,0),_("mouseover",function(){return d(o),u(i.isOpen.set(!0))})("mouseout",function(){return d(o),u(i.isOpen.set(!1))}),a(2),l(),r(3,"div",3,1),k(5),l()}t&2&&(I("anchor-name",i.id()),y(3),Y(i.menuStyle()),I("position-anchor",i.id()),y(2),X(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})(),Kt=(()=>{class n{constructor(){this.filesOver=h(!1),this.filesDropped=R()}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1)}ondrop(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1);let t=e.dataTransfer?.files;t&&t.length>0&&this.filesDropped.emit(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=se({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(t,i){t&1&&_("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),t&2&&L("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{ee as a,Ft as b,Rt as c,pt as d,Pt as e,jt as f,dt as g,Ht as h,Bt as i,ut as j,ht as k,Lt as l,Wt as m,mt as n,qt as o,Ut as p,Qt as q,Nt as r,$t as s,Yt as t,Xt as u,zt as v,Gt as w,Kt as x};
package/chunk-GL2OCAVZ.js DELETED
@@ -1 +0,0 @@
1
- import{j as a,k as b}from"./chunk-4XJFGB4E.js";import"./chunk-3WCWZJYH.js";import"./chunk-DNHLTHLR.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7SJHYZC5.js";import"./chunk-AUUCT7OA.js";import"./chunk-PIDBEXSZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{a as createScheduleForm,b as default};
package/chunk-HGQLQ733.js DELETED
@@ -1 +0,0 @@
1
- import{l as a,m as b}from"./chunk-4XJFGB4E.js";import"./chunk-3WCWZJYH.js";import"./chunk-DNHLTHLR.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7SJHYZC5.js";import"./chunk-AUUCT7OA.js";import"./chunk-PIDBEXSZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{a as createSourceDataForm,b as default};
package/chunk-IO5IBATB.js DELETED
@@ -1 +0,0 @@
1
- import{a,b}from"./chunk-WKYWPXQ6.js";import"./chunk-K7H3KYW7.js";import"./chunk-3WCWZJYH.js";import"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import"./chunk-7SJHYZC5.js";import"./chunk-AUUCT7OA.js";import"./chunk-PIDBEXSZ.js";import"./chunk-J3H4BCHI.js";import"./chunk-P6LV5I2K.js";import"./chunk-5XX7BU4I.js";import"./chunk-5ZK3D2RS.js";import"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";export{a as createRestoreOptionsForm,b as default};
package/chunk-JAY2DGID.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-C6Q5SG76.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-YXIGPDXN.js")},{path:"destination",loadComponent:()=>import("./chunk-SAKG3775.js")},{path:"source-data",loadComponent:()=>import("./chunk-HGQLQ733.js")},{path:"schedule",loadComponent:()=>import("./chunk-GL2OCAVZ.js")},{path:"options",loadComponent:()=>import("./chunk-Z4XFPOPE.js")}];export{o as default};
package/chunk-JY2MTE7P.js DELETED
@@ -1 +0,0 @@
1
- import{a as ze}from"./chunk-K7H3KYW7.js";import{a as Ue}from"./chunk-TW4633HQ.js";import{a as K}from"./chunk-N35HGIXN.js";import{a as z}from"./chunk-V7APGUBT.js";import"./chunk-KFGIVU27.js";import{a as Xe}from"./chunk-DGBBEZNN.js";import"./chunk-QZCTOSPE.js";import{b as V,d as B,e as he,g as W,h as Pe,j as Ie,l as ye,m as $e,o as Ge,p as be,q as Ae,r as ve,s as j,t as De}from"./chunk-7SJHYZC5.js";import{a as Fe}from"./chunk-6M3MNJ52.js";import{g as Le,k as ke,o as we,q as xe}from"./chunk-AUUCT7OA.js";import{a as U}from"./chunk-PIDBEXSZ.js";import"./chunk-5XX7BU4I.js";import"./chunk-OVIL3KMN.js";import"./chunk-5ZK3D2RS.js";import{Ab as N,Bb as y,Cb as $,Db as G,Eb as i,Fb as o,Gb as p,Hb as Ee,Ib as Ne,K as v,Kb as M,Kc as X,Mc as Re,Oa as Ce,Qb as O,R as ge,Ra as a,Rb as R,Sb as s,Tb as Q,Ub as Y,Vb as fe,Wb as c,X as S,Xb as d,Za as E,_b as Me,c as me,ea as g,fa as C,fb as D,ic as f,jc as b,kc as L,lb as H,mc as k,nc as w,oc as x,p as Te,rc as Oe,vb as m,xb as J}from"./chunk-MR4RE3IB.js";import"./chunk-C6Q5SG76.js";var F=class l{#e=S(U);#i=S(z);repeatRegisterTimer=null;state=E("unknown");claimUrl=E(null);registerUrl=E("");status=X(()=>{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=Re(()=>{let e=this.#i.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"")});#t(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();console.log("currentState: ",t),this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),t==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:""}}).subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),(t==="enabled"||t==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#e.getApiV1RemotecontrolStatus().subscribe({next:n=>this.#t(n),error:n=>this.#n(n)})},5e3)),e.IsRegistering&&e.CanEnable&&this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:n=>this.#t(n)})}#n(e){this.#e.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#t(t)})}refreshRemoteControlStatus(){this.#e.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}beginRemoteRegistration(){this.state.set("registering"),this.#e.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:this.registerUrl()}}).subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}cancelRemoteRegistration(){this.#e.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}enableRemoteControl(){this.#e.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}disableRemoteControl(){this.#e.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#t(e),error:e=>this.#n(e)})}deleteRemoteControl(){let e=this;confirm("Are you sure you want to delete the remote control registration?")&&e.#e.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#t(t),error:t=>e.#n(t)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=ge({token:l,factory:l.\u0275fac,providedIn:"root"})};function qe(l,e){if(l&1){let t=M();i(0,"spk-form-field",10)(1,"input",11),x("ngModelChange",function(r){g(t);let u=d(2);return w(u.registerUrl,r)||(u.registerUrl=r),C(r)}),o()(),i(2,"button",12),c("click",function(){g(t);let r=d(2);return C(r.register())}),s(3,0),o()}if(l&2){let t=d(2);a(),k("ngModel",t.registerUrl)}}function He(l,e){if(l&1&&(i(0,"div",8)(1,"label"),s(2,1),o(),i(3,"a",13),f(4),o()()),l&2){let t=d(2);a(3),Me("href",t.claimUrl(),Ce),a(),b(t.claimUrl())}}function Je(l,e){l&1&&(i(0,"div",8)(1,"label"),s(2,2),o()())}function Qe(l,e){if(l&1){let t=M();i(0,"button",12),c("click",function(){g(t);let r=d(2);return C(r.cancel())}),s(1,3),o()}}function Ye(l,e){if(l&1){let t=M();i(0,"button",12),c("click",function(){g(t);let r=d(2);return C(r.disable())}),s(1,4),o()}}function Ze(l,e){if(l&1){let t=M();i(0,"button",12),c("click",function(){g(t);let r=d(2);return C(r.enable())}),s(1,5),o(),i(2,"button",14),c("click",function(){g(t);let r=d(2);return C(r.delete())}),s(3,6),o()}}function et(l,e){if(l&1&&(i(0,"div",7),H(1,qe,4,1)(2,He,5,2,"div",8)(3,Je,3,0,"div",8)(4,Qe,2,0,"button",9)(5,Ye,2,0,"button",9)(6,Ze,4,0),o()),l&2){let t=d();a(),N(t.state()==="inactive"?1:-1),a(),N(t.state()==="registered"?2:-1),a(),N(t.state()==="registering"?3:-1),a(),N(t.state()==="registering"||t.state()==="registeringfaulted"||t.state()==="registered"?4:-1),a(),N(t.state()==="connected"||t.state()==="enabled"?5:-1),a(),N(t.state()==="disabled"?6:-1)}}var q=class l{#e=S(F);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||l)};static \u0275cmp=D({type:l,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 r;r=$localize`Cancel registration`;let u;u=$localize`Disable remote control`;let P;P=$localize`Enable remote control`;let I;return I=$localize`Delete remote control setup`,[e,t,n,r,u,P,I,[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","warn",3,"click"]]},template:function(t,n){t&1&&H(0,et,7,6,"div",7),t&2&&N(n.state()!=="unknown"?0:-1)},dependencies:[j,V,B,W,ke],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})};var tt=()=>({standalone:!0});function nt(l,e){if(l&1&&(i(0,"option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t),a(),b(t)}}function it(l,e){if(l&1){let t=M();i(0,"option",52),c("click",function(){let r=g(t).$implicit,u=d();return C(u.pauseSettings.controls.timeType.setValue(r.value))}),f(1),o()}if(l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function ot(l,e){if(l&1&&(i(0,"option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}function rt(l,e){if(l&1&&(i(0,"option",32),f(1),o()),l&2){let t=e.$implicit;m("value",t.value),a(),L(" ",t.label," ")}}var h=new ve,Be=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],We=[{value:"",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`}],Z=class l{#e=S(Xe);#i=S(z);#t=S(U);#n=S(F);#o=S(Fe);#r=this.#o.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#e.isDarkMode;editAs=E("list");langCtrl=E(this.#r);remoteControlStatus=this.#n.status;settingsForm=h.group({pauseSettings:h.group({time:h.control(0),timeType:h.control("s")}),usageStatistics:h.control(""),updateChannel:h.control("")});get pauseSettings(){return this.settingsForm.controls.pauseSettings}languageOptions=X(()=>{let e=this.langCtrl();return e?K.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):K});usageStatisticsOptions=E(We);timeTypeOptions=E(Be);timeOptions=ze([this.pauseSettings.controls.timeType.valueChanges.pipe(v("s")),this.pauseSettings.controls.time.valueChanges.pipe(v(null))],me(Te(([e,t])=>{let n=this.#l(e);return t!==null?n.filter(r=>r.toString().includes(t.toString())):n}),v([])));#l(e){let t=e==="h"?25:61;return new Array(t).fill(0).map((n,r)=>r)}ngOnInit(){this.getServerSettings()}saveLocale(e){this.#o.setItem("locale",e),window.location.reload()}submit(){let e=`${this.pauseSettings.controls.time.value}${this.pauseSettings.controls.timeType.value}`;this.#t.patchApiV1Serversettings({requestBody:{"usage-reporter-level":this.settingsForm.controls.usageStatistics.value,"startup-delay":e==="0s"?"":e,"update-channel":this.settingsForm.controls.updateChannel.value}}).subscribe({next:t=>{console.log("res",t)},error:t=>{console.error("err",t)}})}getServerSettings(){return this.#t.getApiV1Serversettings().subscribe({next:e=>{let t=e["startup-delay"],n=t.slice(-1),r=t.slice(0,-1),u=["s","m","h"];this.settingsForm.patchValue({pauseSettings:{time:parseInt(r==""?"0":r),timeType:u.includes(n)?n:"s"},usageStatistics:e["usage-reporter-level"],updateChannel:e["update-channel"]})}})}languageDisplay(){let e=this;return()=>{let t=e.langCtrl();return t?K.find(n=>n.value===t)?.label??null:null}}typeDisplay(){let e=this;return()=>{let t=e.settingsForm.value.pauseSettings?.timeType;return t==null?null:Be.find(n=>n.value===t)?.label??null}}usageDisplay(){let e=this;return()=>{let t=e.settingsForm.value.usageStatistics;return t==null?null:We.find(n=>n.value===t)?.label??null}}setDarkMode(){this.#e.setDarkMode()}setLightMode(){this.#e.setLightMode()}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=D({type:l,selectors:[["app-settings"]],decls:107,vars:17,consts:()=>{let e;e=$localize`Settings`;let t;t=$localize`Configure your backup settings.`;let n;n=$localize`Save changes`;let r;r=$localize`Remote access control`;let u;u=$localize`Pause after startup or hibernation`;let P;P=$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 I;I=$localize`Color theme`;let T;T=$localize`Customize your application theme`;let ee;ee=$localize`Language`;let te;te=$localize`Select a language for the platform`;let ne;ne=$localize`Update channel`;let ie;ie=$localize`Update channel selection is not implemented yet.`;let oe;oe=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) ${"\uFFFD#66\uFFFD\uFFFD/#66\uFFFD"}:TAG_INPUT:`;let re;re=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let le;le=$localize` Stable ${"\uFFFD#72\uFFFD\uFFFD/#72\uFFFD"}:TAG_INPUT:`;let ae;ae=$localize`Official releases`;let se;se=$localize` Beta ${"\uFFFD#78\uFFFD\uFFFD/#78\uFFFD"}:TAG_INPUT:`;let _e;_e=$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 ue;ue=$localize` Experimental ${"\uFFFD#84\uFFFD\uFFFD/#84\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize`Specific builds for developers only. Not for use with important data.`;let pe;pe=$localize` Canary ${"\uFFFD#90\uFFFD\uFFFD/#90\uFFFD"}:TAG_INPUT:`;let de;de=$localize`Individual builds for developers only. Not for use with important data.`;let Se;Se=$localize`Usage statistics`;let A;return A=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate ${"\uFFFD#99\uFFFD"}:START_LINK:public usage statistics.${"\uFFFD/#99\uFFFD"}:CLOSE_LINK:${"[\uFFFD#100\uFFFD\uFFFD/#100\uFFFD|\uFFFD#101\uFFFD\uFFFD/#101\uFFFD]"}:LINE_BREAK:${"[\uFFFD#100\uFFFD\uFFFD/#100\uFFFD|\uFFFD#101\uFFFD\uFFFD/#101\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. `,A=fe(A),[e,t,n,r,u,P,I,T,ee,te,ne,ie,oe,re,le,ae,se,_e,ue,ce,pe,de,Se,A,[1,"content",3,"submit","formGroup"],[1,"title"],["type","submit","spk-button","",1,"raised","primary"],[1,"left"],[1,"right"],["formGroupName","pauseSettings",1,"field-row"],[3,"hideClearButton"],["type","search","formControlName","time"],[3,"value"],[3,"displayFn","hideClearButton"],["type","text","formControlName","timeType"],["options",""],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[3,"change","displayFn","hideClearButton"],["type","search",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"outlined","primary"],["type","radio","name","updateChannel","value","","formControlName","updateChannel"],["type","radio","name","updateChannel","value","stable","formControlName","updateChannel"],["type","radio","name","updateChannel","value","beta","formControlName","updateChannel"],["type","radio","name","updateChannel","value","experimental","formControlName","updateChannel"],["type","radio","name","updateChannel","value","canary","formControlName","updateChannel"],["href","#"],[3,"displayFn"],["type","text","formControlName","usageStatistics"],[3,"click","value"]]},template:function(t,n){if(t&1&&(p(0,"app-status-bar"),i(1,"form",24),c("submit",function(){return n.submit()}),i(2,"header")(3,"div",25)(4,"h2"),s(5,0),o(),i(6,"p"),s(7,1),o()(),i(8,"button",26),s(9,2),o()(),i(10,"section")(11,"div",27)(12,"h3"),s(13,3),o(),i(14,"p"),f(15),o()(),i(16,"div",28),p(17,"app-remote-control"),o()(),i(18,"section")(19,"div",27)(20,"h3"),s(21,4),o(),i(22,"p"),s(23,5),o()(),i(24,"div",28)(25,"div",29)(26,"spk-select",30),p(27,"input",31),$(28,nt,2,2,"option",32,y),o(),i(30,"spk-select",33),p(31,"input",34),Ee(32,35),$(33,it,2,2,"option",32,y),Ne(),o()()()(),i(35,"section")(36,"div",27)(37,"h3"),s(38,6),o(),i(39,"p"),s(40,7),o()(),i(41,"div",28)(42,"div",36)(43,"img",37),c("click",function(){return n.setLightMode()}),o(),i(44,"img",38),c("click",function(){return n.setDarkMode()}),o()()()(),i(45,"section")(46,"div",27)(47,"h3"),s(48,8),o(),i(49,"p"),s(50,9),o()(),i(51,"div",28)(52,"spk-select",39),c("change",function(u){return n.saveLocale(u)}),i(53,"input",40),x("ngModelChange",function(u){return w(n.langCtrl,u)||(n.langCtrl=u),u}),o(),$(54,ot,2,2,"option",32,y),o()()(),i(56,"section")(57,"div",27)(58,"h3"),s(59,10),o(),i(60,"p"),s(61,11),o()(),i(62,"div",41)(63,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("")}),i(64,"spk-radio",43),O(65,12),p(66,"input",44),R(),o(),i(67,"p"),s(68,13),o()(),i(69,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("stable")}),i(70,"spk-radio",43),O(71,14),p(72,"input",45),R(),o(),i(73,"p"),s(74,15),o()(),i(75,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("beta")}),i(76,"spk-radio",43),O(77,16),p(78,"input",46),R(),o(),i(79,"p"),s(80,17),o()(),i(81,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("experimental")}),i(82,"spk-radio",43),O(83,18),p(84,"input",47),R(),o(),i(85,"p"),s(86,19),o()(),i(87,"div",42),c("click",function(){return n.settingsForm.controls.updateChannel.setValue("canary")}),i(88,"spk-radio",43),O(89,20),p(90,"input",48),R(),o(),i(91,"p"),s(92,21),o()()()(),i(93,"section")(94,"div",27)(95,"h3"),s(96,22),o(),i(97,"p"),O(98,23),p(99,"a",49)(100,"br")(101,"br"),R(),o()(),i(102,"div",28)(103,"spk-select",50),p(104,"input",51),$(105,rt,2,2,"option",32,y),o()()()()),t&2){let r,u;a(),m("formGroup",n.settingsForm),a(14),b(n.remoteControlStatus()),a(11),m("hideClearButton",!0),a(2),G(n.timeOptions()),a(2),m("displayFn",n.typeDisplay())("hideClearButton",!0),a(3),G(n.timeTypeOptions()),a(10),J("active",!n.isDarkMode()),a(),J("active",n.isDarkMode()),a(8),m("displayFn",n.languageDisplay())("hideClearButton",!0),a(),k("ngModel",n.langCtrl),m("ngModelOptions",Oe(16,tt)),a(),G(n.languageOptions()),a(12),Q((r=n.sysinfo())==null?null:r.DefaultUpdateChannel),Y(65),a(2),Q((u=n.sysinfo())==null?null:u.ServerVersionType),Y(68),a(35),m("displayFn",n.usageDisplay()),a(2),G(n.usageStatisticsOptions())}},dependencies:[j,Pe,be,Ae,V,Ie,B,he,W,De,ye,Ge,$e,Ue,q,Le,we,xe],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}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-level-40)}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%}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:240px;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-level-60);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-level-60R)}.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}"],changeDetection:0})};export{Z as default};