PageSourceSearch

https://members.dendrology.org/705.8c69481feb9c2918.js

js dendrology.org collected 2026-10-02 07:54:33 UTC 20,964 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkVeryConnect=self.webpackChunkVeryConnect||[]).push([[705],{60705:(wt,T,s)=>{s.r(T),s.d(T,{IntegrationsAdminModule:()=>Kt});var J=s(72922),F=s(60611),I=s(50245),L=s(72264),g=s(61211),U=s(25111),Q=s(87638),B=s(662),H=s(45302),t=s(14026),i=s(52805),C=s(89969),f=s(19807),u=s(15859),k=s(65606),G=s(74174),v=s(97482),z=s(8592),A=s(64762),j=s(78425),Y=s(9803),X=s(3811),$=s(25336),q=s(49120),P=s(41958),b=s(85597),Z=s(56625),V=s(87563),K=s(42809),W=s(26477),w=s(83375),tt=s(48e3),et=s(92362),nt=s(85960),c=s(64177),p=s(10218),ot=s(26495),M=s(90237),h=s(62441),d=s(64683);function at(e,o){if(1&e&&(t.TgZ(0,"option",11),t._uU(1),t.qZA()),2&e){const n=o.$implicit;t.Q6J("ngValue",n),t.xp6(1),t.Oqu(n.name)}}function st(e,o){if(1&e){const n=t.EpF();t.TgZ(0,"td")(1,"tg-help-block-container")(2,"select",4),t.NdJ("ngModelChange",function(r){const x=t.CHM(n).$implicit,Wt=t.oxw();return t.KtG(Wt.onAccountsChange(x,r))})("blur.passive",function(){t.CHM(n);const r=t.oxw();return t.KtG(r.onTouch())}),t.YNc(3,at,2,2,"option",5),t.qZA()()()}if(2&e){const n=o.$implicit,a=t.oxw();t.xp6(2),t.Q6J("name","account_"+n)("ngModel",a.accounts[n])("required",!0),t.xp6(1),t.Q6J("ngForOf",a.tenantAccounts)("ngForTrackBy",a.trackById)}}function rt(e,o){if(1&e&&(t.TgZ(0,"option",11),t._uU(1),t.qZA()),2&e){const n=o.$implicit;t.Q6J("ngValue",n.id),t.xp6(1),t.Oqu(n.name)}}const it=function(e){return{$implicit:e}};function ct(e,o){if(1&e&&(t.TgZ(0,"tr"),t._UZ(1,"td",3),t.GkF(2,12),t.qZA()),2&e){const n=o.$implicit;t.oxw(2);const a=t.MAs(3);t.xp6(1),t.Q6J("translate","account_"+n),t.xp6(1),t.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",t.VKq(3,it,n))}}const lt=function(){return{$implicit:"default"}};function ut(e,o){if(1&e&&(t.TgZ(0,"tr")(1,"td")(2,"tg-info-bubble"),t._uU(3),t.ALo(4,"tr"),t.qZA(),t._UZ(5,"span",3),t.qZA(),t.GkF(6,12),t.qZA(),t.YNc(7,ct,3,5,"tr",13)),2&e){const n=t.oxw(),a=t.MAs(3);t.xp6(3),t.Oqu(t.lcZ(4,5,"defaultAccTT")),t.xp6(2),t.Q6J("translate","account_default"),t.xp6(1),t.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",t.DdM(7,lt)),t.xp6(1),t.Q6J("ngForOf",n.extraAccountNames)}}function pt(e,o){1&e&&(t.TgZ(0,"tr")(1,"td",14),t._UZ(2,"tg-loader-spinner"),t.qZA()())}const y=new t.OlP("Xero status editing cache");class l extends et.k{constructor(){super(),this.accounts={},this.apiRequestMade=new t.vpe,this.cancel=new t.vpe,this.extraAccountNames=[],this.loadingAccounts=!1,this.save$=new t.vpe,this.tenantAccounts=[],this.trackById=nt.trackById,this._tenant$=new Y.X(void 0),this.alert=(0,t.f3M)(f.c),this.fetchesInProgress=0,this.ns=(0,t.f3M)(v.z),this.xeroRes=(0,t.f3M)(g.i),this.value={accounts:{},tenant:void 0},this.fetchCache=(0,t.f3M)(y,{optional:!0})??new Map}ngOnDestroy(){(0,w.completeAll)(this._tenant$,this.save$,this.cancel,this.apiRequestMade)}ngOnInit(){this._tenant$.pipe((0,X.w)(o=>o?this.fetchAccounts(o):(0,$.of)([])),(0,b.R)(this._tenant$.pipe((0,Z.Z)(null,null)))).subscribe(o=>{this.tenantAccounts=o,this.cdr.markForCheck()})}normaliseWriteValue(o){return{...this.value,...o,accounts:{...this.value.accounts,...o?.accounts}}}onAccountsChange(o,n){this.accounts={...this.accounts,[o]:n},this.onChange({...this.value,accounts:this.accounts})}onTenantChange(o){this.tenant=o,this.onChange({...this.value,tenant:o})}onValueWritten(o){this.tenant=o.tenant,this.accounts=o.accounts}save(){this.ngForm.valid?this.ngForm.dirty?this.save$.emit():(this.alert.alertInfo({key:"noChangesToSave",ns:this.ns}),this.cancel.emit()):(this.ngForm.form.markAllAsTouched(),this.cdr.detectChanges())}fetchAccounts(o){const n=this.fetchCache.get(o);if(n)return n;const a=(0,q.P)(()=>(++this.fetchesInProgress,this.loadingAccounts=!0,this.cdr.markForCheck(),this.xeroRes.accounts({tenantId:o}))).pipe((0,C.b)(this.onApiRequestSucceeded),(0,V.K)(r=>(this.alert.negotiate(r),this.fetchCache.delete(o),this.onApiRequestFinished(),P.E)),(0,K.d)(1));return this.fetchCache.set(o,a),a}onApiRequestFinished(){--this.fetchesInProgress,this.loadingAccounts=0!==this.fetchesInProgress,this.cdr.markForCheck(),this.apiRequestMade.emit()}onApiRequestSucceeded(o){for(const[n,a]of Object.entries(this.accounts)){const r=o.find(m=>m.id===a.id);r&&(this.accounts={...this.accounts,[n]:r})}this.onApiRequestFinished()}}l.\u0275fac=function(o){return new(o||l)},l.\u0275cmp=t.Xpm({type:l,selectors:[["tg-xero-status-editing"]],viewQuery:function(o,n){if(1&o&&t.Gf(i.F,5),2&o){let a;t.iGM(a=t.CRH())&&(n.ngForm=a.first)}},inputs:{availableTenants:"availableTenants",extraAccountNames:"extraAccountNames"},outputs:{apiRequestMade:"apiRequestMade",cancel:"cancel",save$:"save"},standalone:!0,features:[t._Bn([{multi:!0,provide:i.JU,useExisting:(0,t.Gpc)(()=>l)}]),t.qOj,t.jDz],decls:22,vars:16,consts:[[1,"table","table-condensed","xero-tbl"],["ngForm",""],["acctTd",""],[3,"translate"],[1,"form-control",3,"name","ngModel","required","ngModelChange","blur.passive"],[3,"ngValue",4,"ngFor","ngForOf","ngForTrackBy"],["tplAccountsLoaded",""],[4,"ngIf","ngIfElse"],["colspan","2",1,"text-right"],[1,"btn","btn-primary",3,"click.passive"],[1,"btn","btn-danger",3,"click.passive"],[3,"ngValue"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngFor","ngForOf"],["colspan","2",1,"text-center"]],template:function(o,n){if(1&o&&(t.TgZ(0,"table",0)(1,"tbody",1),t.YNc(2,st,4,5,"ng-template",null,2,t.W1O),t.TgZ(4,"tr"),t._UZ(5,"td",3),t.TgZ(6,"td")(7,"tg-help-block-container")(8,"select",4),t.NdJ("ngModelChange",function(r){return n.onTenantChange(r)})("blur.passive",function(){return n.onTouch()}),t.YNc(9,rt,2,2,"option",5),t.qZA()()()(),t.YNc(10,ut,8,8,"ng-template",null,6,t.W1O),t.YNc(12,pt,3,0,"tr",7),t.qZA(),t.TgZ(13,"tfoot")(14,"tr")(15,"td",8)(16,"button",9),t.NdJ("click.passive",function(){return n.save()}),t._uU(17),t.ALo(18,"tr"),t.qZA(),t.TgZ(19,"button",10),t.NdJ("click.passive",function(){return n.cancel.emit()}),t._uU(20),t.ALo(21,"tr"),t.qZA()()()()()),2&o){const a=t.MAs(11);
1t.xp6(5),t.Q6J("translate","tenant"),t.xp6(3),t.Q6J("name","tenant")("ngModel",n.tenant)("required",!0),t.xp6(1),t.Q6J("ngForOf",n.availableTenants)("ngForTrackBy",n.trackById),t.xp6(3),t.Q6J("ngIf",n.loadingAccounts)("ngIfElse",a),t.xp6(5),t.Oqu(t.xi3(18,10,"save","common")),t.xp6(3),t.Oqu(t.xi3(21,13,"cancel","common"))}},dependencies:[u.GlobalModule,c.sg,c.O5,c.tP,p.P,ot.f,M.I,h.h,d.H,i.u5,i.YN,i.Kr,i.EJ,i.JJ,i.JL,i.Q7,i.On,i.F,W.d],encapsulation:2,changeDetection:0}),(0,A.gn)([(0,tt.Z)("_tenant$")],l.prototype,"tenant",void 0),(0,A.gn)([(0,j.h)()],l.prototype,"onApiRequestSucceeded",null);var N=s(22009),R=s(50339);let dt=(()=>{class e{constructor(){this.AUTH_URL="/api/v1/xero/authorise"}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["tg-xero-no-token"]],standalone:!0,features:[t.jDz],decls:2,vars:3,consts:[[1,"alert","alert-info",3,"translate"],[1,"btn","btn-primary","btn-lg",3,"href","translate"]],template:function(n,a){1&n&&t._UZ(0,"div",0)(1,"a",1),2&n&&(t.Q6J("translate","noToken"),t.xp6(1),t.Q6J("href",a.AUTH_URL,t.LSH)("translate","authorise"))},dependencies:[u.GlobalModule,p.P,N.a,R.k],styles:["[_nghost-%COMP%]{display:block;margin-bottom:1rem;text-align:center}"],changeDetection:0}),e})();var mt=s(85868);function gt(e,o){if(1&e&&t._uU(0),2&e){const n=t.oxw();t.Oqu(n.tenant.name)}}function ht(e,o){1&e&&t._UZ(0,"i",7)}function ft(e,o){if(1&e&&t._uU(0),2&e){const n=t.oxw().$implicit;t.Oqu(n[1].name)}}function _t(e,o){if(1&e&&(t.TgZ(0,"tr"),t._UZ(1,"td",1),t.TgZ(2,"td"),t.YNc(3,ft,1,1,"ng-template",8),t.qZA()()),2&e){const n=o.$implicit;t.oxw();const a=t.MAs(7);t.ekj("danger",!n[1]),t.xp6(1),t.Q6J("translate","account_"+n[0]),t.xp6(2),t.Q6J("ngIf",n[1])("ngIfElse",a)}}let xt=(()=>{class e{constructor(){this.edit=new t.vpe,this.extraAccountNames=[],this.renderedAccounts=[["default"]]}accTrackFn(n,[a]){return a}ngOnChanges(n){if("extraAccountNames"in n){this.renderedAccounts=[["default",this.accounts?.default]];for(const a of this.extraAccountNames)this.renderedAccounts.push([a,this.accounts?.[a]])}else"accounts"in n&&(this.renderedAccounts=this.renderedAccounts.map(this.accountsMapper,this))}ngOnDestroy(){this.edit.complete()}accountsMapper([n]){return[n,this.accounts?.[n]]}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["tg-xero-status-non-editing"]],inputs:{accounts:"accounts",extraAccountNames:"extraAccountNames",tenant:"tenant"},outputs:{edit:"edit"},standalone:!0,features:[t.TTD,t.jDz],decls:15,vars:10,consts:[[1,"table","table-condensed","xero-tbl"],[3,"translate"],[3,"ngIf"],["tplMissingAcc",""],[3,"danger",4,"ngFor","ngForOf","ngForTrackBy"],["colspan","2",1,"text-right"],[1,"btn","btn-sm","btn-default",3,"click.passive"],[1,"text-danger","fa","fa-times"],[3,"ngIf","ngIfElse"]],template:function(n,a){1&n&&(t.TgZ(0,"table",0)(1,"tbody")(2,"tr"),t._UZ(3,"td",1),t.TgZ(4,"td"),t.YNc(5,gt,1,1,"ng-template",2),t.qZA()(),t.YNc(6,ht,1,0,"ng-template",null,3,t.W1O),t.YNc(8,_t,4,5,"tr",4),t.qZA(),t.TgZ(9,"tfoot")(10,"tr")(11,"td",5)(12,"button",6),t.NdJ("click.passive",function(){return a.edit.emit()}),t._uU(13),t.ALo(14,"tr"),t.qZA()()()()()),2&n&&(t.xp6(2),t.ekj("danger",!a.tenant),t.xp6(1),t.Q6J("translate","tenant"),t.xp6(2),t.Q6J("ngIf",a.tenant),t.xp6(3),t.Q6J("ngForOf",a.renderedAccounts)("ngForTrackBy",a.accTrackFn),t.xp6(5),t.Oqu(t.xi3(14,7,"edit","common")))},dependencies:[u.GlobalModule,c.sg,c.O5,mt.G,p.P,h.h,d.H],encapsulation:2,changeDetection:0}),e})(),_=(()=>{class e{constructor(){this.refresh=new t.vpe}ngOnDestroy(){this.refresh.complete()}untilDestroy(){return(0,b.R)(this.refresh.pipe((0,Z.Z)(null,null)))}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=t.lG2({type:e,outputs:{refresh:"refresh"}}),e})();var E=s(43073);const Tt=["tgXeroRateLimit",""],Ct=["*"];let vt=(()=>{class e{constructor(n){this.rend=n}ngOnChanges(){const[n,a]=this.stat;this.txt=`${n.toLocaleString()} / ${a.toLocaleString()}`;const r=function At(e){return e>.5?"success":e>.2?"warning":"danger"}(n/a);r!==this.clazz&&(this.clazz&&this.rend.rmClasses(this.clazz),this.clazz=r,this.rend.addClasses(r))}}return e.\u0275fac=function(n){return new(n||e)(t.Y36(E.Z))},e.\u0275cmp=t.Xpm({type:e,selectors:[["tr","tgXeroRateLimit",""]],inputs:{stat:["tgXeroRateLimit","stat"]},standalone:!0,features:[t._Bn([E.Z]),t.TTD,t.jDz],attrs:Tt,ngContentSelectors:Ct,decls:5,vars:1,template:function(n,a){1&n&&(t.F$t(),t.TgZ(0,"td")(1,"strong"),t.Hsn(2),t.qZA()(),t.TgZ(3,"td"),t._uU(4),t.qZA()),2&n&&(t.xp6(4),t.Oqu(a.txt))},dependencies:[c.ez],encapsulation:2,changeDetection:0}),e})(),Xt=(()=>{class e extends _{}return e.\u0275fac=function(){let o;return function(a){return(o||(o=t.n5z(e)))(a||e)}}(),e.\u0275cmp=t.Xpm({type:e,selectors:[["tg-xero-rate-limit-table"]],inputs:{rateLimit:"rateLimit"},standalone:!0,features:[t.qOj,t.jDz],decls:12,vars:10,consts:[[1,"h4",3,"translate"],[1,"table","table-condensed","xero-tbl"],[3,"tgXeroRateLimit"],["colspan","2",1,"text-right"],[1,"btn","btn-default",3,"translate","click.passive"]],template:function(n,a){1&n&&(t._UZ(0,"div",0),t.TgZ(1,"table",1)(2,"tbody")(3,"tr",2),t._uU(4),t.ALo(5,"tr"),t.qZA(),t.TgZ(6,"tr",2),t._uU(7),t.ALo(8,"tr"),t.qZA()(),t.TgZ(9,"tr")(10,"td",3)(11,"button",4),t.NdJ("click.passive",function(){return a.refresh.emit()}),t.qZA()()()()),2&n&&(t.Q6J("translate","rateLimitState"),t.xp6(3),t.Q6J("tgXeroRateLimit",a.rateLimit.minute),t.xp6(1),t.Oqu(t.lcZ(5,6,"minuteLimit")),t.xp6(2),t.Q6J("tgXeroRateLimit",a.rateLimit.day),t.xp6(1),t.Oqu(t.lcZ(8,8,"dayLimit")),t.xp6(4),t.Q6J("translate","refresh"))},dependencies:[u.GlobalModule,p.P,h.h,d.H,vt],encapsulation:2,changeDetection:0}),e})();var D=s(54074);let bt=(()=>{class e{constructor(){this.tr=(0,t.f3M)(D.D)}
1transform(n){switch(n?.type){case"invalid_grant":return this.tr.translate("E_INVALID_GRANT","xero-admin");case"other":return n.message}}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=t.Yjl({name:"tgXeroError",type:e,pure:!0,standalone:!0}),e})();var O=s(5296),S=s(19259),Zt=s(43061);let Mt=(()=>{class e extends _{constructor(){super(...arguments),this.busy=!1,this.alert=(0,t.f3M)(f.c),this.cdr=(0,t.f3M)(t.sBO),this.mod=(0,t.f3M)(Zt.U),this.xeroRes=(0,t.f3M)(g.i)}deauth(){this.busy||(this.busy=!0,this.mod.confirmTranslated("deauthoriseConfirm","xero-admin").pipe((0,X.w)(()=>this.xeroRes.deauthorise({})),this.untilDestroy(),(0,S.x)(()=>{this.busy=!1,this.cdr.markForCheck()}),(0,O.H)("[XeroReauth.deauth]")).subscribe({error:this.alert.negotiate,next:()=>{this.refresh.emit()}}))}}return e.\u0275fac=function(){let o;return function(a){return(o||(o=t.n5z(e)))(a||e)}}(),e.\u0275dir=t.lG2({type:e,selectors:[["button","tgXeroDeauthBtn",""]],hostVars:1,hostBindings:function(n,a){1&n&&t.NdJ("click.passive",function(){return a.deauth()}),2&n&&t.Ikx("disabled",a.busy)},inputs:{_:["tgXeroDeauthBtn","_"]},standalone:!0,features:[t.qOj]}),e})();var yt=s(20813),Nt=s(37666);const Rt=["xeroDrain",""];function Et(e,o){1&e&&(t._uU(0),t.ALo(1,"tr")),2&e&&t.Oqu(t.lcZ(1,1,"drain"))}function Dt(e,o){1&e&&t._UZ(0,"tg-loader-spinner")}function Ot(e,o){1&e&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"tr"),t.qZA()),2&e&&(t.xp6(1),t.AsE(""," ","",t.lcZ(2,2,"drainEmpty"),""))}let St=(()=>{class e extends _{constructor(){super(...arguments),this.busy=!1,this.alert=(0,t.f3M)(f.c),this.cdr=(0,t.f3M)(t.sBO),this.tr=(0,t.f3M)(D.D),this.trCount=(0,t.f3M)(Nt.d),this.xeroRes=(0,t.f3M)(g.i)}onClick(){this.busy||!this.drain||(this.busy=!0,this.xeroRes.drain({}).pipe(this.untilDestroy(),(0,S.x)(()=>{this.busy=!1,this.cdr.markForCheck()}),(0,O.H)("[XeroReauth.drain]")).subscribe({error:this.alert.negotiate,next:n=>{const a=this.tr.translate("drainOk","xero-admin"),r=this.trCount.transform(a,n),m=(0,yt.o)(r,{num:n});this.alert[n?"success":"info"](m),this.refresh.emit()}}))}}return e.\u0275fac=function(){let o;return function(a){return(o||(o=t.n5z(e)))(a||e)}}(),e.\u0275cmp=t.Xpm({type:e,selectors:[["tr","xeroDrain",""]],inputs:{drain:["xeroDrain","drain"]},standalone:!0,features:[t.qOj,t.jDz],attrs:Rt,decls:8,vars:7,consts:[[1,"btn","btn-sm","btn-primary","btn-block",3,"disabled","click.passive"],["tplIdle",""],[4,"ngIf","ngIfElse"],[3,"translate"],[4,"ngIf"]],template:function(n,a){if(1&n&&(t.TgZ(0,"td")(1,"button",0),t.NdJ("click.passive",function(){return a.onClick()}),t.YNc(2,Et,2,3,"ng-template",null,1,t.W1O),t.YNc(4,Dt,1,0,"tg-loader-spinner",2),t.qZA()(),t.TgZ(5,"td"),t._UZ(6,"span",3),t.YNc(7,Ot,3,4,"span",4),t.qZA()),2&n){const r=t.MAs(3);t.xp6(1),t.Q6J("disabled",!a.drain||a.busy),t.xp6(3),t.Q6J("ngIf",a.busy)("ngIfElse",r),t.xp6(1),t.ekj("text-muted",!a.drain),t.xp6(1),t.Q6J("translate","drainInfo"),t.xp6(1),t.Q6J("ngIf",!a.drain)}},dependencies:[u.GlobalModule,c.O5,p.P,M.I,h.h,d.H],encapsulation:2,changeDetection:0}),e})();const Jt=["tgXeroReauth",""];let Ft=(()=>{class e extends _{constructor(){super(...arguments),this.AUTH_URL="/api/v1/xero/authorise"}}return e.\u0275fac=function(){let o;return function(a){return(o||(o=t.n5z(e)))(a||e)}}(),e.\u0275cmp=t.Xpm({type:e,selectors:[["table","tgXeroReauth",""]],inputs:{drain:["tgXeroReauth","drain"]},standalone:!0,features:[t.qOj,t.jDz],attrs:Jt,decls:12,vars:8,consts:[[1,"btn","btn-sm","btn-primary","btn-block",3,"translate","href"],[3,"translate"],[1,"btn","btn-sm","btn-danger","btn-block",3,"tgXeroDeauthBtn","refresh"],[3,"xeroDrain","refresh"]],template:function(n,a){1&n&&(t.TgZ(0,"tbody")(1,"tr")(2,"td"),t._UZ(3,"a",0),t.qZA(),t._UZ(4,"td",1),t.qZA(),t.TgZ(5,"tr")(6,"td")(7,"button",2),t.NdJ("refresh",function(){return a.refresh.emit()}),t._uU(8),t.ALo(9,"tr"),t.qZA()(),t._UZ(10,"td",1),t.qZA(),t.TgZ(11,"tr",3),t.NdJ("refresh",function(){return a.refresh.emit()}),t.qZA()()),2&n&&(t.xp6(3),t.Q6J("translate","authoriseAnother")("href",a.AUTH_URL,t.LSH),t.xp6(1),t.Q6J("translate","authoriseAnotherInfo"),t.xp6(4),t.Oqu(t.lcZ(9,6,"deauthorise")),t.xp6(2),t.Q6J("translate","deauthoriseInfo"),t.xp6(1),t.Q6J("xeroDrain",a.drain))},dependencies:[u.GlobalModule,p.P,h.h,R.k,d.H,Mt,St],encapsulation:2,changeDetection:0}),e})();var Lt=s(12943),Ut=s(12848),Qt=s(97119);function Bt(e,o){1&e&&t._UZ(0,"tg-xero-no-token")}function Ht(e,o){if(1&e){const n=t.EpF();t.TgZ(0,"tg-xero-status-non-editing",3),t.NdJ("edit",function(){t.CHM(n);const r=t.oxw();return t.KtG(r.startEditing())}),t.qZA()}if(2&e){const n=t.oxw();t.Q6J("tenant",n.tenant)("accounts",n.status.accounts)("extraAccountNames",n.EXTRA_ACCOUNT_NAMES)}}function kt(e,o){if(1&e&&(t.TgZ(0,"div",10),t._uU(1),t.qZA()),2&e){const n=o.ngIf;t.xp6(1),t.Oqu(n)}}function Gt(e,o){if(1&e){const n=t.EpF();
1t.TgZ(0,"tg-xero-status-editing",12),t.NdJ("ngModelChange",function(r){t.CHM(n);const m=t.oxw(3);return t.KtG(m.editModel=r)})("cancel",function(){t.CHM(n);const r=t.oxw(3);return t.KtG(r.editModel=void 0)})("save",function(){t.CHM(n);const r=t.oxw(3);return t.KtG(r.save())})("apiRequestMade",function(){t.CHM(n);const r=t.oxw(3);return t.KtG(r.refresh(!1))}),t.qZA()}if(2&e){const n=t.oxw(3);t.Q6J("extraAccountNames",n.EXTRA_ACCOUNT_NAMES)("availableTenants",n.status.tenants)("ngModel",n.editModel)}}function zt(e,o){if(1&e&&t.YNc(0,Gt,1,3,"tg-xero-status-editing",11),2&e){const n=t.oxw(2),a=t.MAs(3);t.Q6J("ngIf",n.editing)("ngIfElse",a)}}function jt(e,o){if(1&e){const n=t.EpF();t.TgZ(0,"table",13),t.NdJ("refresh",function(){t.CHM(n);const r=t.oxw(2);return t.KtG(r.refresh(!0))}),t.qZA()}if(2&e){const n=t.oxw(2);t.Q6J("tgXeroReauth",n.drain)}}function Yt(e,o){if(1&e){const n=t.EpF();t.TgZ(0,"div",4)(1,"tg-xero-rate-limit-table",5),t.NdJ("refresh",function(){t.CHM(n);const r=t.oxw();return t.KtG(r.refresh(!0))}),t.qZA(),t.YNc(2,kt,2,1,"div",6),t.ALo(3,"tgXeroError"),t.qZA(),t.TgZ(4,"tg-tabs")(5,"tg-tab",7),t.ALo(6,"tr"),t.YNc(7,zt,1,2,"ng-template",8),t.qZA(),t.TgZ(8,"tg-tab",7),t.ALo(9,"tr"),t.YNc(10,jt,1,1,"table",9),t.qZA()()}if(2&e){const n=t.oxw();t.xp6(1),t.Q6J("rateLimit",n.status.rateLimit),t.xp6(1),t.Q6J("ngIf",t.lcZ(3,4,n.status.error)),t.xp6(3),t.Q6J("title",t.lcZ(6,6,"configuration")),t.xp6(3),t.Q6J("title",t.lcZ(9,8,"authorisation"))}}(0,z.applyGlobalStyle)("tg-admin-xero-status","tg-admin-xero-status,tg-xero-rate-limit-table{display:block}tg-admin-xero-status .rate-limit-section{align-items:center;display:flex}tg-admin-xero-status .xero-tbl{display:inline-table;width:auto}");const Vt=[{abstract:!0,component:Q.J9,name:"admin.integrations",url:"/integrations"},{component:(()=>{class e{constructor(){this.EXTRA_ACCOUNT_NAMES=[],this.saving=!1,this.alert=(0,t.f3M)(f.c),this.cdr=(0,t.f3M)(t.sBO),this.xeroRes=(0,t.f3M)(g.i),this.status=(0,t.f3M)(G.wp),this.drain=!0===this.status.drain}get editing(){return void 0!==this.editModel}ngOnInit(){this.tenant=this.getTenant()}refresh(n){this.xeroRes.status({params:n?{drain:1}:void 0}).pipe(this.alert.alertHttpError()).subscribe((0,B.e)(r=>{this.status=r,this.tenant=this.getTenant(),void 0!==r.drain&&(this.drain=r.drain),this.cdr.markForCheck()}))}save(){this.saving||(this.saving=!0,this.xeroRes.configure(this.editModel).pipe((0,C.b)({error:this.alert.negotiate,next:n=>{this.status=n,this.editModel=void 0}})).subscribe((0,H.d)(()=>{this.saving=!1,this.cdr.markForCheck()})))}startEditing(){this.editModel={accounts:this.status.accounts,tenant:this.status.tenant}}getTenant(){const{tenant:n,tenants:a}=this.status;return a.find(r=>r.id===n)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["tg-admin-xero-status"]],standalone:!0,features:[t._Bn([],[{provide:v.z,useValue:"xero-admin"},{provide:y,useFactory:()=>new Map}]),t.jDz],decls:5,vars:2,consts:[["tplNoToken",""],["tplConfigNotEditing",""],[3,"ngIf","ngIfElse"],[3,"tenant","accounts","extraAccountNames","edit"],[1,"row","rate-limit-section"],[1,"col-xs-12","col-sm-4","col-lg-3",3,"rateLimit","refresh"],["class","alert alert-danger col-xs-12 col-sm-8 col-lg-9",4,"ngIf"],[3,"title"],["tgTabContent",""],["class","table",3,"tgXeroReauth","refresh",4,"tgTabContent"],[1,"alert","alert-danger","col-xs-12","col-sm-8","col-lg-9"],[3,"extraAccountNames","availableTenants","ngModel","ngModelChange","cancel","save","apiRequestMade",4,"ngIf","ngIfElse"],[3,"extraAccountNames","availableTenants","ngModel","ngModelChange","cancel","save","apiRequestMade"],[1,"table",3,"tgXeroReauth","refresh"]],template:function(n,a){if(1&n&&(t.YNc(0,Bt,1,0,"ng-template",null,0,t.W1O),t.YNc(2,Ht,1,3,"ng-template",null,1,t.W1O),t.YNc(4,Yt,11,10,"ng-template",2)),2&n){const r=t.MAs(1);t.xp6(4),t.Q6J("ngIf",a.status.token)("ngIfElse",r)}},dependencies:[u.GlobalModule,c.O5,N.a,d.H,i.u5,i.JJ,i.On,k.TgTabsModule,Lt.s,Ut.l,Qt.I,dt,xt,l,Xt,Ft,bt],encapsulation:2,changeDetection:0}),e})(),data:{path:["xero"],redirect:["admin"],token:L.Q},name:"admin.integrations.xero",resolve:[(0,U.b)([g.i],e=>(0,I.n)(e.status({params:{drain:1}}
1)))],url:"/xero"}];let Kt=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[J.UIRouterModule.forChild({config:F.Z.config(Vt)})]}),e})()}}]);

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.