@duplicati/ngclient 0.0.208 → 0.0.209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/assets/dest-icons/digitalocean.png +0 -0
  2. package/assets/dest-icons/hetzner.png +0 -0
  3. package/{chunk-B6CAREL6.js → chunk-2XMYVT7N.js} +1 -1
  4. package/{chunk-7B4AIHYK.js → chunk-4NENQSXM.js} +1 -1
  5. package/{chunk-RCZGOO7K.js → chunk-6HMNDYMY.js} +1 -1
  6. package/{chunk-K32ZRHDV.js → chunk-77ALZWIA.js} +1 -1
  7. package/{chunk-KQZNQ7RD.js → chunk-7J6AVYZE.js} +1 -1
  8. package/{chunk-AYCSIHGS.js → chunk-BQEUHLSB.js} +1 -1
  9. package/{chunk-J33RTTTX.js → chunk-CNOKPOR3.js} +1 -1
  10. package/{chunk-LQKADAHT.js → chunk-DHOED4DH.js} +1 -1
  11. package/{chunk-OISQ63OG.js → chunk-EL2UKEXS.js} +1 -1
  12. package/{chunk-GLR4FXRG.js → chunk-FE3ADWR5.js} +1 -1
  13. package/chunk-FKCZIBN3.js +1 -0
  14. package/{chunk-4KNVWFT2.js → chunk-G7XKFPGX.js} +1 -1
  15. package/{chunk-5VSRHMHD.js → chunk-LMZN2X5M.js} +1 -1
  16. package/{chunk-BT44N2RL.js → chunk-NBPZDFGF.js} +1 -1
  17. package/{chunk-LSF3JCSI.js → chunk-NXF5BMPG.js} +1 -1
  18. package/{chunk-4FDBDI3J.js → chunk-OSAM5F7M.js} +1 -1
  19. package/{chunk-IXUAJIIQ.js → chunk-PAPOSE5G.js} +1 -1
  20. package/{chunk-COKAO446.js → chunk-QEIGUOTC.js} +1 -1
  21. package/{chunk-P5MXBPC4.js → chunk-RNTBVXBV.js} +1 -1
  22. package/{chunk-R63C22I3.js → chunk-SEFBKH36.js} +1 -1
  23. package/{chunk-NCN2TOJR.js → chunk-TYEWJKJU.js} +1 -1
  24. package/{chunk-FSFXGPH3.js → chunk-UGEDZCTM.js} +1 -1
  25. package/chunk-XHUMSL6X.js +1 -0
  26. package/index.html +1 -1
  27. package/{main-BYMMXHVT.js → main-7RC24G3G.js} +1 -1
  28. package/package.json +1 -1
  29. package/chunk-54PAHILA.js +0 -1
  30. package/chunk-GG5S6RWM.js +0 -1
