policyengine-household-wizard 0.2.0 → 0.3.0
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.
- package/README.md +14 -4
- package/dist/index-CIL8FXNR.cjs +1 -0
- package/dist/index-fgLnXugs.js +225 -0
- package/dist/index.d.ts +2 -2
- package/dist/primitives/index.d.ts +12 -12
- package/dist/primitives/useWizardSteps.d.ts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/uk-household/adapters/householdImpactRequest.d.ts +91 -0
- package/dist/uk-household/adapters/householdImpactRequest.d.ts.map +1 -0
- package/dist/uk-household/adapters/index.d.ts +2 -0
- package/dist/uk-household/adapters/index.d.ts.map +1 -0
- package/dist/uk-household/children.d.ts +18 -0
- package/dist/uk-household/children.d.ts.map +1 -0
- package/dist/uk-household/codes.d.ts +22 -0
- package/dist/uk-household/codes.d.ts.map +1 -0
- package/dist/uk-household/defaults.d.ts +56 -0
- package/dist/uk-household/defaults.d.ts.map +1 -0
- package/dist/uk-household/draft.d.ts +37 -0
- package/dist/uk-household/draft.d.ts.map +1 -0
- package/dist/uk-household/index.d.ts +10 -0
- package/dist/uk-household/index.d.ts.map +1 -0
- package/dist/uk-household/serialize.d.ts +4 -0
- package/dist/uk-household/serialize.d.ts.map +1 -0
- package/dist/uk-household/statePension.d.ts +42 -0
- package/dist/uk-household/statePension.d.ts.map +1 -0
- package/dist/uk-household/types.d.ts +134 -0
- package/dist/uk-household/types.d.ts.map +1 -0
- package/dist/uk-household/validate.d.ts +59 -0
- package/dist/uk-household/validate.d.ts.map +1 -0
- package/dist/uk-household-adapters.cjs +1 -0
- package/dist/uk-household-adapters.d.ts +1 -0
- package/dist/uk-household-adapters.js +5 -0
- package/dist/uk-household.cjs +1 -0
- package/dist/uk-household.d.ts +1 -0
- package/dist/uk-household.js +220 -0
- package/dist/us-household/adapters/index.d.ts +1 -1
- package/dist/us-household/adapters/v1Payload.d.ts +1 -1
- package/dist/us-household/draft.d.ts +1 -1
- package/dist/us-household/index.d.ts +9 -9
- package/dist/us-household/normalize.d.ts +1 -1
- package/dist/us-household/serialize.d.ts +1 -1
- package/dist/us-household/types.d.ts +1 -14
- package/dist/us-household/types.d.ts.map +1 -1
- package/dist/us-household/validate.d.ts +1 -1
- package/dist/us-household-adapters.d.ts +1 -1
- package/dist/us-household.d.ts +1 -1
- package/dist/validation.d.ts +16 -0
- package/dist/validation.d.ts.map +1 -0
- package/package.json +13 -2
- package/src/uk-household/adapters/householdImpactRequest.ts +164 -0
- package/src/uk-household/adapters/index.ts +9 -0
- package/src/uk-household/children.ts +23 -0
- package/src/uk-household/codes.ts +67 -0
- package/src/uk-household/defaults.ts +101 -0
- package/src/uk-household/draft.ts +138 -0
- package/src/uk-household/index.ts +75 -0
- package/src/uk-household/serialize.ts +189 -0
- package/src/uk-household/statePension.ts +69 -0
- package/src/uk-household/types.ts +159 -0
- package/src/uk-household/validate.ts +190 -0
- package/src/us-household/types.ts +1 -11
- package/src/validation.ts +12 -0
package/README.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# policyengine-household-wizard
|
|
2
2
|
|
|
3
|
-
Shared wizard primitives and
|
|
4
|
-
apps (cliff-watch, Coverage Compass, app-v2,
|
|
3
|
+
Shared wizard primitives and US and UK household draft contracts for
|
|
4
|
+
PolicyEngine apps (cliff-watch, Coverage Compass, app-v2, the UK Autumn Budget
|
|
5
|
+
2026 dashboard, and standalone calculators).
|
|
5
6
|
|
|
6
|
-
The package ships
|
|
7
|
+
The package ships three surfaces:
|
|
7
8
|
|
|
8
9
|
- **Wizard primitives** — copy-neutral React primitives for step state, progress,
|
|
9
10
|
navigation, option cards, and review screens. No household-specific code.
|
|
@@ -11,6 +12,11 @@ The package ships two surfaces:
|
|
|
11
12
|
marital status (issue #1044), validation rules, URL serialization,
|
|
12
13
|
state-filtered counties, and adapters to the PolicyEngine API V1 household
|
|
13
14
|
payload.
|
|
15
|
+
- **UK household model** (`policyengine-household-wizard/uk-household`) — the
|
|
16
|
+
household the UK Autumn Budget 2026 dashboard asks about: a draft type,
|
|
17
|
+
typical answers with their ONS sources, validation against the household
|
|
18
|
+
impact API's bounds, State Pension age by year, URL serialization, and an
|
|
19
|
+
adapter to that API's request. See [`docs/uk-household.md`](docs/uk-household.md).
|
|
14
20
|
|
|
15
21
|
## Install
|
|
16
22
|
|
|
@@ -64,7 +70,8 @@ function MyWizard() {
|
|
|
64
70
|
}
|
|
65
71
|
```
|
|
66
72
|
|
|
67
|
-
See [`docs/api.md`](docs/api.md) for wizard navigation and focus APIs
|
|
73
|
+
See [`docs/api.md`](docs/api.md) for wizard navigation and focus APIs, [`docs/uk-household.md`](docs/uk-household.md)
|
|
74
|
+
for the UK household model, and [`docs/migration.md`](docs/migration.md)
|
|
68
75
|
for migrating from each app's local wizard.
|
|
69
76
|
|
|
70
77
|
## Design decisions
|
|
@@ -124,6 +131,8 @@ src/
|
|
|
124
131
|
us-household/ types, draft, validate, normalize, serialize, counties
|
|
125
132
|
adapters/ toV1HouseholdPayload — PolicyEngine API V1 envelope
|
|
126
133
|
data/ counties-by-state.json
|
|
134
|
+
uk-household/ types, codes, defaults, draft, validate, serialize, State Pension
|
|
135
|
+
adapters/ toHouseholdImpactRequest — the UK Autumn Budget dashboard's API
|
|
127
136
|
tests/ vitest unit and round-trip tests
|
|
128
137
|
scripts/ generate-counties.ts, generate-variable-graph.ts
|
|
129
138
|
```
|
|
@@ -135,6 +144,7 @@ bun install
|
|
|
135
144
|
bun run test
|
|
136
145
|
bun run typecheck
|
|
137
146
|
bun run build
|
|
147
|
+
bun run check:consumer-types # NodeNext (ESM and CommonJS) and Bundler apps type-check against dist
|
|
138
148
|
bun run test:live # adapter output against api.policyengine.org (network)
|
|
139
149
|
```
|
|
140
150
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const R=[{code:"NORTH_EAST",name:"North East"},{code:"NORTH_WEST",name:"North West"},{code:"YORKSHIRE",name:"Yorkshire and the Humber"},{code:"EAST_MIDLANDS",name:"East Midlands"},{code:"WEST_MIDLANDS",name:"West Midlands"},{code:"EAST_OF_ENGLAND",name:"East of England"},{code:"LONDON",name:"London"},{code:"SOUTH_EAST",name:"South East"},{code:"SOUTH_WEST",name:"South West"},{code:"WALES",name:"Wales"},{code:"SCOTLAND",name:"Scotland"},{code:"NORTHERN_IRELAND",name:"Northern Ireland"}],D=["RENT_PRIVATELY","RENT_FROM_COUNCIL","RENT_FROM_HA","OWNED_WITH_MORTGAGE","OWNED_OUTRIGHT"],f=["RENT_PRIVATELY","RENT_FROM_COUNCIL","RENT_FROM_HA"],b=["NONE","PLAN_1","PLAN_2","PLAN_4","PLAN_5","POSTGRADUATE"],$=["A","B","C","D","E","F","G","H","I"],h=(e,a)=>typeof a=="string"&&e.includes(a),v=e=>h(R.map(a=>a.code),e),x=e=>h(D,e),Y=e=>h(b,e),H=e=>h($,e),U=e=>h(f,e);function X(e){var a;return((a=R.find(r=>r.code===e))==null?void 0:a.name)??e}const z=2026,Q=34200,Z="£34,200 is the UK median salary in April 2026 (ONS Annual Survey of Hours and Earnings, provisional).",y={NORTH_EAST:790,NORTH_WEST:975,YORKSHIRE:869,EAST_MIDLANDS:928,WEST_MIDLANDS:983,EAST_OF_ENGLAND:1298,LONDON:2338,SOUTH_EAST:1438,SOUTH_WEST:1251,WALES:848,SCOTLAND:1011,NORTHERN_IRELAND:879},w=1406,ee=e=>e==="NORTHERN_IRELAND"?"July 2026":"September 2026";function G(e){return typeof e=="string"&&Object.prototype.hasOwnProperty.call(y,e)?y[e]:w}const F={petrol:620,diesel:340,electricity:1040},ne={salary:{statistic:"Median gross annual pay, all employee jobs, UK, April 2026 (provisional): £34,229",publication:"ONS, Annual Survey of Hours and Earnings 2026, Table 6.7a",url:"https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/agegroupashetable6"},rent:{statistic:"Average monthly private rent by region, September 2026 (Northern Ireland: July 2026)",publication:"ONS, Price Index of Private Rents, published 21 October 2026",url:"https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/priceindexofprivaterentsukmonthlypricestatistics"},spending:{statistic:"Average weekly household spending on petrol, diesel and electricity, FYE 2025",publication:"ONS, Family Spending in the UK, FYE 2025, Workbook 1, Table A1",url:"https://www.ons.gov.uk/peoplepopulationandcommunity/personalandhouseholdfinances/expenditure/datasets/familyspendingworkbook1detailedexpenditureandtrends"}},T={years:{2026:{state_pension_age:66,full_new_state_pension:12547.6},2027:{state_pension_age:67,full_new_state_pension:13036.97},2028:{state_pension_age:67,full_new_state_pension:13362.92},2029:{state_pension_age:67,full_new_state_pension:13696.98},2030:{state_pension_age:67,full_new_state_pension:14039.42},2031:{state_pension_age:67,full_new_state_pension:14390.39}}};function M(e,a=T){const r=Object.keys(a.years).map(Number).sort((n,c)=>n-c),p=r.find(n=>n>=e)??r[r.length-1],d=a.years[String(p)];return{age:d.state_pension_age,full:d.full_new_state_pension}}function S(e,a,r=T){return e>=M(a,r).age}const N=e=>typeof e=="number"&&Number.isFinite(e),I=19,k=16,W="Children are 0 to 19. Someone aged 20 or over is not a dependant for Child Benefit or Universal Credit, so leave them out.",q=e=>e>=k&&e<=I,te=5,L={adultAge:{min:16,max:100},childAge:{min:0,max:I},maxChildren:10,maxAmount:1e7,maxMonthlyRent:1e5,maxMonthlyChildcare:1e4,maxSpending:1e5,maxStatePension:1e5},B=[2026,2027,2028,2029,2030,2031],A=e=>typeof e=="number"&&Number.isInteger(e),ie=e=>typeof e=="number"&&Number.isFinite(e),oe=e=>`£${e.toLocaleString("en-GB")}`;function V(e,a){var O,P,K;const{year:r,years:p=B,statePension:d}=a,n=L,c=[],o=(t,s,i)=>c.push({code:t,path:s,message:i});(!A(r)||!p.includes(r))&&o("year.unsupported","year",`${String(r)} is not a year this calculation covers.`),!A(e.salaryYear)||!p.includes(e.salaryYear)?o("salaryYear.unsupported","salaryYear",`Salaries cannot be entered for ${String(e.salaryYear)}.`):A(r)&&e.salaryYear>r&&o("salaryYear.afterYear","salaryYear",`Salaries are entered for ${e.salaryYear}, after ${r}; they can only be grown forward.`);const g=(t,s,i,m)=>{i==null?o(`${t}.required`,t,`${s} is required.`):m(i)||o(`${t}.invalid`,t,`Unknown ${s.toLowerCase()} "${String(i)}".`)};g("region","Region",e.region,v),g("tenure","Housing",e.tenure,x),g("councilTaxBand","Council Tax band",e.councilTaxBand,H),typeof e.claimsUniversalCredit!="boolean"&&o("claimsUniversalCredit.required","claimsUniversalCredit","Whether the household claims Universal Credit is required.");const l=(t,s,i,m,{optional:J=!1}={})=>{i==null?J||o(`${t}.required`,t,`${s} is required.`):ie(i)?i<0?o(`${t}.negative`,t,`${s} cannot be negative.`):i>m&&o(`${t}.tooLarge`,t,`${s} cannot be more than ${oe(m)}.`):o(`${t}.notANumber`,t,`${s} must be a number.`)},u=(t,s,i)=>{i==null?o(`${t}.required`,t,`${s} is required.`):A(i)?(i<n.adultAge.min||i>n.adultAge.max)&&o(`${t}.outOfRange`,t,`${s} must be from ${n.adultAge.min} to ${n.adultAge.max}.`):o(`${t}.notWhole`,t,`${s} must be a whole number of years.`)},{head:_,partner:E}=e;u("head.age","Your age",_.age),l("head.employmentIncome","Your salary",_.employmentIncome,n.maxAmount),l("head.privatePensionIncome","Your private pension",_.privatePensionIncome,n.maxAmount,{optional:!0}),l("head.dividendIncome","Dividends",_.dividendIncome,n.maxAmount),l("head.savingsInterestIncome","Savings interest",_.savingsInterestIncome,n.maxAmount),l("head.propertyIncome","Property income",_.propertyIncome,n.maxAmount),l("head.salarySacrificePensionContributions","Salary sacrifice",_.salarySacrificePensionContributions,n.maxAmount),Y(_.studentLoanPlan)||o("head.studentLoanPlan.invalid","head.studentLoanPlan",`Unknown student loan plan "${String(_.studentLoanPlan)}".`),N(_.statePension)&&S(_.age,r,d)&&l("head.statePension","Your State Pension",_.statePension,n.maxStatePension),e.hasPartner&&(u("partner.age","Your partner's age",E.age),l("partner.employmentIncome","Your partner's salary",E.employmentIncome,n.maxAmount),l("partner.privatePensionIncome","Your partner's private pension",E.privatePensionIncome,n.maxAmount,{optional:!0}),N(E.statePension)&&S(E.age,r,d)&&l("partner.statePension","Your partner's State Pension",E.statePension,n.maxStatePension)),e.children.length>n.maxChildren&&o("children.tooMany","children",`At most ${n.maxChildren} children can be entered.`);for(let t=0;t<e.children.length;t++){const s=e.children[t];if(s==null){o(`children[${t}].required`,`children[${t}]`,`Child ${t+1}'s details are missing.`);continue}const i=`children[${t}].age`,m=`Child ${t+1}'s age`;s.age===null||s.age===void 0?o(`${i}.required`,i,`${m} is required.`):A(s.age)?s.age<n.childAge.min?o(`${i}.negative`,i,`${m} cannot be negative.`):s.age>n.childAge.max&&o(`${i}.tooOld`,i,W):o(`${i}.notWhole`,i,`${m} must be a whole number of years.`)}return U(e.tenure)&&l("monthlyRent","Rent",e.monthlyRent,n.maxMonthlyRent,{optional:!0}),e.children.length>0&&l("monthlyChildcare","Childcare",e.monthlyChildcare,n.maxMonthlyChildcare),l("spending.petrol","Petrol spending",(O=e.spending)==null?void 0:O.petrol,n.maxSpending),l("spending.diesel","Diesel spending",(P=e.spending)==null?void 0:P.diesel,n.maxSpending),l("spending.electricity","Electricity spending",(K=e.spending)==null?void 0:K.electricity,n.maxSpending,{optional:!0}),c.length===0?{ok:!0,issues:[]}:{ok:!1,issues:c}}function se(e,a){return V(e,a).ok}const{adultAge:C}=L,ae=e=>typeof e=="number"&&Number.isInteger(e)&&e>=C.min&&e<=C.max;function re(e,{year:a,policies:r,include:p=[],statePension:d}){const{head:n,partner:c,hasPartner:o}=e,g=e.children.map(u=>q(u.age)?{age:u.age,in_education:u.inEducation!==!1}:{age:u.age}),l=U(e.tenure);return{year:a,policies:[...r],household:{age:n.age,employment_income:n.employmentIncome,has_partner:!!o,...o||ae(c.age)?{partner_age:c.age}:{},partner_employment_income:o?c.employmentIncome:0,children:g,region:e.region,claims_universal_credit:!!e.claimsUniversalCredit,tenure:e.tenure,monthly_rent:l?j(e):0,dividend_income:n.dividendIncome,savings_interest_income:n.savingsInterestIncome,private_pension_income:n.privatePensionIncome??0,partner_private_pension_income:o?c.privatePensionIncome??0:0,property_income:n.propertyIncome,petrol_spending:e.spending.petrol,diesel_spending:e.spending.diesel,electricity_spending:e.spending.electricity??F.electricity,salary_sacrifice_pension_contributions:n.salarySacrificePensionContributions,student_loan_plan:n.studentLoanPlan,council_tax_band:e.councilTaxBand,monthly_childcare:g.length?e.monthlyChildcare:0,salary_year:e.salaryYear,...N(n.statePension)&&S(n.age,a,d)?{state_pension:n.statePension}:{},...o&&N(c.statePension)&&S(c.age,a,d)?{partner_state_pension:c.statePension}:{}},include:[...p]}}function j(e){return typeof e.monthlyRent=="number"&&Number.isFinite(e.monthlyRent)?e.monthlyRent:G(e.region)}exports.UK_AVERAGE_RENT=w;exports.UK_CHILD_AGE_MESSAGE=W;exports.UK_COUNCIL_TAX_BANDS=$;exports.UK_DEFAULT_SALARY=Q;exports.UK_DEFAULT_SALARY_NOTE=Z;exports.UK_DEFAULT_SOURCES=ne;exports.UK_DEFAULT_SPENDING=F;exports.UK_HOUSEHOLD_LIMITS=L;exports.UK_NEW_CHILD_AGE=te;exports.UK_OLDEST_CHILD_AGE=I;exports.UK_POLICY_YEARS=B;exports.UK_REGIONAL_RENT=y;exports.UK_REGIONS=R;exports.UK_RENTING_TENURES=f;exports.UK_SALARY_YEAR=z;exports.UK_STATE_PENSION=T;exports.UK_STUDENT_LOAN_PLANS=b;exports.UK_TENURES=D;exports.UK_YOUNG_PERSON_AGE=k;exports.asksEducation=q;exports.atStatePensionAge=S;exports.getRegionName=X;exports.isComplete=se;exports.isRenting=U;exports.isUKCouncilTaxBand=H;exports.isUKRegion=v;exports.isUKStudentLoanPlan=Y;exports.isUKTenure=x;exports.monthlyRentFor=j;exports.regionalRent=G;exports.regionalRentMonth=ee;exports.statePensionEntered=N;exports.statePensionFor=M;exports.toHouseholdImpactRequest=re;exports.validate=V;
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
const U = [
|
|
2
|
+
{ code: "NORTH_EAST", name: "North East" },
|
|
3
|
+
{ code: "NORTH_WEST", name: "North West" },
|
|
4
|
+
{ code: "YORKSHIRE", name: "Yorkshire and the Humber" },
|
|
5
|
+
{ code: "EAST_MIDLANDS", name: "East Midlands" },
|
|
6
|
+
{ code: "WEST_MIDLANDS", name: "West Midlands" },
|
|
7
|
+
{ code: "EAST_OF_ENGLAND", name: "East of England" },
|
|
8
|
+
{ code: "LONDON", name: "London" },
|
|
9
|
+
{ code: "SOUTH_EAST", name: "South East" },
|
|
10
|
+
{ code: "SOUTH_WEST", name: "South West" },
|
|
11
|
+
{ code: "WALES", name: "Wales" },
|
|
12
|
+
{ code: "SCOTLAND", name: "Scotland" },
|
|
13
|
+
{ code: "NORTHERN_IRELAND", name: "Northern Ireland" }
|
|
14
|
+
], C = [
|
|
15
|
+
"RENT_PRIVATELY",
|
|
16
|
+
"RENT_FROM_COUNCIL",
|
|
17
|
+
"RENT_FROM_HA",
|
|
18
|
+
"OWNED_WITH_MORTGAGE",
|
|
19
|
+
"OWNED_OUTRIGHT"
|
|
20
|
+
], $ = ["RENT_PRIVATELY", "RENT_FROM_COUNCIL", "RENT_FROM_HA"], v = [
|
|
21
|
+
"NONE",
|
|
22
|
+
"PLAN_1",
|
|
23
|
+
"PLAN_2",
|
|
24
|
+
"PLAN_4",
|
|
25
|
+
"PLAN_5",
|
|
26
|
+
"POSTGRADUATE"
|
|
27
|
+
], D = ["A", "B", "C", "D", "E", "F", "G", "H", "I"], A = (e, a) => typeof a == "string" && e.includes(a), Y = (e) => A(
|
|
28
|
+
U.map((a) => a.code),
|
|
29
|
+
e
|
|
30
|
+
), w = (e) => A(C, e), H = (e) => A(v, e), K = (e) => A(D, e), P = (e) => A($, e);
|
|
31
|
+
function Z(e) {
|
|
32
|
+
var a;
|
|
33
|
+
return ((a = U.find((r) => r.code === e)) == null ? void 0 : a.name) ?? e;
|
|
34
|
+
}
|
|
35
|
+
const ee = 2026, ne = 34200, te = "£34,200 is the UK median salary in April 2026 (ONS Annual Survey of Hours and Earnings, provisional).", I = {
|
|
36
|
+
NORTH_EAST: 790,
|
|
37
|
+
NORTH_WEST: 975,
|
|
38
|
+
YORKSHIRE: 869,
|
|
39
|
+
EAST_MIDLANDS: 928,
|
|
40
|
+
WEST_MIDLANDS: 983,
|
|
41
|
+
EAST_OF_ENGLAND: 1298,
|
|
42
|
+
LONDON: 2338,
|
|
43
|
+
SOUTH_EAST: 1438,
|
|
44
|
+
SOUTH_WEST: 1251,
|
|
45
|
+
WALES: 848,
|
|
46
|
+
SCOTLAND: 1011,
|
|
47
|
+
NORTHERN_IRELAND: 879
|
|
48
|
+
}, k = 1406, oe = (e) => e === "NORTHERN_IRELAND" ? "July 2026" : "September 2026";
|
|
49
|
+
function F(e) {
|
|
50
|
+
return typeof e == "string" && Object.prototype.hasOwnProperty.call(I, e) ? I[e] : k;
|
|
51
|
+
}
|
|
52
|
+
const W = {
|
|
53
|
+
petrol: 620,
|
|
54
|
+
diesel: 340,
|
|
55
|
+
electricity: 1040
|
|
56
|
+
}, ie = {
|
|
57
|
+
salary: {
|
|
58
|
+
statistic: "Median gross annual pay, all employee jobs, UK, April 2026 (provisional): £34,229",
|
|
59
|
+
publication: "ONS, Annual Survey of Hours and Earnings 2026, Table 6.7a",
|
|
60
|
+
url: "https://www.ons.gov.uk/employmentandlabourmarket/peopleinwork/earningsandworkinghours/datasets/agegroupashetable6"
|
|
61
|
+
},
|
|
62
|
+
rent: {
|
|
63
|
+
statistic: "Average monthly private rent by region, September 2026 (Northern Ireland: July 2026)",
|
|
64
|
+
publication: "ONS, Price Index of Private Rents, published 21 October 2026",
|
|
65
|
+
url: "https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/priceindexofprivaterentsukmonthlypricestatistics"
|
|
66
|
+
},
|
|
67
|
+
spending: {
|
|
68
|
+
statistic: "Average weekly household spending on petrol, diesel and electricity, FYE 2025",
|
|
69
|
+
publication: "ONS, Family Spending in the UK, FYE 2025, Workbook 1, Table A1",
|
|
70
|
+
url: "https://www.ons.gov.uk/peoplepopulationandcommunity/personalandhouseholdfinances/expenditure/datasets/familyspendingworkbook1detailedexpenditureandtrends"
|
|
71
|
+
}
|
|
72
|
+
}, L = {
|
|
73
|
+
years: {
|
|
74
|
+
2026: { state_pension_age: 66, full_new_state_pension: 12547.6 },
|
|
75
|
+
2027: { state_pension_age: 67, full_new_state_pension: 13036.97 },
|
|
76
|
+
2028: { state_pension_age: 67, full_new_state_pension: 13362.92 },
|
|
77
|
+
2029: { state_pension_age: 67, full_new_state_pension: 13696.98 },
|
|
78
|
+
2030: { state_pension_age: 67, full_new_state_pension: 14039.42 },
|
|
79
|
+
2031: { state_pension_age: 67, full_new_state_pension: 14390.39 }
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
function G(e, a = L) {
|
|
83
|
+
const r = Object.keys(a.years).map(Number).sort((n, c) => n - c), p = r.find((n) => n >= e) ?? r[r.length - 1], m = a.years[String(p)];
|
|
84
|
+
return { age: m.state_pension_age, full: m.full_new_state_pension };
|
|
85
|
+
}
|
|
86
|
+
function E(e, a, r = L) {
|
|
87
|
+
return e >= G(a, r).age;
|
|
88
|
+
}
|
|
89
|
+
const S = (e) => typeof e == "number" && Number.isFinite(e), f = 19, M = 16, q = "Children are 0 to 19. Someone aged 20 or over is not a dependant for Child Benefit or Universal Credit, so leave them out.", B = (e) => e >= M && e <= f, se = 5, b = {
|
|
90
|
+
adultAge: { min: 16, max: 100 },
|
|
91
|
+
childAge: { min: 0, max: f },
|
|
92
|
+
maxChildren: 10,
|
|
93
|
+
/** Incomes and salary sacrifice. */
|
|
94
|
+
maxAmount: 1e7,
|
|
95
|
+
maxMonthlyRent: 1e5,
|
|
96
|
+
maxMonthlyChildcare: 1e4,
|
|
97
|
+
/** Petrol, diesel and electricity. */
|
|
98
|
+
maxSpending: 1e5,
|
|
99
|
+
maxStatePension: 1e5
|
|
100
|
+
}, j = [2026, 2027, 2028, 2029, 2030, 2031], h = (e) => typeof e == "number" && Number.isInteger(e), V = (e) => typeof e == "number" && Number.isFinite(e), J = (e) => `£${e.toLocaleString("en-GB")}`;
|
|
101
|
+
function z(e, a) {
|
|
102
|
+
var N, T, R;
|
|
103
|
+
const { year: r, years: p = j, statePension: m } = a, n = b, c = [], i = (t, s, o) => c.push({ code: t, path: s, message: o });
|
|
104
|
+
(!h(r) || !p.includes(r)) && i("year.unsupported", "year", `${String(r)} is not a year this calculation covers.`), !h(e.salaryYear) || !p.includes(e.salaryYear) ? i("salaryYear.unsupported", "salaryYear", `Salaries cannot be entered for ${String(e.salaryYear)}.`) : h(r) && e.salaryYear > r && i(
|
|
105
|
+
"salaryYear.afterYear",
|
|
106
|
+
"salaryYear",
|
|
107
|
+
`Salaries are entered for ${e.salaryYear}, after ${r}; they can only be grown forward.`
|
|
108
|
+
);
|
|
109
|
+
const g = (t, s, o, u) => {
|
|
110
|
+
o == null ? i(`${t}.required`, t, `${s} is required.`) : u(o) || i(`${t}.invalid`, t, `Unknown ${s.toLowerCase()} "${String(o)}".`);
|
|
111
|
+
};
|
|
112
|
+
g("region", "Region", e.region, Y), g("tenure", "Housing", e.tenure, w), g("councilTaxBand", "Council Tax band", e.councilTaxBand, K), typeof e.claimsUniversalCredit != "boolean" && i("claimsUniversalCredit.required", "claimsUniversalCredit", "Whether the household claims Universal Credit is required.");
|
|
113
|
+
const l = (t, s, o, u, { optional: x = !1 } = {}) => {
|
|
114
|
+
o == null ? x || i(`${t}.required`, t, `${s} is required.`) : V(o) ? o < 0 ? i(`${t}.negative`, t, `${s} cannot be negative.`) : o > u && i(`${t}.tooLarge`, t, `${s} cannot be more than ${J(u)}.`) : i(`${t}.notANumber`, t, `${s} must be a number.`);
|
|
115
|
+
}, _ = (t, s, o) => {
|
|
116
|
+
o == null ? i(`${t}.required`, t, `${s} is required.`) : h(o) ? (o < n.adultAge.min || o > n.adultAge.max) && i(`${t}.outOfRange`, t, `${s} must be from ${n.adultAge.min} to ${n.adultAge.max}.`) : i(`${t}.notWhole`, t, `${s} must be a whole number of years.`);
|
|
117
|
+
}, { head: d, partner: y } = e;
|
|
118
|
+
_("head.age", "Your age", d.age), l("head.employmentIncome", "Your salary", d.employmentIncome, n.maxAmount), l("head.privatePensionIncome", "Your private pension", d.privatePensionIncome, n.maxAmount, {
|
|
119
|
+
optional: !0
|
|
120
|
+
}), l("head.dividendIncome", "Dividends", d.dividendIncome, n.maxAmount), l("head.savingsInterestIncome", "Savings interest", d.savingsInterestIncome, n.maxAmount), l("head.propertyIncome", "Property income", d.propertyIncome, n.maxAmount), l(
|
|
121
|
+
"head.salarySacrificePensionContributions",
|
|
122
|
+
"Salary sacrifice",
|
|
123
|
+
d.salarySacrificePensionContributions,
|
|
124
|
+
n.maxAmount
|
|
125
|
+
), H(d.studentLoanPlan) || i("head.studentLoanPlan.invalid", "head.studentLoanPlan", `Unknown student loan plan "${String(d.studentLoanPlan)}".`), S(d.statePension) && E(d.age, r, m) && l("head.statePension", "Your State Pension", d.statePension, n.maxStatePension), e.hasPartner && (_("partner.age", "Your partner's age", y.age), l("partner.employmentIncome", "Your partner's salary", y.employmentIncome, n.maxAmount), l(
|
|
126
|
+
"partner.privatePensionIncome",
|
|
127
|
+
"Your partner's private pension",
|
|
128
|
+
y.privatePensionIncome,
|
|
129
|
+
n.maxAmount,
|
|
130
|
+
{ optional: !0 }
|
|
131
|
+
), S(y.statePension) && E(y.age, r, m) && l("partner.statePension", "Your partner's State Pension", y.statePension, n.maxStatePension)), e.children.length > n.maxChildren && i("children.tooMany", "children", `At most ${n.maxChildren} children can be entered.`);
|
|
132
|
+
for (let t = 0; t < e.children.length; t++) {
|
|
133
|
+
const s = e.children[t];
|
|
134
|
+
if (s == null) {
|
|
135
|
+
i(`children[${t}].required`, `children[${t}]`, `Child ${t + 1}'s details are missing.`);
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
const o = `children[${t}].age`, u = `Child ${t + 1}'s age`;
|
|
139
|
+
s.age === null || s.age === void 0 ? i(`${o}.required`, o, `${u} is required.`) : h(s.age) ? s.age < n.childAge.min ? i(`${o}.negative`, o, `${u} cannot be negative.`) : s.age > n.childAge.max && i(`${o}.tooOld`, o, q) : i(`${o}.notWhole`, o, `${u} must be a whole number of years.`);
|
|
140
|
+
}
|
|
141
|
+
return P(e.tenure) && l("monthlyRent", "Rent", e.monthlyRent, n.maxMonthlyRent, { optional: !0 }), e.children.length > 0 && l("monthlyChildcare", "Childcare", e.monthlyChildcare, n.maxMonthlyChildcare), l("spending.petrol", "Petrol spending", (N = e.spending) == null ? void 0 : N.petrol, n.maxSpending), l("spending.diesel", "Diesel spending", (T = e.spending) == null ? void 0 : T.diesel, n.maxSpending), l("spending.electricity", "Electricity spending", (R = e.spending) == null ? void 0 : R.electricity, n.maxSpending, {
|
|
142
|
+
optional: !0
|
|
143
|
+
}), c.length === 0 ? { ok: !0, issues: [] } : { ok: !1, issues: c };
|
|
144
|
+
}
|
|
145
|
+
function ae(e, a) {
|
|
146
|
+
return z(e, a).ok;
|
|
147
|
+
}
|
|
148
|
+
const { adultAge: O } = b, X = (e) => typeof e == "number" && Number.isInteger(e) && e >= O.min && e <= O.max;
|
|
149
|
+
function re(e, { year: a, policies: r, include: p = [], statePension: m }) {
|
|
150
|
+
const { head: n, partner: c, hasPartner: i } = e, g = e.children.map(
|
|
151
|
+
(_) => B(_.age) ? { age: _.age, in_education: _.inEducation !== !1 } : { age: _.age }
|
|
152
|
+
), l = P(e.tenure);
|
|
153
|
+
return {
|
|
154
|
+
year: a,
|
|
155
|
+
policies: [...r],
|
|
156
|
+
household: {
|
|
157
|
+
age: n.age,
|
|
158
|
+
employment_income: n.employmentIncome,
|
|
159
|
+
has_partner: !!i,
|
|
160
|
+
...i || X(c.age) ? { partner_age: c.age } : {},
|
|
161
|
+
partner_employment_income: i ? c.employmentIncome : 0,
|
|
162
|
+
children: g,
|
|
163
|
+
region: e.region,
|
|
164
|
+
claims_universal_credit: !!e.claimsUniversalCredit,
|
|
165
|
+
tenure: e.tenure,
|
|
166
|
+
monthly_rent: l ? Q(e) : 0,
|
|
167
|
+
dividend_income: n.dividendIncome,
|
|
168
|
+
savings_interest_income: n.savingsInterestIncome,
|
|
169
|
+
private_pension_income: n.privatePensionIncome ?? 0,
|
|
170
|
+
partner_private_pension_income: i ? c.privatePensionIncome ?? 0 : 0,
|
|
171
|
+
property_income: n.propertyIncome,
|
|
172
|
+
petrol_spending: e.spending.petrol,
|
|
173
|
+
diesel_spending: e.spending.diesel,
|
|
174
|
+
electricity_spending: e.spending.electricity ?? W.electricity,
|
|
175
|
+
salary_sacrifice_pension_contributions: n.salarySacrificePensionContributions,
|
|
176
|
+
student_loan_plan: n.studentLoanPlan,
|
|
177
|
+
council_tax_band: e.councilTaxBand,
|
|
178
|
+
monthly_childcare: g.length ? e.monthlyChildcare : 0,
|
|
179
|
+
salary_year: e.salaryYear,
|
|
180
|
+
...S(n.statePension) && E(n.age, a, m) ? { state_pension: n.statePension } : {},
|
|
181
|
+
...i && S(c.statePension) && E(c.age, a, m) ? { partner_state_pension: c.statePension } : {}
|
|
182
|
+
},
|
|
183
|
+
include: [...p]
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function Q(e) {
|
|
187
|
+
return typeof e.monthlyRent == "number" && Number.isFinite(e.monthlyRent) ? e.monthlyRent : F(e.region);
|
|
188
|
+
}
|
|
189
|
+
export {
|
|
190
|
+
w as A,
|
|
191
|
+
Q as B,
|
|
192
|
+
F as C,
|
|
193
|
+
oe as D,
|
|
194
|
+
S as E,
|
|
195
|
+
G as F,
|
|
196
|
+
re as G,
|
|
197
|
+
z as H,
|
|
198
|
+
k as U,
|
|
199
|
+
q as a,
|
|
200
|
+
D as b,
|
|
201
|
+
ne as c,
|
|
202
|
+
te as d,
|
|
203
|
+
ie as e,
|
|
204
|
+
W as f,
|
|
205
|
+
b as g,
|
|
206
|
+
se as h,
|
|
207
|
+
f as i,
|
|
208
|
+
j,
|
|
209
|
+
I as k,
|
|
210
|
+
U as l,
|
|
211
|
+
$ as m,
|
|
212
|
+
ee as n,
|
|
213
|
+
L as o,
|
|
214
|
+
v as p,
|
|
215
|
+
C as q,
|
|
216
|
+
M as r,
|
|
217
|
+
B as s,
|
|
218
|
+
E as t,
|
|
219
|
+
Z as u,
|
|
220
|
+
ae as v,
|
|
221
|
+
P as w,
|
|
222
|
+
K as x,
|
|
223
|
+
Y as y,
|
|
224
|
+
H as z
|
|
225
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './primitives';
|
|
2
|
-
export * from './us-household';
|
|
1
|
+
export * from './primitives.js';
|
|
2
|
+
export * from './us-household.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { useWizardSteps } from './useWizardSteps';
|
|
2
|
-
export { useWizardStepFocus } from './useWizardStepFocus';
|
|
3
|
-
export type { UseWizardStepFocusOptions } from './useWizardStepFocus';
|
|
4
|
-
export { WizardProgress } from './WizardProgress';
|
|
5
|
-
export type { WizardProgressProps } from './WizardProgress';
|
|
6
|
-
export { WizardOptionCard } from './WizardOptionCard';
|
|
7
|
-
export type { WizardOptionCardProps } from './WizardOptionCard';
|
|
8
|
-
export { WizardNavigation } from './WizardNavigation';
|
|
9
|
-
export type { WizardNavigationProps } from './WizardNavigation';
|
|
10
|
-
export { WizardReviewList } from './WizardReviewList';
|
|
11
|
-
export type { WizardReviewItem, WizardReviewListProps } from './WizardReviewList';
|
|
12
|
-
export type { ResolvedWizardStep, UseWizardStepsOptions, UseWizardStepsResult, WizardStepConfig, WizardAdvanceRequest, } from './types';
|
|
1
|
+
export { useWizardSteps } from './useWizardSteps.js';
|
|
2
|
+
export { useWizardStepFocus } from './useWizardStepFocus.js';
|
|
3
|
+
export type { UseWizardStepFocusOptions } from './useWizardStepFocus.js';
|
|
4
|
+
export { WizardProgress } from './WizardProgress.js';
|
|
5
|
+
export type { WizardProgressProps } from './WizardProgress.js';
|
|
6
|
+
export { WizardOptionCard } from './WizardOptionCard.js';
|
|
7
|
+
export type { WizardOptionCardProps } from './WizardOptionCard.js';
|
|
8
|
+
export { WizardNavigation } from './WizardNavigation.js';
|
|
9
|
+
export type { WizardNavigationProps } from './WizardNavigation.js';
|
|
10
|
+
export { WizardReviewList } from './WizardReviewList.js';
|
|
11
|
+
export type { WizardReviewItem, WizardReviewListProps } from './WizardReviewList.js';
|
|
12
|
+
export type { ResolvedWizardStep, UseWizardStepsOptions, UseWizardStepsResult, WizardStepConfig, WizardAdvanceRequest, } from './types.js';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { UseWizardStepsOptions, UseWizardStepsResult } from './types';
|
|
1
|
+
import type { UseWizardStepsOptions, UseWizardStepsResult } from './types.js';
|
|
2
2
|
export declare function useWizardSteps<TState>({ steps, state, initialStepId, onStepChange, onComplete, onInvalidStep, advanceRequest, }: UseWizardStepsOptions<TState>): UseWizardStepsResult;
|
|
3
3
|
//# sourceMappingURL=useWizardSteps.d.ts.map
|
package/dist/primitives.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './primitives/index';
|
|
1
|
+
export * from './primitives/index.js';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type UKStatePensionTable } from '../statePension.js';
|
|
2
|
+
import type { UKHouseholdDraft } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The request body of the Autumn Budget 2026 dashboard's household impact
|
|
5
|
+
* API (`POST /api/household-impact`, `HouseholdImpactRequest` in
|
|
6
|
+
* PolicyEngine/uk-autumn-budget-dashboard-2026's src/uk_budget_data/api.py).
|
|
7
|
+
* The API refuses unknown fields with a 422, and reads the `partner_*`
|
|
8
|
+
* fields only when `has_partner` is true.
|
|
9
|
+
*/
|
|
10
|
+
export interface HouseholdImpactChild {
|
|
11
|
+
age: number;
|
|
12
|
+
/** Sent from 16 to 19 only. */
|
|
13
|
+
in_education?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface HouseholdImpactHousehold {
|
|
16
|
+
age: number;
|
|
17
|
+
employment_income: number;
|
|
18
|
+
has_partner: boolean;
|
|
19
|
+
/** Left out without a partner when the draft's is not an age the API takes. */
|
|
20
|
+
partner_age?: number;
|
|
21
|
+
partner_employment_income: number;
|
|
22
|
+
children: HouseholdImpactChild[];
|
|
23
|
+
region: string;
|
|
24
|
+
claims_universal_credit: boolean;
|
|
25
|
+
tenure: string;
|
|
26
|
+
monthly_rent: number;
|
|
27
|
+
dividend_income: number;
|
|
28
|
+
savings_interest_income: number;
|
|
29
|
+
private_pension_income: number;
|
|
30
|
+
partner_private_pension_income: number;
|
|
31
|
+
property_income: number;
|
|
32
|
+
petrol_spending: number;
|
|
33
|
+
diesel_spending: number;
|
|
34
|
+
electricity_spending: number;
|
|
35
|
+
salary_sacrifice_pension_contributions: number;
|
|
36
|
+
student_loan_plan: string;
|
|
37
|
+
council_tax_band: string;
|
|
38
|
+
monthly_childcare: number;
|
|
39
|
+
salary_year: number;
|
|
40
|
+
state_pension?: number;
|
|
41
|
+
partner_state_pension?: number;
|
|
42
|
+
}
|
|
43
|
+
/** The slower parts of a calculation, asked for apart from the headline. */
|
|
44
|
+
export type HouseholdImpactPart = 'by_policy' | 'sweep';
|
|
45
|
+
export interface HouseholdImpactRequest {
|
|
46
|
+
year: number;
|
|
47
|
+
policies: string[];
|
|
48
|
+
household: HouseholdImpactHousehold;
|
|
49
|
+
include: HouseholdImpactPart[];
|
|
50
|
+
}
|
|
51
|
+
export interface ToHouseholdImpactRequestOptions {
|
|
52
|
+
/** The policy year (2027 is 2027-28). */
|
|
53
|
+
year: number;
|
|
54
|
+
/**
|
|
55
|
+
* The measures to compare the household under, sent as given: at least
|
|
56
|
+
* one, each an id the API knows (it refuses an empty list and an unknown
|
|
57
|
+
* id).
|
|
58
|
+
*/
|
|
59
|
+
policies: readonly string[];
|
|
60
|
+
/** The slower parts to compute besides the headline; none by default. */
|
|
61
|
+
include?: readonly HouseholdImpactPart[];
|
|
62
|
+
/** State Pension ages by year; left out, `UK_STATE_PENSION`. */
|
|
63
|
+
statePension?: UKStatePensionTable;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The household impact API's request for a draft.
|
|
67
|
+
*
|
|
68
|
+
* Answers go as they are, so `validate()` first: the API refuses what it
|
|
69
|
+
* flags. The rules the request applies:
|
|
70
|
+
* - the partner's salary and pension are sent only with a partner, as 0
|
|
71
|
+
* otherwise. The partner's age is sent even without one, as the dashboard
|
|
72
|
+
* always has (the API reads it only with a partner); without a partner, an
|
|
73
|
+
* age the API would refuse (unanswered, or not a whole number from 16 to
|
|
74
|
+
* 100) is left out, so it cannot fail a single person's request;
|
|
75
|
+
* - children from 16 to 19 carry whether they are in full-time non-advanced
|
|
76
|
+
* education, yes unless answered `false`;
|
|
77
|
+
* - rent only when renting, as entered or else the region's average private
|
|
78
|
+
* rent; 0 otherwise;
|
|
79
|
+
* - childcare only with children; 0 otherwise;
|
|
80
|
+
* - a private pension left out is 0, and electricity left out is the
|
|
81
|
+
* average household's (`UK_DEFAULT_SPENDING.electricity`);
|
|
82
|
+
* - a State Pension only as entered and at State Pension age in `year`;
|
|
83
|
+
* left as prefilled (`null`), the API uses the full new State Pension.
|
|
84
|
+
*
|
|
85
|
+
* The keys come in a fixed order, so `JSON.stringify` of two requests for
|
|
86
|
+
* the same answers gives the same text (apps key caches on it).
|
|
87
|
+
*/
|
|
88
|
+
export declare function toHouseholdImpactRequest(draft: UKHouseholdDraft, { year, policies, include, statePension }: ToHouseholdImpactRequestOptions): HouseholdImpactRequest;
|
|
89
|
+
/** The rent a month: as entered, else the region's average private rent. */
|
|
90
|
+
export declare function monthlyRentFor(draft: Pick<UKHouseholdDraft, 'monthlyRent' | 'region'>): number;
|
|
91
|
+
//# sourceMappingURL=householdImpactRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"householdImpactRequest.d.ts","sourceRoot":"","sources":["../../../src/uk-household/adapters/householdImpactRequest.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB,EAAE,OAAO,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,8BAA8B,EAAE,MAAM,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sCAAsC,EAAE,MAAM,CAAC;IAC/C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,4EAA4E;AAC5E,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,OAAO,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,wBAAwB,CAAC;IACpC,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,+BAA+B;IAC9C,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,yEAAyE;IACzE,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACzC,gEAAgE;IAChE,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACpC;AAQD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,gBAAgB,EACvB,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAY,EAAE,YAAY,EAAE,EAAE,+BAA+B,GAC9E,sBAAsB,CA8CxB;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,aAAa,GAAG,QAAQ,CAAC,GAAG,MAAM,CAI9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/uk-household/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,GACrC,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The oldest age a child can have. policyengine-uk's qualifying young person
|
|
3
|
+
* is under 20, and the household impact API refuses a child of 20 or over
|
|
4
|
+
* (`HouseholdChildRequest.age`, `le=19`).
|
|
5
|
+
*/
|
|
6
|
+
export declare const UK_OLDEST_CHILD_AGE = 19;
|
|
7
|
+
/**
|
|
8
|
+
* From this age, whether a child is in full-time non-advanced education
|
|
9
|
+
* decides whether they count as a dependant.
|
|
10
|
+
*/
|
|
11
|
+
export declare const UK_YOUNG_PERSON_AGE = 16;
|
|
12
|
+
/** What to tell someone who enters a child of 20 or over. */
|
|
13
|
+
export declare const UK_CHILD_AGE_MESSAGE = "Children are 0 to 19. Someone aged 20 or over is not a dependant for Child Benefit or Universal Credit, so leave them out.";
|
|
14
|
+
/** Whether a child of `age` is asked about education: from 16 to 19. */
|
|
15
|
+
export declare const asksEducation: (age: number | null | undefined) => boolean;
|
|
16
|
+
/** The age a new child starts at in a form that adds one (`setChildCount`). */
|
|
17
|
+
export declare const UK_NEW_CHILD_AGE = 5;
|
|
18
|
+
//# sourceMappingURL=children.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../src/uk-household/children.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,+HAC6F,CAAC;AAE/H,wEAAwE;AACxE,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,OACmB,CAAC;AAEnF,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,IAAI,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { UKCouncilTaxBand, UKRegion, UKStudentLoanPlan, UKTenure } from './types.js';
|
|
2
|
+
export interface UKRegionOption {
|
|
3
|
+
code: UKRegion;
|
|
4
|
+
/** policyengine-uk's own label for the region. */
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
/** The regions, in policyengine-uk's order, with its labels. */
|
|
8
|
+
export declare const UK_REGIONS: readonly UKRegionOption[];
|
|
9
|
+
export declare const UK_TENURES: readonly UKTenure[];
|
|
10
|
+
/** The tenures that pay rent: rent is read only for these. */
|
|
11
|
+
export declare const UK_RENTING_TENURES: readonly UKTenure[];
|
|
12
|
+
export declare const UK_STUDENT_LOAN_PLANS: readonly UKStudentLoanPlan[];
|
|
13
|
+
export declare const UK_COUNCIL_TAX_BANDS: readonly UKCouncilTaxBand[];
|
|
14
|
+
export declare const isUKRegion: (value: unknown) => value is UKRegion;
|
|
15
|
+
export declare const isUKTenure: (value: unknown) => value is UKTenure;
|
|
16
|
+
export declare const isUKStudentLoanPlan: (value: unknown) => value is UKStudentLoanPlan;
|
|
17
|
+
export declare const isUKCouncilTaxBand: (value: unknown) => value is UKCouncilTaxBand;
|
|
18
|
+
/** Whether a tenure pays rent. Anything else, unknown codes included, does not. */
|
|
19
|
+
export declare const isRenting: (tenure: unknown) => boolean;
|
|
20
|
+
/** policyengine-uk's label for a region, or the code itself if unknown. */
|
|
21
|
+
export declare function getRegionName(code: string): string;
|
|
22
|
+
//# sourceMappingURL=codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/uk-household/codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEvF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gEAAgE;AAChE,eAAO,MAAM,UAAU,EAAE,SAAS,cAAc,EAa/C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAMzC,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,kBAAkB,EAAE,SAAS,QAAQ,EAA4D,CAAC;AAE/G,eAAO,MAAM,qBAAqB,EAAE,SAAS,iBAAiB,EAO7D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,SAAS,gBAAgB,EAAkD,CAAC;AAK/G,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,QAIlD,CAAC;AACJ,eAAO,MAAM,UAAU,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,QAAkC,CAAC;AACxF,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,iBAC3B,CAAC;AACpC,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,gBAC3B,CAAC;AAEnC,mFAAmF;AACnF,eAAO,MAAM,SAAS,GAAI,QAAQ,OAAO,KAAG,OAA0C,CAAC;AAEvF,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { UKRegion } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Typical answers, with their sources, for apps that start every answer at a
|
|
4
|
+
* typical value (the Autumn Budget 2026 dashboard does). `createTypicalDraft()`
|
|
5
|
+
* puts them together.
|
|
6
|
+
*/
|
|
7
|
+
export interface UKDefaultSource {
|
|
8
|
+
/** What the figure is. */
|
|
9
|
+
statistic: string;
|
|
10
|
+
/** The publication and table it comes from. */
|
|
11
|
+
publication: string;
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The year salaries are entered for. The latest median salary (below) is for
|
|
16
|
+
* April 2026, so a form that asks for "salary in 2026" can start from it.
|
|
17
|
+
*/
|
|
18
|
+
export declare const UK_SALARY_YEAR = 2026;
|
|
19
|
+
/**
|
|
20
|
+
* The UK median salary, rounded: ONS, Annual Survey of Hours and Earnings
|
|
21
|
+
* (ASHE) 2026 provisional, Table 6.7a "Annual pay - Gross", all employee jobs,
|
|
22
|
+
* UK: median £34,229 in April 2026 (employees on adult rates in the same job
|
|
23
|
+
* for more than a year), rounded to £34,200.
|
|
24
|
+
*/
|
|
25
|
+
export declare const UK_DEFAULT_SALARY = 34200;
|
|
26
|
+
/** A sentence for forms that prefill the salary (the dashboard's hint). */
|
|
27
|
+
export declare const UK_DEFAULT_SALARY_NOTE = "\u00A334,200 is the UK median salary in April 2026 (ONS Annual Survey of Hours and Earnings, provisional).";
|
|
28
|
+
/**
|
|
29
|
+
* Average monthly private rent by region: ONS, Price Index of Private Rents
|
|
30
|
+
* (PIPR), September 2026 (Northern Ireland: July 2026, its latest month),
|
|
31
|
+
* published 21 October 2026.
|
|
32
|
+
*/
|
|
33
|
+
export declare const UK_REGIONAL_RENT: Readonly<Record<UKRegion, number>>;
|
|
34
|
+
/** The UK's average monthly private rent in the same release. */
|
|
35
|
+
export declare const UK_AVERAGE_RENT = 1406;
|
|
36
|
+
/** The month each region's average rent is for. */
|
|
37
|
+
export declare const regionalRentMonth: (region: unknown) => string;
|
|
38
|
+
/**
|
|
39
|
+
* The region's average monthly private rent, or the UK's for anything that
|
|
40
|
+
* is not a region code (`null` included).
|
|
41
|
+
*/
|
|
42
|
+
export declare function regionalRent(region: unknown): number;
|
|
43
|
+
/**
|
|
44
|
+
* Average household spending, pounds a year: ONS, Family Spending in the UK,
|
|
45
|
+
* FYE 2025, Workbook 1, Table A1, average weekly household spending times 52,
|
|
46
|
+
* rounded to £10. Petrol £11.90 a week (£620 a year), diesel £6.50 (£340),
|
|
47
|
+
* electricity (line 4.4.1) £20.00 (£1,040, the household impact API's own
|
|
48
|
+
* default for electricity).
|
|
49
|
+
*/
|
|
50
|
+
export declare const UK_DEFAULT_SPENDING: {
|
|
51
|
+
readonly petrol: 620;
|
|
52
|
+
readonly diesel: 340;
|
|
53
|
+
readonly electricity: 1040;
|
|
54
|
+
};
|
|
55
|
+
export declare const UK_DEFAULT_SOURCES: Readonly<Record<'salary' | 'rent' | 'spending', UKDefaultSource>>;
|
|
56
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/uk-household/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC;;;;GAIG;AAEH,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,+GACsE,CAAC;AAE1G;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAa/D,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,mDAAmD;AACnD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,OAAO,KAAG,MACY,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAIpD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AAEX,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,GAAG,MAAM,GAAG,UAAU,EAAE,eAAe,CAAC,CAgBhG,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { UKAdultDraft, UKChildDraft, UKHeadDraft, UKHouseholdDraft } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A draft with nothing chosen: no region, ages, tenure, Council Tax band or
|
|
4
|
+
* Universal Credit answer, no partner or children, and amounts at zero. The
|
|
5
|
+
* app must capture each unanswered field before `validate()` accepts it.
|
|
6
|
+
* Rent, the State Pension and electricity start at their "left as prefilled"
|
|
7
|
+
* value (`null`).
|
|
8
|
+
*/
|
|
9
|
+
export declare function createBlankDraft(salaryYear?: number): UKHouseholdDraft;
|
|
10
|
+
/**
|
|
11
|
+
* A draft with every answer at a typical value: the Autumn Budget 2026
|
|
12
|
+
* dashboard's starting answers. The salary, rent and spending are statistics
|
|
13
|
+
* (`UK_DEFAULT_SOURCES`); the rest are the dashboard's choices:
|
|
14
|
+
* - a single adult of 30 (and, if a partner is added, a partner of 30 on the
|
|
15
|
+
* median salary) in the North West, renting privately at the region's
|
|
16
|
+
* average rent (`monthlyRent: null`);
|
|
17
|
+
* - no student loan: policyengine-uk's repayment depends on the plan and
|
|
18
|
+
* income alone (the balance only caps a year's repayment);
|
|
19
|
+
* - Council Tax band D, the band the dashboard suggests when unsure;
|
|
20
|
+
* - claiming the Universal Credit the household is due;
|
|
21
|
+
* - the full new State Pension at State Pension age (`statePension: null`);
|
|
22
|
+
* - no other income, salary sacrifice, pensions or childcare.
|
|
23
|
+
*/
|
|
24
|
+
export declare function createTypicalDraft(salaryYear?: number): UKHouseholdDraft;
|
|
25
|
+
/** A deep copy: changing it never changes the original. */
|
|
26
|
+
export declare function cloneDraft(draft: UKHouseholdDraft): UKHouseholdDraft;
|
|
27
|
+
export declare function updateHead(draft: UKHouseholdDraft, changes: Partial<UKHeadDraft>): UKHouseholdDraft;
|
|
28
|
+
export declare function updatePartner(draft: UKHouseholdDraft, changes: Partial<UKAdultDraft>): UKHouseholdDraft;
|
|
29
|
+
export declare function addChild(draft: UKHouseholdDraft, child?: Partial<UKChildDraft>): UKHouseholdDraft;
|
|
30
|
+
export declare function removeChild(draft: UKHouseholdDraft, index: number): UKHouseholdDraft;
|
|
31
|
+
export declare function updateChild(draft: UKHouseholdDraft, index: number, changes: Partial<UKChildDraft>): UKHouseholdDraft;
|
|
32
|
+
/**
|
|
33
|
+
* Keep the first `count` children, or add children of `newChildAge` until
|
|
34
|
+
* there are `count`. A form with a "number of children" question uses this.
|
|
35
|
+
*/
|
|
36
|
+
export declare function setChildCount(draft: UKHouseholdDraft, count: number, newChildAge?: number): UKHouseholdDraft;
|
|
37
|
+
//# sourceMappingURL=draft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/uk-household/draft.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEzF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,GAAE,MAAuB,GAAG,gBAAgB,CAyBtF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,GAAE,MAAuB,GAAG,gBAAgB,CA6BxF;AAKD,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CASpE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,gBAAgB,CAEnG;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,gBAAgB,CAEvG;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,GAAE,OAAO,CAAC,YAAY,CAAM,GAAG,gBAAgB,CAErG;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAEpF;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAC7B,gBAAgB,CAKlB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,MAAM,EACb,WAAW,GAAE,MAAyB,GACrC,gBAAgB,CAIlB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { UKAdultDraft, UKChildDraft, UKCouncilTaxBand, UKHeadDraft, UKHouseholdDraft, UKHouseholdSpending, UKRegion, UKStudentLoanPlan, UKTenure, ValidationIssue, ValidationResult, } from './types.js';
|
|
2
|
+
export { UK_COUNCIL_TAX_BANDS, UK_REGIONS, UK_RENTING_TENURES, UK_STUDENT_LOAN_PLANS, UK_TENURES, getRegionName, isRenting, isUKCouncilTaxBand, isUKRegion, isUKStudentLoanPlan, isUKTenure, type UKRegionOption, } from './codes.js';
|
|
3
|
+
export { UK_AVERAGE_RENT, UK_DEFAULT_SALARY, UK_DEFAULT_SALARY_NOTE, UK_DEFAULT_SOURCES, UK_DEFAULT_SPENDING, UK_REGIONAL_RENT, UK_SALARY_YEAR, regionalRent, regionalRentMonth, type UKDefaultSource, } from './defaults.js';
|
|
4
|
+
export { UK_STATE_PENSION, atStatePensionAge, statePensionEntered, statePensionFor, type UKStatePensionTable, type UKStatePensionYear, } from './statePension.js';
|
|
5
|
+
export { UK_CHILD_AGE_MESSAGE, UK_NEW_CHILD_AGE, UK_OLDEST_CHILD_AGE, UK_YOUNG_PERSON_AGE, asksEducation, } from './children.js';
|
|
6
|
+
export { addChild, cloneDraft, createBlankDraft, createTypicalDraft, removeChild, setChildCount, updateChild, updateHead, updatePartner, } from './draft.js';
|
|
7
|
+
export { UK_HOUSEHOLD_LIMITS, UK_POLICY_YEARS, isComplete, validate, type UKValidateOptions } from './validate.js';
|
|
8
|
+
export { deserializeDraft, serializeDraft } from './serialize.js';
|
|
9
|
+
export * from './adapters/index.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/uk-household/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,KAAK,eAAe,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE/D,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/uk-household/serialize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA2C,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAyHzF,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CA4B9D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,gBAAgB,CAmClF"}
|