@duplicati/ngclient 0.0.227 → 0.0.229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/sh.woff2 +0 -0
- package/{chunk-CDRHCSvU.js → chunk-0sb5_LpD.js} +1 -1
- package/chunk-2OH1SKyQ.js +1 -0
- package/chunk-A5DpxPOI.js +1 -0
- package/{chunk-BffC_BAn.js → chunk-B-fklW6A.js} +2 -2
- package/{chunk-D0t-kgLy.js → chunk-B12Syddi.js} +1 -1
- package/chunk-B2fqvpov.js +2 -0
- package/{chunk-ZVDEaGd0.js → chunk-B3yuN2OH.js} +1 -1
- package/{chunk-BAbAUjHY.js → chunk-B6vxBiK4.js} +1 -1
- package/{chunk-5zEiKCqR.js → chunk-B9zNFJSv.js} +1 -1
- package/{chunk-CdZVal1F.js → chunk-BAZ5npJw.js} +1 -1
- package/{chunk-Cz4OqhOZ.js → chunk-BDXLL1lt.js} +1 -1
- package/chunk-BFH9sFEg.js +1 -0
- package/{chunk-DddAUzMY.js → chunk-BIeNnIyg.js} +1 -1
- package/{chunk-ClHWI9-i.js → chunk-BJ6LKfIL.js} +1 -1
- package/{chunk-G-I5c1Dk.js → chunk-BYHopERA.js} +1 -1
- package/{chunk-BKLJMYh2.js → chunk-BZYVgHEz.js} +1 -1
- package/chunk-BZqhgAZ-.js +2 -0
- package/{chunk-DNJQ-AbV.js → chunk-Bc4gFy5W.js} +1 -1
- package/{chunk-CeFh90sX.js → chunk-BcpsSgKo.js} +1 -1
- package/{chunk-BNf0YAwH.js → chunk-Bf1diO1u.js} +1 -1
- package/{chunk-N7vpDAsp.js → chunk-BjkwnDTL.js} +1 -1
- package/{chunk-B6nCQM-G.js → chunk-BoCnrrB4.js} +1 -1
- package/{chunk-BxxX98wy.js → chunk-BtzP4vdU.js} +1 -1
- package/{chunk-CnAb3OKU.js → chunk-Byb051F6.js} +1 -1
- package/{chunk-C08PrcBX.js → chunk-C11i_gv7.js} +1 -1
- package/{chunk-DuO9_dH0.js → chunk-C1t4wbdG.js} +1 -1
- package/{chunk-Bzp0ULy_.js → chunk-C2bnZ62D.js} +1 -1
- package/{chunk-Do6_xsGi.js → chunk-C9EdrQe6.js} +3 -3
- package/chunk-CA-ER0DL.js +2 -0
- package/{chunk-CxPG-KgI.js → chunk-CBdr-6_u.js} +2 -2
- package/{chunk-ClfSJEUJ.js → chunk-CByrJpDb.js} +1 -1
- package/chunk-CI78bAye.js +2 -0
- package/chunk-CMmgPgiU.js +2 -0
- package/{chunk-CMs999gl.js → chunk-COgNe44h.js} +1 -1
- package/{chunk-CtLFpDTP.js → chunk-CQ8rm_d9.js} +1 -1
- package/{chunk-B7PRtY7v.js → chunk-CRU3lYvk.js} +1 -1
- package/{chunk-BUF3tczf.js → chunk-CUxq_s_t.js} +8 -8
- package/chunk-CXEImxhE.js +1 -0
- package/chunk-C_JveZJH.js +1 -0
- package/{chunk-DtQIjLqL.js → chunk-CdKfNiwm.js} +1 -1
- package/{chunk-PA5BGFyW.js → chunk-CfoJuTJX.js} +1 -1
- package/chunk-CgYrHQGO.js +1 -0
- package/{chunk-wycXedbJ.js → chunk-Cs0rlpWi.js} +1 -1
- package/{chunk-DNSvQk_3.js → chunk-CwB_t7g-.js} +1 -1
- package/chunk-D0u1cyeL.js +1 -0
- package/chunk-D1wHRltX.js +2 -0
- package/{chunk-M5tldLvJ.js → chunk-D28lTX0k.js} +1 -1
- package/{chunk--rqB0ojD.js → chunk-D2XTQURr.js} +1 -1
- package/{chunk-bx0aDvCZ.js → chunk-D48AStVy.js} +1 -1
- package/chunk-D4UZC_u0.js +1 -0
- package/{chunk-DnD9XTM4.js → chunk-DC8QqmzV.js} +1 -1
- package/{chunk-ChwFViRh.js → chunk-DDVdXEVe.js} +1 -1
- package/{chunk-r4LfAQnM.js → chunk-DDo7wKQT.js} +1 -1
- package/{chunk-DWwNINBJ.js → chunk-DJbAxHpK.js} +1 -1
- package/{chunk-C-G3pKB4.js → chunk-DMJycFPC.js} +1 -1
- package/chunk-DP9SoPGV.js +1 -0
- package/{chunk-BjNuU0J_.js → chunk-DQW8lSiz.js} +1 -1
- package/{chunk-Dt8gZPT-.js → chunk-DQwpGI_E.js} +1 -1
- package/chunk-DV2SIgNN.js +2 -0
- package/{chunk-g_QJ3SVt.js → chunk-DVgkAgur.js} +1 -1
- package/{chunk-BeAI10wv.js → chunk-DVlpMN2Q.js} +1 -1
- package/{chunk-BYoKu9PJ.js → chunk-D_A6A07f.js} +1 -1
- package/chunk-D_JCqKo8.js +1 -0
- package/{chunk-IEVZ0UN6.js → chunk-DaIpTiYw.js} +1 -1
- package/{chunk-CJRbWZfg.js → chunk-DiZeSQXj.js} +1 -1
- package/{chunk-BOII3Fdm.js → chunk-Drc5kcUX.js} +1 -1
- package/{chunk-BthLY9tf.js → chunk-GVxWY6X-.js} +1 -1
- package/{chunk-DofVJ9gn.js → chunk-JA7rUsYF.js} +1 -1
- package/{chunk-SWsliUUy.js → chunk-M21GJPzH.js} +3 -3
- package/{chunk-CUxvfCTH.js → chunk-MvQwR7nW.js} +1 -1
- package/{chunk-Cc1_FUvV.js → chunk-ObToq7vh.js} +1 -1
- package/chunk-RKTSBnYB.js +1 -0
- package/{chunk-BaWD8G-f.js → chunk-SKxVK_pD.js} +1 -1
- package/{chunk-C4pJCbq-.js → chunk-SycscfJp.js} +1 -1
- package/{chunk-Cw8vFX0e.js → chunk-bgWe6t7y.js} +1 -1
- package/{chunk-XMwSOila.js → chunk-cLFxUFjv.js} +1 -1
- package/{chunk-ySdaWJYB.js → chunk-dScOwyAU.js} +1 -1
- package/{chunk-BqjWEFHw.js → chunk-w_Hs_Uxi.js} +1 -1
- package/chunk-wyer8fjS.js +1 -0
- package/index.html +1 -1
- package/locale/messages.en.json +23 -3
- package/locale/messages.json +23 -3
- package/{main-TZVLLK67.js → main-PXGZLKMN.js} +14 -14
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +258 -86
- package/chunk-B-ryE8KW.js +0 -2
- package/chunk-B6ugJDDx.js +0 -1
- package/chunk-B88MJ6Up.js +0 -1
- package/chunk-BCT9ajP9.js +0 -1
- package/chunk-BMGXb3gX.js +0 -1
- package/chunk-BPpheyQK.js +0 -2
- package/chunk-BS8yAz3P.js +0 -2
- package/chunk-BlIcwFlf.js +0 -1
- package/chunk-BuyCr2eD.js +0 -1
- package/chunk-CM11IMzh.js +0 -1
- package/chunk-CU-RYihf.js +0 -2
- package/chunk-CuU6b3lp.js +0 -2
- package/chunk-D-epCTmE.js +0 -1
- package/chunk-QlYDF-EM.js +0 -1
- package/chunk-SgcWXTYZ.js +0 -2
- package/chunk-birClroL.js +0 -2
- package/chunk-ya_5JcKA.js +0 -1
package/assets/sh.woff2
CHANGED
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {b7 as ue,b as g1,b8 as ce,d as dw,b9 as rg,L as oC,Y as iC,h as bC,ag as zg}from'./main-PXGZLKMN.js';var p=["*"],x=(()=>{class o extends ue{constructor(){super("button","active",{hostRole:"group"}),this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.hostClasses=ce("buttonGroup",{color:this.color,variant:this.variant,size:this.size});}static{this.\u0275fac=function(t){return new(t||o)};}static{this.\u0275cmp=dw({type:o,selectors:[["sh-button-group"]],hostVars:4,hostBindings:function(t,n){t&2&&(bC(n.hostClasses()),zg("--btng-id",n.id));},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"]},features:[rg],ngContentSelectors:p,decls:1,vars:0,template:function(t,n){t&1&&(oC(),iC(0));},styles:[`sh-button-group{--btng-bg: var(--base-3);--btng-item-bg: var(--base-1);--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bc: var(--base-4);--btng-h: 2.5rem;--btng-p: 0 .75rem;--btng-s: var(--shape-2);--btng-s-a: var(--shape-2);--btng-f: var(--paragraph-30);display:inline-flex;height:var(--btng-h);max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;position:relative}sh-button-group::-webkit-scrollbar{display:none}sh-button-group{background-color:var(--btng-bg);background-image:linear-gradient(90deg,var(--btng-bg) 30%,rgba(255,255,255,0)),linear-gradient(-90deg,var(--btng-bg) 30%,rgba(255,255,255,0)),radial-gradient(farthest-side at 0% 50%,rgb(from var(--base-12) r g b/8%),rgb(from var(--base-12) r g b/0%)),radial-gradient(farthest-side at 100% 50%,rgb(from var(--base-12) r g b/8%),rgb(from var(--base-12) r g b/0%));background-repeat:no-repeat;background-position:left center,right center,left center,right center;background-size:1.5rem 100%,1.5rem 100%,.5rem 100%,.5rem 100%;background-attachment:local,local,scroll,scroll;padding:.1875rem;gap:.25rem;border:0;border-radius:var(--btng-s)}sh-button-group.small{--btng-h: 2rem;--btng-p: 0 .5rem}sh-button-group button{border:0;flex:1 0;appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;position:relative;padding:var(--btng-p);min-width:auto;cursor:pointer;outline:none;line-height:inherit;-webkit-user-select:none;user-select:none;overflow:visible;vertical-align:middle;white-space:nowrap;background:transparent;color:var(--btng-c);font:var(--btng-f);border-radius:calc(var(--btng-s) / 3 * 2);transition:color 80ms linear,transform 125ms linear;transform:scale(1)}sh-button-group button:focus-visible{outline:2px solid var(--primary-8);outline-offset:-2px}sh-button-group button:active{transform:scale(.96)}sh-button-group button:hover{--btng-bg: var(--base-2)}sh-button-group button:hover,sh-button-group button.active{--btng-bg: var(--base-1);box-shadow:var(--box-shadow-10)}@supports not (anchor-name: --anchor){sh-button-group button{--btng-item-bg: var(--base-3);background:var(--btng-item-bg)}sh-button-group button:hover,sh-button-group button.active{--btng-c: var(--base-12);--btng-ic: var(--base-12);--btng-bg: var(--base-1);--btng-item-bg: var(--base-1)}}@supports (anchor-name: --anchor){sh-button-group button{z-index:1}sh-button-group button.active{position:relative;anchor-name:var(--btng-id)}}sh-button-group button[disabled]{opacity:.5;pointer-events:none;cursor:not-allowed}@supports (anchor-name: --anchor){sh-button-group:after{content:"";background:var(--btng-item-bg);pointer-events:none;position:absolute;z-index:0;top:anchor(top);bottom:anchor(bottom);left:anchor(left);right:anchor(right);position-anchor:var(--btng-id);transition:left .175s ease-out,right .175s ease-out;border-radius:calc(var(--btng-s) / 3 * 2)}}
|
|
2
2
|
`],encapsulation:2});}}return o})();export{x};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {e as ee}from'./chunk-D_JCqKo8.js';import'./chunk-w_Hs_Uxi.js';import'./chunk-D1wHRltX.js';import'./chunk-CBdr-6_u.js';import'./chunk-BZqhgAZ-.js';import'./chunk-B9zNFJSv.js';import'./chunk-COgNe44h.js';import'./chunk-BAZ5npJw.js';import {T,aw as W,a5 as g,ab as C,a6 as be,U as Ue,aG as pt,N as Nt,G as Ga,aE as Fo,C as Bu,at as h,d as dw,v,f as N$1,_ as _t,j as mg,Q as Qi,O as Og,P as Pg,H as Hl,X as XT,F as Fg,s as sm,p as DD,o as oT,D as DE,au as Lg,av as eC,I as Qg,z as gg,h as bC,w as im,y as TD,i as iT,l as HC,aU as ny,aV as ry,q as PC}from'./main-PXGZLKMN.js';import'./chunk-MvQwR7nW.js';import'./chunk-SycscfJp.js';import {L,F}from'./chunk-D28lTX0k.js';import'./chunk-DQW8lSiz.js';import'./chunk-CMmgPgiU.js';import {F as Fe}from'./chunk-C9EdrQe6.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-Drc5kcUX.js';import {a as at}from'./chunk-B-fklW6A.js';function ue(_,t){_&1&&(Qi(0,"sh-icon",20),PC(1,"spinner"),Hl());}function pe(_,t){_&1&&(Qi(0,"sh-icon",21),PC(1,"check"),Hl());}function he(_,t){_&1&&(Qi(0,"sh-icon",22),PC(1,"warning"),Hl()),_&2&&gg("shTooltip","File not found");}function Te(_,t){let a=F(_).pipe(ny(t),ry());return L(a,{initialValue:_()})}var N=class _{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ue("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ue("");lastValidatedPath=Ue("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ue(false);#i=Te(this.backupFilePath,500);#n=Ue(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=Ga(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(Fo(1),Bu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ue(false);isRepairing=Ue(false);isDeleting=Ue(false);isSavingDbPath=Ue(false);isSavingAndRepairing=Ue(false);isMovingDb=Ue(false);isCreatingBugReport=Ue(false);createdReport=Ue(false);isCompacting=Ue(false);activeBackupEffect=Ga(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(Fo(1),Bu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(Bu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(Bu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(Bu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}compactDatabase(){this.isCompacting.set(true),this.#e.postApiV1BackupByIdCompact({id:this.backupId()}).pipe(Bu(()=>this.isCompacting.set(false))).subscribe();}static \u0275fac=function(a){return new(a||_)};static \u0275cmp=dw({type:_,selectors:[["app-database"]],decls:53,vars:24,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let r;r=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`${"\uFFFD#31\uFFFD"}:START_TAG_SH_ICON:file-archive${"\uFFFD/#31\uFFFD"}:CLOSE_TAG_SH_ICON: Compact `;let O;O=$localize`Placement`;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let k;k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let y;return y=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#52\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,r,S,f,I,M,R,B,O,$,v,k,y,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(mg(0,"app-status-bar"),Qi(1,"section")(2,"div",15)(3,"button",16),Og(4,0),mg(5,"sh-icon"),Pg(),Hl()(),Qi(6,"article")(7,"h1"),XT(8,1),Hl(),Qi(9,"p"),XT(10,2),Hl()(),Qi(11,"article")(12,"h2"),XT(13,3),Hl(),Qi(14,"p"),XT(15,4),Hl(),Qi(16,"div",17)(17,"button",18),Fg("click",function(){return e.repairDatabase()}),Og(18,5),mg(19,"sh-icon"),Pg(),Hl(),Qi(20,"button",18),Fg("click",function(){return e.deleteDatabase()}),Og(21,6),mg(22,"sh-icon"),Pg(),Hl(),Qi(23,"button",18),Fg("click",function(){return e.restoreDatabase()}),Og(24,7),mg(25,"sh-icon"),Pg(),Hl(),Qi(26,"button",18),Fg("click",function(){return e.createErrorReport()}),Og(27,8),mg(28,"sh-icon"),Pg(),Hl(),Qi(29,"button",18),Fg("click",function(){return e.compactDatabase()}),Og(30,9),mg(31,"sh-icon"),Pg(),Hl()()(),Qi(32,"article")(33,"h2"),XT(34,10),Hl(),Qi(35,"sh-form-field")(36,"input",19),sm("ngModelChange",function(S){return HC(e.backupFilePath,S)||(e.backupFilePath=S),S}),Hl(),DD(),oT(37,ue,2,0,"sh-icon",20)(38,pe,2,0,"sh-icon",21)(39,he,2,1,"sh-icon",22),Hl(),Qi(40,"div",23)(41,"button",18),Fg("click",function(){return e.resetDatabasePath()}),Og(42,11),mg(43,"sh-icon"),Pg(),Hl(),Qi(44,"button",18),Fg("click",function(){return e.saveDatabasePath()}),Og(45,12),mg(46,"sh-icon"),Pg(),Hl(),Qi(47,"button",18),Fg("click",function(){return e.saveAndRepairDatabasePath()}),Og(48,13),mg(49,"sh-icon"),Pg(),Hl(),Qi(50,"button",18),Fg("click",function(){return e.moveDatabasePath()}),Og(51,14),mg(52,"sh-icon"),Pg(),Hl()()()()),a&2&&(DE(8),Lg(e.activeBackup()?.Backup?.Name),eC(8),DE(9),Qg("loading",e.isRepairing()),gg("disabled",!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isDeleting()),gg("disabled",!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isRestoring()),gg("disabled",e.pathHasChanged()),DE(3),Qg("loading",e.isCreatingBugReport()),gg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isCompacting()),gg("disabled",e.isCompacting()||!e.isValidatedPath()||e.pathHasChanged()),DE(6),bC(e.isValidatedPath()?"success":"error"),DE(),im("ngModel",e.backupFilePath),TD(),DE(),iT(e.isWaitingForValidation()?37:e.isValidatedPath()?38:39),DE(4),gg("disabled",!e.pathHasChanged()),DE(3),gg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),DE(3),gg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),DE(3),gg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import('./chunk-BtzP4vdU.js')},{path:"encryption",loadComponent:()=>import('./chunk-CI78bAye.js').then(function(n){return n.c})},{path:"select-files",loadComponent:()=>import('./chunk-CI78bAye.js').then(function(n){return n.a})},{path:"options",loadComponent:()=>import('./chunk-CI78bAye.js').then(function(n){return n.b})},{path:":taskid/progress",loadComponent:()=>import('./chunk-D4UZC_u0.js')}],t=o;export{t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as g1,G as Ga,c as me,T,ae as Jr,
|
|
2
|
-
`],encapsulation:2});}}return r})(),o=null,at=(()=>{class r{constructor(){this.shTooltip=g1.required(),this.#p=Ga(()=>{let t=this.shTooltip();me(()=>{this.isOpen()&&o?.component===this&&o?.wrapperComponentRef&&(o.wrapperComponentRef.setInput("content",t),o.wrapperComponentRef.changeDetectorRef.detectChanges());});}),this.#n=T(Jr),this.#e=T(us),this.#t=T(pe),this.#i=null,this.#o=50,this.anchorName=`--${
|
|
1
|
+
import {b as g1,G as Ga,c as me,T,ae as Jr,bW as us,bX as pe,bv as le,U as Ue,b5 as mw,F as Fg,ag as zg,I as Qg,N as Nt,bY as $r,ad as br,bB as yD,d as dw,bZ as ei,Q as Qi,o as oT,H as Hl,D as DE,i as iT,aC as hg,bf as ig,n as nC,z as gg,a_ as ZC,q as PC,aa as Gl,b_ as Ig}from'./main-PXGZLKMN.js';var z=r=>({$implicit:r});function U(r,w){r&1&&Ig(0);}function F(r,w){if(r&1&&ig(0,U,1,0,"ng-container",1),r&2){let t=nC();gg("ngTemplateOutlet",t.content())("ngTemplateOutletContext",ZC(2,z,t.tooltipContext));}}function $(r,w){if(r&1&&PC(0),r&2){let t=nC();Gl(" ",t.content()," ");}}var X=(()=>{class r{constructor(){this.positionAnchorName=g1.required(),this.anchorEl=g1.required(),this.isOpen=g1(false),this.content=g1(),this.close=g1(()=>{}),this.tooltipContext={close:()=>this.close()()},this.isTemplate=Nt(()=>this.content()instanceof $r),this.#p=T(br),this.#n=T(Jr),this.#e=T(yD),this.#t=null,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.isBelow=Ue(false),this.openEffect=Ga(()=>{if(this.isOpen())queueMicrotask(()=>{let t=this.#n.nativeElement;!t||!t.isConnected||(this.#t&&this.#t.abort(),this.#t=new AbortController,t.showPopover(),this.SUPPORTS_ANCHOR||setTimeout(()=>{this.#i(t).addEventListener("scroll",()=>this.#o(),{signal:this.#t?.signal,passive:true}),window?.addEventListener("resize",()=>this.#o(),{signal:this.#t?.signal,passive:true}),this.#o();}));});else {let t=this.#n.nativeElement;if(t)try{t.matches(":popover-open")&&t.hidePopover();}catch{}this.#t?.abort(),this.#t=null;}}),this.#o=()=>{if(!this.anchorEl())return;let t=this.anchorEl().nativeElement.getBoundingClientRect(),e=this.#n.nativeElement,n=e.getBoundingClientRect();if(n.width===0&&n.height===0)return;let p=8,h=(i,s)=>({left:i.left+i.width/2-s.width/2,top:i.top-s.height-p}),j=[h,(i,s)=>({left:i.right-s.width,top:i.top-s.height-p}),(i,s)=>({left:i.left,top:i.top-s.height-p}),(i,s)=>({left:i.left+i.width/2-s.width/2,top:i.bottom+p}),(i,s)=>({left:i.right-s.width,top:i.bottom+p}),(i,s)=>({left:i.left,top:i.bottom+p})];for(let i of j){let s=i(t,n);if(this.#r(s,n)){this.#s(s,e),this.isBelow.set(s.top>t.top);return}}let v=this.#l(h(t,n),n);this.#s(v,e),this.isBelow.set(v.top>t.top);};}#p;#n;#e;#t;ngOnDestroy(){this.#t?.abort(),this.#t=null;}#i(t){let e=["scroll","auto"],n=t.parentElement;for(;n;){if(e.indexOf(window?.getComputedStyle(n).overflowY)>-1&&n.scrollHeight>n.clientHeight)return n;n=n.parentElement;}return this.#p.documentElement}#o;#s(t,e){this.#e.setStyle(e,"left",`${t.left}px`),this.#e.setStyle(e,"top",`${t.top}px`),this.#e.setStyle(e,"position","fixed"),this.#e.setStyle(e,"margin","0");}#r(t,e){return t.left>=0&&t.top>=0&&t.left+e.width<=window.innerWidth&&t.top+e.height<=window.innerHeight}#l(t,e){return {left:Math.max(0,Math.min(t.left,window.innerWidth-e.width)),top:Math.max(0,Math.min(t.top,window.innerHeight-e.height))}}static{this.\u0275fac=function(e){return new(e||r)};}static{this.\u0275cmp=dw({type:r,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,n){e&2&&(hg("popover","manual"),zg("position-anchor",n.positionAnchorName()),Qg("below",n.isBelow()));},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"],content:[1,"content"],close:[1,"close"]},decls:3,vars:1,consts:[[1,"tooltip-content"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){e&1&&(Qi(0,"div",0),oT(1,F,1,4,"ng-container")(2,$,1,1),Hl()),e&2&&(DE(),iT(n.isTemplate()?1:2));},dependencies:[ei],styles:[`.tooltip{position:relative;display:flex;pointer-events:initial!important}.tooltip:after{content:"";position:absolute;inset:-.5rem;z-index:1}.tooltip.primary+ship-tooltip-wrapper{--tt-bg: var(--primary-2);--tt-c: var(--primary-8)}.tooltip.accent+ship-tooltip-wrapper{--tt-bg: var(--accent-2);--tt-c: var(--accent-8)}.tooltip.warn+ship-tooltip-wrapper{--tt-bg: var(--warn-2);--tt-c: var(--warn-8)}.tooltip.error+ship-tooltip-wrapper{--tt-bg: var(--error-2);--tt-c: var(--error-8)}.tooltip.success+ship-tooltip-wrapper{--tt-bg: var(--success-2);--tt-c: var(--success-8)}.tooltip.active{z-index:1}.tooltip.active+ship-tooltip-wrapper{z-index:1}@supports (anchor-name: --anchor){.tooltip.active+ship-tooltip-wrapper .tooltip-content{transform:translateY(0) scaleY(1) scaleX(1)}}ship-tooltip-wrapper{--tt-bg: var(--base-3);--tt-c: var(--base-12);--tt-mh: 8.5rem;--tt-mw: 17.5rem;--tt-translate-y: 50%;position:fixed;font:var(--paragraph-30);width:max-content;overflow:visible;box-shadow:none;background:transparent;border:0;padding:0;margin:0;margin-block-end:.75rem}@supports (anchor-name: --anchor){ship-tooltip-wrapper{inset:unset;justify-self:anchor-center;bottom:anchor(top);position:fixed;position-try-order:normal;position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline}}ship-tooltip-wrapper:before{content:"";position:absolute;bottom:-.75rem;top:auto;left:50%;z-index:1;transform:translate(-50%);border-width:.375rem;border-style:solid;border-color:transparent;border-top-color:var(--tt-bg);width:0;height:0;opacity:1}ship-tooltip-wrapper.below{--tt-translate-y: -50%}ship-tooltip-wrapper.below:before{border-top-color:transparent;border-bottom-color:var(--tt-bg);top:-.75rem;bottom:auto}@supports not (anchor-name: --anchor){ship-tooltip-wrapper.below{margin-block-start:.75rem;margin-block-end:0}}ship-tooltip-wrapper .tooltip-content{padding:.5rem .75rem;position:relative;hyphens:auto;text-wrap:pretty;color:var(--tt-c);max-height:var(--tt-mh);max-width:var(--tt-mw);overflow:auto;background:var(--tt-bg);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20)}@supports (anchor-name: --anchor){ship-tooltip-wrapper .tooltip-content{transform:translateY(var(--tt-translate-y)) scaleY(0) scaleX(.8);transition:transform 125ms linear}}
|
|
2
|
+
`],encapsulation:2});}}return r})(),o=null,at=(()=>{class r{constructor(){this.shTooltip=g1.required(),this.#p=Ga(()=>{let t=this.shTooltip();me(()=>{this.isOpen()&&o?.component===this&&o?.wrapperComponentRef&&(o.wrapperComponentRef.setInput("content",t),o.wrapperComponentRef.changeDetectorRef.detectChanges());});}),this.#n=T(Jr),this.#e=T(us),this.#t=T(pe),this.#i=null,this.#o=50,this.anchorName=`--${le()}`,this.isOpen=Ue(false),this.destroyTimeout=null;}#p;#n;#e;#t;#i;#o;onMouseEnter(t){t.stopPropagation(),o&&o.component.anchorName!==this.anchorName?o.component.#a(true):this.#r(),this.#l();}onMouseLeave(t){t.stopPropagation(),this.#s();}ngOnDestroy(){this.#r(),o?.component===this&&this.#a(true);}#s(){this.#r(),this.#i=setTimeout(()=>{this.#a();},this.#o);}#r(){this.#i&&(clearTimeout(this.#i),this.#i=null),this.destroyTimeout&&(clearTimeout(this.destroyTimeout),this.destroyTimeout=null);}#l(){if(o?.wrapperComponentRef||!this.shTooltip()){o?.component===this&&o?.wrapperComponentRef&&o.wrapperComponentRef.setInput("content",this.shTooltip());return}o={wrapperComponentRef:this.#e.createComponent(X,{environmentInjector:this.#t}),component:this},o.wrapperComponentRef.setInput("positionAnchorName",this.anchorName),o.wrapperComponentRef.setInput("anchorEl",this.#n),o.wrapperComponentRef.setInput("isOpen",this.isOpen),o.wrapperComponentRef.setInput("content",this.shTooltip()),o.wrapperComponentRef.setInput("close",()=>this.#a(true)),o.wrapperComponentRef.changeDetectorRef.detectChanges(),o.wrapperComponentRef.location.nativeElement.addEventListener("mouseenter",t=>{t.stopPropagation(),this.#r();}),o.wrapperComponentRef.location.nativeElement.addEventListener("mouseleave",t=>{t.stopPropagation(),this.#s();}),setTimeout(()=>{this.isOpen.set(true);});}#a(t=false){if(o?.wrapperComponentRef){if(o.component!==this&&!t)return;let e=o.wrapperComponentRef,n=o.component;n.#r(),n.isOpen.set(false);try{e.location.nativeElement.hidePopover();}catch{}t?(e.destroy(),o?.wrapperComponentRef===e&&(o=null)):n.destroyTimeout=setTimeout(()=>{queueMicrotask(()=>{e.destroy(),o?.wrapperComponentRef===e&&(o=null);});},this.#o);}}static{this.\u0275fac=function(e){return new(e||r)};}static{this.\u0275dir=mw({type:r,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(e,n){e&1&&Fg("mouseenter",function(h){return n.onMouseEnter(h)})("mouseleave",function(h){return n.onMouseLeave(h)}),e&2&&(zg("anchor-name",n.anchorName),Qg("active",n.isOpen()));},inputs:{shTooltip:[1,"shTooltip"]}});}}return r})();export{X,at as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {w as we,o as ot,Q as Qt$1,j as jt$1,a as at,e as en}from'./chunk-BUF3tczf.js';import'./chunk-IEVZ0UN6.js';import'./chunk-BAbAUjHY.js';import {I}from'./chunk-BPpheyQK.js';import {J}from'./chunk-birClroL.js';import'./chunk-bx0aDvCZ.js';import {C,g,G}from'./chunk-CtLFpDTP.js';import'./chunk-CxPG-KgI.js';import {v as ve}from'./chunk-B-ryE8KW.js';import'./chunk-CDRHCSvU.js';import {c}from'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import {T,e as ee$1,aw as W,bH as Te,c4 as v1,U as Ue,N as Nt,G as Ga,d as dw,v,f as N,a0 as de$1,u as ue,ak as cm,Q as Qi,F as Fg,j as mg,H as Hl,o as oT,O as Og,P as Pg,al as BC,D as DE,i as iT,I as Qg,z as gg,$ as $g,K as lC,a1 as cT,n as nC,ao as $C,a2 as lT,k as gT,S as Sd,x as xd,q as PC,s as sm,l as HC,X as XT,p as DD,w as im,a3 as QC,y as TD,ap as sT,aP as Ul,aQ as Wl,E as nm}from'./main-TZVLLK67.js';import {f}from'./chunk-DWwNINBJ.js';import'./chunk-CUxvfCTH.js';import'./chunk-C4pJCbq-.js';import {d}from'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import {F as Fe}from'./chunk-Do6_xsGi.js';import {j as jn,B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt$1,a as Zt$1}from'./chunk-BOII3Fdm.js';import'./chunk-BffC_BAn.js';import'./chunk-M5tldLvJ.js';var kt=["testUrl"],Bt=()=>({maxWidth:"700px",width:"100%"});function Vt(o,n){if(o&1){let t=gT();Qi(0,"sh-card",30)(1,"div",32)(2,"h3"),XT(3,4),Hl(),Qi(4,"button",33),Fg("click",function(){Sd(t);let i=nC(3);return xd(i.closeCustomList())}),PC(5," Cancel "),Qi(6,"sh-icon"),PC(7,"x-bold"),Hl()()(),Qi(8,"app-destination-list",34),Fg("setDestination",function(i){Sd(t);let _=nC(3);return xd(_.setDestination(i))}),Hl()();}}function Kt(o,n){if(o&1){let t=gT();Qi(0,"div",40)(1,"sh-toggle",43),sm("checkedChange",function(i){Sd(t);let _=nC(2).$implicit;return HC(_.save,i)||(_.save=i),xd(i)}),Qi(2,"span",44),XT(3,8),Hl()()();}if(o&2){let t=nC(2).$implicit;DE(),gg("color","primary")("variant","raised"),im("checked",t.save);}}function Jt(o,n){if(o&1){let t=gT();Qi(0,"sh-toggle-card",31),Ul(1,35),Qi(2,"app-destination-list-item",36)(3,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.changeDestination(i))}),PC(4,"Change"),Hl(),Qi(5,"sh-menu",37),Fg("click",function(i){return i.stopPropagation()}),Qi(6,"button",38)(7,"sh-icon"),PC(8,"dots-three-vertical"),Hl()(),Ul(9,39),Qi(10,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.openTargetUrlDialog(i))}),Og(11,5),mg(12,"sh-icon"),Pg(),Hl(),Qi(13,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.copyTargetUrl(i))}),Og(14,6),mg(15,"sh-icon"),Pg(),Hl(),Qi(16,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.removeDestination(i))}),Og(17,7),mg(18,"sh-icon"),Pg(),Hl(),Wl(),Hl()(),Wl(),oT(19,Kt,4,3,"div",40),Qi(20,"app-test-url",41,1),Fg("targetUrlChange",function(i){Sd(t);let _=nC().$index,T=nC(2);return xd(T.updateTargetUrl(_,i))})("testSignalChange",function(i){Sd(t);let _=nC().$index,T=nC(2);return xd(T.updateTestState(_,i))}),Hl(),Qi(22,"app-single-destination",42),Fg("targetUrlChange",function(i){Sd(t);let _=nC().$index,T=nC(2);return xd(T.updateTargetUrl(_,i))}),Hl()();}if(o&2){let t=nC(),e=t.$implicit,i=t.$index,_=nC(2);gg("disableToggle",true)("isActive",true),DE(2),gg("targetUrl",e.url)("connectionStringId",e.connectionStringId),DE(17),iT(e.connectionStringId?-1:19),DE(),gg("targetUrl",e.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",e.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",true)("readOnlyTest",false)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),DE(2),gg("targetUrl",e.url)("useBackupState",true);}}function Xt(o,n){if(o&1&&oT(0,Vt,9,0,"sh-card",30)(1,Jt,23,17,"sh-toggle-card",31),o&2){let t=n.$index,e=nC(2);iT(e.showCustomList()&&e.currentEditingIndex()===t?0:1);}}function zt(o,n){if(o&1&&cT(0,Xt,2,1,null,null,sT),o&2){nC();let t=$C(0);lT(t);}}function Ht(o,n){o&1&&(Qi(0,"div",45),mg(1,"sh-progress-bar",46),Qi(2,"div",47)(3,"h3"),XT(4,9),Hl()()());}function Wt(o,n){o&1&&(Qi(0,"sh-divider"),XT(1,12),Hl());}function jt(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit;DE(),nm(t.Description);}}function Qt(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit,e=nC(4);DE(),nm(e.getSimplePath(t.BaseUrl));}}function qt(o,n){if(o&1){let t=gT();Qi(0,"app-destination-list-item",50),Fg("click",function(){let i=Sd(t).$implicit,_=nC(4);return xd(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"h3",51),PC(2),Hl(),oT(3,jt,2,1,"p",52)(4,Qt,2,1,"p",52),Hl();}if(o&2){let t=n.$implicit;gg("targetUrl",t.BaseUrl),DE(2),nm(t.Name||t.BaseUrl),DE(),iT(t.Description?3:4);}}function Yt(o,n){if(o&1){let t=gT();Qi(0,"sh-card",48),Fg("click",function(){Sd(t);let i=nC(3);return xd(i.toggleCustomList())})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),PC(2,"plus-circle"),Hl(),Qi(3,"div",47)(4,"h3"),XT(5,10),Hl(),Qi(6,"p"),XT(7,11),Hl()()(),oT(8,Wt,2,0,"sh-divider"),cT(9,qt,5,3,"app-destination-list-item",49,sT);}if(o&2){let t=nC(3);DE(8),iT(t.destinations().length>0?8:-1),DE(),lT(t.destinations());}}function Zt(o,n){if(o&1&&oT(0,Ht,5,0,"div",45)(1,Yt,11,1),o&2){let t=nC(2);iT(t.isLoadingDestinations()?0:1);}}function te(o,n){o&1&&(Qi(0,"sh-divider"),XT(1,15),Hl());}function ee(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit;DE(),nm(t.Description);}}function ne(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit,e=nC(3);DE(),nm(e.getSimplePath(t.BaseUrl));}}function ie(o,n){if(o&1){let t=gT();Qi(0,"app-destination-list-item",57),Fg("click",function(){let i=Sd(t).$implicit,_=nC(3);return xd(_.selectSavedDestination(i))}),Qi(1,"h3",51),PC(2),Hl(),oT(3,ee,2,1,"p",52)(4,ne,2,1,"p",52),Hl();}if(o&2){let t=n.$implicit;gg("targetUrl",t.BaseUrl),DE(2),nm(t.Name||t.BaseUrl),DE(),iT(t.Description?3:4);}}function oe(o,n){if(o&1){let t=gT();Qi(0,"div",53)(1,"button",54),Fg("click",function(){Sd(t);let i=nC(2);return xd(i.closeCustomList())}),Qi(2,"sh-icon"),PC(3,"arrow-left"),Hl(),PC(4," Back "),Hl()(),Qi(5,"sh-card",55),Fg("click",function(){Sd(t);let i=nC(2);return xd(i.toggleCustomList())}),Qi(6,"sh-icon"),PC(7,"plus-circle"),Hl(),Qi(8,"div",47)(9,"h3"),XT(10,13),Hl(),Qi(11,"p"),XT(12,14),Hl()()(),oT(13,te,2,0,"sh-divider"),cT(14,ie,5,3,"app-destination-list-item",56,sT);}if(o&2){let t=nC(2);DE(13),iT(t.destinations().length>0?13:-1),DE(),lT(t.destinations());}}function ae(o,n){if(o&1){let t=gT();Qi(0,"div",53)(1,"button",54),Fg("click",function(){Sd(t);let i=nC(3);return xd(i.closeCustomList())}),Qi(2,"sh-icon"),PC(3,"arrow-left"),Hl()(),Qi(4,"h3"),XT(5,16),Hl()();}}function re(o,n){if(o&1){let t=gT();oT(0,ae,6,0,"div",53),Qi(1,"app-destination-list",34),Fg("setDestination",function(i){Sd(t);let _=nC(2);return xd(_.setDestination(i))}),Hl();}if(o&2){let t=nC(2),e=$C(0);iT(t.destinations().length>0||e.length>0?0:-1);}}function se(o,n){if(o&1&&oT(0,Zt,2,1)(1,oe,16,1)(2,re,2,1),o&2){let t=nC(),e=$C(1);iT(!t.showCustomList()&&!e&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2);}}function _e(o,n){if(o&1){let t=gT();Qi(0,"div",25)(1,"button",58),Fg("click",function(){Sd(t);let i=nC();return xd(i.startAddingNew())}),Qi(2,"sh-icon"),PC(3,"plus"),Hl(),PC(4," Add another destination "),Hl()();}}function le(o,n){o&1&&(Qi(0,"h2"),XT(1,19),Hl());}function ce(o,n){o&1&&(Qi(0,"h2"),XT(1,20),Hl());}function de(o,n){if(o&1){let t=gT();Qi(0,"sh-dialog",59),sm("isOpenChange",function(i){Sd(t);let _=nC();return HC(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),xd(i)}),Qi(1,"header",60)(2,"div",61),oT(3,le,2,0,"h2")(4,ce,2,0,"h2"),Qi(5,"sh-alert",62),XT(6,17),Hl()()(),Qi(7,"div",63)(8,"sh-form-field")(9,"textarea",64),sm("ngModelChange",function(i){Sd(t);let _=nC();return HC(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),xd(i)}),Hl(),DD(),Hl()(),Qi(10,"footer",65)(11,"button",27),Fg("click",function(){Sd(t);let i=nC();return xd(i.closeTargetUrlDialog(false))}),PC(12,"Cancel"),Hl(),Qi(13,"button",66),Fg("click",function(){Sd(t);let i=nC();return xd(i.closeTargetUrlDialog(true))}),Og(14,18),mg(15,"sh-icon"),Pg(),Hl()()();}if(o&2){let t=nC(),e=$C(1);im("isOpen",t.targetUrlDialogOpen),gg("options",QC(4,Bt)),DE(3),iT(e?4:3),DE(6),im("ngModel",t.targetUrlCtrl),TD();}}var b=new jn,ke=(o={destinations:[]})=>b.group({destinations:b.array(o.destinations)}),Be=({key:o,customGroup:n,dynamicGroup:t,advancedGroup:e})=>b.group({destinationType:b.control(o),custom:n,dynamic:t,advanced:e}),B=class o{#n=T(ee$1);#i=T(W);#t=T(we);#e=T(ot);injector=T(Te);testUrlComponents=v1();testStates=Ue([]);targetUrls=this.#t.targetUrls;targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=Ue(null);targetUrlInitial=Ue(null);currentEditingIndex=Ue(null);targetUrlDialogOpen=Ue(false);showCustomList=Ue(false);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=Nt(()=>{let n=this.targetUrlModel();return n?C(n)??null:null});isLoadingDestinationEffect=Ga(()=>{let n=this.isLoadingDestinations(),t=this.destinations(),e=this.targetUrls();!n&&t.length==0&&e.length==0&&this.toggleCustomList();});selectedDestinationTypeOption=Nt(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});getConnectionString(n){let t=this.#e.destinations().find(e=>e.ID===n);return console.log("connection",t),t}getSimplePath(n){return n?g(n):""}copyTargetUrl(n=0){let t=this.targetUrls()[n]?.url;t&&navigator.clipboard.writeText(t);}openTargetUrlDialog(n=0){let t=this.targetUrls()[n]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(n),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(n=false){this.targetUrlDialogOpen.set(false);let t=this.targetUrlCtrl(),e=this.targetUrlInitial();if(!n||t===e||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,T=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,T);}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null);}setDestination(n){let t=G(n??"");if(!t)return;let e=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${n}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),e,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(false);return}this.showCustomList()?(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(false),this.isAddingNew.set(false)):(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(false),this.isAddingNew.set(false));}targetUrlsEffect=Ga(()=>{let n=this.targetUrls();this.testStates.update(t=>{if(t.length===n.length)return t;let e=[...t];if(e.length<n.length)for(let i=e.length;i<n.length;i++)e.push(null);else e.length=n.length;return e});});selectSavedDestination(n){n.BaseUrl&&n.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(n.BaseUrl,true,n.ID,null):(this.#t.addTargetUrl(n.BaseUrl,n.ID,null),this.showCustomList.set(false),this.isAddingNew.set(false)));}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(true);}isAddingNew=Ue(false);startAddingNew(){this.isAddingNew.set(true),this.destinations().length===0&&this.showCustomList.set(true);}changeDestination(n){this.currentEditingIndex.set(n),this.showCustomList.set(true);}closeCustomList(){this.showCustomList.set(false),this.currentEditingIndex.set(null),this.isAddingNew.set(false);}removeDestination(n){this.#t.removeTargetUrl(n);}updateTargetUrl(n,t){if(!t)return;let e=this.targetUrls()[n]?.connectionStringId??null,i=this.targetUrls()[n]?.urlKey??null;this.#t.updateTargetUrl(n,t,e,i),this.updateTestState(n,null);}updateTestState(n,t){this.testStates.update(e=>{let i=[...e];return i[n]=t,i});}toggleSave(n){this.#t.toggleSaveConnectionString(n);}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent});}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents();this.testStates();for(let i=0;i<t.length;i++){let _=t[i],T=this.testStates()[i];if(T&&typeof T!="string"&&T.action==="success")continue;if((await _.testDestination(false))?.action!=="success")return}this.#o();}#o(){this.#t.shouldAutoSave()&&this.#t.submit(true),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=dw({type:o,selectors:[["app-destination"]],viewQuery:function(t,e){t&1&&$g(e.testUrlComponents,kt,5),t&2&&lC();},decls:19,vars:9,consts:()=>{let n;n=$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 e;e=$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 _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let T;T=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let L;L=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],n,t,e,i,_,T,L,V,K,J,X,z,H,W,j,Q,q,Y,Z,["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","readOnlyTest","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["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,e){if(t&1&&(cm(0)(1),Qi(2,"form",21,0),Fg("submit",function(){return e.next()}),Qi(4,"div",22),mg(5,"input",23)(6,"input",24),Hl(),Qi(7,"header"),oT(8,zt,2,0),Hl(),oT(9,se,3,1),oT(10,_e,5,0,"div",25),Qi(11,"div",26)(12,"button",27),Fg("click",function(){return e.goBack()}),Og(13,2),mg(14,"sh-icon"),Pg(),Hl(),Qi(15,"button",28),Og(16,3),mg(17,"sh-icon"),Pg(),Hl()()(),oT(18,de,16,5,"sh-dialog",29)),t&2){let i=BC(e.targetUrls());DE();let _=BC(i.length>0);DE(7),iT(e.currentEditingIndex()!==null||!e.showCustomList()&&!e.isAddingNew()?8:-1),DE(),iT((!_||e.showCustomList()||e.isAddingNew())&&e.currentEditingIndex()===null?9:-1),DE(),iT(_&&!e.showCustomList()&&!e.isAddingNew()?10:-1),DE(5),Qg("loading",e.isNew()&&e.testStates().length>0&&e.testStates()[0]==="testing"),gg("disabled",!_),DE(3),iT(e.targetUrlDialogOpen()?18:-1);}},dependencies:[Qt$1,jt$1,at,en,Bn,Tn,Ze,Rn,Pn,Jt$1,Zt$1,v,Fe,ve,N,de$1,ue,f,c,d,I,J],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;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}"]})};
|
|
1
|
+
import {w as we,o as ot,Q as Qt$1,j as jt$1,a as at,e as en}from'./chunk-CUxq_s_t.js';import'./chunk-DaIpTiYw.js';import'./chunk-B6vxBiK4.js';import {I}from'./chunk-DV2SIgNN.js';import {J}from'./chunk-B2fqvpov.js';import'./chunk-D48AStVy.js';import {C,g,G}from'./chunk-CQ8rm_d9.js';import'./chunk-CBdr-6_u.js';import {v as ve}from'./chunk-BZqhgAZ-.js';import'./chunk-0sb5_LpD.js';import {c}from'./chunk-COgNe44h.js';import'./chunk-BAZ5npJw.js';import {T,e as ee$1,aw as W,bE as Te,c5 as v1,U as Ue,N as Nt,G as Ga,d as dw,v,f as N,a0 as de$1,u as ue,ak as cm,Q as Qi,F as Fg,j as mg,H as Hl,o as oT,O as Og,P as Pg,al as BC,D as DE,i as iT,I as Qg,z as gg,$ as $g,K as lC,a1 as cT,n as nC,ao as $C,a2 as lT,k as gT,S as Sd,x as xd,q as PC,s as sm,l as HC,X as XT,p as DD,w as im,a3 as QC,y as TD,ap as sT,aP as Ul,aQ as Wl,E as nm}from'./main-PXGZLKMN.js';import {f}from'./chunk-DJbAxHpK.js';import'./chunk-MvQwR7nW.js';import'./chunk-SycscfJp.js';import {d}from'./chunk-DQW8lSiz.js';import'./chunk-CMmgPgiU.js';import {F as Fe}from'./chunk-C9EdrQe6.js';import {j as jn,B as Bn,T as Tn,Z as Ze,R as Rn,P as Pn,J as Jt$1,a as Zt$1}from'./chunk-Drc5kcUX.js';import'./chunk-B-fklW6A.js';import'./chunk-D28lTX0k.js';var kt=["testUrl"],Bt=()=>({maxWidth:"700px",width:"100%"});function Vt(o,n){if(o&1){let t=gT();Qi(0,"sh-card",30)(1,"div",32)(2,"h3"),XT(3,4),Hl(),Qi(4,"button",33),Fg("click",function(){Sd(t);let i=nC(3);return xd(i.closeCustomList())}),PC(5," Cancel "),Qi(6,"sh-icon"),PC(7,"x-bold"),Hl()()(),Qi(8,"app-destination-list",34),Fg("setDestination",function(i){Sd(t);let _=nC(3);return xd(_.setDestination(i))}),Hl()();}}function Kt(o,n){if(o&1){let t=gT();Qi(0,"div",40)(1,"sh-toggle",43),sm("checkedChange",function(i){Sd(t);let _=nC(2).$implicit;return HC(_.save,i)||(_.save=i),xd(i)}),Qi(2,"span",44),XT(3,8),Hl()()();}if(o&2){let t=nC(2).$implicit;DE(),gg("color","primary")("variant","raised"),im("checked",t.save);}}function Jt(o,n){if(o&1){let t=gT();Qi(0,"sh-toggle-card",31),Ul(1,35),Qi(2,"app-destination-list-item",36)(3,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.changeDestination(i))}),PC(4,"Change"),Hl(),Qi(5,"sh-menu",37),Fg("click",function(i){return i.stopPropagation()}),Qi(6,"button",38)(7,"sh-icon"),PC(8,"dots-three-vertical"),Hl()(),Ul(9,39),Qi(10,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.openTargetUrlDialog(i))}),Og(11,5),mg(12,"sh-icon"),Pg(),Hl(),Qi(13,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.copyTargetUrl(i))}),Og(14,6),mg(15,"sh-icon"),Pg(),Hl(),Qi(16,"button",33),Fg("click",function(){Sd(t);let i=nC().$index,_=nC(2);return xd(_.removeDestination(i))}),Og(17,7),mg(18,"sh-icon"),Pg(),Hl(),Wl(),Hl()(),Wl(),oT(19,Kt,4,3,"div",40),Qi(20,"app-test-url",41,1),Fg("targetUrlChange",function(i){Sd(t);let _=nC().$index,T=nC(2);return xd(T.updateTargetUrl(_,i))})("testSignalChange",function(i){Sd(t);let _=nC().$index,T=nC(2);return xd(T.updateTestState(_,i))}),Hl(),Qi(22,"app-single-destination",42),Fg("targetUrlChange",function(i){Sd(t);let _=nC().$index,T=nC(2);return xd(T.updateTargetUrl(_,i))}),Hl()();}if(o&2){let t=nC(),e=t.$implicit,i=t.$index,_=nC(2);gg("disableToggle",true)("isActive",true),DE(2),gg("targetUrl",e.url)("connectionStringId",e.connectionStringId),DE(17),iT(e.connectionStringId?-1:19),DE(),gg("targetUrl",e.url)("testSignal",_.testStates()[i]||null)("backupId",_.backupId())("connectionStringId",e.connectionStringId)("sourcePrefix",null)("suppressErrorDialogs",false)("askToCreate",true)("readOnlyTest",false)("testExpectation",_.isNew()?"destinationEmpty":"any")("moduleType","Backend"),DE(2),gg("targetUrl",e.url)("useBackupState",true);}}function Xt(o,n){if(o&1&&oT(0,Vt,9,0,"sh-card",30)(1,Jt,23,17,"sh-toggle-card",31),o&2){let t=n.$index,e=nC(2);iT(e.showCustomList()&&e.currentEditingIndex()===t?0:1);}}function zt(o,n){if(o&1&&cT(0,Xt,2,1,null,null,sT),o&2){nC();let t=$C(0);lT(t);}}function Ht(o,n){o&1&&(Qi(0,"div",45),mg(1,"sh-progress-bar",46),Qi(2,"div",47)(3,"h3"),XT(4,9),Hl()()());}function Wt(o,n){o&1&&(Qi(0,"sh-divider"),XT(1,12),Hl());}function jt(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit;DE(),nm(t.Description);}}function Qt(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit,e=nC(4);DE(),nm(e.getSimplePath(t.BaseUrl));}}function qt(o,n){if(o&1){let t=gT();Qi(0,"app-destination-list-item",50),Fg("click",function(){let i=Sd(t).$implicit,_=nC(4);return xd(_.selectSavedDestination(i))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"h3",51),PC(2),Hl(),oT(3,jt,2,1,"p",52)(4,Qt,2,1,"p",52),Hl();}if(o&2){let t=n.$implicit;gg("targetUrl",t.BaseUrl),DE(2),nm(t.Name||t.BaseUrl),DE(),iT(t.Description?3:4);}}function Yt(o,n){if(o&1){let t=gT();Qi(0,"sh-card",48),Fg("click",function(){Sd(t);let i=nC(3);return xd(i.toggleCustomList())})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),PC(2,"plus-circle"),Hl(),Qi(3,"div",47)(4,"h3"),XT(5,10),Hl(),Qi(6,"p"),XT(7,11),Hl()()(),oT(8,Wt,2,0,"sh-divider"),cT(9,qt,5,3,"app-destination-list-item",49,sT);}if(o&2){let t=nC(3);DE(8),iT(t.destinations().length>0?8:-1),DE(),lT(t.destinations());}}function Zt(o,n){if(o&1&&oT(0,Ht,5,0,"div",45)(1,Yt,11,1),o&2){let t=nC(2);iT(t.isLoadingDestinations()?0:1);}}function te(o,n){o&1&&(Qi(0,"sh-divider"),XT(1,15),Hl());}function ee(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit;DE(),nm(t.Description);}}function ne(o,n){if(o&1&&(Qi(0,"p",52),PC(1),Hl()),o&2){let t=nC().$implicit,e=nC(3);DE(),nm(e.getSimplePath(t.BaseUrl));}}function ie(o,n){if(o&1){let t=gT();Qi(0,"app-destination-list-item",57),Fg("click",function(){let i=Sd(t).$implicit,_=nC(3);return xd(_.selectSavedDestination(i))}),Qi(1,"h3",51),PC(2),Hl(),oT(3,ee,2,1,"p",52)(4,ne,2,1,"p",52),Hl();}if(o&2){let t=n.$implicit;gg("targetUrl",t.BaseUrl),DE(2),nm(t.Name||t.BaseUrl),DE(),iT(t.Description?3:4);}}function oe(o,n){if(o&1){let t=gT();Qi(0,"div",53)(1,"button",54),Fg("click",function(){Sd(t);let i=nC(2);return xd(i.closeCustomList())}),Qi(2,"sh-icon"),PC(3,"arrow-left"),Hl(),PC(4," Back "),Hl()(),Qi(5,"sh-card",55),Fg("click",function(){Sd(t);let i=nC(2);return xd(i.toggleCustomList())}),Qi(6,"sh-icon"),PC(7,"plus-circle"),Hl(),Qi(8,"div",47)(9,"h3"),XT(10,13),Hl(),Qi(11,"p"),XT(12,14),Hl()()(),oT(13,te,2,0,"sh-divider"),cT(14,ie,5,3,"app-destination-list-item",56,sT);}if(o&2){let t=nC(2);DE(13),iT(t.destinations().length>0?13:-1),DE(),lT(t.destinations());}}function ae(o,n){if(o&1){let t=gT();Qi(0,"div",53)(1,"button",54),Fg("click",function(){Sd(t);let i=nC(3);return xd(i.closeCustomList())}),Qi(2,"sh-icon"),PC(3,"arrow-left"),Hl()(),Qi(4,"h3"),XT(5,16),Hl()();}}function re(o,n){if(o&1){let t=gT();oT(0,ae,6,0,"div",53),Qi(1,"app-destination-list",34),Fg("setDestination",function(i){Sd(t);let _=nC(2);return xd(_.setDestination(i))}),Hl();}if(o&2){let t=nC(2),e=$C(0);iT(t.destinations().length>0||e.length>0?0:-1);}}function se(o,n){if(o&1&&oT(0,Zt,2,1)(1,oe,16,1)(2,re,2,1),o&2){let t=nC(),e=$C(1);iT(!t.showCustomList()&&!e&&!t.isAddingNew()?0:t.isAddingNew()&&!t.showCustomList()?1:2);}}function _e(o,n){if(o&1){let t=gT();Qi(0,"div",25)(1,"button",58),Fg("click",function(){Sd(t);let i=nC();return xd(i.startAddingNew())}),Qi(2,"sh-icon"),PC(3,"plus"),Hl(),PC(4," Add another destination "),Hl()();}}function le(o,n){o&1&&(Qi(0,"h2"),XT(1,19),Hl());}function ce(o,n){o&1&&(Qi(0,"h2"),XT(1,20),Hl());}function de(o,n){if(o&1){let t=gT();Qi(0,"sh-dialog",59),sm("isOpenChange",function(i){Sd(t);let _=nC();return HC(_.targetUrlDialogOpen,i)||(_.targetUrlDialogOpen=i),xd(i)}),Qi(1,"header",60)(2,"div",61),oT(3,le,2,0,"h2")(4,ce,2,0,"h2"),Qi(5,"sh-alert",62),XT(6,17),Hl()()(),Qi(7,"div",63)(8,"sh-form-field")(9,"textarea",64),sm("ngModelChange",function(i){Sd(t);let _=nC();return HC(_.targetUrlCtrl,i)||(_.targetUrlCtrl=i),xd(i)}),Hl(),DD(),Hl()(),Qi(10,"footer",65)(11,"button",27),Fg("click",function(){Sd(t);let i=nC();return xd(i.closeTargetUrlDialog(false))}),PC(12,"Cancel"),Hl(),Qi(13,"button",66),Fg("click",function(){Sd(t);let i=nC();return xd(i.closeTargetUrlDialog(true))}),Og(14,18),mg(15,"sh-icon"),Pg(),Hl()()();}if(o&2){let t=nC(),e=$C(1);im("isOpen",t.targetUrlDialogOpen),gg("options",QC(4,Bt)),DE(3),iT(e?4:3),DE(6),im("ngModel",t.targetUrlCtrl),TD();}}var b=new jn,ke=(o={destinations:[]})=>b.group({destinations:b.array(o.destinations)}),Be=({key:o,customGroup:n,dynamicGroup:t,advancedGroup:e})=>b.group({destinationType:b.control(o),custom:n,dynamic:t,advanced:e}),B=class o{#n=T(ee$1);#i=T(W);#t=T(we);#e=T(ot);injector=T(Te);testUrlComponents=v1();testStates=Ue([]);targetUrls=this.#t.targetUrls;targetUrlModel=Nt(()=>this.targetUrls()[0]?.url??null);targetUrlCtrl=Ue(null);targetUrlInitial=Ue(null);currentEditingIndex=Ue(null);targetUrlDialogOpen=Ue(false);showCustomList=Ue(false);isConnectionStringSaved=this.#t.isConnectionStringSaved;destinations=this.#e.destinations;isLoadingDestinations=this.#e.resourceDestinations.isLoading;isNew=this.#t.isNew;backupId=this.#t.backupId;selectedDestinationType=Nt(()=>{let n=this.targetUrlModel();return n?C(n)??null:null});isLoadingDestinationEffect=Ga(()=>{let n=this.isLoadingDestinations(),t=this.destinations(),e=this.targetUrls();!n&&t.length==0&&e.length==0&&this.toggleCustomList();});selectedDestinationTypeOption=Nt(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});getConnectionString(n){let t=this.#e.destinations().find(e=>e.ID===n);return console.log("connection",t),t}getSimplePath(n){return n?g(n):""}copyTargetUrl(n=0){let t=this.targetUrls()[n]?.url;t&&navigator.clipboard.writeText(t);}openTargetUrlDialog(n=0){let t=this.targetUrls()[n]?.url??null;this.targetUrlCtrl.set(t),this.targetUrlInitial.set(t),this.currentEditingIndex.set(n),this.targetUrlDialogOpen.set(true);}closeTargetUrlDialog(n=false){this.targetUrlDialogOpen.set(false);let t=this.targetUrlCtrl(),e=this.targetUrlInitial();if(!n||t===e||!t)return;let i=this.currentEditingIndex();if(i!==null){let _=this.targetUrls()[i]?.connectionStringId??null,T=this.targetUrls()[i]?.urlKey??null;this.#t.updateTargetUrl(i,t,_,T);}else this.#t.setTargetUrl(t);this.currentEditingIndex.set(null);}setDestination(n){let t=G(n??"");if(!t)return;let e=t.mapper.default?t.mapper.default(this.#t.backupName()??""):`${n}://`;if(this.currentEditingIndex()!==null){this.#t.updateTargetUrl(this.currentEditingIndex(),e,null,null),this.updateTestState(this.currentEditingIndex(),null),this.currentEditingIndex.set(null),this.showCustomList.set(false);return}this.showCustomList()?(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(false),this.isAddingNew.set(false)):(this.#t.addTargetUrl(e,null,null),this.showCustomList.set(false),this.isAddingNew.set(false));}targetUrlsEffect=Ga(()=>{let n=this.targetUrls();this.testStates.update(t=>{if(t.length===n.length)return t;let e=[...t];if(e.length<n.length)for(let i=e.length;i<n.length;i++)e.push(null);else e.length=n.length;return e});});selectSavedDestination(n){n.BaseUrl&&n.BaseUrl&&(this.targetUrls().length===0?this.#t.setTargetUrl(n.BaseUrl,true,n.ID,null):(this.#t.addTargetUrl(n.BaseUrl,n.ID,null),this.showCustomList.set(false),this.isAddingNew.set(false)));}toggleCustomList(){this.currentEditingIndex.set(null),this.showCustomList.set(true);}isAddingNew=Ue(false);startAddingNew(){this.isAddingNew.set(true),this.destinations().length===0&&this.showCustomList.set(true);}changeDestination(n){this.currentEditingIndex.set(n),this.showCustomList.set(true);}closeCustomList(){this.showCustomList.set(false),this.currentEditingIndex.set(null),this.isAddingNew.set(false);}removeDestination(n){this.#t.removeTargetUrl(n);}updateTargetUrl(n,t){if(!t)return;let e=this.targetUrls()[n]?.connectionStringId??null,i=this.targetUrls()[n]?.urlKey??null;this.#t.updateTargetUrl(n,t,e,i),this.updateTestState(n,null);}updateTestState(n,t){this.testStates.update(e=>{let i=[...e];return i[n]=t,i});}toggleSave(n){this.#t.toggleSaveConnectionString(n);}goBack(){this.#n.navigate(["general"],{relativeTo:this.#i.parent});}async next(){if(!this.#t.isNew()){this.#o();return}let t=this.testUrlComponents();this.testStates();for(let i=0;i<t.length;i++){let _=t[i],T=this.testStates()[i];if(T&&typeof T!="string"&&T.action==="success")continue;if((await _.testDestination(false))?.action!=="success")return}this.#o();}#o(){this.#t.shouldAutoSave()&&this.#t.submit(true),this.#n.navigate(["source-data"],{relativeTo:this.#i.parent});}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=dw({type:o,selectors:[["app-destination"]],viewQuery:function(t,e){t&1&&$g(e.testUrlComponents,kt,5),t&2&&lC();},decls:19,vars:9,consts:()=>{let n;n=$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 e;e=$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 _;_=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:copy${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard `;let T;T=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Remove `;let L;L=$localize`Save as connection string`;let V;V=$localize`Loading destinations...`;let K;K=$localize`Configure a new destination`;let J;J=$localize`Configure a one-off or new storage location.`;let X;X=$localize`Or select a saved destination`;let z;z=$localize`Configure a new destination`;let H;H=$localize`Configure a one-off or new storage location.`;let W;W=$localize`Or select a saved destination`;let j;j=$localize`Select storage type`;let Q;Q=$localize`Be careful, this will overwrite everything you have in your destination.`;let q;q=$localize` Override target URL ${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Y;Y=$localize`Set target URL`;let Z;return Z=$localize`Edit target URL`,[["formRef",""],["testUrl",""],n,t,e,i,_,T,L,V,K,J,X,z,H,W,j,Q,q,Y,Z,["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","readOnlyTest","testExpectation","moduleType"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"checkedChange","color","variant","checked"],["label",""],[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a","tabindex","0",1,"actionable",3,"targetUrl"],["variant","type-a","tabindex","0",1,"actionable",3,"click","keydown.enter","keydown.space","targetUrl"],["displayName",""],["description",""],[1,"custom-list-header"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],[1,"type-a","actionable","add-new",3,"click"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["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,e){if(t&1&&(cm(0)(1),Qi(2,"form",21,0),Fg("submit",function(){return e.next()}),Qi(4,"div",22),mg(5,"input",23)(6,"input",24),Hl(),Qi(7,"header"),oT(8,zt,2,0),Hl(),oT(9,se,3,1),oT(10,_e,5,0,"div",25),Qi(11,"div",26)(12,"button",27),Fg("click",function(){return e.goBack()}),Og(13,2),mg(14,"sh-icon"),Pg(),Hl(),Qi(15,"button",28),Og(16,3),mg(17,"sh-icon"),Pg(),Hl()()(),oT(18,de,16,5,"sh-dialog",29)),t&2){let i=BC(e.targetUrls());DE();let _=BC(i.length>0);DE(7),iT(e.currentEditingIndex()!==null||!e.showCustomList()&&!e.isAddingNew()?8:-1),DE(),iT((!_||e.showCustomList()||e.isAddingNew())&&e.currentEditingIndex()===null?9:-1),DE(),iT(_&&!e.showCustomList()&&!e.isAddingNew()?10:-1),DE(5),Qg("loading",e.isNew()&&e.testStates().length>0&&e.testStates()[0]==="testing"),gg("disabled",!_),DE(3),iT(e.targetUrlDialogOpen()?18:-1);}},dependencies:[Qt$1,jt$1,at,en,Bn,Tn,Ze,Rn,Pn,Jt$1,Zt$1,v,Fe,ve,N,de$1,ue,f,c,d,I,J],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;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}"]})};
|
|
2
2
|
export{ke as createDestinationForm,Be as createDestinationFormGroup,B as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {T,ae as Jr,bu as N,B as y1,bU as B$1,af as m1,b as g1,b8 as ce,d as dw,L as oC,R as Bl,V as yg,W as $l,Y as iC,o as oT,D as DE,i as iT,F as Fg,aC as hg,h as bC,$ as $g,K as lC,k as gT,an as jg,S as Sd,n as nC,x as xd,aq as Eg}from'./main-PXGZLKMN.js';var H=["internalInput"],z=["*"];function B(g,K){if(g&1){let o=gT();Bl(0,"input",4,0),jg("change",function(t){Sd(o);let c=nC();return xd(c.onInternalInputChange(t))}),$l();}if(g&2){let o=nC();Eg("checked",o.checked()),hg("disabled",o.disabled()?"":null);}}var J=(()=>{class g{constructor(){this.#e=T(Jr),this.#t=T(N),this.internalInput=y1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=m1(false),this.color=g1(null),this.variant=g1(null),this.readonly=g1(false),this.disabled=g1(false),this.noInternalInput=g1(false),this.hostClasses=ce("toggle",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#t;onInternalInputChange(o){if(this.disabled())return;let e=o.target;this.checked.set(e.checked);}onKeyDown(o){if(this.#t.matches(o,"toggle.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),o.preventDefault();}}static{this.\u0275fac=function(e){return new(e||g)};}static{this.\u0275cmp=dw({type:g,selectors:[["sh-toggle"]],viewQuery:function(e,t){e&1&&$g(t.internalInput,H,5),e&2&&lC();},hostVars:6,hostBindings:function(e,t){e&1&&Fg("keydown",function(V){return t.onKeyDown(V)}),e&2&&(hg("disabled",t.disabled()?"":null)("role",t.noInternalInput()?"switch":null)("aria-checked",t.noInternalInput()?t.checked():null)("tabindex",t.noInternalInput()?t.disabled()?"-1":"0":null),bC(t.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:z,decls:4,vars:1,consts:[["internalInput",""],[1,"box"],[1,"knob"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,t){e&1&&(oC(),Bl(0,"div",1),yg(1,"div",2),$l(),iC(2),oT(3,B,2,2,"input",3)),e&2&&(DE(3),iT(t.projectedInputs().length===0&&!t.noInternalInput()?3:-1));},styles:[`sh-toggle{--toggle-bg: var(--base-4);--toggle-b: 0;--togglek-bg: var(--base-2);--togglek-bs: var(--box-shadow-20);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}sh-toggle:focus-visible>.box,sh-toggle:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-toggle label{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1}sh-toggle .box{display:block;width:2.125rem;min-width:2.125rem;height:1.25rem;cursor:pointer;position:relative;border-radius:999px;background:var(--toggle-bg);border:var(--toggle-b);transition:background .15s linear}sh-toggle>input[type=checkbox]{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-toggle>input[type=checkbox]:focus,sh-toggle>input[type=checkbox]:focus-visible{outline:none}sh-toggle:has(>input:not(.internal-input))>input.internal-input{display:none}sh-toggle:has(input[disabled]),sh-toggle[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-toggle .knob{position:absolute;top:.125rem;left:.125rem;width:1rem;height:1rem;border-radius:50%;background:var(--togglek-bg);box-shadow:var(--togglek-bs);box-sizing:border-box;transition:left 125ms ease-in-out}sh-toggle:has(input[type=checkbox]:checked),sh-toggle.active{--togglek-bg: var(--base-8)}sh-toggle:has(input[type=checkbox]:checked) .knob,sh-toggle.active .knob{left:1rem}sh-toggle:has(input[type=checkbox]:checked).primary,sh-toggle.active.primary{--toggle-bg: var(--primary-3);--togglek-bg: var(--primary-8)}sh-toggle:has(input[type=checkbox]:checked).accent,sh-toggle.active.accent{--toggle-bg: var(--accent-3);--togglek-bg: var(--accent-8)}sh-toggle:has(input[type=checkbox]:checked).warn,sh-toggle.active.warn{--toggle-bg: var(--warn-3);--togglek-bg: var(--warn-8)}sh-toggle:has(input[type=checkbox]:checked).error,sh-toggle.active.error{--toggle-bg: var(--error-3);--togglek-bg: var(--error-8)}sh-toggle:has(input[type=checkbox]:checked).success,sh-toggle.active.success{--toggle-bg: var(--success-3);--togglek-bg: var(--success-8)}sh-toggle.outlined{--toggle-bg: var(--base-1);--togglek-bg: var(--base-5);--togglek-bs: none;--toggle-b: 1px solid var(--base-5)}sh-toggle.outlined .knob{width:.875rem;height:.875rem}sh-toggle.outlined.active{--togglek-bg: var(--base-8);--toggle-b: 1px solid var(--base-8)}sh-toggle.outlined.active.primary{--togglek-bg: var(--primary-8);--toggle-b: 1px solid var(--primary-8)}sh-toggle.outlined.active.accent{--togglek-bg: var(--accent-8);--toggle-b: 1px solid var(--accent-8)}sh-toggle.outlined.active.warn{--togglek-bg: var(--warn-8);--toggle-b: 1px solid var(--warn-8)}sh-toggle.outlined.active.error{--togglek-bg: var(--error-8);--toggle-b: 1px solid var(--error-8)}sh-toggle.outlined.active.success{--togglek-bg: var(--success-8);--toggle-b: 1px solid var(--success-8)}sh-toggle.simple{--togglek-bg: #fff}sh-toggle.simple:has(input[type=checkbox]:checked),sh-toggle.simple.active{--togglek-bg: var(--base-8)}sh-toggle.simple:has(input[type=checkbox]:checked).primary,sh-toggle.simple.active.primary{--togglek-bg: var(--primary-8);--toggle-bg: var(--primary-3)}sh-toggle.simple:has(input[type=checkbox]:checked).accent,sh-toggle.simple.active.accent{--togglek-bg: var(--accent-8);--toggle-bg: var(--accent-3)}sh-toggle.simple:has(input[type=checkbox]:checked).warn,sh-toggle.simple.active.warn{--togglek-bg: var(--warn-8);--toggle-bg: var(--warn-3)}sh-toggle.simple:has(input[type=checkbox]:checked).error,sh-toggle.simple.active.error{--togglek-bg: var(--error-8);--toggle-bg: var(--error-3)}sh-toggle.simple:has(input[type=checkbox]:checked).success,sh-toggle.simple.active.success{--togglek-bg: var(--success-8);--toggle-bg: var(--success-3)}sh-toggle.flat{--togglek-bg: #fff}sh-toggle.flat:has(input[type=checkbox]:checked),sh-toggle.flat.active{--togglek-bg: #fff;--toggle-bg: var(--base-8)}sh-toggle.flat:has(input[type=checkbox]:checked).primary,sh-toggle.flat.active.primary{--toggle-bg: var(--primary-8)}sh-toggle.flat:has(input[type=checkbox]:checked).accent,sh-toggle.flat.active.accent{--toggle-bg: var(--accent-8)}sh-toggle.flat:has(input[type=checkbox]:checked).warn,sh-toggle.flat.active.warn{--toggle-bg: var(--warn-8)}sh-toggle.flat:has(input[type=checkbox]:checked).error,sh-toggle.flat.active.error{--toggle-bg: var(--error-8)}sh-toggle.flat:has(input[type=checkbox]:checked).success,sh-toggle.flat.active.success{--toggle-bg: var(--success-8)}sh-toggle.raised{--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked),sh-toggle.raised.active{--toggle-bg: var(--base-g2);--togglek-bg: #fff}sh-toggle.raised:has(input[type=checkbox]:checked).primary,sh-toggle.raised.active.primary{--toggle-bg: var(--primary-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).accent,sh-toggle.raised.active.accent{--toggle-bg: var(--accent-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).warn,sh-toggle.raised.active.warn{--toggle-bg: var(--warn-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).error,sh-toggle.raised.active.error{--toggle-bg: var(--error-g2)}sh-toggle.raised:has(input[type=checkbox]:checked).success,sh-toggle.raised.active.success{--toggle-bg: var(--success-g2)}
|
|
2
|
+
`],encapsulation:2});}}return g})();export{J};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-D48AStVy.js';import {T,m,N as Nt,U as Ue,d as dw,f as N,bZ as ei,Q as Qi,X as XT,H as Hl,bf as ig,c2 as uC,D as DE,z as gg,a_ as ZC,b_ as Ig,a1 as cT,ag as zg,a2 as lT,k as gT,F as Fg,S as Sd,n as nC,x as xd,o as oT,q as PC,I as Qg,i as iT,E as nm,aF as YC,c4 as sb}from'./main-PXGZLKMN.js';var Y=e=>({children:e,level:0}),L=e=>({$implicit:e}),j=(e,n)=>({children:e,level:n}),V=(e,n)=>n.id;function z(e,n){if(e&1&&(Qi(0,"sh-icon"),PC(1,"caret-down"),Hl()),e&2){let t=nC().$implicit;Qg("open",t.isOpen());}}function B(e,n){e&1&&(Qi(0,"sh-icon"),PC(1,"dot"),Hl());}function J(e,n){e&1&&Ig(0);}function U(e,n){if(e&1&&ig(0,J,1,0,"ng-container",3),e&2){let t=nC().$implicit,o=nC().$implicit;nC();let i=uC(3);gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(5,L,YC(2,j,t.children,o.level+1)));}}function X(e,n){if(e&1){let t=gT();Qi(0,"div",4,1),Fg("click",function(){let i=Sd(t).$implicit,G=nC(2);return xd(i.children.length>0&&G.toggleNode(i))}),oT(2,z,2,2,"sh-icon",5)(3,B,2,0,"sh-icon"),Qi(4,"div",6),PC(5),Hl()(),oT(6,U,1,7,"ng-container");}if(e&2){let t=n.$implicit;Qg("cannot-toggle",t.children.length===0)("open",t.isOpen()),DE(2),iT(t.children.length>0?2:3),DE(3),nm(t.text),DE(),iT(t.isOpen()?6:-1);}}function q(e,n){if(e&1&&(Qi(0,"sh-list"),cT(1,X,7,7,null,null,V),Hl()),e&2){let t=n.$implicit;zg("padding-left",t.level*.25,"rem"),DE(),lT(t.children);}}function H(e,n){e&1&&Ig(0);}var S=class e{#e=T(m);treeStructure=Nt(()=>{let n=this.#e.systemInfo();return this.processObject(n,0)});toggleNode(n){n.isOpen.update(t=>!t);}processObject(n,t){let o=[];for(let i in n)typeof n[i]=="object"?o.push({id:i,text:i,children:this.processObject(n[i],t+1),level:t,isOpen:Ue(false)}):o.push({id:i,text:`${i}: ${n[i]}`,children:[],level:t,isOpen:Ue(false)});return o}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=dw({type:e,selectors:[["app-server-settings"]],decls:5,vars:6,consts:()=>{let n;return n=$localize`System info`,[["recursiveTree",""],["treeNode",""],n,[4,"ngTemplateOutlet","ngTemplateOutletContext"],["action","",3,"click"],[3,"open"],[1,"text"]]},template:function(t,o){if(t&1&&(Qi(0,"h3"),XT(1,2),Hl(),ig(2,q,3,2,"ng-template",null,0,sb)(4,H,1,0,"ng-container",3)),t&2){let i=uC(3);DE(4),gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(4,L,ZC(2,Y,o.treeStructure())));}},dependencies:[c,N,ei],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}sh-list[_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0}sh-list[_ngcontent-%COMP%] [action].cannot-toggle[_ngcontent-%COMP%]{cursor:initial}"]})};export{S as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {J}from'./chunk-birClroL.js';import {c}from'./chunk-bx0aDvCZ.js';import {F as Fe,P as Pe}from'./chunk-CtLFpDTP.js';import {N as Nt$2}from'./chunk-CxPG-KgI.js';import {v as ve}from'./chunk-B-ryE8KW.js';import {x}from'./chunk-CDRHCSvU.js';import {T,ab as C,m,a6 as be,b as g1,ac as h1,U as Ue,B as y1,N as Nt$1,ai as m$1,aj as l,G as Ga,at as h,aG as pt,a$ as Vs,b0 as ty,bM as vy,C as Bu,d as dw,v,f as N,a0 as de,bs as ei,u as ue,aH as m$2,L as oC,o as oT,Q as Qi,Y as iC,bf as ig,H as Hl,bt as uC,i as iT,D as DE,I as Qg,z as gg,a_ as ZC,$ as $g,K as lC,s as sm,l as HC,p as DD,aC as hg,w as im,y as TD,ag as zg,aD as zC,X as XT,aP as Ul,a1 as cT,aQ as Wl,au as Lg,av as eC,a2 as lT,c3 as Bs,ay as $u,k as gT,S as Sd,n as nC,x as xd,j as mg,bu as Ig,F as Fg,q as PC,E as nm,O as Og,P as Pg,a3 as QC,aB as rm,ap as sT,aM as tb,aa as Gl,aS as ib,aF as YC,ar as Wp,bv as sb}from'./main-TZVLLK67.js';import {$}from'./chunk-M5tldLvJ.js';import {d}from'./chunk-BjNuU0J_.js';import {F as Fe$1}from'./chunk-Do6_xsGi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt$1,e as en$1,D}from'./chunk-BOII3Fdm.js';var Pt=["treeContainer"],Mt=["formRef"],Et=[[["label"]],[["label"]],[["input"]]],Tt=["label","label","input"],ct=["ngProjectAs","label",5,["label"]],yt=["ngProjectAs","input",5,["input"]],bt=r=>({children:r,level:0}),ht=r=>({$implicit:r}),St=(r,t)=>({children:r,level:t}),Nt=()=>({maxWidth:"700px",width:"100%"}),vt=(r,t)=>t.id;function Ot(r,t){if(r&1){let e=gT();Qi(0,"sh-button-group",22),sm("valueChange",function(i){Sd(e);let o=nC();return HC(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),xd(i)}),Qi(1,"button",23),XT(2,4),Hl(),Qi(3,"button",24),XT(4,5),Hl()();}if(r&2){let e=nC();im("value",e.pathDiscoveryMethod);}}function Ft(r,t){r&1&&mg(0,"sh-progress-bar",14);}function Rt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"caret-down"),Hl());}function xt(r,t){r&1&&mg(0,"sh-icon",30);}function Dt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"spinner"),Hl());}function wt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"caret-right"),Hl());}function It(r,t){if(r&1&&mg(0,"img",31),r&2){let e=nC(3).$implicit;gg("src",e.customIcon,Wp);}}function Lt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder-open"),Hl());}function At(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder-user"),Hl());}function kt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"file"),Hl());}function Bt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder"),Hl());}function $t(r,t){if(r&1&&(oT(0,Rt,2,0,"sh-icon",30)(1,xt,1,0,"sh-icon",30)(2,Dt,2,0,"sh-icon",30)(3,wt,2,0,"sh-icon",30),oT(4,It,1,1,"img",31)(5,Lt,2,0,"sh-icon",27)(6,At,2,0,"sh-icon",27)(7,kt,2,0,"sh-icon",27)(8,Bt,2,0,"sh-icon",27)),r&2){let e=nC(2).$implicit,n=nC(2);iT(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),DE(4),iT(e.customIcon?4:e.children.length?5:e.id==="%HOME%"?6:e.cls==="file"?7:8);}}function Wt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"desktop-tower"),Hl());}function Vt(r,t){if(r&1&&(Qi(0,"span",29),PC(1),tb(2,"bytes"),Hl()),r&2){let e=nC(2).$implicit;DE(),Gl("\xA0(",ib(2,1,e.fileSize,true,true),")");}}function Gt(r,t){r&1&&Ig(0);}function zt(r,t){if(r&1&&ig(0,Gt,1,0,"ng-container",15),r&2){let e=nC(2).$implicit,n=nC().$implicit;nC();let i=uC(7);gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(5,ht,YC(2,St,e.children,n.level+1)));}}function jt(r,t){if(r&1){let e=gT();Qi(0,"div",25,3),Fg("click",function(i){Sd(e);let o=nC().$implicit,s=nC(2);return xd(s.toggleSelectedNode(i,o))}),Qi(2,"div",26),Fg("click",function(i){Sd(e);let o=nC().$implicit,s=nC(2);return xd(s.toggleNode(i,o.id,o))}),oT(3,$t,9,2)(4,Wt,2,0,"sh-icon",27),Hl(),Qi(5,"div",28)(6,"span"),PC(7),Hl(),oT(8,Vt,3,5,"span",29),Hl()(),oT(9,zt,1,7,"ng-container");}if(r&2){let e=nC().$implicit,n=nC().$implicit,i=nC();Qg("accepted",e.accepted===true)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),DE(2),Qg("file",e.cls==="file"),DE(),iT(e.id!=="/"?3:4),DE(4),nm(e.text),DE(),iT(e.cls=="file"&&e.fileSize!=null&&e.fileSize>=0?8:-1),DE(),iT(e.children.length>0?9:-1);}}function Ht(r,t){if(r&1&&oT(0,jt,10,24),r&2){let e=t.$implicit,n=nC(2);iT(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1);}}function Ut(r,t){if(r&1&&(Qi(0,"sh-list"),cT(1,Ht,1,1,null,null,vt),Hl()),r&2){let e=t.$implicit;zg("padding-left",e.level*.25,"rem"),DE(),lT(e.children);}}function Jt(r,t){r&1&&Ig(0);}function Xt(r,t){if(r&1){let e=gT();Qi(0,"sh-toggle",32),sm("checkedChange",function(i){Sd(e);let o=nC();return HC(o._showHiddenNodes,i)||(o._showHiddenNodes=i),xd(i)}),XT(1,6),Hl();}if(r&2){let e=nC();im("checked",e._showHiddenNodes),DE(),Lg(e.showFiles()?"files":"folders"),eC(1);}}function qt(r,t){if(r&1){let e=gT();Qi(0,"button",33),Fg("click",function(){Sd(e);let i=nC();return xd(i.openCreateFolderDialog())}),XT(1,7),Hl();}if(r&2){let e=nC();gg("disabled",!e.isCurrentPathFolder());}}function Kt(r,t){if(r&1&&(Qi(0,"sh-alert",20),PC(1),Hl()),r&2){let e=nC();gg("color","error"),DE(),nm(e.errorMessage());}}function Qt(r,t){if(r&1){let e=gT();Qi(0,"sh-dialog",34),sm("isOpenChange",function(i){Sd(e);let o=nC();return HC(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),xd(i)}),Qi(1,"header",35)(2,"h2"),XT(3,8),Hl()(),Qi(4,"div",36)(5,"div",37)(6,"p"),XT(7,9),Hl(),Qi(8,"div",38)(9,"pre"),PC(10),Hl()()(),Qi(11,"sh-form-field")(12,"textarea",39),sm("ngModelChange",function(i){Sd(e);let o=nC();return HC(o.createFolderPath,i)||(o.createFolderPath=i),xd(i)}),Hl(),DD(),Hl()(),Qi(13,"footer",40)(14,"button",41),Fg("click",function(){Sd(e);let i=nC();return xd(i.closeCreateFolderDialog(false))}),PC(15,"Cancel"),Hl(),Qi(16,"button",42),Fg("click",function(){Sd(e);let i=nC();return xd(i.closeCreateFolderDialog(true))}),Og(17,10),mg(18,"sh-icon"),Pg(),Hl()()();}if(r&2){let e=nC();im("isOpen",e.createFolderDialogOpen),gg("options",QC(6,Nt)),DE(10),rm("",e.currentPathResolved(),"",e.createFolderPath()?"/"+e.createFolderPath():""),DE(2),im("ngModel",e.createFolderPath),TD(),DE(4),gg("disabled",!e.createFolderPath()?.length);}}var gt=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(gt||{}),b="/",ne=true,Se=class r{#e=T(C);#t=T(m);#b=T(be);multiSelect=g1(false);disabled=g1(false);showFiles=g1(false);selectFiles=g1(false);onlySelectFolder=g1(false);accepts=g1(null);startingPath=g1(null);rootPaths=g1([]);initialNodes=g1([]);backupSettings=g1(null);pathRefreshTrigger=g1(false);showHiddenNodes=g1(false);enableCreateFolder=g1(false);hideShortcuts=g1(false);resolvePaths=g1(false);customRemoteMode=g1(null);showUnrootedSources=g1(false);backupId=g1("");connectionStringId=g1(null);sourcePrefix=g1("");destinationUrl=g1("");loadExtendedData=g1(true);hasExtendedData=h1();searchMode=g1(false);searchResults=g1([]);_showHiddenNodes=Ue(false);createFolderDialogOpen=Ue(false);createFolderPath=Ue(null);errorMessage=Ue(null);anyRemoteSourcesLoaded=Ue(false);treeContainerRef=y1("treeContainer");formRef=y1("formRef");pathDiscoveryMethod=Ue("browse");isLoading=Ue(null);currentPath=Ue("");#p=Ue(null);treeSearchQuery=Ue("");treeNodes=Ue([]);pathDelimiter=Nt$1(()=>this.#t.systemInfo()?.DirectorySeparator??"");#r=Nt$1(()=>this.currentPathArray().filter(e=>this.#i(e)).find(e=>e.includes("*")||e.includes("[")||e.includes("{")||e.includes("?"))&&this.#t.hasV2FilterOperations());filterGroups=this.#t.filterGroups();isByBackupSettings=Nt$1(()=>{let t=this.backupSettings();return !(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=Nt$1(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});currentPathArray=Nt$1(()=>this.currentPath().split("\0").filter(t=>t!==""&&t!==b));currentPathResolved=Nt$1(()=>this.currentPathArray().map(e=>{let n=this.treeNodes().find(i=>i.id===e)?.resolvedpath??e;return this.#t.resolveShorthandPath(n)}).join("\0"));#l(t){if(!t)return null;if(t.startsWith("@")&&t.includes("|")){let e=t.split("|"),n=e[0],i=e[1],o=i.split("://")[0],s=e[2]??"";return o==="diskimage"&&!s&&(s=this.#s(e[1].split("://")[1])),{mount:n.substring(1),prefix:n,url:i,type:o,path:s}}return null}#m=Nt$1(()=>{if(!this.showUnrootedSources())return [];let t=this.rootPaths();return (t===void 0||t.length===0)&&(t=[b]),this.currentPathArray().filter(n=>!this.#i(n)).filter(n=>!n.startsWith("%")).filter(n=>!t.find(i=>n.startsWith(i))).map(n=>{let i=this.#l(n);return i?{id:n,path:i.mount,displayName:Pe(i.url),icon:Fe(i.url)}:{id:n,path:n,displayName:n,icon:null}})});#c(t){return t.map(e=>{if(this.#i(e))return e;let n=this.#l(e);return n?this.#s(n.mount):e})}TreeEvalEnum=gt;#S=Nt$1(()=>{if(!this.#r())return null;let t=this.#c(this.currentPathArray()),e=t.filter(o=>!this.#i(o)),n=t.filter(o=>this.#i(o));return {paths:this.searchableTreeNodes().map(o=>o.id).filter(Boolean),sources:e,filters:n}});#_=$({params:()=>({data:this.#S()}),stream:({params:t})=>!this.#r()||!t.data||t.data.sources.length===0?ty(null):Bs(300).pipe($u(()=>this.#e.postApiV2FilesystemTestFilter({requestBody:{Paths:t.data?.paths,Sources:t.data?.sources,Filters:t.data?.filters}}).pipe(pt(e=>{if(!e.Success||!e.Data)return console.log("Error evaluating filters",e),null;let n=new Map;for(let i of e.Data)if(i.Path){let o=0;i.Included?o=1:i.MatchedFilter&&(o=-1),n.set(i.Path,o);}return n}),Vs(()=>ty(null)))))});searchResultTreeStructure=Nt$1(()=>{let t=this.searchResults();if(t.length===0)return [];let e=this.currentPathArray(),n=this.showHiddenNodes(),i=new Map;for(let a of t){let l=a.Path??"",C=this.#a(l),T=l.split(C).filter(M=>M!==""),P="";for(let M=0;M<T.length;M++){let w=T[M],I=M===T.length-1,U=!I||this.#n(l),ft=P||b,Ne=P?P.endsWith(C)?P.slice(0,-C.length):P:"";if(P=Ne?`${Ne}${C}${w}`:`${C}${w}`,U&&!P.endsWith(C)&&(P+=C),!i.has(P))i.set(P,{part:w,parentPath:ft,isFolder:U,match:I?a:null});else if(I){let Ct=i.get(P);Ct.match=a;}}}let o=new Map;for(let[a,l]of i)o.has(l.parentPath)||o.set(l.parentPath,[]),o.get(l.parentPath).push(a);let s=new Set,u=new Map;for(let[a,l]of i){if(!l.isFolder){s.add(a);continue}let C=o.get(l.parentPath)||[];if(C.length===1&&C[0]===a&&l.parentPath!==b)continue;s.add(a);let P=l.part,M=a;for(;;){let w=o.get(M)||[];if(w.length!==1)break;let I=w[0],U=i.get(I);if(!U||!U.isFolder)break;P+="/"+U.part,M=I;}M!==a&&u.set(a,P);}s.add(b);let g=[],c=new Map,d=Array.from(s).filter(a=>a!==b).sort((a,l)=>a.split("/").length-l.split("/").length||a.localeCompare(l));for(let a of d){let l=i.get(a);if(!l)continue;let C=l.parentPath;for(;C!==b&&!s.has(C);)C=i.get(C)?.parentPath||b;if(c.has(a))continue;let T=this.#g(u.get(a),l.match?.Metadata)??l.part,P=l.match===null,M=l.match!==null&&!l.isFolder&&n?0:this.#r()?this.#h(a,null,e,l.isFolder?"folder":"file"):this.#d(e,a,l.isFolder?"folder":"file",null),w={id:a,resolvedpath:a,text:T,parentPath:C,children:[],evalState:M,isIndeterminate:this.isIndeterminate(e,a),cls:l.isFolder?"folder":"file",isSearchMatch:l.match!==null,isGenerated:P,hasChildrenInSearch:(o.get(a)?.length||0)>0,iconCls:null,check:false,leaf:!l.isFolder,hidden:false,systemFile:false,temporary:false,symlink:false,fileSize:l.match?.Size??0};if(c.set(a,w),C===b)g.push(w);else {let I=c.get(C);I&&I.children.push(w);}}let E=a=>{a.sort((l,C)=>l.cls==="folder"&&C.cls!=="folder"?-1:l.cls!=="folder"&&C.cls==="folder"?1:(l.text??"").localeCompare(C.text??"")),a.forEach(l=>E(l.children));};return E(g),g});treeStructure=Nt$1(()=>{if(this.searchMode())return this.searchResultTreeStructure();this.#_.value();let e=this.showHiddenNodes(),n=this.#N(this.currentPathArray()),i=this.searchableTreeNodes(),o=this.rootPaths(),s=this.accepts(),u=[];o.length>0?u=o.map(c=>{let d=this.#r()?this.#h(c,null,n,"folder"):this.#d(n,c,"folder",null);return {id:c,resolvedpath:c,text:c,parentPath:"",children:[],evalState:d,isIndeterminate:false,cls:this.#n(c)?"folder":"file"}}):u=[{id:b,resolvedpath:b,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:false,cls:"folder"}];let g=this.#m().map(c=>({id:c.path,resolvedpath:c.path,remoteSource:this.#l(c.id),text:c.displayName,parentPath:"",children:[],evalState:1,isIndeterminate:false,cls:"folder",customIcon:c.icon}));return u=[...u,...g],u.map(c=>{let d=new Map;if(!c.id)return;let E=c.id;s&&(c.accepted=true),d.set(E,c);let a=o.length>0?i.filter(l=>l.parentPath.startsWith(E)):i;for(let l$1 of a){if(!l$1.id)continue;let C=l$1.id;if(!l$1.cls||d.has(C))continue;let T=d.get(l$1.parentPath),P=l$1.hidden===true&&!e?0:this.#r()?this.#h(C,T,n,l$1.cls):this.#d(n,C,l$1.cls,T),M=m$1(l({},l$1),{isIndeterminate:this.isIndeterminate(n,C),evalState:P,children:[]});s&&(M.accepted=this.matchAccepts(s,M)),d.set(C,M),M.id?.startsWith("%")&&M.id?.endsWith("%")&&d.set(this.#s(C),M),T&&T.children.push(M);}return c}),u});#N(t){let e=structuredClone(t);for(let n=0;n<e.length;n++){let o=e[n].slice(1);if(o.startsWith("{")&&o.endsWith("}")){let s=o.slice(1,-1),u=this.filterGroups?.FilterGroups?.[s];if(u&&u.length){let g=u.map(c=>`-${c}`);e.splice(n,1,...g);}}}return e}#s(t){if(!t)return b;let e=this.#a(t);return t.endsWith("/")||t.endsWith("\\")||t===b?t:t+e}#f(t){return t?.id?!this.resolvePaths()||!t.resolvedpath?t.id:t.id.startsWith("%")&&t.id.endsWith("%")?this.#s(t.resolvedpath):t.resolvedpath:null}#h(t,e,n,i){if(e&&e.evalState===-1)return -2;let o=this.#_.value();return o&&o.has(t)?o.get(t):this.#d(n,t,i,e)}#d(t,e,n,i){if(i&&i.evalState===-1)return -2;let o=0,s=this.#c(t.filter(d=>!this.#i(d))),u=t.filter(d=>this.#i(d)),g=this.multiSelect(),c=this.#f(this.treeNodes().find(d=>d.id===e))??e;if(s.length===0)return o;for(let d=0;d<s.length;d++){let E=s[d];if(e===E||c==E){o=1;break}if(!g||!this.#n(E))continue;if(e?.startsWith(E)||c?.startsWith(E)){o=1;break}}if(u.length===0)return o;for(let d=0;d<u.length;d++){let E=u[d],a=E.slice(1),l=E.startsWith("-")?-1:1;if(this.#n(a)){if(n!=="folder")continue;if(e===a||c==a){o=l;break}}if(a.startsWith("*")&&(a.endsWith("*\\")||a.endsWith("*/"))){if(n!=="folder")continue;let T=a.slice(1,-2);if(T==="")break;if(e?.includes(T+"\\")||e?.includes(T+"/")){o=l;break}}if(a.startsWith("[.*")&&(a.endsWith("[^\\/]*]")||a.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let T=a.slice(3,-7);if(new RegExp(T).test(e)){o=l;break}}if(a.startsWith("[")&&a.endsWith("]")){let T=a.slice(1,-1),P=this.translateCSharpRegex(T);if(new RegExp(`${P}`).test(e)){o=l;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#C(e,a,true)){o=l;break}}if(a==="")continue;if(a===e){o=l;break}if(this.#C(e,a,true)){o=l;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,s)=>`(${s})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#n(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):false}#C(t,e,n=false){let i=e.replace(/[\\.+^${}()|[\]*?]/g,s=>s==="*"?".*":s==="?"?".":"\\"+s);return new RegExp(`${i}${n?"$":""}`).test(t)}#a(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=Ga(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=Ga(()=>{let t=this.pathDiscoveryMethod(),e=this.#p();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n);}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===b)return true;let n=t.split(",");if(n.length===0)return true;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):false}currentPathEffect=Ga(()=>{let t=this.#p();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")));});inputValueChangeAbortController=null;inputRefEffect=Ga(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#v(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value);},{signal:this.inputValueChangeAbortController.signal}),this.#p.set(t),t.autocomplete="off");});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#R(t);else {let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#g(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#u(null,e[0])):this.#u(null,b);}}getParentPath(t){let e=this.#a(t),n=t.split(e);return n.length<=1?b:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===b||this.#m().map(d=>this.#l(d.id)?.mount).filter(d=>d).includes(e.id??"")||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(t,e.id,e);return}if(this.onlySelectFolder()&&e.cls!=="folder"||this.accepts()&&!e.accepted)return;let i=this.currentPathArray(),o=this.#c(i),s=this.isChildOfSelected(e),u=this.#f(e),g=s?`-${u}`:u,c=this.#n(u);if(this.multiSelect())if(o.includes(u))this.currentPath.set(i.filter(d=>d!==u&&!(c&&d.startsWith(g))).join("\0"));else if(o.some(d=>d==g))this.currentPath.set(i.filter(d=>d!==g).join("\0"));else {let d=c?i.filter(E=>!E.startsWith(u)):i;this.currentPath.set([...d,g].join("\0"));}else i.includes(u)?this.currentPath.set(i.filter(d=>d!==u).join("\0")):this.currentPath.set(u);}isChildOfSelected(t){return this.#c(this.currentPathArray()).filter(n=>this.#n(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e,n=null){t.stopPropagation(),n?.cls==="folder"&&(n?.children.length?this.treeNodes.update(i=>i.filter(o=>!o.id?.startsWith(n.id)||o.id===n.id)):this.#u(n,e));}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(true),false}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolved(),o=this.#s(e),s=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+s}}).subscribe({next:()=>{this.currentPath.set(s),this.#u(null,n),setTimeout(()=>{this.#P();},500),this.createFolderDialogOpen.set(false);},error:u=>{let g=u?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),c=g?g[1]:u?.message||$localize`An error occurred while trying to create the folder.`;this.#b.open(h,{data:{title:$localize`Cannot create folder`,message:c,confirmText:$localize`OK`,cancelText:void 0}});}});}}else this.createFolderDialogOpen.set(false);return false}#P(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"});},100);}#v(t){return Object.defineProperty(t,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:e}})),e}}),t}#O(t){return this.#e.postApiV1Filesystem({showHidden:true,requestBody:{path:t},onlyFolders:!this.showFiles()})}#o(t,e,n){return this.#e.postApiV2DestinationList({requestBody:{BackupId:this.backupId()??null,DestinationUrl:e?.url??this.destinationUrl()??null,ConnectionStringId:this.connectionStringId()??null,DestinationType:n,SourcePrefix:e?.prefix??this.sourcePrefix()??null,Path:t,Offset:null,Limit:null}}).pipe(pt(i=>(i.Data?.Items??[]).map(o=>m$1(l({},o),{Path:(e?.prefix??"")+o.Path})).filter(o=>o.Metadata==null||!o.Metadata.ExtType)))}#M(t,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}}).pipe(pt(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(o=>({Path:(e?.prefix??"")+o,Metadata:JSON.parse(i[o])}))}))}#E(t,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}}).pipe(pt(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(o=>({Path:(e?.prefix??"")+o,Metadata:JSON.parse(i[o])}))}))}#T(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(pt(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#F(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}}).pipe(pt(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:false,folderContents:true,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(pt(i=>i.Files??[]))}}#y(t,e){return e?.type==="office365"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#M(e.path,e):this.customRemoteMode()==="o365"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#M(t,null):e?.type==="googleworkspace"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#E(e.path,e):this.customRemoteMode()==="gsuite"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#E(t,null):e?.type==="diskimage"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#T(e.path):this.customRemoteMode()==="diskimage"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#T(t):this.isByBackupSettings()?this.#F(t):this.customRemoteMode()==="backend"?this.#o(t,null,"Backend"):this.#O(t)}#R(t){let n=t.split("\0").filter(s=>!this.#i(s)&&!s.startsWith("@")).filter(Boolean).map(s=>{let u=this.#a(s),g=s.split(u);return g.at(-1)===""&&g.pop(),this.#n(s)||g.pop(),{split:g,sep:u}}),i=[b];n.forEach(({split:s,sep:u})=>{s.forEach((g,c)=>{let d=s.slice(0,c+1).join(u)+u;d===""||d===u||i.includes(d)||i.push(d);});});let o=i.map(s=>(this.isLoading.set(s),this.#y(s,null).pipe(pt(u=>({status:"success",value:u,url:s})),Vs(u=>ty({status:"error",value:u,url:s})))));vy(o).pipe(Bu(()=>this.isLoading.set(null))).subscribe({next:s=>{let u=s.filter(c=>c.status==="success");s.filter(c=>c.status==="error");this.treeNodes.update(c=>{let d=u.flatMap(a=>Array.isArray(a.value)?a.value.map(l$1=>m$1(l({},l$1),{parentPath:a.url})):[]);d.length>0&&this.anyRemoteSourcesLoaded.set(true);let E=[...new Map([...c,...d].map(a=>[a.id,a])).values()];return this.#P(),this.hideShortcuts()?E.filter(a=>!a.id.startsWith("%")):E});}});}#g(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#x(t){t&&t.ExtType&&t.ExtType.length>0&&this.hasExtendedData.emit(t.ExtType);}#n(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#i(t){return t.startsWith("+")||t.startsWith("-")}#u(t=null,e=b){let n=t?.remoteSource;this.isLoading.set(e),this.#y(e,n).pipe(Bu(()=>this.isLoading.set(null))).subscribe({next:i=>{let o=this.isByBackupSettings()||this.customRemoteMode()!==null||n?i.map(s=>{this.#x(s.Metadata);let u=this.#a(s.Path),g=this.#g(s.Path.split(u).filter(E=>E!=="").pop(),s.Metadata);if(s.Metadata&&s.Metadata["diskimage:Type"]==="filesystem")return null;let c=s.Path,d=null;return n&&(c=s.Path.substring(1),d=m$1(l({},n),{path:s.Path.substring(n.prefix.length)})),{text:g,id:c,cls:this.#n(s.Path)?"folder":"file",leaf:t!==null,resolvedpath:s.Path,hidden:false,remoteSource:d,fileSize:s.Size}}):i;o.length>0&&this.anyRemoteSourcesLoaded.set(true),this.treeNodes.update(s=>{let u=o.filter(c=>c!==null).map(c=>{let d=this.#n(c.id)?"folder":"file";return m$1(l({},c),{cls:d,parentPath:e})}),g=[...new Map([...s,...u].map(c=>[c.id,c])).values()];return this.hideShortcuts()?g.filter(c=>!c.id.startsWith("%")):g});},error:i=>{this.errorMessage.set(i.message),this.anyRemoteSourcesLoaded()&&setTimeout(()=>{this.errorMessage.set(null);},5e3);}});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&$g(n.treeContainerRef,Pt,5)(n.formRef,Mt,5),e&2&&lC(2);},hostVars:2,hostBindings:function(e,n){e&2&&Qg("disabled",n.disabled());},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],onlySelectFolder:[1,"onlySelectFolder"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],resolvePaths:[1,"resolvePaths"],customRemoteMode:[1,"customRemoteMode"],showUnrootedSources:[1,"showUnrootedSources"],backupId:[1,"backupId"],connectionStringId:[1,"connectionStringId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:Tt,decls:19,vars:18,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let o;o=$localize`Enter new folder path`;let s;s=$localize`Will be created as:`;let u;return u=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,o,s,u,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"color"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",3,"click"],[1,"icon",3,"click"],[1,"primary"],[1,"text"],[1,"size"],[1,"small"],["alt","Provider icon",1,"provider-icon",3,"src"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(oC(Et),oT(0,Ot,5,1,"sh-button-group",11),Qi(1,"div",12),iC(2,0,ct),Qi(3,"div",13,0),oT(5,Ft,1,0,"sh-progress-bar",14),ig(6,Ut,3,2,"ng-template",null,1,sb)(8,Jt,1,0,"ng-container",15),Hl(),Qi(9,"div",16),oT(10,Xt,2,2,"sh-toggle",17),oT(11,qt,2,1,"button",18),Hl()(),Qi(12,"div",19,2)(14,"sh-form-field"),iC(15,1,ct),iC(16,2,yt),Hl()(),oT(17,Kt,2,2,"sh-alert",20),oT(18,Qt,19,7,"sh-dialog",21)),e&2){let i=uC(7);iT(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),DE(),Qg("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),DE(2),Qg("visualize-accepted",n.accepts()),DE(2),iT(n.isLoading()!=null?5:-1),DE(3),gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(16,ht,ZC(14,bt,n.treeStructure()))),DE(2),iT(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),DE(),iT(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),DE(),Qg("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),DE(5),iT(n.errorMessage()?17:-1),DE(),iT(n.createFolderDialogOpen()?18:-1);}},dependencies:[v,x,J,N,Fe$1,c,d,de,ei,Bn,Ze,Rn,Jt$1,ue,m$2],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(img:nth-child(2)){width:2.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}']})};var Yt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Zt=["label","[prefix]","[suffix]"],en=["ngProjectAs","label",5,["label"]];function tn(r,t){if(r&1&&PC(0),r&2){let e=t.$implicit,n=nC();rm("",e.label,"",n.hasPerSecond()?"/s":"");}}var nn=["throttle-upload","throttle-download"],on=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],rn=r=>{if(!r||typeof r!="string"||r.length===0)return {size:0,unit:"MB"};let t=r.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return t&&(t[2].toUpperCase()==="B"||t[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:t?parseInt(t[1],10):0,unit:t?t[2].toUpperCase():"MB"}},mt=class r{customId=g1();inputType=g1();timespan=Ue(0);unit=Ue("MB");sizeOptions=Ue(on);readonly=Ue(false);hasPerSecond=Nt$1(()=>{let t=this.inputType();return t&&nn.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=Ga(()=>{this.onChange(this.getValue());});writeValue(t){if(t){let e=rn(t);e?queueMicrotask(()=>{this.timespan.set(e.size),this.unit.set(e.unit);}):(this.timespan.set(0),this.unit.set("MB"));}else this.timespan.set(0),this.unit.set("MB");}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}getValue(){return `${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[zC([{provide:D,useExisting:r,multi:true}])],ngContentSelectors:Zt,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(oC(Yt),Qi(0,"div",0),iC(1,0,en),Hl(),Qi(2,"sh-form-field")(3,"input",1),sm("ngModelChange",function(o){return HC(n.timespan,o)||(n.timespan=o),o}),Hl(),DD(),iC(4,1),iC(5,2),Hl(),Qi(6,"sh-select",2)(7,"input",3),sm("ngModelChange",function(o){return HC(n.unit,o)||(n.unit=o),o}),Hl(),DD(),ig(8,tn,1,2,"ng-template"),Hl()),e&2&&(DE(2),hg("readonly",n.readonly()||void 0),DE(),gg("id",n.customId()),im("ngModel",n.timespan),gg("disabled",n.readonly()),TD(),DE(3),zg("--miw",0),gg("options",n.sizeOptions())("readonly",n.readonly())("isClearable",false),DE(),im("ngModel",n.unit),TD());},dependencies:[Nt$2,Fe$1,Bn,Ze,en$1,Rn,Jt$1],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}']})};var sn=[[["label"]],[["","prefix",""]],[["","suffix",""]]],an=["label","[prefix]","[suffix]"],ln=["ngProjectAs","label",5,["label"]];function cn(r,t){if(r&1){let e=gT();Qi(0,"button",7),Fg("click",function(){let i=Sd(e).$implicit,o=nC();return xd(o.updateUnit(i.value))}),XT(1,1),Hl();}if(r&2){let e=t.$implicit;DE(),Lg(e.label),eC(1);}}var dn=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],un=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pn=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],_t=class r{customId=g1();inputType=g1();timespan=Ue(0);#e="D";unit=Ue(this.#e);unitLabel=Nt$1(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=Nt$1(()=>{let t=this.inputType();return t&&pn.includes(t.replace("--",""))});timeOptions=Nt$1(()=>this.isShortTime()?dn:un);readonly=Ue(false);onChange=()=>{};onTouched=()=>{};onChangeEffect=Ga(()=>{this.onChange(this.getValue());});inputTypeEffect=Ga(()=>{this.timeOptions();let e=this.isShortTime()?"s":"D";this.#e=e,this.unit.set(e);});updateUnit(t){this.unit.set(t);}writeValue(t){let e=this.isShortTime();if(t){let n=e?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,i=t.match(n);i?(this.timespan.set(parseInt(i[1],10)),this.unit.set(i[2])):(this.timespan.set(0),this.unit.set(this.#e));}else this.timespan.set(0),this.unit.set(this.#e);}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}getValue(){return `${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[zC([{provide:D,useExisting:r,multi:true}])],ngContentSelectors:an,decls:11,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t,e,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(e,n){e&1&&(oC(sn),iC(0,0,ln),Qi(1,"sh-form-field")(2,"input",2),sm("ngModelChange",function(o){return HC(n.timespan,o)||(n.timespan=o),o}),Hl(),DD(),iC(3,1),iC(4,2),Hl(),Qi(5,"sh-menu",3)(6,"button",4),XT(7,0),Hl(),Ul(8,5),cT(9,cn,2,1,"button",6,sT),Wl(),Hl()),e&2&&(DE(),hg("readonly",n.readonly()||void 0),DE(),gg("id",n.customId()),im("ngModel",n.timespan),gg("disabled",n.readonly()),TD(),DE(3),gg("openIndicator",true),DE(2),Lg(n.unitLabel()),eC(7),DE(2),lT(n.timeOptions()));},dependencies:[ve,Fe$1,Bn,Ze,en$1,Rn,Jt$1,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}']})};
|
|
1
|
+
import {J}from'./chunk-B2fqvpov.js';import {c}from'./chunk-D48AStVy.js';import {F as Fe,P as Pe}from'./chunk-CQ8rm_d9.js';import {N as Nt$2}from'./chunk-CBdr-6_u.js';import {v as ve}from'./chunk-BZqhgAZ-.js';import {x}from'./chunk-0sb5_LpD.js';import {T,ab as C,m,a6 as be,b as g1,ac as h1,U as Ue,B as y1,N as Nt$1,ai as m$1,aj as l,G as Ga,at as h,aG as pt,a$ as Vs,b0 as ty,bJ as vy,C as Bu,d as dw,v,f as N,a0 as de,bZ as ei,u as ue,aH as m$2,L as oC,o as oT,Q as Qi,Y as iC,bf as ig,H as Hl,c2 as uC,i as iT,D as DE,I as Qg,z as gg,a_ as ZC,$ as $g,K as lC,s as sm,l as HC,p as DD,aC as hg,w as im,y as TD,ag as zg,aD as zC,X as XT,aP as Ul,a1 as cT,aQ as Wl,au as Lg,av as eC,a2 as lT,c3 as Bs,ay as $u,k as gT,S as Sd,n as nC,x as xd,j as mg,b_ as Ig,F as Fg,q as PC,E as nm,O as Og,P as Pg,a3 as QC,aB as rm,ap as sT,aM as tb,aa as Gl,aS as ib,aF as YC,ar as Wp,c4 as sb}from'./main-PXGZLKMN.js';import {$}from'./chunk-D28lTX0k.js';import {d}from'./chunk-DQW8lSiz.js';import {F as Fe$1}from'./chunk-C9EdrQe6.js';import {B as Bn,Z as Ze,R as Rn,J as Jt$1,e as en$1,D}from'./chunk-Drc5kcUX.js';var Pt=["treeContainer"],Mt=["formRef"],Et=[[["label"]],[["label"]],[["input"]]],Tt=["label","label","input"],ct=["ngProjectAs","label",5,["label"]],yt=["ngProjectAs","input",5,["input"]],bt=r=>({children:r,level:0}),ht=r=>({$implicit:r}),St=(r,t)=>({children:r,level:t}),Nt=()=>({maxWidth:"700px",width:"100%"}),vt=(r,t)=>t.id;function Ot(r,t){if(r&1){let e=gT();Qi(0,"sh-button-group",22),sm("valueChange",function(i){Sd(e);let o=nC();return HC(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),xd(i)}),Qi(1,"button",23),XT(2,4),Hl(),Qi(3,"button",24),XT(4,5),Hl()();}if(r&2){let e=nC();im("value",e.pathDiscoveryMethod);}}function Ft(r,t){r&1&&mg(0,"sh-progress-bar",14);}function Rt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"caret-down"),Hl());}function xt(r,t){r&1&&mg(0,"sh-icon",30);}function Dt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"spinner"),Hl());}function wt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"caret-right"),Hl());}function It(r,t){if(r&1&&mg(0,"img",31),r&2){let e=nC(3).$implicit;gg("src",e.customIcon,Wp);}}function Lt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder-open"),Hl());}function At(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder-user"),Hl());}function kt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"file"),Hl());}function Bt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder"),Hl());}function $t(r,t){if(r&1&&(oT(0,Rt,2,0,"sh-icon",30)(1,xt,1,0,"sh-icon",30)(2,Dt,2,0,"sh-icon",30)(3,wt,2,0,"sh-icon",30),oT(4,It,1,1,"img",31)(5,Lt,2,0,"sh-icon",27)(6,At,2,0,"sh-icon",27)(7,kt,2,0,"sh-icon",27)(8,Bt,2,0,"sh-icon",27)),r&2){let e=nC(2).$implicit,n=nC(2);iT(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),DE(4),iT(e.customIcon?4:e.children.length?5:e.id==="%HOME%"?6:e.cls==="file"?7:8);}}function Wt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"desktop-tower"),Hl());}function Vt(r,t){if(r&1&&(Qi(0,"span",29),PC(1),tb(2,"bytes"),Hl()),r&2){let e=nC(2).$implicit;DE(),Gl("\xA0(",ib(2,1,e.fileSize,true,true),")");}}function Gt(r,t){r&1&&Ig(0);}function zt(r,t){if(r&1&&ig(0,Gt,1,0,"ng-container",15),r&2){let e=nC(2).$implicit,n=nC().$implicit;nC();let i=uC(7);gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(5,ht,YC(2,St,e.children,n.level+1)));}}function jt(r,t){if(r&1){let e=gT();Qi(0,"div",25,3),Fg("click",function(i){Sd(e);let o=nC().$implicit,s=nC(2);return xd(s.toggleSelectedNode(i,o))}),Qi(2,"div",26),Fg("click",function(i){Sd(e);let o=nC().$implicit,s=nC(2);return xd(s.toggleNode(i,o.id,o))}),oT(3,$t,9,2)(4,Wt,2,0,"sh-icon",27),Hl(),Qi(5,"div",28)(6,"span"),PC(7),Hl(),oT(8,Vt,3,5,"span",29),Hl()(),oT(9,zt,1,7,"ng-container");}if(r&2){let e=nC().$implicit,n=nC().$implicit,i=nC();Qg("accepted",e.accepted===true)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),DE(2),Qg("file",e.cls==="file"),DE(),iT(e.id!=="/"?3:4),DE(4),nm(e.text),DE(),iT(e.cls=="file"&&e.fileSize!=null&&e.fileSize>=0?8:-1),DE(),iT(e.children.length>0?9:-1);}}function Ht(r,t){if(r&1&&oT(0,jt,10,24),r&2){let e=t.$implicit,n=nC(2);iT(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1);}}function Ut(r,t){if(r&1&&(Qi(0,"sh-list"),cT(1,Ht,1,1,null,null,vt),Hl()),r&2){let e=t.$implicit;zg("padding-left",e.level*.25,"rem"),DE(),lT(e.children);}}function Jt(r,t){r&1&&Ig(0);}function Xt(r,t){if(r&1){let e=gT();Qi(0,"sh-toggle",32),sm("checkedChange",function(i){Sd(e);let o=nC();return HC(o._showHiddenNodes,i)||(o._showHiddenNodes=i),xd(i)}),XT(1,6),Hl();}if(r&2){let e=nC();im("checked",e._showHiddenNodes),DE(),Lg(e.showFiles()?"files":"folders"),eC(1);}}function qt(r,t){if(r&1){let e=gT();Qi(0,"button",33),Fg("click",function(){Sd(e);let i=nC();return xd(i.openCreateFolderDialog())}),XT(1,7),Hl();}if(r&2){let e=nC();gg("disabled",!e.isCurrentPathFolder());}}function Kt(r,t){if(r&1&&(Qi(0,"sh-alert",20),PC(1),Hl()),r&2){let e=nC();gg("color","error"),DE(),nm(e.errorMessage());}}function Qt(r,t){if(r&1){let e=gT();Qi(0,"sh-dialog",34),sm("isOpenChange",function(i){Sd(e);let o=nC();return HC(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),xd(i)}),Qi(1,"header",35)(2,"h2"),XT(3,8),Hl()(),Qi(4,"div",36)(5,"div",37)(6,"p"),XT(7,9),Hl(),Qi(8,"div",38)(9,"pre"),PC(10),Hl()()(),Qi(11,"sh-form-field")(12,"textarea",39),sm("ngModelChange",function(i){Sd(e);let o=nC();return HC(o.createFolderPath,i)||(o.createFolderPath=i),xd(i)}),Hl(),DD(),Hl()(),Qi(13,"footer",40)(14,"button",41),Fg("click",function(){Sd(e);let i=nC();return xd(i.closeCreateFolderDialog(false))}),PC(15,"Cancel"),Hl(),Qi(16,"button",42),Fg("click",function(){Sd(e);let i=nC();return xd(i.closeCreateFolderDialog(true))}),Og(17,10),mg(18,"sh-icon"),Pg(),Hl()()();}if(r&2){let e=nC();im("isOpen",e.createFolderDialogOpen),gg("options",QC(6,Nt)),DE(10),rm("",e.currentPathResolved(),"",e.createFolderPath()?"/"+e.createFolderPath():""),DE(2),im("ngModel",e.createFolderPath),TD(),DE(4),gg("disabled",!e.createFolderPath()?.length);}}var gt=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(gt||{}),b="/",ne=true,Se=class r{#e=T(C);#t=T(m);#b=T(be);multiSelect=g1(false);disabled=g1(false);showFiles=g1(false);selectFiles=g1(false);onlySelectFolder=g1(false);accepts=g1(null);startingPath=g1(null);rootPaths=g1([]);initialNodes=g1([]);backupSettings=g1(null);pathRefreshTrigger=g1(false);showHiddenNodes=g1(false);enableCreateFolder=g1(false);hideShortcuts=g1(false);resolvePaths=g1(false);customRemoteMode=g1(null);showUnrootedSources=g1(false);backupId=g1("");connectionStringId=g1(null);sourcePrefix=g1("");destinationUrl=g1("");loadExtendedData=g1(true);hasExtendedData=h1();searchMode=g1(false);searchResults=g1([]);_showHiddenNodes=Ue(false);createFolderDialogOpen=Ue(false);createFolderPath=Ue(null);errorMessage=Ue(null);anyRemoteSourcesLoaded=Ue(false);treeContainerRef=y1("treeContainer");formRef=y1("formRef");pathDiscoveryMethod=Ue("browse");isLoading=Ue(null);currentPath=Ue("");#p=Ue(null);treeSearchQuery=Ue("");treeNodes=Ue([]);pathDelimiter=Nt$1(()=>this.#t.systemInfo()?.DirectorySeparator??"");#r=Nt$1(()=>this.currentPathArray().filter(e=>this.#i(e)).find(e=>e.includes("*")||e.includes("[")||e.includes("{")||e.includes("?"))&&this.#t.hasV2FilterOperations());filterGroups=this.#t.filterGroups();isByBackupSettings=Nt$1(()=>{let t=this.backupSettings();return !(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=Nt$1(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});currentPathArray=Nt$1(()=>this.currentPath().split("\0").filter(t=>t!==""&&t!==b));currentPathResolved=Nt$1(()=>this.currentPathArray().map(e=>{let n=this.treeNodes().find(i=>i.id===e)?.resolvedpath??e;return this.#t.resolveShorthandPath(n)}).join("\0"));#l(t){if(!t)return null;if(t.startsWith("@")&&t.includes("|")){let e=t.split("|"),n=e[0],i=e[1],o=i.split("://")[0],s=e[2]??"";return o==="diskimage"&&!s&&(s=this.#s(e[1].split("://")[1])),{mount:n.substring(1),prefix:n,url:i,type:o,path:s}}return null}#m=Nt$1(()=>{if(!this.showUnrootedSources())return [];let t=this.rootPaths();return (t===void 0||t.length===0)&&(t=[b]),this.currentPathArray().filter(n=>!this.#i(n)).filter(n=>!n.startsWith("%")).filter(n=>!t.find(i=>n.startsWith(i))).map(n=>{let i=this.#l(n);return i?{id:n,path:i.mount,displayName:Pe(i.url),icon:Fe(i.url)}:{id:n,path:n,displayName:n,icon:null}})});#c(t){return t.map(e=>{if(this.#i(e))return e;let n=this.#l(e);return n?this.#s(n.mount):e})}TreeEvalEnum=gt;#S=Nt$1(()=>{if(!this.#r())return null;let t=this.#c(this.currentPathArray()),e=t.filter(o=>!this.#i(o)),n=t.filter(o=>this.#i(o));return {paths:this.searchableTreeNodes().map(o=>o.id).filter(Boolean),sources:e,filters:n}});#_=$({params:()=>({data:this.#S()}),stream:({params:t})=>!this.#r()||!t.data||t.data.sources.length===0?ty(null):Bs(300).pipe($u(()=>this.#e.postApiV2FilesystemTestFilter({requestBody:{Paths:t.data?.paths,Sources:t.data?.sources,Filters:t.data?.filters}}).pipe(pt(e=>{if(!e.Success||!e.Data)return console.log("Error evaluating filters",e),null;let n=new Map;for(let i of e.Data)if(i.Path){let o=0;i.Included?o=1:i.MatchedFilter&&(o=-1),n.set(i.Path,o);}return n}),Vs(()=>ty(null)))))});searchResultTreeStructure=Nt$1(()=>{let t=this.searchResults();if(t.length===0)return [];let e=this.currentPathArray(),n=this.showHiddenNodes(),i=new Map;for(let a of t){let l=a.Path??"",C=this.#a(l),T=l.split(C).filter(M=>M!==""),P="";for(let M=0;M<T.length;M++){let w=T[M],I=M===T.length-1,U=!I||this.#n(l),ft=P||b,Ne=P?P.endsWith(C)?P.slice(0,-C.length):P:"";if(P=Ne?`${Ne}${C}${w}`:`${C}${w}`,U&&!P.endsWith(C)&&(P+=C),!i.has(P))i.set(P,{part:w,parentPath:ft,isFolder:U,match:I?a:null});else if(I){let Ct=i.get(P);Ct.match=a;}}}let o=new Map;for(let[a,l]of i)o.has(l.parentPath)||o.set(l.parentPath,[]),o.get(l.parentPath).push(a);let s=new Set,u=new Map;for(let[a,l]of i){if(!l.isFolder){s.add(a);continue}let C=o.get(l.parentPath)||[];if(C.length===1&&C[0]===a&&l.parentPath!==b)continue;s.add(a);let P=l.part,M=a;for(;;){let w=o.get(M)||[];if(w.length!==1)break;let I=w[0],U=i.get(I);if(!U||!U.isFolder)break;P+="/"+U.part,M=I;}M!==a&&u.set(a,P);}s.add(b);let g=[],c=new Map,d=Array.from(s).filter(a=>a!==b).sort((a,l)=>a.split("/").length-l.split("/").length||a.localeCompare(l));for(let a of d){let l=i.get(a);if(!l)continue;let C=l.parentPath;for(;C!==b&&!s.has(C);)C=i.get(C)?.parentPath||b;if(c.has(a))continue;let T=this.#g(u.get(a),l.match?.Metadata)??l.part,P=l.match===null,M=l.match!==null&&!l.isFolder&&n?0:this.#r()?this.#h(a,null,e,l.isFolder?"folder":"file"):this.#d(e,a,l.isFolder?"folder":"file",null),w={id:a,resolvedpath:a,text:T,parentPath:C,children:[],evalState:M,isIndeterminate:this.isIndeterminate(e,a),cls:l.isFolder?"folder":"file",isSearchMatch:l.match!==null,isGenerated:P,hasChildrenInSearch:(o.get(a)?.length||0)>0,iconCls:null,check:false,leaf:!l.isFolder,hidden:false,systemFile:false,temporary:false,symlink:false,fileSize:l.match?.Size??0};if(c.set(a,w),C===b)g.push(w);else {let I=c.get(C);I&&I.children.push(w);}}let E=a=>{a.sort((l,C)=>l.cls==="folder"&&C.cls!=="folder"?-1:l.cls!=="folder"&&C.cls==="folder"?1:(l.text??"").localeCompare(C.text??"")),a.forEach(l=>E(l.children));};return E(g),g});treeStructure=Nt$1(()=>{if(this.searchMode())return this.searchResultTreeStructure();this.#_.value();let e=this.showHiddenNodes(),n=this.#N(this.currentPathArray()),i=this.searchableTreeNodes(),o=this.rootPaths(),s=this.accepts(),u=[];o.length>0?u=o.map(c=>{let d=this.#r()?this.#h(c,null,n,"folder"):this.#d(n,c,"folder",null);return {id:c,resolvedpath:c,text:c,parentPath:"",children:[],evalState:d,isIndeterminate:false,cls:this.#n(c)?"folder":"file"}}):u=[{id:b,resolvedpath:b,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:false,cls:"folder"}];let g=this.#m().map(c=>({id:c.path,resolvedpath:c.path,remoteSource:this.#l(c.id),text:c.displayName,parentPath:"",children:[],evalState:1,isIndeterminate:false,cls:"folder",customIcon:c.icon}));return u=[...u,...g],u.map(c=>{let d=new Map;if(!c.id)return;let E=c.id;s&&(c.accepted=true),d.set(E,c);let a=o.length>0?i.filter(l=>l.parentPath.startsWith(E)):i;for(let l$1 of a){if(!l$1.id)continue;let C=l$1.id;if(!l$1.cls||d.has(C))continue;let T=d.get(l$1.parentPath),P=l$1.hidden===true&&!e?0:this.#r()?this.#h(C,T,n,l$1.cls):this.#d(n,C,l$1.cls,T),M=m$1(l({},l$1),{isIndeterminate:this.isIndeterminate(n,C),evalState:P,children:[]});s&&(M.accepted=this.matchAccepts(s,M)),d.set(C,M),M.id?.startsWith("%")&&M.id?.endsWith("%")&&d.set(this.#s(C),M),T&&T.children.push(M);}return c}),u});#N(t){let e=structuredClone(t);for(let n=0;n<e.length;n++){let o=e[n].slice(1);if(o.startsWith("{")&&o.endsWith("}")){let s=o.slice(1,-1),u=this.filterGroups?.FilterGroups?.[s];if(u&&u.length){let g=u.map(c=>`-${c}`);e.splice(n,1,...g);}}}return e}#s(t){if(!t)return b;let e=this.#a(t);return t.endsWith("/")||t.endsWith("\\")||t===b?t:t+e}#f(t){return t?.id?!this.resolvePaths()||!t.resolvedpath?t.id:t.id.startsWith("%")&&t.id.endsWith("%")?this.#s(t.resolvedpath):t.resolvedpath:null}#h(t,e,n,i){if(e&&e.evalState===-1)return -2;let o=this.#_.value();return o&&o.has(t)?o.get(t):this.#d(n,t,i,e)}#d(t,e,n,i){if(i&&i.evalState===-1)return -2;let o=0,s=this.#c(t.filter(d=>!this.#i(d))),u=t.filter(d=>this.#i(d)),g=this.multiSelect(),c=this.#f(this.treeNodes().find(d=>d.id===e))??e;if(s.length===0)return o;for(let d=0;d<s.length;d++){let E=s[d];if(e===E||c==E){o=1;break}if(!g||!this.#n(E))continue;if(e?.startsWith(E)||c?.startsWith(E)){o=1;break}}if(u.length===0)return o;for(let d=0;d<u.length;d++){let E=u[d],a=E.slice(1),l=E.startsWith("-")?-1:1;if(this.#n(a)){if(n!=="folder")continue;if(e===a||c==a){o=l;break}}if(a.startsWith("*")&&(a.endsWith("*\\")||a.endsWith("*/"))){if(n!=="folder")continue;let T=a.slice(1,-2);if(T==="")break;if(e?.includes(T+"\\")||e?.includes(T+"/")){o=l;break}}if(a.startsWith("[.*")&&(a.endsWith("[^\\/]*]")||a.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let T=a.slice(3,-7);if(new RegExp(T).test(e)){o=l;break}}if(a.startsWith("[")&&a.endsWith("]")){let T=a.slice(1,-1),P=this.translateCSharpRegex(T);if(new RegExp(`${P}`).test(e)){o=l;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#C(e,a,true)){o=l;break}}if(a==="")continue;if(a===e){o=l;break}if(this.#C(e,a,true)){o=l;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,s)=>`(${s})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#n(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):false}#C(t,e,n=false){let i=e.replace(/[\\.+^${}()|[\]*?]/g,s=>s==="*"?".*":s==="?"?".":"\\"+s);return new RegExp(`${i}${n?"$":""}`).test(t)}#a(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=Ga(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=Ga(()=>{let t=this.pathDiscoveryMethod(),e=this.#p();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n);}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===b)return true;let n=t.split(",");if(n.length===0)return true;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):false}currentPathEffect=Ga(()=>{let t=this.#p();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")));});inputValueChangeAbortController=null;inputRefEffect=Ga(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#v(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value);},{signal:this.inputValueChangeAbortController.signal}),this.#p.set(t),t.autocomplete="off");});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#R(t);else {let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#g(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#u(null,e[0])):this.#u(null,b);}}getParentPath(t){let e=this.#a(t),n=t.split(e);return n.length<=1?b:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===b||this.#m().map(d=>this.#l(d.id)?.mount).filter(d=>d).includes(e.id??"")||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(t,e.id,e);return}if(this.onlySelectFolder()&&e.cls!=="folder"||this.accepts()&&!e.accepted)return;let i=this.currentPathArray(),o=this.#c(i),s=this.isChildOfSelected(e),u=this.#f(e),g=s?`-${u}`:u,c=this.#n(u);if(this.multiSelect())if(o.includes(u))this.currentPath.set(i.filter(d=>d!==u&&!(c&&d.startsWith(g))).join("\0"));else if(o.some(d=>d==g))this.currentPath.set(i.filter(d=>d!==g).join("\0"));else {let d=c?i.filter(E=>!E.startsWith(u)):i;this.currentPath.set([...d,g].join("\0"));}else i.includes(u)?this.currentPath.set(i.filter(d=>d!==u).join("\0")):this.currentPath.set(u);}isChildOfSelected(t){return this.#c(this.currentPathArray()).filter(n=>this.#n(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e,n=null){t.stopPropagation(),n?.cls==="folder"&&(n?.children.length?this.treeNodes.update(i=>i.filter(o=>!o.id?.startsWith(n.id)||o.id===n.id)):this.#u(n,e));}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(true),false}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolved(),o=this.#s(e),s=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+s}}).subscribe({next:()=>{this.currentPath.set(s),this.#u(null,n),setTimeout(()=>{this.#P();},500),this.createFolderDialogOpen.set(false);},error:u=>{let g=u?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),c=g?g[1]:u?.message||$localize`An error occurred while trying to create the folder.`;this.#b.open(h,{data:{title:$localize`Cannot create folder`,message:c,confirmText:$localize`OK`,cancelText:void 0}});}});}}else this.createFolderDialogOpen.set(false);return false}#P(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"});},100);}#v(t){return Object.defineProperty(t,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:e}})),e}}),t}#O(t){return this.#e.postApiV1Filesystem({showHidden:true,requestBody:{path:t},onlyFolders:!this.showFiles()})}#o(t,e,n){return this.#e.postApiV2DestinationList({requestBody:{BackupId:this.backupId()??null,DestinationUrl:e?.url??this.destinationUrl()??null,ConnectionStringId:this.connectionStringId()??null,DestinationType:n,SourcePrefix:e?.prefix??this.sourcePrefix()??null,Path:t,Offset:null,Limit:null}}).pipe(pt(i=>(i.Data?.Items??[]).map(o=>m$1(l({},o),{Path:(e?.prefix??"")+o.Path})).filter(o=>o.Metadata==null||!o.Metadata.ExtType)))}#M(t,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}}).pipe(pt(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(o=>({Path:(e?.prefix??"")+o,Metadata:JSON.parse(i[o])}))}))}#E(t,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}}).pipe(pt(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(o=>({Path:(e?.prefix??"")+o,Metadata:JSON.parse(i[o])}))}))}#T(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(pt(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#F(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}}).pipe(pt(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:false,folderContents:true,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(pt(i=>i.Files??[]))}}#y(t,e){return e?.type==="office365"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#M(e.path,e):this.customRemoteMode()==="o365"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#M(t,null):e?.type==="googleworkspace"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#E(e.path,e):this.customRemoteMode()==="gsuite"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#E(t,null):e?.type==="diskimage"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#T(e.path):this.customRemoteMode()==="diskimage"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#T(t):this.isByBackupSettings()?this.#F(t):this.customRemoteMode()==="backend"?this.#o(t,null,"Backend"):this.#O(t)}#R(t){let n=t.split("\0").filter(s=>!this.#i(s)&&!s.startsWith("@")).filter(Boolean).map(s=>{let u=this.#a(s),g=s.split(u);return g.at(-1)===""&&g.pop(),this.#n(s)||g.pop(),{split:g,sep:u}}),i=[b];n.forEach(({split:s,sep:u})=>{s.forEach((g,c)=>{let d=s.slice(0,c+1).join(u)+u;d===""||d===u||i.includes(d)||i.push(d);});});let o=i.map(s=>(this.isLoading.set(s),this.#y(s,null).pipe(pt(u=>({status:"success",value:u,url:s})),Vs(u=>ty({status:"error",value:u,url:s})))));vy(o).pipe(Bu(()=>this.isLoading.set(null))).subscribe({next:s=>{let u=s.filter(c=>c.status==="success");s.filter(c=>c.status==="error");this.treeNodes.update(c=>{let d=u.flatMap(a=>Array.isArray(a.value)?a.value.map(l$1=>m$1(l({},l$1),{parentPath:a.url})):[]);d.length>0&&this.anyRemoteSourcesLoaded.set(true);let E=[...new Map([...c,...d].map(a=>[a.id,a])).values()];return this.#P(),this.hideShortcuts()?E.filter(a=>!a.id.startsWith("%")):E});}});}#g(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#x(t){t&&t.ExtType&&t.ExtType.length>0&&this.hasExtendedData.emit(t.ExtType);}#n(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#i(t){return t.startsWith("+")||t.startsWith("-")}#u(t=null,e=b){let n=t?.remoteSource;this.isLoading.set(e),this.#y(e,n).pipe(Bu(()=>this.isLoading.set(null))).subscribe({next:i=>{let o=this.isByBackupSettings()||this.customRemoteMode()!==null||n?i.map(s=>{this.#x(s.Metadata);let u=this.#a(s.Path),g=this.#g(s.Path.split(u).filter(E=>E!=="").pop(),s.Metadata);if(s.Metadata&&s.Metadata["diskimage:Type"]==="filesystem")return null;let c=s.Path,d=null;return n&&(c=s.Path.substring(1),d=m$1(l({},n),{path:s.Path.substring(n.prefix.length)})),{text:g,id:c,cls:this.#n(s.Path)?"folder":"file",leaf:t!==null,resolvedpath:s.Path,hidden:false,remoteSource:d,fileSize:s.Size}}):i;o.length>0&&this.anyRemoteSourcesLoaded.set(true),this.treeNodes.update(s=>{let u=o.filter(c=>c!==null).map(c=>{let d=this.#n(c.id)?"folder":"file";return m$1(l({},c),{cls:d,parentPath:e})}),g=[...new Map([...s,...u].map(c=>[c.id,c])).values()];return this.hideShortcuts()?g.filter(c=>!c.id.startsWith("%")):g});},error:i=>{this.errorMessage.set(i.message),this.anyRemoteSourcesLoaded()&&setTimeout(()=>{this.errorMessage.set(null);},5e3);}});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&$g(n.treeContainerRef,Pt,5)(n.formRef,Mt,5),e&2&&lC(2);},hostVars:2,hostBindings:function(e,n){e&2&&Qg("disabled",n.disabled());},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],onlySelectFolder:[1,"onlySelectFolder"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],resolvePaths:[1,"resolvePaths"],customRemoteMode:[1,"customRemoteMode"],showUnrootedSources:[1,"showUnrootedSources"],backupId:[1,"backupId"],connectionStringId:[1,"connectionStringId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:Tt,decls:19,vars:18,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let o;o=$localize`Enter new folder path`;let s;s=$localize`Will be created as:`;let u;return u=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,o,s,u,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"color"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",3,"click"],[1,"icon",3,"click"],[1,"primary"],[1,"text"],[1,"size"],[1,"small"],["alt","Provider icon",1,"provider-icon",3,"src"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(oC(Et),oT(0,Ot,5,1,"sh-button-group",11),Qi(1,"div",12),iC(2,0,ct),Qi(3,"div",13,0),oT(5,Ft,1,0,"sh-progress-bar",14),ig(6,Ut,3,2,"ng-template",null,1,sb)(8,Jt,1,0,"ng-container",15),Hl(),Qi(9,"div",16),oT(10,Xt,2,2,"sh-toggle",17),oT(11,qt,2,1,"button",18),Hl()(),Qi(12,"div",19,2)(14,"sh-form-field"),iC(15,1,ct),iC(16,2,yt),Hl()(),oT(17,Kt,2,2,"sh-alert",20),oT(18,Qt,19,7,"sh-dialog",21)),e&2){let i=uC(7);iT(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),DE(),Qg("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),DE(2),Qg("visualize-accepted",n.accepts()),DE(2),iT(n.isLoading()!=null?5:-1),DE(3),gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(16,ht,ZC(14,bt,n.treeStructure()))),DE(2),iT(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),DE(),iT(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),DE(),Qg("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),DE(5),iT(n.errorMessage()?17:-1),DE(),iT(n.createFolderDialogOpen()?18:-1);}},dependencies:[v,x,J,N,Fe$1,c,d,de,ei,Bn,Ze,Rn,Jt$1,ue,m$2],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(img:nth-child(2)){width:2.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}']})};var Yt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Zt=["label","[prefix]","[suffix]"],en=["ngProjectAs","label",5,["label"]];function tn(r,t){if(r&1&&PC(0),r&2){let e=t.$implicit,n=nC();rm("",e.label,"",n.hasPerSecond()?"/s":"");}}var nn=["throttle-upload","throttle-download"],on=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],rn=r=>{if(!r||typeof r!="string"||r.length===0)return {size:0,unit:"MB"};let t=r.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return t&&(t[2].toUpperCase()==="B"||t[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:t?parseInt(t[1],10):0,unit:t?t[2].toUpperCase():"MB"}},mt=class r{customId=g1();inputType=g1();timespan=Ue(0);unit=Ue("MB");sizeOptions=Ue(on);readonly=Ue(false);hasPerSecond=Nt$1(()=>{let t=this.inputType();return t&&nn.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=Ga(()=>{this.onChange(this.getValue());});writeValue(t){if(t){let e=rn(t);e?queueMicrotask(()=>{this.timespan.set(e.size),this.unit.set(e.unit);}):(this.timespan.set(0),this.unit.set("MB"));}else this.timespan.set(0),this.unit.set("MB");}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}getValue(){return `${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[zC([{provide:D,useExisting:r,multi:true}])],ngContentSelectors:Zt,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(oC(Yt),Qi(0,"div",0),iC(1,0,en),Hl(),Qi(2,"sh-form-field")(3,"input",1),sm("ngModelChange",function(o){return HC(n.timespan,o)||(n.timespan=o),o}),Hl(),DD(),iC(4,1),iC(5,2),Hl(),Qi(6,"sh-select",2)(7,"input",3),sm("ngModelChange",function(o){return HC(n.unit,o)||(n.unit=o),o}),Hl(),DD(),ig(8,tn,1,2,"ng-template"),Hl()),e&2&&(DE(2),hg("readonly",n.readonly()||void 0),DE(),gg("id",n.customId()),im("ngModel",n.timespan),gg("disabled",n.readonly()),TD(),DE(3),zg("--miw",0),gg("options",n.sizeOptions())("readonly",n.readonly())("isClearable",false),DE(),im("ngModel",n.unit),TD());},dependencies:[Nt$2,Fe$1,Bn,Ze,en$1,Rn,Jt$1],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}']})};var sn=[[["label"]],[["","prefix",""]],[["","suffix",""]]],an=["label","[prefix]","[suffix]"],ln=["ngProjectAs","label",5,["label"]];function cn(r,t){if(r&1){let e=gT();Qi(0,"button",7),Fg("click",function(){let i=Sd(e).$implicit,o=nC();return xd(o.updateUnit(i.value))}),XT(1,1),Hl();}if(r&2){let e=t.$implicit;DE(),Lg(e.label),eC(1);}}var dn=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],un=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pn=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],_t=class r{customId=g1();inputType=g1();timespan=Ue(0);#e="D";unit=Ue(this.#e);unitLabel=Nt$1(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=Nt$1(()=>{let t=this.inputType();return t&&pn.includes(t.replace("--",""))});timeOptions=Nt$1(()=>this.isShortTime()?dn:un);readonly=Ue(false);onChange=()=>{};onTouched=()=>{};onChangeEffect=Ga(()=>{this.onChange(this.getValue());});inputTypeEffect=Ga(()=>{this.timeOptions();let e=this.isShortTime()?"s":"D";this.#e=e,this.unit.set(e);});updateUnit(t){this.unit.set(t);}writeValue(t){let e=this.isShortTime();if(t){let n=e?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,i=t.match(n);i?(this.timespan.set(parseInt(i[1],10)),this.unit.set(i[2])):(this.timespan.set(0),this.unit.set(this.#e));}else this.timespan.set(0),this.unit.set(this.#e);}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}getValue(){return `${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[zC([{provide:D,useExisting:r,multi:true}])],ngContentSelectors:an,decls:11,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t,e,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(e,n){e&1&&(oC(sn),iC(0,0,ln),Qi(1,"sh-form-field")(2,"input",2),sm("ngModelChange",function(o){return HC(n.timespan,o)||(n.timespan=o),o}),Hl(),DD(),iC(3,1),iC(4,2),Hl(),Qi(5,"sh-menu",3)(6,"button",4),XT(7,0),Hl(),Ul(8,5),cT(9,cn,2,1,"button",6,sT),Wl(),Hl()),e&2&&(DE(),hg("readonly",n.readonly()||void 0),DE(),gg("id",n.customId()),im("ngModel",n.timespan),gg("disabled",n.readonly()),TD(),DE(3),gg("openIndicator",true),DE(2),Lg(n.unitLabel()),eC(7),DE(2),lT(n.timeOptions()));},dependencies:[ve,Fe$1,Bn,Ze,en$1,Rn,Jt$1,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}']})};
|
|
2
2
|
export{Se as S,_t as _,mt as m,rn as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {S}from'./chunk-
|
|
1
|
+
import {S}from'./chunk-MvQwR7nW.js';import {T,ad as br,bo as av,A,U as Ue,N as Nt,G as Ga,bp as Rr,aZ as ee}from'./main-PXGZLKMN.js';var m=class i{#i=T(S);#t=T(br);#o=T(av);#e=A("darkTheme",null,true);#s=Ue(this.#i.innerWidth);isMobile=Nt(()=>this.#s()<1024);sidenavType=Ue(this.isMobile()?"overlay":"");isNavOpen=Ue(false);isDarkMode=this.#e.asReadonly();darkModeEffect=Ga(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"));});isMobileEffect=Ga(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"");});constructor(){Rr(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth);});}toggleNav(){this.isNavOpen.set(!this.isNavOpen());}toggleBodyClass(){this.#e.set(!this.isDarkMode());}setDarkMode(){this.#e.set(true);}setLightMode(){this.#e.set(false);}static \u0275fac=function(h){return new(h||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as g1,
|
|
1
|
+
import {b as g1,bM as T1,b8 as ce,d as dw,L as oC,R as Bl,Y as iC,W as $l,h as bC,I as Qg}from'./main-PXGZLKMN.js';var g=["*"],D=(()=>{class s{constructor(){this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.sharp=g1(void 0),this.dynamic=g1(void 0),this.readonly=g1(false),this.noBg=g1(false,{transform:T1}),this.hostClasses=ce("chip",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,dynamic:this.dynamic,readonly:this.readonly});}static{this.\u0275fac=function(i){return new(i||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],hostVars:4,hostBindings:function(i,h){i&2&&(bC(h.hostClasses()),Qg("no-bg",h.noBg()));},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],dynamic:[1,"dynamic"],readonly:[1,"readonly"],noBg:[1,"noBg"]},ngContentSelectors:g,decls:2,vars:0,template:function(i,h){i&1&&(oC(),Bl(0,"div"),iC(1),$l());},styles:[`sh-chip{--chip-h: 2rem;--chip-s: calc(var(--chip-h) / 2)}sh-chip.sh-sheet{--sheet-c: var(--chip-c);--sheet-s: var(--chip-s)}sh-chip{--chip-bs: var(--ship-chip-shadow, none);display:inline-flex;align-items:center;justify-content:center;padding:0 .75rem;font:var(--paragraph-30B);height:var(--chip-h);box-shadow:var(--chip-bs);white-space:nowrap}sh-chip div{display:flex;align-items:center;gap:.5rem;color:var(--chip-c)}sh-chip.sharp{--chip-s: calc(var(--chip-h) / 4);padding:0 .5rem}sh-chip.sharp.small{padding:0 .375rem}sh-chip.sharp.xsmall{padding:0 .25rem}sh-chip sh-icon{color:var(--chip-ic);font-size:1rem;font-weight:inherit}sh-chip [avatar]{height:calc(var(--chip-h) - .75rem);width:calc(var(--chip-h) - .75rem);border-radius:50%}sh-chip.small{--chip-h: 1.5rem;font:var(--paragraph-40B);padding:0 .5rem}sh-chip.small div{gap:.25rem}sh-chip.small sh-icon{font-size:.75rem}sh-chip.xsmall{--chip-h: 1.25rem;font:var(--paragraph-40B);padding:0 .375rem}sh-chip.xsmall div{gap:.125rem}sh-chip.xsmall sh-icon{font-size:.625rem}sh-chip.no-bg{--sheet-bg: transparent;background:transparent}sh-chip.no-bg.simple,sh-chip.no-bg.simple.primary,sh-chip.no-bg.simple.accent,sh-chip.no-bg.simple.warn,sh-chip.no-bg.simple.error,sh-chip.no-bg.simple.success{--sheet-bc: transparent;border-color:transparent}sh-chip[disabled]{opacity:.5}sh-chip[readonly],sh-chip.readonly{pointer-events:none;-webkit-user-select:none;user-select:none}
|
|
2
2
|
`],encapsulation:2});}}return s})();export{D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {w as w$1}from'./chunk-
|
|
1
|
+
import {w as w$1}from'./chunk-dScOwyAU.js';import {w as we}from'./chunk-CUxq_s_t.js';import'./chunk-DaIpTiYw.js';import'./chunk-B6vxBiK4.js';import'./chunk-DV2SIgNN.js';import'./chunk-B2fqvpov.js';import'./chunk-D48AStVy.js';import {e as ee}from'./chunk-D_JCqKo8.js';import'./chunk-w_Hs_Uxi.js';import'./chunk-D1wHRltX.js';import'./chunk-CQ8rm_d9.js';import'./chunk-CBdr-6_u.js';import'./chunk-BZqhgAZ-.js';import'./chunk-0sb5_LpD.js';import'./chunk-B9zNFJSv.js';import'./chunk-COgNe44h.js';import'./chunk-BAZ5npJw.js';import {T,aw as W,a5 as g,ab as C,G as Ga,aE as Fo,d as dw,Z as lr,_ as _t,a8 as To,j as mg,Q as Qi,o as oT,X as XT,H as Hl,D as DE,i as iT,z as gg,aF as YC,aD as zC,q as PC,n as nC,aa as Gl}from'./main-PXGZLKMN.js';import'./chunk-DJbAxHpK.js';import'./chunk-MvQwR7nW.js';import'./chunk-SycscfJp.js';import {L}from'./chunk-D28lTX0k.js';import {d}from'./chunk-DQW8lSiz.js';import'./chunk-CMmgPgiU.js';import'./chunk-C9EdrQe6.js';import'./chunk-Drc5kcUX.js';import'./chunk-B-fklW6A.js';var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(Qi(0,"p"),PC(1),Hl()),i&2){let t=nC();DE(),Gl("Editing: ",t.backupName());}}function J(i,e){i&1&&mg(0,"sh-progress-bar",7);}function X(i,e){i&1&&(Qi(0,"section"),mg(1,"router-outlet"),Hl());}var P=class i{#t=T(W);#e=T(we);#i=T(g);#n=T(C);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=L(this.#t.params);#o=L(this.#t.url);paramsChanged=Ga(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults());});getDefaults(){this.#n.getApiV1Backupdefaults().pipe(Fo(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(true);}});}getBackup(e,t=false){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(true);};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data);}else this.#n.getApiV1BackupById({id:e}).subscribe({next:n});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=dw({type:i,selectors:[["app-backup"]],features:[zC([we])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(mg(0,"app-status-bar"),Qi(1,"header"),oT(2,w,2,1,"p"),Qi(3,"sh-stepper",5)(4,"div",6),XT(5,0),Hl(),Qi(6,"div",6),XT(7,1),Hl(),Qi(8,"div",6),XT(9,2),Hl(),Qi(10,"div",6),XT(11,3),Hl(),Qi(12,"div",6),XT(13,4),Hl()()(),oT(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(DE(2),iT(n.isNew()?-1:2),DE(2),gg("routerLink",YC(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),iT(n.finishedLoading()?15:14));},dependencies:[lr,_t,To,ee,w$1,d],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}"]})};export{P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {ShipTable as ot}from'./chunk-CA-ER0DL.js';import'./chunk-BAZ5npJw.js';import {T,ab as C,a6 as be,a5 as g,e as ee,b as g1,N as Nt,U as Ue,G as Ga,ai as m,aj as l,at as h,C as Bu,d as dw,v as v$1,_ as _t,aH as m$1,b1 as m$2,Q as Qi,X as XT,H as Hl,o as oT,F as Fg,s as sm,D as DE,au as Lg,av as eC,i as iT,z as gg,a3 as QC,I as Qg,w as im,t as tC,l as HC,j as mg,k as gT,S as Sd,n as nC,x as xd,a1 as cT,a2 as lT,q as PC,aM as tb,E as nm,aN as ob,aR as rb}from'./main-PXGZLKMN.js';import {$}from'./chunk-D28lTX0k.js';import {d}from'./chunk-DQW8lSiz.js';import {U}from'./chunk-CMmgPgiU.js';var de=()=>["/"],Se=(l,n)=>n.Version;function ce(l,n){l&1&&(Qi(0,"div",11),mg(1,"sh-progress-bar",19),Qi(2,"p"),XT(3,4),Hl()());}function Ce(l,n){l&1&&(Qi(0,"div",12)(1,"p"),XT(2,5),Hl()());}function me(l,n){if(l&1){let e=gT();Qi(0,"tr",26),Fg("click",function(i){let r=Sd(e).$implicit,S=nC(2);return xd(S.toggleSelected(r.Version,i))}),Qi(1,"td")(2,"sh-checkbox",22),Fg("click",function(i){let r=Sd(e).$implicit,S=nC(2);return xd(S.toggleSelected(r.Version,i))}),Hl()(),Qi(3,"td"),PC(4),Hl(),Qi(5,"td"),PC(6),tb(7,"relativeTime"),Hl(),Qi(8,"td"),PC(9),tb(10,"relativeTime"),Hl(),Qi(11,"td"),PC(12),tb(13,"bytes"),Hl(),Qi(14,"td"),PC(15),Hl()();}if(l&2){let e=n.$implicit;DE(2),gg("checked",e.Selected),DE(2),nm(e.Version),DE(2),nm(ob(7,6,e.Time,true)),DE(3),nm(ob(10,9,e.Time,false)),DE(3),nm(rb(13,12,e.FileSizes)),DE(3),nm(e.FileCount);}}function pe(l,n){if(l&1){let e=gT();Qi(0,"sh-table",20),sm("sortByColumnChange",function(i){Sd(e);let r=nC();return HC(r.sortByColumn,i)||(r.sortByColumn=i),xd(i)}),Qi(1,"tr",21)(2,"th")(3,"sh-checkbox",22),Fg("click",function(){Sd(e);let i=nC();return xd(i.toggleSelect())}),Hl()(),Qi(4,"th",23),XT(5,6),Hl(),Qi(6,"th",23),XT(7,7),Hl(),Qi(8,"th",23),XT(9,8),Hl(),Qi(10,"th",24),XT(11,9),Hl(),Qi(12,"th",25),XT(13,10),Hl()(),cT(14,me,16,14,"tr",null,Se),Hl();}if(l&2){let e=nC();gg("data",e.versions())("loading",e.isLoading()),im("sortByColumn",e.sortByColumn),DE(3),Qg("indeterminate",e.indeterminate()),gg("checked",e.allSelected()),DE(11),lT(e.versions());}}var v=class l$1{#e=T(C);#n=T(be);#t=T(g);#i=T(ee);id=g1.required();backup=Nt(()=>{this.#t.backups();return this.#t.getBackupById(this.id())});versionsResource=$({params:()=>({id:this.id()}),stream:({params:n})=>this.#e.postApiV2BackupListFilesets({requestBody:{BackupId:n.id}})});isLoading=Nt(()=>this.versionsResource.isLoading());isDeleting=Ue(false);performCompact=Ue(true);versions=Ue([]);constructor(){Ga(()=>{let n=this.versionsResource.value();if(n){let e=(n.Data??[]).slice().sort((t,i)=>t.Time<i.Time?1:t.Time>i.Time?-1:0);this.versions.set(e.map(t=>m(l({},t),{Selected:false})));}});}selectedItems=Nt(()=>this.versions().filter(n=>n.Selected));allSelected=Nt(()=>this.selectedItems().length===this.versions().length&&this.versions().length>0);noneSelected=Nt(()=>this.selectedItems().length===0);indeterminate=Nt(()=>this.selectedItems().length>0&&!this.allSelected());sortByColumn=Ue("version");toggleSelected(n,e){e?.stopPropagation(),this.versions.update(t=>t.map(i=>i.Version===n?m(l({},i),{Selected:!i.Selected}):i));}toggleSelect(){this.allSelected()?this.selectNone():this.selectAll();}selectAll(){this.versions.update(n=>n.map(e=>m(l({},e),{Selected:true})));}selectNone(){this.versions.update(n=>n.map(e=>m(l({},e),{Selected:false})));}deleteVersions(){let n=this.selectedItems();if(n.length===0)return;let e=n.length,t=n.map(i=>i.Version);this.#n.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete ${e} version(s)?`,confirmText:$localize`Delete versions`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.isDeleting.set(true),this.#e.postApiV2BackupDeleteVersions({requestBody:{BackupId:this.id(),Versions:t,SuppressCompact:!this.performCompact()}}).pipe(Bu(()=>this.isDeleting.set(false))).subscribe({next:()=>{this.#i.navigate(["/"]);}}));}});}static \u0275fac=function(e){return new(e||l$1)};static \u0275cmp=dw({type:l$1,selectors:[["app-delete-versions"]],inputs:{id:[1,"id"]},decls:13,vars:11,consts:()=>{let n;n=$localize`Delete versions from ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Cancel`;let t;t=$localize`{VAR_PLURAL, plural, =1 {1 version} other {{INTERPOLATION} versions}}`,t=tC(t,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let i;i=$localize` Delete ${t}:ICU@@85461926550041466: `;let r;r=$localize`Compact after deletion`;let S;S=$localize`Fetching versions from destination...`;let $;$=$localize`No versions found for this backup.`;let b;b=$localize`Version`;let B;B=$localize`Timestamp`;let k;k=$localize`When`;let G;G=$localize`Size`;let x;return x=$localize`Files`,[n,e,i,r,S,$,b,B,k,G,x,[1,"loading-state"],[1,"empty-state"],[1,"type-b",3,"data","loading","sortByColumn"],[1,"actions"],["shButton","",3,"routerLink","disabled"],["shButton","",1,"raised","error",3,"click","disabled"],[1,"sub-actions"],[1,"primary","raised",3,"checkedChange","checked"],[1,"primary","indeterminate"],[1,"type-b",3,"sortByColumnChange","data","loading","sortByColumn"],["thead",""],[1,"primary","raised",3,"click","checked"],["shSort","version"],["shSort","size"],["shSort","files"],[3,"click"]]},template:function(e,t){e&1&&(Qi(0,"h3"),XT(1,0),Hl(),oT(2,ce,4,0,"div",11)(3,Ce,3,0,"div",12)(4,pe,16,6,"sh-table",13),Qi(5,"div",14)(6,"button",15),XT(7,1),Hl(),Qi(8,"button",16),Fg("click",function(){return t.deleteVersions()}),XT(9,2),Hl()(),Qi(10,"div",17)(11,"sh-checkbox",18),sm("checkedChange",function(r){return HC(t.performCompact,r)||(t.performCompact=r),r}),XT(12,3),Hl()()),e&2&&(DE(),Lg(t.backup()?.Backup?.Name),eC(1),DE(),iT(t.isLoading()?2:t.versions().length===0?3:4),DE(4),gg("routerLink",QC(10,de))("disabled",t.isDeleting()),DE(2),Qg("loading",t.isDeleting()),gg("disabled",t.isDeleting()||t.selectedItems().length===0||t.isLoading()),DE(),Lg(t.selectedItems().length)(t.selectedItems().length),eC(9),DE(2),im("checked",t.performCompact));},dependencies:[v$1,U,d,ot,_t,m$1,m$2],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}sh-table[_ngcontent-%COMP%]{padding:2rem 0}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:2rem}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding-top:.5rem;padding-bottom:2rem}"]})};export{v as default};
|