@@ -1 +1 @@
1
- import{a as yt,b as $t,c as Ut,l as Lt,p as Rt,q as vt}from"./chunk-FSFXGPH3.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{b as Mt,c as Ft,d as wt}from"./chunk-LSF3JCSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.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-UGEDZCTM.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-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.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 v}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{p as C}from"./chunk-FSFXGPH3.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-LSF3JCSI.js";import"./chunk-I2HYK2BL.js";import{a as G}from"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-3SSB4QCJ.js";import{b as h}from"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.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
+ import{a as v}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{p as C}from"./chunk-UGEDZCTM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-I2HYK2BL.js";import{a as G}from"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-3SSB4QCJ.js";import{b as h}from"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.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{g as pe}from"./chunk-B6CAREL6.js";import"./chunk-BT44N2RL.js";import{b as de,c as Se,l as ue,p as Ee,q as Ce}from"./chunk-FSFXGPH3.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{c as Te,d as ge}from"./chunk-LSF3JCSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import{a as M}from"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as j,d as q}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 r,Cb as a,Db as O,Hb as V,Ib as W,Kb as u,Pc as $,Ra as T,Rb as E,Sb as C,Tb as I,Wb as z,Wc as w,Xb as d,Z as m,Zb as l,ca as _,da as c,eb as B,ec as J,fc as X,ga as v,lc as P,oa as N,qc as f,rc as R,sc as h,tc as A,ub as p,uc as y,vb as F,vc as L,yc as H,zc as K}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=u();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),P(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=u();r(0,"app-destination-list-item",17)(1,"button",20),d("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=u();r(0,"app-destination-list",26),d("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=u();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function Pe(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Ae(o,i){if(o&1){let e=u();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),P(12,"Cancel"),a(),r(13,"button",35),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[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(e,n){if(e&1){let t=u();A(0),r(1,"form",12,0),d("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),A(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),d("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,Pe,2,0,"sh-icon"),C(),a()()(),p(24,Ae,16,4,"sh-dialog",23)}if(e&2){let t=y(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=y(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,Se,de,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
1
+ import{g as pe}from"./chunk-2XMYVT7N.js";import"./chunk-NBPZDFGF.js";import{b as de,c as Se,l as ue,p as Ee,q as Ce}from"./chunk-UGEDZCTM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import{c as Te,d as ge}from"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import{a as M}from"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as le,H as _e,K as ce,c as Q,e as Y,f as Z,g as ee,i as te,j as ne,s as ie,v as oe,w as re,y as ae,z as se}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as j,d as q}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 r,Cb as a,Db as O,Hb as V,Ib as W,Kb as u,Pc as $,Ra as T,Rb as E,Sb as C,Tb as I,Wb as z,Wc as w,Xb as d,Z as m,Zb as l,ca as _,da as c,eb as B,ec as J,fc as X,ga as v,lc as P,oa as N,qc as f,rc as R,sc as h,tc as A,ub as p,uc as y,vb as F,vc as L,yc as H,zc as K}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var Fe=["formRef"],Oe=["testUrl"],me=()=>({maxWidth:"700px",width:"100%"});function Re(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(1,5),O(2,"sh-icon"),C(),a()}}function Ne(o,i){if(o&1){let e=u();r(0,"button",24),d("click",function(){_(e);let t=l(2);return c(t.copyTargetUrl())}),E(1,7),O(2,"sh-icon"),C(),a()}}function De(o,i){if(o&1){let e=u();r(0,"sh-menu")(1,"button",15)(2,"sh-icon"),P(3,"dots-three-vertical"),a()(),V(4,25),r(5,"button",24),d("click",function(){_(e);let t=l();return c(t.openTargetUrlDialog())}),E(6,6),O(7,"sh-icon"),C(),a(),p(8,Ne,3,0,"button",15),W(),a()}if(o&2){l();let e=L(0);T(8),F(e?8:-1)}}function Ie(o,i){if(o&1){let e=u();r(0,"app-destination-list-item",17)(1,"button",20),d("click",function(){_(e);let t=l();return c(t.removeDestination())}),I(2,8),a()()}if(o&2){l();let e=L(12);D("destination",e)}}function fe(o,i){if(o&1){let e=u();r(0,"app-destination-list",26),d("setDestination",function(t){_(e);let s=l();return c(s.setDestination(t))}),a()}}function he(o,i){if(o&1){let e=u();r(0,"app-single-destination",27),h("targetUrlChange",function(t){_(e);let s=l();return R(s.targetUrlModel,t)||(s.targetUrlModel=t),c(t)}),a()}if(o&2){let e=l();f("targetUrl",e.targetUrlModel)}}function Me(o,i){o&1&&(E(0,4,1),O(1,"sh-icon",22),C())}function Pe(o,i){o&1&&(E(0,4,2),O(1,"sh-icon"),C())}function Ae(o,i){if(o&1){let e=u();r(0,"sh-dialog",28),h("isOpenChange",function(t){_(e);let s=l();return R(s.targetUrlDialogOpen,t)||(s.targetUrlDialogOpen=t),c(t)}),r(1,"header",29)(2,"div",30)(3,"h2"),I(4,9),a(),r(5,"sh-alert",31),I(6,10),a()()(),r(7,"div",32)(8,"sh-form-field")(9,"textarea",33),h("ngModelChange",function(t){_(e);let s=l();return R(s.targetUrlCtrl,t)||(s.targetUrlCtrl=t),c(t)}),a()()(),r(10,"footer",34)(11,"button",20),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!1))}),P(12,"Cancel"),a(),r(13,"button",35),d("click",function(){_(e);let t=l();return c(t.closeTargetUrlDialog(!0))}),E(14,11),O(15,"sh-icon"),C(),a()()()}if(o&2){let e=l();f("isOpen",e.targetUrlDialogOpen),D("options",K(3,me)),T(9),f("ngModel",e.targetUrlCtrl)}}var x=class o{#i=m(q);#o=m(j);#n=m(se);injector=m(v);#e=m(pe);formRef=w.required("formRef");testUrlComponent=w.required("testUrl");testSignal=this.#e.destinationTestSignal;targetUrlModel=this.#e.destinationTargetUrl;targetUrlCtrl=N(null);targetUrlInitial=N(null);targetUrlDialogOpen=N(!1);toggleNewDestination=N(!0);selectedDestinationType=$(()=>{let i=this.#e.destinationTargetUrl();return i?Te(i):null});selectedDestinationTypeOption=$(()=>{let i=this.selectedDestinationType();return i?{key:i.customKey??i.key,customKey:i.customKey??null,displayName:i.displayName,description:i.description,icon:i.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.#e.destinationTargetUrl()??"")}openTargetUrlDialog(){let i=this.#e.destinationTargetUrl();this.targetUrlCtrl.set(i),this.targetUrlInitial.set(i),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl(),n=this.targetUrlInitial();!i||e===n||!e||this.#e.updateTargetUrl(e)}setDestination(i){let e=ge(i??"");if(e){if(e.mapper.default){let n=e.mapper.default("");this.#e.updateTargetUrl(n);return}this.#e.updateTargetUrl(`${i}://`)}}removeDestination(){this.#e.updateTargetUrl(null)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let i=this.testSignal();if(i===null){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:n=>{n?this.testUrlComponent()?.testDestination(!1)?.then(t=>{t.action==="success"&&t.containsBackup?this.#t():this.#n.open(M,{data:{title:$localize`Test did not succeed`,message:t.errorMessage??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#t()}});return}let e=typeof i=="string"?null:i;if(e?.action!=="success"||!e.containsBackup){this.#n.open(M,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Edit destination`,cancelText:$localize`Yes, continue`},closed:n=>{n||this.#t()}});return}this.#t()}#t(){this.#i.navigate(["encryption"],{relativeTo:this.#o.parent})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=B({type:o,selectors:[["app-restore-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,Fe,5)(n.testUrlComponent,Oe,5),e&2&&X(2)},features:[H([Ee])],decls:25,vars:17,consts:()=>{let i;i=$localize`Backup destination`;let e;e=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD*22:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*22:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*23:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*23:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,n=z(n);let t;t=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Set target URL `;let s;s=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Edit target URL `;let g;g=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let U;U=$localize`Change`;let b;b=$localize`Edit target URL`;let G;G=$localize`Be careful, this will overwrite everything you have in your destination.`;let k;return k=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],["testUrl",""],i,e,n,t,s,g,U,b,G,k,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","moduleType"],[1,"current-destination",3,"destination"],[3,"targetUrl"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click"],["menu",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl"],[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(e,n){if(e&1){let t=u();A(0),r(1,"form",12,0),d("submit",function(){return n.next()}),r(3,"header")(4,"h3",13)(5,"span"),I(6,2),a(),r(7,"div",14),p(8,Re,3,0,"button",15)(9,De,9,1,"sh-menu"),a()(),r(10,"app-test-url",16,1),h("targetUrlChange",function(g){return _(t),R(n.targetUrlModel,g)||(n.targetUrlModel=g),c(g)})("testSignalChange",function(g){return _(t),R(n.testSignal,g)||(n.testSignal=g),c(g)}),a(),A(12),p(13,Ie,3,1,"app-destination-list-item",17),a(),p(14,fe,1,0,"app-destination-list"),p(15,he,1,1,"app-single-destination",18),r(16,"div",19)(17,"button",20),d("click",function(){return n.goBack()}),E(18,3),O(19,"sh-icon"),C(),a(),r(20,"button",21),E(21,4),p(22,Me,2,0,"sh-icon",22)(23,Pe,2,0,"sh-icon"),C(),a()()(),p(24,Ae,16,4,"sh-dialog",23)}if(e&2){let t=y(!!n.targetUrlModel());T(8),F(t?9:8),T(2),f("targetUrl",n.targetUrlModel)("testSignal",n.testSignal),D("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",!1)("askToCreate",!1)("testExpectation","containsBackup")("moduleType","Backend"),T(2);let s=y(n.selectedDestinationTypeOption());T(),F(s?13:-1),T(),F(t?-1:14),T(),F(t?15:-1),T(5),D("disabled",n.testSignal()=="testing"||!t),T(2),F(n.testSignal()=="testing"?22:23),T(2),F(n.targetUrlDialogOpen()?24:-1)}},dependencies:[Ce,Se,de,ie,ne,Q,Y,Z,te,ee,le,_e,ce,oe,ae,re,ue],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-8)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-8)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}.target-dialog-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:.5rem}"],changeDetection:0})};export{x as default};
@@ -1,3 +1,3 @@
1
- import{a as Ee}from"./chunk-BT44N2RL.js";import{a as Ne}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{k as Te,p as A}from"./chunk-FSFXGPH3.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-LSF3JCSI.js";import{b as he}from"./chunk-I2HYK2BL.js";import"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-3SSB4QCJ.js";import{b as D}from"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as ue,G as de,H as _e,L as pe,P as Ce,Y as ge,c as Z,e as ee,f as te,j as ne,n as oe,o as ie,p as ae,q as se,r as re,s as le,t as ce,v as me}from"./chunk-YCLTQEU6.js";import{b as Fe,d as Se}from"./chunk-2LSZ2I43.js";import{b as W,d as Q,e as Y}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as F,Bb as l,Cb as o,Db as a,Hb as I,Ib as M,Kb as v,Ra as u,Rb as p,Sb as C,Tb as O,U as b,Ub as x,Vb as w,Xb as K,Z as _,Zb as N,ca as E,da as f,eb as R,ic as J,oa as L,qa as $,qc as X,rc as q,sc as V,ub as k,vb as G,wb as B,xc as H,yb as y,yc as z,zb as U,zc as j}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var T=class s{#e=new Map;saveState(t){let e=crypto.randomUUID();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})};var Ie=()=>["backup"];function Me(s,t){s&1&&a(0,"sh-progress-bar",11)}function Oe(s,t){if(s&1&&(l(0,"sh-form-field"),a(1,"input",35),o()),s&2){let e=t.$implicit,n=t.$index;u(),F("id",H("filter-",n))("formControl",e)}}function De(s,t){if(s&1){let e=v();l(0,"form",12)(1,"sh-select",13)(2,"label",14),p(3,1),a(4,"sh-icon",15),C(),o(),a(5,"input",16),o(),l(6,"sh-form-field")(7,"label",17),p(8,2),a(9,"sh-icon",18),C(),o(),a(10,"textarea",19),o(),l(11,"sh-form-field")(12,"label",20),p(13,3),a(14,"sh-icon",21),C(),o(),a(15,"textarea",22),o()(),l(16,"sh-divider"),O(17,4),o(),l(18,"form",12)(19,"sh-form-field")(20,"label",23),p(21,5),a(22,"sh-icon",24),C(),o(),a(23,"input",25),o(),l(24,"sh-form-field")(25,"label",26),p(26,6),a(27,"sh-icon",27),C(),o(),a(28,"input",28),o(),l(29,"app-toggle-card",29),I(30,30),O(31,7),M(),I(32,31),y(33,Oe,2,3,"sh-form-field",null,B),M(),o()(),l(35,"app-options-list",32),V("optionsChange",function(r){E(e);let m=N();return q(m.settings,r)||(m.settings=r),f(r)}),o(),l(36,"div",33)(37,"button",34),K("click",function(){E(e);let r=N();return f(r.submit())}),p(38,8),a(39,"sh-icon"),C(),o()()}if(s&2){let e=N();F("formGroup",e.baseCmdForm),u(),F("options",e.commandOptions()??j(10,Ie))("inlineSearch",!0),u(17),F("formGroup",e.standardFields),u(11),F("disableToggle",!0),u(4),U(e.standardFields.controls.filters.controls),u(2),X("options",e.settings),F("hasFreeTextSettings",!0),u(2),J("loading",e.isSubmitting()),u(2),x(e.baseCmdForm.value.command),w(38)}}var c=new re,P=class s{#e=_(A);#n=_(Se);#o=_(Q);#t=_(W);#a=_(Fe);#s=_(he);#i=_(T);#r=D(this.#t.params);commandOptions=D(this.#a.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=c.group({"backup-id":c.control(""),"backup-name":c.control(""),dbpath:c.control(""),filters:c.array([])});baseCmdForm=c.group({command:c.control("backup"),targetUrl:c.control(""),arguments:c.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#c=$(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.applyStateFromUrl(),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(c.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#s.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",r=(e.arguments??"").split(`
1
+ import{a as Ee}from"./chunk-NBPZDFGF.js";import{a as Ne}from"./chunk-JW6W3ER7.js";import"./chunk-W4HWOC3K.js";import"./chunk-JKIZ6U22.js";import"./chunk-4QE3MT56.js";import{k as Te,p as A}from"./chunk-UGEDZCTM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import{b as he}from"./chunk-I2HYK2BL.js";import"./chunk-B35WNLRM.js";import"./chunk-SLS3DCJP.js";import"./chunk-SUY5AQLW.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-AZJ2P3YU.js";import"./chunk-3SSB4QCJ.js";import{b as D}from"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as ue,G as de,H as _e,L as pe,P as Ce,Y as ge,c as Z,e as ee,f as te,j as ne,n as oe,o as ie,p as ae,q as se,r as re,s as le,t as ce,v as me}from"./chunk-YCLTQEU6.js";import{b as Fe,d as Se}from"./chunk-2LSZ2I43.js";import{b as W,d as Q,e as Y}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as F,Bb as l,Cb as o,Db as a,Hb as I,Ib as M,Kb as v,Ra as u,Rb as p,Sb as C,Tb as O,U as b,Ub as x,Vb as w,Xb as K,Z as _,Zb as N,ca as E,da as f,eb as R,ic as J,oa as L,qa as $,qc as X,rc as q,sc as V,ub as k,vb as G,wb as B,xc as H,yb as y,yc as z,zb as U,zc as j}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var T=class s{#e=new Map;saveState(t){let e=crypto.randomUUID();return this.#e.set(e,t),e}getState(t){return this.#e.get(t)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})};var Ie=()=>["backup"];function Me(s,t){s&1&&a(0,"sh-progress-bar",11)}function Oe(s,t){if(s&1&&(l(0,"sh-form-field"),a(1,"input",35),o()),s&2){let e=t.$implicit,n=t.$index;u(),F("id",H("filter-",n))("formControl",e)}}function De(s,t){if(s&1){let e=v();l(0,"form",12)(1,"sh-select",13)(2,"label",14),p(3,1),a(4,"sh-icon",15),C(),o(),a(5,"input",16),o(),l(6,"sh-form-field")(7,"label",17),p(8,2),a(9,"sh-icon",18),C(),o(),a(10,"textarea",19),o(),l(11,"sh-form-field")(12,"label",20),p(13,3),a(14,"sh-icon",21),C(),o(),a(15,"textarea",22),o()(),l(16,"sh-divider"),O(17,4),o(),l(18,"form",12)(19,"sh-form-field")(20,"label",23),p(21,5),a(22,"sh-icon",24),C(),o(),a(23,"input",25),o(),l(24,"sh-form-field")(25,"label",26),p(26,6),a(27,"sh-icon",27),C(),o(),a(28,"input",28),o(),l(29,"app-toggle-card",29),I(30,30),O(31,7),M(),I(32,31),y(33,Oe,2,3,"sh-form-field",null,B),M(),o()(),l(35,"app-options-list",32),V("optionsChange",function(r){E(e);let m=N();return q(m.settings,r)||(m.settings=r),f(r)}),o(),l(36,"div",33)(37,"button",34),K("click",function(){E(e);let r=N();return f(r.submit())}),p(38,8),a(39,"sh-icon"),C(),o()()}if(s&2){let e=N();F("formGroup",e.baseCmdForm),u(),F("options",e.commandOptions()??j(10,Ie))("inlineSearch",!0),u(17),F("formGroup",e.standardFields),u(11),F("disableToggle",!0),u(4),U(e.standardFields.controls.filters.controls),u(2),X("options",e.settings),F("hasFreeTextSettings",!0),u(2),J("loading",e.isSubmitting()),u(2),x(e.baseCmdForm.value.command),w(38)}}var c=new re,P=class s{#e=_(A);#n=_(Se);#o=_(Q);#t=_(W);#a=_(Fe);#s=_(he);#i=_(T);#r=D(this.#t.params);commandOptions=D(this.#a.getApiV1Commandline());isSubmitting=L(!1);optionsFields=this.#e.optionsFields;standardFields=c.group({"backup-id":c.control(""),"backup-name":c.control(""),dbpath:c.control(""),filters:c.array([])});baseCmdForm=c.group({command:c.control("backup"),targetUrl:c.control(""),arguments:c.control("")});finishedLoading=this.#e.finishedLoading;backupId=this.#e.backupId;settings=this.#e.settings;#c=$(()=>{let t=this.#r()?.id;this.#e.backupId.set(t),this.getBackup(t)});getBackup(t){this.#n.getApiV1BackupById({id:t}).subscribe({next:e=>{this.#e.mapScheduleToForm(e.Schedule??null),e.Backup&&(this.#e.mapGeneralToForm(e.Backup),this.mapStandardFieldsToForm(e.Backup),this.mapBaseCmdToForm(e.Backup),this.#e.mapOptionsToForms(e.Backup,!0)),this.applyStateFromUrl(),this.#e.finishedLoading.set(!0)}})}mapStandardFieldsToForm(t){this.standardFields.patchValue({dbpath:t.DBPath,"backup-id":t.ID,"backup-name":t.Name}),t.Filters&&t.Filters.length&&t.Filters.map(e=>{this.standardFields.controls.filters.push(c.control(`${e.Include?"":"-"}${e.Expression}`))})}submit(){this.#s.resumeDialogCheck(()=>this.#l())}#l(){this.isSubmitting.set(!0);let t=this.updateUrl(),e=this.baseCmdForm.value,n=e.targetUrl??"",r=(e.arguments??"").split(`
2
2
  `)??[],m=[n,...r].filter(i=>i.length>0),g=this.standardFields.value,S=g.filters??[],h=[e.command,...m,`--backup-name=${g["backup-name"]}`,`--dbpath=${g.dbpath}`,`--backup-id=${g["backup-id"]}`,...S.filter(i=>i).map(i=>i.startsWith("-")?`--exclude=${i?.slice(1)}`:`--include=${i}`),...this.#e.mapFormsToSettings(["backup-id","backup-name","dbpath"]).map(i=>`${i.Name.startsWith("--")?"":"--"}${i.Name}=${i.Value}`),"--disable-module=console-password-input"];this.#n.postApiV1Commandline({requestBody:h}).subscribe({next:i=>{i.Status==="OK"&&this.#o.navigate(["backup",this.backupId(),"commandline",i.ID],{queryParams:{state:t}})},error:()=>{this.isSubmitting.set(!1)}})}mapBaseCmdToForm(t){let e=t.TargetURL??null;e&&this.baseCmdForm.patchValue({targetUrl:e??"",arguments:t.Sources?.join(`
3
3
  `)??""})}updateUrl(){let t=this.baseCmdForm.value,e=this.standardFields.value,n=e.filters??[],r=this.settings(),m=this.#i.saveState({command:t.command,targetUrl:t.targetUrl,arguments:t.arguments,backupId:e["backup-id"],backupName:e["backup-name"],dbpath:e.dbpath,filters:n,options:r});return this.#o.navigate([],{relativeTo:this.#t,queryParams:{state:m},replaceUrl:!0}),m}applyStateFromUrl(){let e=this.#t.snapshot.queryParams.state;if(!e)return;let n=this.#i.getState(e);n&&(this.baseCmdForm.patchValue({command:n.command,targetUrl:n.targetUrl,arguments:n.arguments}),this.standardFields.patchValue({"backup-id":n.backupId,"backup-name":n.backupName,dbpath:n.dbpath}),n.filters&&(this.standardFields.controls.filters.clear(),n.filters.forEach(r=>{this.standardFields.controls.filters.push(c.control(r))})),n.options&&n.options.length>0&&this.settings.set(n.options))}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=R({type:s,selectors:[["app-commandline"]],features:[z([A])],decls:8,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize` Command ${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize` TargetUrl ${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON:`;let r;r=$localize` Commandline Arguments ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let m;m=$localize`Advanced options`;let g;g=$localize` Backup ID ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let S;S=$localize` Backup Name ${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON:`;let h;h=$localize`Filters`;let i;return i=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SH_ICON: Run "${"\uFFFD0\uFFFD"}:INTERPOLATION:" command now `,[t,e,n,r,m,g,S,h,i,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"indeterminate","primary"],[3,"formGroup"],["placeholder","Select a command...",3,"options","inlineSearch"],["for","command"],["shTooltip","Choose the command to execute"],["type","text","id","command","formControlName","command"],["for","targetUrl"],["shTooltip","Enter the URL of the backup target"],["id","targetUrl","autocomplete","off","formControlName","targetUrl"],["for","arguments"],["shTooltip","Enter one argument per line without quotes (e.g., *.txt)"],["id","arguments","autocomplete","off","rows","5","formControlName","arguments","placeholder","Enter one argument per line without quotes (e.g., *.txt)",1,"arguments"],["for","backup-id"],["shTooltip","The ID of the backup configuration this run belongs to (can be empty)"],["id","backup-id","formControlName","backup-id"],["for","backup-name"],["shTooltip","The optional name of the backup"],["id","backup-name","formControlName","backup-name"],[3,"disableToggle"],["title",""],["content","","formGroupName","filters"],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","",1,"raised","primary",3,"click"],[3,"id","formControl"]]},template:function(e,n){e&1&&(a(0,"app-status-bar"),l(1,"section")(2,"div",9)(3,"button",10),p(4,0),a(5,"sh-icon"),C(),o()(),k(6,Me,1,0,"sh-progress-bar",11)(7,De,40,11),o()),e&2&&(u(6),G(n.finishedLoading()?7:6))},dependencies:[le,ne,Z,ee,te,Ne,Ee,Te,ce,oe,se,ae,ie,Y,_e,ue,de,Ce,pe,me,ge],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-width:40rem;padding:2.5rem;gap:1.25rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.arguments[_ngcontent-%COMP%]{min-height:6rem;white-space:pre}"],changeDetection:0})};export{P as default};
@@ -0,0 +1 @@
1
+ import"./chunk-7CGTOI24.js";var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import("./chunk-OSAM5F7M.js")},{path:"destination",loadComponent:()=>import("./chunk-CNOKPOR3.js")},{path:"source-data",loadComponent:()=>import("./chunk-6HMNDYMY.js")},{path:"schedule",loadComponent:()=>import("./chunk-77ALZWIA.js")},{path:"options",loadComponent:()=>import("./chunk-LMZN2X5M.js")}];export{o as default};
@@ -1 +1 @@
1
- import{a,b}from"./chunk-B6CAREL6.js";import"./chunk-BT44N2RL.js";import"./chunk-FSFXGPH3.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-LSF3JCSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.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 createRestoreOptionsForm,b as default};
1
+ import{a,b}from"./chunk-2XMYVT7N.js";import"./chunk-NBPZDFGF.js";import"./chunk-UGEDZCTM.js";import"./chunk-ITA7DTN3.js";import"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-I4XRVBRQ.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.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 createRestoreOptionsForm,b as default};
@@ -1 +1 @@
1
- import{a as ne}from"./chunk-BT44N2RL.js";import{p as ee}from"./chunk-FSFXGPH3.js";import"./chunk-ITA7DTN3.js";import{d as Z}from"./chunk-Q72Y55NB.js";import"./chunk-LSF3JCSI.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as j,H as Q,P as q,c as X,e as W,i as z,k as V,s as H,v as Y}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as U,d as J}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as m,Bb as i,Cb as a,Db as P,Kb as g,Ra as p,Rb as N,Sb as E,Tb as l,Wc as K,Xb as f,Z as C,Zb as c,ca as O,da as S,eb as $,ec as v,fc as B,ic as x,oa as w,qc as d,rc as T,sc as u,ub as L,vb as G,zc as D}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var te=["formRef"],ie=()=>["--skip-files-larger-than","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function oe(s,r){s&1&&(i(0,"p"),l(1,4),a())}function ae(s,r){if(s&1){let n=g();i(0,"p"),l(1,5),a(),i(2,"app-timespan",21),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionTime,o)||(t.optionsFields.backupRetentionTime=o),S(o)}),i(3,"label",22),l(4,6),a()()}if(s&2){let n=c();p(2),m("customId","backupRetentionTime"),d("ngModel",n.optionsFields.backupRetentionTime)}}function se(s,r){if(s&1){let n=g();i(0,"p"),l(1,7),a(),i(2,"sh-form-field")(3,"label",23),l(4,8),a(),i(5,"input",24),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionVersions,o)||(t.optionsFields.backupRetentionVersions=o),S(o)}),a()()}if(s&2){let n=c();p(5),d("ngModel",n.optionsFields.backupRetentionVersions)}}function _e(s,r){s&1&&(i(0,"p"),l(1,9),a())}function le(s,r){if(s&1){let n=g();i(0,"p"),l(1,10),a(),i(2,"sh-form-field")(3,"p"),l(4,11),a(),i(5,"label",25),l(6,12),a(),i(7,"input",26),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionCustom,o)||(t.optionsFields.backupRetentionCustom=o),S(o)}),a()()}if(s&2){let n=c();p(7),d("ngModel",n.optionsFields.backupRetentionCustom)}}var re=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],h=class s{#e=C(ee);#n=C(J);#t=C(U);formRef=K.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=w(re);goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){switch(this.#e.validateBeforeSubmit()){case"general":this.#n.navigate(["general"],{relativeTo:this.#t.parent});return;case"destination":this.#n.navigate(["destination"],{relativeTo:this.#t.parent});return;case"source":this.#n.navigate(["source-data"],{relativeTo:this.#t.parent});return}this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=$({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,te,5),n&2&&B()},decls:20,vars:12,consts:()=>{let r;r=$localize`Options`;let n;n=$localize`Backup retention`;let e;e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let t;t=$localize`Nothing will be deleted. The backup size will grow with each change.`;let M;M=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let I;I=$localize`Time to keep versions`;let R;R=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let b;b=$localize`Number of versions`;let A;A=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let y;y=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let k;k=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let F;return F=$localize`Retention expression`,[r,n,e,o,t,M,I,R,b,A,y,k,F,[1,"title-30"],["value","value","label","name",3,"options","inlineSearch","isClearable"],["for","size"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[3,"ngModelChange","customId","ngModel"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(i(0,"section")(1,"h3",13),l(2,0),a(),i(3,"sh-select",14)(4,"label",15),l(5,1),a(),i(6,"input",16),u("ngModelChange",function(t){return T(e.optionsFields.backupRetention,t)||(e.optionsFields.backupRetention=t),t}),a()(),L(7,oe,2,0,"p")(8,ae,5,2)(9,se,6,1)(10,_e,2,0,"p")(11,le,8,1),i(12,"app-options-list",17),u("optionsChange",function(t){return T(e.settings,t)||(e.settings=t),t}),a(),i(13,"div",18)(14,"button",19),f("click",function(){return e.goBack()}),N(15,2),P(16,"sh-icon"),E(),a(),i(17,"button",20),f("click",function(){return e.submit()}),N(18,3),P(19,"sh-icon"),E(),a()()()),n&2&&(p(3),m("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),d("ngModel",e.optionsFields.backupRetention),p(),G(e.optionsFields.backupRetention()==="all"?7:e.optionsFields.backupRetention()==="time"?8:e.optionsFields.backupRetention()==="versions"?9:e.optionsFields.backupRetention()==="smart"?10:e.optionsFields.backupRetention()==="custom"?11:-1),p(5),d("options",e.settings),m("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",D(11,ie)),p(5),x("loading",e.isSubmitting()))},dependencies:[H,X,V,W,z,ne,Z,j,Y,q,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
1
+ import{a as ne}from"./chunk-NBPZDFGF.js";import{p as ee}from"./chunk-UGEDZCTM.js";import"./chunk-ITA7DTN3.js";import{d as Z}from"./chunk-Q72Y55NB.js";import"./chunk-NXF5BMPG.js";import"./chunk-6Q6SSTBK.js";import"./chunk-HA7XREWO.js";import"./chunk-X64LSE6Y.js";import"./chunk-RFB5A3B7.js";import"./chunk-3SSB4QCJ.js";import"./chunk-AYOFR344.js";import"./chunk-UUQWSINE.js";import"./chunk-BEXYTIOL.js";import"./chunk-LO5YNFFR.js";import{B as j,H as Q,P as q,c as X,e as W,i as z,k as V,s as H,v as Y}from"./chunk-YCLTQEU6.js";import"./chunk-2LSZ2I43.js";import{b as U,d as J}from"./chunk-BMWZYMK6.js";import"./chunk-7FYL7MVA.js";import"./chunk-NBTTYKXH.js";import"./chunk-OQ6BKP5N.js";import"./chunk-VAQ435AR.js";import{Ab as m,Bb as i,Cb as a,Db as P,Kb as g,Ra as p,Rb as N,Sb as E,Tb as l,Wc as K,Xb as f,Z as C,Zb as c,ca as O,da as S,eb as $,ec as v,fc as B,ic as x,oa as w,qc as d,rc as T,sc as u,ub as L,vb as G,zc as D}from"./chunk-ERITO7WM.js";import"./chunk-7CGTOI24.js";var te=["formRef"],ie=()=>["--skip-files-larger-than","encryption-module","no-encryption","--no-encryption","compression-module","--exclude-files-attributes","keep-time","keep-versions","retention-policy"];function oe(s,r){s&1&&(i(0,"p"),l(1,4),a())}function ae(s,r){if(s&1){let n=g();i(0,"p"),l(1,5),a(),i(2,"app-timespan",21),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionTime,o)||(t.optionsFields.backupRetentionTime=o),S(o)}),i(3,"label",22),l(4,6),a()()}if(s&2){let n=c();p(2),m("customId","backupRetentionTime"),d("ngModel",n.optionsFields.backupRetentionTime)}}function se(s,r){if(s&1){let n=g();i(0,"p"),l(1,7),a(),i(2,"sh-form-field")(3,"label",23),l(4,8),a(),i(5,"input",24),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionVersions,o)||(t.optionsFields.backupRetentionVersions=o),S(o)}),a()()}if(s&2){let n=c();p(5),d("ngModel",n.optionsFields.backupRetentionVersions)}}function _e(s,r){s&1&&(i(0,"p"),l(1,9),a())}function le(s,r){if(s&1){let n=g();i(0,"p"),l(1,10),a(),i(2,"sh-form-field")(3,"p"),l(4,11),a(),i(5,"label",25),l(6,12),a(),i(7,"input",26),u("ngModelChange",function(o){O(n);let t=c();return T(t.optionsFields.backupRetentionCustom,o)||(t.optionsFields.backupRetentionCustom=o),S(o)}),a()()}if(s&2){let n=c();p(7),d("ngModel",n.optionsFields.backupRetentionCustom)}}var re=[{value:"all",name:$localize`Keep all backups`},{value:"time",name:$localize`Delete backups that are older than`},{value:"versions",name:$localize`Keep a specific number of backups`},{value:"smart",name:$localize`Smart backup retention`},{value:"custom",name:$localize`Custom backup retention`}],h=class s{#e=C(ee);#n=C(J);#t=C(U);formRef=K.required("formRef");isSubmitting=this.#e.isSubmitting;settings=this.#e.settings;optionsFields=this.#e.optionsFields;applicationOptions=this.#e.applicationOptions;retentionOptions=w(re);goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#t.parent})}submit(){switch(this.#e.validateBeforeSubmit()){case"general":this.#n.navigate(["general"],{relativeTo:this.#t.parent});return;case"destination":this.#n.navigate(["destination"],{relativeTo:this.#t.parent});return;case"source":this.#n.navigate(["source-data"],{relativeTo:this.#t.parent});return}this.#e.submit()}static \u0275fac=function(n){return new(n||s)};static \u0275cmp=$({type:s,selectors:[["app-advanced-options-settings"]],viewQuery:function(n,e){n&1&&v(e.formRef,te,5),n&2&&B()},decls:20,vars:12,consts:()=>{let r;r=$localize`Options`;let n;n=$localize`Backup retention`;let e;e=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let t;t=$localize`Nothing will be deleted. The backup size will grow with each change.`;let M;M=$localize`If at least one newer backup is found, all backups older than this date are deleted.`;let I;I=$localize`Time to keep versions`;let R;R=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let b;b=$localize`Number of versions`;let A;A=$localize` Over time backups will be deleted automatically. There will remain one backup for each of the last 7 days, each of the last 4 weeks, each of the last 12 months. There will always be at least one remaining backup. `;let y;y=$localize` Enter a retention strategy manually. Placeholders are D/W/Y for days/weeks/years and U for unlimited. The syntax is: 7D:1D,4W:1W,36M:1M. This example keeps one backup for each of the next 7 days, one for each of the next 4 weeks, and one for each of the next 36 months. This can also be written as 1W:1D,1M:1W,3Y:1M. `;let k;k=$localize`Once there are more backups than the specified number, the oldest backups are deleted.`;let F;return F=$localize`Retention expression`,[r,n,e,o,t,M,I,R,b,A,y,k,F,[1,"title-30"],["value","value","label","name",3,"options","inlineSearch","isClearable"],["for","size"],["type","text",3,"ngModelChange","ngModel"],[3,"optionsChange","options","applicationOptions","hasFreeTextSettings","hiddenOptions"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[3,"ngModelChange","customId","ngModel"],["for","backupRetentionTime"],["for","backupRetentionVersions"],["type","number","id","backupRetentionVersions",3,"ngModelChange","ngModel"],["for","backupRetentionCustom"],["type","text","id","backupRetentionCustom",3,"ngModelChange","ngModel"]]},template:function(n,e){n&1&&(i(0,"section")(1,"h3",13),l(2,0),a(),i(3,"sh-select",14)(4,"label",15),l(5,1),a(),i(6,"input",16),u("ngModelChange",function(t){return T(e.optionsFields.backupRetention,t)||(e.optionsFields.backupRetention=t),t}),a()(),L(7,oe,2,0,"p")(8,ae,5,2)(9,se,6,1)(10,_e,2,0,"p")(11,le,8,1),i(12,"app-options-list",17),u("optionsChange",function(t){return T(e.settings,t)||(e.settings=t),t}),a(),i(13,"div",18)(14,"button",19),f("click",function(){return e.goBack()}),N(15,2),P(16,"sh-icon"),E(),a(),i(17,"button",20),f("click",function(){return e.submit()}),N(18,3),P(19,"sh-icon"),E(),a()()()),n&2&&(p(3),m("options",e.retentionOptions())("inlineSearch",!0)("isClearable",!1),p(3),d("ngModel",e.optionsFields.backupRetention),p(),G(e.optionsFields.backupRetention()==="all"?7:e.optionsFields.backupRetention()==="time"?8:e.optionsFields.backupRetention()==="versions"?9:e.optionsFields.backupRetention()==="smart"?10:e.optionsFields.backupRetention()==="custom"?11:-1),p(5),d("options",e.settings),m("applicationOptions",e.applicationOptions())("hasFreeTextSettings",!0)("hiddenOptions",D(11,ie)),p(5),x("loading",e.isSubmitting()))},dependencies:[H,X,V,W,z,ne,Z,j,Y,q,Q],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:37.5rem;padding:2.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.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}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 2.5rem;align-items:flex-end}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}"],changeDetection:0})};export{h as default};
@@ -1,2 +1,2 @@
1
- import{a as ge,c as fe,d as xe}from"./chunk-Q72Y55NB.js";import{h as ue}from"./chunk-LSF3JCSI.js";import{a as Ce}from"./chunk-BEXYTIOL.js";import{B as le,H as _e,K as pe,P as se,V as ce,W as me,Y as de,b as ee,c as te,e as ne,i as ie,k as oe,s as ae,v as re}from"./chunk-YCLTQEU6.js";import{aa as Z}from"./chunk-OQ6BKP5N.js";import{Ab as s,Ac as T,Bb as _,Cb as p,Db as M,Hb as R,Ib as N,Ic as v,Jb as f,Kb as x,Pc as H,Ra as l,Rb as k,Sb as G,Tb as Q,Vc as J,Xb as u,Z as j,Zb as r,Zc as Y,ca as d,da as C,eb as q,gc as g,ic as B,jb as S,lc as m,mc as z,nc as U,oa as b,tc as K,ub as F,uc as E,vb as h,vc as O,wb as $,yb as A,zb as D,zc as W}from"./chunk-ERITO7WM.js";import{a as L,b as P}from"./chunk-7CGTOI24.js";var Te=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var Fe=()=>({updateOn:"blur"}),w=t=>({formView:t}),y=t=>({$implicit:t});function he(t,i){if(t&1){let e=x();_(0,"button",14),u("click",function(){d(e);let n=r();return C(n.showTextArea.set(!1))}),k(1,6),M(2,"sh-icon"),G(),p()}}function we(t,i){if(t&1){let e=x();_(0,"button",18,1),u("click",function(){let n=d(e).$implicit,a=r(3);return C(a.addSetting(n))}),_(2,"div",19),m(3),_(4,"p"),m(5),p()()()}if(t&2){let e=i.$implicit;B("deprecated",e.deprecatedDescription),l(3),U(" ",e.shortDescription," "),l(2),z(e.name)}}function ye(t,i){if(t&1&&(_(0,"h3",10),m(1),p(),A(2,we,6,4,"button",17,$)),t&2){let e=i.$implicit;l(),z(e.displayName),l(),D(e.options)}}function Ve(t,i){if(t&1){let e=x();_(0,"sh-menu")(1,"button",20)(2,"sh-icon"),m(3,"dots-three-vertical"),p()(),R(4,16),_(5,"button",14),u("click",function(){d(e);let n=r(2);return C(n.addFreeTextSetting())}),k(6,8),M(7,"sh-icon"),G(),p(),_(8,"button",21),u("click",function(){d(e);let n=r(2);return C(n.showTextArea.set(!0))}),_(9,"sh-icon"),m(10,"link"),p(),m(11," Edit contents as text "),p(),N(),p()}}function Le(t,i){if(t&1&&(_(0,"sh-menu",15)(1,"button",12),k(2,7),M(3,"sh-icon"),G(),p(),R(4,16),A(5,ye,4,1,null,null,$),N(),p(),F(7,Ve,12,0,"sh-menu")),t&2){let e=r();s("searchable",!0),l(5),D(e.nonSelectedOptionsGrouped()),l(2),h(e.hasFreeTextSettings()?7:-1)}}function Ie(t,i){if(t&1){let e=x();_(0,"textarea",22),u("ngModelChange",function(n){d(e);let a=r();return C(a.updateSettingsFromText(n))}),p()}if(t&2){let e=r();s("ngModel",e.settingsAsText())("ngModelOptions",W(2,Fe))}}function Me(t,i){t&1&&(_(0,"div",23),m(1,"Add a setting above to get started."),p())}function Ne(t,i){t&1&&(_(0,"sh-icon",31),m(1," warning-octagon "),p())}function Ee(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"archive"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.deprecatedDescription)}}function ve(t,i){if(t&1&&(_(0,"sh-icon",33),m(1,"question"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.longDescription)}}function Pe(t,i){if(t&1&&(F(0,Ne,2,0,"sh-icon",31),_(1,"span"),m(2),p(),F(3,Ee,2,1,"sh-icon",32)(4,ve,2,1,"sh-icon",33)),t&2){let e=r().$implicit,o=O(1);h(o?0:-1),l(),B("deprecated",e.FormView.deprecatedDescription),l(),z(e.FormView.shortDescription),l(),h(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function be(t,i){t&1&&f(0)}function $e(t,i){if(t&1){let e=x();_(0,"div",25)(1,"label"),S(2,be,1,0,"ng-container",34),p(),_(3,"div")(4,"sh-form-field")(5,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateFreeTextSettingName(a,n))}),p(),_(6,"sh-icon",36),m(7,"rectangle-dashed"),p()()(),_(8,"div")(9,"sh-form-field")(10,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(11,"sh-icon",36),m(12,"textbox"),p()()()()}if(t&2){let e=r().$implicit,o=g(3);l(2),s("ngTemplateOutlet",o),l(3),s("ngModel",e.Name),l(5),s("ngModel",e.Value())}}function Ae(t,i){t&1&&f(0)}function De(t,i){if(t&1){let e=x();_(0,"app-file-tree",26)(1,"label",37),S(2,Ae,1,0,"ng-container",34),p(),_(3,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);s("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("id",n)("ngModel",e.Value())}}function Re(t,i){if(t&1){let e=x();_(0,"app-file-tree",27),M(1,"label",37),_(2,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=O(0);s("startingPath",e.Value()),l(),s("for",o),l(),s("id",o)("ngModel",e.Value())}}function ke(t,i){t&1&&f(0)}function Ge(t,i){t&1&&f(0)}function Be(t,i){t&1&&(_(0,"sh-icon",36),m(1,"link"),p())}function ze(t,i){t&1&&(_(0,"sh-icon",36),m(1,"hard-drives"),p())}function Ue(t,i){t&1&&(_(0,"sh-icon",36),m(1,"jar"),p())}function Ke(t,i){t&1&&(_(0,"sh-icon",36),m(1,"envelope"),p())}function He(t,i){t&1&&(_(0,"sh-icon",36),m(1,"textbox"),p())}function Je(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,ke,1,0,"ng-container",34)(3,Ge,1,0,"ng-container",39),p(),_(4,"input",40),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),F(5,Be,2,0,"sh-icon",36)(6,ze,2,0,"sh-icon",36)(7,Ue,2,0,"sh-icon",36)(8,Ke,2,0,"sh-icon",36)(9,He,2,0,"sh-icon",36),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),l(),h(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9)}}function Xe(t,i){t&1&&f(0)}function je(t,i){t&1&&f(0)}function qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye "),p()}}function Qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye-slash "),p()}}function We(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,Xe,1,0,"ng-container",34)(3,je,1,0,"ng-container",39),p(),_(4,"input",41),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"password"),p(),F(7,qe,2,0,"sh-icon",42)(8,Qe,2,0,"sh-icon",42),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),h(e.showPassword?7:8)}}function Ye(t,i){t&1&&f(0)}function Ze(t,i){t&1&&f(0)}function et(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function tt(t,i){if(t&1){let e=x();_(0,"sh-select",44)(1,"label",37),S(2,Ye,1,0,"ng-container",34)(3,Ze,1,0,"ng-container",39),p(),_(4,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,et,1,1,"ng-template",null,3,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(11,y,T(9,w,o.FormView))),l(),s("id",a)("ngModel",o.Value())}}function nt(t,i){t&1&&f(0)}function it(t,i){t&1&&f(0)}function ot(t,i){if(t&1){let e=x();_(0,"app-size",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,nt,1,0,"ng-container",34)(3,it,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function at(t,i){t&1&&f(0)}function rt(t,i){t&1&&f(0)}function lt(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,at,1,0,"ng-container",34)(3,rt,1,0,"ng-container",39),p(),_(4,"input",46),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"numpad"),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function _t(t,i){t&1&&f(0)}function pt(t,i){t&1&&f(0)}function st(t,i){if(t&1){let e=x();_(0,"sh-toggle",29)(1,"label",37),S(2,_t,1,0,"ng-container",34)(3,pt,1,0,"ng-container",39),p(),_(4,"input",47),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function ct(t,i){t&1&&f(0)}function mt(t,i){t&1&&f(0)}function dt(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function Ct(t,i){if(t&1){let e=x();_(0,"sh-select",48)(1,"label",37),S(2,ct,1,0,"ng-container",34)(3,mt,1,0,"ng-container",39),p(),_(4,"input",49),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,dt,1,1,"ng-template",null,4,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(10,y,T(8,w,o.FormView))),l(),s("ngModel",o.Value())}}function ut(t,i){t&1&&f(0)}function gt(t,i){t&1&&f(0)}function ft(t,i){if(t&1){let e=x();_(0,"app-timespan",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,ut,1,0,"ng-container",34)(3,gt,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function xt(t,i){if(t&1){let e=x();K(0)(1),S(2,Pe,5,5,"ng-template",null,2,v),_(4,"div",24),F(5,$e,13,3,"div",25)(6,De,4,9,"app-file-tree",26)(7,Re,3,4,"app-file-tree",27)(8,Je,10,12,"sh-form-field")(9,We,9,12,"sh-form-field")(10,tt,7,13)(11,ot,4,11,"app-size",28)(12,lt,7,10,"sh-form-field")(13,st,5,10,"sh-toggle",29)(14,Ct,7,12)(15,ft,4,11,"app-timespan",28),_(16,"button",30),u("click",function(){let n=d(e).$implicit,a=r(2);return C(a.removeSetting(n))}),_(17,"sh-icon"),m(18,"x-bold"),p()()()}if(t&2){let e=i.$implicit,o=i.$index,n=r(2);E("destination-"+e.Name+o),l(),E(n.inAppOptions(e.Name)),l(3),B("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),l(),h(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function Tt(t,i){if(t&1&&(F(0,Me,2,0,"div",23),A(1,xt,19,5,null,null,$)),t&2){let e=r();h(e.selectedSettings().length===0?0:-1),l(),D(e.selectedSettings())}}function St(t,i){if(t&1&&(_(0,"sh-icon",50),m(1,"x-circle"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ot(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"warning"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ft(t,i){if(t&1&&(K(0),F(1,St,2,1,"sh-icon",50)(2,Ot,2,1,"sh-icon",32)),t&2){r();let e=O(0),o=r().$implicit,n=E(o.formView.validate(e));l(),h((n==null?null:n.type)==="error"?1:(n==null?null:n.type)==="warning"?2:-1)}}function ht(t,i){if(t&1&&(K(0),F(1,Ft,3,2)),t&2){let e=r().$implicit,n=(E(e.Value())??"").toString().trim()==="";l(),h(!n&&e.formView.validate?1:-1)}}function wt(t,i){if(t&1&&F(0,ht,2,2),t&2){let e=i.$implicit;h(e.Value?0:-1)}}var Se=class t{#e=j(Ce);options=Y.required();hiddenOptions=J([]);hasFreeTextSettings=J(!1);applicationOptions=J();showTextArea=b(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=H(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(V=>V.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let I=c?.trim().toLowerCase(),X=a.options.find(Oe=>(Oe??"").trim().toLocaleLowerCase()===I);X&&(c=X)}let V=Te.find(I=>I.name===a?.name);return V&&(a=L(L({},a),V)),P(L({},n),{Value:b(c),FormView:a})}else if(this.hasFreeTextSettings())return P(L({},n),{Value:b(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=H(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>P(L({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=H(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
1
+ import{a as ge,c as fe,d as xe}from"./chunk-Q72Y55NB.js";import{h as ue}from"./chunk-NXF5BMPG.js";import{a as Ce}from"./chunk-BEXYTIOL.js";import{B as le,H as _e,K as pe,P as se,V as ce,W as me,Y as de,b as ee,c as te,e as ne,i as ie,k as oe,s as ae,v as re}from"./chunk-YCLTQEU6.js";import{aa as Z}from"./chunk-OQ6BKP5N.js";import{Ab as s,Ac as T,Bb as _,Cb as p,Db as M,Hb as R,Ib as N,Ic as v,Jb as f,Kb as x,Pc as H,Ra as l,Rb as k,Sb as G,Tb as Q,Vc as J,Xb as u,Z as j,Zb as r,Zc as Y,ca as d,da as C,eb as q,gc as g,ic as B,jb as S,lc as m,mc as z,nc as U,oa as b,tc as K,ub as F,uc as E,vb as h,vc as O,wb as $,yb as A,zb as D,zc as W}from"./chunk-ERITO7WM.js";import{a as L,b as P}from"./chunk-7CGTOI24.js";var Te=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var Fe=()=>({updateOn:"blur"}),w=t=>({formView:t}),y=t=>({$implicit:t});function he(t,i){if(t&1){let e=x();_(0,"button",14),u("click",function(){d(e);let n=r();return C(n.showTextArea.set(!1))}),k(1,6),M(2,"sh-icon"),G(),p()}}function we(t,i){if(t&1){let e=x();_(0,"button",18,1),u("click",function(){let n=d(e).$implicit,a=r(3);return C(a.addSetting(n))}),_(2,"div",19),m(3),_(4,"p"),m(5),p()()()}if(t&2){let e=i.$implicit;B("deprecated",e.deprecatedDescription),l(3),U(" ",e.shortDescription," "),l(2),z(e.name)}}function ye(t,i){if(t&1&&(_(0,"h3",10),m(1),p(),A(2,we,6,4,"button",17,$)),t&2){let e=i.$implicit;l(),z(e.displayName),l(),D(e.options)}}function Ve(t,i){if(t&1){let e=x();_(0,"sh-menu")(1,"button",20)(2,"sh-icon"),m(3,"dots-three-vertical"),p()(),R(4,16),_(5,"button",14),u("click",function(){d(e);let n=r(2);return C(n.addFreeTextSetting())}),k(6,8),M(7,"sh-icon"),G(),p(),_(8,"button",21),u("click",function(){d(e);let n=r(2);return C(n.showTextArea.set(!0))}),_(9,"sh-icon"),m(10,"link"),p(),m(11," Edit contents as text "),p(),N(),p()}}function Le(t,i){if(t&1&&(_(0,"sh-menu",15)(1,"button",12),k(2,7),M(3,"sh-icon"),G(),p(),R(4,16),A(5,ye,4,1,null,null,$),N(),p(),F(7,Ve,12,0,"sh-menu")),t&2){let e=r();s("searchable",!0),l(5),D(e.nonSelectedOptionsGrouped()),l(2),h(e.hasFreeTextSettings()?7:-1)}}function Ie(t,i){if(t&1){let e=x();_(0,"textarea",22),u("ngModelChange",function(n){d(e);let a=r();return C(a.updateSettingsFromText(n))}),p()}if(t&2){let e=r();s("ngModel",e.settingsAsText())("ngModelOptions",W(2,Fe))}}function Me(t,i){t&1&&(_(0,"div",23),m(1,"Add a setting above to get started."),p())}function Ne(t,i){t&1&&(_(0,"sh-icon",31),m(1," warning-octagon "),p())}function Ee(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"archive"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.deprecatedDescription)}}function ve(t,i){if(t&1&&(_(0,"sh-icon",33),m(1,"question"),p()),t&2){let e=r(2).$implicit;s("shTooltip",e.FormView.longDescription)}}function Pe(t,i){if(t&1&&(F(0,Ne,2,0,"sh-icon",31),_(1,"span"),m(2),p(),F(3,Ee,2,1,"sh-icon",32)(4,ve,2,1,"sh-icon",33)),t&2){let e=r().$implicit,o=O(1);h(o?0:-1),l(),B("deprecated",e.FormView.deprecatedDescription),l(),z(e.FormView.shortDescription),l(),h(e.FormView.deprecatedDescription?3:e.FormView.longDescription?4:-1)}}function be(t,i){t&1&&f(0)}function $e(t,i){if(t&1){let e=x();_(0,"div",25)(1,"label"),S(2,be,1,0,"ng-container",34),p(),_(3,"div")(4,"sh-form-field")(5,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateFreeTextSettingName(a,n))}),p(),_(6,"sh-icon",36),m(7,"rectangle-dashed"),p()()(),_(8,"div")(9,"sh-form-field")(10,"input",35),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(11,"sh-icon",36),m(12,"textbox"),p()()()()}if(t&2){let e=r().$implicit,o=g(3);l(2),s("ngTemplateOutlet",o),l(3),s("ngModel",e.Name),l(5),s("ngModel",e.Value())}}function Ae(t,i){t&1&&f(0)}function De(t,i){if(t&1){let e=x();_(0,"app-file-tree",26)(1,"label",37),S(2,Ae,1,0,"ng-container",34),p(),_(3,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);s("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("id",n)("ngModel",e.Value())}}function Re(t,i){if(t&1){let e=x();_(0,"app-file-tree",27),M(1,"label",37),_(2,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=O(0);s("startingPath",e.Value()),l(),s("for",o),l(),s("id",o)("ngModel",e.Value())}}function ke(t,i){t&1&&f(0)}function Ge(t,i){t&1&&f(0)}function Be(t,i){t&1&&(_(0,"sh-icon",36),m(1,"link"),p())}function ze(t,i){t&1&&(_(0,"sh-icon",36),m(1,"hard-drives"),p())}function Ue(t,i){t&1&&(_(0,"sh-icon",36),m(1,"jar"),p())}function Ke(t,i){t&1&&(_(0,"sh-icon",36),m(1,"envelope"),p())}function He(t,i){t&1&&(_(0,"sh-icon",36),m(1,"textbox"),p())}function Je(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,ke,1,0,"ng-container",34)(3,Ge,1,0,"ng-container",39),p(),_(4,"input",40),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),F(5,Be,2,0,"sh-icon",36)(6,ze,2,0,"sh-icon",36)(7,Ue,2,0,"sh-icon",36)(8,Ke,2,0,"sh-icon",36)(9,He,2,0,"sh-icon",36),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),l(),h(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9)}}function Xe(t,i){t&1&&f(0)}function je(t,i){t&1&&f(0)}function qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye "),p()}}function Qe(t,i){if(t&1){let e=x();_(0,"sh-icon",43),u("click",function(){d(e);let n=r(2).$implicit;return C(n.showPassword=!n.showPassword)}),m(1," eye-slash "),p()}}function We(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,Xe,1,0,"ng-container",34)(3,je,1,0,"ng-container",39),p(),_(4,"input",41),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"password"),p(),F(7,qe,2,0,"sh-icon",42)(8,Qe,2,0,"sh-icon",42),p()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(10,y,T(8,w,e.FormView))),l(),s("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),l(3),h(e.showPassword?7:8)}}function Ye(t,i){t&1&&f(0)}function Ze(t,i){t&1&&f(0)}function et(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function tt(t,i){if(t&1){let e=x();_(0,"sh-select",44)(1,"label",37),S(2,Ye,1,0,"ng-container",34)(3,Ze,1,0,"ng-container",39),p(),_(4,"input",38),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,et,1,1,"ng-template",null,3,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("isClearable",!1)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(11,y,T(9,w,o.FormView))),l(),s("id",a)("ngModel",o.Value())}}function nt(t,i){t&1&&f(0)}function it(t,i){t&1&&f(0)}function ot(t,i){if(t&1){let e=x();_(0,"app-size",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,nt,1,0,"ng-container",34)(3,it,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function at(t,i){t&1&&f(0)}function rt(t,i){t&1&&f(0)}function lt(t,i){if(t&1){let e=x();_(0,"sh-form-field")(1,"label",37),S(2,at,1,0,"ng-container",34)(3,rt,1,0,"ng-container",39),p(),_(4,"input",46),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p(),_(5,"sh-icon",36),m(6,"numpad"),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function _t(t,i){t&1&&f(0)}function pt(t,i){t&1&&f(0)}function st(t,i){if(t&1){let e=x();_(0,"sh-toggle",29)(1,"label",37),S(2,_t,1,0,"ng-container",34)(3,pt,1,0,"ng-container",39),p(),_(4,"input",47),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(8,y,T(6,w,e.FormView))),l(),s("id",n)("ngModel",e.Value())}}function ct(t,i){t&1&&f(0)}function mt(t,i){t&1&&f(0)}function dt(t,i){if(t&1&&m(0),t&2){let e=i.$implicit;U(" ",e," ")}}function Ct(t,i){if(t&1){let e=x();_(0,"sh-select",48)(1,"label",37),S(2,ct,1,0,"ng-container",34)(3,mt,1,0,"ng-container",39),p(),_(4,"input",49),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),p()(),S(5,dt,1,1,"ng-template",null,4,v)}if(t&2){let e=g(6),o=r().$implicit,n=g(3),a=O(0);r(2);let c=g(10);s("options",o.FormView.options)("selectMultiple",!0)("optionTemplate",e),l(),s("for",a),l(),s("ngTemplateOutlet",n),l(),s("ngTemplateOutlet",c)("ngTemplateOutletContext",T(10,y,T(8,w,o.FormView))),l(),s("ngModel",o.Value())}}function ut(t,i){t&1&&f(0)}function gt(t,i){t&1&&f(0)}function ft(t,i){if(t&1){let e=x();_(0,"app-timespan",45),u("ngModelChange",function(n){d(e);let a=r().$implicit,c=r(2);return C(c.updateSettingValue(a,n))}),_(1,"label",37),S(2,ut,1,0,"ng-container",34)(3,gt,1,0,"ng-container",39),p()()}if(t&2){let e=r().$implicit,o=g(3),n=O(0);r(2);let a=g(10);s("inputType",e.Name)("ngModel",e.Value())("customId",n),l(),s("for",n),l(),s("ngTemplateOutlet",o),l(),s("ngTemplateOutlet",a)("ngTemplateOutletContext",T(9,y,T(7,w,e.FormView)))}}function xt(t,i){if(t&1){let e=x();K(0)(1),S(2,Pe,5,5,"ng-template",null,2,v),_(4,"div",24),F(5,$e,13,3,"div",25)(6,De,4,9,"app-file-tree",26)(7,Re,3,4,"app-file-tree",27)(8,Je,10,12,"sh-form-field")(9,We,9,12,"sh-form-field")(10,tt,7,13)(11,ot,4,11,"app-size",28)(12,lt,7,10,"sh-form-field")(13,st,5,10,"sh-toggle",29)(14,Ct,7,12)(15,ft,4,11,"app-timespan",28),_(16,"button",30),u("click",function(){let n=d(e).$implicit,a=r(2);return C(a.removeSetting(n))}),_(17,"sh-icon"),m(18,"x-bold"),p()()()}if(t&2){let e=i.$implicit,o=i.$index,n=r(2);E("destination-"+e.Name+o),l(),E(n.inAppOptions(e.Name)),l(3),B("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),l(),h(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1)}}function Tt(t,i){if(t&1&&(F(0,Me,2,0,"div",23),A(1,xt,19,5,null,null,$)),t&2){let e=r();h(e.selectedSettings().length===0?0:-1),l(),D(e.selectedSettings())}}function St(t,i){if(t&1&&(_(0,"sh-icon",50),m(1,"x-circle"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ot(t,i){if(t&1&&(_(0,"sh-icon",32),m(1,"warning"),p()),t&2){r();let e=O(0);s("shTooltip",(e==null?null:e.message)??"Invalid value")}}function Ft(t,i){if(t&1&&(K(0),F(1,St,2,1,"sh-icon",50)(2,Ot,2,1,"sh-icon",32)),t&2){r();let e=O(0),o=r().$implicit,n=E(o.formView.validate(e));l(),h((n==null?null:n.type)==="error"?1:(n==null?null:n.type)==="warning"?2:-1)}}function ht(t,i){if(t&1&&(K(0),F(1,Ft,3,2)),t&2){let e=r().$implicit,n=(E(e.Value())??"").toString().trim()==="";l(),h(!n&&e.formView.validate?1:-1)}}function wt(t,i){if(t&1&&F(0,ht,2,2),t&2){let e=i.$implicit;h(e.Value?0:-1)}}var Se=class t{#e=j(Ce);options=Y.required();hiddenOptions=J([]);hasFreeTextSettings=J(!1);applicationOptions=J();showTextArea=b(!1);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=H(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(V=>V.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let I=c?.trim().toLowerCase(),X=a.options.find(Oe=>(Oe??"").trim().toLocaleLowerCase()===I);X&&(c=X)}let V=Te.find(I=>I.name===a?.name);return V&&(a=L(L({},a),V)),P(L({},n),{Value:b(c),FormView:a})}else if(this.hasFreeTextSettings())return P(L({},n),{Value:b(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=H(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>P(L({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=H(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
2
  `));updateSettingsFromText(i){if(typeof i!="string")return;let e=ue(i);this.options.update(()=>e)}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return!1}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?!1:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}])}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]})}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let c=e?.trim().toLowerCase()??"",V=i.FormView.options.find(I=>(I??"").trim().toLocaleLowerCase()===c);if(V)return n[a].Value=V,n}return n[a].Value=e,n})}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);return n[a].Name=e,n})}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=q({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;return a=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",a,1,"error"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","off",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(_(0,"sh-toggle-card",9),R(1,10)(2),Q(3,5),N(),_(4,"div",11),F(5,he,3,0,"button",12)(6,Le,8,2),p(),N(),F(7,Ie,1,3,"textarea",13)(8,Tt,3,1),p(),S(9,wt,1,1,"ng-template",null,0,v)),e&2&&(s("disableToggle",!0)("isActive",!0),l(5),h(o.showTextArea()?5:6),l(2),h(o.showTextArea()?7:8))},dependencies:[ae,te,oe,ee,ne,ie,ge,fe,xe,Z,ce,_e,le,pe,de,re,se,me],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"],changeDetection:0})};export{Se as a};