nucliadb-admin-assets 1.0.0.post2006__py3-none-any.whl → 1.0.0.post2012__py3-none-any.whl

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.

Potentially problematic release.


This version of nucliadb-admin-assets might be problematic. Click here for more details.

@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunknucliadb_admin=self.webpackChunknucliadb_admin||[]).push([[789],{1789:(En,B,a)=>{a.r(B),a.d(B,{SYNC_ROUTES:()=>$n});var e=a(4438),g=a(177),S=a(6489),I=a(1413),le=a(1584),f=a(5964),p=a(5558),M=a(6977);const v="assets/connector-logos";var k=function(o){return o.PENDING="PENDING",o.PROCESSING="PROCESSING",o.UPLOADED="UPLOADED",o.ERROR="ERROR",o}(k||{}),x=a(4412),h=a(7673),y=a(8141),b=a(6697),u=a(6354),O=a(9437),C=a(2542);const pe={id:"sitemap",title:"Sitemap",logo:`${v}/sitemap.svg`,description:"Upload web pages from a sitemap.xml",permanentSyncOnly:!0,factory:()=>new ue};class ue{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"Sitemap",originalId:"SITEMAP",metadata:{},status:k.PENDING}]}getParametersSections(){return(0,h.of)([{id:"url",title:"sync.connectors.sitemap.url.section-title",fields:[{id:"sitemap",label:"sync.connectors.sitemap.url.label",type:"text",required:!0,pattern:/.+\.(ashx|xml)/,placeholder:"https://my-website.com/sitemap.xml"}]},{id:"restrict-indexation",title:"sync.connectors.common.restrict-indexation.title",description:"sync.connectors.common.restrict-indexation.description",badge:"generic.badge.optional",fields:[{id:"cssSelector",label:"sync.connectors.common.css.label",help:"sync.connectors.common.css.help",type:"text",required:!1,placeholder:".main-content"},{id:"xpathSelector",label:"sync.connectors.common.xpath.label",help:"sync.connectors.common.xpath.help",type:"text",required:!1,placeholder:'//div[@id="main"]'}]},{id:"web-scraping-helpers",title:"sync.connectors.common.web-scraping-helpers.title",description:"sync.connectors.common.web-scraping-helpers.description",badge:"generic.badge.advanced",fields:[{id:"localExtract",label:"sync.connectors.common.local-extract.label",help:"sync.connectors.common.local-extract.help",type:"boolean",required:!1},{id:"headers",label:"sync.connectors.common.headers.label",help:"sync.connectors.common.headers.help",type:"table",required:!1},{id:"cookies",label:"sync.connectors.common.cookies.label",help:"sync.connectors.common.cookies.help",type:"table",required:!1},{id:"localstorage",label:"sync.connectors.common.localstorage.label",help:"sync.connectors.common.localstorage.help",type:"table",required:!1}]}])}handleParameters(s){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,h.of)(!0)}}const me={id:"folder",title:"Folder",logo:`${v}/folder.svg`,description:"Upload a folder from your device",factory:()=>new he};class he{constructor(){this.hasServerSideAuth=!1,this.isExternal=!1,this.allowToSelectFolders=!1,this.files=[],this.path="",this.canSyncSecurityGroups=!1}getStaticFolders(){return this.path?[{uuid:"",title:this.path,originalId:this.path,metadata:{},status:k.PENDING}]:[]}getParametersSections(){return(0,h.of)([{id:"local-path",title:"sync.connectors.folder.local-path.title",description:"sync.connectors.folder.local-path.description",fields:[{id:"path",label:"sync.connectors.folder.local-path.field-label",placeholder:"/Users/alice/Documents or C:\\Users\\Alice\\Documents",type:"text",required:!0}]}])}goToOAuth(){}cleanAuthData(){throw new Error("Method not implemented.")}handleParameters(s){s.path&&(this.path=s.path)}getParametersValues(){return{path:this.path}}authenticate(){return(0,h.of)(!0)}}const D="token",w="refresh";class N{constructor(s,t,n){this.hasServerSideAuth=!0,this.isExternal=!0,this.allowToSelectFolders=!0,this.resumable=!1,this.isAuthenticated=new x.t(!1),this.canSyncSecurityGroups="gdrive"===s,this.name=s,this.id=t,this.path=n}getParametersSections(){return(0,h.of)([])}handleParameters(s){}getParametersValues(){return{token:localStorage.getItem(this.prefixStorageKey(D)),refresh:localStorage.getItem(this.prefixStorageKey(w)),refresh_endpoint:`${this.path}/api/external_auth/${this.name}/refresh`}}cleanAuthData(){localStorage.removeItem(this.prefixStorageKey(D)),localStorage.removeItem(this.prefixStorageKey(w))}goToOAuth(s,t){if(t&&this.cleanAuthData(),localStorage.getItem(this.prefixStorageKey(D)))this.isAuthenticated.next(!0);else{const i=`${this.path}/api/external_auth/${this.name}/authorize`;window.electron?window.electron.openExternal(`${i}?redirect=nuclia-desktop://index.html`):location.href=`${i}?redirect=${s}`}}authenticate(){if(!this.isAuthenticated.getValue()){const s=setInterval(()=>{const t=function _e(){let o=location.search;if(!o&&location.href.includes("#")){const s=location.href.split("#")[1];o=s.includes("?")?"?"+s.split("?")[1]:"?"+s}return o&&o.includes("#")&&!o.includes("?")&&(o=o.replace("#","?")),o}();if(t&&t.includes("?")){const n=new URLSearchParams(t.split("?")[1]),i=n.get("token")||"",c=n.get("refresh")||"";clearInterval(s),i?(localStorage.setItem(this.prefixStorageKey(D),i),localStorage.setItem(this.prefixStorageKey(w),c||""),this.isAuthenticated.next(!0)):this.isAuthenticated.next(!1)}},500)}return this.isAuthenticated.asObservable()}prefixStorageKey(s){return`${this.name}-${this.id}-${s}`}getStaticFolders(){return[]}}const Y="SHAREPOINT_SITE_NAME";class ge extends N{constructor(s,t,n){super(s,t,n)}getParametersSections(){return(0,h.of)([{id:"account",title:"sync.connectors.sharepoint.account.title",fields:[{id:"site_name",label:"sync.connectors.sharepoint.site.label",type:"text",required:!0}]}])}handleParameters(s){localStorage.setItem(Y,s.site_name)}getParametersValues(){return{...super.getParametersValues(),site_name:localStorage.getItem(Y)}}}const fe={id:"confluence",title:"Confluence",logo:`${v}/confluence.svg`,description:"Collaboration platform developed by Atlassian",helpUrl:"https://docs.nuclia.dev/docs/docs/using/sync-agent#confluence-connector-usage",deprecated:!0,factory:()=>new ye},L="CONFLUENCE_TOKEN";class ye{constructor(){this.hasServerSideAuth=!1,this.isExternal=!1,this.allowToSelectFolders=!0,this.canSyncSecurityGroups=!1}getParametersSections(){return(0,h.of)([{id:"account",title:"sync.connectors.confluence.account.title",description:"sync.connectors.confluence.account.description",fields:[{id:"url",label:"sync.connectors.confluence.url.label",type:"text",placeholder:"https://my-site.atlassian.net/wiki",required:!0},{id:"user",label:"sync.connectors.confluence.user.label",type:"text",placeholder:"me@mycompany.com",required:!0},{id:"token",label:"sync.connectors.confluence.token.label",type:"text",required:!0}]}])}handleParameters(s){localStorage.setItem(L,s.token)}getParametersValues(){return{token:localStorage.getItem(L)}}goToOAuth(s,t){return(0,h.of)(!0)}cleanAuthData(){throw new Error("Method not implemented.")}authenticate(){return(0,h.of)(!!this.getParametersValues().token)}getStaticFolders(){return[]}}const be={id:"rss",title:"RSS",logo:`${v}/rss.svg`,description:"Upload web pages from a RSS feed",permanentSyncOnly:!0,factory:()=>new Ce};class Ce{constructor(){this.hasServerSideAuth=!1,this.isExternal=!0,this.allowToSelectFolders=!1,this.canSyncSecurityGroups=!1}getStaticFolders(){return[{uuid:"",title:"RSS",originalId:"rss",metadata:{},status:k.PENDING}]}getParametersSections(){return(0,h.of)([{id:"url",title:"sync.connectors.rss.url.label",fields:[{id:"url",label:"sync.connectors.rss.url.label",type:"text",required:!0,placeholder:"https://rss-feed-url"}]},{id:"restrict-indexation",title:"sync.connectors.common.restrict-indexation.title",description:"sync.connectors.common.restrict-indexation.description",badge:"generic.badge.optional",fields:[{id:"cssSelector",label:"sync.connectors.common.css.label",help:"sync.connectors.common.css.help",type:"text",required:!1,placeholder:".main-content"},{id:"xpathSelector",label:"sync.connectors.common.xpath.label",help:"sync.connectors.common.xpath.help",type:"text",required:!1,placeholder:'//div[@id="main"]'}]},{id:"web-scraping-helpers",title:"sync.connectors.common.web-scraping-helpers.title",description:"sync.connectors.common.web-scraping-helpers.description",badge:"generic.badge.advanced",fields:[{id:"localExtract",label:"sync.connectors.common.local-extract.label",help:"sync.connectors.common.local-extract.help",type:"boolean",required:!1},{id:"headers",label:"sync.connectors.common.headers.label",help:"sync.connectors.common.headers.help",type:"table",required:!1},{id:"cookies",label:"sync.connectors.common.cookies.label",help:"sync.connectors.common.cookies.help",type:"table",required:!1},{id:"localstorage",label:"sync.connectors.common.localstorage.label",help:"sync.connectors.common.localstorage.help",type:"table",required:!1}]}])}handleParameters(s){}cleanAuthData(){throw new Error("Method not implemented.")}getParametersValues(){return{}}goToOAuth(){}authenticate(){return(0,h.of)(!0)}}var Se=a(5512),ve=a(1626);const J="http://localhost:8090",Q="NUCLIA_SYNC_SERVER",W="NUCLIA_SYNC_SERVER_TYPE";let $=(()=>{class o{constructor(t,n,i,c){this.sdk=t,this.http=n,this.config=i,this.notificationService=c,this.connectors={gdrive:{definition:{id:"gdrive",title:"Google Drive",logo:`${v}/gdrive.svg`,description:"File storage and synchronization service developed by Google",permanentSyncOnly:!0,deprecated:!0,factory:d=>new N("gdrive",d?.id||"",this.config.getOAuthServer())}},onedrive:{definition:{id:"onedrive",title:"One Drive",logo:`${v}/onedrive.svg`,description:"Microsoft OneDrive file hosting service",permanentSyncOnly:!0,deprecated:!0,factory:d=>new N("onedrive",d?.id||"",this.config.getOAuthServer())}},sharepoint:{definition:{id:"sharepoint",title:"SharePoint",logo:`${v}/sharepoint.svg`,description:"Microsoft Sharepoint service",permanentSyncOnly:!0,deprecated:!0,factory:d=>new ge("sharepoint",d?.id||"",this.config.getOAuthServer())}},dropbox:{definition:{id:"dropbox",title:"Dropbox",logo:`${v}/dropbox.svg`,description:"File storage and synchronization service developed by Dropbox",permanentSyncOnly:!0,deprecated:!0,factory:d=>new N("dropbox",d?.id||"",this.config.getOAuthServer())}},folder:{definition:me},sitemap:{definition:pe},confluence:{definition:fe},rss:{definition:be}},this.connectorsObs=new x.t(Object.values(this.connectors).map(d=>d.definition).filter(d=>!d.deprecated)),this._syncServer=new x.t({serverUrl:localStorage.getItem(Q)||J,type:localStorage.getItem(W)||"desktop"}),this.syncServer=this._syncServer.asObservable(),this._isServerDown=new x.t(!0),this._currentSyncId=new x.t(null),this._syncCache=new x.t({}),this._cacheUpdated=new x.t((new Date).toISOString()),this._isSyncing=new x.t({}),this.isServerDown=this._isServerDown.asObservable(),this.currentSyncId=this._currentSyncId.asObservable(),this.serverHeaders={token:this.sdk.nuclia.auth.getToken(!0)},this.cacheUpdated=this._cacheUpdated.asObservable(),this.isSyncing=this._isSyncing.asObservable()}getConnectorDefinition(t){return this.connectors[t]?.definition}getConnector(t,n){const i=this.connectors[t];i.instances||(i.instances={});const c=i.instances;return c[n]||(c[n]=i.definition.factory({id:n})),c[n]}getCurrentSync(){return this.currentSyncId.pipe((0,f.p)(t=>!!t),(0,p.n)(t=>this.getSync(t)))}getSync(t){const n=this._syncCache.getValue();return n[t]?(0,h.of)(n[t]):this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${t}`,{headers:this.serverHeaders}).pipe((0,y.M)(i=>{n[t]=i,this._syncCache.next(n)}))}addSync(t){return this.sdk.currentKb.pipe((0,b.s)(1),(0,p.n)(n=>this.sdk.nuclia.options.standalone?(0,h.of)({...t,kb:{...this.sdk.nuclia.options,knowledgeBox:n.id}}):this.getNucliaKey(n).pipe((0,u.T)(i=>({...t,kb:{zone:this.sdk.nuclia.options.zone,backend:this.sdk.nuclia.options.backend,knowledgeBox:i.kbid,apiKey:i.token}})))),(0,p.n)(n=>this.http.post(`${this._syncServer.getValue().serverUrl}/sync`,n,{headers:this.serverHeaders})),(0,y.M)(()=>{const n=this._syncCache.getValue();n[t.id]=t,this._syncCache.next(n),this._cacheUpdated.next((new Date).toISOString())}),(0,u.T)(()=>{}))}updateSync(t,n,i){return this.http.patch(`${this._syncServer.getValue().serverUrl}/sync/${t}`,{...n,lastSyncGMT:i?"1970-01-01":void 0},{headers:this.serverHeaders}).pipe((0,y.M)(()=>{const c=this._syncCache.getValue();c[t]={...c[t],...n},this._syncCache.next(c),this._cacheUpdated.next((new Date).toISOString())}))}deleteSync(t){return this.http.delete(`${this._syncServer.getValue().serverUrl}/sync/${t}`,{headers:this.serverHeaders}).pipe((0,y.M)(()=>{const n=this._syncCache.getValue();delete n[t],this._syncCache.next(n),this._cacheUpdated.next((new Date).toISOString())}))}hasCurrentSourceAuth(){return this.getCurrentSyncId()?this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/auth`).pipe((0,u.T)(n=>n.hasAuth)):(0,h.of)(!1)}getSyncsForKB(t){return this.isServerDown.pipe((0,p.n)(n=>n?(0,h.of)([]):this.http.get(`${this._syncServer.getValue().serverUrl}/sync/kb/${t}`).pipe((0,u.T)(i=>i.map(c=>({...c,kbId:t,connectorId:c.connector,connector:this.getConnector(c.connector,"")})).filter(c=>c.kbId===t)))))}getFiles(t){return this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/files/search${t?`?query=${t}`:""}`)}getFolders(t){return this.http.get(`${this._syncServer.getValue().serverUrl}/sync/${this.getCurrentSyncId()}/folders`,{headers:this.serverHeaders})}canSelectFiles(t){const n=this._syncCache.getValue()[t];return n&&!("sitemap"===n.connector.name||"folder"===n.connector.name||"rss"===n.connector.name)}getNucliaKey(t){return t.createKeyForService({title:"Sync",role:"SCONTRIBUTOR"},this.getExpirationDate()).pipe((0,u.T)(n=>({...n,kbid:t.id})))}getExpirationDate(){const t=new Date;return t.setFullYear(t.getFullYear()+1),Math.floor(t.getTime()/1e3).toString()}serverStatus(t){return this.http.get(`${t}/status`).pipe((0,O.W)(()=>(0,h.of)({running:!1,logs:["Server down"]})),(0,u.T)(n=>((n.logs||[]).forEach(i=>console.log("[SERVER]",i)),{running:n.running})))}setSyncServer(t,n){localStorage.setItem(Q,t||""),localStorage.setItem(W,n),this._syncServer.next({serverUrl:t||"",type:n}),t&&this.serverStatus(t).subscribe(i=>{this.setServerStatus(!i.running)})}authenticateToConnector(t,n){return n.authenticate().pipe((0,f.p)(i=>i),(0,b.s)(1),(0,p.n)(()=>this.updateSync(this.getCurrentSyncId()||"",{connector:{name:t,parameters:n.getParametersValues()}})),(0,u.T)(()=>(n.cleanAuthData(),!0)))}getCurrentSyncId(){return this._currentSyncId.getValue()}setCurrentSyncId(t){this._currentSyncId.next(t)}clearCurrentSourceId(){this._currentSyncId.next(null)}getLogs(t,n){return this.http.get(`${this._syncServer.getValue().serverUrl}/logs${t?"/"+t:""}${n?"/"+n:""}`).pipe((0,u.T)(i=>i.sort((c,d)=>{const T=(0,Se.T)(c.createdAt,d.createdAt);return 0===T?c.action.startsWith("start")?1:-1:T})))}clearLogs(){return this.http.delete(`${this._syncServer.getValue().serverUrl}/logs`)}getSyncServer(){return this._syncServer.getValue().serverUrl}setServerStatus(t){t&&!this._isServerDown.value&&this.notificationService.pushNotifications([{type:"sync-server",data:[],timestamp:(new Date).toISOString(),unread:!0,failure:!0}]),this._isServerDown.next(t)}triggerSync(t,n=!1){return this._isSyncing.next({...this._isSyncing.value,[t]:!0}),(n?this.updateSync(t,{},!0).pipe((0,u.T)(()=>!0)):(0,h.of)(!0)).pipe((0,p.n)(()=>this.http.get(`${this._syncServer.getValue().serverUrl}/sync/execute/${t}`)),(0,y.M)(()=>this._isSyncing.next({...this._isSyncing.value,[t]:!1})),(0,O.W)(c=>(console.warn("Trigger sync failed:",c),this._isSyncing.next({...this._isSyncing.value,[t]:!1}),(0,h.of)())))}static{this.\u0275fac=function(n){return new(n||o)(e.KVO(C.ok),e.KVO(ve.Qq),e.KVO(C.M),e.KVO(C.JE))}}static{this.\u0275prov=e.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})(),xe=(()=>{class o{constructor(){this.unsubscribeAll=new I.B,this.syncService=(0,e.WQX)($)}ngOnInit(){let t=!1,n=0;(0,le.O)(0,5e3).pipe((0,f.p)(()=>{const c=n>=(t?12:0);return n++,c}),(0,p.n)(()=>this.syncService.serverStatus(this.syncService.getSyncServer())),(0,M.Q)(this.unsubscribeAll)).subscribe(i=>{t=i.running,n=0,this.syncService.setServerStatus(!t)})}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],decls:1,vars:0,template:function(n,i){1&n&&e.nrm(0,"router-outlet")},dependencies:[g.MD,S.n3],encapsulation:2,changeDetection:0})}}return o})();var r=a(671),Te=a(9874),E=a(4929);let Fe=(()=>{class o{constructor(){this.title="",this.logo="",this.disabled=!1,this.selectConnector=new e.bkB}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-connector"]],inputs:{title:"title",logo:"logo",disabled:[2,"disabled","disabled",e.L39]},outputs:{selectConnector:"selectConnector"},features:[e.GFd],decls:5,vars:3,consts:[[3,"cardClick","disabled"],[1,"connector"],["size","large",3,"path"]],template:function(n,i){1&n&&(e.j41(0,"pa-card",0),e.bIt("cardClick",function(d){return i.selectConnector.emit(d)}),e.j41(1,"div",1),e.nrm(2,"pa-icon",2),e.j41(3,"div"),e.EFF(4),e.k0s()()()),2&n&&(e.Y8G("disabled",i.disabled),e.R7$(2),e.Y8G("path",i.logo),e.R7$(2),e.JRh(i.title))},dependencies:[g.MD,r.ALJ,Te.i,r.V3x,E.R],styles:['@charset "UTF-8";.connector[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:.5rem;width:6rem}'],changeDetection:0})}}return o})();var _=a(8018),m=a(2938),l=a(9417),P=a(3606),Ie=a(820),H=a(6812),X=a(3085),A=a(4899),Re=a(7481),Me=a(3257),ke=a(6010),z=a(5472),K=a(9435),Z=a(3107),$e=a(7839),Ee=a(4099),q=a(4684),Pe=a(9122);const ee=(o,s)=>s.id,je=()=>({section:"activity"});function Ge(o,s){1&o&&(e.j41(0,"nsi-dropdown-button",17),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"sync.home-page.setup-server.on-desktop.download-dropdown")," "))}function Oe(o,s){if(1&o&&(e.j41(0,"nsi-badge"),e.EFF(1),e.nI1(2,"translate"),e.k0s(),e.DNE(3,Ge,3,3,"nsi-dropdown-button",17)),2&o){const t=e.XpG(2);e.R7$(),e.JRh(e.bMT(2,2,"sync.badge.inactive")),e.R7$(2),e.vxM(t.downloadSyncAgentFeature?3:-1)}}function De(o,s){1&o&&(e.j41(0,"nsi-badge",16),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.badge.active")))}function Ne(o,s){if(1&o&&(e.DNE(0,Oe,4,4),e.nI1(1,"async"),e.DNE(2,De,3,3,"nsi-badge",16)),2&o){const t=e.XpG();e.vxM(e.bMT(1,1,t.inactiveServer)?0:2)}}function we(o,s){1&o&&(e.j41(0,"nsi-badge"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.badge.inactive")))}function Xe(o,s){1&o&&(e.j41(0,"nsi-badge",16),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.badge.active")))}function Ae(o,s){if(1&o&&(e.j41(0,"div",13),e.DNE(1,we,3,3,"nsi-badge"),e.nI1(2,"async"),e.DNE(3,Xe,3,3,"nsi-badge",16),e.j41(4,"pa-input",18),e.EFF(5," Server URL "),e.k0s(),e.j41(6,"pa-button",19),e.EFF(7),e.nI1(8,"translate"),e.k0s()()),2&o){const t=e.XpG();e.R7$(),e.vxM(e.bMT(2,3,t.inactiveServer)?1:3),e.R7$(5),e.Y8G("disabled",!t.serverUrlChanged),e.R7$(),e.SpI(" ",e.bMT(8,5,"generic.save")," ")}}function Ve(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsy-connector",20),e.nI1(1,"async"),e.nI1(2,"translate"),e.nI1(3,"async"),e.bIt("selectConnector",function(){const i=e.eBV(t).$implicit,c=e.XpG();return e.Njj(c.onSelectConnector(i))}),e.k0s()}if(2&o){const t=s.$implicit,n=e.XpG();e.Y8G("paTooltip",e.bMT(2,6,e.bMT(1,4,n.inactiveServer)?"sync.home-page.add-sources.disabled-source-tooltip":""))("disabled",e.bMT(3,8,n.inactiveServer))("title",t.title)("logo",t.logo)}}function Ue(o,s){1&o&&(e.j41(0,"nsi-info-card",21),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"sync.home-page.sync-list.empty-info")))}function Be(o,s){if(1&o&&(e.j41(0,"div",25),e.nrm(1,"pa-icon",33),e.EFF(2),e.k0s()),2&o){const t=s;e.R7$(),e.Y8G("path",t.logo),e.R7$(),e.SpI(" ",t.title," ")}}function Ye(o,s){if(1&o&&e.nrm(0,"pa-datetime",28),2&o){const t=e.XpG().$implicit;e.Y8G("datetime",t.lastSyncGMT)}}function Le(o,s){1&o&&e.EFF(0," \u2013 ")}function Je(o,s){if(1&o&&(e.j41(0,"pa-option",30),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("routerLink","./"+t.id+"/edit"),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.home-page.sync-list.menu.edit-folders")," ")}}function Qe(o,s){if(1&o){const t=e.RV6();e.j41(0,"pa-table-row")(1,"pa-table-cell")(2,"a",24),e.EFF(3),e.k0s()(),e.j41(4,"pa-table-cell"),e.DNE(5,Be,3,2,"div",25),e.k0s(),e.j41(6,"pa-table-cell")(7,"div",26),e.EFF(8),e.k0s()(),e.j41(9,"pa-table-cell")(10,"pa-toggle",27),e.bIt("valueChange",function(i){const c=e.eBV(t).$implicit,d=e.XpG(3);return e.Njj(d.toggleSync(c.id,i))}),e.EFF(11),e.k0s()(),e.j41(12,"pa-table-cell")(13,"div",26),e.DNE(14,Ye,1,1,"pa-datetime",28)(15,Le,1,0),e.k0s()(),e.j41(16,"pa-table-cell-menu")(17,"pa-button",29),e.EFF(18," Menu "),e.k0s(),e.j41(19,"pa-dropdown",null,0)(21,"pa-option",30),e.EFF(22),e.nI1(23,"translate"),e.k0s(),e.DNE(24,Je,3,4,"pa-option",30),e.j41(25,"pa-option",31),e.EFF(26),e.nI1(27,"translate"),e.k0s(),e.j41(28,"pa-option",32),e.bIt("selectOption",function(){const i=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.deleteSync(i))}),e.EFF(29),e.nI1(30,"translate"),e.k0s()()()()}if(2&o){let t;const n=s.$implicit,i=e.sdS(20),c=e.XpG(3);e.R7$(2),e.Y8G("routerLink","./"+n.id),e.R7$(),e.SpI(" ",n.title," "),e.R7$(2),e.vxM((t=null==c.connectors[n.connectorId]?null:c.connectors[n.connectorId].definition)?5:-1,t),e.R7$(3),e.JRh(n.totalSyncedResources),e.R7$(2),e.Y8G("value",!n.disabled),e.R7$(),e.SpI(" ",n.disabled?"Off":"On"," "),e.R7$(3),e.vxM("1970-01-01"!==n.lastSyncGMT?14:15),e.R7$(3),e.Y8G("paPopup",i),e.R7$(4),e.Y8G("routerLink","./"+n.id+"/edit"),e.R7$(),e.SpI(" ",e.bMT(23,15,"sync.home-page.sync-list.menu.edit-settings")," "),e.R7$(2),e.vxM(n.connector.allowToSelectFolders?24:-1),e.R7$(),e.Y8G("routerLink","./"+n.id)("queryParams",e.lJ4(21,je)),e.R7$(),e.SpI(" ",e.bMT(27,17,"sync.home-page.sync-list.menu.activity-logs")," "),e.R7$(3),e.SpI(" ",e.bMT(30,19,"sync.home-page.sync-list.menu.delete")," ")}}function We(o,s){if(1&o&&(e.j41(0,"pa-table",22),e.nrm(1,"pa-table-sortable-header",23),e.Z7z(2,Qe,31,22,"pa-table-row",null,ee),e.k0s()),2&o){const t=e.XpG(),n=e.XpG();e.R7$(),e.Y8G("cells",n.syncTableHeader),e.R7$(),e.Dyx(t)}}function He(o,s){1&o&&e.DNE(0,Ue,3,3,"nsi-info-card",21)(1,We,4,1,"pa-table",22),2&o&&e.vxM(0===s.length?0:1)}let ze=(()=>{class o{constructor(){this.router=(0,e.WQX)(S.Ix),this.currentRoute=(0,e.WQX)(S.nX),this.syncService=(0,e.WQX)($),this.sdk=(0,e.WQX)(C.ok),this.toaster=(0,e.WQX)(m._g),this.modalService=(0,e.WQX)(m.w8),this.translate=(0,e.WQX)(_.c$),this.unsubscribeAll=new I.B,this.downloadSyncAgentFeature=!1,this.inactiveServer=this.syncService.isServerDown,this.syncAgentForm=new l.gE({type:new l.MJ("desktop",{nonNullable:!0}),serverUrl:new l.MJ("",{nonNullable:!0,validators:[l.k0.required]})}),this.connectors=this.syncService.connectors,this.connectorList=this.syncService.connectorsObs.pipe((0,u.T)(t=>t.sort((n,i)=>n.title.localeCompare(i.title)))),this.serverUrlBackup="",this.syncs=this.syncService.cacheUpdated.pipe((0,p.n)(()=>this.sdk.currentKb),(0,p.n)(t=>this.syncService.getSyncsForKB(t.id))),this.syncTableHeader=[new r.A3f({id:"name",label:"sync.home-page.sync-list.table-columns.name"}),new r.A3f({id:"connector",label:"sync.home-page.sync-list.table-columns.connector"}),new r.A3f({id:"resources",label:"sync.home-page.sync-list.table-columns.resources"}),new r.A3f({id:"sync",label:"sync.home-page.sync-list.table-columns.sync"}),new r.A3f({id:"latest-sync",label:"sync.home-page.sync-list.table-columns.latest-sync",sortable:!0}),new r.A3f({id:"actions",label:"sync.home-page.sync-list.table-columns.actions"})]}get syncAgentOnServer(){return"server"===this.syncAgentForm.controls.type.value}get syncAgentTypeControl(){return this.syncAgentForm.controls.type}get syncServerUrl(){return this.syncAgentForm.controls.serverUrl.value}get serverUrlChanged(){return this.serverUrlBackup!==this.syncServerUrl}ngOnInit(){this.syncService.syncServer.pipe((0,b.s)(1)).subscribe(t=>{this.syncAgentForm.patchValue(t),this.serverUrlBackup=t.serverUrl}),this.syncAgentTypeControl.valueChanges.pipe((0,M.Q)(this.unsubscribeAll)).subscribe(()=>this.saveSyncServer())}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}saveSyncServer(){if(this.syncAgentForm.valid){const t=this.syncAgentForm.getRawValue();this.syncService.setSyncServer("server"===t.type?t.serverUrl:J,t.type)}}onSelectConnector(t){this.router.navigate(["./add",t.id],{relativeTo:this.currentRoute})}deleteSync(t){this.modalService.openConfirm({title:this.translate.instant("sync.confirm.deletion.title",{title:t.title}),description:"sync.confirm.deletion.description",isDestructive:!0,confirmLabel:"generic.delete"}).onClose.pipe((0,f.p)(n=>!!n),(0,p.n)(()=>this.syncService.deleteSync(t.id))).subscribe({error:()=>this.toaster.error("sync.details.toast.deletion-failed")})}toggleSync(t,n){this.syncService.updateSync(t,{disabled:!n}).subscribe({error:()=>this.toaster.error(n?"sync.details.toast.activating-failed":"sync.details.toast.disabling-failed")})}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],decls:56,vars:44,consts:[["syncMenu",""],[1,"page-spacing"],[1,"page-title"],[1,"page-description"],[1,"section-description"],[1,"title-l"],[1,"setup-sync-agent",3,"ngSubmit","formGroup"],["formControlName","type"],[1,"radio-config-row"],["value","desktop",3,"help"],[1,"title-m"],[1,"separator-line"],["value","server",3,"help"],[1,"inline-form"],[1,"connector-list"],[3,"paTooltip","disabled","title","logo"],["kind","success"],["aspect","basic"],["formControlName","serverUrl",1,"server-url"],["type","submit",3,"disabled"],[3,"selectConnector","paTooltip","disabled","title","logo"],["icon","info"],["border","","columns","repeat(5, 1fr) 96px"],[3,"cells"],[1,"body-m","black-link",3,"routerLink"],[1,"logo-title"],[1,"body-s"],["labelOnRight","",3,"valueChange","value"],[3,"datetime"],["icon","more-vertical","aspect","basic","size","small",3,"paPopup"],[3,"routerLink"],[3,"routerLink","queryParams"],["destructive","",3,"selectOption"],["size","small",3,"path"]],template:function(n,i){if(1&n&&(e.j41(0,"div",1)(1,"div")(2,"h1",2),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",3),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.j41(8,"section")(9,"div",4)(10,"div",5),e.EFF(11),e.nI1(12,"translate"),e.k0s(),e.j41(13,"div",3),e.EFF(14),e.nI1(15,"translate"),e.k0s()(),e.j41(16,"form",6),e.bIt("ngSubmit",function(){return i.saveSyncServer()}),e.j41(17,"pa-radio-group",7)(18,"div",8)(19,"pa-radio",9),e.nI1(20,"translate"),e.j41(21,"span",10),e.EFF(22),e.nI1(23,"translate"),e.k0s()(),e.DNE(24,Ne,3,3),e.k0s(),e.nrm(25,"div",11),e.j41(26,"div",8)(27,"pa-radio",12),e.nI1(28,"translate"),e.j41(29,"span",10),e.EFF(30),e.nI1(31,"translate"),e.k0s()(),e.DNE(32,Ae,9,7,"div",13),e.k0s()()()(),e.nrm(33,"div",11),e.j41(34,"section")(35,"div",4)(36,"div",5),e.EFF(37),e.nI1(38,"translate"),e.k0s(),e.j41(39,"div",3),e.EFF(40),e.nI1(41,"translate"),e.k0s()(),e.j41(42,"div",14),e.Z7z(43,Ve,4,10,"nsy-connector",15,ee),e.nI1(45,"async"),e.k0s()(),e.j41(46,"section")(47,"div",4)(48,"div",5),e.EFF(49),e.nI1(50,"translate"),e.k0s(),e.j41(51,"div",3),e.EFF(52),e.nI1(53,"translate"),e.k0s()(),e.DNE(54,He,2,1),e.nI1(55,"async"),e.k0s()()),2&n){let c;e.R7$(3),e.JRh(e.bMT(4,16,"navbar.sync")),e.R7$(3),e.JRh(e.bMT(7,18,"sync.home-page.description")),e.R7$(5),e.JRh(e.bMT(12,20,"sync.home-page.setup-server.title")),e.R7$(3),e.JRh(e.bMT(15,22,"sync.home-page.setup-server.description")),e.R7$(2),e.Y8G("formGroup",i.syncAgentForm),e.R7$(3),e.Y8G("help",e.bMT(20,24,"sync.home-page.setup-server.on-desktop.radio-help")),e.R7$(3),e.JRh(e.bMT(23,26,"sync.home-page.setup-server.on-desktop.radio-label")),e.R7$(2),e.vxM(i.syncAgentOnServer?-1:24),e.R7$(3),e.Y8G("help",e.bMT(28,28,"sync.home-page.setup-server.on-server.radio-help")),e.R7$(3),e.JRh(e.bMT(31,30,"sync.home-page.setup-server.on-server.radio-label")),e.R7$(2),e.vxM(i.syncAgentOnServer?32:-1),e.R7$(5),e.JRh(e.bMT(38,32,"sync.home-page.add-sources.title")),e.R7$(3),e.JRh(e.bMT(41,34,"sync.home-page.add-sources.description")),e.R7$(3),e.Dyx(e.bMT(45,36,i.connectorList)),e.R7$(6),e.JRh(e.bMT(50,38,"sync.home-page.sync-list.title")),e.R7$(3),e.JRh(e.bMT(53,40,"sync.home-page.sync-list.description")),e.R7$(2),e.vxM((c=e.bMT(55,42,i.syncs))?54:-1,c)}},dependencies:[g.MD,g.Jj,m.nS,Fe,m.vY,r.Ymm,P.Q,r.Rx2,Ie.P,H.P,r.XgI,X.S,r.rkm,A.a,Re.v,Me.u,r.tml,ke.d,l.X1,l.qT,l.BC,l.cb,l.j4,l.JD,_.h,_.D9,r.EGN,z.O,K.e,Z.U,$e.N,Ee.V,S.Wk,r.V3x,E.R,r.Pa6,q.Z,m.IA,r.OgD,Pe.w],styles:['@charset "UTF-8";.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] .section-description[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%]{border:1px solid hsl(0,0%,90%);border-radius:.5rem;padding:1.5rem}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .radio-config-row[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem;justify-content:space-between}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .radio-config-row[_ngcontent-%COMP%] pa-radio[_ngcontent-%COMP%]{flex:1 0 auto}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] .inline-form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] pa-input.server-url[_ngcontent-%COMP%] .pa-field-control{width:20rem}@media (min-width: 1440px){section[_ngcontent-%COMP%] .setup-sync-agent[_ngcontent-%COMP%] pa-input.server-url[_ngcontent-%COMP%] .pa-field-control{width:26.5rem}}section[_ngcontent-%COMP%] .separator-line[_ngcontent-%COMP%]{margin:1.5rem 0}section[_ngcontent-%COMP%] .connector-list[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem}section[_ngcontent-%COMP%] .logo-title[_ngcontent-%COMP%]{font-size:.75rem;line-height:1.25rem;letter-spacing:0;font-weight:400;align-items:center;display:flex;gap:.5rem}section[_ngcontent-%COMP%] pa-table-cell[_ngcontent-%COMP%] pa-toggle[_ngcontent-%COMP%] .pa-toggle-context{gap:.5rem}section[_ngcontent-%COMP%] pa-table-sortable-header[_ngcontent-%COMP%] .pa-table-grid--header{z-index:1}'],changeDetection:0})}}return o})();var Ke=a(6499),Ze=a(6851),qe=a(5119),et=a(5814),tt=a(9285),te=a(6420);const ne=(o,s)=>s.id,nt=(o,s)=>s.value,ot=()=>[];function it(o,s){if(1&o&&(e.j41(0,"pa-input",25),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("placeholder",t.placeholder)("help",t.help),e.R7$(),e.SpI(" ",e.bMT(2,4,t.label)," ")}}function st(o,s){if(1&o&&(e.j41(0,"pa-toggle",26),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("help",t.help),e.R7$(),e.SpI(" ",e.bMT(2,3,t.label)," ")}}function ct(o,s){if(1&o&&(e.j41(0,"pa-option",29),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=s.$implicit;e.Y8G("disabled",t.disabled)("value",t.value),e.R7$(),e.SpI(" ",e.bMT(2,3,t.label)," ")}}function at(o,s){if(1&o&&(e.j41(0,"pa-select",27),e.Z7z(1,ct,3,5,"pa-option",29,nt),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("label",t.label)("help",t.help),e.R7$(),e.Dyx(t.options)}}function rt(o,s){if(1&o&&(e.j41(0,"pa-textarea",26),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.Y8G("formControlName",t.id)("help",t.help),e.R7$(),e.SpI(" ",t.label," ")}}function lt(o,s){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(e.bMT(2,1,t.help))}}function dt(o,s){1&o&&(e.j41(0,"nsi-info-card",31),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"sync.form-validation.extra-parameters-incomplete")," "))}function pt(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",28)(1,"label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,lt,3,3,"p"),e.j41(5,"app-parameters-table",30),e.bIt("valuesChange",function(i){e.eBV(t);const c=e.XpG().$implicit,d=e.XpG(3);return e.Njj(d.updateTable(c.id,i))}),e.k0s(),e.DNE(6,dt,3,3,"nsi-info-card",31),e.k0s()}if(2&o){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,4,t.label)),e.R7$(2),e.vxM(t.help?4:-1),e.R7$(),e.Y8G("values",n.tables[t.id]||e.lJ4(6,ot)),e.R7$(),e.vxM(n.invalidTables.includes(t.id)?6:-1)}}function ut(o,s){if(1&o&&e.DNE(0,it,3,6,"pa-input",25)(1,st,3,5,"pa-toggle",26)(2,at,3,3,"pa-select",27)(3,rt,2,3,"pa-textarea",26)(4,pt,7,7,"div",28),2&o){let t;e.vxM("text"===(t=s.$implicit.type)?0:"boolean"===t?1:"select"===t?2:"textarea"===t?3:"table"===t?4:-1)}}function mt(o,s){if(1&o&&(e.j41(0,"nsi-two-columns-configuration-item",5)(1,"div",2),e.Z7z(2,ut,5,1,null,null,ne),e.k0s()()),2&o){const t=s.$implicit;e.Y8G("badge",t.badge)("itemTitle",t.title)("description",t.description||""),e.R7$(2),e.Dyx(t.fields)}}function ht(o,s){1&o&&(e.j41(0,"nsi-two-columns-configuration-item",6)(1,"div",32)(2,"pa-toggle",33),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&o&&(e.R7$(3),e.SpI(" ",e.bMT(4,1,"sync.add-page.security-group.toggle-label")," "))}function _t(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsi-label",34),e.bIt("removeLabel",function(){const i=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.removeLabel(i))}),e.EFF(1),e.k0s()}if(2&o){const t=s.$implicit;e.Y8G("color",t.color),e.R7$(),e.SpI(" ",t.label," ")}}function gt(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsi-label",35),e.bIt("removeLabel",function(){const i=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.removeExtension(i))}),e.EFF(1),e.k0s()}if(2&o){const t=s.$implicit;e.R7$(),e.SpI(" ",t," ")}}function ft(o,s){if(1&o){const t=e.RV6();e.j41(0,"form",0)(1,"nsi-two-columns-configuration-item",1)(2,"div",2)(3,"pa-input",3),e.EFF(4),e.nI1(5,"translate"),e.k0s()()(),e.qex(6,4),e.Z7z(7,mt,4,3,"nsi-two-columns-configuration-item",5,ne),e.nI1(9,"async"),e.bVm(),e.DNE(10,ht,5,3,"nsi-two-columns-configuration-item",6),e.j41(11,"nsi-two-columns-configuration-item",7)(12,"div",2)(13,"div",8)(14,"app-label-dropdown",9),e.nI1(15,"async"),e.nI1(16,"async"),e.bIt("selectionChange",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.updateLabelSelection(i))}),e.EFF(17),e.nI1(18,"translate"),e.k0s(),e.j41(19,"span",10),e.EFF(20),e.nI1(21,"translate"),e.k0s(),e.j41(22,"pa-button",11),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.createLabelSet())}),e.EFF(23),e.nI1(24,"translate"),e.k0s()(),e.j41(25,"div",12),e.Z7z(26,_t,2,2,"nsi-label",13,e.fX1),e.k0s()()(),e.j41(28,"nsi-two-columns-configuration-item",14)(29,"div",2)(30,"nsi-info-card"),e.EFF(31),e.nI1(32,"translate"),e.k0s(),e.j41(33,"div",15)(34,"div",16)(35,"pa-select",17)(36,"pa-option",18),e.EFF(37),e.nI1(38,"translate"),e.k0s(),e.j41(39,"pa-option",19),e.EFF(40),e.nI1(41,"translate"),e.k0s()(),e.j41(42,"pa-input",20),e.EFF(43),e.nI1(44,"translate"),e.k0s()(),e.j41(45,"div",12),e.Z7z(46,gt,2,1,"nsi-label",21,e.fX1),e.k0s(),e.j41(48,"div",22)(49,"label"),e.EFF(50),e.nI1(51,"translate"),e.k0s(),e.j41(52,"div",16),e.nrm(53,"pa-date-picker",23),e.nI1(54,"translate"),e.nrm(55,"pa-date-picker",24),e.nI1(56,"translate"),e.k0s()()()()()()}if(2&o){const t=e.XpG();e.Y8G("formGroup",t.form),e.R7$(),e.Y8G("noTopBorder",t.noTopBorder),e.R7$(3),e.JRh(e.bMT(5,17,"sync.add-page.connector-name.field-label")),e.R7$(3),e.Dyx(e.bMT(9,19,t.connector.getParametersSections())),e.R7$(3),e.vxM(t.connector.canSyncSecurityGroups?10:-1),e.R7$(4),e.Y8G("labelSets",e.bMT(15,21,t.labelSets))("selection",t.labelSelection)("disabled",!1===e.bMT(16,23,t.hasLabelSet)),e.R7$(3),e.SpI(" ",e.bMT(18,25,"sync.add-page.add-labels.select-labels")," "),e.R7$(3),e.JRh(e.bMT(21,27,"generic.or")),e.R7$(3),e.SpI(" ",e.bMT(24,29,"sync.add-page.add-labels.create-labelset")," "),e.R7$(3),e.Dyx(t.labelSelection),e.R7$(5),e.JRh(e.bMT(32,31,"sync.add-page.filter-resources.file-extension.info")),e.R7$(6),e.SpI(" ",e.bMT(38,33,"sync.add-page.filter-resources.file-extension.include")," "),e.R7$(3),e.SpI(" ",e.bMT(41,35,"sync.add-page.filter-resources.file-extension.exclude")," "),e.R7$(3),e.SpI(" ",e.bMT(44,37,"sync.add-page.filter-resources.file-extension.label")," "),e.R7$(3),e.Dyx(t.extensionList),e.R7$(4),e.JRh(e.bMT(51,39,"sync.add-page.filter-resources.modification-date.label")),e.R7$(3),e.Y8G("label",e.bMT(54,41,"sync.add-page.filter-resources.modification-date.from")),e.R7$(2),e.Y8G("label",e.bMT(56,43,"sync.add-page.filter-resources.modification-date.to"))}}const yt=new RegExp(/[^a-z0-9_-]/g);let oe=(()=>{class o{constructor(){this.labelService=(0,e.WQX)(C.xQ),this.modalService=(0,e.WQX)(m.w8),this.cdr=(0,e.WQX)(e.gRc),this.unsubscribeAll=new I.B,this.noTopBorder=!1,this.validForm=new e.bkB,this.configurationChange=new e.bkB,this.form=new l.gE({name:new l.MJ("",{nonNullable:!0,validators:[l.k0.required]}),syncSecurityGroups:new l.MJ(null),filterResources:new l.gE({extensions:new l.MJ("",{updateOn:"blur"}),extensionUsage:new l.MJ("include",{nonNullable:!0}),from:new l.MJ(""),to:new l.MJ("")}),extra:new l.gE({})}),this.labelSets=this.labelService.resourceLabelSets,this.hasLabelSet=this.labelService.hasResourceLabelSets,this.labelSelection=[],this.extensionList=[],this.tables={},this.invalidTables=[],this._extra={}}set sync(t){if(t){this.connectorParametersBackup=t.connector.parameters;const n={extensions:t.filters?.fileExtensions?.extensions||"",extensionUsage:t.filters?.fileExtensions?.exclude?"exclude":"include",from:t.filters?.modified?.from||"",to:t.filters?.modified?.to||""};this.form.patchValue({name:t.title,syncSecurityGroups:t.syncSecurityGroups,filterResources:n}),this.labelSelection=t.labels||[],this.extensionList=this.formatExtensionList(n.extensions),t.connector.parameters&&Object.entries(t.connector.parameters).forEach(([i,c])=>{"object"!=typeof c?this._extra[i]=c:this.tables[i]=c})}}get extensionsControl(){return this.form.controls.filterResources.controls.extensions}ngOnInit(){this.connector&&this.connector.getParametersSections().subscribe(t=>{t.forEach(n=>n.fields.forEach(i=>{"table"!==i.type&&this.form.controls.extra.addControl(i.id,new l.MJ("",{nonNullable:!0,validators:i.required?[l.k0.required]:[]}))})),Object.keys(this._extra).length>0&&this.form.patchValue({extra:this._extra})}),this.extensionsControl.valueChanges.pipe((0,M.Q)(this.unsubscribeAll)).subscribe(t=>this.extensionList=this.formatExtensionList(t)),this.form.valueChanges.pipe((0,M.Q)(this.unsubscribeAll)).subscribe(()=>{this.validForm.emit(this.form.valid),this.emitSyncEntity()})}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete()}updateTable(t,n){this.tables[t]=n,n.some(i=>!(i.value.trim()&&i.key.trim()||!i.value.trim()&&!i.key.trim()))?this.invalidTables.includes(t)||this.invalidTables.push(t):this.invalidTables.includes(t)&&(this.invalidTables=this.invalidTables.filter(i=>i!==t)),this.cdr.markForCheck(),this.emitSyncEntity()}createLabelSet(){this.modalService.openModal(C.Tv,new r.S6u({data:{kind:Ke.po.RESOURCES}}))}updateLabelSelection(t){this.labelSets.pipe((0,b.s)(1),(0,f.p)(n=>!!n),(0,u.T)(n=>n)).subscribe(n=>{this.labelSelection=t.map(i=>({...i,color:n[i.labelset]?.color})),this.emitSyncEntity()})}removeExtension(t){const n=this.extensionList.filter(i=>i!==t);this.extensionsControl.patchValue(n.join(", "))}removeLabel(t){this.labelSelection=this.labelSelection.filter(n=>!(n.labelset===t.labelset&&n.label===t.label)),this.emitSyncEntity()}formatExtensionList(t){return t&&t.length>0?t.split(",").map(n=>n.trim()).filter(n=>!!n):[]}emitSyncEntity(){if(!this.connectorId)return;const t=this.form.getRawValue(),n=t.name,i=(Math.random()+1).toString(36).substring(7),c=`${this.kbId}-${n?.toLowerCase().replace(yt,"-")}-${i}`,d={fileExtensions:t.filterResources.extensions?{extensions:t.filterResources.extensions,exclude:"exclude"===t.filterResources.extensionUsage}:void 0,modified:t.filterResources.from||t.filterResources.to?{from:t.filterResources.from||void 0,to:t.filterResources.to||void 0}:void 0},T=Object.entries(t.extra||{}).reduce((j,[G,U])=>({...j,[G]:U}),{}),F=Object.entries(this.tables).reduce((j,[G,U])=>(j[G]=U.filter(re=>!(!re.key.trim()||!re.value.trim())),j),{}),R={id:c,title:n,labels:this.labelSelection,filters:d,connector:{name:this.connectorId,parameters:{...this.connectorParametersBackup,...F,...T}}};null!==t.syncSecurityGroups&&(R.syncSecurityGroups=t.syncSecurityGroups),this.configurationChange.emit(R)}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-configuration-form"]],inputs:{connector:"connector",connectorId:"connectorId",kbId:"kbId",sync:"sync",noTopBorder:[2,"noTopBorder","noTopBorder",e.L39]},outputs:{validForm:"validForm",configurationChange:"configurationChange"},features:[e.GFd],decls:1,vars:1,consts:[[3,"formGroup"],["itemTitle","sync.add-page.connector-name.title","description","sync.add-page.connector-name.description",3,"noTopBorder"],[1,"form-container"],["formControlName","name"],["formGroupName","extra"],[3,"badge","itemTitle","description"],["itemTitle","sync.add-page.security-group.title","description","sync.add-page.security-group.description","badge","generic.badge.advanced"],["badge","generic.badge.optional","itemTitle","sync.add-page.add-labels.title","description","sync.add-page.add-labels.description"],[1,"inline-form","full-width"],["aspect","basic","fullWidth","",3,"selectionChange","labelSets","selection","disabled"],[1,"separator-word","body-s"],["icon","circle-plus","aspect","basic","iconAndText","",1,"full-width",3,"click"],[1,"inline-form","small-gap"],[3,"color"],["badge","generic.badge.optional","itemTitle","sync.add-page.filter-resources.title","description","sync.add-page.filter-resources.description"],["formGroupName","filterResources",1,"form-container"],[1,"inline-form","full-width","small-gap"],["formControlName","extensionUsage"],["value","include"],["value","exclude"],["id","extension","placeholder",".pdf,.docx","formControlName","extensions"],["neutral",""],[1,"label-field-container"],["formControlName","from",3,"label"],["formControlName","to",3,"label"],[3,"formControlName","placeholder","help"],[3,"formControlName","help"],[3,"formControlName","label","help"],[1,"table-container"],[3,"disabled","value"],[3,"valuesChange","values"],["type","warning","icon","warning"],[1,"form-container","toggle-container"],["withBackground","","formControlName","syncSecurityGroups"],[3,"removeLabel","color"],["neutral","",3,"removeLabel"]],template:function(n,i){1&n&&e.DNE(0,ft,57,45,"form",0),2&n&&e.vxM(i.connector?0:-1)},dependencies:[g.MD,g.Jj,m.IA,m._8,l.X1,l.qT,l.BC,l.cb,l.j4,l.JD,l.$R,r.XgI,X.S,Ze.w,qe.Q,H.P,C.Qy,C.Bo,et.L,r.Ymm,P.Q,_.h,_.D9,r.OYn,tt.I,m.OE,te.U,r.rkm,A.a],styles:['@charset "UTF-8";.toggle-container[_ngcontent-%COMP%] pa-toggle[_ngcontent-%COMP%] .pa-toggle-context{justify-content:space-between}.table-container[_ngcontent-%COMP%] nsi-info-card[_ngcontent-%COMP%]{margin-top:.75rem}'],changeDetection:0})}}return o})();var bt=a(1943),ie=a(7670);const Ct=o=>({total:o}),St=o=>({count:o});function vt(o,s){1&o&&e.nrm(0,"nsi-spinner")}function xt(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsi-folder-tree",3),e.bIt("selectionChange",function(i){e.eBV(t);const c=e.XpG(2);return e.Njj(c.updateSelection(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("selection",t.selection)("folderTree",t.folders)}}function Tt(o,s){if(1&o&&e.nrm(0,"nsi-folder-list",2),2&o){const t=e.XpG(2);e.Y8G("folders",t.selectedPaths)}}function Ft(o,s){if(1&o&&e.DNE(0,xt,1,2,"nsi-folder-tree",1)(1,Tt,1,1,"nsi-folder-list",2),2&o){const t=e.XpG();e.vxM(t.seeAll?0:1)}}let V=(()=>{class o{constructor(){this.syncService=(0,e.WQX)($),this.toaster=(0,e.WQX)(m._g),this.cdr=(0,e.WQX)(e.gRc),this.selectedSyncItems=new e.bkB,this.searchQuery=new l.MJ("",{nonNullable:!0}),this.totalFolders=0,this.selectionCount=0,this.loading=!1,this.seeAll=!0,this.selection=[],this.selectedPaths=[],this.syncItems=[],this.selectedIds=[]}ngOnInit(){this.updateSelection((this.sync.foldersToSync||[]).map(t=>({id:t.uuid,path:t.metadata.path}))),this.loadFolders()}updateView(t){this.seeAll="left"===t}updateSelection(t){this.selection=t,this.selectedPaths=t.map(n=>n.path),this.selectedIds=t.map(n=>n.id),this.selectionCount=t.length,this.selectedSyncItems.emit(this.syncItems.filter(n=>this.selectedIds.includes(n.uuid))),this.cdr.markForCheck()}loadFolders(t){this.loading=!0,this.syncService.getFolders(t?.value||"").pipe((0,O.W)(n=>(n&&this.toaster.error("string"==typeof n?n:n.error?.message||n.error||n.message||"An error occurred"),(0,h.of)({items:[],nextPage:void 0}))),(0,bt.S)((n,i)=>n.concat(i.items),[]),(0,u.T)(n=>[{uuid:"root",originalId:"/",title:"/",status:k.PENDING,metadata:{path:"/"}},...n]),(0,u.T)(n=>n.sort((i,c)=>i.metadata.path.localeCompare(c.metadata.path))),(0,y.M)(n=>{this.totalFolders=n.length,this.syncItems=n}),(0,u.T)(n=>this.getFolderTreeFromSyncItems(n))).subscribe({next:n=>{this.loading=!1,this.folders=n,this.cdr.markForCheck()}})}getFolderTreeFromSyncItems(t){const n={id:"root",path:"/",title:"/",expanded:!0,children:{}};return t.filter(i=>"root"!==i.uuid).forEach(i=>{const c=i.metadata.path,d=i.originalId,T={id:d,title:i.title,path:c,displayPath:i.metadata.displayPath||c,children:{}};if("/"===c)n.children[d]=T;else{let R,F=n;c.split("/").slice(1,-1).forEach(G=>{F&&(R=F.children?.[G],R&&(F=R))}),F.children?F.children[d]=T:F.children={[d]:T}}}),n}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-folder-selection"]],inputs:{sync:"sync"},outputs:{selectedSyncItems:"selectedSyncItems"},decls:7,vars:14,consts:[[3,"activeChange","leftButton","rightButton"],[3,"selection","folderTree"],[3,"folders"],[3,"selectionChange","selection","folderTree"]],template:function(n,i){1&n&&(e.j41(0,"header"),e.nrm(1,"div"),e.j41(2,"nsi-segmented-buttons",0),e.nI1(3,"translate"),e.nI1(4,"translate"),e.bIt("activeChange",function(d){return i.updateView(d)}),e.k0s()(),e.DNE(5,vt,1,0,"nsi-spinner")(6,Ft,2,1)),2&n&&(e.R7$(2),e.Y8G("leftButton",e.i5U(3,4,"sync.folder-selection.see-all",e.eq3(10,Ct,i.totalFolders)))("rightButton",e.i5U(4,7,"sync.folder-selection.see-selection",e.eq3(12,St,i.selectionCount))),e.R7$(3),e.vxM(i.loading?5:-1),e.R7$(),e.vxM(i.folders?6:-1))},dependencies:[g.MD,m.Sq,m.sH,r.Ymm,r.XgI,l.X1,m.vI,m.J4,ie.t,_.h,_.D9],styles:['@charset "UTF-8";header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:1rem}header[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{width:30rem}'],changeDetection:0})}}return o})();const It=o=>({connector:o}),Rt=(o,s)=>({index:o,total:s});function Mt(o,s){if(1&o&&(e.j41(0,"div")(1,"h1",2),e.nrm(2,"pa-icon",3),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"p",4),e.EFF(6),e.nI1(7,"translate"),e.k0s()()),2&o){const t=s,n=e.XpG();e.R7$(2),e.Y8G("path",t.logo),e.R7$(),e.SpI(" ",e.i5U(4,3,"sync.add-page.title",e.eq3(8,It,t.title))," "),e.R7$(3),e.JRh(e.bMT(7,6,"sync.add-page.description."+n))}}function kt(o,s){if(1&o&&(e.DNE(0,Mt,8,10,"div"),e.nI1(1,"async")),2&o){let t;const n=e.XpG();e.vxM((t=e.bMT(1,1,n.connectorDefinition))?0:-1,t)}}function $t(o,s){1&o&&e.nrm(0,"nsi-spinner")}function Et(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsy-configuration-form",6),e.nI1(1,"async"),e.nI1(2,"async"),e.bIt("configurationChange",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.updateConfiguration(i))})("validForm",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.validForm=i)}),e.k0s()}if(2&o){const t=e.XpG(2),n=e.XpG();e.Y8G("sync",n.sync)("kbId",e.bMT(1,4,n.kbId))("connector",t)("connectorId",e.bMT(2,6,n.connectorId))}}function Pt(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsy-folder-selection",8),e.bIt("selectedSyncItems",function(i){e.eBV(t);const c=e.XpG(4);return e.Njj(c.updateSelection(i))}),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("sync",t.sync)}}function jt(o,s){if(1&o&&e.DNE(0,Pt,1,1,"nsy-folder-selection",7),2&o){const t=e.XpG(3);e.vxM(t.sync?0:-1)}}function Gt(o,s){if(1&o&&(e.EFF(0),e.nI1(1,"translate")),2&o){const t=e.XpG(),n=e.XpG(3);e.SpI(" ",e.i5U(1,1,"sync.add-page.footer.steps",e.l_i(4,Rt,n.step(),t.length))," ")}}function Ot(o,s){if(1&o){const t=e.RV6();e.j41(0,"pa-button",12),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.cancel())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"generic.cancel")," "))}function Dt(o,s){if(1&o){const t=e.RV6();e.j41(0,"pa-button",12),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.goBack())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&o&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"generic.back")," "))}function Nt(o,s){if(1&o){const t=e.RV6();e.j41(0,"pa-button",13),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.goNext())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("disabled",!t.validForm||t.saving),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.add-page.footer.folder-selection-button")," ")}}function wt(o,s){if(1&o){const t=e.RV6();e.j41(0,"pa-button",13),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.save())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&o){const t=e.XpG(3),n=e.XpG();e.Y8G("disabled",!n.validForm||t.allowToSelectFolders&&0===n.folderSelection.length||n.saving),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.add-page.footer.save-button")," ")}}function Xt(o,s){if(1&o&&(e.j41(0,"nsi-sticky-footer")(1,"div",9),e.DNE(2,Gt,2,7),e.k0s(),e.DNE(3,Ot,3,3,"pa-button",10)(4,Dt,3,3,"pa-button",10)(5,Nt,3,4,"pa-button",11)(6,wt,3,4,"pa-button",11),e.k0s()),2&o){const t=s,n=e.XpG(3);e.R7$(2),e.vxM(t.length>1?2:-1),e.R7$(),e.vxM(1===n.step()?3:4),e.R7$(2),e.vxM(t.length>1&&n.step()<t.length?5:6)}}function At(o,s){if(1&o&&(e.DNE(0,Et,3,8,"nsy-configuration-form",5)(1,jt,1,1)(2,Xt,7,3,"nsi-sticky-footer"),e.nI1(3,"async")),2&o){let t,n;const i=e.XpG(2);e.vxM(1===(t=i.step())?0:2===t?1:-1),e.R7$(2),e.vxM((n=e.bMT(3,2,i.steps))?2:-1,n)}}function Vt(o,s){if(1&o&&(e.j41(0,"div"),e.DNE(1,$t,1,0,"nsi-spinner")(2,At,4,4),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.loading?1:2)}}let se=(()=>{class o{constructor(){this.router=(0,e.WQX)(S.Ix),this.currentRoute=(0,e.WQX)(S.nX),this.sdk=(0,e.WQX)(C.ok),this.syncService=(0,e.WQX)($),this.modalService=(0,e.WQX)(m.w8),this.translate=(0,e.WQX)(_.c$),this.toaster=(0,e.WQX)(m._g),this.cdr=(0,e.WQX)(e.gRc),this.connectorId=this.currentRoute.params.pipe((0,f.p)(t=>t.connector),(0,u.T)(t=>t.connector)),this.connectorDefinition=this.connectorId.pipe((0,u.T)(t=>this.syncService.getConnectorDefinition(t))),this.connector=this.connectorId.pipe((0,u.T)(t=>this.syncService.getConnector(t,""))),this.kbId=this.sdk.currentKb.pipe((0,u.T)(t=>t.id)),this.steps=this.connector.pipe((0,u.T)(t=>t.allowToSelectFolders?["configuration","folder-selection"]:["configuration"])),this.stepIndex=(0,e.vPA)(0),this.step=(0,e.EWP)(()=>this.stepIndex()+1),this.validForm=!1,this.folderSelection=[],this.loading=!1,this.saving=!1}get backPath(){return this.syncId?"../../..":"../.."}ngOnInit(){this.currentRoute.params.pipe((0,f.p)(t=>!!t.syncId),(0,b.s)(1),(0,y.M)(t=>{this.loading=!0,this.cdr.markForCheck(),this.syncId=t.syncId,this.syncService.setCurrentSyncId(this.syncId),this.validForm=!0}),(0,p.n)(()=>this.syncService.getSync(this.syncId)),(0,y.M)(t=>{this.sync=t,this.configuration=t,this.cdr.markForCheck()}),(0,p.n)(t=>this.syncService.hasCurrentSourceAuth().pipe((0,y.M)(n=>{n&&(this.loading=!1,this.cdr.markForCheck())}),(0,f.p)(n=>!n),(0,u.T)(()=>this.syncService.getConnector(t.connector.name,t.id)),(0,p.n)(n=>this.syncService.authenticateToConnector(t.connector.name,n))))).subscribe({next:()=>{this._goNext(),this.loading=!1,this.cdr.markForCheck(),this.router.navigate([],{queryParams:{}})},error:()=>this.toaster.error("sync.details.authentication.fail")})}goBack(){this.stepIndex()>0&&this.stepIndex.update(t=>t-1)}goNext(){if(!this.configuration)return;const t=this.configuration;this.syncId?this._goNext():this.connectorDefinition.pipe((0,b.s)(1),(0,p.n)(n=>this.modalService.openConfirm({title:this.translate.instant("sync.add-page.confirm-authenticate.title",{connector:n.title}),description:this.translate.instant("sync.add-page.confirm-authenticate.description"),confirmLabel:this.translate.instant("sync.add-page.confirm-authenticate.confirm-button")}).onClose),(0,f.p)(n=>!!n),(0,p.n)(()=>this._createSync(t)),(0,p.n)(n=>this._onSuccessfulCreation(n,t))).subscribe({error:n=>{console.warn(n),this.toaster.error("sync.add-page.toast.generic-error")}})}cancel(){this.syncId?this.modalService.openConfirm({title:"sync.confirm.cancel-oauth.title",description:"sync.confirm.cancel-oauth.description",isDestructive:!0,confirmLabel:"sync.confirm.cancel-oauth.confirm-label",cancelLabel:"sync.confirm.cancel-oauth.cancel-label"}).onClose.pipe((0,f.p)(t=>!!t),(0,p.n)(()=>this.syncService.deleteSync(this.syncId))).subscribe({next:()=>this.router.navigate([this.backPath],{relativeTo:this.currentRoute})}):this.router.navigate([this.backPath],{relativeTo:this.currentRoute})}save(){if(!this.configuration)return;this.saving=!0;const t=this.configuration;if(this.syncId){if(this.folderSelection.length>0){const n=this.syncId;this.syncService.updateSync(n,{foldersToSync:this.folderSelection},!0).pipe((0,p.n)(()=>this._syncCreationDone(n))).subscribe({error:i=>this._errorHandler(i)})}}else this._createSync(t).pipe((0,p.n)(n=>this._onSuccessfulCreation(n,t))).subscribe({error:n=>this._errorHandler(n)})}updateConfiguration(t){this.configuration=t}updateSelection(t){this.folderSelection=t}_goNext(){this.steps.pipe((0,b.s)(1)).subscribe(t=>{this.stepIndex()<t.length&&this.stepIndex.update(n=>n+1)})}_createSync(t){return this.syncService.addSync(t).pipe((0,y.M)(()=>this.syncService.setCurrentSyncId(t.id)),(0,u.T)(()=>this.syncService.getConnector(t.connector.name,t.id)),(0,p.n)(n=>n.allowToSelectFolders?(0,h.of)(n):("function"==typeof n.handleParameters&&n.handleParameters(t.connector.parameters),this.syncService.updateSync(t.id,{foldersToSync:n.getStaticFolders()}).pipe((0,u.T)(()=>this.syncService.getConnector(t.connector.name,t.id))))))}_onSuccessfulCreation(t,n){if(t.hasServerSideAuth){let i=location.href.split("/sync/add/")[0];return this.sdk.nuclia.options.standalone&&(i=i.replace("#/","")),t.goToOAuth(`${i}/sync/add/${n.connector.name}/${n.id}`,!0),(0,h.of)()}return this._syncCreationDone(n.id)}_syncCreationDone(t){return(0,h.of)(!0).pipe((0,y.M)(()=>{this.router.navigate([this.syncId?`../../../${t}`:`../../${t}`],{relativeTo:this.currentRoute})}),(0,p.n)(()=>(this.toaster.success("sync.details.toast.triggering-sync-success"),this.syncService.triggerSync(t).pipe((0,O.W)(()=>(this.toaster.error("sync.details.toast.triggering-sync-failed"),(0,h.of)()))))))}_errorHandler(t){this.saving=!1,console.warn(t),this.toaster.error("sync.add-page.toast.generic-error")}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-add-sync-page"]],decls:8,vars:10,consts:[[1,"page-spacing"],[3,"link"],[1,"page-title"],["size","large",3,"path"],[1,"page-description"],[3,"sync","kbId","connector","connectorId"],[3,"configurationChange","validForm","sync","kbId","connector","connectorId"],[3,"sync"],[3,"selectedSyncItems","sync"],["footerNote",""],["aspect","basic"],["kind","primary",3,"disabled"],["aspect","basic",3,"click"],["kind","primary",3,"click","disabled"]],template:function(n,i){if(1&n&&(e.j41(0,"div",0)(1,"nsi-back-button",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,kt,2,3),e.nI1(5,"async"),e.DNE(6,Vt,3,1,"div"),e.nI1(7,"async"),e.k0s()),2&n){let c,d;e.R7$(),e.Y8G("link",i.backPath),e.R7$(),e.SpI(" ",e.bMT(3,4,"sync.add-page.back-button")," "),e.R7$(2),e.vxM((c=e.bMT(5,6,i.connectorId))?4:-1,c),e.R7$(2),e.vxM((d=e.bMT(7,8,i.connector))?6:-1,d)}},dependencies:[g.MD,g.Jj,m.Xp,r.Ymm,P.Q,r.V3x,E.R,m.o3,_.h,_.D9,oe,V,m.J4,ie.t],styles:['@charset "UTF-8";.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}.inline-form[_ngcontent-%COMP%] pa-select[_ngcontent-%COMP%]{flex:0 0 auto;min-width:8rem;width:fit-content}.inline-form[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{max-width:unset}'],changeDetection:0})}}return o})();var Ut=a(4572),Bt=a(2885);const Yt=["activitySection"],ce=(o,s)=>s.id;function Lt(o,s){if(1&o&&(e.j41(0,"div",3)(1,"label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",13),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.nrm(7,"div",4)),2&o){const t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,2,"sync.details.settings.synchronize-security-groups")),e.R7$(3),e.SpI(" ",e.bMT(6,4,t.sync.syncSecurityGroups?"sync.details.settings.boolean.true":"sync.details.settings.boolean.false")," ")}}function Jt(o,s){if(1&o&&(e.j41(0,"nsi-label",6),e.EFF(1),e.k0s()),2&o){const t=s.$implicit;e.Y8G("color",t.color),e.R7$(),e.SpI(" ",t.label," ")}}function Qt(o,s){1&o&&e.EFF(0," \u2013 ")}function Wt(o,s){if(1&o&&(e.j41(0,"nsi-label",14),e.EFF(1),e.k0s()),2&o){const t=s.$implicit;e.R7$(),e.SpI(" ",t," ")}}function Ht(o,s){1&o&&e.EFF(0," \u2013 ")}function zt(o,s){1&o&&(e.j41(0,"div",5),e.Z7z(1,Wt,2,1,"nsi-label",14,e.fX1,!1,Ht,1,0),e.k0s()),2&o&&(e.R7$(),e.Dyx(s.extensions.split(", ")))}function Kt(o,s){1&o&&e.EFF(0," \u2013 ")}function Zt(o,s){if(1&o&&(e.EFF(0),e.nI1(1,"translate"),e.nrm(2,"pa-datetime",15),e.EFF(3),e.nI1(4,"translate"),e.nrm(5,"pa-datetime",15)),2&o){const t=s;e.SpI(" ",e.bMT(1,4,"sync.details.settings.modification-date.from")," "),e.R7$(2),e.Y8G("datetime",t.from),e.R7$(),e.SpI(" ",e.bMT(4,6,"sync.details.settings.modification-date.to")," "),e.R7$(2),e.Y8G("datetime",t.to)}}function qt(o,s){1&o&&e.EFF(0," \u2013 ")}function en(o,s){if(1&o&&(e.j41(0,"div"),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit,n=e.XpG(3);e.R7$(),e.JRh(n.sync.connector.parameters[t.id]||"_")}}function tn(o,s){if(1&o&&e.nrm(0,"app-parameters-table",17),2&o){const t=e.XpG().$implicit,n=e.XpG(3);e.Y8G("values",n.sync.connector.parameters[t.id])}}function nn(o,s){1&o&&e.EFF(0," \u2013 ")}function on(o,s){1&o&&e.nrm(0,"div",4)}function sn(o,s){if(1&o&&(e.j41(0,"div",3)(1,"label"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,en,2,1,"div")(5,tn,1,1,"app-parameters-table",17)(6,nn,1,0),e.k0s(),e.DNE(7,on,1,0,"div",4)),2&o){const t=s.$implicit,n=s.$index,i=s.$count,c=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,3,t.label)),e.R7$(2),e.vxM("table"!==t.type?4:c.sync.connector.parameters[t.id].length>0?5:6),e.R7$(3),e.vxM(n!==i-1?7:-1)}}function cn(o,s){if(1&o&&(e.j41(0,"nsi-two-columns-configuration-item",16)(1,"div",2),e.Z7z(2,sn,8,5,null,null,ce),e.k0s()()),2&o){const t=s.$implicit;e.Y8G("itemTitle",t.title)("description",t.description||""),e.R7$(2),e.Dyx(t.fields)}}function an(o,s){if(1&o&&(e.Z7z(0,cn,4,2,"nsi-two-columns-configuration-item",16,ce),e.nI1(2,"async")),2&o){const t=e.XpG();e.Dyx(e.bMT(2,0,t.connector.getParametersSections()))}}function rn(o,s){1&o&&e.nrm(0,"pa-icon",19)}function ln(o,s){1&o&&e.nrm(0,"pa-icon",20)}function dn(o,s){1&o&&e.nrm(0,"pa-icon",21)}function pn(o,s){if(1&o&&(e.j41(0,"pa-table-row")(1,"pa-table-cell")(2,"div",18),e.DNE(3,rn,1,0,"pa-icon",19)(4,ln,1,0,"pa-icon",20)(5,dn,1,0,"pa-icon",21),e.EFF(6),e.k0s()(),e.j41(7,"pa-table-cell")(8,"div",22),e.nrm(9,"pa-datetime",23),e.k0s()()()),2&o){let t;const n=s.$implicit;e.R7$(3),e.vxM("high"===(t=n.level)?3:"medium"===t?4:"low"===t?5:-1),e.R7$(3),e.SpI(" ",n.message," "),e.R7$(3),e.Y8G("datetime",n.createdAt)}}function un(o,s){1&o&&(e.j41(0,"pa-table-row",12)(1,"pa-table-cell")(2,"div",22),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&o&&(e.R7$(3),e.JRh(e.bMT(4,1,"sync.details.activity-log.no-activity")))}let mn=(()=>{class o{constructor(){this.labelService=(0,e.WQX)(C.xQ),this.cdr=(0,e.WQX)(e.gRc),this.currentRoute=(0,e.WQX)(S.nX),this.connector=null,this._logs=[],this.labelSets={},this.coloredLabels=[]}set logs(t){t&&(this._logs=t)}get logs(){return this._logs}ngAfterViewInit(){this.currentRoute.queryParams.pipe((0,f.p)(t=>t.section),(0,u.T)(t=>t.section),(0,b.s)(1)).subscribe({next:t=>{setTimeout(()=>{"activity"===t&&this.activitySection&&this.activitySection.nativeElement.scrollIntoView({behavior:"smooth"})},300)}})}ngOnInit(){this.labelService.resourceLabelSets.pipe((0,b.s)(1),(0,f.p)(t=>!!t),(0,u.T)(t=>t)).subscribe(t=>{this.labelSets=t,this.coloredLabels=this.sync.labels?.map(n=>({...n,color:this.labelSets[n.labelset]?.color}))||[],this.cdr.detectChanges()})}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-sync-settings"]],viewQuery:function(n,i){if(1&n&&e.GBs(Yt,5),2&n){let c;e.mGM(c=e.lsd())&&(i.activitySection=c.first)}},inputs:{sync:"sync",connector:"connector",logs:"logs"},decls:47,vars:25,consts:[["activitySection",""],["noTopBorder","","itemTitle","sync.details.settings.title","description","sync.details.settings.description"],[1,"sync-settings-container"],[1,"body-s","settings-item"],[1,"separator-line"],[1,"row-container"],["readonly","",3,"color"],[1,"body-s","row-container"],["itemTitle","sync.details.activity-log.title","description","sync.details.activity-log.description"],[1,"activity-logs-container"],["border","","columns","2fr 1fr"],["header",""],["last",""],[2,"text-transform","capitalize"],["readonly","","neutral",""],["dateOnly","",3,"datetime"],[3,"itemTitle","description"],["readonly","",3,"values"],[1,"body-s","icon-and-text"],["size","small","name","circle-cross",1,"error"],["size","small","name","warning",1,"warning"],["size","small","name","circle-check",1,"success"],[1,"body-s"],[3,"datetime"]],template:function(n,i){if(1&n&&(e.j41(0,"nsi-two-columns-configuration-item",1)(1,"div",2)(2,"div",3)(3,"label"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"div"),e.EFF(7),e.k0s()(),e.nrm(8,"div",4),e.DNE(9,Lt,8,6),e.j41(10,"div",3)(11,"label"),e.EFF(12),e.nI1(13,"translate"),e.k0s(),e.j41(14,"div",5),e.Z7z(15,Jt,2,2,"nsi-label",6,e.fX1,!1,Qt,1,0),e.k0s()(),e.nrm(18,"div",4),e.j41(19,"label"),e.EFF(20),e.nI1(21,"translate"),e.k0s(),e.j41(22,"div",3),e.DNE(23,zt,4,1,"div",5)(24,Kt,1,0),e.k0s(),e.nrm(25,"div",4),e.j41(26,"label"),e.EFF(27),e.nI1(28,"translate"),e.k0s(),e.j41(29,"div",7),e.DNE(30,Zt,6,8)(31,qt,1,0),e.k0s()()(),e.DNE(32,an,3,2),e.j41(33,"nsi-two-columns-configuration-item",8)(34,"div",9,0)(36,"pa-table",10)(37,"pa-table-header")(38,"pa-table-cell",11),e.EFF(39),e.nI1(40,"translate"),e.k0s(),e.j41(41,"pa-table-cell",11),e.EFF(42),e.nI1(43,"translate"),e.k0s()(),e.Z7z(44,pn,10,3,"pa-table-row",null,e.fX1,!1,un,5,3,"pa-table-row",12),e.k0s()()()),2&n){let c,d;e.R7$(4),e.JRh(e.bMT(5,13,"sync.details.settings.name")),e.R7$(3),e.JRh(i.sync.title),e.R7$(2),e.vxM(null!=i.connector&&i.connector.canSyncSecurityGroups?9:-1),e.R7$(3),e.JRh(e.bMT(13,15,"sync.details.settings.labels")),e.R7$(3),e.Dyx(i.coloredLabels),e.R7$(5),e.SpI(" ",e.bMT(21,17,null!=i.sync.filters&&null!=i.sync.filters.fileExtensions&&i.sync.filters.fileExtensions.exclude?"sync.details.settings.file-extensions.excluded":"sync.details.settings.file-extensions.included")," "),e.R7$(3),e.vxM((c=null==i.sync.filters?null:i.sync.filters.fileExtensions)?23:24,c),e.R7$(4),e.JRh(e.bMT(28,19,"sync.details.settings.modification-date.label")),e.R7$(3),e.vxM((d=null==i.sync.filters?null:i.sync.filters.modified)?30:31,d),e.R7$(2),e.vxM(i.connector?32:-1),e.R7$(7),e.JRh(e.bMT(40,21,"sync.details.activity-log.table-header.message")),e.R7$(3),e.JRh(e.bMT(43,23,"sync.details.activity-log.table-header.date")),e.R7$(2),e.Dyx(i.logs)}},dependencies:[g.MD,g.Jj,m._8,_.h,_.D9,m.OE,te.U,r.Pa6,q.Z,r.EGN,z.O,K.e,Z.U,Bt.Bz,r.V3x,E.R,C.Qy],styles:['@charset "UTF-8";.sync-settings-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.sync-settings-container[_ngcontent-%COMP%] .settings-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.sync-settings-container[_ngcontent-%COMP%] .body-s[_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:#707070;font-weight:600}.sync-settings-container[_ngcontent-%COMP%] .row-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.25rem}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] pa-icon[_ngcontent-%COMP%]{display:flex}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .error[_ngcontent-%COMP%], .activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .warning[_ngcontent-%COMP%]{color:#917e12}.activity-logs-container[_ngcontent-%COMP%] .icon-and-text[_ngcontent-%COMP%] .success[_ngcontent-%COMP%]{color:#16a249}'],changeDetection:0})}}return o})();const hn=o=>({count:o});function _n(o,s){if(1&o){const t=e.RV6();e.j41(0,"header")(1,"pa-input",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"pa-button",2),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.editing=!0)}),e.EFF(5),e.nI1(6,"translate"),e.k0s()(),e.j41(7,"div",3),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.nrm(10,"nsi-folder-list",4)}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("formControl",t.queryControl),e.R7$(),e.SpI(" ",e.bMT(3,6,"sync.folder-selection.search-input-label")," "),e.R7$(3),e.JRh(e.bMT(6,8,"sync.folder-selection.edit-folders-button")),e.R7$(3),e.JRh(e.bMT(9,10,"sync.folder-selection.current-selection")),e.R7$(2),e.Y8G("filtered",!!t.query)("folders",t.selectedFolders)}}function gn(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsy-folder-selection",5),e.bIt("selectedSyncItems",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.updateSelection(i))}),e.k0s(),e.j41(1,"nsi-sticky-footer")(2,"div",6),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"pa-button",7),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.editing=!1)}),e.EFF(6),e.nI1(7,"translate"),e.k0s(),e.j41(8,"pa-button",8),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.saveSelection())}),e.EFF(9),e.nI1(10,"translate"),e.k0s()()}if(2&o){const t=e.XpG();e.Y8G("sync",t.sync),e.R7$(3),e.SpI(" ",e.i5U(4,4,"sync.folder-selection.footer.selection-count",e.eq3(11,hn,t.selectionCount))," "),e.R7$(3),e.SpI(" ",e.bMT(7,7,"generic.cancel")," "),e.R7$(3),e.SpI(" ",e.bMT(10,9,"sync.folder-selection.footer.save-changes")," ")}}let fn=(()=>{class o{constructor(){this.cdr=(0,e.WQX)(e.gRc),this._unsubscribeAll=new I.B,this.selectionChange=new e.bkB,this.editing=!1,this.selection=[],this.selectionCount=0,this.queryControl=new l.MJ("")}set sync(t){this._sync=t,this.updateSelection(t.foldersToSync||[])}get sync(){return this._sync}get selectedFolders(){const t=this.selection.map(i=>i.metadata.displayPath||i.metadata.path)||[],n=this.query?this.query.toLocaleLowerCase():"";return n?t.filter(i=>i.toLocaleLowerCase().includes(n)):t}get query(){return this.queryControl.value}updateSelection(t){this.selection=t,this.selectionCount=this.selection.length,this.cdr.detectChanges()}saveSelection(){this.selectionChange.emit(this.selection),this.editing=!1,this.cdr.markForCheck()}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-folders-tab"]],inputs:{sync:"sync"},outputs:{selectionChange:"selectionChange"},decls:3,vars:1,consts:[[1,"folders-tab"],["icon","search",3,"formControl"],[3,"click"],[1,"title-xxs"],[3,"filtered","folders"],[3,"selectedSyncItems","sync"],["footerNote","",1,"title-xs"],["aspect","basic",3,"click"],["kind","primary",3,"click"]],template:function(n,i){1&n&&(e.j41(0,"div",0),e.DNE(1,_n,11,12)(2,gn,11,13),e.k0s()),2&n&&(e.R7$(),e.vxM(i.editing?i.sync?2:-1:1))},dependencies:[g.MD,V,r.XgI,X.S,r.Ymm,P.Q,_.h,_.D9,r.V3x,m.Sq,m.o3,l.X1,l.BC,l.l_],styles:['@charset "UTF-8";.folders-tab[_ngcontent-%COMP%]{position:relative}.folders-tab[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:1rem}.folders-tab[_ngcontent-%COMP%] header[_ngcontent-%COMP%] pa-input[_ngcontent-%COMP%]{width:30rem}'],changeDetection:0})}}return o})();var yn=a(7725),bn=a(3515);function Cn(o,s){if(1&o){const t=e.RV6();e.j41(0,"div",8)(1,"div",9)(2,"pa-toggle",10),e.bIt("valueChange",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.toggleSync(i))}),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"pa-button",11),e.nI1(6,"async"),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.triggerSync())}),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"pa-button",12),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"pa-button",13),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.deleteSync())}),e.EFF(13),e.nI1(14,"translate"),e.k0s()()}if(2&o){const t=e.XpG(2),n=e.XpG();e.R7$(2),e.Y8G("value",!t.disabled),e.R7$(),e.SpI(" ",e.bMT(4,6,t.disabled?"sync.badge.inactive":"sync.badge.active")," "),e.R7$(2),e.Y8G("disabled",e.bMT(6,8,n.isSyncing)),e.R7$(2),e.SpI(" ",e.bMT(8,10,"sync.details.buttons.sync-now")," "),e.R7$(3),e.SpI(" ",e.bMT(11,12,"sync.details.buttons.edit-settings")," "),e.R7$(3),e.SpI(" ",e.bMT(14,14,"sync.details.buttons.delete")," ")}}function Sn(o,s){if(1&o&&(e.j41(0,"div",2)(1,"h1",6),e.nrm(2,"pa-icon",7),e.EFF(3),e.k0s(),e.DNE(4,Cn,15,16,"div",8),e.nI1(5,"async"),e.k0s()),2&o){const t=e.XpG(),n=e.XpG();e.R7$(2),e.Y8G("path",s.logo),e.R7$(),e.SpI(" ",t.title," "),e.R7$(),e.vxM(!1===e.bMT(5,3,n.editMode)?4:-1)}}function vn(o,s){if(1&o){const t=e.RV6();e.j41(0,"pa-tab",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.activeTab="folders")}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("active","folders"===t.activeTab),e.R7$(),e.SpI(" ",e.bMT(2,2,"sync.details.tabs.folders")," ")}}function xn(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsy-configuration-form",19),e.nI1(1,"async"),e.nI1(2,"async"),e.nI1(3,"async"),e.bIt("configurationChange",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.updateConfiguration(i))})("validForm",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.validForm=i)}),e.k0s()}if(2&o){let t;const n=e.XpG(2),i=e.XpG();e.Y8G("sync",n)("kbId",e.bMT(1,4,i.kbId))("connector",e.bMT(2,6,i.connector))("connectorId",null==(t=e.bMT(3,8,i.connectorDef))?null:t.id)}}function Tn(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsy-folder-selection",20),e.bIt("selectedSyncItems",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.updateSelection(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("sync",t)}}function Fn(o,s){if(1&o){const t=e.RV6();e.j41(0,"div"),e.DNE(1,xn,4,10,"nsy-configuration-form",15)(2,Tn,1,1,"nsy-folder-selection",16),e.j41(3,"nsi-sticky-footer")(4,"pa-button",17),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"pa-button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.saveChanges())}),e.EFF(8),e.nI1(9,"translate"),e.k0s()()()}if(2&o){let t;const n=e.XpG(2);e.R7$(),e.vxM("settings"===(t=n.activeTab)?1:"folders"===t?2:-1),e.R7$(4),e.SpI(" ",e.bMT(6,3,"generic.cancel")," "),e.R7$(3),e.SpI(" ",e.bMT(9,5,"sync.details.buttons.save-changes")," ")}}function In(o,s){if(1&o&&(e.nrm(0,"nsy-sync-settings",21),e.nI1(1,"async"),e.nI1(2,"async")),2&o){const t=e.XpG(2),n=e.XpG();e.Y8G("sync",t)("connector",e.bMT(1,3,n.connector))("logs",e.bMT(2,5,n.activityLogs))}}function Rn(o,s){if(1&o){const t=e.RV6();e.j41(0,"nsy-folders-tab",22),e.bIt("selectionChange",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.updateFolders(i))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("sync",t)}}function Mn(o,s){if(1&o&&e.DNE(0,In,3,7,"nsy-sync-settings",21)(1,Rn,1,1,"nsy-folders-tab",16),2&o){let t;const n=e.XpG(2);e.vxM("settings"===(t=n.activeTab)?0:"folders"===t?1:-1)}}function kn(o,s){if(1&o){const t=e.RV6();e.DNE(0,Sn,6,5,"div",2),e.nI1(1,"async"),e.j41(2,"pa-tabs",3)(3,"pa-tab",4),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.activeTab="settings")}),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.DNE(6,vn,3,4,"pa-tab",5),e.nI1(7,"async"),e.k0s(),e.DNE(8,Fn,10,7,"div"),e.nI1(9,"async"),e.DNE(10,Mn,2,1)}if(2&o){let t,n;const i=e.XpG();e.vxM((t=e.bMT(1,5,i.connectorDef))?0:-1,t),e.R7$(3),e.Y8G("active","settings"===i.activeTab),e.R7$(),e.SpI(" ",e.bMT(5,7,"sync.details.tabs.settings")," "),e.R7$(2),e.vxM(null!=(n=e.bMT(7,9,i.connector))&&n.allowToSelectFolders?6:-1),e.R7$(2),e.vxM(e.bMT(9,11,i.editMode)?8:10)}}let ae=(()=>{class o{constructor(){this.router=(0,e.WQX)(S.Ix),this.currentRoute=(0,e.WQX)(S.nX),this.syncService=(0,e.WQX)($),this.toaster=(0,e.WQX)(m._g),this.sdk=(0,e.WQX)(C.ok),this.modalService=(0,e.WQX)(m.w8),this.translate=(0,e.WQX)(_.c$),this.unsubscribeAll=new I.B,this.isDeleted=new I.B,this.kbId=this.sdk.currentKb.pipe((0,u.T)(t=>t.id)),this.syncId=this.currentRoute.params.pipe((0,f.p)(t=>!!t.syncId),(0,u.T)(t=>t.syncId),(0,y.M)(t=>this.syncService.setCurrentSyncId(t))),this.sync=this.syncService.cacheUpdated.pipe((0,p.n)(()=>this.syncId),(0,p.n)(t=>this.syncService.getSync(t)),(0,M.Q)(this.isDeleted)),this.connectorDef=this.sync.pipe((0,u.T)(t=>this.syncService.connectors[t.connector.name].definition)),this.connector=this.connectorDef.pipe((0,u.T)(t=>this.syncService.getConnector(t.id,""))),this.activityLogs=this.syncId.pipe((0,p.n)(t=>this.syncService.getLogs(t))),this.activeTab="settings",this.editMode=this.currentRoute.url.pipe((0,u.T)(t=>t.length>1&&"edit"===t[1].path)),this.validForm=!1,this.isSyncing=(0,Ut.z)([this.syncId,this.syncService.isSyncing]).pipe((0,u.T)(([t,n])=>n[t]||!1))}ngOnDestroy(){this.unsubscribeAll.next(),this.unsubscribeAll.complete(),this.isDeleted.next(),this.isDeleted.complete()}toggleSync(t){this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.updateSync(n,{disabled:!t}))).subscribe({error:()=>this.toaster.error(t?"sync.details.toast.activating-failed":"sync.details.toast.disabling-failed")})}triggerSync(){this.modalService.openConfirm({title:this.translate.instant("sync.details.modal.title"),description:"sync.details.modal.description",confirmLabel:"sync.details.modal.sync-new",cancelLabel:"sync.details.modal.re-sync-all"}).onClose.pipe((0,p.n)(t=>this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.triggerSync(n,!t))))).subscribe({next:()=>this.toaster.success("sync.details.toast.triggering-sync-success"),error:()=>this.toaster.error("sync.details.toast.triggering-sync-failed")})}deleteSync(){this.sync.pipe((0,p.n)(t=>this.modalService.openConfirm({title:this.translate.instant("sync.confirm.deletion.title",{title:t.title}),description:"sync.confirm.deletion.description",isDestructive:!0,confirmLabel:"generic.delete"}).onClose.pipe((0,f.p)(n=>!!n),(0,y.M)(()=>this.isDeleted.next()),(0,p.n)(()=>this.syncService.deleteSync(t.id))))).subscribe({next:()=>this.router.navigate([".."],{relativeTo:this.currentRoute}),error:()=>this.toaster.error("sync.details.toast.deletion-failed")})}updateConfiguration(t){this.updatedConfig=t}updateSelection(t){this.updatedSelection=t}saveChanges(){!this.updatedConfig&&!this.updatedSelection||this.syncId.pipe((0,b.s)(1),(0,p.n)(t=>{const n={...this.updatedConfig};return this.updatedSelection&&(n.foldersToSync=this.updatedSelection),this.syncService.updateSync(t,n)})).subscribe({next:()=>{this.toaster.success("sync.details.toast.modification-success"),this.router.navigate([".."],{relativeTo:this.currentRoute})},error:()=>this.toaster.error("sync.details.toast.modification-failed")})}updateFolders(t){this.syncId.pipe((0,b.s)(1),(0,p.n)(n=>this.syncService.updateSync(n,{foldersToSync:t}))).subscribe({error:()=>this.toaster.error("sync.details.toast.modification-failed")})}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["nsy-sync-details-page"]],decls:7,vars:9,consts:[[1,"page-spacing"],[3,"link"],[1,"details-header"],["notFullWidth",""],["data-cy","settings-tab",3,"click","active"],["data-cy","folders-tab",3,"active"],[1,"page-title"],["size","large",3,"path"],[1,"cta-container"],[1,"toggle-container"],["withBackground","","data-cy","active-toggle",3,"valueChange","value"],["aspect","basic","data-cy","sync-now",3,"click","disabled"],["aspect","basic","routerLink","./edit"],["kind","destructive","data-cy","delete",3,"click"],["data-cy","folders-tab",3,"click","active"],["noTopBorder","",3,"sync","kbId","connector","connectorId"],[3,"sync"],["aspect","basic","routerLink",".."],["kind","primary",3,"click"],["noTopBorder","",3,"configurationChange","validForm","sync","kbId","connector","connectorId"],[3,"selectedSyncItems","sync"],[3,"sync","connector","logs"],[3,"selectionChange","sync"]],template:function(n,i){if(1&n&&(e.j41(0,"div",0)(1,"nsi-back-button",1),e.nI1(2,"async"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.DNE(5,kn,11,13),e.nI1(6,"async"),e.k0s()),2&n){let c;e.R7$(),e.Y8G("link",e.bMT(2,3,i.editMode)?"../..":".."),e.R7$(2),e.SpI(" ",e.bMT(4,5,"sync.add-page.back-button")," "),e.R7$(2),e.vxM((c=e.bMT(6,7,i.sync))?5:-1,c)}},dependencies:[g.MD,g.Jj,m.Xp,_.h,_.D9,r.V3x,E.R,r.Ymm,P.Q,r.rkm,A.a,r.aT,yn.Q,bn.w,mn,fn,S.Wk,m.o3,oe,V],styles:['@charset "UTF-8";.page-spacing[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.page-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}.details-header[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between}.cta-container[_ngcontent-%COMP%]{align-items:center;display:flex;gap:.5rem}'],changeDetection:0})}}return o})();const $n=[{path:"",component:xe,children:[{path:"",component:ze},{path:"add/:connector",component:se},{path:"add/:connector/:syncId",component:se},{path:":syncId/edit",component:ae},{path:":syncId",component:ae}]}]}}]);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "24eca36d13f0526cbc7a81598e14da3ff27e31b7",
2
+ "version": "60ddf8d33cb7802b9e87adffb82d8f38dc7d8a19",
3
3
  "production": true,
4
4
  "backend": {
5
5
  "app": "nucliadb-admin",
@@ -61,8 +61,10 @@
61
61
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="images"><path fill-rule="evenodd" d="M4.667 15.333h10.666V14H4.667v1.333Zm0-2.666h10.666v-8H4.667v8Zm-1.334 4h13.334V3.333H3.333v13.334Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="m8.68 7.986 1.882 3.135 1.378-1.55 1.515 2.148 1.09-.771-2.485-3.52-1.289 1.451-2.118-3.532-3.232 5.655 1.158.662L8.68 7.987Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M18 6v1.333h1.333v12h-12V18H6v2.667h14.667V6H18Z" clip-rule="evenodd" /> </symbol>
62
62
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="volume-mute"><path fill-rule="evenodd" d="m7.776 9.197-1.131.77H2v4.614h4.646l8.772 5.902v-3.645l3.21 3.21.92-.918-4.13-4.13V4L8.871 8.452 4.548 4.13l-.92.92 4.148 4.148Zm.988.987-1.697 1.154H3.37v1.872h3.694l6.982 4.698v-2.441l-5.283-5.283Zm5.283 3.444V6.591L9.857 9.44l4.19 4.188Zm5.912-2.65a3.005 3.005 0 0 0-.903-1.122l.832-1.09a4.376 4.376 0 0 1-.354 7.203l-.72-1.167a3.005 3.005 0 0 0 1.145-3.823Zm-3.395-1.114a3.004 3.004 0 0 1-.253 4.938l.72 1.167a4.377 4.377 0 0 0 .37-7.192l-.837 1.087Z" clip-rule="evenodd" /> </symbol>
63
63
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="search-plus"><path fill-rule="evenodd" d="M16.667 10.667H18c0 1.782-.64 3.417-1.701 4.69l5.506 5.505-.943.943-5.506-5.506A7.302 7.302 0 0 1 10.666 18c-4.043 0-7.333-3.29-7.333-7.333s3.29-7.333 7.334-7.333v1.333c-3.309 0-6 2.692-6 6s2.691 6 6 6c3.308 0 6-2.692 6-6Zm-1.334-7.333V6H18v1.333h-2.667V10H14V7.333h-2.667V6H14V3.333h1.333Z" clip-rule="evenodd" /> </symbol>
64
+ <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="labeler"><rect x="3.75" y="6.75" width="16.5" height="10.5" rx="2.25" stroke="black" style="stroke-width:1.5" fill="none" /> <rect x="10.849593" y="6.1274285" width="1.5" height="6" rx="0.75" transform="rotate(16)" fill="black" style="stroke-width:1.5" /> </symbol>
64
65
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="play"><path fill-rule="evenodd" d="M6 19.14V4.86L18.693 12 6 19.14Z" clip-rule="evenodd" /> </symbol>
65
66
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="chat"><path fill-rule="evenodd" d="M4.667 16.39v-1.057H4a.667.667 0 0 1-.667-.666v-8c0-.368.3-.667.667-.667h13.333c.368 0 .667.299.667.667V10h1.333V6.667c0-1.103-.897-2-2-2H4c-1.103 0-2 .897-2 2v8c0 .869.557 1.61 1.333 1.886v3.056l2.943-2.942h5.057v-1.334H5.724l-1.057 1.058Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M20.666 16a.667.667 0 0 1-.666.667h-.667v1.057l-1.057-1.057h-3.61A.667.667 0 0 1 14 16v-2.667c0-.368.3-.666.666-.666H20c.367 0 .666.298.666.666V16ZM20 11.333h-5.334c-1.102 0-2 .898-2 2V16c0 1.103.898 2 2 2h3.058l2.942 2.943v-3.057A2.004 2.004 0 0 0 22 16v-2.667c0-1.102-.898-2-2-2Z" clip-rule="evenodd" /> </symbol>
67
+ <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="generator"><path d="M 5.25 2.9980469 C 4.0164729 2.9980469 3 4.0145198 3 5.2480469 L 3 8.2480469 C 3 9.481574 4.0164729 10.498047 5.25 10.498047 L 18.75 10.498047 C 19.983527 10.498047 21 9.481574 21 8.2480469 L 21 5.2480469 C 21 4.0145198 19.983527 2.9980469 18.75 2.9980469 L 5.25 2.9980469 z M 5.25 4.4980469 L 18.75 4.4980469 C 19.178473 4.4980469 19.5 4.819574 19.5 5.2480469 L 19.5 8.2480469 C 19.5 8.6765198 19.178473 8.9980469 18.75 8.9980469 L 5.25 8.9980469 C 4.8215271 8.9980469 4.5 8.6765198 4.5 8.2480469 L 4.5 5.2480469 C 4.5 4.819574 4.8215271 4.4980469 5.25 4.4980469 z" /> <path d="M 5.2480469 8.9980469 C 5.0381113 8.9983545 4.8244031 9.0259766 4.6113281 9.0898438 L 5.0410156 10.527344 C 5.1017649 10.509135 5.1744829 10.498346 5.25 10.498047 L 5.2519531 10.498047 L 6.75 10.498047 L 6.75 8.9980469 L 5.25 8.9980469 L 5.25 9.7480469 L 5.2480469 8.9980469 z M 8.25 8.9980469 L 8.25 10.498047 L 9.75 10.498047 L 9.75 8.9980469 L 8.25 8.9980469 z M 11.25 8.9980469 L 11.25 10.498047 L 12.75 10.498047 L 12.75 8.9980469 L 11.25 8.9980469 z M 14.25 8.9980469 L 14.25 10.498047 L 15.75 10.498047 L 15.75 8.9980469 L 14.25 8.9980469 z M 17.25 8.9980469 L 17.25 10.498047 L 18.75 10.498047 L 18.75 8.9980469 L 17.25 8.9980469 z M 20.640625 10.027344 L 19.384766 10.845703 C 19.457483 10.957455 19.500246 11.106641 19.5 11.248047 L 19.5 11.890625 L 21 11.890625 L 21 11.25 L 21 11.248047 C 21.00039 10.818609 20.879564 10.394544 20.640625 10.027344 z M 3.0917969 10.611328 C 3.0283133 10.823848 3.0003309 11.039248 3 11.248047 L 3 12.320312 L 4.5 12.320312 L 4.5 11.25 L 4.5 11.248047 C 4.5003082 11.172619 4.5113077 11.101237 4.5292969 11.041016 L 3.0917969 10.611328 z M 19.5 13.390625 L 19.5 14.890625 L 21 14.890625 L 21 13.390625 L 19.5 13.390625 z M 3 13.820312 L 3 15.320312 L 4.5 15.320312 L 4.5 13.820312 L 3 13.820312 z M 19.5 16.390625 L 19.5 17.890625 L 21 17.890625 L 21 16.390625 L 19.5 16.390625 z M 3 16.820312 L 3 18.320312 L 4.5 18.320312 L 4.5 16.820312 L 3 16.820312 z M 19.429688 19.066406 C 19.34601 19.25395 19.143892 19.424362 18.943359 19.474609 C 18.903023 19.483989 18.874714 19.488541 18.876953 19.488281 L 19.050781 20.978516 C 19.162447 20.965563 19.244738 20.945101 19.300781 20.931641 L 19.304688 20.929688 L 19.308594 20.929688 C 19.973195 20.763159 20.520975 20.304855 20.800781 19.677734 L 19.429688 19.066406 z M 4.6855469 19.244141 L 3.546875 20.220703 C 3.7958854 20.510789 4.1144979 20.726485 4.46875 20.857422 C 4.8513269 21.002886 5.2066862 21.007882 5.4902344 20.998047 L 5.4394531 19.498047 C 5.2318579 19.505248 5.0829664 19.488045 5.0019531 19.457031 L 4.9960938 19.455078 L 4.9902344 19.453125 C 4.8736726 19.410617 4.7635231 19.334979 4.6855469 19.244141 z M 6.9648438 19.498047 L 6.9648438 20.998047 L 8.4648438 20.998047 L 8.4648438 19.498047 L 6.9648438 19.498047 z M 9.9648438 19.498047 L 9.9648438 20.998047 L 11.464844 20.998047 L 11.464844 19.498047 L 9.9648438 19.498047 z M 12.964844 19.498047 L 12.964844 20.998047 L 14.464844 20.998047 L 14.464844 19.498047 L 12.964844 19.498047 z M 15.964844 19.498047 L 15.964844 20.998047 L 17.464844 20.998047 L 17.464844 19.498047 L 15.964844 19.498047 z" /> </symbol>
66
68
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="widget"><path fill-rule="evenodd" d="M4.667 19.334h4v-4h-4v4Zm-1.334 1.333H10V14H3.333v6.667ZM4.667 10h4V6h-4v4Zm-1.334 1.334H10V4.667H3.333v6.667Zm10.667 8h4v-4h-4v4Zm-1.333 1.333h6.666V14h-6.666v6.667ZM13.172 8 16 10.83 18.828 8 16 5.171l-2.829 2.83ZM16 12.714 11.286 8 16 3.286 20.713 8 16 12.714Z" clip-rule="evenodd" /> </symbol>
67
69
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="trash"><path fill-rule="evenodd" d="M18 20c0 .368-.3.667-.667.667H8A.667.667 0 0 1 7.333 20V6H18v14ZM12.667 3.333c.735 0 1.333.598 1.333 1.334h-2.667c0-.736.598-1.334 1.334-1.334Zm8 1.334h-5.334A2.67 2.67 0 0 0 12.667 2 2.67 2.67 0 0 0 10 4.667H4.667V6H6v14c0 1.103.897 2 2 2h9.333c1.103 0 2-.897 2-2V6h1.334V4.667Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M10 18.667h1.333V8H10v10.667Zm4 0h1.333V8H14v10.667Z" clip-rule="evenodd" /> </symbol>
68
70
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="summary"><path d="M3.333 3.333h12v12h-12v-12Zm16 6.667h-2.666V8.667h4v12h-12v-4H10v2.666h9.334V10ZM4.668 4.667V14H14V4.667H4.667ZM6 7.333V6h6.667v1.333H6ZM6 10V8.667h6.667V10H6Zm0 2.667v-1.334h4v1.334H6Z" /> </symbol>
@@ -103,7 +105,9 @@
103
105
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="menu"><path d="M21 7H3V5H21V7Z" fill-rule="evenodd" /> <path d="M21 13H3V11H21V13Z" fill-rule="evenodd" /> <path d="M3 19H21V17H3V19Z" fill-rule="evenodd" /> </symbol>
104
106
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="circle-chevron-left"><path fill-rule="evenodd" d="M12 20.667c4.779 0 8.667-3.888 8.667-8.667S16.779 3.333 12 3.333 3.333 7.221 3.333 12 7.221 20.667 12 20.667ZM12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10S2 17.514 2 12 6.486 2 12 2Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="m12.862 7.529.943.942L10.276 12l3.529 3.529-.943.942L8.391 12l4.471-4.471Z" clip-rule="evenodd" /> </symbol>
105
107
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="shield-check"><g clip-path="url(#a)"> <path d="M6 4.667v8c0 2.059 1.093 3.986 2.98 5.725a16.165 16.165 0 0 0 2.221 1.706c.312.2.582.36.799.48a16.167 16.167 0 0 0 3.02-2.186c1.887-1.74 2.98-3.666 2.98-5.725v-8H6ZM4.667 3.333h14.666v9.334c0 5.676-6.748 9.119-7.034 9.263l-.299.149-.299-.149c-.286-.144-7.034-3.587-7.034-9.263V3.333Z" /> <path fill-rule="evenodd" d="m10.667 14.943-3.138-3.138.942-.943 2.196 2.195 4.862-4.862.942.943-5.804 5.805Z" clip-rule="evenodd" /> </g> <defs> <clipPath id="a"> <path d="M0 0h24v24H0z" /> </clipPath> </defs> </symbol>
108
+ <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="question-answer"><rect x="4.125" y="4.125" width="7.5" height="7.5" rx="1.5" stroke="black" style="stroke-width:1.5" fill="none" /> <path d="m 19.875,19.875 v -3.75 m -6,3.75 v -3.75 m 0,0 v -0.75 c 0,-1.656855 1.343145,-3 3,-3 v 0 c 1.6569,0 3,1.343145 3,3 v 0.75 m -6,0 h 6" stroke="black" stroke-linecap="round" style="stroke-width:1.5" fill="none" /> <rect x="7.875" y="9.375" width="1.5" height="4.5" rx="0.75" fill="black" style="stroke-width:1.5" /> </symbol>
106
109
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="synonyms"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.1668 7.33362L2.83347 15.3336H2.00014V16.6663H4.66614V15.3336H4.22214L4.80547 13.3336H7.19414L7.77814 15.3336H7.33347V16.6663H9.99947V15.3336H9.1668L6.83347 7.33362H5.1668ZM6.00014 9.23829L6.80547 11.9996H5.19414L6.00014 9.23829Z" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M8.034 4.2107L13.3673 20.2107L14.632 19.7887L9.29866 3.7887L8.034 4.2107Z" /> <path d="M21.3333 13.9385C21.3333 14.6852 21.1132 15.3265 20.6728 15.8626C20.2406 16.3987 19.5759 16.6667 18.6789 16.6667H14.6667V15.3026H15.5841V8.69748H14.6667V7.33337H18.63C19.3802 7.33337 19.9674 7.5344 20.3914 7.93645C20.8237 8.3385 21.0398 8.87457 21.0398 9.54466C21.0398 10.0329 20.9134 10.4588 20.6606 10.8226C20.4078 11.1864 20.0612 11.4161 19.6208 11.5118V11.5693C20.1916 11.6746 20.6198 11.9426 20.9052 12.3734C21.1906 12.8041 21.3333 13.3259 21.3333 13.9385ZM19.5841 9.94671C19.5841 9.4585 19.4618 9.12825 19.2171 8.95594C18.9806 8.78363 18.6748 8.69748 18.2997 8.69748H16.9419V11.2534H18.2141C18.6789 11.2534 19.0214 11.1337 19.2416 10.8944C19.4699 10.6455 19.5841 10.3296 19.5841 9.94671ZM19.8777 13.8811C19.8777 12.9621 19.4292 12.5026 18.5321 12.5026H16.9419V15.3026H18.3486C19.368 15.3026 19.8777 14.8288 19.8777 13.8811Z" /> </symbol>
110
+ <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="graph"><rect x="4.5" y="3.75" width="7.5" height="7.5" rx="3.75" stroke="black" style="stroke-width:1.5" fill="none" /> <rect x="15" y="5.25" width="4.5" height="4.5" rx="2.25" stroke="black" style="stroke-width:1.5" fill="none" /> <rect x="12" y="14.25" width="6" height="6" rx="3" stroke="black" style="stroke-width:1.5" fill="none" /> <line x1="10.374044" y1="10.083975" x2="13.374044" y2="14.583975" stroke="black" style="stroke-width:1.5" fill="none" /> <rect x="12" y="6.75" width="3" height="1.5" rx="0.75" fill="black" style="stroke-width:1.5" /> </symbol>
107
111
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="history"><path fill-rule="evenodd" d="M4.333 4.017c0-.654.53-1.183 1.183-1.183h10.469v.09c.143.058.275.145.386.256l2.708 2.708c.111.111.198.243.257.386h.09V12.1h-1.334V7.607h-2.257c-.653 0-1.183-.53-1.183-1.183V4.167H5.667v15.865h5.352v1.333H5.516c-.653 0-1.183-.53-1.183-1.182V4.017Zm11.652.663v1.594h1.594L15.985 4.68ZM7.774 6.273h4.773v1.333H7.773V6.273Zm0 3.44h8.212v1.333H7.773V9.712Zm0 3.439h3.913v1.333H7.773v-1.333Zm13.648 7.546-1.664-1.664a3.246 3.246 0 1 0-.943.943l1.664 1.664.943-.943Zm-4.382-5.352a1.913 1.913 0 1 0 0 3.826 1.913 1.913 0 0 0 0-3.826Z" clip-rule="evenodd" /> </symbol>
108
112
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="folder"><path d="M8.943 3.333 11.609 6H22v13.334H2v-16h6.943Zm11.724 4H3.333V18h17.334V7.334ZM8.39 4.668H3.333V6h6.39L8.39 4.667Z" /> </symbol>
109
113
  <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="users"><path fill-rule="evenodd" d="M3.252 18h12.17c-.551-.924-2.083-1.635-2.694-1.845-2.424-.573-2.698-1.902-2.72-2.052L10 14.002V11.93l.42-.167c.814-.324.756-.834.756-.839l-.084-.52.485-.201c.026-.024.141-.16.365-.66a.695.695 0 0 0-.095-.101l-.387-.292.427-1.23c.203-.827.12-1.685-.246-2.153-.176-.224-.405-.434-.63-.434h-.367l-.196-.23c-.001-.001-.424-.592-1.096-.592-.318.002-1.263.1-1.777.436-.603.395-1.23 1.248-.79 3.022l.398 1.213-.425.282a.5.5 0 0 0-.092.095c.118.318.344.596.434.646l.519.216-.125.504c-.006.071-.011.534.752.838l.42.166-.007 2.172c-.022.15-.29 1.481-2.78 2.072-.558.196-2.079.904-2.627 1.827Zm13.415 1.333H2v-.666c0-2.407 3.264-3.641 3.652-3.774 1.407-.337 1.612-.855 1.682-.995v-1.099c-.793-.456-1.088-1.117-1.156-1.626-.366-.321-.652-.816-.791-1.23-.167-.492.003-.92.24-1.221l-.122-.375c-.7-2.814.705-4.08 1.34-4.496.937-.612 2.348-.633 2.505-.634 1.005 0 1.688.606 2.01.976.509.093.98.385 1.33.834.366.466.912 1.511.474 3.273l-.153.443c.26.353.384.807.188 1.255-.182.415-.396.861-.705 1.161-.066.511-.36 1.18-1.16 1.64v1.114c.05.094.225.631 1.62.962.45.151 3.713 1.384 3.713 3.792v.666Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M22 19.334h-3.333V18h1.781c-.593-.919-2.237-1.63-2.893-1.841-2.54-.558-2.847-1.816-2.882-2.062l-.006-.095V11.93l.42-.166c.81-.324.816-.842.814-.9l-.017-.473.44-.195c.105-.069.287-.432.389-.644a.677.677 0 0 0-.104-.098l-.408-.298.454-1.248c.289-1.092-.018-1.804-.227-2.078-.203-.264-.483-.496-.767-.496h-.353l-.198-.211c-.015-.022-.454-.588-1.19-.611a.464.464 0 0 0-.15.074l-.895-.977c.354-.323.838-.383.932-.393l.069-.001c1.057 0 1.78.607 2.117.971a2.35 2.35 0 0 1 1.492.912c.62.808.776 1.95.439 3.213l-.155.421c.282.358.416.822.2 1.283-.216.458-.439.89-.76 1.175-.088.51-.409 1.158-1.209 1.612v1.114c.049.08.385.622 1.903.957.472.149 4.097 1.377 4.097 3.794v.666Z" clip-rule="evenodd" /> </symbol>
@@ -151,9 +151,11 @@
151
151
  "activity.type.processed": "Processats",
152
152
  "activity.type.search": "Consultes",
153
153
  "api-key-management.create-key.button": "Creeu una nova clau d’API",
154
+ "api-key-management.create-key.error": "S'ha produït un error en crear la clau d'API",
154
155
  "api-key-management.create-key.title": "Crea una clau d’API nova",
155
156
  "api-key-management.description": "Important! Copieu i deseu la clau de l’API. Desapareixerà un cop afegit.",
156
- "api-key-management.expiration-date": "Data de caducitat de la clau API",
157
+ "api-key-management.expiration-date.invalid": "La data de caducitat no pot ser posterior a {{max}}",
158
+ "api-key-management.expiration-date.title": "Data de caducitat de la clau API",
157
159
  "api-key-management.key-roles.manager": "Administrador",
158
160
  "api-key-management.key-roles.reader": "Lector",
159
161
  "api-key-management.key-roles.writer": "Escriptor",
@@ -564,6 +566,7 @@
564
566
  "kb.ai-models.extraction.config.name": "Nom de la configuració",
565
567
  "kb.ai-models.extraction.config.processing.ai_tables.help": "Converteix el contingut de les taules en MarkDown que pot ser utilitzat per un LLM.",
566
568
  "kb.ai-models.extraction.config.processing.ai_tables.label": "Interpretar taules",
569
+ "kb.ai-models.extraction.config.processing.ai_tables.merge-pages": "Combina taules dividides en diverses pàgines",
567
570
  "kb.ai-models.extraction.config.processing.ai_tables.warning": "Tingueu en compte que l’ús d’aquesta funció comporta el consum de tokens Nuclia.<br/>\n<ul>\n<li>Només s’aconsella per a documents amb taules complexes que són difícils de llegir, no tenen delimitació visual o estan dividits en diverses pàgines.</li>\n<li>No és necessari per als fitxers CSV ni Excel.</li>\n</ul>",
568
571
  "kb.ai-models.extraction.config.processing.none.label": "Cap",
569
572
  "kb.ai-models.extraction.config.processing.rules.add-rule": "Afegeix una regla",
@@ -590,6 +593,8 @@
590
593
  "kb.ai-models.semantic-model.other-models.enable": "Activar model",
591
594
  "kb.ai-models.semantic-model.other-models.failure": "S'ha produït un error en activar el model.",
592
595
  "kb.ai-models.semantic-model.other-models.title": "Activa altres models d'embeddings",
596
+ "kb.ai-models.semantic-model.other-models.warning.description": "Per a una Knowledge Box gran, aquesta operació pot generar costos addicionals importants.",
597
+ "kb.ai-models.semantic-model.other-models.warning.title": "Informació de costos",
593
598
  "kb.ai-models.summarization.prompt.description": "Defineix un prompt personalitzada que s’utilitzarà en lloc del prompt predeterminada quan es generi un resum.",
594
599
  "kb.ai-models.summarization.prompt.title": "Establiu un prompt",
595
600
  "kb.ai-models.summarization.select-llm.description": "Trieu el LLM que us proporcionarà el millor resum a demanda per a les vostres dades.",
@@ -1454,22 +1459,24 @@
1454
1459
  "synonyms.table.main-word": "Paraula principal",
1455
1460
  "synonyms.table.search": "Cerca un sinònim",
1456
1461
  "synonyms.table.synonyms": "Sinònims",
1457
- "tasks-automation.actions.delete": "Esborrar",
1462
+ "tasks-automation.actions.delete-agent.description": "Aquesta acció no es pot desfer. Si l'elimines, s'aturarà l'agent, però el contingut ja generat al vostre Knowledge Box no es veurà afectat.",
1463
+ "tasks-automation.actions.delete-agent.success": "El vostre agent s'ha suprimit correctament.",
1464
+ "tasks-automation.actions.delete-agent.title": "Suprimeix només l'agent",
1465
+ "tasks-automation.actions.delete-all.description": "Aquesta acció no es pot desfer. La supressió aturarà l'agent i les dades ja generades al vostre Knowledge Box també se suprimiran permanentment.",
1466
+ "tasks-automation.actions.delete-all.success": "L'agent i les dades generades s'han suprimit correctament.",
1467
+ "tasks-automation.actions.delete-all.title": "Suprimeix l'agent i les dades generades",
1468
+ "tasks-automation.actions.delete-data.description": "Les dades generades al vostre Knowledge Box se suprimiran permanentment i les tasques actives s'aturaran. Podeu continuar modificant el teu agent després.",
1469
+ "tasks-automation.actions.delete-data.success": "Les dades generades s'han suprimit correctament.",
1470
+ "tasks-automation.actions.delete-data.title": "Elimina les dades generades",
1458
1471
  "tasks-automation.actions.restart": "Reiniciar",
1459
1472
  "tasks-automation.actions.stop": "Parar",
1460
1473
  "tasks-automation.applies-on.existing-resources": "Recursos existents",
1461
1474
  "tasks-automation.applies-on.new-resources": "Nous recursos",
1462
1475
  "tasks-automation.bach-to-tasks": "Torna als agents",
1463
1476
  "tasks-automation.coming-soon": "Aviat",
1464
- "tasks-automation.content-safety.description": "Aquest agent marca contingut inadequat. L'etiquetatge es fa mitjançant un conjunt d'etiquetes anomenat \"safety\".",
1465
1477
  "tasks-automation.content-safety.footer.activate-button-label": "Activa l'agent",
1466
- "tasks-automation.content-safety.title": "Seguretat dels continguts",
1467
- "tasks-automation.cta.new-task": "Agent nou",
1468
- "tasks-automation.cta.see-archive": "Vegeu Arxiu",
1469
- "tasks-automation.data-augmentation-section": "Augment de dades",
1478
+ "tasks-automation.data-augmentation-section": "Creeu un agent d'augment de dades",
1470
1479
  "tasks-automation.errors.counting-resources": "S’ha produït un error en comptar els recursos que coincideixen amb la configuració de la tasca.",
1471
- "tasks-automation.errors.deleting": "La tasca no es pot suprimir perquè està en curs. Atureu la tasca per eliminar-la",
1472
- "tasks-automation.filters.all-resources": "Tots els recursos",
1473
1480
  "tasks-automation.form.apply-task-to.all": "Aplica automàticament a <strong>tots els recursos existents i futurs</strong>",
1474
1481
  "tasks-automation.form.apply-task-to.description": "Mantingueu la tasca en execució per als recursos futurs o executeu-la una vegada.",
1475
1482
  "tasks-automation.form.apply-task-to.existing": "Executeu una vegada només amb <strong>recursos existents</strong>",
@@ -1514,7 +1521,6 @@
1514
1521
  "tasks-automation.form.webhook.params.label": "Paràmetres",
1515
1522
  "tasks-automation.form.webhook.title": "Activador i webhook",
1516
1523
  "tasks-automation.form.webhook.trigger-label": "Disparador",
1517
- "tasks-automation.generator.description": "Enriquiu els vostres recursos generant text addicional (com un resum) o metadades associades als recursos escollits.",
1518
1524
  "tasks-automation.generator.field-name.description": "Prefixeu l'identificador del nou camp on s'emmagatzemaran les dades generades.",
1519
1525
  "tasks-automation.generator.field-name.info": "En cada recurs, es crearà un camp nou amb el contingut generat corresponent a la vostra consulta.",
1520
1526
  "tasks-automation.generator.field-name.invalid": "El nom del camp només ha de contenir lletres, xifres i _",
@@ -1522,7 +1528,6 @@
1522
1528
  "tasks-automation.generator.footer.activate-button-label": "Activa el generador",
1523
1529
  "tasks-automation.generator.footer.apply-automation": "Apliqueu la vostra consulta a tots els recursos existents i futurs que coincideixin amb la selecció.",
1524
1530
  "tasks-automation.generator.footer.apply-one-time": "Apliqueu la vostra consulta només a {{count}} recursos existents.",
1525
- "tasks-automation.generator.title": "Generador",
1526
1531
  "tasks-automation.generator.trigger-description": "Per a cada recurs processat amb la consulta",
1527
1532
  "tasks-automation.generator.your-question.description": "La pregunta s’aplicarà a tots els recursos de la selecció i les respostes es generaran en un nou camp.",
1528
1533
  "tasks-automation.generator.your-question.info-json": "Introduïu un esquema JSON que descrigui els atributs que voleu obtenir del document. Exemple:",
@@ -1531,7 +1536,6 @@
1531
1536
  "tasks-automation.generator.your-question.textarea-label": "La teva pregunta",
1532
1537
  "tasks-automation.generator.your-question.title": "Quina es la teva pregunta?",
1533
1538
  "tasks-automation.generator.your-question.use-json": "Produeix dades JSON estructurades",
1534
- "tasks-automation.graph-extraction.description": "Enriquiu els vostres recursos extraient NERs i relacions",
1535
1539
  "tasks-automation.graph-extraction.example-text": "Text d'exemple",
1536
1540
  "tasks-automation.graph-extraction.find-ners.description": "Els NERs i les relacions s'emmagatzemen a les metadades del recurs.",
1537
1541
  "tasks-automation.graph-extraction.find-ners.info": "Navegueu fins al recurs i després a <strong>NER</strong>",
@@ -1560,31 +1564,24 @@
1560
1564
  "tasks-automation.graph-extraction.relation-examples.source-help": "NER a partir del qual comença la relació",
1561
1565
  "tasks-automation.graph-extraction.relation-examples.target": "NER de destí",
1562
1566
  "tasks-automation.graph-extraction.relation-examples.target-help": "NER en la que acaba la relació",
1563
- "tasks-automation.graph-extraction.title": "Extracció de grafs",
1564
1567
  "tasks-automation.graph-extraction.trigger-description": "Per a cada recurs processat amb l'extracció de grafs",
1565
- "tasks-automation.labeler.description": "Automatitzeu l’anotació de blocs de text o recursos amb etiquetes per ajudar a classificar els blocs de text als vostres recursos.",
1566
1568
  "tasks-automation.labeler.find-labels.description": "Les etiquetes s'emmagatzemen a les metadades del camp de recursos.",
1567
1569
  "tasks-automation.labeler.find-labels.info": "Navegueu fins al recurs, després a <strong>Classificació</strong> i després al camp corresponent.",
1568
1570
  "tasks-automation.labeler.find-labels.title": "On trobar les etiquetes generades?",
1569
1571
  "tasks-automation.labeler.footer.activate-button-label": "Activa l’etiquetatge",
1570
1572
  "tasks-automation.labeler.footer.apply-automation": "Etiqueta tots els recursos existents i futurs que coincideixin amb la selecció.",
1571
1573
  "tasks-automation.labeler.footer.apply-one-time": "Etiqueta només {{count}} recursos existents.",
1572
- "tasks-automation.labeler.title": "Etiquetadora",
1573
1574
  "tasks-automation.labeler.trigger-description": "Per a cada recurs processat amb l’etiquetatge automàtic",
1574
- "tasks-automation.llm-security.description": "Aquest agent marca recursos o paràgrafs que contenen frases que podrien contenir atacs jailbreak. L'etiquetatge es fa mitjançant el conjunt d'etiquetes anomenat \"jailbreak_safety\".",
1575
1575
  "tasks-automation.llm-security.footer.activate-button-label": "Activa agent",
1576
1576
  "tasks-automation.llm-security.labeling.description": "Trieu com s'etiquetarà el contingut no segur.",
1577
1577
  "tasks-automation.llm-security.labeling.title": "Configuració d'etiquetatge",
1578
- "tasks-automation.llm-security.title": "Seguretat de LLM",
1579
1578
  "tasks-automation.page-description": "Milloreu el rendiment i la precisió de la vostra experiència de cerca executant agents automatitzats al vostre Knowledge Box.",
1580
1579
  "tasks-automation.page-title": "Agents",
1581
- "tasks-automation.question-answer.description": "Enriquir els vostres recursos afegint-hi preguntes i respostes automàticament.",
1582
1580
  "tasks-automation.question-answer.footer.activate-button-label": "Generar preguntes i respostes",
1583
1581
  "tasks-automation.question-answer.footer.apply-automation": "Genereu preguntes i respostes per a tots els recursos existents i futurs que coincideixin amb la selecció.",
1584
1582
  "tasks-automation.question-answer.footer.apply-one-time": "Genereu preguntes i respostes només per a {{count}} recursos existents.",
1585
1583
  "tasks-automation.question-answer.prompts.description": "Personalitzeu els prompts per generar les preguntes i les respostes.",
1586
1584
  "tasks-automation.question-answer.prompts.title": "Prompts personalitzats",
1587
- "tasks-automation.question-answer.title": "Generar preguntes i respostes",
1588
1585
  "tasks-automation.question-answer.trigger-description": "Per a cada recurs processat amb les preguntes i respostes automàtiques",
1589
1586
  "tasks-automation.settings.description": "Detalls de la configuració escollida.",
1590
1587
  "tasks-automation.settings.filter.description": "La tasca només s'executarà per als recursos que coincideixin amb els filtres seleccionats.",
@@ -1595,20 +1592,27 @@
1595
1592
  "tasks-automation.status.progress": "En progrés",
1596
1593
  "tasks-automation.status.stopped": "Parat",
1597
1594
  "tasks-automation.status.watching": "A l'espera d'actualitzacions",
1598
- "tasks-automation.table.empty": "Les vostres tasques \"{{task}}\" es mostraran aquí.",
1599
- "tasks-automation.table.has-filters": "Filtrat",
1600
1595
  "tasks-automation.table.header.actions": "Accions",
1601
1596
  "tasks-automation.table.header.activity": "Activitat",
1602
- "tasks-automation.table.header.applies-on": "S'aplica a",
1603
1597
  "tasks-automation.table.header.creation-date": "Data de creació",
1604
- "tasks-automation.table.header.field-name": "Nom del camp",
1605
- "tasks-automation.table.header.filters": "Filtres",
1606
- "tasks-automation.table.header.label-sets": "Conjunts d’etiquetes",
1607
- "tasks-automation.table.header.name": "Nom de la tasca",
1598
+ "tasks-automation.table.header.name": "Nom de l'agent",
1608
1599
  "tasks-automation.table.header.ner-family": "Família NER",
1609
- "tasks-automation.table.header.status": "Estat",
1600
+ "tasks-automation.table.header.type": "Tipus d'agent",
1610
1601
  "tasks-automation.table.processed": "{{count}} processats",
1611
1602
  "tasks-automation.trigger-description": "Per a cada recurs processat per l'agent",
1603
+ "tasks-automation.type.ask.description": "Enriquiu els vostres recursos generant text o metadades addicionals associades als recursos escollits: resum, consulta, JSON...",
1604
+ "tasks-automation.type.ask.title": "Generador",
1605
+ "tasks-automation.type.labeler.description": "Automatitzeu l’anotació de blocs de text o recursos amb etiquetes per ajudar a classificar els blocs de text als vostres recursos.",
1606
+ "tasks-automation.type.labeler.title": "Etiquetadora",
1607
+ "tasks-automation.type.llama-guard.description": "Aquest agent marca contingut inadequat. L'etiquetatge es fa mitjançant un conjunt d'etiquetes anomenat \"safety\".",
1608
+ "tasks-automation.type.llama-guard.title": "Seguretat dels continguts",
1609
+ "tasks-automation.type.llm-graph.description": "Enriquiu els vostres recursos extraient NERs i relacions dels vostres recursos.",
1610
+ "tasks-automation.type.llm-graph.title": "Extracció de grafs",
1611
+ "tasks-automation.type.prompt-guard.description": "Aquest agent marca recursos o paràgrafs que contenen frases que podrien contenir atacs jailbreak. L'etiquetatge es fa mitjançant el conjunt d'etiquetes anomenat \"jailbreak_safety\".",
1612
+ "tasks-automation.type.prompt-guard.title": "Seguretat de LLM",
1613
+ "tasks-automation.type.synthetic-questions.description": "Enriquir els vostres recursos afegint-hi preguntes i respostes automàticament.",
1614
+ "tasks-automation.type.synthetic-questions.title": "Generar preguntes i respostes",
1615
+ "tasks-automation.your-agents": "Els teus agents",
1612
1616
  "test-page.search": "Cerca",
1613
1617
  "test-page.select-widget": "Seleccionar widget",
1614
1618
  "test-page.title": "Pàgina de proves",