@duplicati/ngclient 0.0.210 → 0.0.211
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-DJJ3VITJ.js → chunk-2TGB7FK7.js} +1 -1
- package/{chunk-AQWULDGL.js → chunk-36J3WTHV.js} +1 -1
- package/{chunk-JIJGVYNW.js → chunk-3DFXRSFL.js} +1 -1
- package/{chunk-V43VAZTT.js → chunk-5MOLXRIQ.js} +1 -1
- package/{chunk-TDEVA3XM.js → chunk-5N2VOOTZ.js} +1 -1
- package/{chunk-LSIAE7ZL.js → chunk-64W3VKAP.js} +1 -1
- package/{chunk-NYX7YT7G.js → chunk-6FBNKISB.js} +1 -1
- package/{chunk-KXBEW3N2.js → chunk-7HXPIZN6.js} +1 -1
- package/{chunk-PRBKV7LX.js → chunk-A7BE7GAK.js} +1 -1
- package/{chunk-FG4GOBKA.js → chunk-ANLSBAWJ.js} +1 -1
- package/{chunk-IGEX5B3E.js → chunk-AXBVBB2B.js} +1 -1
- package/{chunk-PUBEHQ4W.js → chunk-BKEVAAWN.js} +1 -1
- package/{chunk-M3JOG5RD.js → chunk-CCUGG5E4.js} +1 -1
- package/{chunk-GVXQIOKE.js → chunk-COT66FJB.js} +1 -1
- package/chunk-CVTB53TL.js +1 -0
- package/{chunk-I2BAH6NC.js → chunk-DGPSGSEP.js} +1 -1
- package/{chunk-76USHURS.js → chunk-DV7RWC4G.js} +1 -1
- package/{chunk-I7U3XXJD.js → chunk-EGJL4XXZ.js} +1 -1
- package/chunk-FCVVFGU2.js +1 -0
- package/{chunk-DJAQY2GM.js → chunk-FXZ3K2FU.js} +1 -1
- package/{chunk-LP2DMTA7.js → chunk-GCFBX62M.js} +1 -1
- package/{chunk-XHUQYWAM.js → chunk-GSDHTV3P.js} +1 -1
- package/{chunk-LTVI3WYF.js → chunk-HDJL2F2F.js} +1 -1
- package/{chunk-DWFQAX4H.js → chunk-HUJGWHH6.js} +1 -1
- package/chunk-I7HI454U.js +1 -0
- package/chunk-IHB6NRMQ.js +1 -0
- package/chunk-IV3M3Q6B.js +1 -0
- package/{chunk-YE7IXREK.js → chunk-JTO22TJU.js} +1 -1
- package/{chunk-M7QNSQM2.js → chunk-KAZ3YMHR.js} +1 -1
- package/chunk-KEHA3UWS.js +1 -0
- package/{chunk-ZVTMKBV5.js → chunk-KQZRDX7C.js} +1 -1
- package/{chunk-UQLHXE6V.js → chunk-LIDIFLHF.js} +1 -1
- package/{chunk-IUJGDYFS.js → chunk-MI32HHLT.js} +1 -1
- package/{chunk-CKVJ36E5.js → chunk-MNK3XRJD.js} +1 -1
- package/{chunk-DMMZWQEZ.js → chunk-N35VE3MO.js} +1 -1
- package/{chunk-3ULPLOSF.js → chunk-NQIZGFSO.js} +1 -1
- package/{chunk-T3YMO3FB.js → chunk-PSRISEFO.js} +1 -1
- package/{chunk-BDC5JQVQ.js → chunk-SA6PEMWL.js} +1 -1
- package/{chunk-INI4AJEU.js → chunk-SP3KG7FO.js} +1 -1
- package/{chunk-VOJGEOOO.js → chunk-SSUCTZ3H.js} +1 -1
- package/{chunk-FKYRYVJD.js → chunk-UY2WEUKC.js} +1 -1
- package/{chunk-YF6ULZXZ.js → chunk-WBTDGQME.js} +1 -1
- package/{chunk-2FD4SR65.js → chunk-WSFAOFM3.js} +1 -1
- package/chunk-XE42CXGY.js +1 -0
- package/{chunk-23BFPX3M.js → chunk-XRSDTFDU.js} +1 -1
- package/{chunk-EVMEYZB7.js → chunk-YIKPWYEP.js} +1 -1
- package/{chunk-JFUWTLM7.js → chunk-YIM56S4M.js} +1 -1
- package/{chunk-S2F2BNOG.js → chunk-Z772CHAB.js} +1 -1
- package/{chunk-KNB7LCAL.js → chunk-ZVWTSTR6.js} +1 -1
- package/{chunk-FZQEPDIF.js → chunk-ZY64T3CX.js} +1 -1
- package/index.html +1 -1
- package/main-4RMOPKNF.js +1 -0
- package/package.json +1 -1
- package/chunk-562BU33Q.js +0 -1
- package/chunk-DKA7IP53.js +0 -1
- package/chunk-F3TYSZ53.js +0 -1
- package/chunk-I6Y22V2Q.js +0 -1
- package/chunk-MYHC4Y56.js +0 -1
- package/chunk-VUABEJRL.js +0 -1
- package/chunk-ZOOFKMMI.js +0 -1
- package/main-IO5OKXBW.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import{p as C}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-GSDHTV3P.js";import{a as G}from"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import{b as h}from"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{L as M,M as $,R as I}from"./chunk-YCLTQEU6.js";import{d as L}from"./chunk-2LSZ2I43.js";import{b as N,c as O,e as B,f as b}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as d,Bb as s,Bc as p,C as f,Cb as u,Db as r,Ra as n,Rb as c,Sb as _,Z as l,Zb as A,eb as D,lc as P,nc as E,qa as R,ub as T,vb as g,yc as k}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var y=(a,e)=>[a,e,"general"],U=(a,e)=>[a,e,"destination"],K=(a,e)=>[a,e,"source-data"],w=(a,e)=>[a,e,"schedule"],H=(a,e)=>[a,e,"options"];function J(a,e){if(a&1&&(s(0,"p"),P(1),u()),a&2){let t=A();n(),E("Editing: ",t.backupName())}}function X(a,e){a&1&&r(0,"sh-progress-bar",7)}function x(a,e){a&1&&(s(0,"section"),r(1,"router-outlet"),u())}var m=class a{#t=l(N);#e=l(C);#a=l(G);#i=l(L);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#o=h(this.#t.params);#n=h(this.#t.url);paramsChanged=R(()=>{let e=this.#o()?.id,t=!!this.#n()?.find(i=>i.path==="backup-draft");this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults()});getDefaults(){this.#i.getApiV1Backupdefaults().pipe(f(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(!0)}})}getBackup(e,t=!1){let i=o=>{this.#e.mapScheduleToForm(o.Schedule??null),o.Backup&&(this.#e.mapGeneralToForm(o.Backup),this.#e.mapDestinationToForm(o.Backup),this.#e.mapSourceDataToForm(o.Backup),this.#e.mapOptionsToForms(o.Backup),this.#e.storeMetadata(o.Backup,t)),this.#e.finishedLoading.set(!0)};if(t){this.isDraft.set(t);let o=this.#a.draftBackups().find(F=>F.id===e);if(!o){alert("Backup not found");return}i(o.data)}else this.#i.getApiV1BackupById({id:e}).subscribe({next:i})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=D({type:a,selectors:[["app-backup"]],features:[k([C])],decls:21,vars:22,consts:()=>{let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_RADIO: General `;let t;t=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_RADIO: Destination `;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_RADIO: Source Data `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_RADIO: Schedule `;let F;return F=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_RADIO:${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_RADIO: Options `,[e,t,i,o,F,[1,"primary"],["step","","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,i){t&1&&(r(0,"app-status-bar"),s(1,"header"),T(2,J,2,1,"p"),s(3,"sh-stepper",5)(4,"div",6),c(5,0),r(6,"sh-radio"),_(),u(),s(7,"div",6),c(8,1),r(9,"sh-radio"),_(),u(),s(10,"div",6),c(11,2),r(12,"sh-radio"),_(),u(),s(13,"div",6),c(14,3),r(15,"sh-radio"),_(),u(),s(16,"div",6),c(17,4),r(18,"sh-radio"),_(),u()()(),T(19,X,1,0,"sh-progress-bar",7)(20,x,2,0,"section")),t&2&&(n(2),g(i.isNew()?-1:2),n(2),d("routerLink",p(7,y,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(10,U,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(13,K,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(16,w,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),d("routerLink",p(19,H,i.isDraft()?"/backup-draft":"/backup",i.backupId())),n(3),g(i.finishedLoading()?20:19))},dependencies:[O,B,b,v,$,I,M],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"],changeDetection:0})};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as St}from"./chunk-GVXQIOKE.js";import"./chunk-W4HWOC3K.js";import"./chunk-JFUWTLM7.js";import"./chunk-CKVJ36E5.js";import{a as Ct,b as pt,c as mt,l as k,q as Tt}from"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{b as dt,c as ut,d as gt}from"./chunk-NXF5BMPG.js";import"./chunk-XHUQYWAM.js";import{a as ct}from"./chunk-YF6ULZXZ.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import{a as R}from"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{B as st,C as at,G as lt,H as rt,L as _t,c as Z,e as tt,i as et,s as nt,v as it,z as ot}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as E,Bb as a,Cb as _,Db as x,Kb as T,Pc as y,Ra as c,Rb as B,Sb as P,Tb as d,Ub as K,Vb as W,Wb as j,Wc as Y,Xb as m,Z as O,Zb as r,ca as u,da as g,eb as V,ec as Q,fc as q,ic as H,lc as D,mc as A,oa as f,qa as G,qc as M,rc as N,sc as $,ub as C,vb as p,wb as z,yb as J,zb as X}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";function Dt(n,e){n&1&&(a(0,"div",13),x(1,"sh-progress-bar",14),a(2,"div",15)(3,"h3"),d(4,2),_()()())}function ft(n,e){n&1&&(a(0,"sh-divider"),d(1,5),_())}function Et(n,e){if(n&1&&(a(0,"p",20),D(1),_()),n&2){let t=r().$implicit;c(),A(t.Description)}}function Ft(n,e){if(n&1&&(a(0,"p",20),D(1),_()),n&2){let t=r().$implicit,o=r(3);c(),A(o.getSimplePath(t.BaseUrl))}}function It(n,e){if(n&1){let t=T();a(0,"button",25),m("click",function(i){u(t);let s=r().$implicit,l=r(3);return g(l.updateBackupsSync(s,i))}),D(1," Update backups "),_()}if(n&2){let t=r(4);E("disabled",t.isSaving())}}function Nt(n,e){if(n&1){let t=T();a(0,"app-destination-list-item",18),m("click",function(){let i=u(t).$implicit,s=r(3);return g(s.selectDestination(i))}),a(1,"h3",19),D(2),_(),C(3,Et,2,1,"p",20)(4,Ft,2,1,"p",20),a(5,"div",21),C(6,It,2,1,"button",22),a(7,"button",23),m("click",function(i){let s=u(t).$implicit,l=r(3);return g(l.deleteDestination(s.ID,i))}),a(8,"sh-icon"),D(9,"trash"),_()(),a(10,"button",24),B(11,6),x(12,"sh-icon"),P(),_()()()}if(n&2){let t=e.$implicit,o=r(3);E("targetUrl",t.BaseUrl),c(2),A(t.Name||t.BaseUrl),c(),p(t.Description?3:4),c(3),p(o.isOutOfSync(t)?6:-1)}}function ht(n,e){if(n&1){let t=T();a(0,"sh-card",16),m("click",function(){u(t);let i=r(2);return g(i.selectDestination("new"))}),a(1,"sh-icon"),D(2,"plus-circle"),_(),a(3,"div",15)(4,"h3"),d(5,3),_(),a(6,"p"),d(7,4),_()()(),C(8,ft,2,0,"sh-divider"),J(9,Nt,13,4,"app-destination-list-item",17,z)}if(n&2){let t=r(2);c(8),p(t.destinations().length>0?8:-1),c(),X(t.destinations())}}function Ot(n,e){if(n&1&&(a(0,"h2"),d(1,1),_(),C(2,Dt,5,0,"div",13)(3,ht,11,1)),n&2){let t=r();c(2),p(t.isLoading()?2:3)}}function xt(n,e){n&1&&d(0,10,1)}function Bt(n,e){n&1&&d(0,10,2)}function Pt(n,e){n&1&&d(0,10,3)}function At(n,e){if(n&1){let t=T();a(0,"button",37),m("click",function(){u(t);let i=r(2);return g(i.testDestination())}),B(1,10),C(2,xt,1,0)(3,Bt,1,0)(4,Pt,1,0),P(),_()}if(n&2){let t,o=r(2);E("disabled",o.testSignal()=="testing"),c(2),p(o.testSignal()=="testing"?2:((t=o.testResponse())==null?null:t.action)==="success"?3:4)}}function Mt(n,e){if(n&1){let t=T();a(0,"div",32)(1,"sh-form-field")(2,"label"),d(3,11),_(),a(4,"input",38),$("ngModelChange",function(i){u(t);let s=r(2);return N(s.editName,i)||(s.editName=i),g(i)}),_()()()}if(n&2){let t=r(2);c(4),M("ngModel",t.editName)}}function $t(n,e){if(n&1){let t=T();a(0,"app-test-url",39,0),$("targetUrlChange",function(i){u(t);let s=r(2);return N(s.editBaseUrl,i)||(s.editBaseUrl=i),g(i)})("testSignalChange",function(i){u(t);let s=r(2);return N(s.testSignal,i)||(s.testSignal=i),g(i)}),_()}if(n&2){let t=r(2);M("targetUrl",t.editBaseUrl)("testSignal",t.testSignal),E("connectionStringId",t.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!0)("askToCreate",!0)("testExpectation","any")("moduleType","Backend")}}function yt(n,e){if(n&1){let t=T();a(0,"app-destination-list-item",40)(1,"button",41),m("click",function(){u(t);let i=r(2);return g(i.removeDestination())}),d(2,12),_()(),a(3,"app-single-destination",42),$("targetUrlChange",function(i){u(t);let s=r(2);return N(s.editBaseUrl,i)||(s.editBaseUrl=i),g(i)}),_()}if(n&2){let t=r(2);E("targetUrl",t.editBaseUrl()),c(3),M("targetUrl",t.editBaseUrl)}}function Rt(n,e){if(n&1){let t=T();a(0,"app-destination-list",43),m("setDestination",function(i){u(t);let s=r(2);return g(s.setDestination(i))}),_()}}function kt(n,e){n&1&&d(0,9,1)}function Lt(n,e){n&1&&d(0,9,2)}function bt(n,e){n&1&&d(0,9,3)}function wt(n,e){n&1&&d(0,9,4)}function vt(n,e){if(n&1){let t=T();a(0,"header",26)(1,"button",23),m("click",function(){u(t);let i=r();return g(i.cancelEdit())}),a(2,"sh-icon"),D(3,"arrow-left"),_()()(),a(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),d(8,7),_(),a(9,"div",30),C(10,At,5,2,"button",31),_()(),C(11,Mt,5,1,"div",32),C(12,$t,2,9,"app-test-url",33),C(13,yt,4,2)(14,Rt,1,0,"app-destination-list"),_(),a(15,"div",34)(16,"button",35),m("click",function(){u(t);let i=r();return g(i.cancelEdit())}),d(17,8),_(),a(18,"button",36),m("click",function(){let i;u(t);let s=r();return g(((i=s.testResponse())==null?null:i.action)==="success"||((i=s.testResponse())==null?null:i.action)==="missing-folder"||!s.isUrlChanged()?s.save():s.testDestination())}),B(19,9),C(20,kt,1,0)(21,Lt,1,0)(22,bt,1,0)(23,wt,1,0),P(),_()()()}if(n&2){let t,o,i,s,l=r();c(8),K(l.selectedDestination()==="new"?"New Destination":"Edit Destination"),W(8),c(2),p(l.editBaseUrl()?10:-1),c(),p(l.selectedDestination()!=="new"?11:-1),c(),p(l.editBaseUrl()?12:-1),c(),p(l.editBaseUrl()?13:14),c(5),H("primary",((t=l.testResponse())==null?null:t.action)==="success"||!l.isUrlChanged())("warn",l.isUrlChanged()&&l.testSignal()===null||l.testSignal()==="testing"||((o=l.testResponse())==null?null:o.action)==="missing-folder")("error",l.testResponse()&&((i=l.testResponse())==null?null:i.action)!=="success"&&((i=l.testResponse())==null?null:i.action)!=="missing-folder"),E("disabled",!l.editBaseUrl()||l.isSaving()||l.testSignal()==="testing"),c(2),p(l.isSaving()?20:l.testSignal()==="testing"?21:((s=l.testResponse())==null?null:s.action)==="success"||((s=l.testResponse())==null?null:s.action)==="missing-folder"||!l.isUrlChanged()?22:23)}}var L=class n{#t=O(Ct);#e=O(ct);#n=O(ot);getSimplePath=dt;backups=this.#e.backups;constructor(){this.#e.getBackups()}isSaving=this.#t.isSaving;destinations=this.#t.destinations;isLoading=this.#t.resourceDestinations.isLoading;testUrl=Y(k);selectedDestination=f(null);selectedDestinationId=y(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=f(null);editDescription=f(null);editBaseUrl=f(null);initialBaseUrl=f(null);isUrlChanged=y(()=>{let e=this.editBaseUrl(),t=this.initialBaseUrl();return this.selectedDestination()==="new"?!0:e!==t});testSignal=f(null);testResponse=y(()=>{let e=this.testSignal();return e&&typeof e!="string"?e:null});getOutOfSyncBackupIds(e){if(!e.Backups)return[];let t=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return e.Backups.filter(o=>{let i=t.get(o.ID);return i&&i.TargetURL!==e.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(e){return this.getOutOfSyncBackupIds(e).length>0}#i=G(()=>{this.editBaseUrl(),this.testSignal.set(null)});selectDestination(e){this.selectedDestination.set(e),this.testSignal.set(null),e==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(e.Name),this.editDescription.set(e.Description),this.editBaseUrl.set(e.BaseUrl),this.initialBaseUrl.set(e.BaseUrl),this.#t.getById(e.ID).subscribe(t=>{t.Data&&(this.editName.set(t.Data.Name),this.editDescription.set(t.Data.Description),this.editBaseUrl.set(t.Data.BaseUrl??null),this.initialBaseUrl.set(t.Data.BaseUrl??null))}))}cancelEdit(){this.selectedDestination.set(null)}setDestination(e){let t=gt(e??"");if(t){if(t.mapper.default){let o=t.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${e}://`)}}removeDestination(){this.editBaseUrl.set(null)}async testDestination(){(await this.testUrl()?.testDestination(!1))?.action==="missing-folder"&&this.promptCreateFolder()}promptCreateFolder(){this.#n.open(R,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:e=>{e&&this.testUrl()?.createFolder()}})}save(){let e=this.selectedDestination();e&&this.performSave(e)}performSave(e){let t=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(e==="new"){let I=ut(i??"")?.displayName??"Destination",h=this.destinations().filter(F=>F.Name?.startsWith(I)).length;t=`${I} #${h+1}`,o=null}let s={Name:t,Description:o,BaseUrl:i};this.#t.save(e,s).subscribe(()=>{this.selectedDestination.set(null),this.#t.reload(),this.#e.getBackups(!0)})}updateBackupsSync(e,t){t.stopPropagation();let o=this.getOutOfSyncBackupIds(e);this.#n.open(R,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#t.updateBackups(e.ID,o).subscribe(()=>{this.#t.reload(),this.#e.getBackups(!0)})}})}deleteDestination(e,t){t.stopPropagation(),this.#n.open(R,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#t.delete(e).subscribe(()=>{this.#t.reload()})}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["app-destinations"]],viewQuery:function(t,o){t&1&&Q(o.testUrl,k,5),t&2&&q()},decls:4,vars:1,consts:()=>{let e;e=$localize`Destinations`;let t;t=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let s;s=$localize`Or manage your saved destinations`;let l;l=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let h;h=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=j(F);let b;b=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let v;v=$localize`Name`;let U;return U=$localize`Change`,[["testUrl",""],e,t,o,i,s,l,I,h,F,b,v,U,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","variant","ghost","type","button",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button","variant","ghost",1,"small",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button","variant","ghost",1,"small",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button","variant","ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(t,o){t&1&&(x(0,"app-status-bar"),a(1,"section"),C(2,Ot,4,1)(3,vt,24,13),_()),t&2&&(c(2),p(o.selectedDestination()===null?2:3))},dependencies:[pt,mt,Tt,St,_t,st,it,at,rt,lt,k,nt,Z,tt,et],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0})};export{L as default};
|
|
1
|
+
import{a as St}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import{a as Ct,b as pt,c as mt,l as k,q as Tt}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{b as dt,c as ut,d as gt}from"./chunk-NXF5BMPG.js";import"./chunk-GSDHTV3P.js";import{a as ct}from"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import{a as R}from"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as st,C as at,G as lt,H as rt,L as _t,c as Z,e as tt,i as et,s as nt,v as it,z as ot}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as E,Bb as a,Cb as _,Db as x,Kb as T,Pc as y,Ra as c,Rb as B,Sb as P,Tb as d,Ub as K,Vb as W,Wb as j,Wc as Y,Xb as m,Z as O,Zb as r,ca as u,da as g,eb as V,ec as Q,fc as q,ic as H,lc as D,mc as A,oa as f,qa as G,qc as M,rc as N,sc as $,ub as C,vb as p,wb as z,yb as J,zb as X}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";function Dt(n,e){n&1&&(a(0,"div",13),x(1,"sh-progress-bar",14),a(2,"div",15)(3,"h3"),d(4,2),_()()())}function ft(n,e){n&1&&(a(0,"sh-divider"),d(1,5),_())}function Et(n,e){if(n&1&&(a(0,"p",20),D(1),_()),n&2){let t=r().$implicit;c(),A(t.Description)}}function Ft(n,e){if(n&1&&(a(0,"p",20),D(1),_()),n&2){let t=r().$implicit,o=r(3);c(),A(o.getSimplePath(t.BaseUrl))}}function It(n,e){if(n&1){let t=T();a(0,"button",25),m("click",function(i){u(t);let s=r().$implicit,l=r(3);return g(l.updateBackupsSync(s,i))}),D(1," Update backups "),_()}if(n&2){let t=r(4);E("disabled",t.isSaving())}}function Nt(n,e){if(n&1){let t=T();a(0,"app-destination-list-item",18),m("click",function(){let i=u(t).$implicit,s=r(3);return g(s.selectDestination(i))}),a(1,"h3",19),D(2),_(),C(3,Et,2,1,"p",20)(4,Ft,2,1,"p",20),a(5,"div",21),C(6,It,2,1,"button",22),a(7,"button",23),m("click",function(i){let s=u(t).$implicit,l=r(3);return g(l.deleteDestination(s.ID,i))}),a(8,"sh-icon"),D(9,"trash"),_()(),a(10,"button",24),B(11,6),x(12,"sh-icon"),P(),_()()()}if(n&2){let t=e.$implicit,o=r(3);E("targetUrl",t.BaseUrl),c(2),A(t.Name||t.BaseUrl),c(),p(t.Description?3:4),c(3),p(o.isOutOfSync(t)?6:-1)}}function ht(n,e){if(n&1){let t=T();a(0,"sh-card",16),m("click",function(){u(t);let i=r(2);return g(i.selectDestination("new"))}),a(1,"sh-icon"),D(2,"plus-circle"),_(),a(3,"div",15)(4,"h3"),d(5,3),_(),a(6,"p"),d(7,4),_()()(),C(8,ft,2,0,"sh-divider"),J(9,Nt,13,4,"app-destination-list-item",17,z)}if(n&2){let t=r(2);c(8),p(t.destinations().length>0?8:-1),c(),X(t.destinations())}}function Ot(n,e){if(n&1&&(a(0,"h2"),d(1,1),_(),C(2,Dt,5,0,"div",13)(3,ht,11,1)),n&2){let t=r();c(2),p(t.isLoading()?2:3)}}function xt(n,e){n&1&&d(0,10,1)}function Bt(n,e){n&1&&d(0,10,2)}function Pt(n,e){n&1&&d(0,10,3)}function At(n,e){if(n&1){let t=T();a(0,"button",37),m("click",function(){u(t);let i=r(2);return g(i.testDestination())}),B(1,10),C(2,xt,1,0)(3,Bt,1,0)(4,Pt,1,0),P(),_()}if(n&2){let t,o=r(2);E("disabled",o.testSignal()=="testing"),c(2),p(o.testSignal()=="testing"?2:((t=o.testResponse())==null?null:t.action)==="success"?3:4)}}function Mt(n,e){if(n&1){let t=T();a(0,"div",32)(1,"sh-form-field")(2,"label"),d(3,11),_(),a(4,"input",38),$("ngModelChange",function(i){u(t);let s=r(2);return N(s.editName,i)||(s.editName=i),g(i)}),_()()()}if(n&2){let t=r(2);c(4),M("ngModel",t.editName)}}function $t(n,e){if(n&1){let t=T();a(0,"app-test-url",39,0),$("targetUrlChange",function(i){u(t);let s=r(2);return N(s.editBaseUrl,i)||(s.editBaseUrl=i),g(i)})("testSignalChange",function(i){u(t);let s=r(2);return N(s.testSignal,i)||(s.testSignal=i),g(i)}),_()}if(n&2){let t=r(2);M("targetUrl",t.editBaseUrl)("testSignal",t.testSignal),E("connectionStringId",t.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!0)("askToCreate",!0)("testExpectation","any")("moduleType","Backend")}}function yt(n,e){if(n&1){let t=T();a(0,"app-destination-list-item",40)(1,"button",41),m("click",function(){u(t);let i=r(2);return g(i.removeDestination())}),d(2,12),_()(),a(3,"app-single-destination",42),$("targetUrlChange",function(i){u(t);let s=r(2);return N(s.editBaseUrl,i)||(s.editBaseUrl=i),g(i)}),_()}if(n&2){let t=r(2);E("targetUrl",t.editBaseUrl()),c(3),M("targetUrl",t.editBaseUrl)}}function Rt(n,e){if(n&1){let t=T();a(0,"app-destination-list",43),m("setDestination",function(i){u(t);let s=r(2);return g(s.setDestination(i))}),_()}}function kt(n,e){n&1&&d(0,9,1)}function Lt(n,e){n&1&&d(0,9,2)}function bt(n,e){n&1&&d(0,9,3)}function wt(n,e){n&1&&d(0,9,4)}function vt(n,e){if(n&1){let t=T();a(0,"header",26)(1,"button",23),m("click",function(){u(t);let i=r();return g(i.cancelEdit())}),a(2,"sh-icon"),D(3,"arrow-left"),_()()(),a(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),d(8,7),_(),a(9,"div",30),C(10,At,5,2,"button",31),_()(),C(11,Mt,5,1,"div",32),C(12,$t,2,9,"app-test-url",33),C(13,yt,4,2)(14,Rt,1,0,"app-destination-list"),_(),a(15,"div",34)(16,"button",35),m("click",function(){u(t);let i=r();return g(i.cancelEdit())}),d(17,8),_(),a(18,"button",36),m("click",function(){let i;u(t);let s=r();return g(((i=s.testResponse())==null?null:i.action)==="success"||((i=s.testResponse())==null?null:i.action)==="missing-folder"||!s.isUrlChanged()?s.save():s.testDestination())}),B(19,9),C(20,kt,1,0)(21,Lt,1,0)(22,bt,1,0)(23,wt,1,0),P(),_()()()}if(n&2){let t,o,i,s,l=r();c(8),K(l.selectedDestination()==="new"?"New Destination":"Edit Destination"),W(8),c(2),p(l.editBaseUrl()?10:-1),c(),p(l.selectedDestination()!=="new"?11:-1),c(),p(l.editBaseUrl()?12:-1),c(),p(l.editBaseUrl()?13:14),c(5),H("primary",((t=l.testResponse())==null?null:t.action)==="success"||!l.isUrlChanged())("warn",l.isUrlChanged()&&l.testSignal()===null||l.testSignal()==="testing"||((o=l.testResponse())==null?null:o.action)==="missing-folder")("error",l.testResponse()&&((i=l.testResponse())==null?null:i.action)!=="success"&&((i=l.testResponse())==null?null:i.action)!=="missing-folder"),E("disabled",!l.editBaseUrl()||l.isSaving()||l.testSignal()==="testing"),c(2),p(l.isSaving()?20:l.testSignal()==="testing"?21:((s=l.testResponse())==null?null:s.action)==="success"||((s=l.testResponse())==null?null:s.action)==="missing-folder"||!l.isUrlChanged()?22:23)}}var L=class n{#t=O(Ct);#e=O(ct);#n=O(ot);getSimplePath=dt;backups=this.#e.backups;constructor(){this.#e.getBackups()}isSaving=this.#t.isSaving;destinations=this.#t.destinations;isLoading=this.#t.resourceDestinations.isLoading;testUrl=Y(k);selectedDestination=f(null);selectedDestinationId=y(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=f(null);editDescription=f(null);editBaseUrl=f(null);initialBaseUrl=f(null);isUrlChanged=y(()=>{let e=this.editBaseUrl(),t=this.initialBaseUrl();return this.selectedDestination()==="new"?!0:e!==t});testSignal=f(null);testResponse=y(()=>{let e=this.testSignal();return e&&typeof e!="string"?e:null});getOutOfSyncBackupIds(e){if(!e.Backups)return[];let t=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return e.Backups.filter(o=>{let i=t.get(o.ID);return i&&i.TargetURL!==e.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(e){return this.getOutOfSyncBackupIds(e).length>0}#i=G(()=>{this.editBaseUrl(),this.testSignal.set(null)});selectDestination(e){this.selectedDestination.set(e),this.testSignal.set(null),e==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(e.Name),this.editDescription.set(e.Description),this.editBaseUrl.set(e.BaseUrl),this.initialBaseUrl.set(e.BaseUrl),this.#t.getById(e.ID).subscribe(t=>{t.Data&&(this.editName.set(t.Data.Name),this.editDescription.set(t.Data.Description),this.editBaseUrl.set(t.Data.BaseUrl??null),this.initialBaseUrl.set(t.Data.BaseUrl??null))}))}cancelEdit(){this.selectedDestination.set(null)}setDestination(e){let t=gt(e??"");if(t){if(t.mapper.default){let o=t.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${e}://`)}}removeDestination(){this.editBaseUrl.set(null)}async testDestination(){(await this.testUrl()?.testDestination(!1))?.action==="missing-folder"&&this.promptCreateFolder()}promptCreateFolder(){this.#n.open(R,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:e=>{e&&this.testUrl()?.createFolder()}})}save(){let e=this.selectedDestination();e&&this.performSave(e)}performSave(e){let t=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(e==="new"){let I=ut(i??"")?.displayName??"Destination",h=this.destinations().filter(F=>F.Name?.startsWith(I)).length;t=`${I} #${h+1}`,o=null}let s={Name:t,Description:o,BaseUrl:i};this.#t.save(e,s).subscribe(()=>{this.selectedDestination.set(null),this.#t.reload(),this.#e.getBackups(!0)})}updateBackupsSync(e,t){t.stopPropagation();let o=this.getOutOfSyncBackupIds(e);this.#n.open(R,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#t.updateBackups(e.ID,o).subscribe(()=>{this.#t.reload(),this.#e.getBackups(!0)})}})}deleteDestination(e,t){t.stopPropagation(),this.#n.open(R,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#t.delete(e).subscribe(()=>{this.#t.reload()})}})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["app-destinations"]],viewQuery:function(t,o){t&1&&Q(o.testUrl,k,5),t&2&&q()},decls:4,vars:1,consts:()=>{let e;e=$localize`Destinations`;let t;t=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let s;s=$localize`Or manage your saved destinations`;let l;l=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let h;h=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=j(F);let b;b=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let v;v=$localize`Name`;let U;return U=$localize`Change`,[["testUrl",""],e,t,o,i,s,l,I,h,F,b,v,U,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","variant","ghost","type","button",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button","variant","ghost",1,"small",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button","variant","ghost",1,"small",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button","variant","ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(t,o){t&1&&(x(0,"app-status-bar"),a(1,"section"),C(2,Ot,4,1)(3,vt,24,13),_()),t&2&&(c(2),p(o.selectedDestination()===null?2:3))},dependencies:[pt,mt,Tt,St,_t,st,it,at,rt,lt,k,nt,Z,tt,et],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0})};export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as d}from"./chunk-AYOFR344.js";import{a as u,b as E}from"./chunk-
|
|
1
|
+
import{b as d}from"./chunk-AYOFR344.js";import{a as u,b as E}from"./chunk-HDJL2F2F.js";import{d as p}from"./chunk-2LSZ2I43.js";import{Pc as o,U as v,Z as s,oa as h,qa as l,z as g}from"./chunk-ERITO7WM.js";import{a as i}from"./chunk-7CGTOI24.js";var A="shown-welcome-page-v1",_="hide-console-connection-status",f="disable-console-control",C="disable-tray-icon-login",S="server-listen-interface",O="allowed-hostnames",b="server-passphrase",R="update-channel",T="startup-delay",D="usage-reporter-level",N="power-mode-provider",m=class n{#t=s(p);#r=s(u);#s=s(E);#n=d(this.#t.getApiV1Serversettings());#e=h(void 0);serverSettings=o(()=>this.#e()||this.#n());#o=l(()=>{let e=this.#r.serverSettings();e&&this.#e.set(e)});constructor(){this.#r.subscribe("serversettings")}isConsoleConnectionStatusHidden=o(()=>{let e=this.serverSettings();return e?e[_]==="True":!1});refreshServerSettings(){this.#s.getConnectionMethod()!=="websocket"&&this.#t.getApiV1Serversettings().subscribe({next:e=>{this.#e.set(e)}})}#i(e,t){var r=i({},e);for(let[a,c]of Object.entries(t))c===null?delete r[a]:r[a]=c;return r}patchServerSettings(e){let t=i({},this.serverSettings());return this.#e.set(this.#i(this.serverSettings()??{},e)),this.#t.patchApiV1Serversettings({requestBody:e}).pipe(g(r=>{throw this.#e.set(t),r}))}patchServerSetting(e,t){let r={};return r[e]=t,this.patchServerSettings(r)}setShownWelcomePage(){return this.patchServerSetting(A,"true")}setHideConsoleConnectionStatus(e){return this.patchServerSetting(_,e?"True":"False")}setDisableTrayIconLogin(e){return this.patchServerSetting(C,e?"True":"False")}setDisableConsoleControl(e){return this.patchServerSetting(f,e?"True":"False")}setRemoteAccessInterface(e){return this.patchServerSetting(S,e)}setRemoteAccessAllowedHostnames(e){var t={[O]:e};return this.serverSettings()?.[S]==="loopback"&&(t[S]="any"),this.patchServerSettings(t)}setRemoteAccessPassword(e){return this.patchServerSetting(b,e)}setUpdateChannel(e){return this.patchServerSetting(R,e)}setStartupDelay(e){return this.patchServerSetting(T,e)}setUsageReporterLevel(e){return this.patchServerSetting(D,e)}setPowerModeProvider(e){return this.patchServerSetting(N,e)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"})};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-6Q6SSTBK.js";import{a as r}from"./chunk-HUJGWHH6.js";import{b as B}from"./chunk-HDJL2F2F.js";import{a as k}from"./chunk-BEXYTIOL.js";import{d as b}from"./chunk-2LSZ2I43.js";import{C as i,E as u,M as c,Pc as d,U as o,Z as s,oa as a,qa as p}from"./chunk-ERITO7WM.js";var y="backupListOrderBy",v="backupListShowActualTimes",D=[{value:"id",label:$localize`Backup ID`},{value:"name",label:$localize`Backup name`},{value:"lastrun",label:$localize`Last run time`},{value:"nextrun",label:$localize`Next run time`},{value:"schedule",label:$localize`Is scheduled`},{value:"backend",label:$localize`Destination type`},{value:"sourcesize",label:$localize`Source size`},{value:"destinationsize",label:$localize`Destination size`},{value:"duration",label:$localize`Duration`},{value:"-id",label:$localize`Backup ID (descending)`},{value:"-name",label:$localize`Backup name (descending)`},{value:"-lastrun",label:$localize`Last run time (descending)`},{value:"-nextrun",label:$localize`Next run time (descending)`},{value:"-schedule",label:$localize`Is scheduled (descending)`},{value:"-backend",label:$localize`Destination type (descending)`},{value:"-sourcesize",label:$localize`Source size (descending)`},{value:"-destinationsize",label:$localize`Destination size (descending)`},{value:"-duration",label:$localize`Duration (descending)`}],g=class l{#s=s(b);#o=s(k);#e=s(B);#u=null;#t=a([]);#a=a([]);#l=a(!1);#n=a(null);#p=a(null);#c=r(v,"relative");#i=r(y,"id");orderByOptions=a(D);orderBy=this.#i.asReadonly();backups=this.#a.asReadonly();timeType=this.#c.asReadonly();backupsLoading=this.#l.asReadonly();startingBackup=this.#n.asReadonly();deletingBackup=this.#p.asReadonly();draftBackups=this.#t.asReadonly();#r=d(()=>this.#o.hasBackupListSubscribeOption()&&this.#e.getConnectionMethod()==="websocket");#d=p(()=>{let e=this.#e.backupListState();e&&this.#a.set(e)});addDraftBackup(e){let t=m();return this.#t.set([...this.#t(),{id:t,data:e}]),t}setOrderBy(e){this.#i.set(e),this.#e.isConnectionMethodSet()&&(this.#r()?this.#e.subscribe("backuplist",e):this.getBackups(!0))}setTimeType(e){this.#c.set(e)}removeDraftBackupById(e){this.#t.set(this.#t().filter(t=>t.id!==e))}getBackupById(e){return this.#a().find(t=>t.Backup?.ID===e)??null}getBackups(e=!1){if(!this.#e.isConnectionMethodSet())return;if(this.#r()){this.#e.subscribe("backuplist",this.#i());return}let t=this.#u,n=Date.now(),h=t&&n-t<900*1e3;t&&n-t<100||!e&&h&&this.#a().length||(this.#u=n,this.#l.set(!0),this.#s.getApiV1Backups({orderBy:this.#i()}).pipe(i(1),c(f=>this.#a.set(f)),u(()=>this.#l.set(!1))).subscribe())}startBackup(e){this.#n.set(e),this.#s.postApiV1BackupByIdStart({id:e}).pipe(i(1),c(()=>this.getBackups(!0)),u(()=>this.#n.set(null))).subscribe()}deleteBackup(e){return this.#s.deleteApiV1BackupById(e).pipe(i(1))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=o({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ie,c as we,d as v}from"./chunk-ITA7DTN3.js";import{a as fe}from"./chunk-YF6ULZXZ.js";import"./chunk-6Q6SSTBK.js";import"./chunk-DWFQAX4H.js";import{b as Re}from"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{A as Pe,B as Se,H as me,L as ge,W as Oe,Y as Ne,b as ae,c as le,d as g,e as _e,f as ce,j as pe,p as Fe,q as de,r as ue,t as Te,v as Ce,w as Ee}from"./chunk-YCLTQEU6.js";import{a as b,d as he}from"./chunk-2LSZ2I43.js";import{b as ie,d as re,e as se}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import{a as te,d as ne}from"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as P,Bb as a,Cb as r,Db as _,E as M,K as W,Kb as L,Pc as A,Ra as s,Rb as c,Sb as p,Tb as S,Ub as X,Vb as G,Wb as B,Xb as m,Z as C,Zb as u,ca as D,da as x,eb as Y,ic as h,lc as $,mc as Z,oa as E,oc as ee,qa as y,ub as F,vb as d,zc as oe}from"./chunk-ERITO7WM.js";import{a as Q}from"./chunk-7CGTOI24.js";var De=()=>["/"];function xe(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function $e(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function Ae(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function Me(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function ye(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Le(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function Xe(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Ge(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Be(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function be(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function ve(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function ke(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,be,2,0)(3,ve,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function Ue(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function Ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,$e,2,0,"span",29)(7,Ae,2,1,"span",29),r(),F(8,Me,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,ye,2,0,"span",29)(12,Le,2,0,"span",29)(13,Xe,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Ge,2,0)(18,Be,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,ke,4,1,"button",34),r(),F(23,Ue,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Je(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),Z(e.exportedCmd())}}var f=new ue,k=class n{#o=C(Ie);#t=C(he);#e=C(ie);#n=C(re);#i=C(ne);#r=C(fe);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,we()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=Re(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(W(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob",headers:new te(Q({},b.HEADERS??{}))})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Y({type:n,selectors:[["app-export"]],decls:26,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let T;T=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=B(I);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=B(w);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,t,i,R,O,U,I,K,J,H,z,V,q,w,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,xe,3,0,"sh-toggle",23),F(24,Ke,24,8,"div",24),F(25,Je,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",oe(15,De)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),ee("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[Te,pe,le,ae,_e,ce,de,Fe,se,Pe,Oe,Ce,me,Se,Ee,ge,Ne],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}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
|
|
1
|
+
import{a as Ie,c as we,d as v}from"./chunk-ITA7DTN3.js";import{a as fe}from"./chunk-WBTDGQME.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HUJGWHH6.js";import{b as Re}from"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{A as Pe,B as Se,H as me,L as ge,W as Oe,Y as Ne,b as ae,c as le,d as g,e as _e,f as ce,j as pe,p as Fe,q as de,r as ue,t as Te,v as Ce,w as Ee}from"./chunk-YCLTQEU6.js";import{a as b,d as he}from"./chunk-2LSZ2I43.js";import{b as ie,d as re,e as se}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import{a as te,d as ne}from"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as P,Bb as a,Cb as r,Db as _,E as M,K as W,Kb as L,Pc as A,Ra as s,Rb as c,Sb as p,Tb as S,Ub as X,Vb as G,Wb as B,Xb as m,Z as C,Zb as u,ca as D,da as x,eb as Y,ic as h,lc as $,mc as Z,oa as E,oc as ee,qa as y,ub as F,vb as d,zc as oe}from"./chunk-ERITO7WM.js";import{a as Q}from"./chunk-7CGTOI24.js";var De=()=>["/"];function xe(n,o){n&1&&(a(0,"sh-toggle",23),c(1,5),_(2,"input",26),p(),r())}function $e(n,o){n&1&&(a(0,"span",29),S(1,9),r())}function Ae(n,o){if(n&1&&(a(0,"span",29),S(1,10),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.password.errors==null?null:e.exportForm.controls.password.errors.minlength.requiredLength),G(1)}}function Me(n,o){if(n&1&&_(0,"sh-progress-bar",36),n&2){let e=u(2);h("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),P("value",e.calculatePasswordStrength()*(100/5))}}function ye(n,o){n&1&&(a(0,"span",29),S(1,11),r())}function Le(n,o){n&1&&(a(0,"span",29),S(1,12),r())}function Xe(n,o){if(n&1&&(a(0,"span",29),S(1,13),r()),n&2){let e=u(2);s(),X(e.exportForm.controls.repeatPassword.errors==null?null:e.exportForm.controls.repeatPassword.errors.minlength.requiredLength),G(1)}}function Ge(n,o){n&1&&(c(0,7,1),_(1,"sh-icon"),p())}function Be(n,o){n&1&&(c(0,7,2),_(1,"sh-icon"),p())}function be(n,o){n&1&&(c(0,14,1),_(1,"sh-icon",38),p())}function ve(n,o){n&1&&(c(0,14,2),_(1,"sh-icon"),p())}function ke(n,o){if(n&1){let e=L();a(0,"button",37),m("click",function(){D(e);let i=u(2);return x(i.copyPassword())}),c(1,14),F(2,be,2,0)(3,ve,2,0),p(),r()}if(n&2){let e=u(2);s(2),d(e.copiedPassword()?2:3)}}function Ue(n,o){n&1&&(a(0,"sh-alert",35),S(1,15),r())}function Ke(n,o){if(n&1){let e=L();a(0,"div",24)(1,"sh-form-field")(2,"label",27),c(3,6),_(4,"sup"),p(),r(),_(5,"input",28),F(6,$e,2,0,"span",29)(7,Ae,2,1,"span",29),r(),F(8,Me,1,9,"sh-progress-bar",30),a(9,"sh-form-field"),_(10,"input",31),F(11,ye,2,0,"span",29)(12,Le,2,0,"span",29)(13,Xe,2,1,"span",29),r(),a(14,"div",32)(15,"button",33),m("click",function(){D(e);let i=u();return x(i.showPassword.set(!i.showPassword()))}),c(16,7),F(17,Ge,2,0)(18,Be,2,0),p(),r(),a(19,"button",33),m("click",function(){D(e);let i=u();return x(i.generatePassword())}),c(20,8),_(21,"sh-icon"),p(),r(),F(22,ke,4,1,"button",34),r(),F(23,Ue,2,0,"sh-alert",35),r()}if(n&2){let e=u();s(5),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.required?6:e.exportForm.controls.password.errors!=null&&e.exportForm.controls.password.errors.minlength?7:-1),s(2),d(e.exportForm.value.password?8:-1),s(2),P("type",e.showPassword()?"text":"password"),s(),d(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.required?12:e.exportForm.controls.repeatPassword.errors!=null&&e.exportForm.controls.repeatPassword.errors.minlength?13:-1),s(6),d(e.showPassword()?17:18),s(5),d(e.showCopyPassword()?22:-1),s(),d(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1)}}function Je(n,o){if(n&1&&(a(0,"div",25)(1,"code"),$(2),r()()),n&2){let e=u();s(2),Z(e.exportedCmd())}}var f=new ue,k=class n{#o=C(Ie);#t=C(he);#e=C(ie);#n=C(re);#i=C(ne);#r=C(fe);isExporting=E(!1);exportType=E("file");exportedCmd=E(null);exportForm=f.group({exportPasswords:f.control(!0),encryption:f.control(!1,[g.required,we()]),password:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])]),repeatPassword:f.control("",[v("encryption",!0,[g.required,g.minLength(3)])])});exportFormSignal=Re(this.exportForm.valueChanges);encryptionFieldSignal=A(()=>(this.exportFormSignal()?.encryption??!1)&&this.exportType()==="file");activeBackup=A(()=>this.#r.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);calculatePasswordStrength=A(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=y(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity()});disablePasswordForCommandLine=y(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(!1)});submit(){this.isExporting.set(!0),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe(W(o=>{let e=R=>{let O=Object.entries(R);return O?"?"+O.filter(([N,T])=>T!=null).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"):""},t=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,i=b.BASE||"";return this.#i.get(`${i}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:t,token:o.Token})}`,{responseType:"blob",headers:new te(Q({},b.HEADERS??{}))})}),M(()=>this.isExporting.set(!1))).subscribe({next:o=>{let t=this.activeBackup()?.Backup?.Name??"Backup",i=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${t}-duplicati-config.${i}`),this.#n.navigate(["/"])},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(M(()=>this.isExporting.set(!1))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null)},error:o=>{}})}downloadFile(o,e){let t=window.URL.createObjectURL(o),i=document.createElement("a");i.href=t,i.download=e,i.click(),window.URL.revokeObjectURL(t)}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#s(o??""),this.copiedPassword.set(!0)}async#s(o){try{await navigator.clipboard.writeText(o)}catch{try{let t=document.createElement("textarea");t.value=o,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}catch(t){console.error("Failed to copy text: ",t)}}}generatePassword(){this.copiedPassword.set(!1);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Y({type:n,selectors:[["app-export"]],decls:26,vars:16,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let t;t=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let i;i=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let R;R=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let N;N=$localize`Password`;let T;T=$localize`Repeat password`;let U;U=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let I;I=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,I=B(I);let K;K=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let J;J=$localize`Passwords are required`;let H;H=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let z;z=$localize`Passwords do not match`;let V;V=$localize`Passwords are required`;let q;q=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let w;w=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=B(w);let j;return j=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,t,i,R,O,U,I,K,J,H,z,V,q,w,j,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],["type","button",3,"click"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",N,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",T,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,t){if(e&1&&(a(0,"header")(1,"h3"),$(2," Export backup configuration "),a(3,"div",16)(4,"button",17),c(5,0),_(6,"sh-icon"),p(),r(),a(7,"button",18),m("click",function(){return t.submit()}),c(8,1),_(9,"sh-icon"),p(),r()()(),a(10,"p"),$(11),r()(),a(12,"form",19)(13,"sh-button-group")(14,"button",20),m("click",function(){return t.exportType.set("cmd")}),c(15,2),_(16,"sh-icon"),p(),r(),a(17,"button",20),m("click",function(){return t.exportType.set("file")}),c(18,3),_(19,"sh-icon"),p(),r()(),a(20,"sh-toggle",21),c(21,4),_(22,"input",22),p(),r(),F(23,xe,3,0,"sh-toggle",23),F(24,Ke,24,8,"div",24),F(25,Je,3,1,"div",25),r()),e&2){let i;s(4),P("routerLink",oe(15,De)),s(3),h("loading",t.isExporting()),P("shTooltip",t.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",t.exportForm.invalid||t.showCopyPassword()&&!t.copiedPassword()||t.encryptionFieldSignal()&&t.exportForm.value.repeatPassword!==t.exportForm.value.password),s(4),ee("#",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.ID,": ",(i=t.activeBackup())==null||i.Backup==null?null:i.Backup.Name),s(),P("formGroup",t.exportForm),s(2),h("active",t.exportType()==="cmd"),s(3),h("active",t.exportType()==="file"),s(6),d(t.exportType()==="file"?23:-1),s(),d(t.encryptionFieldSignal()?24:-1),s(),d(t.exportedCmd()?25:-1)}},dependencies:[Te,pe,le,ae,_e,ce,de,Fe,se,Pe,Oe,Ce,me,Se,Ee,ge,Ne],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}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-MNK3XRJD.js";import"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";export{a as BackupProgressComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as At}from"./chunk-GVXQIOKE.js";import"./chunk-W4HWOC3K.js";import{a as $t}from"./chunk-JFUWTLM7.js";import"./chunk-CKVJ36E5.js";import{a as yt}from"./chunk-LGILJ5LY.js";import"./chunk-XHUQYWAM.js";import"./chunk-YF6ULZXZ.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import{a as ee}from"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import{a as ae}from"./chunk-RFB5A3B7.js";import"./chunk-DWFQAX4H.js";import{a as x}from"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import{a as Ft}from"./chunk-BEXYTIOL.js";import{a as Et,c as ut}from"./chunk-DKA7IP53.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,v as w,w as Y,z as Nt}from"./chunk-YCLTQEU6.js";import{d as Gt}from"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as N,Bb as s,Cb as o,Db as m,E as F,Kb as P,Oa as _t,Pc as v,Ra as l,Rb as O,Sb as h,Tb as _,Ub as V,Vb as U,Wb as B,Wc as gt,Xb as d,Z as R,Zb as S,a as st,b as at,c as lt,ca as E,da as u,eb as b,ec as ct,fc as dt,ic as I,jb as oe,kb as rt,lc as $,mc as H,nc as se,oa as c,qa as k,qc as A,rb as Tt,rc as y,sb as St,sc as L,ub as C,vb as g,wc as Ct,zc as J}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-PAPOSE5G.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loading",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loading",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loading",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loading",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loading",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
1
|
+
import{a as At}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import{a as $t}from"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import{a as yt}from"./chunk-LGILJ5LY.js";import"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import{a as ee}from"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import{a as ae}from"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import{a as x}from"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import{a as Ft}from"./chunk-BEXYTIOL.js";import{a as Et,c as ut}from"./chunk-I7HI454U.js";import{B as D,E as mt,G as ft,H as Z,L as It,M as Pt,N as Mt,P as Ot,W as ht,Y as Rt,c as W,e as q,i as j,m as pt,s as K,t as Q,v as w,w as Y,z as Nt}from"./chunk-YCLTQEU6.js";import{d as Gt}from"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as N,Bb as s,Cb as o,Db as m,E as F,Kb as P,Oa as _t,Pc as v,Ra as l,Rb as O,Sb as h,Tb as _,Ub as V,Vb as U,Wb as B,Wc as gt,Xb as d,Z as R,Zb as S,a as st,b as at,c as lt,ca as E,da as u,eb as b,ec as ct,fc as dt,ic as I,jb as oe,kb as rt,lc as $,mc as H,nc as se,oa as c,qa as k,qc as A,rb as Tt,rc as y,sb as St,sc as L,ub as C,vb as g,wc as Ct,zc as J}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Dt=["formRef"],xt=()=>[import("./chunk-PAPOSE5G.js").then(n=>n.OptionsListComponent)];function kt(n,t){n&1&&(s(0,"sh-alert",3),_(1,1),o())}function Jt(n,t){if(n&1){let e=P();s(0,"app-options-list",5),L("optionsChange",function(a){E(e);let T=S();return y(T.settings,a)||(T.settings=a),u(a)}),o()}if(n&2){let e=S();A("options",e.settings),N("hasFreeTextSettings",!0)}}var X=class n{#e=R(x);#n=R(Gt);formRef=gt.required("formRef");settings=c([]);isSubmitting=c(!1);isLoadingOptions=c(!0);saved=c(!1);lastRecievedServerSettings=c({});serverSettingsEffect=k(()=>{let t=this.#e.serverSettings();if(t===void 0)return;this.lastRecievedServerSettings.set(t),this.isLoadingOptions.set(!0);let e=Object.entries(t);e.forEach(([i,a],T)=>{if(i.startsWith("--")){let f=i.substring(2);this.settings.update(p=>(p.some(M=>M.Name===f||M.Name===i)||p.push({Name:i,Value:a}),p))}T===e.length-1&&this.isLoadingOptions.set(!1)})});submit(){this.isSubmitting.set(!0);let t=this.settings(),e=this.lastRecievedServerSettings(),i=t.map(p=>p.Name?.startsWith("--")?p.Name:`--${p.Name}`),T=Object.keys(e).filter(p=>p.startsWith("--")).filter(p=>!i.includes(p)),f=t.reduce((p,M)=>{let G=M.Name?.startsWith("--")?M.Name:`--${M.Name}`;return p[G]=M.Value,p},{});T.forEach(p=>{f[p]=null}),this.#n.patchApiV1Serversettings({requestBody:f}).pipe(F(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{this.#e.refreshServerSettings(),this.saved.set(!0),setTimeout(()=>{this.saved.set(!1)},3e3)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-advanced-options-settings"]],viewQuery:function(e,i){e&1&&ct(i.formRef,Dt,5),e&2&&dt()},decls:8,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Save settings `;let e;return e=$localize`Settings saved`,[t,e,[1,"actions"],[1,"success"],["shButton","","type","button",1,"raised","primary",3,"click"],[3,"optionsChange","options","hasFreeTextSettings"]]},template:function(e,i){e&1&&(s(0,"div",2),C(1,kt,2,0,"sh-alert",3),s(2,"button",4),d("click",function(){return i.submit()}),O(3,0),m(4,"sh-icon"),h(),o()(),rt(5,Jt,1,2),Tt(6,5,xt)),e&2&&(l(),g(i.saved()?1:-1),l(),I("loading",i.isSubmitting()),l(4),St(!i.isLoadingOptions()))},dependencies:[Q,D,w,Y],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40.625rem;justify-self:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end;margin-bottom:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.remote-volume-wrap[_ngcontent-%COMP%] p.warning[_ngcontent-%COMP%]{color:#7d7d00}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}"],changeDetection:0})};function zt(n,t){if(n&1){let e=P();s(0,"sh-form-field",12)(1,"input",13),L("ngModelChange",function(a){E(e);let T=S(2);return y(T.registerUrl,a)||(T.registerUrl=a),u(a)}),o()(),s(2,"button",14),d("click",function(){E(e);let a=S(2);return u(a.register())}),_(3,0),o()}if(n&2){let e=S(2);l(),A("ngModel",e.registerUrl)}}function Vt(n,t){if(n&1&&(s(0,"div",9)(1,"label"),_(2,1),o(),s(3,"a",15),$(4),o()()),n&2){let e=S(2);l(3),N("href",Ct(e.claimUrl()),_t),l(),H(e.claimUrl())}}function Ut(n,t){n&1&&(s(0,"div",9)(1,"label"),_(2,2),o()())}function Bt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.cancel())}),_(1,3),o()}}function Ht(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.disable())}),_(1,4),o()}}function Wt(n,t){if(n&1){let e=P();s(0,"button",14),d("click",function(){E(e);let a=S(2);return u(a.enable())}),_(1,5),o(),s(2,"button",16),d("click",function(){E(e);let a=S(2);return u(a.delete())}),_(3,6),o()}}function qt(n,t){n&1&&(O(0,7,1),m(1,"sh-icon"),h())}function jt(n,t){n&1&&(O(0,7,2),m(1,"sh-icon"),h())}function Kt(n,t){if(n&1){let e=P();s(0,"sh-chip",17),d("click",function(){E(e);let a=S(2);return u(a.copyReportingUrl())}),O(1,7),C(2,qt,2,0,"sh-icon")(3,jt,2,0,"sh-icon"),h(),o()}if(n&2){let e=S(2);l(2),g(e.copiedReportingUrl()===!0?2:3)}}function Qt(n,t){if(n&1&&(s(0,"div",8),C(1,zt,4,1),C(2,Vt,5,3,"div",9),C(3,Ut,3,0,"div",9),C(4,Bt,2,0,"button",10),C(5,Ht,2,0,"button",10),C(6,Wt,4,0),C(7,Kt,4,1,"sh-chip",11),o()),n&2){let e=S();l(),g(e.state()==="inactive"?1:-1),l(),g(e.state()==="registered"?2:-1),l(),g(e.state()==="registering"?3:-1),l(),g(e.state()==="registering"||e.state()==="registeringfaulted"||e.state()==="registered"?4:-1),l(),g(e.state()==="connected"||e.state()==="connecting"?5:-1),l(),g(e.state()==="disabled"?6:-1),l(),g(e.additionalReportingUrl()!==""?7:-1)}}var te=class n{#e=R(ee);#n=R(x);state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;additionalReportingUrl=v(()=>{let t=this.#n.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=c(!1);ngOnInit(){this.#e.refreshRemoteControlStatus()}cancel(){this.#e.cancelRemoteRegistration()}register(){this.#e.beginRemoteRegistration()}disable(){this.#e.disableRemoteControl()}enable(){this.#e.enableRemoteControl()}delete(){this.#e.deleteRemoteControl()}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(!0),setTimeout(()=>this.copiedReportingUrl.set(!1),2e3),navigator.clipboard.writeText(t))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-remote-control"]],decls:1,vars:1,consts:()=>{let t;t=$localize`Register on console`;let e;e=$localize`Machine is now registered, open this link to add it to your account:`;let i;i=$localize`Registering, please wait...`;let a;a=$localize`Cancel registration`;let T;T=$localize`Disable console connection`;let f;f=$localize`Enable console connection`;let p;p=$localize` Delete console connection setup `;let M;return M=$localize` Reporting configured by server ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,M=B(M),[t,e,i,a,T,f,p,M,[1,"field-row"],[1,"field-col"],["type","button","shButton","",1,"raised"],[1,"reporting-url","primary","simple"],["label","Registration URL","for","remoteControlRegisterUrl"],["type","text","sh-input","","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],["type","button","shButton","",1,"raised",3,"click"],["target","_blank",3,"href"],["type","button","shButton","",1,"raised","error",3,"click"],[1,"reporting-url","primary","simple",3,"click"]]},template:function(e,i){e&1&&C(0,Qt,8,7,"div",8),e&2&&g(i.state()!=="unknown"?0:-1)},dependencies:[K,W,q,j,Z,D,mt,w],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] button[_ngcontent-%COMP%]{white-space:nowrap}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}"],changeDetection:0})};function bt(...n){let t=c(...n);return Object.defineProperty(t,"value",{get:t.asReadonly(),set:t.set.bind(t)})}var ne=()=>({standalone:!0});function Yt(n,t){if(n&1&&(s(0,"label"),O(1,35),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function Zt(n,t){if(n&1&&(s(0,"label"),O(1,36),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.remoteControlTooltip())}}function en(n,t){if(n&1&&(s(0,"label"),O(1,37),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function tn(n,t){if(n&1&&(s(0,"label"),O(1,38),m(2,"sh-icon",85),h(),o()),n&2){let e=S(3);l(2),N("shTooltip",e.connectionStatusIndicatorTooltip())}}function nn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,33),o(),s(4,"p"),_(5,34),o()(),s(6,"div",84)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.toggleConsoleControl())}),C(8,Yt,3,1,"label")(9,Zt,3,1,"label"),o(),s(10,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(11,en,3,1,"label")(12,tn,3,1,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.consoleControlDisabled()),l(),g(e.consoleControlDisabled()?8:9),l(2),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?11:12)}}function on(n,t){n&1&&(s(0,"label"),_(1,41),o())}function sn(n,t){n&1&&(s(0,"label"),_(1,42),o())}function an(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,39),o(),s(4,"p"),_(5,40),o()(),s(6,"div",62)(7,"sh-toggle",73),d("click",function(){E(e);let a=S(2);return u(a.saveHideConsoleConnectionStatus())}),C(8,on,2,0,"label")(9,sn,2,0,"label"),o()()()}if(n&2){let e=S(2);l(7),I("active",!e.hideConsoleConnectionStatus()),l(),g(e.hideConsoleConnectionStatus()?8:9)}}function ln(n,t){if(n&1&&(s(0,"section")(1,"div",61)(2,"h3"),_(3,32),o(),s(4,"p"),$(5),o()(),s(6,"div",62),m(7,"app-remote-control"),o()(),C(8,nn,13,6,"section")(9,an,10,3,"section")),n&2){let e=S();l(5),H(e.remoteControlStatus()),l(3),g(e.remoteControlState()!="inactive"?8:9)}}function _n(n,t){n&1&&(s(0,"sh-icon",90),$(1,"check"),o())}function rn(n,t){n&1&&(s(0,"sh-icon",91),$(1,"prohibit"),o())}function Tn(n,t){if(n&1){let e=P();s(0,"button",95),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,46),o()}if(n&2){let e=S(2);I("loading",e.isUpdating())}}function Sn(n,t){if(n&1){let e=P();s(0,"button",96),d("click",function(){E(e);let a=S(2);return u(a.updatePassphrase())}),_(1,47),o()}if(n&2){let e=S(2);I("loading",e.isUpdating()),N("disabled",!0)}}function cn(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",86),_(2,43),o(),s(3,"input",87),L("ngModelChange",function(a){E(e);let T=S();return y(T.passphrase,a)||(T.passphrase=a),u(a)}),o()(),s(4,"sh-form-field")(5,"label",88),_(6,44),o(),s(7,"input",89),L("ngModelChange",function(a){E(e);let T=S();return y(T.repeatPassphrase,a)||(T.repeatPassphrase=a),u(a)}),o(),C(8,_n,2,0,"sh-icon",90)(9,rn,2,0,"sh-icon",91),o(),s(10,"div",67)(11,"button",92),d("click",function(){E(e);let a=S();return u(a.cancelPasswordChange())}),_(12,45),o(),C(13,Tn,2,2,"button",93)(14,Sn,2,3,"button",94),o()}if(n&2){let e=S();l(3),A("ngModel",e.passphrase),l(4),N("disabled",e.passphrase().length===0),A("ngModel",e.repeatPassphrase),l(),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?8:9),l(3),I("loading",e.isUpdating()),l(2),g(e.passphrase().length!==0&&e.passphrase()===e.repeatPassphrase()?13:14)}}function dn(n,t){n&1&&(s(0,"sh-icon",97),$(1,"check"),o())}function Cn(n,t){if(n&1){let e=P();s(0,"div",67)(1,"button",92),d("click",function(){E(e);let a=S();return u(a.openPassphraseForm())}),_(2,48),o(),C(3,dn,2,0,"sh-icon",97),o()}if(n&2){let e=S();l(3),g(e.passwordUpdated()?3:-1)}}function gn(n,t){n&1&&(O(0,11,1),m(1,"span"),h())}function En(n,t){n&1&&(O(0,11,2),m(1,"span"),h())}function un(n,t){if(n&1){let e=P();s(0,"sh-form-field")(1,"label",98),_(2,49),o(),s(3,"textarea",99),L("ngModelChange",function(a){E(e);let T=S();return y(T.allowedHostnames,a)||(T.allowedHostnames=a),u(a)}),o()(),s(4,"sh-alert",100),_(5,50),o(),s(6,"button",95),d("click",function(){E(e);let a=S();return u(a.updateAllowedHostnames())}),_(7,51),o()}if(n&2){let e=S();l(3),A("ngModel",e.allowedHostnames),l(3),I("loading",e.updatingAllowedHosts())}}function pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,52),o(),s(4,"p"),_(5,53),o()(),s(6,"div",62)(7,"sh-select",101)(8,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updatePowerMode(a))}),o()()()()}if(n&2){let e=S();l(7),N("options",e.powerModeOptions())("isClearable",!1),l(),N("ngModel",e.powerModeCtrl())("ngModelOptions",J(4,ne))}}function Nn(n,t){if(n&1&&(s(0,"p"),_(1,54),o()),n&2){let e,i=S();l(),V((e=i.sysinfo())==null?null:e.ServerVersionName),U(1)}}function mn(n,t){n&1&&m(0,"sh-progress-bar",74)}function fn(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function In(n,t){if(n&1&&$(0),n&2){let e=t.$implicit;se(" ",e.label," ")}}function Pn(n,t){if(n&1){let e=P();s(0,"section")(1,"div",61)(2,"h3"),_(3,55),o(),s(4,"p")(5,"span"),_(6,56),o(),s(7,"a",102),_(8,57),o(),m(9,"br")(10,"br"),s(11,"span"),_(12,58),o()()(),s(13,"div",62)(14,"sh-select",103)(15,"input",69),d("ngModelChange",function(a){E(e);let T=S();return u(T.updateUsageStatistics(a))}),o(),oe(16,In,1,1,"ng-template"),o()()()}if(n&2){let e=S();l(14),N("options",e.usageStatisticsOptions())("isLoading",e.updatingUsageStatistics()),l(),N("ngModel",e.usageStatistics())("ngModelOptions",J(4,ne))}}function Mn(n,t,e){let i=bt(n),a=i[st];e?.equal&&(a.equal=e.equal);let T;return i.set=f=>{clearTimeout(T),T=setTimeout(()=>at(a,f),t)},i.update=f=>{clearTimeout(T),T=setTimeout(()=>lt(a,f),t)},i}var On=[{value:"none",label:$localize`None`},{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],wt=[{value:"none",label:$localize`System default ($value)`},{value:"information",label:$localize`Usage statistics, warnings, errors, and crashes`},{value:"warning",label:$localize`Warnings, errors and crashes`},{value:"error",label:$localize`Errors and crashes`},{value:"crash",label:$localize`Crashes only`},{value:"disabled",label:$localize`None / disabled`}],le=class n{#e=R(Nt);#n=R($t);#i=R(Ft);#t=R(x);#s=R(ee);#T=R(ut);#a=R(Et);#l=this.#a.getItem("locale")??"en-US";sysinfo=this.#i.systemInfo;isDarkMode=this.#n.isDarkMode;editAs=c("list");previousLang=this.#l;langCtrl=c(this.#l);powerModeCtrl=c("");usageStatistics=c("");updatingUsageStatistics=c(!1);remoteControlStatus=this.#s.status;remoteControlState=this.#s.state;updatingChannel=c(!1);updateChannel=c("");isUsingRelay=this.#T.relayIsEnabled;defaultClient=c(this.#S());usageStatisticsDisabled=v(()=>(this.#i.systemInfo()?.DefaultUsageReportLevel??"").toLowerCase()==="disabled");#c=k(()=>{let t=this.#i.systemInfo()?.DefaultUsageReportLevel??"",e=wt;e[0].label=$localize`System default (${t})`,this.usageStatisticsOptions.set(e)});remoteControlTooltip=c($localize`Disabling console control will disable remote access to this machine from the console, but will keep the
|
|
2
2
|
registration intact and allow pushing settings from the console.`);connectionStatusIndicatorTooltip=c($localize`Hides the connection status indicator in the status bar. Useful if you are not using the remote console.`);setNewChannel(t){let e=this.updateChannel();this.updateChannel.set(t),this.#t.setUpdateChannel(t).pipe(F(()=>this.updatingChannel.set(!1))).subscribe()}allowRemoteAccess=c(!1);allowedHostnames=c("");loadedAllowedHostnames=c("");updatingRemoteAccess=c(!1);updatingAllowedHosts=c(!1);updatingConsoleControl=c(!1);consoleControlDisabled=c(!1);hideConsoleConnectionStatus=this.#t.isConsoleConnectionStatusHidden;updateRemoteAccess(){let e=!this.allowRemoteAccess();this.allowRemoteAccess.set(e),this.#t.setRemoteAccessInterface(e?"any":"loopback").pipe(F(()=>this.updatingRemoteAccess.set(!1))).subscribe()}updateAllowedHostnames(){let t=this.allowedHostnames();this.updatingAllowedHosts.set(!0),this.#t.setRemoteAccessAllowedHostnames(t).pipe(F(()=>this.updatingAllowedHosts.set(!1))).subscribe()}toggleConsoleControl(){let e=!this.consoleControlDisabled();this.updatingConsoleControl.set(!0),this.#t.setDisableConsoleControl(e).pipe(F(()=>this.updatingConsoleControl.set(!1))).subscribe()}updatingDisableTrayIconLogin=c(!1);disableTrayIconLogin=c(!1);saveDisableTrayIconLogin(){let e=!this.disableTrayIconLogin();this.updatingDisableTrayIconLogin.set(!0),this.#t.setDisableTrayIconLogin(e).pipe(F(()=>this.updatingDisableTrayIconLogin.set(!1))).subscribe()}updatingHideConsoleConnectionStatus=c(!1);saveHideConsoleConnectionStatus(){let e=!this.hideConsoleConnectionStatus();this.updatingHideConsoleConnectionStatus.set(!0),this.#t.setHideConsoleConnectionStatus(e).pipe(F(()=>this.updatingHideConsoleConnectionStatus.set(!1))).subscribe()}showPassphraseForm=c(!1);isUpdating=c(!1);passphrase=c("");repeatPassphrase=c("");passwordUpdated=c(!1);updatePassphrase(){this.passphrase()===this.repeatPassphrase()&&(this.isUpdating.set(!0),this.#t.setRemoteAccessPassword(this.passphrase()).pipe(F(()=>this.isUpdating.set(!1))).subscribe({next:()=>{this.showPassphraseForm.set(!1),this.passwordUpdated.set(!0),setTimeout(()=>{this.passwordUpdated.set(!1)},3e3)}}))}openPassphraseForm(){this.showPassphraseForm.set(!0)}cancelPasswordChange(){this.showPassphraseForm.set(!1)}languageOptions=c(yt);powerModeOptions=v(()=>{let t=this.#i.systemInfo();return!t?.PowerModeProviders||t.PowerModeProviders.filter(e=>e!==""&&e!=="None").length==0?[]:t.PowerModeProviders.map(e=>({value:e==""?"default":e,label:e===""?$localize`Default`:e}))});usageStatisticsOptions=c(wt);timeTypeOptions=c(On);timeType=c("none");timeValue=Mn(0,300);timeRange=v(()=>this.timeType()==="h"?[1,24]:[1,60]);updateLocale(t){!t||t===""||t===this.previousLang||(this.#a.setItem("locale",t),window.location.reload())}updateTimeValue(t){this.timeValue.set(t),this.#_()}updateTimeType(t){this.timeType()==="none"&&this.timeValue.set(1),this.timeType.set(t),this.#_()}#o;#_(){this.#o&&clearTimeout(this.#o),this.#o=setTimeout(()=>{let t=this.timeValue(),e=this.timeType(),i=e==="none"||t===0?"":`${t}${e}`;i!==this.#t.serverSettings()?.["startup-delay"]&&this.#t.setStartupDelay(i).subscribe()},1e3)}updateUsageStatistics(t){let e=this.usageStatistics();!t||t===""||t===e||(this.usageStatistics.set(t),this.updatingUsageStatistics.set(!0),this.#t.setUsageReporterLevel(t).subscribe())}updatePowerMode(t){this.powerModeCtrl()!==t&&(t==="default"&&(t=""),this.#t.setPowerModeProvider(t).subscribe())}serverSettingsEffect=k(()=>{let t=this.#t.serverSettings();if(t===void 0)return;let e=t["startup-delay"],i=e.slice(-1),a=e.slice(0,-1),T=["s","m","h"];this.disableTrayIconLogin.set(t["disable-tray-icon-login"]!=="False"),this.updateChannel.set(t["update-channel"]),this.allowRemoteAccess.set(t["server-listen-interface"]==="any"),this.allowedHostnames.set(t["allowed-hostnames"]),this.loadedAllowedHostnames.set(t["allowed-hostnames"]),this.consoleControlDisabled.set(t["disable-console-control"]==="True"),this.usageStatistics.set(t["usage-reporter-level"]===""?"none":t["usage-reporter-level"]),this.timeType.set(e==""?"none":T.includes(i)?i:"none"),this.timeValue.set(e==""?0:parseInt(a));let f=t["power-mode-provider"]===""||t["power-mode-provider"]==null?"default":t["power-mode-provider"];this.powerModeCtrl.set(f)});setDarkMode(){this.#n.setDarkMode()}setLightMode(){this.#n.setLightMode()}changeDefaultClientTo(t){this.defaultClient()!==t&&(t==="ngax"?this.#e.open(ae,{data:{title:$localize`Use legacy UI by default`,message:$localize`Are you sure you want to use the legacy user interface by default? This is not recommended unless you have a specific reason.`,confirmText:$localize`Use legacy UI by default`,cancelText:$localize`Cancel`},closed:e=>{e&&(window.location.href="/ngax",this.#r(t))}}):this.#r(t))}openLegacyUI(){this.#e.open(ae,{data:{title:$localize`Open legacy UI`,message:$localize`Are you sure you want to open the legacy user interface? This is not recommended unless you have a specific reason.`,confirmText:$localize`Open legacy UI`,cancelText:$localize`Cancel`},closed:t=>{t&&window.open("/ngax","_blank")}})}#r(t){var e=new Date;e.setTime(e.getTime()+2160*60*60*1e3),document.cookie="default-client="+t+"; expires="+e.toUTCString()+"; path=/",this.defaultClient.set(t)}#S(){let t=document.cookie.split(";");for(let e=0;e<t.length;e++){let i=t[e].trim();if(i.startsWith("default-client="))return i.substring(15)}return"ngclient"}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-settings"]],decls:128,vars:44,consts:()=>{let t;t=$localize`Settings`;let e;e=$localize`Configure your backup settings.`;let i;i=$localize`Color theme`;let a;a=$localize`Customize your application theme`;let T;T=$localize`Passwords`;let f;f=$localize`Change server passphrase`;let p;p=$localize`Language`;let M;M=$localize`Select a language for the platform`;let G;G=$localize`Use legacy interface`;let _e;_e=$localize`Use the old user interface, not recommended unless you have a specific reason.`;let re;re=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:arrow-square-right${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Open legacy UI `;let z;z=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD*50:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set current UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*50:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*51:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPAN:Set legacy UI as default${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPAN:${"\uFFFD/*51:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,z=B(z);let Te;Te=$localize`Allow remote access (requires restart)`;let Se;Se=$localize` By allowing remote access, the server listens to requests from any machine on your network. If you enable this option, make sure you are always using the computer on a secure firewall protected network. `;let ce;ce=$localize`Allow remote access`;let de;de=$localize`Prevent tray icon automatic log-in`;let Ce;Ce=$localize` By default, the tray icon will open the user interface with a token that unlocks the user interface. This ensures that you can access the user interface from the tray icon, while requiring others to enter a password. If you prefer having to type in the password, even when accessing the user interface from the tray icon, enable this option. `;let ge;ge=$localize`Prevent tray icon automatic log-in`;let Ee;Ee=$localize`Update channel`;let ue;ue=$localize` Default (${"\uFFFD0\uFFFD"}:INTERPOLATION:) `;let pe;pe=$localize`Same as the base install version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ne;Ne=$localize`Stable`;let me;me=$localize`Official stable release.`;let fe;fe=$localize`Beta`;let Ie;Ie=$localize` Try out the new features that we are working on. Test a backup and restore before using this in production environments. `;let Pe;Pe=$localize` Experimental `;let Me;Me=$localize`Early previews of new features. Not for use with important data.`;let Oe;Oe=$localize`Canary`;let he;he=$localize`Builds for developers and testers only. Not for use with important data.`;let Re;Re=$localize`Pause after startup or hibernation`;let Ge;Ge=$localize` Duplicati will run when started, but will remain in paused state for the duration. Duplicati will occupy minimal system resources and no backups will be run. `;let Fe;Fe=$localize`Advanced options`;let $e;$e=$localize`Connect to console`;let Ae;Ae=$localize`Configure console control`;let ye;ye=$localize` You can control various settings for the remote console connection. If you are not using the console, you can also hide the connection status indicator. `;let Le;Le=$localize` Remote control disabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ve;ve=$localize` Remote control enabled ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let be;be=$localize` Console connection status is hidden ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let we;we=$localize` Console connection status is visible ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let De;De=$localize`Toggle console connection status`;let xe;xe=$localize`Toggle the visibility of the console connection status indicator.`;let ke;ke=$localize`Console connection status is hidden`;let Je;Je=$localize`Console connection status is visible`;let Xe;Xe=$localize`Enter new password`;let ze;ze=$localize`Repeat password`;let ie;ie=$localize`Password have to be filled and have to match`;let Ve;Ve=$localize`Passphrase`;let Ue;Ue=$localize`Repeat passphrase`;let Be;Be=$localize`Cancel`;let He;He=$localize` Update passphrase `;let We;We=$localize` Update passphrase `;let qe;qe=$localize`Change password`;let je;je=$localize`Allowed hostnames`;let Ke;Ke=$localize` To prevent various DNS based attacks, Duplicati limits the allowed hostnames to the ones listed here. Direct IP access and localhost is always allowed. Multiple hostnames can be supplied with a semicolon separator. If any of the allowed hostnames is an asterisk (*), all hostnames are allowed and this feature is disabled. If the field is empty, only IP address and localhost access is allowed. `;let Qe;Qe=$localize` Update allowed hostnames `;let Ye;Ye=$localize`Power mode provider`;let Ze;Ze=$localize` The power mode provider monitors the system for when it enters a low power state and pauses Duplicati. When the system resumes, Duplicati will resume as well. Choosing the None option disables detection of low power states and Duplicati will run all the time. `;let et;et=$localize`Installed version: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tt;tt=$localize`Usage statistics`;let nt;nt=$localize` Usage reports help us improve the user experience and evaluate impact of new features. We use them to generate `;let it;it=$localize`public usage statistics.`;let ot;return ot=$localize` All usage reports are sent anonymously and do not contain any personal information. They contain information about hardware and operating system, the type of backend, backup duration, overall size of source data and similar data. They do not contain paths, filenames, usernames, passwords or similar sensitive information. `,[t,e,i,a,T,f,p,M,G,_e,re,z,Te,Se,ce,de,Ce,ge,Ee,ue,pe,Ne,me,fe,Ie,Pe,Me,Oe,he,Re,Ge,Fe,$e,Ae,ye,Le,ve,be,we,De,xe,ke,Je,Ve,Ue,Be,He,We,qe,je,Ke,Qe,Ye,Ze,et,tt,nt,it,ot,[1,"content"],[1,"title"],[1,"left"],[1,"right"],[1,"themes"],["src","assets/images/light-theme.png","alt","light theme",3,"click"],["src","assets/images/dark-theme.png","alt","dark theme",3,"click"],[1,"right","passphrase-form"],[1,"actions"],["value","value","label","label",3,"options","isClearable","inlineSearch"],["type","text",3,"ngModelChange","ngModel","ngModelOptions"],[1,"right","buttons"],["shButton","",1,"primary",3,"click"],[1,"right","remote-access-form"],[1,"primary","raised",3,"click"],[1,"indeterminate","primary"],[1,"right","radios"],[1,"radio-option",3,"click"],[1,"primary","raised"],[1,"field-row"],[1,"raised","primary",3,"unit"],["type","range",3,"ngModelChange","min","max","disabled","ngModel","ngModelOptions"],["label","label","value","value",3,"options","isClearable"],["type","text",3,"ngModelChange","ngModel"],[1,"advanced-settings"],[1,"right","multiple"],["suffix","",3,"shTooltip"],["for","password"],["type","password","name","password","autocomplete","disabled","placeholder",Xe,"tabindex","1",3,"ngModelChange","ngModel"],["for","repeatPassword"],["type","password","name","repeatPassword","autocomplete","disabled","placeholder",ze,"tabindex","2",3,"ngModelChange","disabled","ngModel"],["suffix","",1,"sh-success"],["suffix",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"loading"],["shButton","","shTooltip",ie,1,"raised","primary",3,"loading","disabled"],["shButton","",1,"raised","primary",3,"click"],["shButton","","shTooltip",ie,1,"raised","primary",3,"click","disabled"],[1,"sh-success"],["for","allowedHostnames"],["type","text","id","allowedHostnames",3,"ngModelChange","ngModel"],["type","primary"],["value","value","label","label",3,"options","isClearable"],["href","https://usage-reporter.duplicati.com/","target","_blank"],["label","label","value","value",3,"options","isLoading"]]},template:function(e,i){if(e&1&&(m(0,"app-status-bar"),s(1,"div",59)(2,"header")(3,"div",60)(4,"h2"),_(5,0),o(),s(6,"p"),_(7,1),o()()(),C(8,ln,10,2),s(9,"section")(10,"div",61)(11,"h3"),_(12,2),o(),s(13,"p"),_(14,3),o()(),s(15,"div",62)(16,"div",63)(17,"img",64),d("click",function(){return i.setLightMode()}),o(),s(18,"img",65),d("click",function(){return i.setDarkMode()}),o()()()(),s(19,"section")(20,"div",61)(21,"h3"),_(22,4),o(),s(23,"p"),_(24,5),o()(),s(25,"div",66),C(26,cn,15,7)(27,Cn,4,1,"div",67),o()(),s(28,"section")(29,"div",61)(30,"h3"),_(31,6),o(),s(32,"p"),_(33,7),o()(),s(34,"div",62)(35,"sh-select",68)(36,"input",69),d("ngModelChange",function(T){return i.updateLocale(T)}),o()()()(),s(37,"section")(38,"div",61)(39,"h3"),_(40,8),o(),s(41,"p"),_(42,9),o()(),s(43,"div",70)(44,"button",71),d("click",function(){return i.openLegacyUI()}),O(45,10),m(46,"sh-icon"),h(),o(),s(47,"button",71),d("click",function(){return i.changeDefaultClientTo(i.defaultClient()==="ngclient"?"ngax":"ngclient")}),O(48,11),m(49,"sh-icon"),C(50,gn,2,0,"span")(51,En,2,0,"span"),h(),o()()(),s(52,"section")(53,"div",61)(54,"h3"),_(55,12),o(),s(56,"p"),_(57,13),o()(),s(58,"div",72)(59,"sh-toggle",73),d("click",function(){return i.updateRemoteAccess()}),s(60,"label"),_(61,14),o()(),C(62,un,8,3),o()(),s(63,"section")(64,"div",61)(65,"h3"),_(66,15),o(),s(67,"p"),_(68,16),o()(),s(69,"div",62)(70,"sh-toggle",73),d("click",function(){return i.saveDisableTrayIconLogin()}),s(71,"label"),_(72,17),o()()()(),C(73,pn,9,5,"section"),s(74,"section")(75,"div",61)(76,"h3"),_(77,18),o(),C(78,Nn,2,1,"p"),C(79,mn,1,0,"sh-progress-bar",74),o(),s(80,"div",75)(81,"div",76),d("click",function(){return i.setNewChannel("")}),s(82,"sh-radio",77),_(83,19),o(),s(84,"p"),_(85,20),o()(),s(86,"div",76),d("click",function(){return i.setNewChannel("stable")}),s(87,"sh-radio",77),_(88,21),o(),s(89,"p"),_(90,22),o()(),s(91,"div",76),d("click",function(){return i.setNewChannel("beta")}),s(92,"sh-radio",77),_(93,23),o(),s(94,"p"),_(95,24),o()(),s(96,"div",76),d("click",function(){return i.setNewChannel("experimental")}),s(97,"sh-radio",77),_(98,25),o(),s(99,"p"),_(100,26),o()(),s(101,"div",76),d("click",function(){return i.setNewChannel("canary")}),s(102,"sh-radio",77),_(103,27),o(),s(104,"p"),_(105,28),o()()()(),s(106,"section")(107,"div",61)(108,"h3"),_(109,29),o(),s(110,"p"),_(111,30),o()(),s(112,"div",62)(113,"div",78)(114,"sh-range-slider",79)(115,"input",80),L("ngModelChange",function(T){return y(i.timeValue,T)||(i.timeValue=T),T}),d("ngModelChange",function(T){return i.updateTimeValue(T)}),o()(),s(116,"sh-select",81)(117,"input",82),d("ngModelChange",function(T){return i.updateTimeType(T)}),o(),oe(118,fn,1,1,"ng-template"),o()()()(),C(119,Pn,17,5,"section"),o(),m(120,"sh-divider"),s(121,"div",59)(122,"section")(123,"div",83)(124,"h3"),_(125,31),o(),m(126,"app-advanced-options-settings"),o()()(),m(127,"sh-divider")),e&2){let a,T,f;l(8),g(i.isUsingRelay()?-1:8),l(9),I("active",!i.isDarkMode()),l(),I("active",i.isDarkMode()),l(8),g(i.showPassphraseForm()?26:27),l(9),N("options",i.languageOptions())("isClearable",!1)("inlineSearch",!0),l(),N("ngModel",i.langCtrl())("ngModelOptions",J(42,ne)),l(14),g(i.defaultClient()==="ngax"?50:51),l(9),I("active",i.allowRemoteAccess()),l(3),g(i.allowRemoteAccess()?62:-1),l(8),I("active",i.disableTrayIconLogin()),l(3),g(i.powerModeOptions().length>0?73:-1),l(5),g((a=i.sysinfo())!=null&&a.ServerVersion?78:-1),l(),g(i.updatingChannel()?79:-1),l(3),I("active",i.updateChannel()===""),l(),V((T=i.sysinfo())==null?null:T.DefaultUpdateChannel),U(83),l(2),V((f=i.sysinfo())==null?null:f.ServerVersionType),U(85),l(2),I("active",i.updateChannel()==="stable"),l(5),I("active",i.updateChannel()==="beta"),l(5),I("active",i.updateChannel()==="experimental"),l(5),I("active",i.updateChannel()==="canary"),l(12),N("unit",i.timeType()==="none"?"s":i.timeType()),l(),N("min",i.timeRange()[0])("max",i.timeRange()[1])("disabled",i.timeType()==="none"),A("ngModel",i.timeValue),N("ngModelOptions",J(43,ne)),l(),N("options",i.timeTypeOptions())("isClearable",!1),l(),N("ngModel",i.timeType()),l(2),g(i.usageStatisticsDisabled()?-1:119)}},dependencies:[K,W,pt,q,j,Q,At,te,X,D,Pt,Mt,It,ht,Rt,Z,w,ft,Y,Ot],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem 2rem}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem 0;background:var(--base-1);border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:2rem 0;border-top:1px solid var(--base-4)}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{grid-template-columns:1fr}}section[_ngcontent-%COMP%]:first-of-type{border-top:0}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;align-items:flex-start}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] sh-button-group[_ngcontent-%COMP%]{margin-top:.25rem}section[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;width:50%}.passphrase-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:1rem}.passphrase-form[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.remote-access-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.themes[_ngcontent-%COMP%]{display:flex;gap:.5rem}.themes[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:15rem;border-radius:var(--shape-3);cursor:pointer}.themes[_ngcontent-%COMP%] img.active[_ngcontent-%COMP%]{border:2px solid var(--primary-8)}.radios[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.radio-option[_ngcontent-%COMP%]{cursor:pointer}.radio-option[_ngcontent-%COMP%] sh-radio[_ngcontent-%COMP%]{color:var(--base-8);margin-bottom:.25rem}.radio-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;color:var(--base-9)}.field-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.advanced-settings[_ngcontent-%COMP%]{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr;gap:1rem}.right.buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.right.multiple[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}"],changeDetection:0})};export{Mn as debounceSignal,le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import{ka as l}from"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Eb as n,Ec as g,Fb as i,Fc as d,Ra as a,Tb as p,Z as s,eb as S,lc as c,mc as m}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var o=class r{#e=s(_);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||r)};static \u0275cmp=S({type:r,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,E){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),g(5,"json"),i()()),e&2&&(a(4),m(d(5,1,E.serverSettings())))},dependencies:[l],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-X64LSE6Y.js";import{a as l}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-X64LSE6Y.js";import{a as l}from"./chunk-HUJGWHH6.js";import{xa as r}from"./chunk-OQ6BKP5N.js";import{Pc as n,U as o,Z as e,ha as a,oa as t,qa as s,ya as d}from"./chunk-ERITO7WM.js";var m=class i{#i=e(c);#t=e(a);#o=e(d);#e=l("darkTheme",null,!0);#s=t(this.#i.innerWidth);isMobile=n(()=>this.#s()<1024);sidenavType=t(this.isMobile()?"overlay":"");isNavOpen=t(!1);isDarkMode=this.#e.asReadonly();darkModeEffect=s(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"))});isMobileEffect=s(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"")});constructor(){r(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth)})}toggleNav(){this.isNavOpen.set(!this.isNavOpen())}toggleBodyClass(){this.#e.set(!this.isDarkMode())}setDarkMode(){this.#e.set(!0)}setLightMode(){this.#e.set(!1)}static \u0275fac=function(h){return new(h||i)};static \u0275prov=o({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as u}from"./chunk-
|
|
1
|
+
import{b as u}from"./chunk-GSDHTV3P.js";import{d as m}from"./chunk-2LSZ2I43.js";import{C as o,E as p,M as h,U as N,Z as r,l as c,oa as s,qa as l,v as f,z as d}from"./chunk-ERITO7WM.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as yt,b as $t,c as Ut,l as Lt,p as Rt,q as vt}from"./chunk-TDEVA3XM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{b as Mt,c as Ft,d as wt}from"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-IUJGDYFS.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-FKYRYVJD.js";import"./chunk-AYOFR344.js";import"./chunk-LTVI3WYF.js";import"./chunk-BEXYTIOL.js";import"./chunk-DKA7IP53.js";import{B as It,C as ht,G as ft,H as Ot,K as Dt,L as Pt,V as xt,W as At,c as ct,e as dt,f as Ct,g as gt,i as ut,j as Tt,r as pt,s as mt,v as St,w as Nt,y as Et}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as lt,d as _t}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as E,Bb as a,Cb as s,Db as I,Hb as L,Ib as R,Kb as N,Pc as w,Ra as _,Rb as f,Sb as O,Tb as S,Xb as C,Xc as st,Z as P,Zb as r,ca as c,da as d,eb as nt,ec as it,fc as ot,ga as et,ic as v,lc as g,mc as D,oa as h,qa as U,qc as b,rc as G,sc as k,tc as at,ub as T,uc as B,vb as p,vc as x,wb as A,yb as M,zb as F,zc as rt}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var bt=["testUrl"],Gt=()=>({maxWidth:"700px",width:"100%"});function kt(o,e){if(o&1){let t=N();a(0,"sh-card",30)(1,"div",32)(2,"h3"),S(3,4),s(),a(4,"button",33),C("click",function(){c(t);let i=r(3);return d(i.closeCustomList())}),g(5," Cancel "),a(6,"sh-icon"),g(7,"x-bold"),s()()(),a(8,"app-destination-list",34),C("setDestination",function(i){c(t);let l=r(3);return d(l.setDestination(i))}),s()()}}function Bt(o,e){if(o&1){let t=N();a(0,"div",40)(1,"sh-toggle",43),C("click",function(){c(t);let i=r(2).$index,l=r(2);return d(l.toggleSave(i))}),a(2,"span",44),S(3,8),s()()()}if(o&2){let t=r(2).$implicit;_(),v("active",t.save),E("color","primary")("variant","raised")}}function Vt(o,e){if(o&1){let t=N();a(0,"sh-toggle-card",31),L(1,35),a(2,"app-destination-list-item",36)(3,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.changeDestination(i))}),g(4,"Change"),s(),a(5,"sh-menu",37),C("click",function(i){return i.stopPropagation()}),a(6,"button",38)(7,"sh-icon"),g(8,"dots-three-vertical"),s()(),L(9,39),a(10,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.openTargetUrlDialog(i))}),f(11,5),I(12,"sh-icon"),O(),s(),a(13,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.copyTargetUrl(i))}),f(14,6),I(15,"sh-icon"),O(),s(),a(16,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.removeDestination(i))}),f(17,7),I(18,"sh-icon"),O(),s(),R(),s()(),R(),T(19,Bt,4,4,"div",40),a(20,"app-test-url",41,1),C("targetUrlChange",function(i){c(t);let l=r().$index,m=r(2);return d(m.updateTargetUrl(l,i))})("testSignalChange",function(i){c(t);let l=r().$index,m=r(2);return d(m.updateTestState(l,i))}),s(),a(22,"app-single-destination",42),C("targetUrlChange",function(i){c(t);let l=r().$index,m=r(2);return d(m.updateTargetUrl(l,i))}),s()()}if(o&2){let t=r(),n=t.$implicit,i=t.$index,l=r(2);E("disableToggle",!0)("isActive",!0),_(2),E("targetUrl",n.url)("connectionStringId",n.connectionStringId),_(17),p(n.connectionStringId?-1:19),_(),E("targetUrl",n.url)("testSignal",l.testStates()[i]||null)("backupId",l.backupId())("connectionStringId",n.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",l.isNew()?"destinationEmpty":"any")("moduleType","Backend"),_(2),E("targetUrl",n.url)("useBackupState",!0)}}function Kt(o,e){if(o&1&&T(0,kt,9,0,"sh-card",30)(1,Vt,23,16,"sh-toggle-card",31),o&2){let t=e.$index,n=r(2);p(n.showCustomList()&&n.currentEditingIndex()===t?0:1)}}function Jt(o,e){if(o&1&&M(0,Kt,2,1,null,null,A),o&2){r();let t=x(0);F(t)}}function Xt(o,e){o&1&&(a(0,"div",45),I(1,"sh-progress-bar",46),a(2,"div",47)(3,"h3"),S(4,9),s()()())}function zt(o,e){o&1&&(a(0,"sh-divider"),S(1,12),s())}function Ht(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit;_(),D(t.Description)}}function jt(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit,n=r(4);_(),D(n.getSimplePath(t.BaseUrl))}}function Wt(o,e){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=c(t).$implicit,l=r(4);return d(l.selectSavedDestination(i))}),a(1,"h3",51),g(2),s(),T(3,Ht,2,1,"p",52)(4,jt,2,1,"p",52),s()}if(o&2){let t=e.$implicit;E("targetUrl",t.BaseUrl),_(2),D(t.Name||t.BaseUrl),_(),p(t.Description?3:4)}}function Qt(o,e){if(o&1){let t=N();a(0,"sh-card",48),C("click",function(){c(t);let i=r(3);return d(i.toggleCustomList())}),a(1,"sh-icon"),g(2,"plus-circle"),s(),a(3,"div",47)(4,"h3"),S(5,10),s(),a(6,"p"),S(7,11),s()()(),T(8,zt,2,0,"sh-divider"),M(9,Wt,5,3,"app-destination-list-item",49,A)}if(o&2){let t=r(3);_(8),p(t.destinations().length>0?8:-1),_(),F(t.destinations())}}function qt(o,e){if(o&1&&T(0,Xt,5,0,"div",45)(1,Qt,11,1),o&2){let t=r(2);p(t.isLoadingDestinations()?0:1)}}function Yt(o,e){o&1&&(a(0,"sh-divider"),S(1,15),s())}function Zt(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit;_(),D(t.Description)}}function te(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit,n=r(3);_(),D(n.getSimplePath(t.BaseUrl))}}function ee(o,e){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=c(t).$implicit,l=r(3);return d(l.selectSavedDestination(i))}),a(1,"h3",51),g(2),s(),T(3,Zt,2,1,"p",52)(4,te,2,1,"p",52),s()}if(o&2){let t=e.$implicit;E("targetUrl",t.BaseUrl),_(2),D(t.Name||t.BaseUrl),_(),p(t.Description?3:4)}}function ne(o,e){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=r(2);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),s(),g(4," Back "),s()(),a(5,"sh-card",48),C("click",function(){c(t);let i=r(2);return d(i.toggleCustomList())}),a(6,"sh-icon"),g(7,"plus-circle"),s(),a(8,"div",47)(9,"h3"),S(10,13),s(),a(11,"p"),S(12,14),s()()(),T(13,Yt,2,0,"sh-divider"),M(14,ee,5,3,"app-destination-list-item",49,A)}if(o&2){let t=r(2);_(13),p(t.destinations().length>0?13:-1),_(),F(t.destinations())}}function ie(o,e){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=r(3);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),s()(),a(4,"h3"),S(5,16),s()()}}function oe(o,e){if(o&1){let t=N();T(0,ie,6,0,"div",53),a(1,"app-destination-list",34),C("setDestination",function(i){c(t);let l=r(2);return d(l.setDestination(i))}),s()}if(o&2){let t=r(2),n=x(0);p(t.destinations().length>0||n.length>0?0:-1)}}function ae(o,e){if(o&1&&T(0,qt,2,1)(1,ne,16,1)(2,oe,2,1),o&2){let t=r(),n=x(1);p(!t.showCustomList()&&!n&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2)}}function re(o,e){if(o&1){let t=N();a(0,"div",25)(1,"button",55),C("click",function(){c(t);let i=r();return d(i.startAddingNew())}),a(2,"sh-icon"),g(3,"plus"),s(),g(4," Add another destination "),s()()}}function se(o,e){o&1&&(a(0,"h2"),S(1,19),s())}function le(o,e){o&1&&(a(0,"h2"),S(1,20),s())}function _e(o,e){if(o&1){let t=N();a(0,"sh-dialog",56),k("isOpenChange",function(i){c(t);let l=r();return G(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),d(i)}),a(1,"header",57)(2,"div",58),T(3,se,2,0,"h2")(4,le,2,0,"h2"),a(5,"sh-alert",59),S(6,17),s()()(),a(7,"div",60)(8,"sh-form-field")(9,"textarea",61),k("ngModelChange",function(i){c(t);let l=r();return G(l.targetUrlCtrl,i)||(l.targetUrlCtrl=i),d(i)}),s()()(),a(10,"footer",62)(11,"button",27),C("click",function(){c(t);let i=r();return d(i.closeTargetUrlDialog(!1))}),g(12,"Cancel"),s(),a(13,"button",63),C("click",function(){c(t);let i=r();return d(i.closeTargetUrlDialog(!0))}),f(14,18),I(15,"sh-icon"),O(),s()()()}if(o&2){let t=r(),n=x(1);b("isOpen",t.targetUrlDialogOpen),E("options",rt(4,Gt)),_(3),p(n?4:3),_(6),b("ngModel",t.targetUrlCtrl)}}var y=new pt,Ae=(o={destinations:[]})=>y.group({destinations:y.array(o.destinations)}),Me=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>y.group({destinationType:y.control(o),custom:e,dynamic:t,advanced:n}),V=class o{#n=P(_t);#i=P(lt);#t=P(Rt);#e=P(yt);injector=P(et);testUrlComponents=st("testUrl");testStates=h([]);targetUrls=this.#t.targetUrls;targetUrlModel=w(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=h(null);targetUrlInitial=h(null);currentEditingIndex=h(null);targetUrlDialogOpen=h(!1);showCustomList=h(!1);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=w(()=>{let e=this.targetUrlModel();return e?Ft(e)??null:null});isLoadingDestinationEffect=U(()=>{let e=this.isLoadingDestinations(),t=this.destinations(),n=this.targetUrls();!e&&t.length==0&&n.length==0&&this.toggleCustomList()});selectedDestinationTypeOption=w(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon}:null});getConnectionString(e){let t=this.#e.destinations().find(n=>n.ID===e);return console.log("connection",t),t}getSimplePath(e){return e?Mt(e):""}copyTargetUrl(e=0){let t=this.targetUrls()[e]?.url;t&&navigator.clipboard.writeText(t)}openTargetUrlDialog(e=0){let t=this.targetUrls()[e]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();if(!e||t===n||!t)return;let i=this.currentEditingIndex();if(i!==null){let l=this.targetUrls()[i]?.connectionStringId??null,m=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,l,m)}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null)}setDestination(e){let t=wt(e??"");if(!t)return;let n=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${e}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),n,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(!1);return}this.showCustomList()?(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)):(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1))}targetUrlsEffect=U(()=>{let e=this.targetUrls();this.testStates.update(t=>{if(t.length===e.length)return t;let n=[...t];if(n.length<e.length)for(let i=n.length;i<e.length;i++)n.push(null);else n.length=e.length;return n})});selectSavedDestination(e){e.BaseUrl&&e.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(e.BaseUrl,!0,e.ID,null):(this.#t.addTargetUrl(e.BaseUrl,e.ID,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)))}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(!0)}isAddingNew=h(!1);startAddingNew(){this.isAddingNew.set(!0),this.destinations().length===0&&this.showCustomList.set(!0)}changeDestination(e){this.currentEditingIndex.set(e),this.showCustomList.set(!0)}closeCustomList(){this.showCustomList.set(!1),this.currentEditingIndex.set(null),this.isAddingNew.set(!1)}removeDestination(e){this.#t.removeTargetUrl(e)}updateTargetUrl(e,t){if(!t)return;let n=this.targetUrls()[e]?.connectionStringId??null,i=this.targetUrls()[e]?.urlKey??null;this.#t.updateTargetUrl(e,t,n,i),this.updateTestState(e,null)}updateTestState(e,t){this.testStates.update(n=>{let i=[...n];return i[e]=t,i})}toggleSave(e){this.#t.toggleSaveConnectionString(e)}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent})}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents(),n=this.testStates();for(let i=0;i<t.length;i++){let l=t[i],m=this.testStates()[i];if(m&&typeof m!="string"&&m.action==="success")continue;if((await l.testDestination(!1))?.action!=="success")return}this.#o()}#o(){this.#t.shouldAutoSave()&&this.#t.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=nt({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&it(n.testUrlComponents,bt,5),t&2&&ot()},decls:19,vars:9,consts:()=>{let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let l;l=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let m;m=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let $;$=$localize`Save as connection string`;let K;K=$localize`Loading destinations...`;let J;J=$localize`Configure a new destination`;let X;X=$localize`Configure a one-off or new storage location.`;let z;z=$localize`Or select a saved destination`;let H;H=$localize`Configure a new destination`;let j;j=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let Q;Q=$localize`Select storage type`;let q;q=$localize`Be careful, this will overwrite everything you have in your destination.`;let Y;Y=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Z;Z=$localize`Set target URL`;let tt;return tt=$localize`Edit target URL`,[["formRef",""],["testUrl",""],e,t,n,i,l,m,$,K,J,X,z,H,j,W,Q,q,Y,Z,tt,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"click","color","variant"],["label",""],[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","variant","ghost","type","button",3,"click"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1&&(at(0)(1),a(2,"form",21,0),C("submit",function(){return n.next()}),a(4,"div",22),I(5,"input",23)(6,"input",24),s(),a(7,"header"),T(8,Jt,2,0),s(),T(9,ae,3,1),T(10,re,5,0,"div",25),a(11,"div",26)(12,"button",27),C("click",function(){return n.goBack()}),f(13,2),I(14,"sh-icon"),O(),s(),a(15,"button",28),f(16,3),I(17,"sh-icon"),O(),s()()(),T(18,_e,16,5,"sh-dialog",29)),t&2){let i=B(n.targetUrls());_();let l=B(i.length>0);_(7),p(n.currentEditingIndex()!==null||!n.showCustomList()&&!n.isAddingNew()?8:-1),_(),p((!l||n.showCustomList()||n.isAddingNew())&&n.currentEditingIndex()===null?9:-1),_(),p(l&&!n.showCustomList()&&!n.isAddingNew()?10:-1),_(5),v("loading",n.isNew()&&n.testStates().length>0&&n.testStates()[0]==="testing"),E("disabled",!l),_(3),p(n.targetUrlDialogOpen()?18:-1)}},dependencies:[vt,Ut,$t,Lt,mt,Tt,ct,dt,Ct,ut,gt,It,Ot,Dt,St,Et,Nt,ht,ft,Pt,xt,At],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{Ae as createDestinationForm,Me as createDestinationFormGroup,V as default};
|
|
1
|
+
import{a as yt,b as $t,c as Ut,l as Lt,p as Rt,q as vt}from"./chunk-5N2VOOTZ.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{b as Mt,c as Ft,d as wt}from"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as It,C as ht,G as ft,H as Ot,K as Dt,L as Pt,V as xt,W as At,c as ct,e as dt,f as Ct,g as gt,i as ut,j as Tt,r as pt,s as mt,v as St,w as Nt,y as Et}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as lt,d as _t}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as E,Bb as a,Cb as s,Db as I,Hb as L,Ib as R,Kb as N,Pc as w,Ra as _,Rb as f,Sb as O,Tb as S,Xb as C,Xc as st,Z as P,Zb as r,ca as c,da as d,eb as nt,ec as it,fc as ot,ga as et,ic as v,lc as g,mc as D,oa as h,qa as U,qc as b,rc as G,sc as k,tc as at,ub as T,uc as B,vb as p,vc as x,wb as A,yb as M,zb as F,zc as rt}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var bt=["testUrl"],Gt=()=>({maxWidth:"700px",width:"100%"});function kt(o,e){if(o&1){let t=N();a(0,"sh-card",30)(1,"div",32)(2,"h3"),S(3,4),s(),a(4,"button",33),C("click",function(){c(t);let i=r(3);return d(i.closeCustomList())}),g(5," Cancel "),a(6,"sh-icon"),g(7,"x-bold"),s()()(),a(8,"app-destination-list",34),C("setDestination",function(i){c(t);let l=r(3);return d(l.setDestination(i))}),s()()}}function Bt(o,e){if(o&1){let t=N();a(0,"div",40)(1,"sh-toggle",43),C("click",function(){c(t);let i=r(2).$index,l=r(2);return d(l.toggleSave(i))}),a(2,"span",44),S(3,8),s()()()}if(o&2){let t=r(2).$implicit;_(),v("active",t.save),E("color","primary")("variant","raised")}}function Vt(o,e){if(o&1){let t=N();a(0,"sh-toggle-card",31),L(1,35),a(2,"app-destination-list-item",36)(3,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.changeDestination(i))}),g(4,"Change"),s(),a(5,"sh-menu",37),C("click",function(i){return i.stopPropagation()}),a(6,"button",38)(7,"sh-icon"),g(8,"dots-three-vertical"),s()(),L(9,39),a(10,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.openTargetUrlDialog(i))}),f(11,5),I(12,"sh-icon"),O(),s(),a(13,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.copyTargetUrl(i))}),f(14,6),I(15,"sh-icon"),O(),s(),a(16,"button",33),C("click",function(){c(t);let i=r().$index,l=r(2);return d(l.removeDestination(i))}),f(17,7),I(18,"sh-icon"),O(),s(),R(),s()(),R(),T(19,Bt,4,4,"div",40),a(20,"app-test-url",41,1),C("targetUrlChange",function(i){c(t);let l=r().$index,m=r(2);return d(m.updateTargetUrl(l,i))})("testSignalChange",function(i){c(t);let l=r().$index,m=r(2);return d(m.updateTestState(l,i))}),s(),a(22,"app-single-destination",42),C("targetUrlChange",function(i){c(t);let l=r().$index,m=r(2);return d(m.updateTargetUrl(l,i))}),s()()}if(o&2){let t=r(),n=t.$implicit,i=t.$index,l=r(2);E("disableToggle",!0)("isActive",!0),_(2),E("targetUrl",n.url)("connectionStringId",n.connectionStringId),_(17),p(n.connectionStringId?-1:19),_(),E("targetUrl",n.url)("testSignal",l.testStates()[i]||null)("backupId",l.backupId())("connectionStringId",n.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!0)("testExpectation",l.isNew()?"destinationEmpty":"any")("moduleType","Backend"),_(2),E("targetUrl",n.url)("useBackupState",!0)}}function Kt(o,e){if(o&1&&T(0,kt,9,0,"sh-card",30)(1,Vt,23,16,"sh-toggle-card",31),o&2){let t=e.$index,n=r(2);p(n.showCustomList()&&n.currentEditingIndex()===t?0:1)}}function Jt(o,e){if(o&1&&M(0,Kt,2,1,null,null,A),o&2){r();let t=x(0);F(t)}}function Xt(o,e){o&1&&(a(0,"div",45),I(1,"sh-progress-bar",46),a(2,"div",47)(3,"h3"),S(4,9),s()()())}function zt(o,e){o&1&&(a(0,"sh-divider"),S(1,12),s())}function Ht(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit;_(),D(t.Description)}}function jt(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit,n=r(4);_(),D(n.getSimplePath(t.BaseUrl))}}function Wt(o,e){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=c(t).$implicit,l=r(4);return d(l.selectSavedDestination(i))}),a(1,"h3",51),g(2),s(),T(3,Ht,2,1,"p",52)(4,jt,2,1,"p",52),s()}if(o&2){let t=e.$implicit;E("targetUrl",t.BaseUrl),_(2),D(t.Name||t.BaseUrl),_(),p(t.Description?3:4)}}function Qt(o,e){if(o&1){let t=N();a(0,"sh-card",48),C("click",function(){c(t);let i=r(3);return d(i.toggleCustomList())}),a(1,"sh-icon"),g(2,"plus-circle"),s(),a(3,"div",47)(4,"h3"),S(5,10),s(),a(6,"p"),S(7,11),s()()(),T(8,zt,2,0,"sh-divider"),M(9,Wt,5,3,"app-destination-list-item",49,A)}if(o&2){let t=r(3);_(8),p(t.destinations().length>0?8:-1),_(),F(t.destinations())}}function qt(o,e){if(o&1&&T(0,Xt,5,0,"div",45)(1,Qt,11,1),o&2){let t=r(2);p(t.isLoadingDestinations()?0:1)}}function Yt(o,e){o&1&&(a(0,"sh-divider"),S(1,15),s())}function Zt(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit;_(),D(t.Description)}}function te(o,e){if(o&1&&(a(0,"p",52),g(1),s()),o&2){let t=r().$implicit,n=r(3);_(),D(n.getSimplePath(t.BaseUrl))}}function ee(o,e){if(o&1){let t=N();a(0,"app-destination-list-item",50),C("click",function(){let i=c(t).$implicit,l=r(3);return d(l.selectSavedDestination(i))}),a(1,"h3",51),g(2),s(),T(3,Zt,2,1,"p",52)(4,te,2,1,"p",52),s()}if(o&2){let t=e.$implicit;E("targetUrl",t.BaseUrl),_(2),D(t.Name||t.BaseUrl),_(),p(t.Description?3:4)}}function ne(o,e){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=r(2);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),s(),g(4," Back "),s()(),a(5,"sh-card",48),C("click",function(){c(t);let i=r(2);return d(i.toggleCustomList())}),a(6,"sh-icon"),g(7,"plus-circle"),s(),a(8,"div",47)(9,"h3"),S(10,13),s(),a(11,"p"),S(12,14),s()()(),T(13,Yt,2,0,"sh-divider"),M(14,ee,5,3,"app-destination-list-item",49,A)}if(o&2){let t=r(2);_(13),p(t.destinations().length>0?13:-1),_(),F(t.destinations())}}function ie(o,e){if(o&1){let t=N();a(0,"div",53)(1,"button",54),C("click",function(){c(t);let i=r(3);return d(i.closeCustomList())}),a(2,"sh-icon"),g(3,"arrow-left"),s()(),a(4,"h3"),S(5,16),s()()}}function oe(o,e){if(o&1){let t=N();T(0,ie,6,0,"div",53),a(1,"app-destination-list",34),C("setDestination",function(i){c(t);let l=r(2);return d(l.setDestination(i))}),s()}if(o&2){let t=r(2),n=x(0);p(t.destinations().length>0||n.length>0?0:-1)}}function ae(o,e){if(o&1&&T(0,qt,2,1)(1,ne,16,1)(2,oe,2,1),o&2){let t=r(),n=x(1);p(!t.showCustomList()&&!n&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2)}}function re(o,e){if(o&1){let t=N();a(0,"div",25)(1,"button",55),C("click",function(){c(t);let i=r();return d(i.startAddingNew())}),a(2,"sh-icon"),g(3,"plus"),s(),g(4," Add another destination "),s()()}}function se(o,e){o&1&&(a(0,"h2"),S(1,19),s())}function le(o,e){o&1&&(a(0,"h2"),S(1,20),s())}function _e(o,e){if(o&1){let t=N();a(0,"sh-dialog",56),k("isOpenChange",function(i){c(t);let l=r();return G(l.targetUrlDialogOpen,i)||(l.targetUrlDialogOpen=i),d(i)}),a(1,"header",57)(2,"div",58),T(3,se,2,0,"h2")(4,le,2,0,"h2"),a(5,"sh-alert",59),S(6,17),s()()(),a(7,"div",60)(8,"sh-form-field")(9,"textarea",61),k("ngModelChange",function(i){c(t);let l=r();return G(l.targetUrlCtrl,i)||(l.targetUrlCtrl=i),d(i)}),s()()(),a(10,"footer",62)(11,"button",27),C("click",function(){c(t);let i=r();return d(i.closeTargetUrlDialog(!1))}),g(12,"Cancel"),s(),a(13,"button",63),C("click",function(){c(t);let i=r();return d(i.closeTargetUrlDialog(!0))}),f(14,18),I(15,"sh-icon"),O(),s()()()}if(o&2){let t=r(),n=x(1);b("isOpen",t.targetUrlDialogOpen),E("options",rt(4,Gt)),_(3),p(n?4:3),_(6),b("ngModel",t.targetUrlCtrl)}}var y=new pt,Ae=(o={destinations:[]})=>y.group({destinations:y.array(o.destinations)}),Me=({key:o,customGroup:e,dynamicGroup:t,advancedGroup:n})=>y.group({destinationType:y.control(o),custom:e,dynamic:t,advanced:n}),V=class o{#n=P(_t);#i=P(lt);#t=P(Rt);#e=P(yt);injector=P(et);testUrlComponents=st("testUrl");testStates=h([]);targetUrls=this.#t.targetUrls;targetUrlModel=w(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=h(null);targetUrlInitial=h(null);currentEditingIndex=h(null);targetUrlDialogOpen=h(!1);showCustomList=h(!1);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=w(()=>{let e=this.targetUrlModel();return e?Ft(e)??null:null});isLoadingDestinationEffect=U(()=>{let e=this.isLoadingDestinations(),t=this.destinations(),n=this.targetUrls();!e&&t.length==0&&n.length==0&&this.toggleCustomList()});selectedDestinationTypeOption=w(()=>{let e=this.selectedDestinationType();return e?{key:e.customKey??e.key,customKey:e.customKey??null,displayName:e.displayName,description:e.description,icon:e.icon}:null});getConnectionString(e){let t=this.#e.destinations().find(n=>n.ID===e);return console.log("connection",t),t}getSimplePath(e){return e?Mt(e):""}copyTargetUrl(e=0){let t=this.targetUrls()[e]?.url;t&&navigator.clipboard.writeText(t)}openTargetUrlDialog(e=0){let t=this.targetUrls()[e]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(e=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),n=this.targetUrlInitial();if(!e||t===n||!t)return;let i=this.currentEditingIndex();if(i!==null){let l=this.targetUrls()[i]?.connectionStringId??null,m=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,l,m)}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null)}setDestination(e){let t=wt(e??"");if(!t)return;let n=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${e}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),n,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(!1);return}this.showCustomList()?(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)):(this.#t.addTargetUrl(n,null,null),this.showCustomList.set(!1),this.isAddingNew.set(!1))}targetUrlsEffect=U(()=>{let e=this.targetUrls();this.testStates.update(t=>{if(t.length===e.length)return t;let n=[...t];if(n.length<e.length)for(let i=n.length;i<e.length;i++)n.push(null);else n.length=e.length;return n})});selectSavedDestination(e){e.BaseUrl&&e.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(e.BaseUrl,!0,e.ID,null):(this.#t.addTargetUrl(e.BaseUrl,e.ID,null),this.showCustomList.set(!1),this.isAddingNew.set(!1)))}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(!0)}isAddingNew=h(!1);startAddingNew(){this.isAddingNew.set(!0),this.destinations().length===0&&this.showCustomList.set(!0)}changeDestination(e){this.currentEditingIndex.set(e),this.showCustomList.set(!0)}closeCustomList(){this.showCustomList.set(!1),this.currentEditingIndex.set(null),this.isAddingNew.set(!1)}removeDestination(e){this.#t.removeTargetUrl(e)}updateTargetUrl(e,t){if(!t)return;let n=this.targetUrls()[e]?.connectionStringId??null,i=this.targetUrls()[e]?.urlKey??null;this.#t.updateTargetUrl(e,t,n,i),this.updateTestState(e,null)}updateTestState(e,t){this.testStates.update(n=>{let i=[...n];return i[e]=t,i})}toggleSave(e){this.#t.toggleSaveConnectionString(e)}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent})}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents(),n=this.testStates();for(let i=0;i<t.length;i++){let l=t[i],m=this.testStates()[i];if(m&&typeof m!="string"&&m.action==="success")continue;if((await l.testDestination(!1))?.action!=="success")return}this.#o()}#o(){this.#t.shouldAutoSave()&&this.#t.submit(!0),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=nt({type:o,selectors:[["app-destination"]],viewQuery:function(t,n){t&1&&it(n.testUrlComponents,bt,5),t&2&&ot()},decls:19,vars:9,consts:()=>{let e;e=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let t;t=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Change destination type`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let l;l=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let m;m=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let $;$=$localize`Save as connection string`;let K;K=$localize`Loading destinations...`;let J;J=$localize`Configure a new destination`;let X;X=$localize`Configure a one-off or new storage location.`;let z;z=$localize`Or select a saved destination`;let H;H=$localize`Configure a new destination`;let j;j=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let Q;Q=$localize`Select storage type`;let q;q=$localize`Be careful, this will overwrite everything you have in your destination.`;let Y;Y=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Z;Z=$localize`Set target URL`;let tt;return tt=$localize`Edit target URL`,[["formRef",""],["testUrl",""],e,t,n,i,l,m,$,K,J,X,z,H,j,W,Q,q,Y,Z,tt,["autocomplete","off",3,"submit"],[2,"position","absolute","left","-9999px","width","1px","height","1px","overflow","hidden"],["type","text","name","fake_email","tabindex","-1"],["type","password","name","fake_password","tabindex","-1"],[1,"add-destination-container"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[3,"isOpen","options"],[1,"destination-card","type-c","editing"],[1,"destination-card","type-a",3,"disableToggle","isActive"],[1,"editing-header"],["shButton","","type","button",1,"small",3,"click"],[3,"setDestination"],["title",""],[3,"targetUrl","connectionStringId"],[1,"actions",3,"click"],["shButton","","type","button",1,"small","icon-only"],["menu",""],[1,"options-row",2,"margin","0 1rem 1rem 1rem"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","connectionStringId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"click","color","variant"],["label",""],[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","variant","ghost","type","button",3,"click"],["shButton","","type","button",1,"secondary",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"target-dialog-header"],[1,"warn"],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,n){if(t&1&&(at(0)(1),a(2,"form",21,0),C("submit",function(){return n.next()}),a(4,"div",22),I(5,"input",23)(6,"input",24),s(),a(7,"header"),T(8,Jt,2,0),s(),T(9,ae,3,1),T(10,re,5,0,"div",25),a(11,"div",26)(12,"button",27),C("click",function(){return n.goBack()}),f(13,2),I(14,"sh-icon"),O(),s(),a(15,"button",28),f(16,3),I(17,"sh-icon"),O(),s()()(),T(18,_e,16,5,"sh-dialog",29)),t&2){let i=B(n.targetUrls());_();let l=B(i.length>0);_(7),p(n.currentEditingIndex()!==null||!n.showCustomList()&&!n.isAddingNew()?8:-1),_(),p((!l||n.showCustomList()||n.isAddingNew())&&n.currentEditingIndex()===null?9:-1),_(),p(l&&!n.showCustomList()&&!n.isAddingNew()?10:-1),_(5),v("loading",n.isNew()&&n.testStates().length>0&&n.testStates()[0]==="testing"),E("disabled",!l),_(3),p(n.targetUrlDialogOpen()?18:-1)}},dependencies:[vt,Ut,$t,Lt,mt,Tt,ct,dt,Ct,ut,gt,It,Ot,Dt,St,Et,Nt,ht,ft,Pt,xt,At],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-bottom:1.5rem}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8);cursor:pointer}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-list-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.save-connection-string[_ngcontent-%COMP%]{margin:1rem 0}sh-card.destination-card[_ngcontent-%COMP%]{padding:1.5rem}.destination-card[_ngcontent-%COMP%]{position:relative;overflow:visible}.destination-card[_ngcontent-%COMP%] app-destination-list-item[_ngcontent-%COMP%]{width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}.destination-card[_ngcontent-%COMP%] .card-header-content[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{position:static;transform:none}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.destination-card[_ngcontent-%COMP%] .editing-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}.destination-card[_ngcontent-%COMP%] sh-toggle-card[_ngcontent-%COMP%] .header{width:100%}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{Ae as createDestinationForm,Me as createDestinationFormGroup,V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-COT66FJB.js";import"./chunk-W4HWOC3K.js";import"./chunk-YIM56S4M.js";import"./chunk-MNK3XRJD.js";import"./chunk-GSDHTV3P.js";import"./chunk-WBTDGQME.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-MI32HHLT.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-HUJGWHH6.js";import"./chunk-UY2WEUKC.js";import"./chunk-AYOFR344.js";import"./chunk-HDJL2F2F.js";import"./chunk-BEXYTIOL.js";import"./chunk-I7HI454U.js";import{B as D,C as N,v as E}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{e as m}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as r,Bb as e,Cb as n,Db as o,Ra as C,Rb as s,Sb as l,Tb as i,eb as T,zc as d}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var f=()=>["/backup/new"],O=()=>["/backup/import"],u=class p{static \u0275fac=function(t){return new(t||p)};static \u0275cmp=T({type:p,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let c;c=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let g;g=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let S;return S=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`,[a,t,c,g,A,P,S,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"]]},template:function(t,c){t&1&&(o(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"sh-card",8),o(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),o(13,"sh-icon"),l(),n()(),e(14,"sh-card",8),o(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),o(22,"sh-icon"),l(),n()()()()),t&2&&(C(11),r("routerLink",d(2,f)),C(9),r("routerLink",d(3,O)))},dependencies:[M,D,N,E,m],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
|
package/index.html
CHANGED
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
<body>
|
|
125
125
|
<app-root></app-root>
|
|
126
126
|
<div class="loading">Connecting ...</div>
|
|
127
|
-
<link rel="modulepreload" href="chunk-LGILJ5LY.js"><link rel="modulepreload" href="chunk-
|
|
127
|
+
<link rel="modulepreload" href="chunk-LGILJ5LY.js"><link rel="modulepreload" href="chunk-Z772CHAB.js"><link rel="modulepreload" href="chunk-3ZCJK7PY.js"><link rel="modulepreload" href="chunk-GSDHTV3P.js"><link rel="modulepreload" href="chunk-WBTDGQME.js"><link rel="modulepreload" href="chunk-SLS3DCJP.js"><link rel="modulepreload" href="chunk-SUY5AQLW.js"><link rel="modulepreload" href="chunk-6Q6SSTBK.js"><link rel="modulepreload" href="chunk-I4XRVBRQ.js"><link rel="modulepreload" href="chunk-RFB5A3B7.js"><script src="polyfills-7RKI4BGK.js" type="module"></script><script src="main-4RMOPKNF.js" type="module"></script></body>
|
|
128
128
|
</html>
|