@duplicati/ngclient 0.0.165 → 0.0.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunk-25QJ7OWU.js +1 -0
- package/{chunk-ZSP3PG56.js → chunk-2HQTO4LT.js} +1 -1
- package/{chunk-NXROYR6L.js → chunk-3ADKRLYD.js} +1 -1
- package/{chunk-BB73BKGN.js → chunk-3O255C2R.js} +1 -1
- package/{chunk-K6IL54XE.js → chunk-3VHQLGKM.js} +1 -1
- package/{chunk-IEGVSOLM.js → chunk-4IAJY6E3.js} +1 -1
- package/chunk-4N7O6OWH.js +1 -0
- package/{chunk-LEYSCNJE.js → chunk-53GUCO6P.js} +1 -1
- package/{chunk-VCLWADQK.js → chunk-53V6KV3I.js} +1 -1
- package/{chunk-Q6RATRPG.js → chunk-5RCKMVGY.js} +1 -1
- package/{chunk-2NUXSSQT.js → chunk-7WATCQLK.js} +1 -1
- package/chunk-A4HSV37F.js +1 -0
- package/{chunk-EM7XX5OF.js → chunk-AROXMP46.js} +1 -1
- package/{chunk-HVB6ARTT.js → chunk-AUMCM45B.js} +1 -1
- package/{chunk-Y27QHU4A.js → chunk-AY4BUZJQ.js} +1 -1
- package/{chunk-WNP2PFJP.js → chunk-BRPGUJ77.js} +1 -1
- package/{chunk-RVELYERL.js → chunk-CMFSS355.js} +1 -1
- package/{chunk-XAUZOGDI.js → chunk-CMMGGY2S.js} +1 -1
- package/{chunk-P2GZAEQX.js → chunk-CO4VU5IU.js} +1 -1
- package/chunk-DPQEDR6U.js +1 -0
- package/{chunk-KLODM6IK.js → chunk-E4KSSC6K.js} +1 -1
- package/chunk-EEXKY2IJ.js +1 -0
- package/chunk-EYFKXXER.js +1 -0
- package/chunk-FUPYLAQ6.js +1 -0
- package/{chunk-F3EXRAZJ.js → chunk-G4Z3JAJB.js} +1 -1
- package/{chunk-H3W2UQY2.js → chunk-GGNFAVSC.js} +1 -1
- package/{chunk-VLCXKEIA.js → chunk-GHJ4MU3O.js} +1 -1
- package/{chunk-WJDMMKWE.js → chunk-GRPEAINE.js} +1 -1
- package/{chunk-RPJFKWMV.js → chunk-HEST3B3S.js} +1 -1
- package/chunk-HJSCQF6V.js +1 -0
- package/{chunk-ORLZQJMN.js → chunk-HKYSIIV5.js} +1 -1
- package/{chunk-AT6BXXSP.js → chunk-HW7A5ZWV.js} +1 -1
- package/{chunk-ISCGGOPN.js → chunk-ILGMXHEE.js} +1 -1
- package/chunk-IMF5BUVN.js +1 -0
- package/{chunk-TVD2HREV.js → chunk-IQ52IXSC.js} +1 -1
- package/{chunk-2DP4QU4T.js → chunk-J64OAILA.js} +1 -1
- package/{chunk-JEWYZWQN.js → chunk-JGXPFEYZ.js} +1 -1
- package/{chunk-PFZG7ACX.js → chunk-JXLBFHEH.js} +1 -1
- package/chunk-KKLVMIFL.js +1 -0
- package/{chunk-H4H72SDD.js → chunk-KUP2T6AG.js} +1 -1
- package/{chunk-YGVXQBSL.js → chunk-L7WPKNLR.js} +1 -1
- package/{chunk-5NPUZRFY.js → chunk-LHOHOKP5.js} +1 -1
- package/{chunk-PZOMPDFS.js → chunk-M2BAPEJT.js} +1 -1
- package/{chunk-IKPQDSQK.js → chunk-NA6MTRHY.js} +2 -2
- package/{chunk-2QQJ6ZBU.js → chunk-NDZU2O2Q.js} +1 -1
- package/chunk-NLXY47SY.js +1 -0
- package/{chunk-ZTM5RK6J.js → chunk-NXJQU7IR.js} +1 -1
- package/{chunk-POJT4MSX.js → chunk-NY63VRAY.js} +1 -1
- package/{chunk-E3KF5SRU.js → chunk-O2M7MRKP.js} +1 -1
- package/{chunk-AWXWGD4T.js → chunk-OQ2HMOSQ.js} +1 -1
- package/{chunk-YIMKL4H6.js → chunk-OVLLX4US.js} +1 -1
- package/{chunk-TC7HZO7D.js → chunk-P7OKMMNZ.js} +1 -1
- package/chunk-POAVE42X.js +1 -0
- package/{chunk-PKK4MIRQ.js → chunk-Q4I4JXKZ.js} +1 -1
- package/chunk-QAY6UFT6.js +1 -0
- package/chunk-QE4NBN5H.js +2 -0
- package/{chunk-QBHHGHBJ.js → chunk-QLUEDPL4.js} +1 -1
- package/{chunk-E6DCTQ34.js → chunk-QOQI2ALM.js} +1 -1
- package/{chunk-5KMPTDRJ.js → chunk-R2N5UWYB.js} +1 -1
- package/chunk-R3F6GIHW.js +1 -0
- package/{chunk-CENUQU54.js → chunk-RRM5OZPV.js} +2 -2
- package/{chunk-D2ZTG4GG.js → chunk-SFSDLKTN.js} +1 -1
- package/{chunk-QNEJVXLY.js → chunk-SHNCRKXQ.js} +1 -1
- package/chunk-SKFITJZT.js +1 -0
- package/{chunk-IME3RCXO.js → chunk-SNVT3M5C.js} +1 -1
- package/chunk-TPYX7QC7.js +1 -0
- package/{chunk-A66RJUYO.js → chunk-ULR2EPP5.js} +1 -1
- package/{chunk-5U6T552I.js → chunk-V5B247QH.js} +1 -1
- package/{chunk-UEUGGMU7.js → chunk-V7OQKE2Z.js} +1 -1
- package/{chunk-SQSTMZR3.js → chunk-VXJJGZ5F.js} +1 -1
- package/{chunk-DQAT6VCF.js → chunk-W7NX3PWJ.js} +1 -1
- package/chunk-WJEUX75A.js +1 -0
- package/{chunk-DQ7EARGM.js → chunk-WKA7CSGA.js} +1 -1
- package/{chunk-D7OP5FPA.js → chunk-WNHQELMC.js} +1 -1
- package/{chunk-J34TTKLN.js → chunk-WPIVIZS6.js} +1 -1
- package/{chunk-4VZNWPWO.js → chunk-X6SJVQXW.js} +1 -1
- package/{chunk-TX7FNDPL.js → chunk-X7XIFHAV.js} +1 -1
- package/{chunk-ATGKEH5N.js → chunk-XUQ74HFK.js} +1 -1
- package/{chunk-KIUZUG7C.js → chunk-Y2LISX47.js} +1 -1
- package/chunk-Y7PHGRGB.js +4 -0
- package/{chunk-AAIMJHAS.js → chunk-YU5AMM6C.js} +1 -1
- package/{chunk-35ZUPRX7.js → chunk-YWZRYOES.js} +1 -1
- package/{chunk-AE7T2DAH.js → chunk-ZQ56M63S.js} +1 -1
- package/chunk-ZSEZR472.js +1 -0
- package/{chunk-ULC4PUPL.js → chunk-ZXEF3CNK.js} +1 -1
- package/{chunk-GNJTDWT4.js → chunk-ZZBUNZZO.js} +1 -1
- package/{chunk-KFYMEXS6.js → chunk-ZZBZEHXF.js} +1 -1
- package/index.html +2 -2
- package/locale/messages.en.json +3 -0
- package/locale/messages.json +3 -0
- package/{main-NIJHUKOR.js → main-L5HX5P6R.js} +1 -1
- package/package.json +1 -1
- package/styles-5QAJP4BI.css +1 -0
- package/chunk-2DSLXKCS.js +0 -1
- package/chunk-43UBTE3L.js +0 -1
- package/chunk-4M7H3XII.js +0 -1
- package/chunk-FG7TM7PO.js +0 -1
- package/chunk-I3AX7HPO.js +0 -1
- package/chunk-IFCA5KWR.js +0 -1
- package/chunk-JIVJVJKU.js +0 -1
- package/chunk-KGO3OR7H.js +0 -1
- package/chunk-LH6XLRJU.js +0 -1
- package/chunk-PIMTQKQK.js +0 -1
- package/chunk-RIX6H2ZX.js +0 -1
- package/chunk-SDIOWQX7.js +0 -1
- package/chunk-TCDG7C5J.js +0 -1
- package/chunk-TGNUULAU.js +0 -1
- package/chunk-UVPLU2YS.js +0 -1
- package/chunk-XRI2BFC2.js +0 -2
- package/chunk-Z34TVTJN.js +0 -1
- package/chunk-Z4MDYLVI.js +0 -1
- package/chunk-ZBK64QS2.js +0 -4
- package/chunk-ZNZH3TU5.js +0 -1
- package/styles-JSM72RCO.css +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{wa as h}from"./chunk-
|
|
1
|
+
import{wa as h}from"./chunk-3ADKRLYD.js";var D;function $(e){D??=new TextEncoder;let n=D.encode(e),t=new DataView(n.buffer,n.byteOffset,n.byteLength),r=H(t,n.length,0),u=H(t,n.length,102072);return r==0&&(u==0||u==1)&&(r=r^319790063,u=u^-1801410264),BigInt.asUintN(32,BigInt(r))<<BigInt(32)|BigInt.asUintN(32,BigInt(u))}function Z(e,n=""){let t=$(e);return n&&(t=BigInt.asUintN(64,t<<BigInt(1))|t>>BigInt(63)&BigInt(1),t+=$(n)),BigInt.asUintN(63,t).toString()}function H(e,n,t){let r=2654435769,u=2654435769,a=0,l=n-12;for(;a<=l;a+=12){r+=e.getUint32(a,!0),u+=e.getUint32(a+4,!0),t+=e.getUint32(a+8,!0);let s=A(r,u,t);r=s[0],u=s[1],t=s[2]}let o=n-a;return t+=n,o>=4?(r+=e.getUint32(a,!0),a+=4,o>=8?(u+=e.getUint32(a,!0),a+=4,o>=9&&(t+=e.getUint8(a++)<<8),o>=10&&(t+=e.getUint8(a++)<<16),o===11&&(t+=e.getUint8(a++)<<24)):(o>=5&&(u+=e.getUint8(a++)),o>=6&&(u+=e.getUint8(a++)<<8),o===7&&(u+=e.getUint8(a++)<<16))):(o>=1&&(r+=e.getUint8(a++)),o>=2&&(r+=e.getUint8(a++)<<8),o===3&&(r+=e.getUint8(a++)<<16)),A(r,u,t)[2]}function A(e,n,t){return e-=n,e-=t,e^=t>>>13,n-=t,n-=e,n^=e<<8,t-=e,t-=n,t^=n>>>13,e-=n,e-=t,e^=t>>>12,n-=t,n-=e,n^=e<<16,t-=e,t-=n,t^=n>>>5,e-=n,e-=t,e^=t>>>3,n-=t,n-=e,n^=e<<10,t-=e,t-=n,t^=n>>>15,[e,n,t]}function P(e,n,t,r,u=[]){let a={},l={},o={},s=_(e[0],e.raw[0]),d=[s.text],g=[],f=s.text;for(let i=1;i<e.length;i++){let{messagePart:E,placeholderName:M=q(i),associatedMessageId:N}=V(e[i],e.raw[i]);f+=`{$${M}}${E}`,n!==void 0&&(a[M]=n[i-1],l[M]=u[i-1]),g.push(M),N!==void 0&&(o[M]=N),d.push(E)}let z=s.customId||Z(f,s.meaning||""),w=s.legacyIds?s.legacyIds.filter(i=>i!==z):[];return{id:z,legacyIds:w,substitutions:a,substitutionLocations:l,text:f,customId:s.customId,meaning:s.meaning||"",description:s.description||"",messageParts:d,messagePartLocations:r,placeholderNames:g,associatedMessageIds:o,location:t}}function _(e,n){let{text:t,block:r}=y(e,n);if(r===void 0)return{text:t};{let[u,...a]=r.split("\u241F"),[l,o]=u.split("@@",2),[s,d]=l.split("|",2);return d===void 0&&(d=s,s=void 0),d===""&&(d=void 0),{text:t,meaning:s,description:d,customId:o,legacyIds:a}}}function V(e,n){let{text:t,block:r}=y(e,n);if(r===void 0)return{messagePart:t};{let[u,a]=r.split("@@");return{messagePart:t,placeholderName:u,associatedMessageId:a}}}function y(e,n){if(n.charAt(0)!==":")return{text:e};{let t=Q(e,n);return{block:e.substring(1,t),text:e.substring(t+1)}}}function q(e){return e===1?"PH":`PH_${e-1}`}function Q(e,n){for(let t=1,r=1;t<e.length;t++,r++)if(n[r]==="\\")r++;else if(e[t]===":")return t;throw new Error(`Unterminated $localize metadata block in "${n}".`)}var p=class extends Error{parsedMessage;type="MissingTranslationError";constructor(n){super(`No translation found for ${b(n)}.`),this.parsedMessage=n}};function te(e,n,t){let r=P(n,t),u=e[r.id];if(r.legacyIds!==void 0)for(let a=0;a<r.legacyIds.length&&u===void 0;a++)u=e[r.legacyIds[a]];if(u===void 0)throw new p(r);return[u.messageParts,u.placeholderNames.map(a=>{if(r.substitutions.hasOwnProperty(a))return r.substitutions[a];throw new Error(`There is a placeholder name mismatch with the translation provided for the message ${b(r)}.
|
|
2
2
|
The translation contains a placeholder with name ${a}, which does not exist in the message.`)})]}function ne(e){let n=e.split(/{\$([^}]*)}/),t=[n[0]],r=[];for(let a=1;a<n.length-1;a+=2)r.push(n[a]),t.push(`${n[a+1]}`);let u=t.map(a=>a.charAt(0)===":"?"\\"+a:a);return{text:e,messageParts:re(t,u),placeholderNames:r}}function re(e,n){return Object.defineProperty(e,"raw",{value:n}),e}function b(e){let n=e.meaning&&` - "${e.meaning}"`,t=e.legacyIds&&e.legacyIds.length>0?` [${e.legacyIds.map(r=>`"${r}"`).join(", ")}]`:"";return`"${e.id}"${t} ("${e.text}"${n})`}function R(e){$localize.translate||($localize.translate=ue),$localize.TRANSLATIONS||($localize.TRANSLATIONS={}),Object.keys(e).forEach(n=>{$localize.TRANSLATIONS[n]=ne(e[n])})}function ue(e,n){try{return te($localize.TRANSLATIONS,e,n)}catch(t){return console.warn(t.message),[e,n]}}function ae(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:t===Math.floor(t)&&t>=2&&t<=4&&r===0?3:r!==0?4:5}var T=["cs",[["dop.","odp."],void 0,void 0],void 0,[["N","P","\xDA","S","\u010C","P","S"],["ne","po","\xFAt","st","\u010Dt","p\xE1","so"],["ned\u011Ble","pond\u011Bl\xED","\xFAter\xFD","st\u0159eda","\u010Dtvrtek","p\xE1tek","sobota"],["ne","po","\xFAt","st","\u010Dt","p\xE1","so"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["led","\xFAno","b\u0159e","dub","kv\u011B","\u010Dvn","\u010Dvc","srp","z\xE1\u0159","\u0159\xEDj","lis","pro"],["ledna","\xFAnora","b\u0159ezna","dubna","kv\u011Btna","\u010Dervna","\u010Dervence","srpna","z\xE1\u0159\xED","\u0159\xEDjna","listopadu","prosince"]],[["1","2","3","4","5","6","7","8","9","10","11","12"],["led","\xFAno","b\u0159e","dub","kv\u011B","\u010Dvn","\u010Dvc","srp","z\xE1\u0159","\u0159\xEDj","lis","pro"],["leden","\xFAnor","b\u0159ezen","duben","kv\u011Bten","\u010Derven","\u010Dervenec","srpen","z\xE1\u0159\xED","\u0159\xEDjen","listopad","prosinec"]],[["p\u0159.n.l.","n.l."],["p\u0159. n. l.","n. l."],["p\u0159ed na\u0161\xEDm letopo\u010Dtem","na\u0161eho letopo\u010Dtu"]],1,[6,0],["dd.MM.yy","d. M. y","d. MMMM y","EEEE d. MMMM y"],["H:mm","H:mm:ss","H:mm:ss z","H:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"CZK","K\u010D","\u010Desk\xE1 koruna",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],CSK:["K\u010Ds"],CZK:["K\u010D"],ILS:[void 0,"\u20AA"],INR:[void 0,"\u20B9"],JPY:["JP\xA5","\xA5"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],TWD:["NT$"],USD:["US$","$"],VND:[void 0,"\u20AB"],XEU:["ECU"],XXX:[]},"ltr",ae];function oe(e){let n=e,t=Math.floor(Math.abs(e)),r=parseInt(e.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0;return n===1||r!==0&&(t===0||t===1)?1:5}var k=["da",[["a","p"],["AM","PM"],void 0],[["AM","PM"],void 0,void 0],[["S","M","T","O","T","F","L"],["s\xF8n.","man.","tir.","ons.","tor.","fre.","l\xF8r."],["s\xF8ndag","mandag","tirsdag","onsdag","torsdag","fredag","l\xF8rdag"],["s\xF8","ma","ti","on","to","fr","l\xF8"]],[["S","M","T","O","T","F","L"],["s\xF8n","man","tir","ons","tor","fre","l\xF8r"],["s\xF8ndag","mandag","tirsdag","onsdag","torsdag","fredag","l\xF8rdag"],["s\xF8","ma","ti","on","to","fr","l\xF8"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","feb.","mar.","apr.","maj","jun.","jul.","aug.","sep.","okt.","nov.","dec."],["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"]],void 0,[["fKr","eKr"],["f.Kr.","e.Kr."],void 0],1,[6,0],["dd.MM.y","d. MMM y","d. MMMM y","EEEE 'den' d. MMMM y"],["HH.mm","HH.mm.ss","HH.mm.ss z","HH.mm.ss zzzz"],["{1} {0}",void 0,"{1} 'kl'. {0}",void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN","."],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"DKK","kr.","dansk krone",{AUD:["AU$","$"],BYN:[void 0,"Br."],DKK:["kr."],ISK:[void 0,"kr."],JPY:["JP\xA5","\xA5"],NOK:[void 0,"kr."],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],SEK:[void 0,"kr."],THB:["\u0E3F"],TWD:["NT$"],USD:["US$","$"]},"ltr",oe];function se(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:5}var B=["de",[["AM","PM"],void 0,void 0],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],void 0,void 0],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[",",".",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","Euro",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",se];function ie(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:5}var C=["en",[["a","p"],["AM","PM"],void 0],[["AM","PM"],void 0,void 0],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",void 0,"{1} 'at' {0}",void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",ie];function le(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:5}var U=["en-GB",[["a","p"],["am","pm"],void 0],[["am","pm"],void 0,void 0],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],1,[6,0],["dd/MM/y","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'at' {0}",void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"GBP","\xA3","British Pound",{JPY:["JP\xA5","\xA5"],USD:["US$","$"]},"ltr",le];function de(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length,u=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return n===1?1:u===0&&t!==0&&t%1e6===0&&r===0||!(u>=0&&u<=5)?4:5}var L=["es",[["a.\xA0m.","p.\xA0m."],void 0,void 0],void 0,[["D","L","M","X","J","V","S"],["dom","lun","mar","mi\xE9","jue","vie","s\xE1b"],["domingo","lunes","martes","mi\xE9rcoles","jueves","viernes","s\xE1bado"],["DO","LU","MA","MI","JU","VI","SA"]],void 0,[["E","F","M","A","M","J","J","A","S","O","N","D"],["ene","feb","mar","abr","may","jun","jul","ago","sept","oct","nov","dic"],["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]],void 0,[["a. C.","d. C."],void 0,["antes de Cristo","despu\xE9s de Cristo"]],1,[6,0],["d/M/yy","d MMM y","d 'de' MMMM 'de' y","EEEE, d 'de' MMMM 'de' y"],["H:mm","H:mm:ss","H:mm:ss z","H:mm:ss (zzzz)"],["{1}, {0}",void 0,void 0,void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{AUD:[void 0,"$"],BRL:[void 0,"R$"],BYN:[void 0,"\u0440."],CAD:[void 0,"$"],CNY:[void 0,"\xA5"],EGP:[],ESP:["\u20A7"],GBP:[void 0,"\xA3"],HKD:[void 0,"$"],ILS:[void 0,"\u20AA"],INR:[void 0,"\u20B9"],JPY:[void 0,"\xA5"],KRW:[void 0,"\u20A9"],MXN:[void 0,"$"],NZD:[void 0,"$"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],THB:["\u0E3F"],TWD:[void 0,"NT$"],USD:["US$","$"],XAF:[],XCD:[void 0,"$"],XOF:[]},"ltr",de];function Me(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:5}var J=["fi",[["ap.","ip."],void 0,void 0],void 0,[["S","M","T","K","T","P","L"],["su","ma","ti","ke","to","pe","la"],["sunnuntaina","maanantaina","tiistaina","keskiviikkona","torstaina","perjantaina","lauantaina"],["su","ma","ti","ke","to","pe","la"]],[["S","M","T","K","T","P","L"],["su","ma","ti","ke","to","pe","la"],["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],["su","ma","ti","ke","to","pe","la"]],[["T","H","M","H","T","K","H","E","S","L","M","J"],["tammik.","helmik.","maalisk.","huhtik.","toukok.","kes\xE4k.","hein\xE4k.","elok.","syysk.","lokak.","marrask.","jouluk."],["tammikuuta","helmikuuta","maaliskuuta","huhtikuuta","toukokuuta","kes\xE4kuuta","hein\xE4kuuta","elokuuta","syyskuuta","lokakuuta","marraskuuta","joulukuuta"]],[["T","H","M","H","T","K","H","E","S","L","M","J"],["tammi","helmi","maalis","huhti","touko","kes\xE4","hein\xE4","elo","syys","loka","marras","joulu"],["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kes\xE4kuu","hein\xE4kuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"]],[["eKr","jKr"],["eKr.","jKr."],["ennen Kristuksen syntym\xE4\xE4","j\xE4lkeen Kristuksen syntym\xE4n"]],1,[6,0],["d.M.y",void 0,"d. MMMM y","cccc d. MMMM y"],["H.mm","H.mm.ss","H.mm.ss z","H.mm.ss zzzz"],["{1} {0}","{1} 'klo' {0}",void 0,void 0],[",","\xA0",";","%","+","\u2212","E","\xD7","\u2030","\u221E","ep\xE4luku","."],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{AOA:[],ARS:[],AUD:[],BAM:[],BBD:[],BDT:[],BMD:[],BND:[],BOB:[],BRL:[],BSD:[],BWP:[],BZD:[],CAD:[],CLP:[],CNY:[],COP:[],CRC:[],CUC:[],CUP:[],CZK:[],DKK:[],DOP:[],EGP:[],ESP:[],FIM:["mk"],FJD:[],FKP:[],GEL:[],GIP:[],GNF:[],GTQ:[],GYD:[],HKD:[],HNL:[],HRK:[],HUF:[],IDR:[],ILS:[],INR:[],ISK:[],JMD:[],KHR:[],KMF:[],KPW:[],KRW:[],KYD:[],KZT:[],LAK:[],LBP:[],LKR:[],LRD:[],LTL:[],LVL:[],MGA:[],MMK:[],MNT:[],MUR:[],MXN:[],MYR:[],NAD:[],NGN:[],NIO:[],NOK:[],NPR:[],NZD:[],PHP:[],PKR:[],PLN:[],PYG:[],RON:[],RWF:[],SBD:[],SEK:[],SGD:[],SHP:[],SRD:[],SSP:[],STN:[void 0,"STD"],SYP:[],THB:[],TOP:[],TRY:[],TTD:[],TWD:[],UAH:[],UYU:[],VEF:[],VND:[],XCD:[],XPF:[],XXX:[],ZAR:[],ZMW:[]},"ltr",Me];function me(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length,u=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:u===0&&t!==0&&t%1e6===0&&r===0||!(u>=0&&u<=5)?4:5}var K=["fr",[["AM","PM"],void 0,void 0],void 0,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd/MM/y","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}","{1}, {0}","{1} '\xE0' {0}",void 0],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{ARS:["$AR","$"],AUD:["$AU","$"],BEF:["FB"],BMD:["$BM","$"],BND:["$BN","$"],BYN:[void 0,"\u0440."],BZD:["$BZ","$"],CAD:["$CA","$"],CLP:["$CL","$"],CNY:[void 0,"\xA5"],COP:["$CO","$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FJD:["$FJ","$"],FKP:["\xA3FK","\xA3"],FRF:["F"],GBP:["\xA3GB","\xA3"],GIP:["\xA3GI","\xA3"],HKD:[void 0,"$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ITL:["\u20A4IT"],JPY:[void 0,"\xA5"],KMF:[void 0,"FC"],LBP:["\xA3LB","\xA3L"],MTP:["\xA3MT"],MXN:["$MX","$"],NAD:["$NA","$"],NIO:[void 0,"$C"],NZD:["$NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SBD:["$SB","$"],SGD:["$SG","$"],SRD:["$SR","$"],TOP:[void 0,"$T"],TTD:["$TT","$"],TWD:[void 0,"NT$"],USD:["$US","$"],UYU:["$UY","$"],WST:["$WS"],XCD:[void 0,"$"],XPF:["FCFP"],ZMW:[void 0,"Kw"]},"ltr",me];function ce(e){return e===1?1:5}var I=["hu",[["de.","du."],void 0,void 0],void 0,[["V","H","K","Sz","Cs","P","Sz"],["V","H","K","Sze","Cs","P","Szo"],["vas\xE1rnap","h\xE9tf\u0151","kedd","szerda","cs\xFCt\xF6rt\xF6k","p\xE9ntek","szombat"],["V","H","K","Sze","Cs","P","Szo"]],void 0,[["J","F","M","\xC1","M","J","J","A","Sz","O","N","D"],["jan.","febr.","m\xE1rc.","\xE1pr.","m\xE1j.","j\xFAn.","j\xFAl.","aug.","szept.","okt.","nov.","dec."],["janu\xE1r","febru\xE1r","m\xE1rcius","\xE1prilis","m\xE1jus","j\xFAnius","j\xFAlius","augusztus","szeptember","okt\xF3ber","november","december"]],void 0,[["ie.","isz."],["i. e.","i. sz."],["Krisztus el\u0151tt","id\u0151sz\xE1m\xEDt\xE1sunk szerint"]],1,[6,0],["y. MM. dd.","y. MMM d.","y. MMMM d.","y. MMMM d., EEEE"],["H:mm","H:mm:ss","H:mm:ss z","H:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"HUF","Ft","magyar forint",{AUD:[void 0,"$"],BRL:[void 0,"R$"],BYN:[void 0,"\u0440."],CAD:[void 0,"$"],CNY:[void 0,"\xA5"],EUR:[void 0,"\u20AC"],GBP:[void 0,"\xA3"],HKD:[void 0,"$"],HUF:["Ft"],ILS:[void 0,"\u20AA"],INR:[void 0,"\u20B9"],KRW:[void 0,"\u20A9"],MXN:[void 0,"$"],NZD:[void 0,"$"],PHP:[void 0,"\u20B1"],TWD:[void 0,"NT$"],USD:[void 0,"$"],VND:[void 0,"\u20AB"],XCD:[void 0,"$"]},"ltr",ce];function fe(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length,u=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===1&&r===0?1:u===0&&t!==0&&t%1e6===0&&r===0||!(u>=0&&u<=5)?4:5}var F=["it",[["m.","p."],["AM","PM"],void 0],void 0,[["D","L","M","M","G","V","S"],["dom","lun","mar","mer","gio","ven","sab"],["domenica","luned\xEC","marted\xEC","mercoled\xEC","gioved\xEC","venerd\xEC","sabato"],["dom","lun","mar","mer","gio","ven","sab"]],void 0,[["G","F","M","A","M","G","L","A","S","O","N","D"],["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]],void 0,[["aC","dC"],["a.C.","d.C."],["avanti Cristo","dopo Cristo"]],1,[6,0],["dd/MM/yy","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} {0}",void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{BRL:[void 0,"R$"],BYN:[void 0,"Br"],EGP:[void 0,"\xA3E"],HKD:[void 0,"$"],INR:[void 0,"\u20B9"],JPY:[void 0,"\xA5"],KRW:[void 0,"\u20A9"],MXN:[void 0,"$"],NOK:[void 0,"NKr"],THB:["\u0E3F"],TWD:[void 0,"NT$"],USD:[void 0,"$"],VND:[void 0,"\u20AB"]},"ltr",fe];function pe(e){let n=e;return 5}var j=["ja",[["\u5348\u524D","\u5348\u5F8C"],void 0,void 0],void 0,[["\u65E5","\u6708","\u706B","\u6C34","\u6728","\u91D1","\u571F"],void 0,["\u65E5\u66DC\u65E5","\u6708\u66DC\u65E5","\u706B\u66DC\u65E5","\u6C34\u66DC\u65E5","\u6728\u66DC\u65E5","\u91D1\u66DC\u65E5","\u571F\u66DC\u65E5"],["\u65E5","\u6708","\u706B","\u6C34","\u6728","\u91D1","\u571F"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],void 0],void 0,[["BC","AD"],["\u7D00\u5143\u524D","\u897F\u66A6"],void 0],0,[6,0],["y/MM/dd",void 0,"y\u5E74M\u6708d\u65E5","y\u5E74M\u6708d\u65E5EEEE"],["H:mm","H:mm:ss","H:mm:ss z","H\u6642mm\u5206ss\u79D2 zzzz"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"JPY","\uFFE5","\u65E5\u672C\u5186",{BYN:[void 0,"\u0440."],CNY:["\u5143","\uFFE5"],JPY:["\uFFE5"],PHP:[void 0,"\u20B1"],RON:[void 0,"\u30EC\u30A4"],XXX:[]},"ltr",pe];function Se(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:5}var O=["nl",[["a.m.","p.m."],void 0,void 0],void 0,[["Z","M","D","W","D","V","Z"],["zo","ma","di","wo","do","vr","za"],["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],["zo","ma","di","wo","do","vr","za"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","feb.","mrt.","apr.","mei","jun.","jul.","aug.","sep.","okt.","nov.","dec."],["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"]],void 0,[["v.C.","n.C."],["v.Chr.","n.Chr."],["voor Christus","na Christus"]],1,[6,0],["dd-MM-y","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,"{1} 'om' {0}",void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00;\xA4\xA0-#,##0.00","#E0"],"EUR","\u20AC","Euro",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],CAD:["C$","$"],FJD:["FJ$","$"],JPY:["JP\xA5","\xA5"],PHP:[void 0,"\u20B1"],RUR:[void 0,"\u0440."],SBD:["SI$","$"],THB:["\u0E3F"],TWD:["NT$"],USD:["US$","$"],XPF:[],XXX:[]},"ltr",Se];function ge(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:r===0&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)?3:r===0&&t!==1&&t%10===Math.floor(t%10)&&t%10>=0&&t%10<=1||r===0&&t%10===Math.floor(t%10)&&t%10>=5&&t%10<=9||r===0&&t%100===Math.floor(t%100)&&t%100>=12&&t%100<=14?4:5}var v=["pl",[["a","p"],["AM","PM"],void 0],void 0,[["n","p","w","\u015B","c","p","s"],["niedz.","pon.","wt.","\u015Br.","czw.","pt.","sob."],["niedziela","poniedzia\u0142ek","wtorek","\u015Broda","czwartek","pi\u0105tek","sobota"],["nie","pon","wto","\u015Bro","czw","pi\u0105","sob"]],[["N","P","W","\u015A","C","P","S"],["niedz.","pon.","wt.","\u015Br.","czw.","pt.","sob."],["niedziela","poniedzia\u0142ek","wtorek","\u015Broda","czwartek","pi\u0105tek","sobota"],["nie","pon","wto","\u015Bro","czw","pi\u0105","sob"]],[["s","l","m","k","m","c","l","s","w","p","l","g"],["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","pa\u017A","lis","gru"],["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","wrze\u015Bnia","pa\u017Adziernika","listopada","grudnia"]],[["S","L","M","K","M","C","L","S","W","P","L","G"],["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","pa\u017A","lis","gru"],["stycze\u0144","luty","marzec","kwiecie\u0144","maj","czerwiec","lipiec","sierpie\u0144","wrzesie\u0144","pa\u017Adziernik","listopad","grudzie\u0144"]],[["p.n.e.","n.e."],void 0,["przed nasz\u0105 er\u0105","naszej ery"]],1,[6,0],["d.MM.y","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} {0}",void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"PLN","z\u0142","z\u0142oty polski",{AUD:[void 0,"$"],CAD:[void 0,"$"],CNY:[void 0,"\xA5"],GBP:[void 0,"\xA3"],HKD:[void 0,"$"],ILS:[void 0,"\u20AA"],INR:[void 0,"\u20B9"],JPY:[void 0,"\xA5"],KRW:[void 0,"\u20A9"],MXN:[void 0,"$"],NZD:[void 0,"$"],PHP:[void 0,"\u20B1"],PLN:["z\u0142"],RON:[void 0,"lej"],TWD:[void 0,"NT$"],USD:[void 0,"$"],VND:[void 0,"\u20AB"]},"ltr",ge];function ze(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length,u=parseInt(e.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===Math.floor(t)&&t>=0&&t<=1?1:u===0&&t!==0&&t%1e6===0&&r===0||!(u>=0&&u<=5)?4:5}var S=["pt",[["AM","PM"],void 0,void 0],void 0,[["D","S","T","Q","Q","S","S"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xE1b."],["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"],["dom.","seg.","ter.","qua.","qui.","sex.","s\xE1b."]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","fev.","mar.","abr.","mai.","jun.","jul.","ago.","set.","out.","nov.","dez."],["janeiro","fevereiro","mar\xE7o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]],void 0,[["a.C.","d.C."],void 0,["antes de Cristo","depois de Cristo"]],0,[6,0],["dd/MM/y","d 'de' MMM 'de' y","d 'de' MMMM 'de' y","EEEE, d 'de' MMMM 'de' y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00","#E0"],"BRL","R$","Real brasileiro",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],JPY:["JP\xA5","\xA5"],PHP:[void 0,"\u20B1"],PTE:["Esc."],RON:[void 0,"L"],SYP:[void 0,"S\xA3"],THB:["\u0E3F"],TWD:["NT$"],USD:["US$","$"]},"ltr",ze];function Ee(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return r===0&&t%10===1&&t%100!==11?1:r===0&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)?3:r===0&&t%10===0||r===0&&t%10===Math.floor(t%10)&&t%10>=5&&t%10<=9||r===0&&t%100===Math.floor(t%100)&&t%100>=11&&t%100<=14?4:5}var G=["ru",[["AM","PM"],void 0,void 0],void 0,[["\u0412","\u041F","\u0412","\u0421","\u0427","\u041F","\u0421"],["\u0432\u0441","\u043F\u043D","\u0432\u0442","\u0441\u0440","\u0447\u0442","\u043F\u0442","\u0441\u0431"],["\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0432\u0442\u043E\u0440\u043D\u0438\u043A","\u0441\u0440\u0435\u0434\u0430","\u0447\u0435\u0442\u0432\u0435\u0440\u0433","\u043F\u044F\u0442\u043D\u0438\u0446\u0430","\u0441\u0443\u0431\u0431\u043E\u0442\u0430"],["\u0432\u0441","\u043F\u043D","\u0432\u0442","\u0441\u0440","\u0447\u0442","\u043F\u0442","\u0441\u0431"]],void 0,[["\u042F","\u0424","\u041C","\u0410","\u041C","\u0418","\u0418","\u0410","\u0421","\u041E","\u041D","\u0414"],["\u044F\u043D\u0432.","\u0444\u0435\u0432\u0440.","\u043C\u0430\u0440.","\u0430\u043F\u0440.","\u043C\u0430\u044F","\u0438\u044E\u043D.","\u0438\u044E\u043B.","\u0430\u0432\u0433.","\u0441\u0435\u043D\u0442.","\u043E\u043A\u0442.","\u043D\u043E\u044F\u0431.","\u0434\u0435\u043A."],["\u044F\u043D\u0432\u0430\u0440\u044F","\u0444\u0435\u0432\u0440\u0430\u043B\u044F","\u043C\u0430\u0440\u0442\u0430","\u0430\u043F\u0440\u0435\u043B\u044F","\u043C\u0430\u044F","\u0438\u044E\u043D\u044F","\u0438\u044E\u043B\u044F","\u0430\u0432\u0433\u0443\u0441\u0442\u0430","\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044F","\u043E\u043A\u0442\u044F\u0431\u0440\u044F","\u043D\u043E\u044F\u0431\u0440\u044F","\u0434\u0435\u043A\u0430\u0431\u0440\u044F"]],[["\u042F","\u0424","\u041C","\u0410","\u041C","\u0418","\u0418","\u0410","\u0421","\u041E","\u041D","\u0414"],["\u044F\u043D\u0432.","\u0444\u0435\u0432\u0440.","\u043C\u0430\u0440\u0442","\u0430\u043F\u0440.","\u043C\u0430\u0439","\u0438\u044E\u043D\u044C","\u0438\u044E\u043B\u044C","\u0430\u0432\u0433.","\u0441\u0435\u043D\u0442.","\u043E\u043A\u0442.","\u043D\u043E\u044F\u0431.","\u0434\u0435\u043A."],["\u044F\u043D\u0432\u0430\u0440\u044C","\u0444\u0435\u0432\u0440\u0430\u043B\u044C","\u043C\u0430\u0440\u0442","\u0430\u043F\u0440\u0435\u043B\u044C","\u043C\u0430\u0439","\u0438\u044E\u043D\u044C","\u0438\u044E\u043B\u044C","\u0430\u0432\u0433\u0443\u0441\u0442","\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u043E\u043A\u0442\u044F\u0431\u0440\u044C","\u043D\u043E\u044F\u0431\u0440\u044C","\u0434\u0435\u043A\u0430\u0431\u0440\u044C"]],[["\u0434\u043E \u043D.\u044D.","\u043D.\u044D."],["\u0434\u043E \u043D. \u044D.","\u043D. \u044D."],["\u0434\u043E \u0420\u043E\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043E\u0432\u0430","\u043E\u0442 \u0420\u043E\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043E\u0432\u0430"]],1,[6,0],["dd.MM.y","d MMM y '\u0433'.","d MMMM y '\u0433'.","EEEE, d MMMM y '\u0433'."],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","\u043D\u0435\xA0\u0447\u0438\u0441\u043B\u043E",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"RUB","\u20BD","\u0440\u043E\u0441\u0441\u0438\u0439\u0441\u043A\u0438\u0439 \u0440\u0443\u0431\u043B\u044C",{BYN:[void 0,"\u0440."],GEL:[void 0,"\u10DA"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUB:["\u20BD"],RUR:["\u0440."],THB:["\u0E3F"],TMT:["\u0422\u041C\u0422"],TWD:["NT$"],UAH:["\u20B4"],XXX:["XXXX"]},"ltr",Ee];function Ne(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length,u=parseInt(e.toString().replace(/^[^.]*\.?/,""),10)||0;return r===0&&t%10===1&&t%100!==11||u%10===1&&u%100!==11?1:r===0&&t%10===Math.floor(t%10)&&t%10>=2&&t%10<=4&&!(t%100>=12&&t%100<=14)||u%10===Math.floor(u%10)&&u%10>=2&&u%10<=4&&!(u%100>=12&&u%100<=14)?3:5}var W=["sr",[["AM","PM"],void 0,void 0],[["\u043F\u0440\u0435 \u043F\u043E\u0434\u043D\u0435","\u043F\u043E \u043F\u043E\u0434\u043D\u0435"],["AM","PM"],void 0],[["\u043D","\u043F","\u0443","\u0441","\u0447","\u043F","\u0441"],["\u043D\u0435\u0434","\u043F\u043E\u043D","\u0443\u0442\u043E","\u0441\u0440\u0435","\u0447\u0435\u0442","\u043F\u0435\u0442","\u0441\u0443\u0431"],["\u043D\u0435\u0434\u0435\u0459\u0430","\u043F\u043E\u043D\u0435\u0434\u0435\u0459\u0430\u043A","\u0443\u0442\u043E\u0440\u0430\u043A","\u0441\u0440\u0435\u0434\u0430","\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043A","\u043F\u0435\u0442\u0430\u043A","\u0441\u0443\u0431\u043E\u0442\u0430"],["\u043D\u0435","\u043F\u043E","\u0443\u0442","\u0441\u0440","\u0447\u0435","\u043F\u0435","\u0441\u0443"]],void 0,[["\u0458","\u0444","\u043C","\u0430","\u043C","\u0458","\u0458","\u0430","\u0441","\u043E","\u043D","\u0434"],["\u0458\u0430\u043D","\u0444\u0435\u0431","\u043C\u0430\u0440","\u0430\u043F\u0440","\u043C\u0430\u0458","\u0458\u0443\u043D","\u0458\u0443\u043B","\u0430\u0432\u0433","\u0441\u0435\u043F","\u043E\u043A\u0442","\u043D\u043E\u0432","\u0434\u0435\u0446"],["\u0458\u0430\u043D\u0443\u0430\u0440","\u0444\u0435\u0431\u0440\u0443\u0430\u0440","\u043C\u0430\u0440\u0442","\u0430\u043F\u0440\u0438\u043B","\u043C\u0430\u0458","\u0458\u0443\u043D","\u0458\u0443\u043B","\u0430\u0432\u0433\u0443\u0441\u0442","\u0441\u0435\u043F\u0442\u0435\u043C\u0431\u0430\u0440","\u043E\u043A\u0442\u043E\u0431\u0430\u0440","\u043D\u043E\u0432\u0435\u043C\u0431\u0430\u0440","\u0434\u0435\u0446\u0435\u043C\u0431\u0430\u0440"]],void 0,[["\u043F.\u043D.\u0435.","\u043D.\u0435."],["\u043F. \u043D. \u0435.","\u043D. \u0435."],["\u043F\u0440\u0435 \u043D\u043E\u0432\u0435 \u0435\u0440\u0435","\u043D\u043E\u0432\u0435 \u0435\u0440\u0435"]],1,[6,0],["d.M.yy.","d. M. y.","d. MMMM y.","EEEE, d. MMMM y."],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",",".",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"RSD","RSD","\u0441\u0440\u043F\u0441\u043A\u0438 \u0434\u0438\u043D\u0430\u0440",{AUD:[void 0,"$"],BAM:["\u041A\u041C","KM"],BYN:[void 0,"\u0440."],GEL:[void 0,"\u10DA"],KRW:[void 0,"\u20A9"],NZD:[void 0,"$"],PHP:[void 0,"\u20B1"],TWD:["NT$"],USD:["US$","$"],VND:[void 0,"\u20AB"]},"ltr",Ne];function he(e){let n=e,t=Math.floor(Math.abs(e)),r=e.toString().replace(/^[^.]*\.?/,"").length;return t===1&&r===0?1:5}var Y=["sv",[["fm","em"],void 0,void 0],[["fm","em"],["f.m.","e.m."],["f\xF6rmiddag","eftermiddag"]],[["S","M","T","O","T","F","L"],["s\xF6n","m\xE5n","tis","ons","tors","fre","l\xF6r"],["s\xF6ndag","m\xE5ndag","tisdag","onsdag","torsdag","fredag","l\xF6rdag"],["s\xF6","m\xE5","ti","on","to","fr","l\xF6"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["jan.","feb.","mars","apr.","maj","juni","juli","aug.","sep.","okt.","nov.","dec."],["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"]],void 0,[["f.Kr.","e.Kr."],void 0,["f\xF6re Kristus","efter Kristus"]],1,[6,0],["y-MM-dd","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}",void 0,void 0,void 0],[",","\xA0",";","%","+","\u2212","\xD710^","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"SEK","kr","svensk krona",{AUD:[void 0,"$"],BBD:["Bds$","$"],BMD:["BM$","$"],BRL:["BR$","R$"],BSD:["BS$","$"],BYN:[void 0,"\u0440."],BZD:["BZ$","$"],CNY:[void 0,"\xA5"],DKK:["Dkr","kr"],DOP:["RD$","$"],EEK:["Ekr"],EGP:["EG\xA3","E\xA3"],ESP:[],GBP:[void 0,"\xA3"],HKD:[void 0,"$"],IEP:["IE\xA3"],INR:[void 0,"\u20B9"],ISK:["Ikr","kr"],JMD:["JM$","$"],JPY:[void 0,"\xA5"],KRW:[void 0,"\u20A9"],NOK:["Nkr","kr"],NZD:[void 0,"$"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],SEK:["kr"],TWD:[void 0,"NT$"],USD:["US$","$"],VND:[void 0,"\u20AB"]},"ltr",he];function De(e){let n=e;return 5}var x=["zh-Hans",[["\u4E0A\u5348","\u4E0B\u5348"],void 0,void 0],void 0,[["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"],["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],["\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"]],void 0,[["\u516C\u5143\u524D","\u516C\u5143"],void 0,void 0],0,[6,0],["y/M/d","y\u5E74M\u6708d\u65E5",void 0,"y\u5E74M\u6708d\u65E5EEEE"],["HH:mm","HH:mm:ss","z HH:mm:ss","zzzz HH:mm:ss"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"CNY","\xA5","\u4EBA\u6C11\u5E01",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],CNY:["\xA5"],ILR:["ILS"],JPY:["JP\xA5","\xA5"],KRW:["\uFFE6","\u20A9"],PHP:[void 0,"\u20B1"],RUR:[void 0,"\u0440."],TWD:["NT$"],USD:["US$","$"],XXX:[]},"ltr",De];function $e(e){let n=e;return 5}var X=["zh-Hant",[["\u4E0A\u5348","\u4E0B\u5348"],void 0,void 0],void 0,[["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],["\u9031\u65E5","\u9031\u4E00","\u9031\u4E8C","\u9031\u4E09","\u9031\u56DB","\u9031\u4E94","\u9031\u516D"],["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]],void 0,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],void 0],void 0,[["\u897F\u5143\u524D","\u897F\u5143"],void 0,void 0],0,[6,0],["y/M/d","y\u5E74M\u6708d\u65E5",void 0,"y\u5E74M\u6708d\u65E5 EEEE"],["Bh:mm","Bh:mm:ss","Bh:mm:ss [z]","Bh:mm:ss [zzzz]"],["{1} {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","\u975E\u6578\u503C",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"TWD","$","\u65B0\u53F0\u5E63",{AUD:["AU$","$"],BYN:[void 0,"\u0440."],KRW:["\uFFE6","\u20A9"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],TWD:["$"],USD:["US$","$"],XXX:[]},"ltr",$e];var He={en:C,"en-GB":U,nl:O,fr:K,de:B,cs:T,da:k,es:L,fi:J,hu:I,it:F,ja:j,pl:v,pt:S,"pt-BR":S,ru:G,sr:W,sv:Y,"zh-Hans":x,"zh-Hant":X},m="en-US",St=[{value:"en",label:"English (en-US)"},{value:"en-GB",label:"English (en-GB)"},{value:"cs",label:"Czech (cs)"},{value:"da",label:"Danish (da)"},{value:"de",label:"German (de)"},{value:"es",label:"Spanish (es)"},{value:"fi",label:"Finnish (fi)"},{value:"fr",label:"French (fr)"},{value:"hu",label:"Hungarian (hu)"},{value:"it",label:"Italian (it)"},{value:"ja-JP",label:"Japanese (ja-JP)"},{value:"nl-NL",label:"Dutch (nl-NL)"},{value:"pl",label:"Polish (pl)"},{value:"pt-BR",label:"Portuguese (pt-BR)"},{value:"pt",label:"Portuguese (pt)"},{value:"ru",label:"Russian (ru)"},{value:"sr-RS",label:"Serbian (sr-RS)"},{value:"sv-SE",label:"Swedish (sv-SE)"},{value:"zh-CN",label:"Chinese (zh-CN)"},{value:"zh-Hans",label:"Chinese (Simplified, zh-Hans)"},{value:"zh-TW",label:"Chinese (zh-TW)"}],c={en:"en","en-US":"en","en-GB":"en-GB","en-AU":"en","en-CA":"en",cs:"cs","cs-CZ":"cs",da:"da","da-DK":"da",de:"de","de-DE":"de","de-AT":"de",es:"es","es-ES":"es","es-MX":"es",fi:"fi","fi-FI":"fi",fr:"fr","fr-FR":"fr","fr-CA":"fr",hu:"hu","hu-HU":"hu",it:"it","it-IT":"it",ja:"ja-JP","ja-JP":"ja-JP",nl:"nl-NL","nl-NL":"nl-NL","nl-BE":"nl-NL",pl:"pl","pl-PL":"pl",pt:"pt","pt-BR":"pt-BR","pt-PT":"pt",ru:"ru","ru-RU":"ru",sr:"sr-RS","sr-RS":"sr-RS",sv:"sv-SE","sv-SE":"sv-SE","sv-FI":"sv-SE",zh:"zh-CN","zh-CN":"zh-CN","zh-SG":"zh-CN","zh-TW":"zh-TW","zh-HK":"zh-TW"},Ae={"ja-JP":"ja","nl-NL":"nl","sr-RS":"sr","sv-SE":"sv","zh-CN":"zh-Hans","zh-TW":"zh-Hant"},Pe=Array.from(new Set(Object.values(c)));function gt(e){return e?c[e]??"en":"en"}function zt(){let e=localStorage.getItem("v1:duplicati:locale")||m,n=Pe.find(o=>o===e)??m,t=c[n]??c[n.split("-")[0]]??m;if(n===m)return n;let r=Ae[t]??t,u=He[r];u&&h(u);let a=t.replace(/-/g,"_"),l=n==="en"?"":"."+a;return fetch(`locale/messages${l}.json`).then(o=>o.json()).then(o=>{R(o.translations),$localize.locale=n}),n}export{St as a,gt as b,zt as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-OVLLX4US.js";import"./chunk-QE4NBN5H.js";import"./chunk-KUP2T6AG.js";import"./chunk-WNHQELMC.js";import"./chunk-R2N5UWYB.js";import"./chunk-J64OAILA.js";import"./chunk-VXJJGZ5F.js";import"./chunk-AUMCM45B.js";import"./chunk-GRPEAINE.js";import"./chunk-QLUEDPL4.js";import"./chunk-ZQ56M63S.js";import"./chunk-4IAJY6E3.js";import"./chunk-P7OKMMNZ.js";import"./chunk-HJSCQF6V.js";import"./chunk-G4Z3JAJB.js";import"./chunk-53V6KV3I.js";import"./chunk-XUQ74HFK.js";import"./chunk-3ADKRLYD.js";import"./chunk-FPPZ4BUR.js";import"./chunk-Y7PHGRGB.js";import"./chunk-EUDKD2JW.js";export{a as createRestoreOptionsForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Ct}from"./chunk-5KMPTDRJ.js";import{b as ye,c as dt,d as pt}from"./chunk-2DP4QU4T.js";import{a as ut,b as Ve,c as ct}from"./chunk-AWXWGD4T.js";import{a as _t}from"./chunk-POJT4MSX.js";import{b as re}from"./chunk-WJDMMKWE.js";import{a as rt}from"./chunk-QBHHGHBJ.js";import{a as Oe}from"./chunk-AE7T2DAH.js";import{b as lt}from"./chunk-TC7HZO7D.js";import{B as ae,G as Y,K as ot,O as le,U as st,V as Me,X as at,b as Te,c as z,d as he,e as j,f as Ne,h as Qe,i as oe,j as fe,k as Ze,n as et,o as Pe,p as tt,q as Ae,r as De,s as se,t as Re,u as q,w as nt,z as it}from"./chunk-TGNUULAU.js";import{b as ie,d as H}from"./chunk-F3EXRAZJ.js";import{$b as u,Ab as $e,Bb as xe,Bc as me,Cb as N,Db as a,Eb as l,Fb as S,H as we,Jb as B,Kb as k,Mb as x,Rc as G,Sa as r,Sc as ne,Tb as m,Ub as F,V as Ce,Vb as f,Wc as Be,Xc as ke,Yb as Ue,Yc as Fe,Zb as T,_ as A,cb as J,ea as p,fa as C,gc as ge,hb as je,hc as Ee,ic as be,kc as Se,nc as U,oc as ve,pa as E,pc as Ye,sc as L,tc as I,ub as qe,uc as w,xb as D,yb as R,zb as Ge}from"./chunk-ZBK64QS2.js";import{a as b,b as X}from"./chunk-EUDKD2JW.js";var Le=class s{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};function mt(s,t){if(s&1){let e=x();a(0,"div",24)(1,"sh-form-field")(2,"label",25),f(3,7),l(),a(4,"input",26,0),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),C(i)}),T("focus",function(){p(e);let i=be(5);return C(i.showPicker())}),l(),a(6,"sh-icon",27),U(7,"clock"),l()(),a(8,"sh-form-field"),S(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),C(i)}),T("focus",function(){p(e);let i=be(11);return C(i.showPicker())}),l(),a(12,"sh-icon",27),U(13,"calendar"),l()()(),a(14,"div",24)(15,"sh-form-field")(16,"label",30),f(17,8),l(),a(18,"input",31),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),C(i)}),l()(),a(19,"sh-select",32)(20,"input",33),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),C(i)}),l()()(),a(21,"sh-toggle-card",34),B(22,35),f(23,9),k(),a(24,"div",36)(25,"sh-toggle",19),m(26,10),a(27,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),C(i)}),l(),F(),l(),a(28,"sh-toggle",19),m(29,11),a(30,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),C(i)}),l(),F(),l(),a(31,"sh-toggle",19),m(32,12),a(33,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),C(i)}),l(),F(),l(),a(34,"sh-toggle",19),m(35,13),a(36,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),C(i)}),l(),F(),l(),a(37,"sh-toggle",19),m(38,14),a(39,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),C(i)}),l(),F(),l(),a(40,"sh-toggle",19),m(41,15),a(42,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),C(i)}),l(),F(),l(),a(43,"sh-toggle",19),m(44,16),a(45,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),C(i)}),l(),F(),l()()()}if(s&2){let e=u();r(4),L("ngModel",e.scheduleFields.nextTime().time),r(6),L("ngModel",e.scheduleFields.nextTime().date),r(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),r(),N("options",e.unitOptions)("isClearable",!1),r(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),N("disallowToggle",!0),r(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Ft=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class s{#e=A(Q);#t=A(H);#i=A(ie);unitOptions=Ft;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let d;d=$localize`Next time`;let c;c=$localize`Run again every`;let _;_=$localize`Allowed days`;let g;g=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,d,c,_,g,y,h,$,K,v,W,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),f(1,2),l(),a(2,"div",18)(3,"sh-toggle",19),m(4,3),a(5,"input",20),w("ngModelChange",function(o){return I(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),F(),l(),a(6,"p"),f(7,4),l()(),D(8,mt,46,14),a(9,"div",21)(10,"button",22),T("click",function(){return n.goBack()}),m(11,5),S(12,"sh-icon"),F(),l(),a(13,"button",23),T("click",function(){return n.next()}),m(14,6),S(15,"sh-icon"),F(),l()()),e&2&&(r(5),L("ngModel",n.scheduleFields.autoRun),r(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[se,z,Ze,Te,j,oe,Y,Me,q,ae,le,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Tt(s,t){if(s&1){let e=x();a(0,"sh-select",2)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l()()}if(s&2){let e=u();N("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),r(),L("ngModel",e.internalPath)}}function ht(s,t){if(s&1&&(B(0,7),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Nt(s,t){if(s&1&&(B(0,8),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ft(s,t){if(s&1){let e=x();a(0,"sh-form-field",3)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l(),D(2,ht,2,1,"ng-container",7),D(3,Nt,2,1,"ng-container",8),l()}if(s&2){let e,n,i=u();r(),L("ngModel",i.internalPath),r(),R(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),r(),R(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Pt=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],At=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ie=class s{path=ke.required();osType=ke();pathChange=Be();remove=Be();internalPath=E("");pathType=E("-Expression");currentExpressionOption=G(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=E(Pt);expressionOptions=G(()=>{let e=this.osType()==="Windows"?"\\":"/";return At.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(b({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(b({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(b({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(b({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(b({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(b({},n),{startsWith:"*.",endsWith:""}):X(b({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(a(0,"sh-select",0)(1,"input",1),w("ngModelChange",function(o){return I(n.pathType,o)||(n.pathType=o),o}),T("ngModelChange",function(){return n.updateFilter()}),l()(),D(2,Tt,2,4,"sh-select",2)(3,ft,4,3,"sh-form-field",3),a(4,"div",4),T("click",function(){return n.removeFilter()}),a(5,"sh-icon",5),U(6,"x-circle"),l()()),e&2){let i;N("options",n.expressionOptions())("isClearable",!1),r(),L("ngModel",n.pathType),r(),R(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[se,z,j,oe,le,Y,q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Dt=["formRef"],He=()=>({standalone:!0});function Rt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41)(1,"input",42),w("ngModelChange",function(i){p(e);let o=u(2);return I(o.editingPath,i)||(o.editingPath=i),C(i)}),l()(),a(2,"button",43),T("click",function(){p(e);let i=u(2);return C(i.updatePath())}),a(3,"sh-icon"),U(4,"floppy-disk"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u(2);return C(i.cancelEditPath())}),a(6,"sh-icon"),U(7,"x-bold"),l()()}if(s&2){let e=u(2);r(),L("ngModel",e.editingPath),N("ngModelOptions",me(2,He))}}function Mt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41),S(1,"input",44),l(),a(2,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.editPath(i))}),a(3,"sh-icon"),U(4,"pen"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.removePath(i))}),a(6,"sh-icon"),U(7,"trash-simple"),l()()}if(s&2){let e=u().$implicit;qe("readonly",!0),r(),N("ngModel",e)("ngModelOptions",me(3,He))}}function Ot(s,t){if(s&1&&(a(0,"div",30),D(1,Rt,8,3)(2,Mt,8,4),l()),s&2){let e=t.$implicit,n=u();r(),R(n.oldPath()===e?1:2)}}function yt(s,t){if(s&1){let e=x();a(0,"app-new-filter",46),T("pathChange",function(i){let o=p(e).$index,d=u(2);return C(d.patchPathAt(i,o))})("remove",function(){let i=p(e).$index,o=u(2);return C(o.removePathAt(i))}),l()}if(s&2){let e=t.$implicit,n=u(2);N("path",e)("osType",n.osType()??"")}}function Lt(s,t){if(s&1&&$e(0,yt,1,2,"app-new-filter",45,Ge),s&2){let e=u();xe(e.pathArray())}}function It(s,t){if(s&1){let e=x();a(0,"div",31)(1,"app-size",47),T("ngModelChange",function(i){p(e);let o=u();return C(o.updateFilesLargerThan(i))}),l()()}if(s&2){let e=u();r(),N("ngModel",e.filesLargerThan())("ngModelOptions",me(2,He))}}var V=new De,gt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),Je=class s{#e=A(Q);#t=A(H);#i=A(ie);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Qe("");filesLargerThan=G(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=G(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=E(null);editingPath=E(null);addingNewPath=E(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=ye(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(d=>d&&d!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),o=this.pathArray().map((c,_)=>_===e?`${t}`:`${c}`).join("\0"),d=[i,o].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(d)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),i=this.pathArray().filter((d,c)=>c!==t).join("\0"),o=[n,i].filter(d=>d&&d!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Dt,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let d;d=$localize`Source Data`;let c;c=$localize`Folder path`;let _;_=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let g;g=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let y;y=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let $;$=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let W;W=$localize`Exclude`;let M;M=$localize`Choose if there’s any files you want to exclude.`;let Z;Z=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let P;return P=$localize`Edit path`,[["formRef",""],d,c,_,g,y,h,$,K,v,W,M,Z,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",P,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),T("submit",function(){return p(i),C(n.next())}),a(2,"div",17)(3,"h3",18),f(4,1),l(),a(5,"app-file-tree",19)(6,"label",20),f(7,2),l(),S(8,"input",21),l(),a(9,"div",22)(10,"button",23),T("click",function(){return p(i),C(n.goBack())}),m(11,3),S(12,"sh-icon"),F(),l(),a(13,"button",24),m(14,4),S(15,"sh-icon"),F(),l()()(),a(16,"div",25)(17,"app-toggle-card",26),B(18,27),f(19,5),k(),a(20,"p",28),f(21,6),l(),a(22,"div",29),$e(23,Ot,3,1,"div",30,Ge),a(25,"div",31)(26,"sh-form-field"),S(27,"input",32),l(),a(28,"button",33),T("click",function(){return p(i),C(n.addNewPath())}),a(29,"sh-icon"),U(30,"plus"),l()()()()(),a(31,"app-toggle-card",26),B(32,27),f(33,7),k(),a(34,"p",28),f(35,8),l(),a(36,"button",34),T("click",function(){return p(i),C(n.addFilter())}),f(37,9),l(),D(38,Lt,2,0),l(),a(39,"app-toggle-card",35),B(40,27),f(41,10),k(),a(42,"p",28),f(43,11),l(),a(44,"sh-toggle",36),m(45,12),S(46,"input",37),F(),l(),a(47,"sh-toggle",36),m(48,13),S(49,"input",38),F(),l(),a(50,"sh-toggle",36),m(51,14),S(52,"input",39),F(),l(),a(53,"sh-toggle",40),T("click",function(){return p(i),C(n.toggleFilesLargerThan())}),f(54,15),l(),D(55,It,2,3,"div",31),l()()()}if(e&2){let i;N("formGroup",n.sourceDataForm),r(5),N("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),N("disallowToggle",!0),r(6),xe(n.nonFilterPaths()),r(4),N("formControl",n.newPathCtrl),r(4),N("disallowToggle",!0),r(7),R((i=n.pathSignal())!=null&&i.length?38:-1),r(),N("disallowToggle",!0),r(14),Se("active",n.filesLargerThan()),r(2),R(n.filesLargerThan()?55:-1)}},dependencies:[se,fe,z,Te,j,Ne,oe,Re,et,Pe,Ae,tt,Y,q,ae,Me,Ie,pt,Ct,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;overflow:auto}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Et="1W:1D,4W:1W,12M:1M",Q=class s{#e=A(H);#t=A(Oe);#i=A(it);#n=A(lt);#r=A(_t);#o=A(Le);generalForm=St();sourceDataForm=gt();scheduleFields={autoRun:E(ee.autoRun),nextTime:E(ee.nextTime),runAgain:E(ee.runAgain)};settings=E([]);optionsFields={remoteVolumeSize:E("50MB"),backupRetention:E("all"),backupRetentionTime:E(""),backupRetentionVersions:E(0),backupRetentionCustom:E("")};targetUrlModel=E(null);backupMetadata=E(null);isDraft=E(!1);backupId=E(null);backupName=G(()=>this.generalFormSignal()?.name??"");isSubmitting=E(!1);finishedLoading=E(!1);backupDefaults=E(null);applicationOptions=E(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=E([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#s=E("");#a=E(null);#l=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#a.asReadonly();#p=ne(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#s.set(""),this.#a.set(null))});setTestState(t,e){this.#s.set(t),this.#a.set(e??null)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=G(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=G(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#c(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#_(),this.#e.navigate(["/"]);return}this.#i.open(rt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(c=>`${c.Include?"":"-"}${c.Expression}`)??[],i=t.Settings?.find(c=>c.Name==="--exclude-files-attributes")?.Value?.toLowerCase()?.split(",")??[],o=t.Settings?.find(c=>c.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,d={path:[...e,...n].join("\0"),excludes:{hidden:i.includes("hidden"),system:i.includes("system"),temporary:i.includes("temporary"),filesLargerThan:o===null?void 0:ye(o)}};this.sourceDataForm.patchValue(d)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(g=>g.Name==="encryption-module"),o=t.Settings?.find(g=>g.Name==="passphrase")?.Value??"",d=i?.Value&&i.Value.length?i.Value:"",c=t.Settings?.find(g=>g.Name==="compression-module")?.Value??"",_={name:t.Name??"",description:t.Description??""};e&&e!==""&&(_.name=e),n&&n!==""&&(_.description=n),d&&d!==""&&(_.encryption=d),o&&o!==""&&(_.password=o,_.repeatPassword=o),c&&c!==""&&(_.compression=c),this.generalForm.patchValue(_)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#d(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>b(b({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=(t.Settings??[]).map(_=>_);if(e){let _=this.#r.serverSettings()??{};Object.keys(_).filter(g=>g.startsWith("--")).forEach(g=>{i.find(h=>h.Name===g)||i.push({Name:g,Value:_[g],Filter:null})})}let o=i.filter(_=>!n.includes(_.Name)),d=i.filter(_=>n.includes(_.Name));this.settings.set(o??[]),o?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var c="all";d?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Et)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(c)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#c(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let d=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,$])=>$).map(([h,$])=>h):[],c=n.path?.split("\0")??[],_=this.mapFormsToSettings(),g=Object.entries(n.excludes??{}).filter(([h,$])=>$&&h!=="filesLargerThan").map(([h])=>h),y=n.excludes?.filesLargerThan;return g.length&&_.push({Name:"--exclude-files-attributes",Value:g.join(",")}),y&&y.size!==null&&y.unit!==null&&_.push({Name:"--skip-files-larger-than",Value:`${y.size}${y.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:c.filter(h=>!(h.startsWith("-")||h.startsWith("+"))),Settings:_,Filters:c.filter(h=>h.startsWith("-")||h.startsWith("+")).map((h,$)=>({Order:$,Include:h.startsWith("+"),Expression:h.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:d}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==pe.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let d=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":d.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":d.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":d.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":d.push({Name:"retention-policy",Value:Et});break}let c=[...t,...n],_=this.settings().filter(g=>!c.includes(g.Name)).map(g=>{let y=g.Value;return typeof g.Value=="number"&&(y=g.Value.toString()),typeof g.Value=="boolean"&&(y=g.Value?"True":"False"),{Name:g.Name?.startsWith("--")?g.Name:`--${g.Name}`,Value:y}});return[...i,...o,...d,..._]}#d(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#_(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(ee.autoRun),this.scheduleFields.nextTime.set(ee.nextTime),this.scheduleFields.runAgain.set(ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};var wt=["formRef"];function Gt(s,t){s&1&&(a(0,"sh-alert",17),m(1,5),S(2,"sh-icon",26),F(),l())}function $t(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ye(" ",e.DisplayName," ")}}function xt(s,t){if(s&1&&S(0,"sh-progress-bar",40),s&2){let e=u(3);Se("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),N("value",e.calculatePasswordStrength()*(100/5))}}function Ut(s,t){s&1&&(a(0,"span",35),f(1,10),l())}function bt(s,t){s&1&&(m(0,8,1),S(1,"sh-icon"),F())}function vt(s,t){s&1&&(m(0,8,2),S(1,"sh-icon"),F())}function Bt(s,t){s&1&&(m(0,11,1),S(1,"sh-icon",42),F())}function kt(s,t){s&1&&(m(0,11,2),S(1,"sh-icon"),F())}function Vt(s,t){if(s&1){let e=x();a(0,"button",41),T("click",function(){p(e);let i=u(3);return C(i.copyPassword())}),m(1,11),D(2,Bt,2,0)(3,kt,2,0),F(),l()}if(s&2){let e=u(3);r(2),R(e.copiedPassword()?2:3)}}function Kt(s,t){s&1&&(a(0,"sh-alert",39),f(1,12),l())}function Wt(s,t){if(s&1){let e=x();a(0,"div",30)(1,"sh-form-field")(2,"label",31),m(3,7),S(4,"sup"),F(),l(),S(5,"input",32),l(),D(6,xt,1,9,"sh-progress-bar",33),a(7,"sh-form-field"),S(8,"input",34),D(9,Ut,2,0,"span",35),l(),a(10,"div",36)(11,"button",37),T("click",function(){p(e);let i=u(2);return C(i.showPassword.set(!i.showPassword()))}),m(12,8),D(13,bt,2,0)(14,vt,2,0),F(),l(),a(15,"button",37),T("click",function(){p(e);let i=u(2);return C(i.generatePassword())}),m(16,9),S(17,"sh-icon"),F(),l(),D(18,Vt,4,1,"button",38),l(),D(19,Kt,2,0,"sh-alert",39),l()}if(s&2){let e=u(2);r(5),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.password?6:-1),r(2),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),R(e.showPassword()?13:14),r(5),R(e.showCopyPassword()?18:-1),r(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Xt(s,t){if(s&1&&(a(0,"sh-select",27)(1,"label",28),f(2,6),l(),S(3,"input",29),je(4,$t,1,1,"ng-template"),l(),D(5,Wt,20,7,"div",30)),s&2){let e=u();N("options",e.encryptionOptions())("isClearable",!1),r(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Jt(s,t){if(s&1&&(a(0,"button",24),m(1,13),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.nameAndDescriptionValid()===!1)}}function Ht(s,t){if(s&1&&(a(0,"button",25),m(1,14),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,St=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(s.name,[he.required]),description:te.control(s.description),encryption:te.control(s.encryption,[ct()]),password:te.control(s.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(s.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(s.compression)}),pe={Key:"-",DisplayName:"None"},ze=class s{#e=A(H);#t=A(ie);#i=A(ut);#n=A(Q);#r=A(Oe);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=G(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,wt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let d;d=$localize`Backup description`;let c;c=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let _;_=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let g;g=$localize`Encryption`;let y;y=$localize`Encryption`;let h;h=$localize`Password`;let $;$=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ue(v);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let M;M=$localize`Passwords do not match`;let Z;Z=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ue(Z);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,o,d,c,_,y,K,v,W,M,Z,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",g,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),T("submit",function(){return p(i),C(n.next())}),a(2,"h3",16),f(3,1),l(),D(4,Gt,3,0,"sh-alert",17),a(5,"sh-form-field")(6,"label",18),m(7,2),S(8,"sup"),F(),l(),S(9,"input",19),l(),a(10,"sh-form-field")(11,"label",20),f(12,3),l(),S(13,"textarea",21),l(),D(14,Xt,6,3),a(15,"div",22)(16,"button",23),T("click",function(){return p(i),C(n.exit())}),m(17,4),S(18,"sh-icon"),F(),l(),D(19,Jt,3,1,"button",24)(20,Ht,3,1,"button",25),l()()}if(e&2){let i;N("formGroup",n.generalForm),r(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),R(n.isNew()?14:-1),r(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,fe,z,j,Ne,Pe,Ae,Y,le,ae,q,ot,nt,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{St as a,pe as b,ze as c,ee as d,Ke as e,gt as f,Je as g,Q as h};
|
|
1
|
+
import{a as Ct}from"./chunk-R2N5UWYB.js";import{b as ye,c as dt,d as pt}from"./chunk-J64OAILA.js";import{a as ut,b as Ve,c as ct}from"./chunk-OQ2HMOSQ.js";import{a as _t}from"./chunk-NY63VRAY.js";import{b as re}from"./chunk-GRPEAINE.js";import{a as rt}from"./chunk-QLUEDPL4.js";import{a as Oe}from"./chunk-ZQ56M63S.js";import{b as lt}from"./chunk-P7OKMMNZ.js";import{B as ae,G as Y,K as ot,O as le,U as st,V as Me,X as at,b as Te,c as z,d as he,e as j,f as Ne,h as Qe,i as oe,j as fe,k as Ze,n as et,o as Pe,p as tt,q as Ae,r as De,s as se,t as Re,u as q,w as nt,z as it}from"./chunk-HJSCQF6V.js";import{b as ie,d as H}from"./chunk-G4Z3JAJB.js";import{Ab as xe,Ac as me,Bb as N,Cb as a,Db as l,Eb as S,H as we,Ib as B,Jb as k,Lb as x,Qc as G,Ra as r,Rc as ne,Sb as m,Tb as F,Ub as f,V as Ce,Vc as Be,Wc as ke,Xb as Ue,Xc as Fe,Yb as T,_ as A,_b as u,bb as J,da as p,ea as C,fc as ge,gb as je,gc as Ee,hc as be,jc as Se,mc as U,nc as ve,oa as E,oc as Ye,rc as L,sc as I,tb as qe,tc as w,wb as D,xb as R,yb as Ge,zb as $e}from"./chunk-Y7PHGRGB.js";import{a as b,b as X}from"./chunk-EUDKD2JW.js";var Le=class s{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};function mt(s,t){if(s&1){let e=x();a(0,"div",24)(1,"sh-form-field")(2,"label",25),f(3,7),l(),a(4,"input",26,0),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),C(i)}),T("focus",function(){p(e);let i=be(5);return C(i.showPicker())}),l(),a(6,"sh-icon",27),U(7,"clock"),l()(),a(8,"sh-form-field"),S(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),C(i)}),T("focus",function(){p(e);let i=be(11);return C(i.showPicker())}),l(),a(12,"sh-icon",27),U(13,"calendar"),l()()(),a(14,"div",24)(15,"sh-form-field")(16,"label",30),f(17,8),l(),a(18,"input",31),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),C(i)}),l()(),a(19,"sh-select",32)(20,"input",33),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),C(i)}),l()()(),a(21,"sh-toggle-card",34),B(22,35),f(23,9),k(),a(24,"div",36)(25,"sh-toggle",19),m(26,10),a(27,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),C(i)}),l(),F(),l(),a(28,"sh-toggle",19),m(29,11),a(30,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),C(i)}),l(),F(),l(),a(31,"sh-toggle",19),m(32,12),a(33,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),C(i)}),l(),F(),l(),a(34,"sh-toggle",19),m(35,13),a(36,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),C(i)}),l(),F(),l(),a(37,"sh-toggle",19),m(38,14),a(39,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),C(i)}),l(),F(),l(),a(40,"sh-toggle",19),m(41,15),a(42,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),C(i)}),l(),F(),l(),a(43,"sh-toggle",19),m(44,16),a(45,"input",20),w("ngModelChange",function(i){p(e);let o=u();return I(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),C(i)}),l(),F(),l()()()}if(s&2){let e=u();r(4),L("ngModel",e.scheduleFields.nextTime().time),r(6),L("ngModel",e.scheduleFields.nextTime().date),r(8),L("ngModel",e.scheduleFields.runAgain().repeatValue),r(),N("options",e.unitOptions)("isClearable",!1),r(),L("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),N("disallowToggle",!0),r(6),L("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),L("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var Ft=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],ee={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class s{#e=A(Q);#t=A(H);#i=A(ie);unitOptions=Ft;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let d;d=$localize`Next time`;let c;c=$localize`Run again every`;let _;_=$localize`Allowed days`;let g;g=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let y;y=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let $;$=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let v;v=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let W;return W=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,d,c,_,g,y,h,$,K,v,W,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),f(1,2),l(),a(2,"div",18)(3,"sh-toggle",19),m(4,3),a(5,"input",20),w("ngModelChange",function(o){return I(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),l(),F(),l(),a(6,"p"),f(7,4),l()(),D(8,mt,46,14),a(9,"div",21)(10,"button",22),T("click",function(){return n.goBack()}),m(11,5),S(12,"sh-icon"),F(),l(),a(13,"button",23),T("click",function(){return n.next()}),m(14,6),S(15,"sh-icon"),F(),l()()),e&2&&(r(5),L("ngModel",n.scheduleFields.autoRun),r(3),R(n.scheduleFields.autoRun()?8:-1))},dependencies:[se,z,Ze,Te,j,oe,Y,Me,q,ae,le,st],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Tt(s,t){if(s&1){let e=x();a(0,"sh-select",2)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l()()}if(s&2){let e=u();N("options",e.fileGroupOptions())("isClearable",!1)("selectMultiple",!0),r(),L("ngModel",e.internalPath)}}function ht(s,t){if(s&1&&(B(0,7),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.startsWith)}}function Nt(s,t){if(s&1&&(B(0,8),U(1),k()),s&2){let e,n=u(2);r(),ve((e=n.currentExpressionOption())==null?null:e.endsWith)}}function ft(s,t){if(s&1){let e=x();a(0,"sh-form-field",3)(1,"input",6),w("ngModelChange",function(i){p(e);let o=u();return I(o.internalPath,i)||(o.internalPath=i),C(i)}),T("ngModelChange",function(){p(e);let i=u();return C(i.updateFilter())}),l(),D(2,ht,2,1,"ng-container",7),D(3,Nt,2,1,"ng-container",8),l()}if(s&2){let e,n,i=u();r(),L("ngModel",i.internalPath),r(),R(!((e=i.currentExpressionOption())==null||e.startsWith==null)&&e.startsWith.length?2:-1),r(),R(!((n=i.currentExpressionOption())==null||n.endsWith==null)&&n.endsWith.length?3:-1)}}var Pt=[{key:"Applications",value:"Applications"},{key:"CacheFiles",value:"Cache Files"},{key:"TemporaryFiles",value:"Temporary Files"},{key:"OperatingSystem",value:"Operating System"},{key:"SystemFiles",value:"System Files"},{key:"DefaultExcludes",value:"Standard Excludes"}],At=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Exclude file groups",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],Ie=class s{path=ke.required();osType=ke();pathChange=Be();remove=Be();internalPath=E("");pathType=E("-Expression");currentExpressionOption=G(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});fileGroupOptions=E(Pt);expressionOptions=G(()=>{let e=this.osType()==="Windows"?"\\":"/";return At.map(n=>n.value==="-Folder"||n.value==="+Folder"?X(b({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?X(b({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?X(b({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?X(b({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?X(b({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?X(b({},n),{startsWith:"*.",endsWith:""}):X(b({},n),{startsWith:"",endsWith:""}))});pathEffect=ne(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:7,vars:4,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],["value","key","label","value",1,"expression-input",3,"options","isClearable","selectMultiple"],[1,"expression-input"],[1,"filter-removal",3,"click"],[1,"sh-primary"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""]]},template:function(e,n){if(e&1&&(a(0,"sh-select",0)(1,"input",1),w("ngModelChange",function(o){return I(n.pathType,o)||(n.pathType=o),o}),T("ngModelChange",function(){return n.updateFilter()}),l()(),D(2,Tt,2,4,"sh-select",2)(3,ft,4,3,"sh-form-field",3),a(4,"div",4),T("click",function(){return n.removeFilter()}),a(5,"sh-icon",5),U(6,"x-circle"),l()()),e&2){let i;N("options",n.expressionOptions())("isClearable",!1),r(),L("ngModel",n.pathType),r(),R(((i=n.currentExpressionOption())==null?null:i.value)=="-FileGroup"||((i=n.currentExpressionOption())==null?null:i.value)=="+FileGroup"?2:3)}},dependencies:[se,z,j,oe,le,Y,q],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Dt=["formRef"],He=()=>({standalone:!0});function Rt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41)(1,"input",42),w("ngModelChange",function(i){p(e);let o=u(2);return I(o.editingPath,i)||(o.editingPath=i),C(i)}),l()(),a(2,"button",43),T("click",function(){p(e);let i=u(2);return C(i.updatePath())}),a(3,"sh-icon"),U(4,"floppy-disk"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u(2);return C(i.cancelEditPath())}),a(6,"sh-icon"),U(7,"x-bold"),l()()}if(s&2){let e=u(2);r(),L("ngModel",e.editingPath),N("ngModelOptions",me(2,He))}}function Mt(s,t){if(s&1){let e=x();a(0,"sh-form-field",41),S(1,"input",44),l(),a(2,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.editPath(i))}),a(3,"sh-icon"),U(4,"pen"),l()(),a(5,"button",43),T("click",function(){p(e);let i=u().$implicit,o=u();return C(o.removePath(i))}),a(6,"sh-icon"),U(7,"trash-simple"),l()()}if(s&2){let e=u().$implicit;qe("readonly",!0),r(),N("ngModel",e)("ngModelOptions",me(3,He))}}function Ot(s,t){if(s&1&&(a(0,"div",30),D(1,Rt,8,3)(2,Mt,8,4),l()),s&2){let e=t.$implicit,n=u();r(),R(n.oldPath()===e?1:2)}}function yt(s,t){if(s&1){let e=x();a(0,"app-new-filter",46),T("pathChange",function(i){let o=p(e).$index,d=u(2);return C(d.patchPathAt(i,o))})("remove",function(){let i=p(e).$index,o=u(2);return C(o.removePathAt(i))}),l()}if(s&2){let e=t.$implicit,n=u(2);N("path",e)("osType",n.osType()??"")}}function Lt(s,t){if(s&1&&$e(0,yt,1,2,"app-new-filter",45,Ge),s&2){let e=u();xe(e.pathArray())}}function It(s,t){if(s&1){let e=x();a(0,"div",31)(1,"app-size",47),T("ngModelChange",function(i){p(e);let o=u();return C(o.updateFilesLargerThan(i))}),l()()}if(s&2){let e=u();r(),N("ngModel",e.filesLargerThan())("ngModelOptions",me(2,He))}}var V=new De,gt=(s={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(s.path),excludes:V.group({hidden:V.control(s.excludes.hidden),system:V.control(s.excludes.system),temporary:V.control(s.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),Je=class s{#e=A(Q);#t=A(H);#i=A(ie);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new Qe("");filesLargerThan=G(()=>{let t=this.sourceDataFormSignal()?.excludes?.filesLargerThan??{};return t.size!==null&&t.unit!==null?`${t.size}${t.unit}`:null});osType=this.#e.osType;pathSignal=re(this.sourceDataForm.controls.path.valueChanges);pathArray=G(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=G(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=E(null);editingPath=E(null);addingNewPath=E(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updateFilesLargerThan(t){let{size:e,unit:n}=ye(t);this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:e,unit:n})}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let n=(this.sourceDataForm.controls.path.value??"").split("\0"),i=n.indexOf(t);if(i===-1)return;n.splice(i,1);let o=n.filter(d=>d&&d!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let n=[this.sourceDataForm.controls.path.value,t].filter(i=>i&&i!=="").join("\0");this.sourceDataForm.controls.path.setValue(n)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(c=>!c.startsWith("-")&&!c.startsWith("+")).join("\0"),o=this.pathArray().map((c,_)=>_===e?`${t}`:`${c}`).join("\0"),d=[i,o].filter(c=>c&&c!=="").join("\0");this.sourceDataForm.controls.path.setValue(d)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(d=>!d.startsWith("-")&&!d.startsWith("+")).join("\0"),i=this.pathArray().filter((d,c)=>c!==t).join("\0"),o=[n,i].filter(d=>d&&d!=="").join("\0");this.sourceDataForm.controls.path.setValue(o)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value,n=t?.split("\0")||[];e&&!n.includes(e)&&n.push(e);let i=n.filter(o=>o&&o!=="").join("\0");this.sourceDataForm.controls.path.setValue(i),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&ge(n.formRef,Dt,5),e&2&&Ee()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let d;d=$localize`Source Data`;let c;c=$localize`Folder path`;let _;_=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let g;g=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let y;y=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let $;$=$localize`Filters`;let K;K=$localize`Customize your filters.`;let v;v=$localize`Add filter`;let W;W=$localize`Exclude`;let M;M=$localize`Choose if there’s any files you want to exclude.`;let Z;Z=$localize` Files with the Hidden attribute ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Files with the System attribute ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files with the Temporary attribute ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ce;ce=$localize` Files larger than `;let P;return P=$localize`Edit path`,[["formRef",""],d,c,_,g,y,h,$,K,v,W,M,Z,_e,ue,ce,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["shButton","","type","button",1,"raised","primary",3,"click"],["type","button","shButton","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],[1,"small"],["type","text","placeholder",P,3,"ngModelChange","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],[3,"ngModelChange","ngModel","ngModelOptions"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),T("submit",function(){return p(i),C(n.next())}),a(2,"div",17)(3,"h3",18),f(4,1),l(),a(5,"app-file-tree",19)(6,"label",20),f(7,2),l(),S(8,"input",21),l(),a(9,"div",22)(10,"button",23),T("click",function(){return p(i),C(n.goBack())}),m(11,3),S(12,"sh-icon"),F(),l(),a(13,"button",24),m(14,4),S(15,"sh-icon"),F(),l()()(),a(16,"div",25)(17,"app-toggle-card",26),B(18,27),f(19,5),k(),a(20,"p",28),f(21,6),l(),a(22,"div",29),$e(23,Ot,3,1,"div",30,Ge),a(25,"div",31)(26,"sh-form-field"),S(27,"input",32),l(),a(28,"button",33),T("click",function(){return p(i),C(n.addNewPath())}),a(29,"sh-icon"),U(30,"plus"),l()()()()(),a(31,"app-toggle-card",26),B(32,27),f(33,7),k(),a(34,"p",28),f(35,8),l(),a(36,"button",34),T("click",function(){return p(i),C(n.addFilter())}),f(37,9),l(),D(38,Lt,2,0),l(),a(39,"app-toggle-card",35),B(40,27),f(41,10),k(),a(42,"p",28),f(43,11),l(),a(44,"sh-toggle",36),m(45,12),S(46,"input",37),F(),l(),a(47,"sh-toggle",36),m(48,13),S(49,"input",38),F(),l(),a(50,"sh-toggle",36),m(51,14),S(52,"input",39),F(),l(),a(53,"sh-toggle",40),T("click",function(){return p(i),C(n.toggleFilesLargerThan())}),f(54,15),l(),D(55,It,2,3,"div",31),l()()()}if(e&2){let i;N("formGroup",n.sourceDataForm),r(5),N("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),N("disallowToggle",!0),r(6),xe(n.nonFilterPaths()),r(4),N("formControl",n.newPathCtrl),r(4),N("disallowToggle",!0),r(7),R((i=n.pathSignal())!=null&&i.length?38:-1),r(),N("disallowToggle",!0),r(14),Se("active",n.filesLargerThan()),r(2),R(n.filesLargerThan()?55:-1)}},dependencies:[se,fe,z,Te,j,Ne,oe,Re,et,Pe,Ae,tt,Y,q,ae,Me,Ie,pt,Ct,dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}sh-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;overflow:auto}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var Et="1W:1D,4W:1W,12M:1M",Q=class s{#e=A(H);#t=A(Oe);#i=A(it);#n=A(lt);#r=A(_t);#o=A(Le);generalForm=St();sourceDataForm=gt();scheduleFields={autoRun:E(ee.autoRun),nextTime:E(ee.nextTime),runAgain:E(ee.runAgain)};settings=E([]);optionsFields={remoteVolumeSize:E("50MB"),backupRetention:E("all"),backupRetentionTime:E(""),backupRetentionVersions:E(0),backupRetentionCustom:E("")};targetUrlModel=E(null);backupMetadata=E(null);isDraft=E(!1);backupId=E(null);backupName=G(()=>this.generalFormSignal()?.name??"");isSubmitting=E(!1);finishedLoading=E(!1);backupDefaults=E(null);applicationOptions=E(null);isNew=G(()=>this.backupId()==="new");osType=G(()=>this.#t.systemInfo()?.OSType);selectedOptions=E([]);sourceDataFormSignal=re(this.sourceDataForm.valueChanges);generalFormSignal=re(this.generalForm.valueChanges);encryptionFieldSignal=re(this.generalForm.controls.encryption.valueChanges);advancedOptions=G(()=>this.#t.systemInfo()?.Options?.map(this.#u)??[]);#s=E("");#a=E(null);#l=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#a.asReadonly();#p=ne(()=>{let t=this.targetUrlModel(),e=this.#s(),n=this.#l;this.#l=t,!(e==="testing"||n===null||n===t)&&(this.#s.set(""),this.#a.set(null))});setTestState(t,e){this.#s.set(t),this.#a.set(e??null)}#u(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=G(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[pe,...t]});nonSelectedOptions=G(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#c(),n=this.backupId();this.isDraft()&&e.Backup&&(e.Backup.Metadata=this.backupMetadata()),n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:()=>{t||this.exit(!1)},error:()=>{}})}exit(t){if(!t){this.#_(),this.#e.navigate(["/"]);return}this.#i.open(rt,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#_(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(c=>`${c.Include?"":"-"}${c.Expression}`)??[],i=t.Settings?.find(c=>c.Name==="--exclude-files-attributes")?.Value?.toLowerCase()?.split(",")??[],o=t.Settings?.find(c=>c.Name==="--skip-files-larger-than")?.Value?.toUpperCase()??null,d={path:[...e,...n].join("\0"),excludes:{hidden:i.includes("hidden"),system:i.includes("system"),temporary:i.includes("temporary"),filesLargerThan:o===null?void 0:ye(o)}};this.sourceDataForm.patchValue(d)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Name??"",n=t.Description??"",i=t.Settings?.find(g=>g.Name==="encryption-module"),o=t.Settings?.find(g=>g.Name==="passphrase")?.Value??"",d=i?.Value&&i.Value.length?i.Value:"",c=t.Settings?.find(g=>g.Name==="compression-module")?.Value??"",_={name:t.Name??"",description:t.Description??""};e&&e!==""&&(_.name=e),n&&n!==""&&(_.description=n),d&&d!==""&&(_.encryption=d),o&&o!==""&&(_.password=o,_.repeatPassword=o),c&&c!==""&&(_.compression=c),this.generalForm.patchValue(_)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#d(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>b(b({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t,e=!1){let n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],i=(t.Settings??[]).map(_=>_);if(e){let _=this.#r.serverSettings()??{};Object.keys(_).filter(g=>g.startsWith("--")).forEach(g=>{i.find(h=>h.Name===g)||i.push({Name:g,Value:_[g],Filter:null})})}let o=i.filter(_=>!n.includes(_.Name)),d=i.filter(_=>n.includes(_.Name));this.settings.set(o??[]),o?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var c="all";d?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return c="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return c="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===Et)c="smart";else return c="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(c)}storeMetadata(t,e){this.backupMetadata.set(e?t.Metadata??null:null)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#c(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let d=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,$])=>$).map(([h,$])=>h):[],c=n.path?.split("\0")??[],_=this.mapFormsToSettings(),g=Object.entries(n.excludes??{}).filter(([h,$])=>$&&h!=="filesLargerThan").map(([h])=>h),y=n.excludes?.filesLargerThan;return g.length&&_.push({Name:"--exclude-files-attributes",Value:g.join(",")}),y&&y.size!==null&&y.unit!==null&&_.push({Name:"--skip-files-larger-than",Value:`${y.size}${y.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:c.filter(h=>!(h.startsWith("-")||h.startsWith("+"))),Settings:_,Filters:c.filter(h=>h.startsWith("-")||h.startsWith("+")).map((h,$)=>({Order:$,Include:h.startsWith("+"),Expression:h.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:d}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size","compression-module"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&e.encryption!==pe.Key&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"compression-module",Value:e.compression}];e.compression===""&&(o=[]);let d=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":d.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":d.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":d.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":d.push({Name:"retention-policy",Value:Et});break}let c=[...t,...n],_=this.settings().filter(g=>!c.includes(g.Name)).map(g=>{let y=g.Value;return typeof g.Value=="number"&&(y=g.Value.toString()),typeof g.Value=="boolean"&&(y=g.Value?"True":"False"),{Name:g.Name?.startsWith("--")?g.Name:`--${g.Name}`,Value:y}});return[...i,...o,...d,..._]}#d(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t,e=!1){e&&(this.#l=null),this.targetUrlModel.set(t)}#_(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(ee.autoRun),this.scheduleFields.nextTime.set(ee.nextTime),this.scheduleFields.runAgain.set(ee.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=Ce({token:s,factory:s.\u0275fac,providedIn:"root"})};var wt=["formRef"];function Gt(s,t){s&1&&(a(0,"sh-alert",17),m(1,5),S(2,"sh-icon",26),F(),l())}function $t(s,t){if(s&1&&U(0),s&2){let e=t.$implicit;Ye(" ",e.DisplayName," ")}}function xt(s,t){if(s&1&&S(0,"sh-progress-bar",40),s&2){let e=u(3);Se("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),N("value",e.calculatePasswordStrength()*(100/5))}}function Ut(s,t){s&1&&(a(0,"span",35),f(1,10),l())}function bt(s,t){s&1&&(m(0,8,1),S(1,"sh-icon"),F())}function vt(s,t){s&1&&(m(0,8,2),S(1,"sh-icon"),F())}function Bt(s,t){s&1&&(m(0,11,1),S(1,"sh-icon",42),F())}function kt(s,t){s&1&&(m(0,11,2),S(1,"sh-icon"),F())}function Vt(s,t){if(s&1){let e=x();a(0,"button",41),T("click",function(){p(e);let i=u(3);return C(i.copyPassword())}),m(1,11),D(2,Bt,2,0)(3,kt,2,0),F(),l()}if(s&2){let e=u(3);r(2),R(e.copiedPassword()?2:3)}}function Kt(s,t){s&1&&(a(0,"sh-alert",39),f(1,12),l())}function Wt(s,t){if(s&1){let e=x();a(0,"div",30)(1,"sh-form-field")(2,"label",31),m(3,7),S(4,"sup"),F(),l(),S(5,"input",32),l(),D(6,xt,1,9,"sh-progress-bar",33),a(7,"sh-form-field"),S(8,"input",34),D(9,Ut,2,0,"span",35),l(),a(10,"div",36)(11,"button",37),T("click",function(){p(e);let i=u(2);return C(i.showPassword.set(!i.showPassword()))}),m(12,8),D(13,bt,2,0)(14,vt,2,0),F(),l(),a(15,"button",37),T("click",function(){p(e);let i=u(2);return C(i.generatePassword())}),m(16,9),S(17,"sh-icon"),F(),l(),D(18,Vt,4,1,"button",38),l(),D(19,Kt,2,0,"sh-alert",39),l()}if(s&2){let e=u(2);r(5),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.password?6:-1),r(2),N("type",e.showPassword()?"text":"password"),r(),R(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),R(e.showPassword()?13:14),r(5),R(e.showCopyPassword()?18:-1),r(),R(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function Xt(s,t){if(s&1&&(a(0,"sh-select",27)(1,"label",28),f(2,6),l(),S(3,"input",29),je(4,$t,1,1,"ng-template"),l(),D(5,Wt,20,7,"div",30)),s&2){let e=u();N("options",e.encryptionOptions())("isClearable",!1),r(5),R(e.encryptionFieldSignal()!==e.noneOptionKey?5:-1)}}function Jt(s,t){if(s&1&&(a(0,"button",24),m(1,13),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.nameAndDescriptionValid()===!1)}}function Ht(s,t){if(s&1&&(a(0,"button",25),m(1,14),S(2,"sh-icon"),F(),l()),s&2){let e=u();N("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var te=new De,St=(s={name:"",description:"",encryption:"",password:"",repeatPassword:"",compression:""})=>te.group({name:te.control(s.name,[he.required]),description:te.control(s.description),encryption:te.control(s.encryption,[ct()]),password:te.control(s.password,[Ve(t=>t?.value.encryption!=="",[he.required])]),repeatPassword:te.control(s.repeatPassword,[Ve(t=>t?.value.encryption!=="",[he.required])]),compression:te.control(s.compression)}),pe={Key:"-",DisplayName:"None"},ze=class s{#e=A(H);#t=A(ie);#i=A(ut);#n=A(Q);#r=A(Oe);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=E(!1);copiedPassword=E(!1);showCopyPassword=E(!1);noneOptionKey=pe.Key;encryptionEffect=ne(()=>{this.encryptionFieldSignal()===pe.Key&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=G(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#o(t??""),this.copiedPassword.set(!0)}async#o(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=J({type:s,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&ge(n.formRef,wt,5),e&2&&Ee()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let d;d=$localize`Backup description`;let c;c=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Exit `;let _;_=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Encrypted backup `;let g;g=$localize`Encryption`;let y;y=$localize`Encryption`;let h;h=$localize`Password`;let $;$=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let v;v=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,v=Ue(v);let W;W=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let M;M=$localize`Passwords do not match`;let Z;Z=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Z=Ue(Z);let _e;_e=$localize` Tip: Be sure to save your password. If you lose it, you will lose access to your backups. `;let ue;ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let ce;return ce=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["formRef",""],i,o,d,c,_,y,K,v,W,M,Z,_e,ue,ce,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","shButton","",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],["shButton","","type","submit","shTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",g,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",$,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),T("submit",function(){return p(i),C(n.next())}),a(2,"h3",16),f(3,1),l(),D(4,Gt,3,0,"sh-alert",17),a(5,"sh-form-field")(6,"label",18),m(7,2),S(8,"sup"),F(),l(),S(9,"input",19),l(),a(10,"sh-form-field")(11,"label",20),f(12,3),l(),S(13,"textarea",21),l(),D(14,Xt,6,3),a(15,"div",22)(16,"button",23),T("click",function(){return p(i),C(n.exit())}),m(17,4),S(18,"sh-icon"),F(),l(),D(19,Jt,3,1,"button",24)(20,Ht,3,1,"button",25),l()()}if(e&2){let i;N("formGroup",n.generalForm),r(4),R(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),R(n.isNew()?14:-1),r(5),R(n.encryptionFieldSignal()===n.noneOptionKey||!n.isNew()?19:20)}},dependencies:[Re,fe,z,j,Ne,Pe,Ae,Y,le,ae,q,ot,nt,at],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{St as a,pe as b,ze as c,ee as d,Ke as e,gt as f,Je as g,Q as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as We}from"./chunk-QBHHGHBJ.js";import{a as Ve}from"./chunk-AE7T2DAH.js";import{b as $e}from"./chunk-TC7HZO7D.js";import{A as Re,B as Ie,G as te,I as Le,K as Ae,O as Be,V as ke,a as Oe,c as U,e as Y,i as Z,k as ye,s as ee,u as xe,y as we,z as De}from"./chunk-TGNUULAU.js";import{ea as Fe}from"./chunk-NXROYR6L.js";import{$b as u,Ab as he,Ac as Me,B as ue,Bb as _e,Bc as Ne,Cb as O,Cc as Q,Db as c,Dc as ve,Eb as d,Fb as X,H as ie,Kc as Se,Lb as ne,Mb as L,Rc as D,Sa as h,Sc as R,Tb as ge,Ub as fe,Vb as A,Wb as me,Wc as se,Xb as Ce,Xc as C,Yc as le,Zb as x,_ as j,ac as q,bc as w,cb as J,ea as N,fa as v,gc as oe,hb as W,hc as Te,ic as re,jc as K,kc as y,n as ce,nc as b,oc as Ee,pa as P,pc as Pe,qc as be,r as H,sc as B,tc as k,ub as pe,uc as $,x as de,xb as S,yb as F}from"./chunk-ZBK64QS2.js";import{a as G,b as z}from"./chunk-EUDKD2JW.js";var qe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Ke=["label","[prefix]","[suffix]"];function Qe(o,t){if(o&1&&b(0),o&2){let e=t.$implicit,i=u();be("",e.label,"",i.hasPerSecond()?"/s":"")}}var Ue=["throttle-upload","throttle-download"],Ye=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],Ze=o=>{if(!o||typeof o!="string"||o.length===0)return{size:0,unit:"MB"};let t=o.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"}},Ge=class o{customId=C();inputType=C();timespan=P(0);unit=P("MB");sizeOptions=P(Ye);readonly=P(!1);hasPerSecond=D(()=>{let t=this.inputType();return t&&Ue.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=R(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=Ze(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||o)};static \u0275cmp=J({type:o,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[Me([{provide:Oe,useExisting:o,multi:!0}])],ngContentSelectors:Ke,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,i){e&1&&(q(qe),c(0,"div",0),w(1,0,["ngProjectAs","label",5,["label"]]),d(),c(2,"sh-form-field")(3,"input",1),$("ngModelChange",function(r){return k(i.timespan,r)||(i.timespan=r),r}),d(),w(4,1),w(5,2),d(),c(6,"sh-select",2)(7,"input",3),$("ngModelChange",function(r){return k(i.unit,r)||(i.unit=r),r}),d(),W(8,Qe,1,2,"ng-template"),d()),e&2&&(h(2),pe("readonly",i.readonly()||void 0),h(),O("id",i.customId()),B("ngModel",i.timespan),O("disabled",i.readonly()),h(3),K("--miw",0),O("options",i.sizeOptions())("readonly",i.readonly())("isClearable",!1),h(),B("ngModel",i.unit))},dependencies:[Be,te,ee,U,ye,Y,Z],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}'],changeDetection:0})};var et=["treeContainer"],tt=["formRef"],it=[[["label"]],[["label"]],[["input"]]],nt=["label","label","input"],ot=o=>({children:o,level:0}),ze=o=>({$implicit:o}),rt=(o,t)=>({children:o,level:t}),st=()=>({maxWidth:"700px",width:"100%"}),lt=(o,t)=>t.id;function at(o,t){if(o&1){let e=L();c(0,"sh-button-group")(1,"button",19),x("click",function(){N(e);let n=u();return v(n.pathDiscoveryMethod.set("browse"))}),A(2,4),d(),c(3,"button",19),x("click",function(){N(e);let n=u();return v(n.pathDiscoveryMethod.set("path"))}),A(4,5),d()()}if(o&2){let e=u();h(),y("active",e.pathDiscoveryMethod()==="browse"),h(2),y("active",e.pathDiscoveryMethod()==="path")}}function ct(o,t){o&1&&X(0,"sh-progress-bar",12)}function dt(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-down"),d())}function ut(o,t){o&1&&X(0,"sh-icon",24)}function pt(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-right"),d())}function ht(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-open"),d())}function _t(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-user"),d())}function gt(o,t){o&1&&(c(0,"sh-icon",22),b(1,"file"),d())}function ft(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder"),d())}function mt(o,t){if(o&1&&(S(0,dt,2,0,"sh-icon",24)(1,ut,1,0,"sh-icon",24)(2,pt,2,0,"sh-icon",24),S(3,ht,2,0,"sh-icon",22)(4,_t,2,0,"sh-icon",22)(5,gt,2,0,"sh-icon",22)(6,ft,2,0,"sh-icon",22)),o&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2),h(3),F(e.children.length?3:e.id==="%HOME%"?4:e.cls==="file"?5:6)}}function Ct(o,t){o&1&&(c(0,"sh-icon",22),b(1,"desktop-tower"),d())}function Tt(o,t){o&1&&ne(0)}function Et(o,t){if(o&1&&W(0,Tt,1,0,"ng-container",13),o&2){let e=u(2).$implicit,i=u().$implicit;u();let n=re(7);O("ngTemplateOutlet",n)("ngTemplateOutletContext",Q(5,ze,ve(2,rt,e.children,i.level+1)))}}function Pt(o,t){if(o&1){let e=L();c(0,"div",20,3),x("click",function(){N(e);let n=u().$implicit,r=u(2);return v(r.toggleNode(n.id,n))}),c(2,"div",21),S(3,mt,7,2)(4,Ct,2,0,"sh-icon",22),d(),c(5,"div",23),x("click",function(n){N(e);let r=u().$implicit,a=u(2);return v(a.toggleSelectedNode(n,r))}),b(6),d()(),S(7,Et,1,7,"ng-container")}if(o&2){let e=u().$implicit,i=u().$implicit,n=u();y("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",i.level===0),h(2),y("file",e.cls==="file"),h(),F(e.id!=="/"?3:4),h(3),Pe(" ",e.text," "),h(),F(e.children.length>0?7:-1)}}function bt(o,t){if(o&1&&S(0,Pt,8,17),o&2){let e=t.$implicit,i=u(2);F(e.hidden&&i._showHiddenNodes()||!e.hidden?0:-1)}}function Mt(o,t){if(o&1&&(c(0,"sh-list"),he(1,bt,1,1,null,null,lt),d()),o&2){let e=t.$implicit;K("padding-left",e.level*.25,"rem"),h(),_e(e.children)}}function Nt(o,t){o&1&&ne(0)}function vt(o,t){if(o&1){let e=L();c(0,"sh-toggle",25),x("click",function(){N(e);let n=u();return v(n._showHiddenNodes.set(!n._showHiddenNodes()))}),A(1,6),d()}if(o&2){let e=u();y("active",e._showHiddenNodes()),h(),me(e.showFiles()?"files":"folders"),Ce(1)}}function St(o,t){if(o&1){let e=L();c(0,"button",26),x("click",function(){N(e);let n=u();return v(n.openCreateFolderDialog())}),A(1,7),d()}if(o&2){let e=u();O("disabled",!e.isCurrentPathFolder())}}function Ft(o,t){if(o&1){let e=L();c(0,"sh-dialog",27),$("isOpenChange",function(n){N(e);let r=u();return k(r.createFolderDialogOpen,n)||(r.createFolderDialogOpen=n),v(n)}),c(1,"header",28)(2,"h2"),A(3,8),d()(),c(4,"div",29)(5,"div"),b(6," Folder will be created under "),c(7,"pre"),b(8),d()(),c(9,"sh-form-field")(10,"textarea",30),$("ngModelChange",function(n){N(e);let r=u();return k(r.createFolderPath,n)||(r.createFolderPath=n),v(n)}),d()()(),c(11,"footer",31)(12,"button",32),x("click",function(){N(e);let n=u();return v(n.closeCreateFolderDialog(!1))}),b(13,"Cancel"),d(),c(14,"button",33),x("click",function(){N(e);let n=u();return v(n.closeCreateFolderDialog(!0))}),ge(15,9),X(16,"sh-icon"),fe(),d()()()}if(o&2){let e,i=u();B("isOpen",i.createFolderDialogOpen),O("options",Ne(5,st)),h(8),Ee(i.currentPath()),h(2),B("ngModel",i.createFolderPath),h(4),O("disabled",!((e=i.createFolderPath())!=null&&e.length))}}var He=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(He||{}),M="/",ae=class o{#t=j($e);#n=j(Ve);#c=j(De);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPaths=C([]);initialNodes=C([]);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);enableCreateFolder=C(!1);hideShortcuts=C(!1);includes=se();excludes=se();_showHiddenNodes=P(!1);createFolderDialogOpen=P(!1);createFolderPath=P(null);treeContainerRef=le("treeContainer");formRef=le("formRef");pathDiscoveryMethod=P("browse");isLoading=P(!1);currentPath=P("/");#o=P(null);treeSearchQuery=P("");treeNodes=P([]);pathDelimiter=D(()=>this.#n.systemInfo()?.DirectorySeparator??"");filterGroups=this.#n.filterGroups();isByBackupSettings=D(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=D(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=He;treeStructure=D(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(l=>l!==""&&l!==M),i=structuredClone(e);for(let l=0;l<i.length;l++){let m=i[l].slice(1);if(m.startsWith("{")&&m.endsWith("}")){let _=m.slice(1,-1),g=this.filterGroups?.FilterGroups[_];if(g&&g.length){let T=g.map(E=>`-${E}`);i.splice(l,1,...T)}}}let n=this.searchableTreeNodes(),r=this.rootPaths(),a=this.accepts(),f=this.pathDelimiter(),s=[];return r.length>0?s=r.map(l=>{let p=this.#r(i,l,"folder",null);return{id:l,resolvedpath:l,text:l,parentPath:"",children:[],evalState:p,isIndeterminate:!1,cls:this.#e(l,f)?"folder":"file"}}):s=[{id:M,resolvedpath:M,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],s.map(l=>{let p=new Map;if(!l.id)return;let m=l.id;a&&(l.accepted=!0),p.set(m,l);let _=r.length>0?n.filter(g=>g.parentPath.startsWith(m)):n;for(let g of _){if(!g.id)continue;let T=g.id;if(!g.cls||p.has(T))continue;let E=p.get(g.parentPath),V=g.hidden===!0&&t?0:this.#r(i,T,g.cls,E),I=z(G({},g),{isIndeterminate:this.isIndeterminate(i,T),evalState:V,children:[]});a&&(I.accepted=this.matchAccepts(a,I)),p.set(T,I),E&&E.children.push(I)}return l}),s});#d(t){let e=this.pathDelimiter();return t?t.endsWith(e)||t===M?t:t+e:M}#r(t,e,i,n){if(n&&n.evalState===-1)return-2;let r=0,a=this.pathDelimiter(),f=t.filter(p=>!p.startsWith("-")&&!p.startsWith("+")),s=t.filter(p=>p.startsWith("-")||p.startsWith("+")),l=this.multiSelect();if(f.length===0)return r;for(let p=0;p<f.length;p++){let m=f[p];if(e===m){r=1;break}if(!l||!this.#e(m,a))continue;if(e?.startsWith(m)){r=1;break}}if(s.length===0)return r;for(let p=0;p<s.length;p++){let m=s[p],_=m.slice(1),g=m.startsWith("-")?-1:1;if(this.#e(_,a)){if(i!=="folder")continue;if(e===_){r=g;break}}if(_.startsWith("*")&&_.endsWith(`*${a}`)){if(i!=="folder")continue;let E=_.slice(1,-2);if(E==="")break;if(e?.includes(E+a)){r=g;break}}if(_.startsWith("[.*")&&_.endsWith(`[^\\${a}]*]`)){if(i!=="file")continue;let E=_.slice(3,-7);if(new RegExp(E).test(e)){r=g;break}}if(_.startsWith("[")&&_.endsWith("]")){let E=_.slice(1,-1),V=this.translateCSharpRegex(E);if(new RegExp(`${V}`).test(e)){r=g;break}}if(_.startsWith("*.")){if(i!=="file"||_.replace("*.","").length===0)continue;if(this.#s(e,_,!0)){r=g;break}}if(_==="")continue;if(_===e){r=g;break}if(this.#s(e,_,!0)){r=g;break}}return r}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let i=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(i,(n,r,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(i=>!i.startsWith("-")&&this.#e(i,this.pathDelimiter())).some(i=>i.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith(this.pathDelimiter())||t.startsWith("%")&&t.endsWith("%")&&!t.includes(this.pathDelimiter()):!1}#s(t,e,i=!1){let n=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${n}${i?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#o();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===M)return!0;let i=t.split(",");if(i.length===0)return!0;let n="."+e.id.slice(e.id.indexOf("."));return n?i.some(r=>n.endsWith(r)):!1}currentPathEffect=R(()=>{let t=this.#o();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#u(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.#o.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#_(t);else{let e=this.rootPaths(),i=this.initialNodes();e&&e.length>0?(i&&i.length>0&&this.treeNodes.set(i.map(n=>({id:n.id,leaf:n.leaf,cls:n.cls,text:n.text,iconCls:n.iconCls,fileSize:n.fileSize,resolvedpath:n.resolvedpath,parentPath:this.getParentPath(n.id??"")}))),this.#i(null,e[0])):this.#i(null,M)}}getParentPath(t){let e=this.pathDelimiter(),i=t.split(e);return i.length<=1?M:(i.pop(),i.length!==0&&i.pop(),i.join(e)+e)}toggleSelectedNode(t,e){if(e.id===M||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let n=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),a=this.isChildOfSelected(e)?`-${e.id}`:e.id,f=this.#e(e.id,this.pathDelimiter());if(this.multiSelect())if(n.includes(e.id))this.currentPath.set(n.filter(s=>s!==e.id&&!(f&&s.startsWith(a))).join("\0"));else if(n.some(s=>s==a))this.currentPath.set(n.filter(s=>s!==a).join("\0"));else{let s=f?n.filter(l=>!l.startsWith(e.id)):n;this.currentPath.set([...s,a].join("\0"))}else n.includes(e.id)?this.currentPath.set(n.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(i=>i!==""&&i!==M&&this.#e(i,this.pathDelimiter())).some(i=>t.id?.startsWith(i)||`-${t.id}`.startsWith(i))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(i=>i.filter(n=>!n.id?.startsWith(e.id)||n.id===e.id)):this.#i(e,t))}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(!0),!1}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let i=this.currentPath(),n=this.#d(e),r=i+n;this.#t.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+r}}).subscribe({next:()=>{this.currentPath.set(r),this.#i(null,i),setTimeout(()=>{this.#l()},500),this.createFolderDialogOpen.set(!1)},error:a=>{let f=a?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),s=f?f[1]:a?.message||$localize`An error occurred while trying to create the folder.`;this.#c.open(We,{data:{title:$localize`Cannot create folder`,message:s,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#u(t){return Object.defineProperty(t,"value",{configurable:!0,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:!0,cancelable:!0,detail:{value:e}})),e}}),t}#p(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#h(t){let e=this.backupSettings();if(this.#n.hasV2ListOperations())return this.#t.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(H(i=>i.Data??[]));{let i={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(i).pipe(H(n=>n.Files??[]))}}#a(t){return this.isByBackupSettings()?this.#h(t):this.#p(t)}#_(t){let e=this.pathDelimiter(),i=t.split("\0").filter(s=>s.startsWith("-")).map(s=>s.slice(1,-1)),r=t.split("\0").filter(s=>!s.startsWith("-")).filter(Boolean).map(s=>{let l=s.split(e);return l.at(-1)!==""&&l.pop(),l}),a=[M];r.forEach(s=>{s.forEach((l,p)=>{let m=s.slice(0,p+1).join(e);m!==""&&(a.includes(m)||a.push(m))})}),this.isLoading.set(!0);let f=a.map(s=>this.#a(s).pipe(H(l=>({status:"success",value:l,url:s})),ue(l=>ce({status:"error",value:l,url:s}))));de(f).pipe(ie(()=>this.isLoading.set(!1))).subscribe({next:s=>{let l=s.filter(m=>m.status==="success"),p=s.filter(m=>m.status==="error");this.treeNodes.update(m=>{let _=l.flatMap(T=>Array.isArray(T.value)?T.value.map(E=>z(G({},E),{parentPath:T.url})):[]),g=[...new Map([...m,..._].map(T=>[T.id,T])).values()];return this.#l(),this.hideShortcuts()?g.filter(T=>!T.id.startsWith("%")):g})}})}#e(t,e){return t.startsWith("%")&&t.endsWith("%")||t.endsWith(e)}#i(t=null,e=M){let i=this.pathDelimiter();this.isLoading.set(!0),this.#a(e).pipe(ie(()=>this.isLoading.set(!1))).subscribe({next:n=>{let r=this.isByBackupSettings()?n.map(a=>({text:a.Path.split(i).filter(f=>f!=="").pop(),id:a.Path,cls:this.#e(a.Path,i)?"folder":"file",leaf:t!==null,resolvedpath:a.Path,hidden:!1})):n;this.treeNodes.update(a=>{let f=r.map(l=>{let p=this.#e(l.id,i)?"folder":"file";return z(G({},l),{cls:p,parentPath:e})}),s=[...new Map([...a,...f].map(l=>[l.id,l])).values()];return this.hideShortcuts()?s.filter(l=>!l.id.startsWith("%")):s})}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=J({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,i){e&1&&(oe(i.treeContainerRef,et,5),oe(i.formRef,tt,5)),e&2&&Te(2)},hostVars:2,hostBindings:function(e,i){e&2&&y("disabled",i.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],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"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:nt,decls:18,vars:17,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let i;i=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let n;n=$localize` Create folder `;let r;r=$localize`Enter new folder path`;let a;return a=$localize` Create folder ${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,i,n,r,a,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"active"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,i){if(e&1&&(q(it),S(0,at,5,4,"sh-button-group"),c(1,"div",10),w(2,0,["ngProjectAs","label",5,["label"]]),c(3,"div",11,0),S(5,ct,1,0,"sh-progress-bar",12),W(6,Mt,3,2,"ng-template",null,1,Se)(8,Nt,1,0,"ng-container",13),d(),c(9,"div",14),S(10,vt,2,3,"sh-toggle",15),S(11,St,2,1,"button",16),d()(),c(12,"div",17,2)(14,"sh-form-field"),w(15,1,["ngProjectAs","label",5,["label"]]),w(16,2,["ngProjectAs","input",5,["input"]]),d()(),S(17,Ft,17,6,"sh-dialog",18)),e&2){let n=re(7);F(i.multiSelect()?-1:0),h(),y("hidden",i.pathDiscoveryMethod()!=="browse"),h(2),y("visualize-accepted",i.accepts()),h(2),F(i.isLoading()?5:-1),h(3),O("ngTemplateOutlet",n)("ngTemplateOutletContext",Q(15,ze,Q(13,ot,i.treeStructure()))),h(2),F(!i.accepts()&&!i.isByBackupSettings()?10:-1),h(),F(i.enableCreateFolder()?11:-1),h(),y("hidden",i.pathDiscoveryMethod()!=="path"),h(5),F(i.createFolderDialogOpen()?17:-1)}},dependencies:[Ie,Re,ke,xe,te,Le,Ae,we,Fe,ee,U,Y,Z],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;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].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%]{width:1.5rem}.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.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}'],changeDetection:0})};export{Ye as a,Ze as b,Ge as c,ae as d};
|
|
1
|
+
import{a as We}from"./chunk-QLUEDPL4.js";import{a as Ve}from"./chunk-ZQ56M63S.js";import{b as $e}from"./chunk-P7OKMMNZ.js";import{A as Re,B as Ie,G as te,I as Le,K as Ae,O as Be,V as ke,a as Oe,c as U,e as Y,i as Z,k as ye,s as ee,u as xe,y as we,z as De}from"./chunk-HJSCQF6V.js";import{ea as Fe}from"./chunk-3ADKRLYD.js";import{$b as q,Ab as _e,Ac as Ne,B as ue,Bb as O,Bc as Q,Cb as c,Cc as ve,Db as d,Eb as X,H as ie,Jc as Se,Kb as ne,Lb as L,Qc as D,Ra as h,Rc as R,Sb as ge,Tb as fe,Ub as A,Vb as me,Vc as se,Wb as Ce,Wc as C,Xc as le,Yb as x,_ as j,_b as u,ac as w,bb as J,da as N,ea as v,fc as oe,gb as W,gc as Te,hc as re,ic as K,jc as y,mc as b,n as ce,nc as Ee,oa as P,oc as Pe,pc as be,r as H,rc as B,sc as k,tb as pe,tc as $,wb as S,x as de,xb as F,zb as he,zc as Me}from"./chunk-Y7PHGRGB.js";import{a as G,b as z}from"./chunk-EUDKD2JW.js";var qe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Ke=["label","[prefix]","[suffix]"];function Qe(o,t){if(o&1&&b(0),o&2){let e=t.$implicit,i=u();be("",e.label,"",i.hasPerSecond()?"/s":"")}}var Ue=["throttle-upload","throttle-download"],Ye=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],Ze=o=>{if(!o||typeof o!="string"||o.length===0)return{size:0,unit:"MB"};let t=o.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"}},Ge=class o{customId=C();inputType=C();timespan=P(0);unit=P("MB");sizeOptions=P(Ye);readonly=P(!1);hasPerSecond=D(()=>{let t=this.inputType();return t&&Ue.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=R(()=>{this.onChange(this.getValue())});writeValue(t){if(t){let e=Ze(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||o)};static \u0275cmp=J({type:o,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[Me([{provide:Oe,useExisting:o,multi:!0}])],ngContentSelectors:Ke,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,i){e&1&&(q(qe),c(0,"div",0),w(1,0,["ngProjectAs","label",5,["label"]]),d(),c(2,"sh-form-field")(3,"input",1),$("ngModelChange",function(r){return k(i.timespan,r)||(i.timespan=r),r}),d(),w(4,1),w(5,2),d(),c(6,"sh-select",2)(7,"input",3),$("ngModelChange",function(r){return k(i.unit,r)||(i.unit=r),r}),d(),W(8,Qe,1,2,"ng-template"),d()),e&2&&(h(2),pe("readonly",i.readonly()||void 0),h(),O("id",i.customId()),B("ngModel",i.timespan),O("disabled",i.readonly()),h(3),K("--miw",0),O("options",i.sizeOptions())("readonly",i.readonly())("isClearable",!1),h(),B("ngModel",i.unit))},dependencies:[Be,te,ee,U,ye,Y,Z],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}'],changeDetection:0})};var et=["treeContainer"],tt=["formRef"],it=[[["label"]],[["label"]],[["input"]]],nt=["label","label","input"],ot=o=>({children:o,level:0}),ze=o=>({$implicit:o}),rt=(o,t)=>({children:o,level:t}),st=()=>({maxWidth:"700px",width:"100%"}),lt=(o,t)=>t.id;function at(o,t){if(o&1){let e=L();c(0,"sh-button-group")(1,"button",19),x("click",function(){N(e);let n=u();return v(n.pathDiscoveryMethod.set("browse"))}),A(2,4),d(),c(3,"button",19),x("click",function(){N(e);let n=u();return v(n.pathDiscoveryMethod.set("path"))}),A(4,5),d()()}if(o&2){let e=u();h(),y("active",e.pathDiscoveryMethod()==="browse"),h(2),y("active",e.pathDiscoveryMethod()==="path")}}function ct(o,t){o&1&&X(0,"sh-progress-bar",12)}function dt(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-down"),d())}function ut(o,t){o&1&&X(0,"sh-icon",24)}function pt(o,t){o&1&&(c(0,"sh-icon",24),b(1,"caret-right"),d())}function ht(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-open"),d())}function _t(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder-user"),d())}function gt(o,t){o&1&&(c(0,"sh-icon",22),b(1,"file"),d())}function ft(o,t){o&1&&(c(0,"sh-icon",22),b(1,"folder"),d())}function mt(o,t){if(o&1&&(S(0,dt,2,0,"sh-icon",24)(1,ut,1,0,"sh-icon",24)(2,pt,2,0,"sh-icon",24),S(3,ht,2,0,"sh-icon",22)(4,_t,2,0,"sh-icon",22)(5,gt,2,0,"sh-icon",22)(6,ft,2,0,"sh-icon",22)),o&2){let e=u(2).$implicit;F(e.children.length?0:e.cls==="file"?1:2),h(3),F(e.children.length?3:e.id==="%HOME%"?4:e.cls==="file"?5:6)}}function Ct(o,t){o&1&&(c(0,"sh-icon",22),b(1,"desktop-tower"),d())}function Tt(o,t){o&1&&ne(0)}function Et(o,t){if(o&1&&W(0,Tt,1,0,"ng-container",13),o&2){let e=u(2).$implicit,i=u().$implicit;u();let n=re(7);O("ngTemplateOutlet",n)("ngTemplateOutletContext",Q(5,ze,ve(2,rt,e.children,i.level+1)))}}function Pt(o,t){if(o&1){let e=L();c(0,"div",20,3),x("click",function(){N(e);let n=u().$implicit,r=u(2);return v(r.toggleNode(n.id,n))}),c(2,"div",21),S(3,mt,7,2)(4,Ct,2,0,"sh-icon",22),d(),c(5,"div",23),x("click",function(n){N(e);let r=u().$implicit,a=u(2);return v(a.toggleSelectedNode(n,r))}),b(6),d()(),S(7,Et,1,7,"ng-container")}if(o&2){let e=u().$implicit,i=u().$implicit,n=u();y("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",i.level===0),h(2),y("file",e.cls==="file"),h(),F(e.id!=="/"?3:4),h(3),Pe(" ",e.text," "),h(),F(e.children.length>0?7:-1)}}function bt(o,t){if(o&1&&S(0,Pt,8,17),o&2){let e=t.$implicit,i=u(2);F(e.hidden&&i._showHiddenNodes()||!e.hidden?0:-1)}}function Mt(o,t){if(o&1&&(c(0,"sh-list"),he(1,bt,1,1,null,null,lt),d()),o&2){let e=t.$implicit;K("padding-left",e.level*.25,"rem"),h(),_e(e.children)}}function Nt(o,t){o&1&&ne(0)}function vt(o,t){if(o&1){let e=L();c(0,"sh-toggle",25),x("click",function(){N(e);let n=u();return v(n._showHiddenNodes.set(!n._showHiddenNodes()))}),A(1,6),d()}if(o&2){let e=u();y("active",e._showHiddenNodes()),h(),me(e.showFiles()?"files":"folders"),Ce(1)}}function St(o,t){if(o&1){let e=L();c(0,"button",26),x("click",function(){N(e);let n=u();return v(n.openCreateFolderDialog())}),A(1,7),d()}if(o&2){let e=u();O("disabled",!e.isCurrentPathFolder())}}function Ft(o,t){if(o&1){let e=L();c(0,"sh-dialog",27),$("isOpenChange",function(n){N(e);let r=u();return k(r.createFolderDialogOpen,n)||(r.createFolderDialogOpen=n),v(n)}),c(1,"header",28)(2,"h2"),A(3,8),d()(),c(4,"div",29)(5,"div"),b(6," Folder will be created under "),c(7,"pre"),b(8),d()(),c(9,"sh-form-field")(10,"textarea",30),$("ngModelChange",function(n){N(e);let r=u();return k(r.createFolderPath,n)||(r.createFolderPath=n),v(n)}),d()()(),c(11,"footer",31)(12,"button",32),x("click",function(){N(e);let n=u();return v(n.closeCreateFolderDialog(!1))}),b(13,"Cancel"),d(),c(14,"button",33),x("click",function(){N(e);let n=u();return v(n.closeCreateFolderDialog(!0))}),ge(15,9),X(16,"sh-icon"),fe(),d()()()}if(o&2){let e,i=u();B("isOpen",i.createFolderDialogOpen),O("options",Ne(5,st)),h(8),Ee(i.currentPath()),h(2),B("ngModel",i.createFolderPath),h(4),O("disabled",!((e=i.createFolderPath())!=null&&e.length))}}var He=(r=>(r[r.ExcludedByParent=-2]="ExcludedByParent",r[r.Excluded=-1]="Excluded",r[r.None=0]="None",r[r.Included=1]="Included",r[r.IncludedByParent=2]="IncludedByParent",r))(He||{}),M="/",ae=class o{#t=j($e);#n=j(Ve);#c=j(De);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPaths=C([]);initialNodes=C([]);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);enableCreateFolder=C(!1);hideShortcuts=C(!1);includes=se();excludes=se();_showHiddenNodes=P(!1);createFolderDialogOpen=P(!1);createFolderPath=P(null);treeContainerRef=le("treeContainer");formRef=le("formRef");pathDiscoveryMethod=P("browse");isLoading=P(!1);currentPath=P("/");#o=P(null);treeSearchQuery=P("");treeNodes=P([]);pathDelimiter=D(()=>this.#n.systemInfo()?.DirectorySeparator??"");filterGroups=this.#n.filterGroups();isByBackupSettings=D(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=D(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=He;treeStructure=D(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(l=>l!==""&&l!==M),i=structuredClone(e);for(let l=0;l<i.length;l++){let m=i[l].slice(1);if(m.startsWith("{")&&m.endsWith("}")){let _=m.slice(1,-1),g=this.filterGroups?.FilterGroups[_];if(g&&g.length){let T=g.map(E=>`-${E}`);i.splice(l,1,...T)}}}let n=this.searchableTreeNodes(),r=this.rootPaths(),a=this.accepts(),f=this.pathDelimiter(),s=[];return r.length>0?s=r.map(l=>{let p=this.#r(i,l,"folder",null);return{id:l,resolvedpath:l,text:l,parentPath:"",children:[],evalState:p,isIndeterminate:!1,cls:this.#e(l,f)?"folder":"file"}}):s=[{id:M,resolvedpath:M,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}],s.map(l=>{let p=new Map;if(!l.id)return;let m=l.id;a&&(l.accepted=!0),p.set(m,l);let _=r.length>0?n.filter(g=>g.parentPath.startsWith(m)):n;for(let g of _){if(!g.id)continue;let T=g.id;if(!g.cls||p.has(T))continue;let E=p.get(g.parentPath),V=g.hidden===!0&&t?0:this.#r(i,T,g.cls,E),I=z(G({},g),{isIndeterminate:this.isIndeterminate(i,T),evalState:V,children:[]});a&&(I.accepted=this.matchAccepts(a,I)),p.set(T,I),E&&E.children.push(I)}return l}),s});#d(t){let e=this.pathDelimiter();return t?t.endsWith(e)||t===M?t:t+e:M}#r(t,e,i,n){if(n&&n.evalState===-1)return-2;let r=0,a=this.pathDelimiter(),f=t.filter(p=>!p.startsWith("-")&&!p.startsWith("+")),s=t.filter(p=>p.startsWith("-")||p.startsWith("+")),l=this.multiSelect();if(f.length===0)return r;for(let p=0;p<f.length;p++){let m=f[p];if(e===m){r=1;break}if(!l||!this.#e(m,a))continue;if(e?.startsWith(m)){r=1;break}}if(s.length===0)return r;for(let p=0;p<s.length;p++){let m=s[p],_=m.slice(1),g=m.startsWith("-")?-1:1;if(this.#e(_,a)){if(i!=="folder")continue;if(e===_){r=g;break}}if(_.startsWith("*")&&_.endsWith(`*${a}`)){if(i!=="folder")continue;let E=_.slice(1,-2);if(E==="")break;if(e?.includes(E+a)){r=g;break}}if(_.startsWith("[.*")&&_.endsWith(`[^\\${a}]*]`)){if(i!=="file")continue;let E=_.slice(3,-7);if(new RegExp(E).test(e)){r=g;break}}if(_.startsWith("[")&&_.endsWith("]")){let E=_.slice(1,-1),V=this.translateCSharpRegex(E);if(new RegExp(`${V}`).test(e)){r=g;break}}if(_.startsWith("*.")){if(i!=="file"||_.replace("*.","").length===0)continue;if(this.#s(e,_,!0)){r=g;break}}if(_==="")continue;if(_===e){r=g;break}if(this.#s(e,_,!0)){r=g;break}}return r}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let i=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(i,(n,r,a)=>`(${a})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(i=>!i.startsWith("-")&&this.#e(i,this.pathDelimiter())).some(i=>i.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith(this.pathDelimiter())||t.startsWith("%")&&t.endsWith("%")&&!t.includes(this.pathDelimiter()):!1}#s(t,e,i=!1){let n=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${n}${i?"$":""}`).test(t)}showHiddenNodesEffect=R(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=R(()=>{let t=this.pathDiscoveryMethod(),e=this.#o();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===M)return!0;let i=t.split(",");if(i.length===0)return!0;let n="."+e.id.slice(e.id.indexOf("."));return n?i.some(r=>n.endsWith(r)):!1}currentPathEffect=R(()=>{let t=this.#o();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=R(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#u(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.#o.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#_(t);else{let e=this.rootPaths(),i=this.initialNodes();e&&e.length>0?(i&&i.length>0&&this.treeNodes.set(i.map(n=>({id:n.id,leaf:n.leaf,cls:n.cls,text:n.text,iconCls:n.iconCls,fileSize:n.fileSize,resolvedpath:n.resolvedpath,parentPath:this.getParentPath(n.id??"")}))),this.#i(null,e[0])):this.#i(null,M)}}getParentPath(t){let e=this.pathDelimiter(),i=t.split(e);return i.length<=1?M:(i.pop(),i.length!==0&&i.pop(),i.join(e)+e)}toggleSelectedNode(t,e){if(e.id===M||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let n=this.currentPath().split("\0").filter(s=>s!==""&&s!==M),a=this.isChildOfSelected(e)?`-${e.id}`:e.id,f=this.#e(e.id,this.pathDelimiter());if(this.multiSelect())if(n.includes(e.id))this.currentPath.set(n.filter(s=>s!==e.id&&!(f&&s.startsWith(a))).join("\0"));else if(n.some(s=>s==a))this.currentPath.set(n.filter(s=>s!==a).join("\0"));else{let s=f?n.filter(l=>!l.startsWith(e.id)):n;this.currentPath.set([...s,a].join("\0"))}else n.includes(e.id)?this.currentPath.set(n.filter(s=>s!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(i=>i!==""&&i!==M&&this.#e(i,this.pathDelimiter())).some(i=>t.id?.startsWith(i)||`-${t.id}`.startsWith(i))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(i=>i.filter(n=>!n.id?.startsWith(e.id)||n.id===e.id)):this.#i(e,t))}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(!0),!1}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let i=this.currentPath(),n=this.#d(e),r=i+n;this.#t.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+r}}).subscribe({next:()=>{this.currentPath.set(r),this.#i(null,i),setTimeout(()=>{this.#l()},500),this.createFolderDialogOpen.set(!1)},error:a=>{let f=a?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),s=f?f[1]:a?.message||$localize`An error occurred while trying to create the folder.`;this.#c.open(We,{data:{title:$localize`Cannot create folder`,message:s,confirmText:$localize`OK`,cancelText:void 0}})}})}}else this.createFolderDialogOpen.set(!1);return!1}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#u(t){return Object.defineProperty(t,"value",{configurable:!0,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:!0,cancelable:!0,detail:{value:e}})),e}}),t}#p(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#h(t){let e=this.backupSettings();if(this.#n.hasV2ListOperations())return this.#t.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0}}).pipe(H(i=>i.Data??[]));{let i={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(i).pipe(H(n=>n.Files??[]))}}#a(t){return this.isByBackupSettings()?this.#h(t):this.#p(t)}#_(t){let e=this.pathDelimiter(),i=t.split("\0").filter(s=>s.startsWith("-")).map(s=>s.slice(1,-1)),r=t.split("\0").filter(s=>!s.startsWith("-")).filter(Boolean).map(s=>{let l=s.split(e);return l.at(-1)!==""&&l.pop(),l}),a=[M];r.forEach(s=>{s.forEach((l,p)=>{let m=s.slice(0,p+1).join(e);m!==""&&(a.includes(m)||a.push(m))})}),this.isLoading.set(!0);let f=a.map(s=>this.#a(s).pipe(H(l=>({status:"success",value:l,url:s})),ue(l=>ce({status:"error",value:l,url:s}))));de(f).pipe(ie(()=>this.isLoading.set(!1))).subscribe({next:s=>{let l=s.filter(m=>m.status==="success"),p=s.filter(m=>m.status==="error");this.treeNodes.update(m=>{let _=l.flatMap(T=>Array.isArray(T.value)?T.value.map(E=>z(G({},E),{parentPath:T.url})):[]),g=[...new Map([...m,..._].map(T=>[T.id,T])).values()];return this.#l(),this.hideShortcuts()?g.filter(T=>!T.id.startsWith("%")):g})}})}#e(t,e){return t.startsWith("%")&&t.endsWith("%")||t.endsWith(e)}#i(t=null,e=M){let i=this.pathDelimiter();this.isLoading.set(!0),this.#a(e).pipe(ie(()=>this.isLoading.set(!1))).subscribe({next:n=>{let r=this.isByBackupSettings()?n.map(a=>({text:a.Path.split(i).filter(f=>f!=="").pop(),id:a.Path,cls:this.#e(a.Path,i)?"folder":"file",leaf:t!==null,resolvedpath:a.Path,hidden:!1})):n;this.treeNodes.update(a=>{let f=r.map(l=>{let p=this.#e(l.id,i)?"folder":"file";return z(G({},l),{cls:p,parentPath:e})}),s=[...new Map([...a,...f].map(l=>[l.id,l])).values()];return this.hideShortcuts()?s.filter(l=>!l.id.startsWith("%")):s})}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=J({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,i){e&1&&(oe(i.treeContainerRef,et,5),oe(i.formRef,tt,5)),e&2&&Te(2)},hostVars:2,hostBindings:function(e,i){e&2&&y("disabled",i.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],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"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:nt,decls:18,vars:17,consts:()=>{let t;t=$localize` Browse path `;let e;e=$localize` Manually type path `;let i;i=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let n;n=$localize` Create folder `;let r;r=$localize`Enter new folder path`;let a;return a=$localize` Create folder ${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,i,n,r,a,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"active"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"isOpen","options"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,i){if(e&1&&(q(it),S(0,at,5,4,"sh-button-group"),c(1,"div",10),w(2,0,["ngProjectAs","label",5,["label"]]),c(3,"div",11,0),S(5,ct,1,0,"sh-progress-bar",12),W(6,Mt,3,2,"ng-template",null,1,Se)(8,Nt,1,0,"ng-container",13),d(),c(9,"div",14),S(10,vt,2,3,"sh-toggle",15),S(11,St,2,1,"button",16),d()(),c(12,"div",17,2)(14,"sh-form-field"),w(15,1,["ngProjectAs","label",5,["label"]]),w(16,2,["ngProjectAs","input",5,["input"]]),d()(),S(17,Ft,17,6,"sh-dialog",18)),e&2){let n=re(7);F(i.multiSelect()?-1:0),h(),y("hidden",i.pathDiscoveryMethod()!=="browse"),h(2),y("visualize-accepted",i.accepts()),h(2),F(i.isLoading()?5:-1),h(3),O("ngTemplateOutlet",n)("ngTemplateOutletContext",Q(15,ze,Q(13,ot,i.treeStructure()))),h(2),F(!i.accepts()&&!i.isByBackupSettings()?10:-1),h(),F(i.enableCreateFolder()?11:-1),h(),y("hidden",i.pathDiscoveryMethod()!=="path"),h(5),F(i.createFolderDialogOpen()?17:-1)}},dependencies:[Ie,Re,ke,xe,te,Le,Ae,we,Fe,ee,U,Y,Z],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;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].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%]{width:1.5rem}.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.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}'],changeDetection:0})};export{Ye as a,Ze as b,Ge as c,ae as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-X7XIFHAV.js";import{b as m}from"./chunk-P7OKMMNZ.js";import{B as d,F as o,H as p,R as h,Rc as l,V as N,_ as r,n as c,oa as s,x as f}from"./chunk-Y7PHGRGB.js";var b=class a{#e=r(m);#o=r(u);serverState=this.#o.serverState;serverStateEffect=l(()=>{let t=this.#o.serverState();t?.LastNotificationUpdateID&&this.updateLastNotificationEventId(t?.LastNotificationUpdateID)});#s=-1;#a=s(!1);#t=s([]);#i=s([]);notifications=this.#t.asReadonly();init(){this.notifications().length===0&&this.getNotifications()}updateLastNotificationEventId(t){this.#s!==t&&(this.#s=t,this.getNotifications())}getNotifications(){this.#a.set(!0),this.#e.getApiV1Notifications().pipe(o(1),h(t=>this.#t.set(t)),p(()=>this.#a.set(!1))).subscribe()}getNofication(t){this.#e.getApiV1NotificationById({id:t}).pipe(o(1)).subscribe()}deleteNotification(t){let i=this.#t(),e=i[t];this.#i.set(i),i.splice(t,1),this.#t.set(i),this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(o(1)).subscribe({error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}deleteAllNotifications(){let t=this.#t();this.#i.set(t),this.#t.set([]);let i=t.map(e=>this.#e.deleteApiV1NotificationById({id:e.ID}).pipe(d(()=>c(e))));f(i).pipe(o(1)).subscribe({next:e=>{let g=e.filter(n=>n!=null&&"ID"in n);this.#t.set(g),this.#i.set([])},error:()=>{this.#t.set(this.#i()),this.#i.set([])}})}static \u0275fac=function(i){return new(i||a)};static \u0275prov=N({token:a,factory:a.\u0275fac,providedIn:"root"})};export{b as a};
|