@duplicati/ngclient 0.0.158 → 0.0.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-PD73DDOS.js → chunk-2QJVTZ56.js} +2 -2
- package/{chunk-6XXAHUOH.js → chunk-2S6ABLBU.js} +1 -1
- package/chunk-2WGW24ZH.js +1 -0
- package/{chunk-FMEVVC6D.js → chunk-2ZGJS4OW.js} +3 -3
- package/chunk-33J6ZQYE.js +1 -0
- package/{chunk-YHOYPGPD.js → chunk-3OCWLJKG.js} +1 -1
- package/{chunk-XHITDSWR.js → chunk-4IIDZXFC.js} +1 -1
- package/{chunk-COUIDDUK.js → chunk-4IXUXIXV.js} +1 -1
- package/{chunk-TJIZJNCK.js → chunk-4NBLWONL.js} +1 -1
- package/{chunk-ENNM55FS.js → chunk-5WDKKAXO.js} +1 -1
- package/{chunk-VRV52R6I.js → chunk-6YGURBW6.js} +1 -1
- package/{chunk-K3VDFIJM.js → chunk-72QJ345F.js} +1 -1
- package/{chunk-363K6H7I.js → chunk-7JHF4R5J.js} +1 -1
- package/{chunk-XVWOVBC4.js → chunk-7LYN2XHO.js} +1 -1
- package/chunk-A2LUC3NC.js +1 -0
- package/{chunk-VUKS2SJL.js → chunk-A5LNLNWR.js} +1 -1
- package/{chunk-KSEFQ2XA.js → chunk-BQJICFF5.js} +1 -1
- package/{chunk-X3XJ26NZ.js → chunk-C6F6FP4R.js} +1 -1
- package/{chunk-ZSZLXWN6.js → chunk-CCKT2GLS.js} +1 -1
- package/{chunk-XH5CTH3O.js → chunk-CHYEYO6L.js} +1 -1
- package/{chunk-EE5UMXWP.js → chunk-D4F7SID5.js} +1 -1
- package/{chunk-M6SIMFCD.js → chunk-D6KZSKI7.js} +1 -1
- package/{chunk-Y75ZS4Q2.js → chunk-DTOILX4E.js} +1 -1
- package/{chunk-CUL5FHDH.js → chunk-DW7A6PHZ.js} +1 -1
- package/{chunk-ZWO4SECL.js → chunk-EBANXXYI.js} +1 -1
- package/{chunk-2KH32RMH.js → chunk-EMRD3UKA.js} +1 -1
- package/{chunk-UQY3P37P.js → chunk-F6ME3VE6.js} +1 -1
- package/{chunk-J2Y5AVUU.js → chunk-FNJU5CD3.js} +1 -1
- package/{chunk-WXF4HUYT.js → chunk-GCCJSS4C.js} +1 -1
- package/{chunk-RADP6NAN.js → chunk-GDQZEB3A.js} +1 -1
- package/{chunk-SKSEDWGR.js → chunk-GOVVHVP2.js} +1 -1
- package/{chunk-RDCD2W2C.js → chunk-GYDI67IZ.js} +1 -1
- package/chunk-H3UUJ5EW.js +1 -0
- package/chunk-K3ILN56U.js +1 -0
- package/{chunk-JRDR23NB.js → chunk-KAAYNQ7L.js} +1 -1
- package/{chunk-7FCBU2UO.js → chunk-KT7U3QIP.js} +1 -1
- package/{chunk-7TF7DTKJ.js → chunk-KXM6LF3X.js} +1 -1
- package/{chunk-3LVCVLMO.js → chunk-LSKF2B33.js} +1 -1
- package/{chunk-HKL7ZJV5.js → chunk-MGTRQOF6.js} +1 -1
- package/{chunk-TG2ZSU7H.js → chunk-NM7WJRU7.js} +1 -1
- package/chunk-OKDVOGSM.js +1 -0
- package/{chunk-3AYCMVTF.js → chunk-PHQBBCUL.js} +1 -1
- package/chunk-PQSZLHZR.js +1 -0
- package/{chunk-ISNV5CM5.js → chunk-PULERFBI.js} +1 -1
- package/{chunk-2IE65QDC.js → chunk-PUNIQ3JW.js} +1 -1
- package/chunk-Q65KFDJ5.js +1 -0
- package/{chunk-L3RU4D2N.js → chunk-QNM5CG4Z.js} +1 -1
- package/{chunk-QWQKYLNR.js → chunk-QX3IRESN.js} +1 -1
- package/chunk-RUXUFB7C.js +1 -0
- package/chunk-RWPF5SQT.js +1 -0
- package/{chunk-HWCUMKYF.js → chunk-RZKDEJUP.js} +1 -1
- package/{chunk-C2VSATF5.js → chunk-SWD3HS57.js} +1 -1
- package/chunk-U2Y2D6MA.js +1 -0
- package/{chunk-FIUF53BE.js → chunk-UST7PIBI.js} +1 -1
- package/{chunk-TPBZNCDW.js → chunk-VXRNST6C.js} +1 -1
- package/{chunk-BTJVI7MG.js → chunk-W2CMPDWL.js} +1 -1
- package/{chunk-MTQKK2WN.js → chunk-XLDVUBTQ.js} +1 -1
- package/{chunk-3AGOCPNZ.js → chunk-XUIDYG2O.js} +1 -1
- package/{chunk-EVJPCAZV.js → chunk-XX3WLO55.js} +1 -1
- package/{chunk-RIFNOGGK.js → chunk-ZDME3W57.js} +1 -1
- package/{chunk-BNWLPYK6.js → chunk-ZMTLDG46.js} +1 -1
- package/index.html +1 -1
- package/locale/messages.de.json +4 -4
- package/locale/messages.it.json +123 -3
- package/{main-ATSCYMRN.js → main-AK26L46R.js} +1 -1
- package/package.json +1 -1
- package/chunk-3F7ADWPY.js +0 -1
- package/chunk-BGKZFATT.js +0 -1
- package/chunk-CFN5U5PK.js +0 -1
- package/chunk-JH4DRDIH.js +0 -1
- package/chunk-LANFQDZE.js +0 -1
- package/chunk-LYKQBVOC.js +0 -1
- package/chunk-MSX2SJC7.js +0 -1
- package/chunk-NC73IOHK.js +0 -1
- package/chunk-O4WI3VDE.js +0 -1
- package/chunk-U4U2GCS5.js +0 -1
- package/chunk-ZKX6JJ6S.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as De,b as we}from"./chunk-FPPZ4BUR.js";import{$ as Be,B as ae,C as Te,H as ve,P as $,S as w,V,Y as S,Z as R,_ as T,ba as
|
|
2
|
-
`).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),n=t.slice(r+1).trim();this.addHeaderEntry(o,n)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof s?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new s;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof s?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(e.name,t);let o=(e.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let n=e.value;if(!n)this.headers.delete(t),this.normalizedNames.delete(t);else{let i=this.headers.get(t);if(!i)return;i=i.filter(u=>n.indexOf(u)===-1),i.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}break}}addHeaderEntry(e,t){let r=e.toLowerCase();this.maybeSetNormalizedName(e,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(e,t){let r=(Array.isArray(t)?t:[t]).map(n=>n.toString()),o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Q=class{encodeKey(e){return Se(e)}encodeValue(e){return Se(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ye(s,e){let t=new Map;return s.length>0&&s.replace(/^\?/,"").split("&").forEach(o=>{let n=o.indexOf("="),[i,u]=n==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,n)),e.decodeValue(o.slice(n+1))],d=t.get(i)||[];d.push(u),t.set(i,d)}),t}var Qe=/%(\d[a-f0-9])/gi,Ze={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Se(s){return encodeURIComponent(s).replace(Qe,(e,t)=>Ze[t]??e)}function H(s){return`${s}`}var E=class s{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Q,e.fromString){if(e.fromObject)throw new w(2805,!1);this.map=Ye(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let r=e.fromObject[t],o=Array.isArray(r)?r.map(H):[H(r)];this.map.set(t,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(r=>{let o=e[r];Array.isArray(o)?o.forEach(n=>{t.push({param:r,value:n,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new s({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(H(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let r=this.map.get(e.param)||[],o=r.indexOf(H(e.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Z=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function et(s){switch(s){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ne(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer}function xe(s){return typeof Blob<"u"&&s instanceof Blob}function Ge(s){return typeof FormData<"u"&&s instanceof FormData}function tt(s){return typeof URLSearchParams<"u"&&s instanceof URLSearchParams}var J="Content-Type",ee="Accept",le="X-Request-URL",Ce="text/plain",Fe="application/json",Le=`${Fe}, ${Ce}, */*`,C=class s{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,r,o){this.url=t,this.method=e.toUpperCase();let n;if(et(this.method)||o?(this.body=r!==void 0?r:null,n=o):n=r,n){if(this.reportProgress=!!n.reportProgress,this.withCredentials=!!n.withCredentials,this.keepalive=!!n.keepalive,n.responseType&&(this.responseType=n.responseType),n.headers&&(this.headers=n.headers),n.context&&(this.context=n.context),n.params&&(this.params=n.params),n.priority&&(this.priority=n.priority),n.cache&&(this.cache=n.cache),n.credentials&&(this.credentials=n.credentials),typeof n.timeout=="number"){if(n.timeout<1||!Number.isInteger(n.timeout))throw new w(2822,"");this.timeout=n.timeout}n.mode&&(this.mode=n.mode),n.redirect&&(this.redirect=n.redirect),n.integrity&&(this.integrity=n.integrity),n.referrer&&(this.referrer=n.referrer),this.transferCache=n.transferCache}if(this.headers??=new g,this.context??=new Z,!this.params)this.params=new E,this.urlWithParams=t;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=t;else{let u=t.indexOf("?"),d=u===-1?"?":u<t.length-1?"&":"";this.urlWithParams=t+d+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Ne(this.body)||xe(this.body)||Ge(this.body)||tt(this.body)?this.body:this.body instanceof E?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Ge(this.body)?null:xe(this.body)?this.body.type||null:Ne(this.body)?null:typeof this.body=="string"?Ce:this.body instanceof E?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Fe:null}clone(e={}){let t=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,n=e.keepalive??this.keepalive,i=e.priority||this.priority,u=e.cache||this.cache,d=e.mode||this.mode,h=e.redirect||this.redirect,f=e.credentials||this.credentials,b=e.referrer||this.referrer,N=e.integrity||this.integrity,x=e.transferCache??this.transferCache,m=e.timeout??this.timeout,G=e.body!==void 0?e.body:this.body,c=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,A=e.headers||this.headers,v=e.params||this.params,y=e.context??this.context;return e.setHeaders!==void 0&&(A=Object.keys(e.setHeaders).reduce((B,k)=>B.set(k,e.setHeaders[k]),A)),e.setParams&&(v=Object.keys(e.setParams).reduce((B,k)=>B.set(k,e.setParams[k]),v)),new s(t,r,G,{params:v,headers:A,context:y,reportProgress:l,responseType:o,withCredentials:c,transferCache:x,keepalive:n,cache:u,priority:i,timeout:m,mode:d,redirect:h,credentials:f,referrer:b,integrity:N})}},O=(function(s){return s[s.Sent=0]="Sent",s[s.UploadProgress=1]="UploadProgress",s[s.ResponseHeader=2]="ResponseHeader",s[s.DownloadProgress=3]="DownloadProgress",s[s.Response=4]="Response",s[s.User=5]="User",s})(O||{}),_=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,r="OK"){this.headers=e.headers||new g,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},X=class s extends _{constructor(e={}){super(e)}type=O.ResponseHeader;clone(e={}){return new s({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},j=class s extends _{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=O.Response;clone(e={}){return new s({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},P=class extends _{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},_e=200,st=204;function pe(s,e){return{body:e,headers:s.headers,context:s.context,observe:s.observe,params:s.params,reportProgress:s.reportProgress,responseType:s.responseType,withCredentials:s.withCredentials,credentials:s.credentials,transferCache:s.transferCache,timeout:s.timeout,keepalive:s.keepalive,priority:s.priority,cache:s.cache,mode:s.mode,redirect:s.redirect,integrity:s.integrity,referrer:s.referrer}}var U=(()=>{class s{handler;constructor(t){this.handler=t}request(t,r,o={}){let n;if(t instanceof C)n=t;else{let d;o.headers instanceof g?d=o.headers:d=new g(o.headers);let h;o.params&&(o.params instanceof E?h=o.params:h=new E({fromObject:o.params})),n=new C(t,r,o.body!==void 0?o.body:null,{headers:d,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let i=z(n).pipe(Te(d=>this.handler.handle(d)));if(t instanceof C||o.observe==="events")return i;let u=i.pipe(Re(d=>d instanceof j));switch(o.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof ArrayBuffer))throw new w(2806,!1);return d.body}));case"blob":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof Blob))throw new w(2807,!1);return d.body}));case"text":return u.pipe(D(d=>{if(d.body!==null&&typeof d.body!="string")throw new w(2808,!1);return d.body}));case"json":default:return u.pipe(D(d=>d.body))}case"response":return u;default:throw new w(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new E().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,pe(o,r))}post(t,r,o={}){return this.request("POST",t,pe(o,r))}put(t,r,o={}){return this.request("PUT",t,pe(o,r))}static \u0275fac=function(r){return new(r||s)(R(F))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),rt=/^\)\]\}',?\n/;function Me(s){if(s.url)return s.url;let e=le.toLocaleLowerCase();return s.headers.get(e)}var je=new S(""),Y=(()=>{class s{fetchImpl=T(de,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=T(Ie);destroyRef=T(Ee);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(t){return new oe(r=>{let o=new AbortController;this.doRequest(t,o.signal,r).then(ue,i=>r.error(new P({error:i})));let n;return t.timeout&&(n=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{n!==void 0&&clearTimeout(n),o.abort()}})}async doRequest(t,r,o){let n=this.createRequestInit(t),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,I({signal:r},n)));it(m),o.next({type:O.Sent}),i=await m}catch(m){o.error(new P({error:m,status:m.status??0,statusText:m.statusText,url:t.urlWithParams,headers:m.headers}));return}let u=new g(i.headers),d=i.statusText,h=Me(i)??t.urlWithParams,f=i.status,b=null;if(t.reportProgress&&o.next(new X({headers:u,status:f,statusText:d,url:h})),i.body){let m=i.headers.get("content-length"),G=[],c=i.body.getReader(),l=0,A,v,y=typeof Zone<"u"&&Zone.current,B=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyed){await c.cancel(),B=!0;break}let{done:M,value:ie}=await c.read();if(M)break;if(G.push(ie),l+=ie.length,t.reportProgress){v=t.responseType==="text"?(v??"")+(A??=new TextDecoder).decode(ie,{stream:!0}):void 0;let Ae=()=>o.next({type:O.DownloadProgress,total:m?+m:void 0,loaded:l,partialText:v});y?y.run(Ae):Ae()}}}),B){o.complete();return}let k=this.concatChunks(G,l);try{let M=i.headers.get(J)??"";b=this.parseBody(t,k,M,f)}catch(M){o.error(new P({error:M,headers:new g(i.headers),status:i.status,statusText:i.statusText,url:Me(i)??t.urlWithParams}));return}}f===0&&(f=b?_e:0);let N=f>=200&&f<300,x=i.redirected;N?(o.next(new j({body:b,headers:u,status:f,statusText:d,url:h,redirected:x})),o.complete()):o.error(new P({error:b,headers:u,status:f,statusText:d,url:h,redirected:x}))}parseBody(t,r,o,n){switch(t.responseType){case"json":let i=new TextDecoder().decode(r).replace(rt,"");if(i==="")return null;try{return JSON.parse(i)}catch(u){if(n<200||n>=300)return i;throw u}case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},o;if(o=t.credentials,t.withCredentials&&(o="include"),t.headers.forEach((n,i)=>r[n]=i.join(",")),t.headers.has(ee)||(r[ee]=Le),!t.headers.has(J)){let n=t.detectContentTypeHeader();n!==null&&(r[J]=n)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:o,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,r){let o=new Uint8Array(r),n=0;for(let i of t)o.set(i,n),n+=i.length;return o}static \u0275fac=function(r){return new(r||s)};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),de=class{};function ue(){}function it(s){s.then(ue,ue)}function ot(s,e){return e(s)}function nt(s,e,t){return(r,o)=>Pe(t,()=>e(r,n=>s(n,o)))}var he=new S(""),Ue=new S(""),qe=new S("",{providedIn:"root",factory:()=>!0});var te=(()=>{class s extends F{backend;injector;chain=null;pendingTasks=T(Oe);contributeToStability=T(qe);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(he),...this.injector.get(Ue,[])]));this.chain=r.reduceRight((o,n)=>nt(o,n,this.injector),ot)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(ve(r))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||s)(R(L),R(Ve))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})();var at=/^\)\]\}',?\n/,pt=RegExp(`^${le}:`,"m");function dt(s){return"responseURL"in s&&s.responseURL?s.responseURL:pt.test(s.getAllResponseHeaders())?s.getResponseHeader(le):null}var ce=(()=>{class s{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return z(null).pipe($(()=>new oe(n=>{let i=r.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((c,l)=>i.setRequestHeader(c,l.join(","))),t.headers.has(ee)||i.setRequestHeader(ee,Le),!t.headers.has(J)){let c=t.detectContentTypeHeader();c!==null&&i.setRequestHeader(J,c)}if(t.timeout&&(i.timeout=t.timeout),t.responseType){let c=t.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let u=t.serializeBody(),d=null,h=()=>{if(d!==null)return d;let c=i.statusText||"OK",l=new g(i.getAllResponseHeaders()),A=dt(i)||t.url;return d=new X({headers:l,status:i.status,statusText:c,url:A}),d},f=()=>{let{headers:c,status:l,statusText:A,url:v}=h(),y=null;l!==st&&(y=typeof i.response>"u"?i.responseText:i.response),l===0&&(l=y?_e:0);let B=l>=200&&l<300;if(t.responseType==="json"&&typeof y=="string"){let k=y;y=y.replace(at,"");try{y=y!==""?JSON.parse(y):null}catch(M){y=k,B&&(B=!1,y={error:M,text:y})}}B?(n.next(new j({body:y,headers:c,status:l,statusText:A,url:v||void 0})),n.complete()):n.error(new P({error:y,headers:c,status:l,statusText:A,url:v||void 0}))},b=c=>{let{url:l}=h(),A=new P({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:l||void 0});n.error(A)},N=b;t.timeout&&(N=c=>{let{url:l}=h(),A=new P({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:l||void 0});n.error(A)});let x=!1,m=c=>{x||(n.next(h()),x=!0);let l={type:O.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),t.responseType==="text"&&i.responseText&&(l.partialText=i.responseText),n.next(l)},G=c=>{let l={type:O.UploadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),n.next(l)};return i.addEventListener("load",f),i.addEventListener("error",b),i.addEventListener("timeout",N),i.addEventListener("abort",b),t.reportProgress&&(i.addEventListener("progress",m),u!==null&&i.upload&&i.upload.addEventListener("progress",G)),i.send(u),n.next({type:O.Sent}),()=>{i.removeEventListener("error",b),i.removeEventListener("abort",b),i.removeEventListener("load",f),i.removeEventListener("timeout",N),t.reportProgress&&(i.removeEventListener("progress",m),u!==null&&i.upload&&i.upload.removeEventListener("progress",G)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||s)(R(we))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),ze=new S(""),ut="XSRF-TOKEN",ct=new S("",{providedIn:"root",factory:()=>ut}),lt="X-XSRF-TOKEN",ht=new S("",{providedIn:"root",factory:()=>lt}),K=class{},yt=(()=>{class s{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r){this.doc=t,this.cookieName=r}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=De(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||s)(R(ke),R(ct))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})();function ft(s,e){let t=s.url.toLowerCase();if(!T(ze)||s.method==="GET"||s.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(s);let r=T(K).getToken(),o=T(ht);return r!=null&&!s.headers.has(o)&&(s=s.clone({headers:s.headers.set(o,r)})),e(s)}var se=(function(s){return s[s.Interceptors=0]="Interceptors",s[s.LegacyInterceptors=1]="LegacyInterceptors",s[s.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",s[s.NoXsrfProtection=3]="NoXsrfProtection",s[s.JsonpSupport=4]="JsonpSupport",s[s.RequestsMadeViaParent=5]="RequestsMadeViaParent",s[s.Fetch=6]="Fetch",s})(se||{});function $e(s,e){return{\u0275kind:s,\u0275providers:e}}function mt(...s){let e=[U,ce,te,{provide:F,useExisting:te},{provide:L,useFactory:()=>T(je,{optional:!0})??T(ce)},{provide:he,useValue:ft,multi:!0},{provide:ze,useValue:!0},{provide:K,useClass:yt}];for(let t of s)e.push(...t.\u0275providers);return Be(e)}function At(s){return $e(se.Interceptors,s.map(e=>({provide:he,useValue:e,multi:!0})))}function bt(){return $e(se.Fetch,[Y,{provide:je,useExisting:Y},{provide:L,useExisting:Y}])}var ye=class{_fns;constructor(){this._fns=[]}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},a={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new ye}};var q=class extends Error{url;status;statusText;body;request;constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}};var W=s=>typeof s=="string",fe=s=>W(s)&&s!=="",me=s=>s instanceof Blob,Je=s=>s instanceof FormData,Rt=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},Tt=s=>{let e=[],t=(o,n)=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(n))}`)},r=(o,n)=>{n!=null&&(n instanceof Date?t(o,n.toISOString()):Array.isArray(n)?n.forEach(i=>r(o,i)):typeof n=="object"?Object.entries(n).forEach(([i,u])=>r(`${o}[${i}]`,u)):t(o,n))};return Object.entries(s).forEach(([o,n])=>r(o,n)),e.length?`?${e.join("&")}`:""},vt=(s,e)=>{let t=s.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(n,i)=>e.path?.hasOwnProperty(i)?t(String(e.path[i])):n),o=s.BASE+r;return e.query?o+Tt(e.query):o},Bt=s=>{if(s.formData){let e=new FormData,t=(r,o)=>{W(o)||me(o)?e.append(r,o):e.append(r,JSON.stringify(o))};return Object.entries(s.formData).filter(([,r])=>r!=null).forEach(([r,o])=>{Array.isArray(o)?o.forEach(n=>t(r,n)):t(r,o)}),e}},re=async(s,e)=>typeof e=="function"?e(s):e,Vt=(s,e)=>ge({token:re(e,s.TOKEN),username:re(e,s.USERNAME),password:re(e,s.PASSWORD),additionalHeaders:re(e,s.HEADERS)}).pipe(D(({token:t,username:r,password:o,additionalHeaders:n})=>{let i=Object.entries(I(I({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[d,h])=>be(I({},u),{[d]:String(h)}),{});if(fe(t)&&(i.Authorization=`Bearer ${t}`),fe(r)&&fe(o)){let u=Rt(`${r}:${o}`);i.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:me(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":W(e.body)?i["Content-Type"]="text/plain":Je(e.body)||(i["Content-Type"]="application/json")),new g(i)})),Pt=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):W(s.body)||me(s.body)||Je(s.body)?s.body:JSON.stringify(s.body)},kt=(s,e,t,r,o,n,i)=>t.request(e.method,r,{headers:i,body:o??n,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),Et=(s,e)=>{if(e){let t=s.headers.get(e);if(W(t))return t}},Ot=s=>{if(s.status!==204&&s.body!==null)return s.body},It=(s,e)=>{let r=I({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(r)throw new q(s,e,r);if(!e.ok){let o=e.status??"unknown",n=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new q(s,e,`Generic Error: status: ${o}; status text: ${n}; body: ${i}`)}},p=(s,e,t)=>{let r=vt(s,t),o=Bt(t),n=Pt(t);return Vt(s,t).pipe($(i=>kt(s,t,e,r,n,o,i)),$(async i=>{for(let f of s.interceptors.response._fns)i=await f(i);let u=Ot(i),d=Et(i,t.responseHeader),h=u;return t.responseTransformer&&i.ok&&(h=await t.responseTransformer(u)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:d??h}}),ae(i=>i.status?z({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):ne(()=>i)),D(i=>(It(t,i),i.body)),ae(i=>ne(()=>i)))};var Xe=class s{constructor(e){this.http=e}getApiV1Commandline(){return p(a,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})},Ke=class s{constructor(e){this.http=e}postApiV1Commandline(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return p(a,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return p(a,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return p(a,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return p(a,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return p(a,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return p(a,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1Mssql(){return p(a,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return p(a,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return p(a,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return p(a,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return p(a,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return p(a,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return p(a,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return p(a,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return p(a,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return p(a,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return p(a,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return p(a,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return p(a,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return p(a,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})},We=class s{constructor(e){this.http=e}getApiV1Webmodules(){return p(a,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})};export{g as a,j as b,U as c,mt as d,At as e,bt as f,Xe as g,Ke as h,We as i};
|
|
1
|
+
import{a as De,b as we}from"./chunk-FPPZ4BUR.js";import{$ as Be,B as ae,C as Te,H as ve,P as $,S as w,V as P,Y as S,Z as R,_ as T,ba as Pe,ca as Ve,f as oe,ka as ke,la as Ee,lb as Ie,n as z,o as ne,r as D,ra as Oe,x as ge,z as Re}from"./chunk-QONLYWYC.js";import{a as I,b as be}from"./chunk-EUDKD2JW.js";var F=class{},L=class{},g=class s{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
2
|
+
`).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),n=t.slice(r+1).trim();this.addHeaderEntry(o,n)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof s?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new s;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof s?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(e.name,t);let o=(e.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let n=e.value;if(!n)this.headers.delete(t),this.normalizedNames.delete(t);else{let i=this.headers.get(t);if(!i)return;i=i.filter(u=>n.indexOf(u)===-1),i.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}break}}addHeaderEntry(e,t){let r=e.toLowerCase();this.maybeSetNormalizedName(e,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(e,t){let r=(Array.isArray(t)?t:[t]).map(n=>n.toString()),o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Q=class{encodeKey(e){return Se(e)}encodeValue(e){return Se(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ye(s,e){let t=new Map;return s.length>0&&s.replace(/^\?/,"").split("&").forEach(o=>{let n=o.indexOf("="),[i,u]=n==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,n)),e.decodeValue(o.slice(n+1))],d=t.get(i)||[];d.push(u),t.set(i,d)}),t}var Qe=/%(\d[a-f0-9])/gi,Ze={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Se(s){return encodeURIComponent(s).replace(Qe,(e,t)=>Ze[t]??e)}function H(s){return`${s}`}var E=class s{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Q,e.fromString){if(e.fromObject)throw new w(2805,!1);this.map=Ye(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let r=e.fromObject[t],o=Array.isArray(r)?r.map(H):[H(r)];this.map.set(t,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(r=>{let o=e[r];Array.isArray(o)?o.forEach(n=>{t.push({param:r,value:n,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new s({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(H(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let r=this.map.get(e.param)||[],o=r.indexOf(H(e.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Z=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function et(s){switch(s){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ne(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer}function xe(s){return typeof Blob<"u"&&s instanceof Blob}function Me(s){return typeof FormData<"u"&&s instanceof FormData}function tt(s){return typeof URLSearchParams<"u"&&s instanceof URLSearchParams}var J="Content-Type",ee="Accept",le="X-Request-URL",Ce="text/plain",Fe="application/json",Le=`${Fe}, ${Ce}, */*`,C=class s{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,r,o){this.url=t,this.method=e.toUpperCase();let n;if(et(this.method)||o?(this.body=r!==void 0?r:null,n=o):n=r,n){if(this.reportProgress=!!n.reportProgress,this.withCredentials=!!n.withCredentials,this.keepalive=!!n.keepalive,n.responseType&&(this.responseType=n.responseType),n.headers&&(this.headers=n.headers),n.context&&(this.context=n.context),n.params&&(this.params=n.params),n.priority&&(this.priority=n.priority),n.cache&&(this.cache=n.cache),n.credentials&&(this.credentials=n.credentials),typeof n.timeout=="number"){if(n.timeout<1||!Number.isInteger(n.timeout))throw new w(2822,"");this.timeout=n.timeout}n.mode&&(this.mode=n.mode),n.redirect&&(this.redirect=n.redirect),n.integrity&&(this.integrity=n.integrity),n.referrer&&(this.referrer=n.referrer),this.transferCache=n.transferCache}if(this.headers??=new g,this.context??=new Z,!this.params)this.params=new E,this.urlWithParams=t;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=t;else{let u=t.indexOf("?"),d=u===-1?"?":u<t.length-1?"&":"";this.urlWithParams=t+d+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Ne(this.body)||xe(this.body)||Me(this.body)||tt(this.body)?this.body:this.body instanceof E?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Me(this.body)?null:xe(this.body)?this.body.type||null:Ne(this.body)?null:typeof this.body=="string"?Ce:this.body instanceof E?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Fe:null}clone(e={}){let t=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,n=e.keepalive??this.keepalive,i=e.priority||this.priority,u=e.cache||this.cache,d=e.mode||this.mode,h=e.redirect||this.redirect,f=e.credentials||this.credentials,b=e.referrer||this.referrer,N=e.integrity||this.integrity,x=e.transferCache??this.transferCache,m=e.timeout??this.timeout,M=e.body!==void 0?e.body:this.body,c=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,A=e.headers||this.headers,v=e.params||this.params,y=e.context??this.context;return e.setHeaders!==void 0&&(A=Object.keys(e.setHeaders).reduce((B,k)=>B.set(k,e.setHeaders[k]),A)),e.setParams&&(v=Object.keys(e.setParams).reduce((B,k)=>B.set(k,e.setParams[k]),v)),new s(t,r,M,{params:v,headers:A,context:y,reportProgress:l,responseType:o,withCredentials:c,transferCache:x,keepalive:n,cache:u,priority:i,timeout:m,mode:d,redirect:h,credentials:f,referrer:b,integrity:N})}},O=(function(s){return s[s.Sent=0]="Sent",s[s.UploadProgress=1]="UploadProgress",s[s.ResponseHeader=2]="ResponseHeader",s[s.DownloadProgress=3]="DownloadProgress",s[s.Response=4]="Response",s[s.User=5]="User",s})(O||{}),_=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,r="OK"){this.headers=e.headers||new g,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},X=class s extends _{constructor(e={}){super(e)}type=O.ResponseHeader;clone(e={}){return new s({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},j=class s extends _{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=O.Response;clone(e={}){return new s({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},V=class extends _{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},_e=200,st=204;function pe(s,e){return{body:e,headers:s.headers,context:s.context,observe:s.observe,params:s.params,reportProgress:s.reportProgress,responseType:s.responseType,withCredentials:s.withCredentials,credentials:s.credentials,transferCache:s.transferCache,timeout:s.timeout,keepalive:s.keepalive,priority:s.priority,cache:s.cache,mode:s.mode,redirect:s.redirect,integrity:s.integrity,referrer:s.referrer}}var U=(()=>{class s{handler;constructor(t){this.handler=t}request(t,r,o={}){let n;if(t instanceof C)n=t;else{let d;o.headers instanceof g?d=o.headers:d=new g(o.headers);let h;o.params&&(o.params instanceof E?h=o.params:h=new E({fromObject:o.params})),n=new C(t,r,o.body!==void 0?o.body:null,{headers:d,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let i=z(n).pipe(Te(d=>this.handler.handle(d)));if(t instanceof C||o.observe==="events")return i;let u=i.pipe(Re(d=>d instanceof j));switch(o.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof ArrayBuffer))throw new w(2806,!1);return d.body}));case"blob":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof Blob))throw new w(2807,!1);return d.body}));case"text":return u.pipe(D(d=>{if(d.body!==null&&typeof d.body!="string")throw new w(2808,!1);return d.body}));case"json":default:return u.pipe(D(d=>d.body))}case"response":return u;default:throw new w(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new E().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,pe(o,r))}post(t,r,o={}){return this.request("POST",t,pe(o,r))}put(t,r,o={}){return this.request("PUT",t,pe(o,r))}static \u0275fac=function(r){return new(r||s)(R(F))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})(),rt=/^\)\]\}',?\n/;function Ge(s){if(s.url)return s.url;let e=le.toLocaleLowerCase();return s.headers.get(e)}var je=new S(""),Y=(()=>{class s{fetchImpl=T(de,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=T(Ie);destroyRef=T(Ee);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(t){return new oe(r=>{let o=new AbortController;this.doRequest(t,o.signal,r).then(ue,i=>r.error(new V({error:i})));let n;return t.timeout&&(n=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{n!==void 0&&clearTimeout(n),o.abort()}})}async doRequest(t,r,o){let n=this.createRequestInit(t),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,I({signal:r},n)));it(m),o.next({type:O.Sent}),i=await m}catch(m){o.error(new V({error:m,status:m.status??0,statusText:m.statusText,url:t.urlWithParams,headers:m.headers}));return}let u=new g(i.headers),d=i.statusText,h=Ge(i)??t.urlWithParams,f=i.status,b=null;if(t.reportProgress&&o.next(new X({headers:u,status:f,statusText:d,url:h})),i.body){let m=i.headers.get("content-length"),M=[],c=i.body.getReader(),l=0,A,v,y=typeof Zone<"u"&&Zone.current,B=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyed){await c.cancel(),B=!0;break}let{done:G,value:ie}=await c.read();if(G)break;if(M.push(ie),l+=ie.length,t.reportProgress){v=t.responseType==="text"?(v??"")+(A??=new TextDecoder).decode(ie,{stream:!0}):void 0;let Ae=()=>o.next({type:O.DownloadProgress,total:m?+m:void 0,loaded:l,partialText:v});y?y.run(Ae):Ae()}}}),B){o.complete();return}let k=this.concatChunks(M,l);try{let G=i.headers.get(J)??"";b=this.parseBody(t,k,G,f)}catch(G){o.error(new V({error:G,headers:new g(i.headers),status:i.status,statusText:i.statusText,url:Ge(i)??t.urlWithParams}));return}}f===0&&(f=b?_e:0);let N=f>=200&&f<300,x=i.redirected;N?(o.next(new j({body:b,headers:u,status:f,statusText:d,url:h,redirected:x})),o.complete()):o.error(new V({error:b,headers:u,status:f,statusText:d,url:h,redirected:x}))}parseBody(t,r,o,n){switch(t.responseType){case"json":let i=new TextDecoder().decode(r).replace(rt,"");if(i==="")return null;try{return JSON.parse(i)}catch(u){if(n<200||n>=300)return i;throw u}case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},o;if(o=t.credentials,t.withCredentials&&(o="include"),t.headers.forEach((n,i)=>r[n]=i.join(",")),t.headers.has(ee)||(r[ee]=Le),!t.headers.has(J)){let n=t.detectContentTypeHeader();n!==null&&(r[J]=n)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:o,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,r){let o=new Uint8Array(r),n=0;for(let i of t)o.set(i,n),n+=i.length;return o}static \u0275fac=function(r){return new(r||s)};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})(),de=class{};function ue(){}function it(s){s.then(ue,ue)}function ot(s,e){return e(s)}function nt(s,e,t){return(r,o)=>Ve(t,()=>e(r,n=>s(n,o)))}var he=new S(""),Ue=new S(""),qe=new S("",{providedIn:"root",factory:()=>!0});var te=(()=>{class s extends F{backend;injector;chain=null;pendingTasks=T(Oe);contributeToStability=T(qe);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(he),...this.injector.get(Ue,[])]));this.chain=r.reduceRight((o,n)=>nt(o,n,this.injector),ot)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(ve(r))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||s)(R(L),R(Pe))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})();var at=/^\)\]\}',?\n/,pt=RegExp(`^${le}:`,"m");function dt(s){return"responseURL"in s&&s.responseURL?s.responseURL:pt.test(s.getAllResponseHeaders())?s.getResponseHeader(le):null}var ce=(()=>{class s{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return z(null).pipe($(()=>new oe(n=>{let i=r.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((c,l)=>i.setRequestHeader(c,l.join(","))),t.headers.has(ee)||i.setRequestHeader(ee,Le),!t.headers.has(J)){let c=t.detectContentTypeHeader();c!==null&&i.setRequestHeader(J,c)}if(t.timeout&&(i.timeout=t.timeout),t.responseType){let c=t.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let u=t.serializeBody(),d=null,h=()=>{if(d!==null)return d;let c=i.statusText||"OK",l=new g(i.getAllResponseHeaders()),A=dt(i)||t.url;return d=new X({headers:l,status:i.status,statusText:c,url:A}),d},f=()=>{let{headers:c,status:l,statusText:A,url:v}=h(),y=null;l!==st&&(y=typeof i.response>"u"?i.responseText:i.response),l===0&&(l=y?_e:0);let B=l>=200&&l<300;if(t.responseType==="json"&&typeof y=="string"){let k=y;y=y.replace(at,"");try{y=y!==""?JSON.parse(y):null}catch(G){y=k,B&&(B=!1,y={error:G,text:y})}}B?(n.next(new j({body:y,headers:c,status:l,statusText:A,url:v||void 0})),n.complete()):n.error(new V({error:y,headers:c,status:l,statusText:A,url:v||void 0}))},b=c=>{let{url:l}=h(),A=new V({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:l||void 0});n.error(A)},N=b;t.timeout&&(N=c=>{let{url:l}=h(),A=new V({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:l||void 0});n.error(A)});let x=!1,m=c=>{x||(n.next(h()),x=!0);let l={type:O.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),t.responseType==="text"&&i.responseText&&(l.partialText=i.responseText),n.next(l)},M=c=>{let l={type:O.UploadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),n.next(l)};return i.addEventListener("load",f),i.addEventListener("error",b),i.addEventListener("timeout",N),i.addEventListener("abort",b),t.reportProgress&&(i.addEventListener("progress",m),u!==null&&i.upload&&i.upload.addEventListener("progress",M)),i.send(u),n.next({type:O.Sent}),()=>{i.removeEventListener("error",b),i.removeEventListener("abort",b),i.removeEventListener("load",f),i.removeEventListener("timeout",N),t.reportProgress&&(i.removeEventListener("progress",m),u!==null&&i.upload&&i.upload.removeEventListener("progress",M)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||s)(R(we))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})(),ze=new S(""),ut="XSRF-TOKEN",ct=new S("",{providedIn:"root",factory:()=>ut}),lt="X-XSRF-TOKEN",ht=new S("",{providedIn:"root",factory:()=>lt}),W=class{},yt=(()=>{class s{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r){this.doc=t,this.cookieName=r}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=De(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||s)(R(ke),R(ct))};static \u0275prov=P({token:s,factory:s.\u0275fac})}return s})();function ft(s,e){let t=s.url.toLowerCase();if(!T(ze)||s.method==="GET"||s.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(s);let r=T(W).getToken(),o=T(ht);return r!=null&&!s.headers.has(o)&&(s=s.clone({headers:s.headers.set(o,r)})),e(s)}var se=(function(s){return s[s.Interceptors=0]="Interceptors",s[s.LegacyInterceptors=1]="LegacyInterceptors",s[s.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",s[s.NoXsrfProtection=3]="NoXsrfProtection",s[s.JsonpSupport=4]="JsonpSupport",s[s.RequestsMadeViaParent=5]="RequestsMadeViaParent",s[s.Fetch=6]="Fetch",s})(se||{});function $e(s,e){return{\u0275kind:s,\u0275providers:e}}function mt(...s){let e=[U,ce,te,{provide:F,useExisting:te},{provide:L,useFactory:()=>T(je,{optional:!0})??T(ce)},{provide:he,useValue:ft,multi:!0},{provide:ze,useValue:!0},{provide:W,useClass:yt}];for(let t of s)e.push(...t.\u0275providers);return Be(e)}function At(s){return $e(se.Interceptors,s.map(e=>({provide:he,useValue:e,multi:!0})))}function bt(){return $e(se.Fetch,[Y,{provide:je,useExisting:Y},{provide:L,useExisting:Y}])}var ye=class{_fns;constructor(){this._fns=[]}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},a={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new ye}};var q=class extends Error{url;status;statusText;body;request;constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}};var K=s=>typeof s=="string",fe=s=>K(s)&&s!=="",me=s=>s instanceof Blob,Je=s=>s instanceof FormData,Rt=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},Tt=s=>{let e=[],t=(o,n)=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(n))}`)},r=(o,n)=>{n!=null&&(n instanceof Date?t(o,n.toISOString()):Array.isArray(n)?n.forEach(i=>r(o,i)):typeof n=="object"?Object.entries(n).forEach(([i,u])=>r(`${o}[${i}]`,u)):t(o,n))};return Object.entries(s).forEach(([o,n])=>r(o,n)),e.length?`?${e.join("&")}`:""},vt=(s,e)=>{let t=s.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(n,i)=>e.path?.hasOwnProperty(i)?t(String(e.path[i])):n),o=s.BASE+r;return e.query?o+Tt(e.query):o},Bt=s=>{if(s.formData){let e=new FormData,t=(r,o)=>{K(o)||me(o)?e.append(r,o):e.append(r,JSON.stringify(o))};return Object.entries(s.formData).filter(([,r])=>r!=null).forEach(([r,o])=>{Array.isArray(o)?o.forEach(n=>t(r,n)):t(r,o)}),e}},re=async(s,e)=>typeof e=="function"?e(s):e,Pt=(s,e)=>ge({token:re(e,s.TOKEN),username:re(e,s.USERNAME),password:re(e,s.PASSWORD),additionalHeaders:re(e,s.HEADERS)}).pipe(D(({token:t,username:r,password:o,additionalHeaders:n})=>{let i=Object.entries(I(I({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[d,h])=>be(I({},u),{[d]:String(h)}),{});if(fe(t)&&(i.Authorization=`Bearer ${t}`),fe(r)&&fe(o)){let u=Rt(`${r}:${o}`);i.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:me(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":K(e.body)?i["Content-Type"]="text/plain":Je(e.body)||(i["Content-Type"]="application/json")),new g(i)})),Vt=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):K(s.body)||me(s.body)||Je(s.body)?s.body:JSON.stringify(s.body)},kt=(s,e,t,r,o,n,i)=>t.request(e.method,r,{headers:i,body:o??n,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),Et=(s,e)=>{if(e){let t=s.headers.get(e);if(K(t))return t}},Ot=s=>{if(s.status!==204&&s.body!==null)return s.body},It=(s,e)=>{let r=I({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(r)throw new q(s,e,r);if(!e.ok){let o=e.status??"unknown",n=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new q(s,e,`Generic Error: status: ${o}; status text: ${n}; body: ${i}`)}},p=(s,e,t)=>{let r=vt(s,t),o=Bt(t),n=Vt(t);return Pt(s,t).pipe($(i=>kt(s,t,e,r,n,o,i)),$(async i=>{for(let f of s.interceptors.response._fns)i=await f(i);let u=Ot(i),d=Et(i,t.responseHeader),h=u;return t.responseTransformer&&i.ok&&(h=await t.responseTransformer(u)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:d??h}}),ae(i=>i.status?z({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):ne(()=>i)),D(i=>(It(t,i),i.body)),ae(i=>ne(()=>i)))};var Xe=class s{constructor(e){this.http=e}getApiV1Commandline(){return p(a,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=P({token:s,factory:s.\u0275fac,providedIn:"root"})},We=class s{constructor(e){this.http=e}postApiV1Commandline(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return p(a,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return p(a,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return p(a,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return p(a,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Licenses(){return p(a,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1NotificationById(e){return p(a,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return p(a,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return p(a,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return p(a,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return p(a,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return p(a,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return p(a,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return p(a,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return p(a,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return p(a,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return p(a,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return p(a,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return p(a,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=P({token:s,factory:s.\u0275fac,providedIn:"root"})},Ke=class s{constructor(e){this.http=e}getApiV1Webmodules(){return p(a,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=P({token:s,factory:s.\u0275fac,providedIn:"root"})};export{g as a,j as b,U as c,mt as d,At as e,bt as f,Xe as g,We as h,Ke as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
1
|
+
import{a as K}from"./chunk-4NBLWONL.js";import"./chunk-CCKT2GLS.js";import{a as z}from"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-XLDVUBTQ.js";import"./chunk-7LYN2XHO.js";import"./chunk-GCCJSS4C.js";import{d as O,e as M}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as U,G as x,H as V,V as j,b as E,c as A,e as R,f as b,j as y,o as B,q as $,r as v,t as G,u as k,x as L,z as w}from"./chunk-QF4DQYEP.js";import{h as J}from"./chunk-2QJVTZ56.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{Bc as N,Cb as p,Db as a,Eb as n,Fb as u,H as g,Sa as l,Tb as D,Ub as h,Vb as _,Yb as I,Zb as d,_ as s,cb as f,kc as P,pa as c,xb as C,yb as S}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var X=()=>["/"];function H(m,o){m&1&&(a(0,"sh-form-field")(1,"label",14),_(2,3),n(),u(3,"input",15),n())}var F=new v,T=class m{#t=s(L);#o=s(w);#n=s(J);#i=s(K);#e=s(O);isImporting=c(!1);isSecureFile=c(!1);isValid=c(!1);importForm=F.group({config:F.control(""),cmdline:F.control(!1),import_metadata:F.control(!1),direct:F.control(!1),passphrase:F.control("")});selectedFile=c([]);onFileDropped(o){let e=o[0];if(e){let t=new FileReader;this.isSecureFile.set(e.type!=="application/json"),t.onload=this.#r.bind(this),t.readAsArrayBuffer(e)}}#r(o){let e=o.target?.result;this.isSecureFile.set(this.#a(e)!=="json"),this.importForm.patchValue({config:this.#s(e)}),this.isValid.set(this.importForm.value.config!=="")}#a(o){let e=new Uint8Array(o);if(e.length>=5&&e[0]===65&&e[1]===69&&e[2]===83&&e[4]===0)return"aes";try{let t=new TextDecoder().decode(o),i=JSON.parse(t);if(typeof i=="object"&&i!==null)return"json"}catch{}return"unknown"}#s(o){let e=new Uint8Array(o),t=e.byteLength,i="";for(let r=0;r<t;r++)i+=String.fromCharCode(e[r]);return btoa(i)}submit(){this.isImporting.set(!0);let o=this.importForm.value.direct??!1;this.#n.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{if(o){this.#t.success("Backup imported successfully."),this.#e.navigate(["/"]);return}let t=this.#i.addDraftBackup(e.data);this.#e.navigate(["/backup-draft",t])},error:e=>{let t=e.message||$localize`Unknown error`;this.#o.open(z,{data:{title:$localize`Failed to import backup`,message:t,confirmText:$localize`OK`,cancelText:void 0}})}})}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=f({type:m,selectors:[["app-import"]],decls:19,vars:8,consts:()=>{let o;o=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=I(o);let e;e=$localize`Import Metadata`;let t;t=$localize`Save now`;let i;return i=$localize`Passphrase`,[o,e,t,i,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["accept",".json,.aes",3,"filesChange","files"],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","import_metadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(e,t){e&1&&(a(0,"header")(1,"h3"),D(2,0),a(3,"div",4)(4,"button",5),u(5,"sh-icon"),n(),a(6,"button",6),d("click",function(){return t.submit()}),u(7,"sh-icon"),n()(),h(),n()(),a(8,"form",7)(9,"sh-file-upload",8),d("filesChange",function(r){return t.onFileDropped(r)}),n(),C(10,H,4,0,"sh-form-field"),a(11,"sh-toggle",9)(12,"label",10),_(13,1),n(),u(14,"input",11),n(),a(15,"sh-toggle",9)(16,"label",12),_(17,2),n(),u(18,"input",13),n()()),e&2&&(l(4),p("routerLink",N(7,X)),l(2),P("loader",t.isImporting()),p("disabled",t.isImporting()||!t.isValid()),l(2),p("formGroup",t.importForm),l(),p("files",t.selectedFile()),l(),S(t.isSecureFile()?10:-1))},dependencies:[G,y,A,E,R,b,B,$,M,x,k,U,j,V],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}sh-file-upload[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as mt}from"./chunk-D6KZSKI7.js";import{a as Ot,b as pt,c as Rt}from"./chunk-2ZGJS4OW.js";import"./chunk-KAAYNQ7L.js";import"./chunk-ZBVBVQO7.js";import{a as Et}from"./chunk-C6F6FP4R.js";import{h as Ct}from"./chunk-BQJICFF5.js";import"./chunk-A5LNLNWR.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-6YGURBW6.js";import"./chunk-Z27IQRKV.js";import"./chunk-CCKT2GLS.js";import{a as R}from"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-XLDVUBTQ.js";import"./chunk-LN26XMBJ.js";import"./chunk-GCCJSS4C.js";import{b as nt,d as it}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as St,G as dt,J as Dt,c as ot,e as at,f as st,g as Ft,i as rt,j as lt,s as _t,u as ct,w as Tt,y as ut,z as gt}from"./chunk-QF4DQYEP.js";import"./chunk-2QJVTZ56.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as L,Ac as Z,Bb as x,Bc as tt,Cb as N,Db as s,Eb as F,Fb as g,Jb as G,Kb as w,Mb as C,Qc as k,Sa as r,Tb as T,Ub as u,Vb as h,Wb as f,Xb as $,Xc as et,Yb as b,Zb as d,_ as O,cb as K,ea as _,fa as c,gc as j,hc as Q,ja as X,kc as q,nc as I,oc as B,pa as p,pc as Y,sc as A,tc as M,uc as P,xb as D,yb as E,zb as y}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Nt=["formRef"],It=()=>({maxWidth:"700px",width:"100%"});function ht(i,n){if(i&1){let t=C();T(0,2,1),s(1,"button",30),d("click",function(){_(t);let e=l();return c(e.testDestination(0,!0))}),F(),u()}if(i&2){let t=l();r(),q("loader",t.testSignal()=="testing"),N("disabled",t.testSignal()=="testing")}}function ft(i,n){if(i&1){let t=C();T(0,2,2),s(1,"button",20),d("click",function(){_(t);let e=l();return c(e.copyTargetUrl())}),g(2,"sh-icon"),F(),u()}}function $t(i,n){i&1&&(s(0,"sh-alert"),T(1,5),g(2,"sh-icon",31),u(),F())}function At(i,n){i&1&&(s(0,"sh-alert",21),T(1,6),g(2,"sh-icon",31),u(),F())}function Mt(i,n){if(i&1&&(s(0,"sh-alert",22),T(1,7),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function Pt(i,n){if(i&1&&(s(0,"sh-alert",23),T(1,8),g(2,"sh-icon",31),u(),F()),i&2){let t=l();r(2),f(t.testErrorMessage()),$(1)}}function yt(i,n){if(i&1){let t=C();s(0,"p",32),d("click",function(){_(t);let e=l();return c(e.removeDestination())}),T(1,9),g(2,"strong")(3,"br")(4,"span",33),u(),F()}if(i&2){let t,o=l();r(4),f((t=o.selectedDestinationType())==null?null:t.displayName),$(1)}}function Lt(i,n){if(i&1){let t=C();s(0,"div",39),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),s(1,"h3"),I(2),F(),s(3,"p"),I(4),F()()}if(i&2){let t=n.$implicit;r(2),B(t.displayName),r(2),B(t.description)}}function xt(i,n){if(i&1){let t=C();s(0,"button",40,1),d("click",function(){let e=_(t).$implicit,a=l(2);return c(a.setDestination(e.key))}),I(2),F()}if(i&2){let t=n.$implicit;r(2),Y(" ",t.displayName," ")}}function Gt(i,n){if(i&1&&(s(0,"div",34),L(1,Lt,5,2,"div",35,y),F(),s(3,"sh-menu",36)(4,"button",37),h(5,10),F(),G(6,19),L(7,xt,3,1,"button",38,y),w(),F()),i&2){let t=l();r(),x(t.destinationTypeOptionsFocused()),r(2),N("searchable",!0),r(4),x(t.destinationTypeOptions())}}function wt(i,n){if(i&1){let t=C();s(0,"app-single-destination",41),P("targetUrlChange",function(e){_(t);let a=l();return M(a.targetUrlModel,e)||(a.targetUrlModel=e),c(e)}),F()}if(i&2){let t=l();A("targetUrl",t.targetUrlModel)}}function bt(i,n){i&1&&(T(0,4,1),g(1,"sh-icon",28),u())}function Bt(i,n){i&1&&(T(0,4,2),g(1,"sh-icon"),u())}function kt(i,n){if(i&1){let t=C();s(0,"sh-dialog",42),P("isOpenChange",function(e){_(t);let a=l();return M(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),c(e)}),s(1,"header",43)(2,"h2"),h(3,11),F(),s(4,"sh-alert",22),h(5,12),F()(),s(6,"div",44)(7,"sh-form-field")(8,"textarea",45),P("ngModelChange",function(e){_(t);let a=l();return M(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),c(e)}),F()()(),s(9,"footer",46)(10,"button",26),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!1))}),I(11,"Cancel"),F(),s(12,"button",47),d("click",function(){_(t);let e=l();return c(e.closeTargetUrlDialog(!0))}),T(13,13),g(14,"sh-icon"),u(),F()()()}if(i&2){let t=l();A("isOpen",t.targetUrlDialogOpen),N("options",tt(3,It)),r(8),A("ngModel",t.targetUrlCtrl)}}var v=class i{#i=O(it);#o=O(nt);#e=O(gt);#a=O(Ot);injector=O(X);#t=O(mt);#s=O(pt);formRef=et.required("formRef");targetUrlModel=this.#t.destinationTargetUrl;targetUrlCtrl=p(null);targetUrlInitial=p(null);targetUrlDialogOpen=p(!1);toggleNewDestination=p(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;destinationTypeOptionsInFocus=p(["file","ssh","s3","gcs","googledrive","azure"]);destinationTypeOptions=this.#s.destinationTypeOptions;destinationTypeOptionsFocused=k(()=>{let n=this.destinationTypeOptionsInFocus(),t=this.destinationTypeOptions();return n.map(o=>t.find(e=>e.key===o))});selectedDestinationType=k(()=>{let n=this.#t.destinationTargetUrl();if(!n)return null;let t=n.split("://")[0];return Et(t)});copyTargetUrl(){navigator.clipboard.writeText(this.#t.destinationTargetUrl()??"")}openTargetUrlDialog(){let n=this.#t.destinationTargetUrl();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),o=this.targetUrlInitial();!n||t===o||!t||this.#t.updateTargetUrl(t)}testDestination(n,t,o){let e=this.#t.destinationTargetUrl();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,this.#t.backupId(),n,!0,t).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),a.containsBackup===!1?(this.#t.setTestState("warning",$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder contains no backup`,message:$localize`The remote destination does not contain any backups. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!1&&(this.#t.setTestState("warning",$localize`The remote destination is empty. Please check if the destination details are correct.`),t||this.#e.open(R,{data:{title:$localize`Folder is empty`,message:$localize`The remote destination is empty. Please check if the destination details are correct.`,confirmText:$localize`OK`,cancelText:void 0}})),o?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){o?.();return}let m=e.includes("?");a.action==="trust-cert"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.updateTargetUrl(e+`${m?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):o?.()}}))}setDestination(n){this.#t.updateTargetUrl(`${n}://`)}removeDestination(){this.#t.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.testSignal();if(n===""){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:t=>{t?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open(R,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(n!=="success"){this.#e.open(R,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#n()}});return}this.#n()}#n(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=K({type:i,selectors:[["app-restore-destination"]],viewQuery:function(t,o){t&1&&j(o.formRef,Nt,5),t&2&&Q()},features:[Z([Ct])],decls:30,vars:9,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#5\uFFFD"}:START_TAG_DIV:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD#7\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#10\uFFFD"}:START_TAG_NG_CONTAINER:${"\uFFFD#11\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*6:1\uFFFD|\uFFFD*13:2\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:2\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#9\uFFFD|\uFFFD#12\uFFFD|\uFFFD#2:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#9\uFFFD|\uFFFD/#12\uFFFD|\uFFFD/#2:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#8\uFFFD|\uFFFD/#11\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*6:1\uFFFD|\uFFFD/*13:2\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_DIV:`,n=b(n);let t;t=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD*27:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*27:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*28:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*28:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,o=b(o);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let m;m=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let U;U=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let V;V=$localize` Current destination type ${"\uFFFD#2\uFFFD"}:START_TAG_STRONG:${"\uFFFD0\uFFFD"}:INTERPOLATION:.${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_STRONG:${"\uFFFD#3\uFFFD\uFFFD/#3\uFFFD"}:LINE_BREAK: Want to select another? ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:Click here${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`;let W;W=$localize`All destinations`;let z;z=$localize`Edit target URL`;let H;H=$localize`Be careful, this will overwrite everything you have in your destination.`;let J;return J=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["option",""],n,t,o,e,a,m,U,V,W,z,H,J,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"disabled","loader"],["shButton","","type","button",1,"small"],["menu",""],["shButton","","type","button",1,"small",3,"click"],[1,"success"],[1,"warn"],[1,"error"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["icon",""],[3,"click"],[1,"sh-primary"],[1,"most-common-destinations"],[1,"tile"],[3,"searchable"],["shButton","","type","button",1,"outlined"],["type","button"],[1,"tile",3,"click"],["type","button",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,o){if(t&1){let e=C();s(0,"form",14,0),d("submit",function(){return _(e),c(o.next())}),s(2,"header")(3,"h3",15),T(4,2),s(5,"div",16),D(6,ht,2,3,"button",17),s(7,"sh-menu")(8,"button",18),g(9,"sh-icon"),F(),G(10,19),s(11,"button",20),d("click",function(){return _(e),c(o.openTargetUrlDialog())}),g(12,"sh-icon"),F(),D(13,ft,3,0,"button",18),w(),F()(),u(),F(),D(14,$t,3,0,"sh-alert")(15,At,3,0,"sh-alert",21)(16,Mt,3,1,"sh-alert",22)(17,Pt,3,1,"sh-alert",23),D(18,yt,5,1,"p"),F(),D(19,Gt,9,1),D(20,wt,1,1,"app-single-destination",24),s(21,"div",25)(22,"button",26),d("click",function(){return _(e),c(o.goBack())}),T(23,3),g(24,"sh-icon"),u(),F(),s(25,"button",27),T(26,4),D(27,bt,2,0,"sh-icon",28)(28,Bt,2,0,"sh-icon"),u(),F()()(),D(29,kt,15,4,"sh-dialog",29)}if(t&2){let e=!!o.targetUrlModel();r(6),E(e?6:-1),r(7),E(e?13:-1),r(),E(o.testSignal()=="testing"?14:o.testSignal()=="success"?15:o.testSignal()=="warning"?16:o.testSignal()=="error"?17:-1),r(4),E(e?18:-1),r(),E(e?-1:19),r(),E(e?20:-1),r(5),N("disabled",o.testSignal()=="testing"||!e),r(2),E(o.testSignal()=="testing"?27:28),r(2),E(o.targetUrlDialogOpen()?29:-1)}},dependencies:[Rt,_t,lt,ot,at,st,rt,Ft,St,dt,Dt,ct,ut,Tt],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%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}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}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{v as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as ot}from"./chunk-ZBVBVQO7.js";import{a as K,b as Ze,c as Ye,e as et}from"./chunk-
|
|
1
|
+
import{a as ot}from"./chunk-ZBVBVQO7.js";import{a as K,b as Ze,c as Ye,e as et}from"./chunk-C6F6FP4R.js";import{h as it}from"./chunk-BQJICFF5.js";import{a as tt,d as nt}from"./chunk-A5LNLNWR.js";import{a as Qe}from"./chunk-6YGURBW6.js";import{a as R}from"./chunk-72HORZFV.js";import{a as z}from"./chunk-XLDVUBTQ.js";import{B as Ce,G as Ke,J as Ue,K as Je,O as Xe,U as He,V as je,X as qe,a as Re,c as de,e as ce,i as pe,k as ke,s as me,t as Be,u as ue,z as ze}from"./chunk-QF4DQYEP.js";import{h as We}from"./chunk-2QJVTZ56.js";import{ea as Ge}from"./chunk-5ZSBXGHQ.js";import{$b as s,Ab as X,Ac as Le,Bb as H,Bc as Pe,Cb as m,Cc as se,Db as _,Eb as d,Ec as _e,Fb as ie,Jb as oe,Jc as q,Kb as j,Lb as ae,Mb as E,Qc as P,Rc as W,Sa as l,Tb as Ne,Ub as xe,V as te,Vb as De,Wc as Q,Xc as $e,Zb as x,Zc as be,_ as V,ac as we,bc as Oe,cb as ne,ea as S,f as ee,fa as h,gc as Ae,hb as G,hc as Me,ic as B,ja as ye,kc as re,nc as p,pa as b,pc as A,qc as le,sc as Ve,tc as Fe,uc as ve,vc as L,wc as O,xb as g,xc as c,yb as f,zb as J}from"./chunk-QONLYWYC.js";import{a as M,b as Y}from"./chunk-EUDKD2JW.js";var at=class n{#t=V(We);#e=V(ze);#n=V(z);testDestination(t,e,i,o,a){return this.#n.hasV2TestOperations()?this.testDestinationv2(t,e,i,o,a):this.testDestinationv1(t,e,i,o,a)}testDestinationv2(t,e,i,o,a){return new ee(r=>{this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:t,BackupId:e=="new"?null:e,AutoCreate:!1,Options:null}}).subscribe({next:u=>{if(u.Success){this.emitSuccessV2(r,t,i,u);return}this.handleGenericError(r,t,i,u.Error??"Unknown error",a)},error:u=>{let T=u?.error?.body;if(T?.Data?.FolderExists===!1||T?.StatusCode==="missing-folder"){o?this.handleMissingFolder(r,t,i):this.handleGenericError(r,t,i,$localize`The remote destination folder does not exist.`,a);return}if(T?.Data?.HostCertificate){this.handleMissingCertificate(r,t,i,T.Data?.HostCertificate);return}if(T?.Data?.ReportedHostKey){this.handleIncorrectKey(r,t,i,T.Data.ReportedHostKey,T.Data.AcceptedHostKey??null);return}this.handleGenericError(r,t,i,u?.message??"Unknown error",a)}})})}testDestinationv1(t,e,i,o,a){return new ee(r=>{this.#t.postApiV1RemoteoperationTest({requestBody:{path:t,backupId:e=="new"?null:e}}).subscribe({next:u=>{r.next({action:"success",targetUrl:t,testAgain:!1,destinationIndex:i}),r.complete()},error:u=>{this.handleDestinationErrorv1(u.message,t,i,o,a).subscribe(T=>{r.next(T)})}})})}handleMissingFolder(t,e,i){this.#e.open(R,{data:{title:$localize`Create folder`,message:$localize`The remote destination folder does not exist, do you want to create it?`,confirmText:$localize`Create folder`,cancelText:$localize`Cancel`},closed:o=>{if(!o){this.reportNoAction(t,e,i,$localize`The remote folder does not exist.`);return}this.#n.hasV2TestOperations()?this.#t.postApiV2DestinationTest({requestBody:{DestinationUrl:e,AutoCreate:!0,Options:null}}).subscribe({next:a=>{if(a.Success){this.emitSuccessV2(t,e,i,a);return}else this.handleFolderCreateFailure(t,e,i,a.Error??$localize`Unknown error`)},error:a=>{this.handleFolderCreateFailure(t,e,i,a.message??$localize`Unknown error`)}}):this.#t.postApiV1RemoteoperationCreate({requestBody:{path:e}}).subscribe({next:()=>{this.handleFolderCreated(t,e,i)},error:a=>{this.handleFolderCreateFailure(t,e,i,a.message??$localize`Unknown error`)}})}})}handleFolderCreateFailure(t,e,i,o){this.#e.open(R,{data:{title:$localize`Error creating folder`,message:$localize`The remote destination folder could not be created. ${o}`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i}),t.complete()}})}emitSuccessV2(t,e,i,o){t.next({action:"success",targetUrl:e,testAgain:!1,destinationIndex:i,anyFilesFound:!o.Data?.FolderIsEmpty,containsBackup:o.Data?.FolderContainsBackupFiles??void 0,containsEncryptedBackupFiles:o.Data?.FolderContainsEncryptedBackupFiles??void 0}),t.complete()}handleFolderCreated(t,e,i){this.#e.open(R,{data:{title:$localize`Folder created`,message:$localize`The remote destination folder was created successfully.`,confirmText:$localize`OK`,cancelText:null},closed:()=>{t.next({action:"test-again",targetUrl:e,testAgain:!0,destinationIndex:i}),t.complete()}})}reportNoAction(t,e,i,o){t.next({action:"generic-error",targetUrl:e,errorMessage:o,testAgain:!1,destinationIndex:i}),t.complete()}handleMissingCertificate(t,e,i,o){this.#e.open(R,{maxWidth:"500px",data:{title:$localize`Trust the certificate`,message:$localize`The server is using a certificate that is not trusted.
|
|
2
2
|
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
3
|
The server reported the certificate hash: ${o}`,confirmText:$localize`Trust the certificate`,cancelText:$localize`Cancel`},closed:a=>{if(!a){this.reportNoAction(t,e,i,$localize`The server certificate is not trusted.`);return}t.next({action:"trust-cert",targetUrl:e,testAgain:!0,certData:o,destinationIndex:i}),t.complete()}})}handleIncorrectKey(t,e,i,o,a){a?this.#e.open(R,{maxWidth:"500px",data:{title:$localize`The host key has changed`,message:$localize`The host key has changed, please check with the server administrator if this is correct,
|
|
4
4
|
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
5
|
Do you want to REPLACE your CURRENT host key ${a}
|
|
6
|
-
with the REPORTED host key: ${o}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),t.complete()}}):this.#e.open(R,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),t.complete()}})}handleGenericError(t,e,i,o,a){function r(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i,errorMessage:o}),t.complete()}if(a){r();return}this.#e.open(R,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:C=>r()})}handleDestinationErrorv1(t,e,i,o,a){return new ee(r=>{if(t==="missing-folder"){o?this.handleMissingFolder(r,e,i):this.handleGenericError(r,e,i,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let C=t.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,i,C);return}if(t.startsWith("incorrect-host-key:")){let C=t.split('incorrect-host-key:"')[1].split('",')[0],E=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,i,C,E);return}this.handleGenericError(r,e,i,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var ge=class n{#t=V(z);supportedDestinationTypes=P(()=>this.#t.backendModules().map(t=>{if(!t?.Key)return null;let e=K(t.Key);return e.isDefaultEntry===!0?Y(M({},e),{displayName:t.DisplayName||e.displayName||t.Key,description:t.Description||e.description||""}):e}).filter(t=>t!==null));destinationTypeOptions=P(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon,searchTerms:[t.displayName,t.description,t.key,t.searchTerms??"",t.customKey??""].join(" "),sortOrder:t.sortOrder??0})));backendModules=P(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var _t=["fileInput"],dt=[[["label"]]],ct=["label"],fe=class n{customId=Q();content=b("");readonly=b(!1);placeholder=Q("Drop a file here or use the browse button");fileInputRef=$e("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=W(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&Ae(i.fileInputRef,_t,5),e&2&&Me()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Le([{provide:Re,useExisting:n,multi:!0}])],ngContentSelectors:ct,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,i){if(e&1){let o=x();we(dt),Oe(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",1)(2,"button",2),N("click",function(){return T(o),S(i.triggerBrowse())}),_(3,"sh-icon"),p(4,"upload"),d()()(),_(5,"div",3),N("drop",function(r){return T(o),S(i.onFileDrop(r))})("dragover",function(r){return T(o),S(i.onDragOver(r))}),_(6,"textarea",4),ve("ngModelChange",function(r){return T(o),Fe(i.content,r)||(i.content=r),S(r)}),d()(),_(7,"input",5,0),N("change",function(r){return T(o),S(i.onFileSelected(r))}),d()}e&2&&(l(6),m("placeholder",i.placeholder()),Ve("ngModel",i.content),m("disabled",i.readonly()))},dependencies:[me,de,ce,pe,Ce,ue],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var pt=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),Ie=n=>({$implicit:n}),mt=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),Ct=()=>({updateOn:"blur"}),ut=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i});function gt(n,t){n&1&&ae(0)}function ft(n,t){if(n&1&&G(0,gt,1,0,"ng-container",13),n&2){let e=t.$implicit,i=t.$index;s();let o=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,Ie,_e(2,pt,i,e,a,r.oauthField)))}}function Tt(n,t){n&1&&ae(0)}function St(n,t){if(n&1&&G(0,Tt,1,0,"ng-container",13),n&2){let e=t.$implicit,i=t.$index;s();let o=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,Ie,_e(2,mt,i,e,a,r.oauthField)))}}function ht(n,t){if(n&1){let e=x();_(0,"button",14),N("click",function(){T(e);let o=s(2);return S(o.showTextArea.set(!1))}),Ne(1,6),ie(2,"sh-icon"),xe(),d()}}function Nt(n,t){if(n&1){let e=x();_(0,"button",21,1),N("click",function(){let o=T(e).$implicit,a=s(3);return S(a.addAdvancedOption(o))}),p(2),d()}if(n&2){let e=t.$implicit;l(2),A(" ",e.name," ")}}function xt(n,t){if(n&1){let e=x();_(0,"div",11)(1,"sh-menu",15)(2,"button",16),Ne(3,7),ie(4,"sh-icon"),xe(),d(),oe(5,17),X(6,Nt,3,1,"button",18,J),j(),d(),_(8,"sh-menu")(9,"button",19)(10,"sh-icon"),p(11,"dots-three-vertical"),d()(),oe(12,17),_(13,"button",20),N("click",function(){T(e);let o=s(2);return S(o.showTextArea.set(!0))}),_(14,"sh-icon"),p(15,"link"),d(),p(16," Edit contents as text "),d(),j(),d()()}if(n&2){s();let e=c(9);l(),m("searchable",!0),l(),m("disabled",e.length===0),l(4),H(e)}}function Et(n,t){if(n&1){let e=x();_(0,"textarea",22),N("ngModelChange",function(o){T(e);let a=s(2);return S(a.updateSettingsFromText(o))}),d()}if(n&2){let e=s(2);m("ngModel",e.settingsAsText())("ngModelOptions",Pe(2,Ct))}}function It(n,t){n&1&&ae(0)}function yt(n,t){if(n&1&&G(0,It,1,0,"ng-container",13),n&2){let e=t.$implicit,i=t.$index;s(2);let o=B(15),a=s(),r=c(0),C=c(1),E=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,Ie,_e(2,ut,i,E,r,C.oauthField)))}}function Dt(n,t){if(n&1&&X(0,yt,1,9,"ng-container",null,J),n&2){let e=s(2);H(e.advancedFormFieldNames())}}function wt(n,t){n&1&&(_(0,"sup",31),p(1,"*"),d())}function Ot(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function At(n,t){if(n&1){let e=x();_(0,"app-file-tree",24)(1,"label",30),g(2,wt,2,0,"sup",31),p(3),g(4,Ot,2,1,"sh-icon",32),d(),_(5,"input",33),N("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(3),r=c(4),C=c(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",C),l(),f(e.formView.isMandatory&&r?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",C)("ngModel",o)}}function Mt(n,t){n&1&&(_(0,"sup",34),p(1,"*"),d())}function Vt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Ft(n,t){if(n&1){let e=x();_(0,"app-file-tree",25)(1,"label",30),g(2,Mt,2,0,"sup",34),p(3),g(4,Vt,2,1,"sh-icon",32),d(),_(5,"input",33),N("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(3),r=c(4),C=c(5);m("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),l(),m("for",C),l(),f(e.formView.isMandatory&&r?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",C)("ngModel",o)}}function vt(n,t){n&1&&(_(0,"sup",35),p(1,"*"),d())}function Lt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Pt(n,t){n&1&&(_(0,"sh-icon",36),p(1," warning "),d())}function $t(n,t){n&1&&(_(0,"sh-icon",37),p(1,"x-circle"),d())}function bt(n,t){n&1&&(_(0,"sh-icon",38),p(1,"warning"),d())}function Gt(n,t){if(n&1&&(_(0,"sh-icon",42),p(1," link "),d()),n&2){s();let e=c(9),i=c(10);re("error",e&&i==="error")("warn",e&&i==="warning"),m("shTooltip",e)}}function Rt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"envelope"),d())}function kt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"hard-drives"),d())}function Bt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"jar"),d())}function zt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"textbox"),d())}function Kt(n,t){if(n&1){let e=x();_(0,"sh-form-field")(1,"label",30),g(2,vt,2,0,"sup",35),p(3),g(4,Lt,2,1,"sh-icon",32),g(5,Pt,2,0,"sh-icon",36),g(6,$t,2,0,"sh-icon",37),g(7,bt,2,0,"sh-icon",38),d(),_(8,"input",39),N("keydown",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d(),L(9)(10),g(11,Gt,2,5,"sh-icon",40)(12,Rt,2,0,"sh-icon",41)(13,kt,2,0,"sh-icon",41)(14,Bt,2,0,"sh-icon",41)(15,zt,2,0,"sh-icon",41),d()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(3),r=c(4),C=c(5),E=s(2);l(),m("for",C),l(),f(e.formView.isMandatory&&r?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),f(r&&e.formView.type==="Path"?5:-1),l(),f(e.formView.type=="Hostname"&&!r&&!E.isValidHostname(a)?6:-1),l(),f(e.formView.type=="Bucketname"&&!r&&!E.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",C)("ngModel",o);let F=a,w=E.hasLeadingSlash(F??"");l(),O(w&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),O(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function Ut(n,t){n&1&&(_(0,"sup",43),p(1,"*"),d())}function Jt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Xt(n,t){if(n&1){let e=x();_(0,"span",47),N("click",function(){T(e);let o=s(2).$implicit,a=s(2);return S(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),d()}}function Ht(n,t){n&1&&(_(0,"sh-icon",41),p(1,"password"),d())}function jt(n,t){if(n&1){let e=x();_(0,"sh-icon",48),N("click",function(){T(e);let o=s(2).$implicit;return S(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),d()}}function qt(n,t){if(n&1){let e=x();_(0,"sh-icon",48),N("click",function(){T(e);let o=s(2).$implicit;return S(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),d()}}function Wt(n,t){if(n&1){let e=x();_(0,"sh-form-field")(1,"label",30),g(2,Ut,2,0,"sup",43),p(3),g(4,Jt,2,1,"sh-icon",32),d(),_(5,"input",44),N("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d(),g(6,Xt,2,0,"span",45)(7,Ht,2,0,"sh-icon",41),g(8,jt,2,0,"sh-icon",46)(9,qt,2,0,"sh-icon",46),d()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",o),l(),f(e.oauthField===e.formView.name?6:7),l(2),f(e.formView.showPassword?8:9)}}function Qt(n,t){n&1&&(_(0,"sup",50),p(1,"*"),d())}function Zt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Yt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;le(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function en(n,t){if(n&1){let e=x();_(0,"sh-select",49)(1,"label",30),g(2,Qt,2,0,"sup",50),p(3),g(4,Zt,2,1,"sh-icon",32),d(),_(5,"input",33),N("ngModelChange",function(o){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()(),G(6,Yt,1,2,"ng-template",null,2,q)}if(n&2){let e=B(7);s();let i=c(0),o=s().$implicit,a=c(1),r=c(2),C=c(4),E=c(5);m("options",i)("isClearable",!1)("optionTemplate",e),l(),m("for",E),l(),f(o.formView.isMandatory&&C?2:-1),l(),A(" ",a," "),l(),f(o.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function tn(n,t){if(n&1&&(L(0),g(1,en,8,9)),n&2){let e=s().$implicit,i=O(s(2).mapOptions(e.formView));l(),f(i?1:-1)}}function nn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),d())}function on(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function an(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;le(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function rn(n,t){if(n&1){let e=x();_(0,"sh-select",52)(1,"label",30),g(2,nn,2,0,"sup",53),p(3),g(4,on,2,1,"sh-icon",32),d(),_(5,"input",33),N("ngModelChange",function(o){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()(),G(6,an,1,2,"ng-template",null,3,q)}if(n&2){let e=B(7);s();let i=c(0),o=s().$implicit,a=c(1),r=c(2),C=c(4),E=c(5);m("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",E),l(),f(o.formView.isMandatory&&C?2:-1),l(),A(" ",a," "),l(),f(o.formView.longDescription?4:-1),l(),m("id",E)("ngModel",r)}}function ln(n,t){n&1&&ie(0,"sh-progress-bar",51)}function sn(n,t){if(n&1&&(L(0),g(1,rn,8,10)(2,ln,1,0,"sh-progress-bar",51)),n&2){let e=s().$implicit,i=c(2),o=O(s(2).mapOptionsWithFreeText(e.formView,i));l(),f(o?1:2)}}function _n(n,t){n&1&&(_(0,"sup",55),p(1,"*"),d())}function dn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function cn(n,t){if(n&1){let e=x();_(0,"app-size",54),N("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),_(1,"label",30),g(2,_n,2,0,"sup",55),p(3),g(4,dn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);m("inputType",e.Name)("ngModel",o)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1)}}function pn(n,t){n&1&&(_(0,"sup",56),p(1,"*"),d())}function mn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Cn(n,t){if(n&1){let e=x();_(0,"sh-form-field")(1,"label",30),g(2,pn,2,0,"sup",56),p(3),g(4,mn,2,1,"sh-icon",32),d(),_(5,"input",57),N("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d(),_(6,"sh-icon",41),p(7,"numpad"),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",o)}}function un(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function gn(n,t){if(n&1){let e=x();_(0,"sh-toggle",58),N("click",function(){T(e);let o=s().$implicit,a=c(2),r=s(2);return S(r.updateFieldValue(o.fieldGroup,o.formView.name,r.isTrue(a)?"false":"true"))}),_(1,"label",30),p(2),g(3,un,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(5),r=s(2);re("active",r.isTrue(o)),l(),m("for",a),l(),A(" ",i," "),l(),f(e.formView.longDescription?3:-1)}}function fn(n,t){n&1&&(_(0,"sup",60),p(1,"*"),d())}function Tn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Sn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;le(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function hn(n,t){if(n&1){let e=x();_(0,"sh-select",59)(1,"label",30),g(2,fn,2,0,"sup",60),p(3),g(4,Tn,2,1,"sh-icon",32),d(),_(5,"input",61),N("ngModelChange",function(o){T(e);let a=s(2).$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()(),G(6,Sn,1,2,"ng-template",null,4,q)}if(n&2){let e=B(7);s();let i=c(0),o=s().$implicit,a=c(1),r=c(2),C=c(4),E=c(5);m("options",i)("selectMultiple",!0)("optionTemplate",e),l(),m("for",E),l(),f(o.formView.isMandatory&&C?2:-1),l(),A(" ",a," "),l(),f(o.formView.longDescription?4:-1),l(),m("ngModel",r)}}function Nn(n,t){if(n&1&&(L(0),g(1,hn,8,8)),n&2){let e=s().$implicit,i=O(s(2).mapOptions(e.formView));l(),f(i?1:-1)}}function xn(n,t){n&1&&(_(0,"sup",62),p(1,"*"),d())}function En(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function In(n,t){if(n&1){let e=x();_(0,"app-timespan",54),N("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),_(1,"label",30),g(2,xn,2,0,"sup",62),p(3),g(4,En,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);m("inputType",e.formView.name)("ngModel",o)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1)}}function yn(n,t){n&1&&(_(0,"sup",64),p(1,"*"),d())}function Dn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function wn(n,t){if(n&1){let e=x();_(0,"app-file-drop-textarea",63),N("ngModelChange",function(o){T(e);let a=s().$implicit,r=s(2);return S(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),_(1,"label"),g(2,yn,2,0,"sup",64),p(3),g(4,Dn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(2),o=c(4),a=c(5);m("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),l(2),f(e.formView.isMandatory&&o?2:-1),l(),A(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?4:-1)}}function On(n,t){if(n&1){let e=x();_(0,"button",65),N("click",function(){T(e);let o=s().$implicit,a=s(2);return S(a.removeAdvancedOption(o.formView.name))}),_(1,"sh-icon"),p(2,"x-circle"),d()()}}function An(n,t){if(n&1&&(_(0,"div",23),L(1)(2)(3)(4)(5),g(6,At,6,12,"app-file-tree",24)(7,Ft,6,9,"app-file-tree",25)(8,Kt,16,13,"sh-form-field")(9,Wt,10,9,"sh-form-field")(10,tn,2,2)(11,sn,3,2)(12,cn,5,7,"app-size",26)(13,Cn,8,6,"sh-form-field")(14,gn,4,5,"sh-toggle",27)(15,Nn,2,2)(16,In,5,7,"app-timespan",26)(17,wn,5,6,"app-file-drop-textarea",28),g(18,On,3,0,"button",29),d()),n&2){let e=t.$implicit;s();let i=c(0),o=s();re("single-field",e.fieldGroup!=="advanced"),l(),O(e.formView.shortDescription??e.formView.name),l(),O(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),l();let a=O(o.getFieldValue(e.fieldGroup,e.formView.name));l(),O((a??"").toString().trim()===""),l(),O("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:-1),l(12),f(e.fieldGroup==="advanced"?18:-1)}}function Mn(n,t){if(n&1&&(L(0),X(1,ft,1,9,"ng-container",null,J),X(3,St,1,9,"ng-container",null,J),_(5,"sh-toggle-card",8),oe(6,9)(7),De(8,5),j(),L(9),g(10,ht,3,0,"button",10)(11,xt,17,2,"div",11),j(),g(12,Et,1,3,"textarea",12)(13,Dt,2,0),d(),G(14,An,19,9,"ng-template",null,0,q)),n&2){let e=s(),i=c(1);O(e.destinationForm()),l(),H(i.custom),l(2),H(i.dynamic),l(2),m("disallowToggle",!0),l(4),O(e.nonSelectedAdvancedFormViews()),l(),f(e.showTextArea()?10:11),l(2),f(e.showTextArea()?12:13)}}var rt=class n{#t=V(it);#e=V(z);#n=V(Qe);#a=V(ge);injector=V(ye);targetUrl=be.required();useBackupState=Q(!1);#i=null;destinationType=P(()=>{let t=this.targetUrl();if(!t)return null;let e=K(t.split("://")[0]);return this.#i=e?.customKey??e?.key,this.#i});destinationForm=b({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=b(null);showTextArea=b(!1);nonSelectedAdvancedFormViews=P(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=W(()=>{let t=this.destinationType()??"",e=K(t),i=e?.key,o=this.#a.backendModules().find(I=>I.Key===i)??{Key:t,DisplayName:t,Description:K(t).description,Options:[]};if(!o||!o.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},C=e&&e.dynamicFields?e.dynamicFields:[],E=e&&e.advancedFields?e.advancedFields:[],F=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],w={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([I,u],y)=>{let D=u.order??y;w.custom.push(M({order:900+D},u))});for(let I=0;I<o.Options.length;I++){let u=o.Options[I];if(u.Deprecated)continue;let y=C.find(D=>D===u.Name||u.Aliases?.includes(D.name)||D.name===u.Name);if(y){let D=u.Aliases?.indexOf(y.name)??-1,$=u.Aliases&&D>-1?u.Aliases[D]:u.Name,h=y&&typeof y!="string",Te=h?y?.defaultValue??u.DefaultValue:u.DefaultValue,Se=h&&y?.order!==void 0?y.order:I,U={name:$,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,order:900+Se},he=h?M(M({},U),y):U;w.dynamic.push(he)}else{let D=u.Name;if(F.find(Z=>Z===D))continue;let h=E.find(Z=>Z===D||Z.name===D),Te=h&&typeof h!="string",Se=Te&&h?.order!==void 0?h.order:I,U={name:D,type:u.Type,shortDescription:u.ShortDescription??void 0,longDescription:u.LongDescription??void 0,options:u.ValidValues,defaultValue:u.DefaultValue,order:900+Se},he=Te?M(M({},U),h):U;w.advanced.push(he)}}w.custom.sort((I,u)=>I.order-u.order),w.dynamic.sort((I,u)=>I.order-u.order),w.advanced.sort((I,u)=>I.order-u.order),this.destinationFormConfig.set(w);let k=this.targetUrl();if(!k)return;let v=Ye(k);v&&this.destinationForm.set({custom:v.custom,dynamic:v.dynamic,advanced:v.advanced})});destinationFormEffect=W(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let i=Ze({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});i&&this.targetUrl.set(i)});getFieldValue(t,e){let o=this.destinationForm()[t][e];return o||null}getFormView(t,e){let o=this.destinationFormConfig()?.[t].find(a=>a.name===e);return o||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(M({},e))}isValidBucketname(t){if(!t)return!1;let e=t.length;return!(e<3||e>63||!/^[a-z0-9.-]+$/.test(t)||!/^[a-z0-9]/.test(t)||!/[a-z0-9]$/.test(t)||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)||/(\.\.)|(\.-)|(-\.)/.test(t))}isValidHostname(t){if(!t||t.length>253)return!1;let e=t.split(".");for(let i of e)if(!i||i.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(i))return!1;return!0}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,i,o){if(i==="Hostname"||i==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(o.key))return;if(o.key=="/"||o.key=="\\"||o.key==":"){o.preventDefault();return}}}updateFieldValue(t,e,i){let o=this.destinationForm();o[t][e]=i,this.destinationForm.set(M({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(M({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let i=t.options;return i?i.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let i=this.mapOptions(t);return i?(e&&e.length>0&&(i.find(a=>a.value===e)||i.push({key:e,value:e})),i):null}#o=b(!1);oauthStartTokenCreation(t,e,i,o){this.#o.set(!0);let a=(o??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let u=this.#t.mapFormsToSettings().find(y=>y.Name==="--oauth-url")?.Value;u&&u.length>0&&(a=u)}let C=this.destinationForm().advanced["oauth-url"];C&&C.length>0&&(a=C);let E=`${a}?type=${t}`,F=450,w=600,k=screen.width/2-F/2,v=screen.height/2-w/2,I=window.open(E,"_blank","height="+w+",width="+F+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+v);return window.addEventListener("message",u=>{let y=u.data.startsWith("authid:"),D=y?u.data.replace("authid:",""):null;y&&(this.destinationForm.update($=>($[e][i]=D,$)),this.#o.set(!1),I?.close())}),!1}settingsAsText=P(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,i])=>{let o=e??"",a="";return typeof i=="boolean"?a=this.isTrue(i)?"True":"False":(typeof i=="number"||i!=null)&&(a=i.toString()),`${o}=${a}`}).join(`
|
|
7
|
-
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=et(t);this.destinationForm.update(i=>Y(M({},i),{advanced:e}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let r;r=$localize`This field is mandatory`;let
|
|
6
|
+
with the REPORTED host key: ${o}?`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),t.complete()}}):this.#e.open(R,{maxWidth:"500px",data:{title:$localize`Approve host key?`,message:$localize`No certificate was specified, please verify that the reported host key is correct: ${o}`,confirmText:$localize`Approve`,cancelText:$localize`Cancel`},closed:r=>{if(!r){this.reportNoAction(t,e,i,$localize`The host key was not approved.`);return}t.next({action:"approve-host-key",targetUrl:e,testAgain:!0,reportedHostKey:o,destinationIndex:i}),t.complete()}})}handleGenericError(t,e,i,o,a){function r(){t.next({action:"generic-error",targetUrl:e,testAgain:!1,destinationIndex:i,errorMessage:o}),t.complete()}if(a){r();return}this.#e.open(R,{maxWidth:"500px",data:{title:$localize`Test connection failed`,message:o,cancelText:$localize`OK`},closed:u=>r()})}handleDestinationErrorv1(t,e,i,o,a){return new ee(r=>{if(t==="missing-folder"){o?this.handleMissingFolder(r,e,i):this.handleGenericError(r,e,i,$localize`The remote destination folder does not exist.`,a);return}if(t.startsWith("incorrect-cert:")){let u=t.split("incorrect-cert:")[1];this.handleMissingCertificate(r,e,i,u);return}if(t.startsWith("incorrect-host-key:")){let u=t.split('incorrect-host-key:"')[1].split('",')[0],T=t.split('accepted-host-key:"')[1].split('",')[0];this.handleIncorrectKey(r,e,i,u,T);return}this.handleGenericError(r,e,i,t,a)})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var ge=class n{#t=V(z);supportedDestinationTypes=P(()=>this.#t.backendModules().map(t=>{if(!t?.Key)return null;let e=K(t.Key);return e.isDefaultEntry===!0?Y(M({},e),{displayName:t.DisplayName||e.displayName||t.Key,description:t.Description||e.description||""}):e}).filter(t=>t!==null));destinationTypeOptions=P(()=>this.supportedDestinationTypes().map(t=>({key:t.customKey??t.key,customKey:t.customKey??null,displayName:t.displayName,description:t.description,icon:t.icon,searchTerms:[t.displayName,t.description,t.key,t.searchTerms??"",t.customKey??""].join(" "),sortOrder:t.sortOrder??0})));backendModules=P(()=>this.#t.backendModules()??[]);static \u0275fac=function(e){return new(e||n)};static \u0275prov=te({token:n,factory:n.\u0275fac,providedIn:"root"})};var _t=["fileInput"],dt=[[["label"]]],ct=["label"],fe=class n{customId=Q();content=b("");readonly=b(!1);placeholder=Q("Drop a file here or use the browse button");fileInputRef=$e("fileInput");onFileSelected(t){let e=t.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}onFileDrop(t){t.preventDefault(),t.dataTransfer?.files&&t.dataTransfer.files.length>0&&this.readFile(t.dataTransfer.files[0])}onDragOver(t){t.preventDefault()}readFile(t){let e=new FileReader;e.onload=()=>{this.content.set(e.result)},e.readAsText(t)}triggerBrowse(){return this.fileInputRef()?.nativeElement.click(),!1}onChange=()=>{};onTouched=()=>{};onChangeEffect=W(()=>{this.onChange(this.content())});writeValue(t){this.content.set(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.readonly.set(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({type:n,selectors:[["app-file-drop-textarea"]],viewQuery:function(e,i){e&1&&Ae(i.fileInputRef,_t,5),e&2&&Me()},inputs:{customId:[1,"customId"],placeholder:[1,"placeholder"]},features:[Le([{provide:Re,useExisting:n,multi:!0}])],ngContentSelectors:ct,decls:9,vars:3,consts:[["fileInput",""],[1,"browse-btn"],["shButton","","type","button",1,"small","outlined",3,"click"],[1,"textarea-container","textarea-wrap",3,"drop","dragover"],["rows","10",3,"ngModelChange","placeholder","ngModel","disabled"],["type","file",1,"hidden",3,"change"]],template:function(e,i){if(e&1){let o=E();we(dt),Oe(0,0,["ngProjectAs","label",5,["label"]]),_(1,"div",1)(2,"button",2),x("click",function(){return S(o),h(i.triggerBrowse())}),_(3,"sh-icon"),p(4,"upload"),d()()(),_(5,"div",3),x("drop",function(r){return S(o),h(i.onFileDrop(r))})("dragover",function(r){return S(o),h(i.onDragOver(r))}),_(6,"textarea",4),ve("ngModelChange",function(r){return S(o),Fe(i.content,r)||(i.content=r),h(r)}),d()(),_(7,"input",5,0),x("change",function(r){return S(o),h(i.onFileSelected(r))}),d()}e&2&&(l(6),m("placeholder",i.placeholder()),Ve("ngModel",i.content),m("disabled",i.readonly()))},dependencies:[me,de,ce,pe,ue,Ce],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label browsebtn" "input input";grid-template-columns:8fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .browse-btn[_ngcontent-%COMP%]{grid-area:browsebtn}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%]{grid-area:input;width:100%;border:none;font:var(--code-20)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;color:var(--base-8);background-color:var(--base-1);border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;resize:vertical;box-shadow:var(--box-shadow-10)}[_nghost-%COMP%] .textarea-wrap[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] .dark[_ngcontent-%COMP%]{background-color:var(--base-2)}[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};var pt=(n,t,e,i)=>({index:n,fieldGroup:"custom",formView:t,destinationType:e,oauthField:i}),Ie=n=>({$implicit:n}),mt=(n,t,e,i)=>({index:n,fieldGroup:"dynamic",formView:t,destinationType:e,oauthField:i}),ut=()=>({updateOn:"blur"}),Ct=(n,t,e,i)=>({index:n,formView:t,fieldGroup:"advanced",destinationType:e,oauthField:i});function gt(n,t){n&1&&ae(0)}function ft(n,t){if(n&1&&G(0,gt,1,0,"ng-container",13),n&2){let e=t.$implicit,i=t.$index;s();let o=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,Ie,_e(2,pt,i,e,a,r.oauthField)))}}function Tt(n,t){n&1&&ae(0)}function St(n,t){if(n&1&&G(0,Tt,1,0,"ng-container",13),n&2){let e=t.$implicit,i=t.$index;s();let o=B(15);s();let a=c(0),r=c(1);m("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,Ie,_e(2,mt,i,e,a,r.oauthField)))}}function ht(n,t){if(n&1){let e=E();_(0,"button",14),x("click",function(){S(e);let o=s(2);return h(o.showTextArea.set(!1))}),Ne(1,6),ie(2,"sh-icon"),xe(),d()}}function Nt(n,t){if(n&1){let e=E();_(0,"button",21,1),x("click",function(){let o=S(e).$implicit,a=s(3);return h(a.addAdvancedOption(o))}),p(2),d()}if(n&2){let e=t.$implicit;l(2),A(" ",e.name," ")}}function xt(n,t){if(n&1){let e=E();_(0,"div",11)(1,"sh-menu",15)(2,"button",16),Ne(3,7),ie(4,"sh-icon"),xe(),d(),oe(5,17),X(6,Nt,3,1,"button",18,J),j(),d(),_(8,"sh-menu")(9,"button",19)(10,"sh-icon"),p(11,"dots-three-vertical"),d()(),oe(12,17),_(13,"button",20),x("click",function(){S(e);let o=s(2);return h(o.showTextArea.set(!0))}),_(14,"sh-icon"),p(15,"link"),d(),p(16," Edit contents as text "),d(),j(),d()()}if(n&2){s();let e=c(9);l(),m("searchable",!0),l(),m("disabled",e.length===0),l(4),H(e)}}function Et(n,t){if(n&1){let e=E();_(0,"textarea",22),x("ngModelChange",function(o){S(e);let a=s(2);return h(a.updateSettingsFromText(o))}),d()}if(n&2){let e=s(2);m("ngModel",e.settingsAsText())("ngModelOptions",Pe(2,ut))}}function It(n,t){n&1&&ae(0)}function yt(n,t){if(n&1&&G(0,It,1,0,"ng-container",13),n&2){let e=t.$implicit,i=t.$index;s(2);let o=B(15),a=s(),r=c(0),u=c(1),T=a.getFormView("advanced",e)??a.getDefaultFormView(e);m("ngTemplateOutlet",o)("ngTemplateOutletContext",se(7,Ie,_e(2,Ct,i,T,r,u.oauthField)))}}function Dt(n,t){if(n&1&&X(0,yt,1,9,"ng-container",null,J),n&2){let e=s(2);H(e.advancedFormFieldNames())}}function wt(n,t){n&1&&(_(0,"sup",31),p(1,"*"),d())}function Ot(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function At(n,t){if(n&1){let e=E();_(0,"app-file-tree",24)(1,"label",30),g(2,wt,2,0,"sup",31),p(3),g(4,Ot,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(3),r=c(4),u=c(5);m("startingPath",a)("accepts",e.formView.accepts)("showFiles",!0)("hideShortcuts",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",o)}}function Mt(n,t){n&1&&(_(0,"sup",34),p(1,"*"),d())}function Vt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Ft(n,t){if(n&1){let e=E();_(0,"app-file-tree",25)(1,"label",30),g(2,Mt,2,0,"sup",34),p(3),g(4,Vt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(3),r=c(4),u=c(5);m("hideShortcuts",!0)("enableCreateFolder",!0)("startingPath",a),l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",u)("ngModel",o)}}function vt(n,t){n&1&&(_(0,"sup",35),p(1,"*"),d())}function Lt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Pt(n,t){n&1&&(_(0,"sh-icon",36),p(1," warning "),d())}function $t(n,t){n&1&&(_(0,"sh-icon",37),p(1,"x-circle"),d())}function bt(n,t){n&1&&(_(0,"sh-icon",38),p(1,"warning"),d())}function Gt(n,t){if(n&1&&(_(0,"sh-icon",42),p(1," link "),d()),n&2){s();let e=c(9),i=c(10);re("error",e&&i==="error")("warn",e&&i==="warning"),m("shTooltip",e)}}function Rt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"envelope"),d())}function kt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"hard-drives"),d())}function Bt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"jar"),d())}function zt(n,t){n&1&&(_(0,"sh-icon",41),p(1,"textbox"),d())}function Kt(n,t){if(n&1){let e=E();_(0,"sh-form-field")(1,"label",30),g(2,vt,2,0,"sup",35),p(3),g(4,Lt,2,1,"sh-icon",32),g(5,Pt,2,0,"sh-icon",36),g(6,$t,2,0,"sh-icon",37),g(7,bt,2,0,"sh-icon",38),d(),_(8,"input",39),x("keydown",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.onKeyDown(a.fieldGroup,a.formView.name,a.formView.type,o))})("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d(),L(9)(10),g(11,Gt,2,5,"sh-icon",40)(12,Rt,2,0,"sh-icon",41)(13,kt,2,0,"sh-icon",41)(14,Bt,2,0,"sh-icon",41)(15,zt,2,0,"sh-icon",41),d()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(3),r=c(4),u=c(5),T=s(2);l(),m("for",u),l(),f(e.formView.isMandatory&&r?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),f(r&&e.formView.type==="Path"?5:-1),l(),f(e.formView.type=="Hostname"&&!r&&!T.isValidHostname(a)?6:-1),l(),f(e.formView.type=="Bucketname"&&!r&&!T.isValidBucketname(a)?7:-1),l(),m("type",e.formView.type==="Email"?"email":"text")("id",u)("ngModel",o);let F=a,w=T.hasLeadingSlash(F??"");l(),O(w&&(e.formView.doubleSlash==null?null:e.formView.doubleSlash.message)),l(),O(e.formView.doubleSlash==null?null:e.formView.doubleSlash.type),l(),f(e.formView.type==="Path"?11:e.formView.type==="Email"?12:e.formView.type==="Hostname"?13:e.formView.type==="Bucketname"?14:15)}}function Ut(n,t){n&1&&(_(0,"sup",43),p(1,"*"),d())}function Jt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function Xt(n,t){if(n&1){let e=E();_(0,"span",47),x("click",function(){S(e);let o=s(2).$implicit,a=s(2);return h(a.oauthStartTokenCreation(o.destinationType,o.fieldGroup,o.formView.name,o.formView.oauthVersion))}),p(1," AuthID "),d()}}function Ht(n,t){n&1&&(_(0,"sh-icon",41),p(1,"password"),d())}function jt(n,t){if(n&1){let e=E();_(0,"sh-icon",48),x("click",function(){S(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye "),d()}}function qt(n,t){if(n&1){let e=E();_(0,"sh-icon",48),x("click",function(){S(e);let o=s(2).$implicit;return h(o.formView.showPassword=!o.formView.showPassword)}),p(1," eye-slash "),d()}}function Wt(n,t){if(n&1){let e=E();_(0,"sh-form-field")(1,"label",30),g(2,Ut,2,0,"sup",43),p(3),g(4,Jt,2,1,"sh-icon",32),d(),_(5,"input",44),x("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d(),g(6,Xt,2,0,"span",45)(7,Ht,2,0,"sh-icon",41),g(8,jt,2,0,"sh-icon",46)(9,qt,2,0,"sh-icon",46),d()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("type",e.formView.showPassword?"text":"password")("id",r)("ngModel",o),l(),f(e.oauthField===e.formView.name?6:7),l(2),f(e.formView.showPassword?8:9)}}function Qt(n,t){n&1&&(_(0,"sup",50),p(1,"*"),d())}function Zt(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Yt(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;le(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function en(n,t){if(n&1){let e=E();_(0,"sh-select",49)(1,"label",30),g(2,Qt,2,0,"sup",50),p(3),g(4,Zt,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(o){S(e);let a=s(2).$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()(),G(6,Yt,1,2,"ng-template",null,2,q)}if(n&2){let e=B(7);s();let i=c(0),o=s().$implicit,a=c(1),r=c(2),u=c(4),T=c(5);m("options",i)("isClearable",!1)("optionTemplate",e),l(),m("for",T),l(),f(o.formView.isMandatory&&u?2:-1),l(),A(" ",a," "),l(),f(o.formView.longDescription?4:-1),l(),m("id",T)("ngModel",r)}}function tn(n,t){if(n&1&&(L(0),g(1,en,8,9)),n&2){let e=s().$implicit,i=O(s(2).mapOptions(e.formView));l(),f(i?1:-1)}}function nn(n,t){n&1&&(_(0,"sup",53),p(1,"*"),d())}function on(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function an(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;le(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function rn(n,t){if(n&1){let e=E();_(0,"sh-select",52)(1,"label",30),g(2,nn,2,0,"sup",53),p(3),g(4,on,2,1,"sh-icon",32),d(),_(5,"input",33),x("ngModelChange",function(o){S(e);let a=s(2).$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()(),G(6,an,1,2,"ng-template",null,3,q)}if(n&2){let e=B(7);s();let i=c(0),o=s().$implicit,a=c(1),r=c(2),u=c(4),T=c(5);m("options",i)("asFreeText",!0)("inlineSearch",!0)("optionTemplate",e),l(),m("for",T),l(),f(o.formView.isMandatory&&u?2:-1),l(),A(" ",a," "),l(),f(o.formView.longDescription?4:-1),l(),m("id",T)("ngModel",r)}}function ln(n,t){n&1&&ie(0,"sh-progress-bar",51)}function sn(n,t){if(n&1&&(L(0),g(1,rn,8,10)(2,ln,1,0,"sh-progress-bar",51)),n&2){let e=s().$implicit,i=c(2),o=O(s(2).mapOptionsWithFreeText(e.formView,i));l(),f(o?1:2)}}function _n(n,t){n&1&&(_(0,"sup",55),p(1,"*"),d())}function dn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function cn(n,t){if(n&1){let e=E();_(0,"app-size",54),x("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),_(1,"label",30),g(2,_n,2,0,"sup",55),p(3),g(4,dn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);m("inputType",e.Name)("ngModel",o)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1)}}function pn(n,t){n&1&&(_(0,"sup",56),p(1,"*"),d())}function mn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function un(n,t){if(n&1){let e=E();_(0,"sh-form-field")(1,"label",30),g(2,pn,2,0,"sup",56),p(3),g(4,mn,2,1,"sh-icon",32),d(),_(5,"input",57),x("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d(),_(6,"sh-icon",41),p(7,"numpad"),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1),l(),m("id",r)("ngModel",o)}}function Cn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function gn(n,t){if(n&1){let e=E();_(0,"sh-toggle",58),x("click",function(){S(e);let o=s().$implicit,a=c(2),r=s(2);return h(r.updateFieldValue(o.fieldGroup,o.formView.name,r.isTrue(a)?"false":"true"))}),_(1,"label",30),p(2),g(3,Cn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(5),r=s(2);re("active",r.isTrue(o)),l(),m("for",a),l(),A(" ",i," "),l(),f(e.formView.longDescription?3:-1)}}function fn(n,t){n&1&&(_(0,"sup",60),p(1,"*"),d())}function Tn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(3).$implicit;m("shTooltip",e.formView.longDescription)}}function Sn(n,t){if(n&1&&p(0),n&2){let e=t.$implicit;le(" ",e.key," ",e.value&&e.value!=e.key?"("+e.value+")":""," ")}}function hn(n,t){if(n&1){let e=E();_(0,"sh-select",59)(1,"label",30),g(2,fn,2,0,"sup",60),p(3),g(4,Tn,2,1,"sh-icon",32),d(),_(5,"input",61),x("ngModelChange",function(o){S(e);let a=s(2).$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),d()(),G(6,Sn,1,2,"ng-template",null,4,q)}if(n&2){let e=B(7);s();let i=c(0),o=s().$implicit,a=c(1),r=c(2),u=c(4),T=c(5);m("options",i)("selectMultiple",!0)("optionTemplate",e),l(),m("for",T),l(),f(o.formView.isMandatory&&u?2:-1),l(),A(" ",a," "),l(),f(o.formView.longDescription?4:-1),l(),m("ngModel",r)}}function Nn(n,t){if(n&1&&(L(0),g(1,hn,8,8)),n&2){let e=s().$implicit,i=O(s(2).mapOptions(e.formView));l(),f(i?1:-1)}}function xn(n,t){n&1&&(_(0,"sup",62),p(1,"*"),d())}function En(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function In(n,t){if(n&1){let e=E();_(0,"app-timespan",54),x("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),_(1,"label",30),g(2,xn,2,0,"sup",62),p(3),g(4,En,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(1),o=c(2),a=c(4),r=c(5);m("inputType",e.formView.name)("ngModel",o)("customId",r),l(),m("for",r),l(),f(e.formView.isMandatory&&a?2:-1),l(),A(" ",i," "),l(),f(e.formView.longDescription?4:-1)}}function yn(n,t){n&1&&(_(0,"sup",64),p(1,"*"),d())}function Dn(n,t){if(n&1&&(_(0,"sh-icon",32),p(1,"question"),d()),n&2){let e=s(2).$implicit;m("shTooltip",e.formView.longDescription)}}function wn(n,t){if(n&1){let e=E();_(0,"app-file-drop-textarea",63),x("ngModelChange",function(o){S(e);let a=s().$implicit,r=s(2);return h(r.updateFieldValue(a.fieldGroup,a.formView.name,o))}),_(1,"label"),g(2,yn,2,0,"sup",64),p(3),g(4,Dn,2,1,"sh-icon",32),d()()}if(n&2){let e=s().$implicit,i=c(2),o=c(4),a=c(5);m("ngModel",i)("customId",a)("placeholder",e.formView.longDescription),l(2),f(e.formView.isMandatory&&o?2:-1),l(),A(" ",e.formView.shortDescription??e.formView.name," "),l(),f(e.formView.longDescription?4:-1)}}function On(n,t){if(n&1){let e=E();_(0,"button",65),x("click",function(){S(e);let o=s().$implicit,a=s(2);return h(a.removeAdvancedOption(o.formView.name))}),_(1,"sh-icon"),p(2,"x-circle"),d()()}}function An(n,t){if(n&1&&(_(0,"div",23),L(1)(2)(3)(4)(5),g(6,At,6,12,"app-file-tree",24)(7,Ft,6,9,"app-file-tree",25)(8,Kt,16,13,"sh-form-field")(9,Wt,10,9,"sh-form-field")(10,tn,2,2)(11,sn,3,2)(12,cn,5,7,"app-size",26)(13,un,8,6,"sh-form-field")(14,gn,4,5,"sh-toggle",27)(15,Nn,2,2)(16,In,5,7,"app-timespan",26)(17,wn,5,6,"app-file-drop-textarea",28),g(18,On,3,0,"button",29),d()),n&2){let e=t.$implicit;s();let i=c(0),o=s();re("single-field",e.fieldGroup!=="advanced"),l(),O(e.formView.shortDescription??e.formView.name),l(),O(o.getFieldGroup(i,e.fieldGroup)[e.formView.name]),l();let a=O(o.getFieldValue(e.fieldGroup,e.formView.name));l(),O((a??"").toString().trim()===""),l(),O("destination-"+e.fieldGroup+"-"+e.index+"-"+(e.asHttpOptions?"http":"other")),l(),f(e.formView.type==="FileTree"?6:e.formView.type==="FolderTree"?7:e.formView.type==="String"||e.formView.type==="Path"||e.formView.type==="Email"||e.formView.type==="Hostname"||e.formView.type==="Bucketname"?8:e.formView.type==="Password"?9:e.formView.type==="Enumeration"?10:e.formView.type==="NonValidatedSelectableString"?11:e.formView.type==="Size"?12:e.formView.type==="Integer"?13:e.formView.type==="Boolean"?14:e.formView.type==="Flags"?15:e.formView.type==="Timespan"||e.formView.type==="DateTime"?16:e.formView.type==="FreeText"?17:-1),l(12),f(e.fieldGroup==="advanced"?18:-1)}}function Mn(n,t){if(n&1&&(L(0),X(1,ft,1,9,"ng-container",null,J),X(3,St,1,9,"ng-container",null,J),_(5,"sh-toggle-card",8),oe(6,9)(7),De(8,5),j(),L(9),g(10,ht,3,0,"button",10)(11,xt,17,2,"div",11),j(),g(12,Et,1,3,"textarea",12)(13,Dt,2,0),d(),G(14,An,19,9,"ng-template",null,0,q)),n&2){let e=s(),i=c(1);O(e.destinationForm()),l(),H(i.custom),l(2),H(i.dynamic),l(2),m("disallowToggle",!0),l(4),O(e.nonSelectedAdvancedFormViews()),l(),f(e.showTextArea()?10:11),l(2),f(e.showTextArea()?12:13)}}var rt=class n{#t=V(it);#e=V(z);#n=V(Qe);#a=V(ge);injector=V(ye);targetUrl=be.required();useBackupState=Q(!1);#i=null;destinationType=P(()=>{let t=this.targetUrl();if(!t)return null;let e=K(t.split("://")[0]);return this.#i=e?.customKey??e?.key,this.#i});destinationForm=b({custom:{},dynamic:{},advanced:{}});advancedFormFieldNames=P(()=>Object.keys(this.destinationForm().advanced));destinationFormConfig=b(null);showTextArea=b(!1);nonSelectedAdvancedFormViews=P(()=>{let t=this.destinationFormConfig();if(!t)return[];let e=this.advancedFormFieldNames();return t.advanced.filter(i=>e.findIndex(o=>o===i.name)===-1)});destinationTypeEffect=W(()=>{let t=this.destinationType()??"",e=K(t),i=e?.key,o=this.#a.backendModules().find(I=>I.Key===i)??{Key:t,DisplayName:t,Description:K(t).description,Options:[]};if(!o||!o.Options||!t)return;let a=e&&e.oauthField?e.oauthField:null,r=e&&e.customFields?e.customFields:{},u=e&&e.dynamicFields?e.dynamicFields:[],T=e&&e.advancedFields?e.advancedFields:[],F=e&&e.ignoredAdvancedFields?e.ignoredAdvancedFields:[],w={destinationType:t,oauthField:a,custom:[],dynamic:[],advanced:[]};r&&Object.entries(r).forEach(([I,C],y)=>{let D=C.order??y;w.custom.push(M({order:900+D},C))});for(let I=0;I<o.Options.length;I++){let C=o.Options[I];if(C.Deprecated)continue;let y=u.find(D=>D===C.Name||C.Aliases?.includes(D.name)||D.name===C.Name);if(y){let D=C.Aliases?.indexOf(y.name)??-1,$=C.Aliases&&D>-1?C.Aliases[D]:C.Name,N=y&&typeof y!="string",Te=N?y?.defaultValue??C.DefaultValue:C.DefaultValue,Se=N&&y?.order!==void 0?y.order:I,U={name:$,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,order:900+Se},he=N?M(M({},U),y):U;w.dynamic.push(he)}else{let D=C.Name;if(F.find(Z=>Z===D))continue;let N=T.find(Z=>Z===D||Z.name===D),Te=N&&typeof N!="string",Se=Te&&N?.order!==void 0?N.order:I,U={name:D,type:C.Type,shortDescription:C.ShortDescription??void 0,longDescription:C.LongDescription??void 0,options:C.ValidValues,defaultValue:C.DefaultValue,order:900+Se},he=Te?M(M({},U),N):U;w.advanced.push(he)}}w.custom.sort((I,C)=>I.order-C.order),w.dynamic.sort((I,C)=>I.order-C.order),w.advanced.sort((I,C)=>I.order-C.order),this.destinationFormConfig.set(w);let k=this.targetUrl();if(!k)return;let v=Ye(k);v&&this.destinationForm.set({custom:v.custom,dynamic:v.dynamic,advanced:v.advanced})});destinationFormEffect=W(()=>{let t=this.#i,e=this.destinationForm();if(!e||!t)return;let i=Ze({destinationType:t,custom:e.custom,dynamic:e.dynamic,advanced:e.advanced});i&&this.targetUrl.set(i)});getFieldValue(t,e){let o=this.destinationForm()[t][e];return o||null}getFormView(t,e){let o=this.destinationFormConfig()?.[t].find(a=>a.name===e);return o||null}getDefaultFormView(t){return{name:t,type:"String",shortDescription:t,longDescription:$localize`This is an undocumented option.`}}getFieldGroup(t,e){return t[e]}hasLeadingSlash(t){return t?.startsWith("/")??!1}addAdvancedOption(t){let e=this.destinationForm();e.advanced[t.name]=t.defaultValue,this.destinationForm.set(M({},e))}isValidBucketname(t){if(!t)return!1;let e=t.length;return!(e<3||e>63||!/^[a-z0-9.-]+$/.test(t)||!/^[a-z0-9]/.test(t)||!/[a-z0-9]$/.test(t)||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)||/(\.\.)|(\.-)|(-\.)/.test(t))}isValidHostname(t){if(!t||t.length>253)return!1;let e=t.split(".");for(let i of e)if(!i||i.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(i))return!1;return!0}isTrue(t){if(typeof t=="boolean")return t;if(typeof t=="string"){let e=t.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}onKeyDown(t,e,i,o){if(i==="Hostname"||i==="Bucketname"){if(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Home","End"].includes(o.key))return;if(o.key=="/"||o.key=="\\"||o.key==":"){o.preventDefault();return}}}updateFieldValue(t,e,i){let o=this.destinationForm();o[t][e]=i,this.destinationForm.set(M({},o))}removeAdvancedOption(t){let e=this.destinationForm();delete e.advanced[t],this.destinationForm.set(M({},e))}mapOptions(t){let e=t.loadOptions;if(e)return e(this.injector)();let i=t.options;return i?i.map(o=>({key:o,value:o})):null}mapOptionsWithFreeText(t,e){let i=this.mapOptions(t);return i?(e&&e.length>0&&(i.find(a=>a.value===e)||i.push({key:e,value:e})),i):null}#o=b(!1);oauthStartTokenCreation(t,e,i,o){this.#o.set(!0);let a=(o??1)==2?this.#e.defaultOAuthUrlV2():this.#e.defaultOAuthUrl(),r=this.#n.serverSettings()?.["--oauth-url"];if(r&&r.length>0&&(a=r),this.useBackupState()){let C=this.#t.mapFormsToSettings().find(y=>y.Name==="--oauth-url")?.Value;C&&C.length>0&&(a=C)}let u=this.destinationForm().advanced["oauth-url"];u&&u.length>0&&(a=u);let T=`${a}?type=${t}`,F=450,w=600,k=screen.width/2-F/2,v=screen.height/2-w/2,I=window.open(T,"_blank","height="+w+",width="+F+",menubar=0,status=0,titlebar=0,toolbar=0,left="+k+",top="+v);return window.addEventListener("message",C=>{let y=C.data.startsWith("authid:"),D=y?C.data.replace("authid:",""):null;y&&(this.destinationForm.update($=>($[e][i]=D,$)),this.#o.set(!1),I?.close())}),!1}settingsAsText=P(()=>{let t=this.destinationForm().advanced;return Object.entries(t).map(([e,i])=>{let o=e??"",a="";return typeof i=="boolean"?a=this.isTrue(i)?"True":"False":(typeof i=="number"||i!=null)&&(a=i.toString()),`${o}=${a}`}).join(`
|
|
7
|
+
`)});updateSettingsFromText(t){if(typeof t!="string")return;let e=et(t);this.destinationForm.update(i=>Y(M({},i),{advanced:e}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ne({type:n,selectors:[["app-single-destination"]],inputs:{targetUrl:[1,"targetUrl"],useBackupState:[1,"useBackupState"]},outputs:{targetUrl:"targetUrlChange"},decls:3,vars:3,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let i;i=$localize` Add advanced option ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize`This field is mandatory`;let a;a=$localize`This field is mandatory`;let r;r=$localize`This field is mandatory`;let u;u=$localize`An empty path means storing data in the initial or root folder, which is not recommended`;let T;T=$localize`Hostname is invalid`;let F;F=$localize`Bucket name is invalid`;let w;w=$localize`This field is mandatory`;let k;k=$localize`This field is mandatory`;let v;v=$localize`This field is mandatory`;let I;I=$localize`This field is mandatory`;let C;C=$localize`This field is mandatory`;let y;y=$localize`This field is mandatory`;let D;D=$localize`This field is mandatory`;let $;return $=$localize`This field is mandatory`,[["fieldTemplate",""],["option",""],["enumOptionTemplate",""],["nonValidatedOptionTemplate",""],["optionTemplate",""],t,e,i,[1,"advanced-options",3,"disallowToggle"],["title",""],["shButton","","type","button",1,"outlined","small"],[1,"actions"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["shButton","","type","button",1,"outlined","small",3,"disabled"],["menu",""],["type","button"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["type","button",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"field-row"],[3,"startingPath","accepts","showFiles","hideShortcuts","showHiddenNodes","selectFiles"],[3,"hideShortcuts","enableCreateFolder","startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised",3,"active"],[3,"ngModel","customId","placeholder"],["shButton","","type","button",1,"outlined"],[3,"for"],["shTooltip",o],[1,"primary",3,"shTooltip"],["type","text",3,"ngModelChange","id","ngModel"],["shTooltip",a],["shTooltip",r],["shTooltip",u,1,"warn"],["shTooltip",T,1,"error"],["shTooltip",F,1,"warn"],[3,"keydown","ngModelChange","type","id","ngModel"],["prefix","",3,"error","warn","shTooltip"],["prefix",""],["prefix","",3,"shTooltip"],["shTooltip",w],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["label","key","value","value",3,"options","isClearable","optionTemplate"],["shTooltip",k],[1,"indeterminate","primary"],["label","key","value","value",3,"options","asFreeText","inlineSearch","optionTemplate"],["shTooltip",v],[3,"ngModelChange","inputType","ngModel","customId"],["shTooltip",I],["shTooltip",C],["type","number",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"click"],["key","key","value","value",1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["shTooltip",y],["type","text","id","text",3,"ngModelChange","ngModel"],["shTooltip",D],[3,"ngModelChange","ngModel","customId","placeholder"],["shTooltip",$],["shButton","","type","button",1,"outlined",3,"click"]]},template:function(e,i){if(e&1&&(L(0)(1),g(2,Mn,16,5)),e&2){let o=O(i.destinationType());l();let a=O(i.destinationFormConfig());l(),f(o&&a?2:-1)}},dependencies:[Be,de,ke,ce,me,pe,Ge,tt,nt,ot,fe,Ke,Ce,ue,He,Ue,Xe,qe,je,Je],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.advanced-options[_ngcontent-%COMP%]{position:relative;z-index:1}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}label[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.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}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{at as a,ge as b,rt as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-KAAYNQ7L.js";import"./chunk-ZBVBVQO7.js";import"./chunk-C6F6FP4R.js";import"./chunk-A5LNLNWR.js";import"./chunk-72HORZFV.js";import"./chunk-XLDVUBTQ.js";import"./chunk-QF4DQYEP.js";import"./chunk-2QJVTZ56.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as OptionsListComponent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Te}from"./chunk-
|
|
1
|
+
import{a as Te}from"./chunk-KAAYNQ7L.js";import"./chunk-ZBVBVQO7.js";import"./chunk-C6F6FP4R.js";import{a as Me}from"./chunk-VXRNST6C.js";import{h as A}from"./chunk-BQJICFF5.js";import"./chunk-A5LNLNWR.js";import{a as Se}from"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import{b as O}from"./chunk-Z27IQRKV.js";import{a as Ee}from"./chunk-GYDI67IZ.js";import"./chunk-4NBLWONL.js";import"./chunk-CCKT2GLS.js";import"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-XLDVUBTQ.js";import"./chunk-LN26XMBJ.js";import"./chunk-7LYN2XHO.js";import"./chunk-GCCJSS4C.js";import{b as j,d as q,e as Q}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as de,F as Ce,G as ce,K as ue,O as pe,c as Y,e as Z,f as ee,j as te,n as ne,o as ie,p as oe,q as ae,r as re,s as le,t as se,u as me,z as _e}from"./chunk-QF4DQYEP.js";import{g as Ne,h as ge}from"./chunk-2QJVTZ56.js";import"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import{$b as M,Ab as B,Ac as z,Bb as G,Bc as H,Cb as p,Db as a,Eb as n,Fb as r,Jb as f,Kb as F,Mb as y,Rc as W,Sa as m,Tb as g,Ub as E,Vb as c,Wb as v,Xb as U,Zb as x,_ as C,cb as R,ea as S,fa as T,kc as w,pa as D,sc as K,tc as J,uc as X,xb as $,yb as b,zb as k,zc as V}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var fe=()=>["backup"];function Fe(l,t){l&1&&r(0,"sh-progress-bar",12)}function Oe(l,t){if(l&1&&(a(0,"sh-form-field"),r(1,"input",32),n()),l&2){let e=t.$implicit,s=t.$index;m(),p("id",V("filter-",s))("formControl",e)}}function Ae(l,t){if(l&1){let e=y();a(0,"form",13)(1,"sh-select",14)(2,"label",15),c(3,1),n(),r(4,"input",16),n(),a(5,"sh-form-field")(6,"label",17),c(7,2),n(),r(8,"textarea",18),n(),a(9,"sh-form-field")(10,"label",19),c(11,3),n(),r(12,"textarea",20),n()(),a(13,"sh-divider"),c(14,4),n(),a(15,"form",13)(16,"sh-form-field")(17,"label",21),c(18,5),n(),r(19,"input",22),n(),a(20,"sh-form-field")(21,"label",23),c(22,6),n(),r(23,"input",24),n(),a(24,"app-toggle-card",25),f(25,26),c(26,7),F(),f(27,27),B(28,Oe,2,3,"sh-form-field",null,k),F(),n()(),a(30,"p"),g(31,8),r(32,"a",28),E(),n(),a(33,"app-options-list",29),X("optionsChange",function(o){S(e);let u=M();return J(u.settings,o)||(u.settings=o),T(o)}),n(),a(34,"div",30)(35,"button",31),x("click",function(){S(e);let o=M();return T(o.submit())}),g(36,9),r(37,"sh-icon"),E(),n()()}if(l&2){let e=M();p("formGroup",e.baseCmdForm),m(),p("options",e.commandOptions()??H(10,fe))("inlineSearch",!0),m(14),p("formGroup",e.standardFields),m(9),p("disallowToggle",!0),m(4),G(e.standardFields.controls.filters.controls),m(5),K("options",e.settings),p("hasFreeTextSettings",!0),m(2),w("loader",e.isSubmitting()),m(2),v(e.baseCmdForm.value.command),U(36)}}var _=new re,P=class l{#e=C(A);#t=C(ge);#n=C(q);#i=C(j);#o=C(Ne);#a=C(Ee);#s=C(_e);#r=O(this.#i.params);commandOptions=O(this.#o.getApiV1Commandline());isSubmitting=D(!1);optionsFields=this.#e.optionsFields;standardFields=_.group({"backup-id":_.control(""),"backup-name":_.control(""),dbpath:_.control(""),filters:_.array([])});baseCmdForm=_.group({command:_.control("backup"),targetUrl:_.control(""),arguments:_.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#m=W(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#t.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup)),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(_.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#a.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.baseCmdForm.value,e=t.targetUrl??"",s=t.arguments?.split(`
|
|
2
2
|
`).filter(i=>i.length>0)??[],o=this.standardFields.value,u=o.filters??[],N=[t.command,e,...s,`--backup-name=${o["backup-name"]}`,`--dbpath=${o.dbpath}`,`--backup-id=${o["backup-id"]}`,...u.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>`${i.Name.startsWith("--")?"":"--"}${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#t.postApiV1Commandline({requestBody:N}).subscribe(i=>{i.Status==="OK"&&this.#n.navigate(["backup",this.backupId(),"commandline",i.ID])})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
|
|
3
3
|
`)??""})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=R({type:l,selectors:[["app-commandline"]],features:[z([A])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`Command`;let s;s=$localize`TargetUrl`;let o;o=$localize`Commandline Arguments`;let u;u=$localize`Advanced options`;let N;N=$localize`Backup ID`;let i;i=$localize`Backup Name`;let I;I=$localize`Filters`;let h;h=$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#32\uFFFD"}:START_LINK:Read more${"\uFFFD/#32\uFFFD"}:CLOSE_LINK:`;let L;return L=$localize`${"\uFFFD#37\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,s,o,u,N,i,I,h,L,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["id","arguments","autocomplete","off","formControlName","arguments"],["for","backup-id"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["id","backup-name","formControlName","backup-name"],[3,"disallowToggle"],["title",""],["content","","formGroupName","filters"],["href","#",1,"sh-primary"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,s){e&1&&(r(0,"app-status-bar"),a(1,"section")(2,"div",10)(3,"button",11),g(4,0),r(5,"sh-icon"),E(),n()(),$(6,Fe,1,0,"sh-progress-bar",12)(7,Ae,38,11),n()),e&2&&(m(6),b(s.finishedLoading()?7:6))},dependencies:[le,te,Y,Z,ee,Me,Te,Se,se,ne,ie,ae,oe,Q,ce,de,Ce,pe,ue,me],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}"],changeDetection:0})};export{P as default};
|