PageSourceSearch

https://app.kitesuite.com/chunk-EERA5QU5.js

js kitesuite.com collected 2026-09-24 12:58:59 UTC 17,327 bytes, 1 lines download raw bytes

1import{a as gt,b as ht}from"./chunk-JMKLO3YP.js";import{I as pt,J as mt,d as lt,e as ct,y as dt}from"./chunk-Q6H3L72M.js";import"./chunk-RGX4V25P.js";import{Fg as rt,Ra as ot,kh as st}from"./chunk-QRVLGQKK.js";import{Ae as tt,Ba as J,De as St,Ee as et,Fe as Ct,Xa as Q,Za as Z,oa as X,ta as q}from"./chunk-JIWAKM2T.js";import"./chunk-WKDVIJXK.js";import{$b as v,Aa as M,Ba as E,Cb as p,Ee as it,Fd as N,Fe as nt,He as at,Id as D,Kb as C,Lb as z,Mc as m,Nb as P,Nc as g,Ob as k,Pb as o,Qa as u,Qb as r,Qd as W,Rb as f,Vb as F,Vd as K,Zd as vt,_a as $,ad as _,bc as T,dd as y,gb as a,ka as ft,le as Y,md as U,me as Tt,nc as d,oa as H,oc as h,pa as O,pc as G,rb as j,sa as x,sb as w,w as B,xb as S}from"./chunk-MYMWKJG6.js";import"./chunk-C6VQXCV6.js";import"./chunk-EHBGTBDH.js";import"./chunk-ZLSUGC56.js";import{a as b,b as A}from"./chunk-RUSNHN4F.js";D();Tt();at();y();D();Z();vt();y();ft();y();var ut=(()=>{class e{constructor(){this.http=x(K),this.base="/api/v1/ats/settings/activity"}list(t={}){let n=new W;for(let[i,s]of Object.entries(t))s!=null&&s!==""&&(n=n.set(i,String(s)));return this.http.get(this.base,{params:n}).pipe(B(({groups:i,stats:s,facets:c,pagination:I})=>({groups:i,stats:s,facets:c,pagination:I})))}exportCsvUrl(t={}){let n=new URLSearchParams;for(let[s,c]of Object.entries(t))s==="before"||s==="limit"||c!=null&&c!==""&&n.set(s,String(c));let i=n.toString();return`${this.base}/export${i?`?${i}`:""}`}exportCsv(t={}){return this.http.get(this.exportCsvUrl(t),{responseType:"blob"})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();y();D();Z();Ct();St();at();var bt=(e,l)=>l.key,xt=(e,l)=>l.id;function At(e,l){e&1&&f(0,"span",15)}function yt(e,l){if(e&1&&f(0,"app-stats-grid",18),e&2){let t=T();p("cards",t.statCards())}}function It(e,l){if(e&1){let t=F();o(0,"button",26),v("click",function(){M(t);let i=T();return E(i.clearFilters())}),d(1),m(2,"translate"),r()}e&2&&(a(),h(g(2,1,"ATS.OFFERS.CLEAR_FILTERS")))}function Ot(e,l){e&1&&f(0,"app-ats-skeleton",23)}function Mt(e,l){if(e&1){let t=F();o(0,"div",24)(1,"p",27),d(2),m(3,"translate"),r(),o(4,"button",28),v("click",function(){M(t);let i=T();return E(i.load())}),d(5),m(6,"translate"),r()()}e&2&&(a(2),h(g(3,2,"ATS.SETTINGS.ACTIVITY.LOAD_FAILED")),a(3),h(g(6,4,"ATS.REPORTS.RETRY")))}function Et(e,l){e&1&&(o(0,"div",25),d(1),m(2,"translate"),r()),e&2&&(a(),h(g(2,1,"ATS.SETTINGS.ACTIVITY.NO_DATA")))}function wt(e,l){e&1&&(o(0,"div",25),d(1),m(2,"translate"),r()),e&2&&(a(),h(g(2,1,"ATS.SETTINGS.ACTIVITY.NO_MATCH")))}function Pt(e,l){if(e&1&&(o(0,"span"),d(1),r()),e&2){let t=l.$implicit;a(),h(t)}}function kt(e,l){if(e&1&&(o(0,"div",40)(1,"span",41),d(2),r(),o(3,"span",42),d(4," \u2192 "),r(),o(5,"span",43),d(6),r()()),e&2){let t=T().$implicit;a(2),h(t.diff.del),a(4),h(t.diff.add)}}function Ft(e,l){if(e&1&&(o(0,"div",34)(1,"div",35),f(2,"app-svg-image",36),r(),o(3,"div",37),f(4,"div",38),o(5,"div",39),P(6,Pt,2,1,"span",null,z),r(),S(8,kt,7,2,"div",40),r()()),e&2){let t=l.$implicit,n=T(3);p("ngClass",t.severity),a(2),p("value",n.iconFor(t.action))("height",16)("width",16),a(2),p("innerHTML",t.titleHtml,$),a(2),k(t.meta),a(2),C(t.diff?8:-1)}}function Nt(e,l){if(e&1&&(o(0,"div",30)(1,"span",31),d(2),r(),f(3,"span",32),o(4,"span",33),d(5),r()(),P(6,Ft,9,6,"div",34,xt)),e&2){let t=l.$implicit;a(2),h(t.label),a(3),h(t.count),a(),k(t.rows)}}function Vt(e,l){e&1&&f(0,"span",15)}function Lt(e,l){if(e&1){let t=F();o(0,"div",29)(1,"button",44),v("click",function(){M(t);let i=T(2);return E(i.showOlder())}),S(2,Vt,1,0,"span",15),d(3),m(4,"translate"),r()()}if(e&2){let t=T(2);a(),p("disabled",t.loadingMore()),a(),C(t.loadingMore()?2:-1),a(),G(" ",g(4,3,"ATS.SETTINGS.ACTIVITY.SHOW_OLDER")," ")}}function Gt(e,l){if(e&1&&(P(0,Nt,8,2,null,null,bt),S(2,Lt,5,5,"div",29)),e&2){let t=T();k(t.visibleGroups()),a(2),C(t.hasMore()?2:-1)}}var V=(()=>{class e{get DATE_PRESETS(){return[{value:"1d",label:this.translate.instant("ATS.SETTINGS.ACTIVITY.LAST_24H")},{value:"7d",label:this.translate.instant("ATS.SETTINGS.ACTIVITY.LAST_7_DAYS")},{value:"30d",label:this.translate.instant("ATS.OFFERS.LAST_30_DAYS")},{value:"all",label:this.translate.instant("ATS.OFFERS.ALL_TIME")}]}constructor(){this.ddOpts1=_(()=>[{value:"",label:this.translate.instant("ATS.SETTINGS.ACTIVITY.ACTION_ALL")},...this.facetActions().map(t=>({value:t,label:`${this.actionLabel(t)}
1`}))]),this.ddOpts2=_(()=>[{value:"",label:this.translate.instant("ATS.SETTINGS.ACTIVITY.ENTITY_ALL")},...this.facetEntities().map(t=>({value:t,label:`${t}`}))]),this.ddOpts3=_(()=>[...this.DATE_PRESETS.map(t=>({value:t.value,label:`${t.label}`}))]),this.svc=x(ut),this.settingsNav=x(pt),this.toast=x(dt),this.translate=x(it),this.loading=u(!0),this.error=u(!1),this.loadingMore=u(!1),this.exporting=u(!1),this.data=u(null),this.workspaceName=u("Acme Inc."),this.actionFilter=u(""),this.entityFilter=u(""),this.datePreset=u("7d"),this.search=u(""),this.statCards=_(()=>{let t=this.data()?.stats;return t?[{label:this.translate.instant("ATS.SETTINGS.ACTIVITY.STAT_EVENTS_TODAY"),value:t.eventsToday},{label:this.translate.instant("ATS.SETTINGS.ACTIVITY.STAT_THIS_WEEK"),value:t.thisWeek.toLocaleString()},{label:this.translate.instant("ATS.SETTINGS.ACTIVITY.STAT_SIGNINS"),value:t.signins24h,delta:this.translate.instant("ATS.SETTINGS.ACTIVITY.PAST_24H")},{label:this.translate.instant("ATS.SETTINGS.ACTIVITY.STAT_PERMISSION_CHANGES"),value:t.permissionChanges7d,delta:this.translate.instant("ATS.SETTINGS.ACTIVITY.PAST_7D")}]:[]}),this.facetActions=_(()=>this.data()?.facets.actions??[]),this.facetEntities=_(()=>this.data()?.facets.entityTypes??[]),this.hasMore=_(()=>this.data()?.pagination.hasMore??!1),this.visibleGroups=_(()=>{let t=this.data()?.groups??[],n=this.search().trim().toLowerCase();return n?t.map(i=>A(b({},i),{rows:i.rows.filter(s=>this.matches(s,n))})).filter(i=>i.rows.length>0).map(i=>A(b({},i),{count:i.rows.length})):t}),this.anyVisible=_(()=>this.visibleGroups().some(t=>t.rows.length>0)),this.filtersActive=_(()=>!!this.actionFilter()||!!this.entityFilter()||this.datePreset()!=="7d"||!!this.search().trim()),this.load()}matches(t,n){return`${t.titleHtml.replace(/<[^>]+>/g,"")} ${t.meta.join(" ")} ${t.action} ${t.actorName??""}`.toLowerCase().includes(n)}fromForPreset(t){if(t==="all")return;let n=t==="1d"?1:t==="7d"?7:30;return new Date(Date.now()-n*24*60*60*1e3).toISOString()}currentFilters(t={}){return b({action:this.actionFilter()||void 0,entityType:this.entityFilter()||void 0,from:this.fromForPreset(this.datePreset())},t)}load(){this.loading.set(!0),this.error.set(!1),this.svc.list(this.currentFilters()).subscribe({next:t=>{this.data.set(t),this.loading.set(!1)},error:()=>{this.data.set(null),this.error.set(!0),this.loading.set(!1)}})}onActionChange(t){this.actionFilter.set(t),this.load()}onEntityChange(t){this.entityFilter.set(t),this.load()}onDateChange(t){this.datePreset.set(t),this.load()}onSearch(t){this.search.set(t)}clearFilters(){this.actionFilter.set(""),this.entityFilter.set(""),this.datePreset.set("7d"),this.search.set(""),this.load()}showOlder(){let t=this.data()?.pagination.oldestAt;!t||this.loadingMore()||(this.loadingMore.set(!0),this.svc.list(this.currentFilters({before:t})).subscribe({next:n=>{this.data.update(i=>i?A(b({},i),{groups:this.mergeGroups(i.groups,n.groups),pagination:n.pagination}):n),this.loadingMore.set(!1)},error:n=>{console.error("Failed to load older events",n),this.loadingMore.set(!1)}}))}mergeGroups(t,n){let i=t.map(s=>A(b({},s),{rows:[...s.rows]}));for(let s of n){let c=i.find(I=>I.key===s.key);if(c){let I=new Set(c.rows.map(L=>L.id));c.rows.push(...s.rows.filter(L=>!I.has(L.id))),c.count=c.rows.length}else i.push(A(b({},s),{rows:[...s.rows]}))}return i}exportCsv(){this.exporting()||(this.exporting.set(!0),this.svc.exportCsv(this.currentFilters()).subscribe({next:t=>{this.exporting.set(!1);let n=URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.download=`activity-log-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n),this.toast.success(this.translate.instant("ATS.SETTINGS.ACTIVITY.EXPORTED"))},error:()=>{this.exporting.set(!1),this.toast.error(this.translate.instant("ATS.SETTINGS.ACTIVITY.EXPORT_FAILED"))}}))}actionLabel(t){let n=ht(this.translate,t);return n.charAt(0).toUpperCase()+n.slice(1)}iconFor(t){return gt(t)}onSettingsNav(t){this.settingsNav.go(t)}backToApp(){this.settingsNav.back()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=j({type:e,selectors:[["app-ats-activity-settings"]],decls:44,vars:44,consts:[["active","activity-log","label","ATS.SETTINGS.NAV.ACTIVITY_LOG",3,"customHeader"],[1,"al-topbar"],[1,"al-topbar-left"],[1,"settings-crumb",3,"click"],[1,"lh-normal","mb-0","crumb-text"],[1,"scale","breadcrumbs-list-angle1","mx-1"],["value","ic-arrow-breadcrumb","stroke","#333333","fill","none","className","svg-stroke",3,"height","width"],[1,"lh-normal","mb-0","crumb-text","crumb-current"],[1,"al-topbar-search"],["aria-hidden","true",1,"al-search-icon"],["value","ic-ats-search",3,"height","width"],[1,"input",3,"ngModelChange","placeholder","ngModel"],[1,"main-scroll"],[3,"title","subtitle"],[1,"btn","btn-outline","btn-sm",3,"click","disabled"],["aria-hidden","true",1,"ats-btn-spinner"],["nz-tooltip","","nzTooltipPlacement","top",2,"display","inline-flex",3,"nzTooltipTitle"],["disabled","",1,"btn","btn-outline","btn-sm"],[1,"d-block","mb-4",3,"cards"],[1,"al-filter-card","mb-4"],[1,"text-label"],["classes","w-100","bindLabel","label","bindValue","value",3,"change","items","value"],[1,"btn","btn-ghost","btn-sm","al-clear"],["variant","list"],[1,"al-error"],[1,"al-loading"],[1,"btn","btn-ghost","btn-sm","al-clear",3,"click"],[1,"text-muted"],[1,"btn","btn-outline","btn-sm",3,"click"],[1,"al-more"],[1,"day-head"],[1,"label"],[1,"line"],[1,"count"],[1,"act-row",3,"ngClass"],["aria-hidden","true",1,"icon-tile"],["stroke","currentColor",3,"value","height","width"],[1,"body"],[1,"title",3,"innerHTML"],[1,"meta"],[1,"diff"],[1,"del"],[1,"diff-arrow"],[1,"add"],[1,"btn","btn-ghost","btn-sm",3,"click","disabled"]],template:function(n,i){n&1&&(o(0,"app-settings-shell",0)(1,"header",1)(2,"div",2)(3,"a",3),v("click",function(){return i.backToApp()}),o(4,"h6",4),d(5),m(6,"translate"),r()(),o(7,"div",5),f(8,"app-svg-image",6),r(),o(9,"h6",7),d(10),m(11,"translate"),r()(),o(12,"div",8)(13,"span",9),f(14,"app-svg-image",10),r(),o(15,"input",11),m(16,"translate"),v("ngModelChange",function(c){return i.onSearch(c)}),r()()(),o(17,"div",12)(18,"app-page-header",13),m(19,"translate"),m(20,"translate"),o(21,"button",14),v("click",function(){return i.exportCsv()}),S(22,At,1,0,"span",15),d(23),m(24,"translate"),r(),o(25,"span",16),m(26,"translate"),o(27,"button",17),d(28),m(29,"translate"),r()()(),S(30,yt,1,1,"app-stats-grid",18),o(31,"div",19)(32,"span",20),d(33),m(34,"translate"),r(),o(35,"ng-dropdown",21),v("change",function(c){return i.onActionChange(c)}),r(),o(36,"ng-dropdown",21),v("change",function(c){return i.onEntityChange(c)}),r(),o(37,"ng-dropdown",21),v("change",function(c){return i.onDateChange(c)}),r(),S(38,It,3,3,"button",22),r(),S(39,Ot,1,0,"app-ats-skeleton",23)(40,Mt,7,6,"div",24)(41,Et,3,3,"div",25)(42,wt,3,3,"div",25)(43,Gt,3,1),r()()),n&2&&(p("customHeader",!0),a(5),h(g(6,26,"COMMON.SETTINGS")),a(3),p("height",10)("width",10),a(2),h(g(11,28,"ATS.SETTINGS.NAV.ACTIVITY_LOG")),a(4),p("height",14)("width",14),a(),p("placeholder",g(16,30,"ATS.SETTINGS.ACTIVITY.SEARCH_PH"))("ngModel",i.search()),a(3),p("title",g(19,32,"ATS.SETTINGS.NAV.ACTIVITY_LOG"))("subtitle",g(20,34,"ATS.SETTINGS.ACTIVITY.SUBTITLE")),a(3),p("disabled",i.exporting()),a(),C(i.exporting()?22:-1),a(),G(" ",g(24,36,"ATS.OFFERS.EXPORT_CSV")," "),a(2),p("nzTooltipTitle",g(26,38,"ATS.SETTINGS.ACTIVITY.WEBHOOKS_TOOLTIP")),a(3),h(g(29,40,"ATS.SETTINGS.ACTIVITY.WEBHOOKS")),a(2),C(i.statCards().length>0?30:-1),a(3),h(g(34,42,"ATS.SHELL.FILTER_LABEL")),a(2),p("items",i.ddOpts1())("value",i.actionFilter()),a(),p("items",i.ddOpts2())("value",i.entityFilter()),a(),p("items",i.ddOpts3())("value",i.datePreset()),a(),C(i.filtersActive()?38:-1),a(),C(i.loading()?39:i.error()?40:i.data()?i.anyVisible()?43:42:41))},dependencies:[N,U,Q,X,q,J,mt,lt,ct,st,et,ot,tt,rt,nt],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.al-topbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1.5rem;border-bottom:1px solid var(--border);background:var(--surface);gap:1rem;flex-shrink:0}.al-topbar-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.settings-crumb[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none}.crumb-text[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:500;color:var(--ink-soft, #57576b);white-space:nowrap}.settings-crumb[_ngcontent-%COMP%]:hover   .crumb-text[_ngcontent-%COMP%]{color:var(--accent, #5b47e0)}.crumb-current[_ngcontent-%COMP%]{font-weight:700;color:var(--ink, #1a1a2e)}.breadcrumbs-list-angle1[_ngcontent-%COMP%]{display:inline-flex;align-items:center;line-height:0}.al-topbar-search[_ngcontent-%COMP%]{position:relative;flex:1;max-width:360px;display:flex;align-items:center}.al-topbar-search[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]{width:100%;padding-left:2rem}.al-search-icon[_ngcontent-%COMP%]{position:absolute;
1left:.625rem;color:var(--ink-muted);font-size:14px;pointer-events:none}.al-topbar-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.al-error[_ngcontent-%COMP%]{padding:2rem 1rem;text-align:center;display:flex;flex-direction:column;align-items:center;gap:.75rem}.al-loading[_ngcontent-%COMP%]{padding:3rem 1rem;text-align:center;color:var(--ink-muted);font-size:.875rem}.al-filter-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;padding:.75rem 1rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius, 8px)}.input-sm[_ngcontent-%COMP%]{font-size:12px;padding:.3rem .5rem;height:auto}.al-clear[_ngcontent-%COMP%]{margin-left:auto}.day-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.75rem .25rem .25rem;margin-top:1rem}.day-head[_ngcontent-%COMP%]:first-of-type{margin-top:0}.day-head[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-size:13px;font-weight:700}.day-head[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{flex:1;height:1px;background:var(--border)}.day-head[_ngcontent-%COMP%]   .count[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:var(--ink-muted);padding:2px 8px;background:var(--surface-alt);border-radius:999px;border:1px solid var(--border)}.act-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem 1rem;border-radius:var(--radius-sm, 6px);background:var(--surface);border:1px solid var(--border);transition:border-color .15s}.act-row[_ngcontent-%COMP%] + .act-row[_ngcontent-%COMP%]{margin-top:.5rem}.act-row[_ngcontent-%COMP%]:hover{border-color:var(--border-strong, var(--ink-muted))}.act-row[_ngcontent-%COMP%]   .icon-tile[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:8px;background:var(--surface-alt);display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}.act-row.success[_ngcontent-%COMP%]   .icon-tile[_ngcontent-%COMP%]{background:var(--success-bg, #F0FDF4);color:var(--success-dark, #15803D)}.act-row.warn[_ngcontent-%COMP%]   .icon-tile[_ngcontent-%COMP%]{background:var(--warning-bg, #FFFBEB);color:var(--warning)}.act-row.danger[_ngcontent-%COMP%]   .icon-tile[_ngcontent-%COMP%]{background:var(--danger-bg, #FEF2F2);color:var(--danger, #DC2626)}.act-row.info[_ngcontent-%COMP%]   .icon-tile[_ngcontent-%COMP%]{background:var(--accent-light);color:var(--accent)}.act-row[_ngcontent-%COMP%]   .body[_ngcontent-%COMP%]{flex:1;min-width:0}.act-row[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:13px;line-height:1.4}.act-row[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]     strong{font-weight:700}.act-row[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]     .text-success{color:var(--success-dark, #15803D)}.act-row[_ngcontent-%COMP%]   .meta[_ngcontent-%COMP%]{font-size:11px;color:var(--ink-muted);margin-top:4px;display:flex;gap:.75rem;flex-wrap:wrap}.diff[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:11px;padding:.5rem;background:var(--surface-alt);border-radius:var(--radius-xs, 4px);margin-top:6px}.diff[_ngcontent-%COMP%]   .del[_ngcontent-%COMP%]{color:var(--danger, #DC2626);text-decoration:line-through}.diff[_ngcontent-%COMP%]   .add[_ngcontent-%COMP%]{color:var(--success-dark, #15803D)}.diff[_ngcontent-%COMP%]   .diff-arrow[_ngcontent-%COMP%]{color:var(--ink-muted)}.al-more[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:1rem;margin-bottom:.5rem}'],changeDetection:0})}}return e})();y();var Dt=[{path:"",component:V,pathMatch:"full"}],_t=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=w({type:e})}static{this.\u0275inj=O({imports:[Y.forChild(Dt),Y]})}}return e})();y();var ue=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=w({type:e})}static{this.\u0275inj=O({imports:[N,_t,V]})}}return e})();export{ue as ActivitySettingsModule};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.