1(self.webpackChunkwebapp=self.webpackChunkwebapp||[]).push([[17325],{89532(E,S,t){t.d(S,{EQ:()=>b,Dn:()=>F,WT:()=>L});var s=t(44238),o=t(81128),v=t(81380),e=t(88830),d=t(93587),m=t(42362),r=t(20402),a=t(35729),c=t(52252),g=t(81266),i=t(99401),h=t(36351);function p(n){return"status"in n&&"plan"in n}const b=n=>{const u=(0,s.inject)(r.AccessService),{subscriptionAccess:l}=n.data;return!(u.hasAccess({flags:[h.S.AccountingFreemium]})&&function j(n){return!!(n&&(p(n)?n.status?.length||n.plan?.length:n.variations?.length))}(l)&&!function y(n){return"**"===n.routeConfig?.path||!!n.routeConfig?.redirectTo}(n))||!!p(l)&&function I(n){const u=(0,s.inject)(v.Store),l=(0,s.inject)(o.Router),f=(0,s.inject)(a.z),T=(0,s.inject)(O),W=(0,s.inject)(r.AccessService).hasAccess({permissions:[r.EPermissions.AccountingSubscriptionWriteOwn]}),U=u.select(g.X.selectSubscriptions).pipe((0,d.u5)()),B=u.select(c.r.selectSubscriptionDetails).pipe((0,d.u5)());return(0,e.combineLatest)([B,U]).pipe((0,e.map)(([K,H])=>{const{isPlanEligible:C,isStatusEligible:D,isStatusPending:R,isStatusFailed:x}=(0,m.o)(n,K,H);
1return!((!D||!C)&&(R?(f.open({message:"We are processing your data. It may take up to a few hours before you get access to the full functionality"}),1):x?(f.open({message:"Unable to create Tide Accounting subscription. Our team is working to resolve the issue and will get back to your shortly. Please contact support if you require further assistance."}),1):W?(l.navigate(function M(n,u,l){return n.isPlanEligible&&!n.isStatusEligible?n.isStatusFailed?u.navigateToOnStatusAndPlanIneligible??l.navigateToOnStatusAndPlanIneligible:u.navigateToOnStatusIneligible??l.navigateToOnStatusIneligible:!n.isPlanEligible&&n.isStatusEligible?u.navigateToOnPlanIneligible??l.navigateToOnPlanIneligible:u.navigateToOnStatusAndPlanIneligible??l.navigateToOnStatusAndPlanIneligible}({isPlanEligible:C,isStatusEligible:D,isStatusPending:R,isStatusFailed:x},n,T)),1):(f.open({message:"Your client can manage the subscription settings to unlock this feature"}),1)))}))}(l)},O=new s.InjectionToken("subscriptionAccessRedirectPaths");function F(n){return{provide:O,useValue:n}}const L=n=>{const{status:u,plan:l,navigateToOnStatusAndPlanIneligible:f,navigateToOnStatusIneligible:T}=n;return(0,i.IA)({subscriptionAccess:{plan:l??[],status:u??[],navigateToOnStatusAndPlanIneligible:f,navigateToOnStatusIneligible:T}})}},42362(E,S,t){t.d(S,{o:()=>d});var v=t(49515),e=t(62881);function d(r,a,c){const{status:g}=a,{status:i,plan:h}=r??{status:[],plan:[]};return{isStatusEligible:!i?.length||i?.includes(g),isPlanEligible:!h?.length||h?.some(I=>(0,v.Z8)(I,c)),isStatusPending:(0,e.o$)(a)||(0,e.O2)(a),isStatusFailed:(0,e.JJ)(a)||(0,e.gt)(a)}}}
1,11711(E,S,t){t.d(S,{corporationTaxRoutes:()=>g});var s=t(81128),o=t(44238);let v=(()=>{class i{static{this.\u0275fac=function(p){return new(p||i)}}static{this.\u0275cmp=o.\u0275\u0275defineComponent({type:i,selectors:[["twa-corporation-tax-shell"]],decls:1,vars:0,template:function(p,A){1&p&&o.\u0275\u0275element(0,"router-outlet")},dependencies:[s.RouterModule,s.RouterOutlet],encapsulation:2,changeDetection:1})}}return i})();var e=t(99401),d=t(40428),m=t(56202),r=t(89532),a=t(75466),c=t(49991);const g=[{path:"",component:v,children:[{path:"",loadComponent:()=>Promise.all([t.e(82779),t.e(4075)]).then(t.bind(t,82779)).then(i=>i.CorporationTaxComponent),data:(0,e._H)((0,e.ZA)("Corporation Tax"),(0,r.WT)({status:[a.Sd.Active,a.Sd.Expiring],plan:c.j$})),children:[{path:"adjustment",loadComponent:()=>Promise.all([t.e(82779),t.e(4075)]).then(t.bind(t,82779)).then(i=>i.CorporationTaxAdjustmentComponent),data:(0,e._H)((0,e.ZA)("Corporation Tax Adjustment"),(0,e.pP)())},{path:"details/:detailType",loadComponent:()=>Promise.all([t.e(82779),t.e(4075)]).then(t.bind(t,82779)).then(i=>i.CorporationTaxContentDetailComponent),data:(0,e._H)((0,e.ZA)("Corporation Tax Detail"),(0,e.pP)())},(0,d.Y)({rootRouteSegment:"report",redirectOnCloseRouteFactory:()=>[...m.qR(),"corporation-tax"]})]}]}]},25395(E,S,t){t.d(S,{A:()=>d});var s=t(22552),o=t(27419),v=t(64507);function d(m,r){(0,v.A)(2,arguments);var a=(0,o.A)(m),c=(0,o.A)(r),g=a.getTime()-(0,s.A)(a),i=c.getTime()-(0,s.A)(c);return Math.round((g-i)/864e5)}}}]);
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.