PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/2834-261fd609f0d3799d.js

js elevolt.co.ke collected 2026-10-04 21:45:02 UTC 19,895 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="db121325-9c91-421e-96c9-82fa39844919",e._sentryDebugIdIdentifier="sentry-dbid-db121325-9c91-421e-96c9-82fa39844919")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2834],{30301:function(e,t,n){var a=n(52322),s=n(47477),i=n(43493),c=n(18966),r=n(19317),l=n(59417),o=n(99603),d=n(13980),u=n.n(d);n(2784);let m=e=>{let{allowance:t,onEdit:n,onDelete:d}=e,{user:u}=(0,c.Eu)(),m="percentage"===t.type?"".concat(t.percentage,"%"):t.amount;return(0,a.jsxs)("div",{className:"grid grid-cols-6 gap-2 p-2 group relative",children:[(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Name"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:t.name})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Type"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700 capitalize",children:t.type})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Rate"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:m})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Effective From"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:(0,s.p6)(t.effective_from||t.effective_date)})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Effective To"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:t.effective_to?(0,s.p6)(t.effective_to):"Unknown"})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Taxable?"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:t.is_taxable?"Yes":"No"})]}),(0,i.userHasRole)(u,["hr_manager","admin"])&&t.id?(0,a.jsx)("div",{className:"absolute right-0",children:(0,a.jsx)(r.C,{menuIcon:(0,a.jsx)(o.G,{className:"text-lg text-500 hover:text-gray-700",icon:l.iV1,size:"1x"}),menuItems:[{text:"Edit",icon:(0,a.jsx)(o.G,{className:"mr-1",icon:l.Xcf}),action:()=>n(t)},{text:"Delete",icon:(0,a.jsx)(o.G,{className:"mr-1",icon:l.$aW}),action:()=>d(t)}],subject:t})}):null]})};m.propTypes={allowance:u().shape({id:u().any,name:u().string,type:u().oneOf(["fixed","percentage"]),amount:u().oneOfType([u().string,u().number]),percentage:u().oneOfType([u().string,u().number]),effective_date:u().string,effective_from:u().string,effective_to:u().string,is_taxable:u().bool}),onEdit:u().func,onDelete:u().func},t.Z=m},38446:function(e,t,n){var a=n(52322),s=n(47477),i=n(43493),c=n(18966),r=n(19317),l=n(59417),o=n(99603),d=n(13980),u=n.n(d);n(2784);let m=e=>{let{benefit:t,onEdit:n,onDelete:d}=e,{user:u}=(0,c.Eu)(),m="percentage"===t.calculation_type?"".concat(t.percentage,"%"):t.amount;return(0,a.jsxs)("div",{className:"grid grid-cols-6 gap-2 p-2 group relative",children:[(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Name"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:t.name})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Type"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700 capitalize",children:t.type})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Rate"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:m})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Effective From"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:t.effective_from?(0,s.p6)(t.effective_from):"Unknown"})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Effective To"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:t.effective_to?(0,s.p6)(t.effective_to):"Unknown"})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-500 mb-0 leading-none",children:"Taxable?"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:t.is_taxable?"Yes":"No"})]}),(0,i.userHasRole)(u,["hr_manager","admin"])&&t.id?(0,a.jsx)("div",{className:"absolute right-0",children:(0,a.jsx)(r.C,{menuIcon:(0,a.jsx)(o.G,{className:"text-lg text-500 hover:text-gray-700",icon:l.iV1,size:"1x"}),menuItems:[{text:"Edit",icon:(0,a.jsx)(o.G,{className:"mr-1",icon:l.Xcf}),action:()=>n(t)},{text:"Delete",icon:(0,a.jsx)(o.G,{className:"mr-1",icon:l.$aW}),action:()=>{"function"==typeof d&&d(t)}}],subject:t})}):null]})};m.propTypes={benefit:u().shape({id:u().any,name:u().string,type:u().string,calculation_type:u().oneOf(["fixed","percentage"]),amount:u().oneOfType([u().str
1ing,u().number]),percentage:u().oneOfType([u().string,u().number]),effective_from:u().string,effective_to:u().string,is_taxable:u().bool}),onEdit:u().func,onDelete:u().func},t.Z=m},1859:function(e,t,n){n.d(t,{H:function(){return x}});var a=n(52322),s=n(47477),i=n(43493),c=n(18966),r=n(19317),l=n(76467),o=n(15052),d=n(59417),u=n(99603),m=n(13980),p=n.n(m),f=n(2784);let x=e=>{var t;let{deduction:n,onEdit:m,onDelete:p}=e,{user:x}=(0,c.Eu)(),[g,h]=(0,f.useState)(!1);if(!n)return null;let v="percentage"===n.type?"".concat(n.percentage,"%"):n.amount,y=n.effective_from||n.effective_date,b=!!(0,i.userHasRole)(x,["hr_manager","admin"])&&!!n.id,j=(0,o.nN)(n),N=j?(0,o.HT)((null===(t=n.tiers)||void 0===t?void 0:t.brackets)||[]):[];return(0,a.jsxs)("div",{className:"p-2 group relative",children:[(0,a.jsxs)("div",{className:"grid grid-cols-6 gap-2 mb-2",children:[(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Name"}),(0,a.jsx)(l.Z,{variant:"labelValue",children:n.name})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Calculation"}),(0,a.jsx)(l.Z,{className:"capitalize",variant:"labelValue",children:(0,o.uX)(n.calculation_method||"simple")})]}),!j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Type"}),(0,a.jsx)(l.Z,{className:"capitalize",variant:"labelValue",children:n.type})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Rate"}),(0,a.jsx)(l.Z,{variant:"labelValue",children:v})]})]}),!!j&&(0,a.jsxs)("div",{className:"col-span-2",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Brackets"}),(0,a.jsxs)("button",{className:"text-sm text-blue hover:text-blue-hover underline",onClick:()=>h(!g),type:"button",children:[g?"Hide":"Show"," ",N.length," ","bracket(s)"]})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Effective From"}),(0,a.jsx)(l.Z,{variant:"labelValue",children:y?(0,s.p6)(y):"Unknown"})]}),(0,a.jsxs)("div",{className:"col-span-1 gap-2",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Effective To"}),(0,a.jsx)(l.Z,{variant:"labelValue",children:n.effective_to?(0,s.p6)(n.effective_to):"Unknown"})]}),(0,a.jsxs)("div",{className:"col-span-1",children:[(0,a.jsx)(l.Z,{variant:"label mr-1",children:"Mandatory?"}),(0,a.jsx)(l.Z,{variant:"labelValue",children:n.is_mandatory?"Yes":"No"})]})]}),!!(j&&g&&N.length>0)&&(0,a.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-3",children:[(0,a.jsx)(l.Z,{className:"mb-2 block",variant:"labelValue",children:"Deduction Brackets"}),(0,a.jsx)("div",{className:"space-y-2",children:N.map((e,t)=>(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm bg-white border border-gray-200 rounded px-3 py-2",children:[(0,a.jsxs)(l.Z,{variant:"caption",children:["Bracket ",t+1,": ",e.rangeDisplay]}),(0,a.jsx)(l.Z,{variant:"labelValue",children:e.rateDisplay})]},t))})]})}),!!b&&(0,a.jsx)("div",{"aria-label":"Deduction actions",className:"absolute right-0 top-0",role:"group",children:(0,a.jsx)(r.Z,{menuIcon:(0,a.jsx)(u.G,{"aria-label":"Open deduction actions menu",className:"text-lg text-gray-500 hover:text-gray-700",icon:d.iV1,size:"1x"}),menuItems:[{text:"Edit",icon:(0,a.jsx)(u.G,{className:"mr-1",icon:d.Xcf}),action:()=>{"function"==typeof m&&m(n)}},{text:"Delete",icon:(0,a.jsx)(u.G,{className:"mr-1",icon:d.$aW}),action:()=>{"function"==typeof p&&p(n)}}],subject:n})})]})};x.propTypes={deduction:p().shape({id:p().oneOfType([p().string,p().number]),name:p().string.isRequired,calculation_method:p().oneOf(["simple","tiered","progressive","custom"]),type:p().oneOf(["fixed","percentage"]),amount:p().oneOfType([p().string,p().number]),percentage:p().oneOfType([p().string,p().number]),tiers:p().shape({method:p().string,brackets:p().arrayOf(p().shape({min:p().number.isRequired,max:p().number,rate:p().number.isRequired,type:p().oneOf(["fixed","percentage"]).isRequired}))}),effective_date:p().string,effective_from:p().string,effective_to:p().string,is_mandatory:p().bool}).isRequired,onEdit:p().func,onDelete:p().func},x.defaultProps={onEdit:void 0,onDelete:void 0}},56074:function(e,t,n){var a=n(13980),s=n.n(a),i=n(58122);let c=e=>{let{children:t}=e;return(0,i.u)()?t:null};c.propTypes={children:s().node.isRequired},t.Z=c},58122:function(e,t,n){n.d(t,{u:function(){return s}});var a=n(34406);let s=()=>"true"===a.env.NEXT_PUBLIC_ENABLE_PAYROLL},74881:function(e,t,n){n.d(t,{Rr:function(){return u},UU:function(){return f},iZ:function(){return p},tj:function(){return m}});var a=n(59820),s=n(14010),i=n(87686),c=n(60418),r=n(47477),l=n(82036),o=n(84475);let d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(l.JW,"tenant/").concat((0,r.d_)(),"/").concat(e)},u=e=>{let{compensationPlanId:t,enabled:n=!0}=e;return(0,a.a)({queryKey:["allowances",t],enabled:!!t&&n&&(0,r.Xu)(),queryFn:async()=>{var e;return(null===(e=(await c.Z.get(d("compensation-plans/".concat(t,"/allowances")),{headers:(0,o.g0)({realm:"hr"})})).data)||void 0===e?void 0:e.data)||[]}})},m=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({mutationFn:async t=>{let n={is_taxable:!1,status:"active",...t};return"fixed"===n.type?delete n.percentage:"percentage"===n.type&&delete n.amount,(await c.Z.post(d("compensation-plans/".concat(e,"/allowances")),n,{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,a)=>{(null==a?void 0:a.compensation_plan_id)&&n.invalidateQueries({queryKey:["allowances",a.compensation_plan_id]}),n.invalidateQueries({queryKey:["tenantUser"]}),t.onSuccess&&t.onSuccess(e,a)},...t})},p=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({mutationFn:async t=>{let{allowanceId:n,data:a}=t,s={...a};return"fixed"===s.type?delete s.percentage:"percentage"===s.type&&delete s.amount,(await c.Z.put(d("compensation-plans/".concat(e,"/allowances/").concat(n)),s,{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,a)=>{var s;n.setQueryData(["allowance",a.allowanceId],e.data),(null==a?void 0:null===(s=a.data)||void 0===s?void 0:s.compensation_plan_id)&&n.invalidateQueries({queryKey:["allowances",a.data.compensation_plan_id]}),n.invalidateQueries({queryKey:["tenantUser"]}),t.onSuccess&&t.onSuccess(e,a)},...t})},f=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({mutationFn:async t=>{let{allowanceId:n}=t;
1return(await c.Z.delete(d("compensation-plans/".concat(e,"/allowances/").concat(n)),{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,a)=>{n.removeQueries(["allowance",a.allowanceId]),(null==a?void 0:a.compensationPlanId)&&n.invalidateQueries({queryKey:["allowances",a.compensationPlanId]}),n.invalidateQueries({queryKey:["tenantUser"]}),t.onSuccess&&t.onSuccess(e,a)},...t})}},41982:function(e,t,n){n.d(t,{Nx:function(){return u},WH:function(){return m},bV:function(){return f},y4:function(){return p}});var a=n(59820),s=n(14010),i=n(87686),c=n(60418),r=n(47477),l=n(82036),o=n(84475);let d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(l.JW,"tenant/").concat((0,r.d_)(),"/").concat(e)},u=e=>{let{compensationPlanId:t,enabled:n=!0}=e;return(0,a.a)({queryKey:["benefits",t],enabled:!!t&&n&&(0,r.Xu)(),queryFn:async()=>{var e;return(null===(e=(await c.Z.get(d("compensation-plans/".concat(t,"/benefits")),{headers:(0,o.g0)({realm:"hr"})})).data)||void 0===e?void 0:e.data)||[]}})},m=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({mutationFn:async t=>{let n={status:"active",is_taxable:!1,...t};return"fixed"===n.calculation_type?delete n.percentage:"percentage"===n.calculation_type&&delete n.amount,(await c.Z.post(d("compensation-plans/".concat(e,"/benefits")),n,{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,a)=>{(null==a?void 0:a.compensation_plan_id)&&n.invalidateQueries({queryKey:["benefits",a.compensation_plan_id]}),n.invalidateQueries({queryKey:["tenantUser"]}),t.onSuccess&&t.onSuccess(e,a)},...t})},p=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({mutationFn:async t=>{let{benefitId:n,data:a}=t,s={...a};return"fixed"===s.calculation_type?delete s.percentage:"percentage"===s.calculation_type&&delete s.amount,(await c.Z.put(d("compensation-plans/".concat(e,"/benefits/").concat(n)),s,{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,a)=>{var s;n.setQueryData(["benefit",a.benefitId],e.data),(null==a?void 0:null===(s=a.data)||void 0===s?void 0:s.compensation_plan_id)&&n.invalidateQueries({queryKey:["benefits",a.data.compensation_plan_id]}),n.invalidateQueries({queryKey:["tenantUser"]}),t.onSuccess&&t.onSuccess(e,a)},...t})},f=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({mutationFn:async t=>{let{benefitId:n}=t;return(await c.Z.delete(d("compensation-plans/".concat(e,"/benefits/").concat(n)),{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,a)=>{n.removeQueries(["benefit",a.benefitId]),(null==a?void 0:a.compensationPlanId)&&n.invalidateQueries({queryKey:["benefits",a.compensationPlanId]}),n.invalidateQueries({queryKey:["tenantUser"]}),t.onSuccess&&t.onSuccess(e,a)},...t})}},71050:function(e,t,n){n.d(t,{AN:function(){return p},LP:function(){return g},am:function(){return x},e6:function(){return m},wA:function(){return f}});var a=n(59820),s=n(14010),i=n(87686),c=n(60418),r=n(47477),l=n(82036),o=n(84475),d=n(53651);let u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(l.JW,"tenant/").concat((0,r.d_)(),"/").concat(e)},m=e=>{let{compensationPlanId:t,enabled:n=!0,status:s=null}=e;return(0,a.a)({queryKey:["deductions",t,s],placeholderData:(0,d.g)(t),queryFn:async()=>{var e;let n=u("compensation-plans/".concat(t,"/deductions"));return s&&(n+="?status=".concat(s)),(null===(e=(await c.Z.get(n,{headers:(0,o.g0)({realm:"hr"})})).data)||void 0===e?void 0:e.data)||[]},enabled:!!t&&n&&(0,r.Xu)()})},p=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({enabled:!!e,mutationFn:async t=>{let n={is_mandatory:!1,is_taxable:!1,status:"active",calculation_method:"simple",...t};return"simple"===n.calculation_method?("fixed"===n.type?delete n.percentage:"percentage"===n.type&&delete n.amount,delete n.tiers):["tiered","progressive"].includes(n.calculation_method)&&(delete n.amount,delete n.percentage,n.tiers&&(n.tiers={method:n.calculation_method,brackets:n.tiers.brackets||[]})),(await c.Z.post(u("compensation-plans/".concat(e,"/deductions")),n,{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,a)=>{n.invalidateQueries({queryKey:["deductions",a.compensation_plan_id]}),t.onSuccess&&t.onSuccess(e,a)},...t})},f=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,s.NL)();return(0,i.D)({enabled:!!e,mutationFn:async t=>{let{deductionId:n,data:a}=t,s={...a};return"simple"===s.calculation_method?("fixed"===s.type?delete s.percentage:"percentage"===s.type&&delete s.amount,delete s.tiers):["tiered","progressive"].includes(s.calculation_method)&&(delete s.amount,delete s.percentage,s.tiers&&(s.tiers={method:s.calculation_method,brackets:s.tiers.brackets||[]})),(await c.Z.put(u("compensation-plans/".concat(e,"/deductions/").concat(n)),s,{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(a,s)=>{n.invalidateQueries({queryKey:["deductions",e]}),t.onSuccess&&t.onSuccess(a,s)},...t})},x=e=>{let{compensationPlanId:t,options:n={}}=e,a=(0,s.NL)();return(0,i.D)({mutationFn:async e=>{let{deductionId:n}=e;return(await c.Z.delete(u("compensation-plans/".concat(t,"/deductions/").concat(n)),{headers:(0,o.g0)({realm:"hr"})})).data},onSuccess:(e,s)=>{t&&a.invalidateQueries({queryKey:["deductions",t]}),n.onSuccess&&n.onSuccess(e,s)},...n})},g=function(){let{compensationPlanId:e,...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.D)({mutationFn:async t=>{let{deductionId:n,grossAmount:a}=t;return(await c.Z.post(u("compensation-plans/".concat(e,"/deductions/").concat(n,"/calculate-breakdown")),{base_salary:a},{headers:(0,o.g0)({realm:"hr"})})).data},...t})}},15052:function(e,t,n){n.d(t,{Aq:function(){return a},Fy:function(){return i},HT:function(){return s},nN:function(){return c},uX:function(){return r}});let a=e=>{let t=[];if(!Array.isArray(e)||0===e.length)return{valid:!1,errors:["At least one bracket is required"]};console.log("brackets",e),e.forEach((e,n)=>{("number"!=typeof e.min||e.min<0)&&t.push("Bracket ".concat(n+1,": Minimum amount must be a positive number")),null!==e.max&&"number"!=typeof e.max&&t.push("Bracket ".concat(n+1,": Maximum amount must be a number or null")),null!==e.max&&e.max<=e.min&&t.push("Bracket ".concat(n+1,": Maximum must be greater than minimum")),("number"!=typeof e.rate||e.rate<0)&&t.push("Bracket ".concat(n+1,": Rate must be a positive number")),["fixed","percentage"].includes(e.type)||t.push("Bracket ".concat(n+1,": Type must be 'fixed' or 'percentage'")),"percentage"===e.type&&e.rate>100&&t.push("Bracket ".concat(n+1,": Percentage rate cannot exceed 100"))});for(let n=1;n<e.length;n++)e[n].min<=e[n-1].min&&t.push("Bracket ".concat(n+1,": Minimum amount must be greater than previous bracket"));return{valid:0===t.length,errors:t}},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>
1({...e,rangeDisplay:null===e.max?"".concat(e.min.toLocaleString(),"+"):"".concat(e.min.toLocaleString()," - ").concat(e.max.toLocaleString()),rateDisplay:"percentage"===e.type?"".concat(e.rate,"%"):e.rate.toLocaleString()}))},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{min:e,max:null,rate:0,type:"percentage"}},c=e=>["tiered","progressive"].includes(null==e?void 0:e.calculation_method),r=e=>({simple:"Simple",tiered:"Tiered",progressive:"Progressive",custom:"Custom"})[e]||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.