equilibria-mcp-server 1.0.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.
Files changed (164) hide show
  1. package/CHANGELOG.md +142 -0
  2. package/LICENSE +21 -0
  3. package/README.md +240 -0
  4. package/dist/builders/YAMLBuilder.d.ts +77 -0
  5. package/dist/builders/YAMLBuilder.d.ts.map +1 -0
  6. package/dist/builders/YAMLBuilder.js +251 -0
  7. package/dist/builders/YAMLBuilder.js.map +1 -0
  8. package/dist/economics/constants.d.ts +39 -0
  9. package/dist/economics/constants.d.ts.map +1 -0
  10. package/dist/economics/constants.js +46 -0
  11. package/dist/economics/constants.js.map +1 -0
  12. package/dist/economics/formulas.d.ts +19 -0
  13. package/dist/economics/formulas.d.ts.map +1 -0
  14. package/dist/economics/formulas.js +260 -0
  15. package/dist/economics/formulas.js.map +1 -0
  16. package/dist/economics/index.d.ts +9 -0
  17. package/dist/economics/index.d.ts.map +1 -0
  18. package/dist/economics/index.js +9 -0
  19. package/dist/economics/index.js.map +1 -0
  20. package/dist/economics/validators.d.ts +18 -0
  21. package/dist/economics/validators.d.ts.map +1 -0
  22. package/dist/economics/validators.js +111 -0
  23. package/dist/economics/validators.js.map +1 -0
  24. package/dist/errors/index.d.ts +172 -0
  25. package/dist/errors/index.d.ts.map +1 -0
  26. package/dist/errors/index.js +313 -0
  27. package/dist/errors/index.js.map +1 -0
  28. package/dist/formatters/index.d.ts +8 -0
  29. package/dist/formatters/index.d.ts.map +1 -0
  30. package/dist/formatters/index.js +8 -0
  31. package/dist/formatters/index.js.map +1 -0
  32. package/dist/formatters/redux.d.ts +15 -0
  33. package/dist/formatters/redux.d.ts.map +1 -0
  34. package/dist/formatters/redux.js +35 -0
  35. package/dist/formatters/redux.js.map +1 -0
  36. package/dist/formatters/yaml.d.ts +18 -0
  37. package/dist/formatters/yaml.d.ts.map +1 -0
  38. package/dist/formatters/yaml.js +40 -0
  39. package/dist/formatters/yaml.js.map +1 -0
  40. package/dist/index.d.ts +11 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +19 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/server.d.ts +14 -0
  45. package/dist/server.d.ts.map +1 -0
  46. package/dist/server.js +86 -0
  47. package/dist/server.js.map +1 -0
  48. package/dist/templates/advancedMicro.d.ts +8 -0
  49. package/dist/templates/advancedMicro.d.ts.map +1 -0
  50. package/dist/templates/advancedMicro.js +834 -0
  51. package/dist/templates/advancedMicro.js.map +1 -0
  52. package/dist/templates/consumer.d.ts +12 -0
  53. package/dist/templates/consumer.d.ts.map +1 -0
  54. package/dist/templates/consumer.js +1978 -0
  55. package/dist/templates/consumer.js.map +1 -0
  56. package/dist/templates/elasticity.d.ts +8 -0
  57. package/dist/templates/elasticity.d.ts.map +1 -0
  58. package/dist/templates/elasticity.js +500 -0
  59. package/dist/templates/elasticity.js.map +1 -0
  60. package/dist/templates/externalities.d.ts +11 -0
  61. package/dist/templates/externalities.d.ts.map +1 -0
  62. package/dist/templates/externalities.js +997 -0
  63. package/dist/templates/externalities.js.map +1 -0
  64. package/dist/templates/financeBehavioral.d.ts +8 -0
  65. package/dist/templates/financeBehavioral.d.ts.map +1 -0
  66. package/dist/templates/financeBehavioral.js +860 -0
  67. package/dist/templates/financeBehavioral.js.map +1 -0
  68. package/dist/templates/growth.d.ts +8 -0
  69. package/dist/templates/growth.d.ts.map +1 -0
  70. package/dist/templates/growth.js +740 -0
  71. package/dist/templates/growth.js.map +1 -0
  72. package/dist/templates/index.d.ts +31 -0
  73. package/dist/templates/index.d.ts.map +1 -0
  74. package/dist/templates/index.js +91 -0
  75. package/dist/templates/index.js.map +1 -0
  76. package/dist/templates/inequality.d.ts +8 -0
  77. package/dist/templates/inequality.d.ts.map +1 -0
  78. package/dist/templates/inequality.js +562 -0
  79. package/dist/templates/inequality.js.map +1 -0
  80. package/dist/templates/intertemporalMacro.d.ts +8 -0
  81. package/dist/templates/intertemporalMacro.d.ts.map +1 -0
  82. package/dist/templates/intertemporalMacro.js +550 -0
  83. package/dist/templates/intertemporalMacro.js.map +1 -0
  84. package/dist/templates/isLM.d.ts +8 -0
  85. package/dist/templates/isLM.d.ts.map +1 -0
  86. package/dist/templates/isLM.js +747 -0
  87. package/dist/templates/isLM.js.map +1 -0
  88. package/dist/templates/macro.d.ts +8 -0
  89. package/dist/templates/macro.d.ts.map +1 -0
  90. package/dist/templates/macro.js +600 -0
  91. package/dist/templates/macro.js.map +1 -0
  92. package/dist/templates/marketStructures.d.ts +11 -0
  93. package/dist/templates/marketStructures.d.ts.map +1 -0
  94. package/dist/templates/marketStructures.js +1135 -0
  95. package/dist/templates/marketStructures.js.map +1 -0
  96. package/dist/templates/newKeynesian.d.ts +8 -0
  97. package/dist/templates/newKeynesian.d.ts.map +1 -0
  98. package/dist/templates/newKeynesian.js +633 -0
  99. package/dist/templates/newKeynesian.js.map +1 -0
  100. package/dist/templates/oligopoly.d.ts +11 -0
  101. package/dist/templates/oligopoly.d.ts.map +1 -0
  102. package/dist/templates/oligopoly.js +1113 -0
  103. package/dist/templates/oligopoly.js.map +1 -0
  104. package/dist/templates/ppf.d.ts +8 -0
  105. package/dist/templates/ppf.d.ts.map +1 -0
  106. package/dist/templates/ppf.js +439 -0
  107. package/dist/templates/ppf.js.map +1 -0
  108. package/dist/templates/producer.d.ts +11 -0
  109. package/dist/templates/producer.d.ts.map +1 -0
  110. package/dist/templates/producer.js +979 -0
  111. package/dist/templates/producer.js.map +1 -0
  112. package/dist/templates/production.d.ts +8 -0
  113. package/dist/templates/production.d.ts.map +1 -0
  114. package/dist/templates/production.js +574 -0
  115. package/dist/templates/production.js.map +1 -0
  116. package/dist/templates/supplyDemand.d.ts +8 -0
  117. package/dist/templates/supplyDemand.d.ts.map +1 -0
  118. package/dist/templates/supplyDemand.js +1282 -0
  119. package/dist/templates/supplyDemand.js.map +1 -0
  120. package/dist/templates/tradeGrowth.d.ts +8 -0
  121. package/dist/templates/tradeGrowth.d.ts.map +1 -0
  122. package/dist/templates/tradeGrowth.js +637 -0
  123. package/dist/templates/tradeGrowth.js.map +1 -0
  124. package/dist/tools/index.d.ts +25 -0
  125. package/dist/tools/index.d.ts.map +1 -0
  126. package/dist/tools/index.js +54 -0
  127. package/dist/tools/index.js.map +1 -0
  128. package/dist/tools/models.d.ts +8 -0
  129. package/dist/tools/models.d.ts.map +1 -0
  130. package/dist/tools/models.js +828 -0
  131. package/dist/tools/models.js.map +1 -0
  132. package/dist/tools/output.d.ts +8 -0
  133. package/dist/tools/output.d.ts.map +1 -0
  134. package/dist/tools/output.js +236 -0
  135. package/dist/tools/output.js.map +1 -0
  136. package/dist/tools/templates.d.ts +8 -0
  137. package/dist/tools/templates.d.ts.map +1 -0
  138. package/dist/tools/templates.js +247 -0
  139. package/dist/tools/templates.js.map +1 -0
  140. package/dist/tools/validation.d.ts +8 -0
  141. package/dist/tools/validation.d.ts.map +1 -0
  142. package/dist/tools/validation.js +181 -0
  143. package/dist/tools/validation.js.map +1 -0
  144. package/dist/types/index.d.ts +187 -0
  145. package/dist/types/index.d.ts.map +1 -0
  146. package/dist/types/index.js +7 -0
  147. package/dist/types/index.js.map +1 -0
  148. package/dist/utils/cache.d.ts +99 -0
  149. package/dist/utils/cache.d.ts.map +1 -0
  150. package/dist/utils/cache.js +192 -0
  151. package/dist/utils/cache.js.map +1 -0
  152. package/dist/utils/index.d.ts +8 -0
  153. package/dist/utils/index.d.ts.map +1 -0
  154. package/dist/utils/index.js +8 -0
  155. package/dist/utils/index.js.map +1 -0
  156. package/dist/utils/logger.d.ts +128 -0
  157. package/dist/utils/logger.d.ts.map +1 -0
  158. package/dist/utils/logger.js +251 -0
  159. package/dist/utils/logger.js.map +1 -0
  160. package/dist/validation/index.d.ts +42 -0
  161. package/dist/validation/index.d.ts.map +1 -0
  162. package/dist/validation/index.js +282 -0
  163. package/dist/validation/index.js.map +1 -0
  164. package/package.json +73 -0
@@ -0,0 +1,562 @@
1
+ /**
2
+ * Inequality and Distribution Templates
3
+ *
4
+ * Templates for Lorenz curves, Gini coefficient, Laffer curve, etc.
5
+ */
6
+ /**
7
+ * Lorenz Curve
8
+ */
9
+ const lorenzCurve = {
10
+ id: 'lorenz_curve',
11
+ name: 'Lorenz Curve',
12
+ description: 'Shows income distribution with Lorenz curve and calculates Gini coefficient.',
13
+ category: 'inequality',
14
+ level: 'high_school',
15
+ tags: ['Lorenz curve', 'income distribution', 'inequality', 'Gini'],
16
+ parameters: {
17
+ inequality: {
18
+ type: 'number',
19
+ default: 0.4,
20
+ description: 'Inequality parameter (0 = perfect equality, 1 = maximum inequality)',
21
+ },
22
+ },
23
+ generate: (params) => {
24
+ const ineq = params.inequality ?? 0.4;
25
+ return {
26
+ metadata: {
27
+ specVersion: '1.3',
28
+ title: 'Lorenz Curve and Gini Coefficient',
29
+ description: 'Visualization of income inequality',
30
+ },
31
+ parameters: {
32
+ k: { value: ineq, label: 'Inequality', min: 0.1, max: 0.9, step: 0.05 },
33
+ // Lorenz curve: L(p) = p^(1+k) for simplicity
34
+ // Gini = k / (2 + k) for this form
35
+ gini: {
36
+ expression: 'k / (2 + k)',
37
+ label: 'Gini Coefficient',
38
+ readonly: true,
39
+ },
40
+ // Point for visualization
41
+ p: { value: 0.8, label: 'Population %', min: 0, max: 1, step: 0.05 },
42
+ L: {
43
+ expression: 'p^(1 + k)',
44
+ label: 'Cumulative Income %',
45
+ readonly: true,
46
+ },
47
+ },
48
+ charts: [
49
+ {
50
+ id: 'main',
51
+ title: 'Lorenz Curve',
52
+ xAxis: { label: 'Cumulative % of Population', min: 0, max: 1 },
53
+ yAxis: { label: 'Cumulative % of Income', min: 0, max: 1 },
54
+ elements: [
55
+ // Area A (inequality area)
56
+ {
57
+ id: 'inequality-area',
58
+ type: 'area',
59
+ topBoundary: 'equality',
60
+ bottomBoundary: 'lorenz',
61
+ leftBoundary: '0',
62
+ rightBoundary: '1',
63
+ color: '#EF4444',
64
+ opacity: 0.3,
65
+ label: 'Inequality Area (A)',
66
+ },
67
+ // Area B (under Lorenz curve)
68
+ {
69
+ id: 'under-lorenz',
70
+ type: 'area',
71
+ topBoundary: 'lorenz',
72
+ bottomBoundary: '0',
73
+ leftBoundary: '0',
74
+ rightBoundary: '1',
75
+ color: '#22C55E',
76
+ opacity: 0.3,
77
+ label: 'Area B',
78
+ },
79
+ // Line of perfect equality
80
+ {
81
+ id: 'equality',
82
+ type: 'line',
83
+ equation: 'x',
84
+ color: '#6B7280',
85
+ lineStyle: 'dashed',
86
+ label: 'Perfect Equality',
87
+ },
88
+ // Lorenz curve
89
+ {
90
+ id: 'lorenz',
91
+ type: 'line',
92
+ equation: 'x^(1 + k)',
93
+ color: '#2563EB',
94
+ strokeWidth: 3,
95
+ label: 'Lorenz Curve',
96
+ },
97
+ // Sample point
98
+ {
99
+ id: 'sample',
100
+ type: 'point',
101
+ x: 'p',
102
+ y: 'L',
103
+ color: '#16A34A',
104
+ droplines: { x: true, y: true },
105
+ label: 'Sample Point',
106
+ },
107
+ ],
108
+ annotations: [
109
+ {
110
+ id: 'gini-label',
111
+ text: 'Gini = A/(A+B) = ${gini:.2f}',
112
+ x: 0.3,
113
+ y: 0.8,
114
+ color: '#DC2626',
115
+ },
116
+ {
117
+ id: 'sample-label',
118
+ text: 'Bottom ${p*100:.0f}% has ${L*100:.0f}% of income',
119
+ x: 0.5,
120
+ y: 0.2,
121
+ color: '#2563EB',
122
+ },
123
+ ],
124
+ },
125
+ ],
126
+ };
127
+ },
128
+ };
129
+ /**
130
+ * Laffer Curve
131
+ */
132
+ const lafferCurve = {
133
+ id: 'laffer_curve',
134
+ name: 'Laffer Curve',
135
+ description: 'Shows the relationship between tax rates and tax revenue, illustrating the concept of an optimal tax rate.',
136
+ category: 'inequality',
137
+ level: 'high_school',
138
+ tags: ['Laffer curve', 'taxation', 'tax revenue', 'fiscal policy'],
139
+ parameters: {
140
+ maxRevenue: {
141
+ type: 'number',
142
+ default: 100,
143
+ description: 'Maximum possible tax revenue',
144
+ },
145
+ optimalRate: {
146
+ type: 'number',
147
+ default: 0.5,
148
+ description: 'Revenue-maximizing tax rate',
149
+ },
150
+ currentRate: {
151
+ type: 'number',
152
+ default: 0.3,
153
+ description: 'Current tax rate',
154
+ },
155
+ },
156
+ generate: (params) => {
157
+ const maxRev = params.maxRevenue ?? 100;
158
+ const optRate = params.optimalRate ?? 0.5;
159
+ const currentRate = params.currentRate ?? 0.3;
160
+ return {
161
+ metadata: {
162
+ specVersion: '1.3',
163
+ title: 'Laffer Curve',
164
+ description: 'Tax rate vs. tax revenue relationship',
165
+ },
166
+ parameters: {
167
+ Rmax: { value: maxRev, label: 'Max Revenue' },
168
+ tstar: { value: optRate, label: 'Optimal Rate', min: 0.3, max: 0.7, step: 0.05 },
169
+ t: { value: currentRate, label: 'Tax Rate', min: 0, max: 1, step: 0.05 },
170
+ // Revenue = Rmax * 4 * t * (1-t) / (4 * tstar * (1-tstar))
171
+ // Simplified: R = Rmax * 4 * t * (1-t) when tstar = 0.5
172
+ R: {
173
+ expression: 'Rmax * 4 * t * (1 - t)',
174
+ label: 'Tax Revenue',
175
+ readonly: true,
176
+ },
177
+ Rstar: {
178
+ expression: 'Rmax * 4 * tstar * (1 - tstar)',
179
+ hidden: true,
180
+ },
181
+ },
182
+ charts: [
183
+ {
184
+ id: 'main',
185
+ title: 'Laffer Curve',
186
+ xAxis: { label: 'Tax Rate (t)', min: 0, max: 1 },
187
+ yAxis: { label: 'Tax Revenue (R)', min: 0, max: 'Rmax * 1.2' },
188
+ elements: [
189
+ // Laffer curve
190
+ {
191
+ id: 'laffer',
192
+ type: 'line',
193
+ equation: 'Rmax * 4 * x * (1 - x)',
194
+ color: '#2563EB',
195
+ strokeWidth: 3,
196
+ label: 'Laffer Curve',
197
+ },
198
+ // Optimal point
199
+ {
200
+ id: 'optimal',
201
+ type: 'point',
202
+ x: 'tstar',
203
+ y: 'Rstar',
204
+ color: '#16A34A',
205
+ label: 't* (Optimal)',
206
+ droplines: { x: true, y: true },
207
+ },
208
+ // Current point
209
+ {
210
+ id: 'current',
211
+ type: 'point',
212
+ x: 't',
213
+ y: 'R',
214
+ color: '#DC2626',
215
+ label: 'Current',
216
+ droplines: { x: true, y: true },
217
+ draggable: true,
218
+ dragConfig: {
219
+ mode: 'expression',
220
+ parameters: { expressions: { t: 'x' } },
221
+ constraints: { bounds: { minX: 0, maxX: 1 } },
222
+ },
223
+ },
224
+ ],
225
+ annotations: [
226
+ {
227
+ id: 'left-label',
228
+ text: 'Higher rates → more revenue',
229
+ x: 0.15,
230
+ y: 'Rmax * 0.8',
231
+ color: '#22C55E',
232
+ },
233
+ {
234
+ id: 'right-label',
235
+ text: 'Higher rates → less revenue',
236
+ x: 0.75,
237
+ y: 'Rmax * 0.8',
238
+ color: '#DC2626',
239
+ },
240
+ {
241
+ id: 'current-label',
242
+ text: 'R = ${R:.0f}',
243
+ x: 't + 0.05',
244
+ y: 'R + 5',
245
+ color: '#DC2626',
246
+ },
247
+ ],
248
+ },
249
+ ],
250
+ };
251
+ },
252
+ };
253
+ /**
254
+ * Progressive Tax System
255
+ */
256
+ const progressiveTax = {
257
+ id: 'progressive_tax',
258
+ name: 'Progressive Tax System',
259
+ description: 'Compares proportional, progressive, and regressive tax systems.',
260
+ category: 'inequality',
261
+ level: 'high_school',
262
+ tags: ['taxation', 'progressive tax', 'regressive tax', 'marginal rate'],
263
+ parameters: {
264
+ income: {
265
+ type: 'number',
266
+ default: 50000,
267
+ description: 'Income level',
268
+ },
269
+ proportionalRate: {
270
+ type: 'number',
271
+ default: 0.25,
272
+ description: 'Flat tax rate',
273
+ },
274
+ },
275
+ generate: (params) => {
276
+ const income = params.income ?? 50000;
277
+ const flatRate = params.proportionalRate ?? 0.25;
278
+ return {
279
+ metadata: {
280
+ specVersion: '1.3',
281
+ title: 'Tax System Comparison',
282
+ description: 'Progressive, proportional, and regressive taxation',
283
+ },
284
+ parameters: {
285
+ I: { value: income, label: 'Income ($)', min: 10000, max: 200000, step: 5000 },
286
+ flatRate: { value: flatRate, label: 'Flat Rate', min: 0.1, max: 0.4, step: 0.05 },
287
+ // Tax calculations
288
+ flatTax: { expression: 'flatRate * I', label: 'Flat Tax', readonly: true },
289
+ // Progressive brackets (simplified)
290
+ progTax: {
291
+ expression: '0.1 * min(I, 20000) + 0.2 * max(0, min(I, 50000) - 20000) + 0.3 * max(0, min(I, 100000) - 50000) + 0.4 * max(0, I - 100000)',
292
+ label: 'Progressive Tax',
293
+ readonly: true,
294
+ },
295
+ // Regressive (sales tax style - higher burden on lower income)
296
+ regTax: {
297
+ expression: '5000 + 0.15 * I',
298
+ label: 'Regressive Tax',
299
+ readonly: true,
300
+ },
301
+ flatAvgRate: { expression: 'flatRate * 100', label: 'Flat Avg Rate (%)', readonly: true },
302
+ progAvgRate: { expression: '100 * progTax / I', label: 'Prog Avg Rate (%)', readonly: true },
303
+ regAvgRate: { expression: '100 * regTax / I', label: 'Reg Avg Rate (%)', readonly: true },
304
+ },
305
+ charts: [
306
+ {
307
+ id: 'tax-burden',
308
+ title: 'Tax Burden by Income',
309
+ xAxis: { label: 'Income ($)', min: 0, max: 200000 },
310
+ yAxis: { label: 'Tax Paid ($)', min: 0, max: 80000 },
311
+ elements: [
312
+ {
313
+ id: 'flat',
314
+ type: 'line',
315
+ equation: 'flatRate * x',
316
+ color: '#6B7280',
317
+ label: 'Proportional',
318
+ },
319
+ {
320
+ id: 'progressive',
321
+ type: 'line',
322
+ equation: '0.1 * min(x, 20000) + 0.2 * max(0, min(x, 50000) - 20000) + 0.3 * max(0, min(x, 100000) - 50000) + 0.4 * max(0, x - 100000)',
323
+ color: '#2563EB',
324
+ strokeWidth: 2,
325
+ label: 'Progressive',
326
+ },
327
+ {
328
+ id: 'regressive',
329
+ type: 'line',
330
+ equation: '5000 + 0.15 * x',
331
+ color: '#DC2626',
332
+ label: 'Regressive',
333
+ },
334
+ {
335
+ id: 'current-income',
336
+ type: 'verticalLine',
337
+ x: 'I',
338
+ color: '#16A34A',
339
+ strokeDasharray: '5,5',
340
+ },
341
+ ],
342
+ },
343
+ {
344
+ id: 'avg-rate',
345
+ title: 'Average Tax Rate by Income',
346
+ xAxis: { label: 'Income ($)', min: 10000, max: 200000 },
347
+ yAxis: { label: 'Average Tax Rate (%)', min: 0, max: 50 },
348
+ elements: [
349
+ {
350
+ id: 'flat-rate',
351
+ type: 'horizontalLine',
352
+ y: 'flatRate * 100',
353
+ color: '#6B7280',
354
+ label: 'Proportional',
355
+ },
356
+ {
357
+ id: 'prog-rate',
358
+ type: 'line',
359
+ equation: '100 * (0.1 * min(x, 20000) + 0.2 * max(0, min(x, 50000) - 20000) + 0.3 * max(0, min(x, 100000) - 50000) + 0.4 * max(0, x - 100000)) / x',
360
+ color: '#2563EB',
361
+ strokeWidth: 2,
362
+ label: 'Progressive (increasing)',
363
+ },
364
+ {
365
+ id: 'reg-rate',
366
+ type: 'line',
367
+ equation: '100 * (5000 + 0.15 * x) / x',
368
+ color: '#DC2626',
369
+ label: 'Regressive (decreasing)',
370
+ },
371
+ ],
372
+ },
373
+ ],
374
+ };
375
+ },
376
+ };
377
+ /**
378
+ * Income Quintiles
379
+ */
380
+ const incomeQuintiles = {
381
+ id: 'income_quintiles',
382
+ name: 'Income Distribution Quintiles',
383
+ description: 'Shows income shares by population quintiles (fifths).',
384
+ category: 'inequality',
385
+ level: 'high_school',
386
+ tags: ['income distribution', 'quintiles', 'inequality'],
387
+ parameters: {
388
+ q1Share: {
389
+ type: 'number',
390
+ default: 3,
391
+ description: 'Bottom 20% income share (%)',
392
+ },
393
+ q2Share: {
394
+ type: 'number',
395
+ default: 8,
396
+ description: 'Second 20% income share (%)',
397
+ },
398
+ q3Share: {
399
+ type: 'number',
400
+ default: 14,
401
+ description: 'Middle 20% income share (%)',
402
+ },
403
+ q4Share: {
404
+ type: 'number',
405
+ default: 23,
406
+ description: 'Fourth 20% income share (%)',
407
+ },
408
+ q5Share: {
409
+ type: 'number',
410
+ default: 52,
411
+ description: 'Top 20% income share (%)',
412
+ },
413
+ },
414
+ generate: (params) => {
415
+ const q1 = params.q1Share ?? 3;
416
+ const q2 = params.q2Share ?? 8;
417
+ const q3 = params.q3Share ?? 14;
418
+ const q4 = params.q4Share ?? 23;
419
+ const q5 = params.q5Share ?? 52;
420
+ return {
421
+ metadata: {
422
+ specVersion: '1.3',
423
+ title: 'Income Distribution by Quintiles',
424
+ description: 'Income shares for each fifth of the population',
425
+ },
426
+ parameters: {
427
+ q1: { value: q1, label: 'Bottom 20% Share (%)', min: 1, max: 20 },
428
+ q2: { value: q2, label: 'Second 20% Share (%)', min: 3, max: 20 },
429
+ q3: { value: q3, label: 'Middle 20% Share (%)', min: 5, max: 25 },
430
+ q4: { value: q4, label: 'Fourth 20% Share (%)', min: 10, max: 30 },
431
+ q5: { value: q5, label: 'Top 20% Share (%)', min: 20, max: 70 },
432
+ total: { expression: 'q1 + q2 + q3 + q4 + q5', hidden: true },
433
+ ratio: {
434
+ expression: 'q5 / q1',
435
+ label: '80/20 Ratio',
436
+ readonly: true,
437
+ },
438
+ },
439
+ charts: [
440
+ {
441
+ id: 'main',
442
+ title: 'Income Share by Quintile',
443
+ xAxis: { label: 'Population Quintile', min: 0, max: 6 },
444
+ yAxis: { label: 'Income Share (%)', min: 0, max: 60 },
445
+ elements: [
446
+ // Bar-like representation using rectangles
447
+ {
448
+ id: 'bar1',
449
+ type: 'rectangle',
450
+ x1: 0.5,
451
+ y1: 0,
452
+ x2: 1.5,
453
+ y2: 'q1',
454
+ fill: '#EF4444',
455
+ opacity: 0.7,
456
+ },
457
+ {
458
+ id: 'bar2',
459
+ type: 'rectangle',
460
+ x1: 1.5,
461
+ y1: 0,
462
+ x2: 2.5,
463
+ y2: 'q2',
464
+ fill: '#F59E0B',
465
+ opacity: 0.7,
466
+ },
467
+ {
468
+ id: 'bar3',
469
+ type: 'rectangle',
470
+ x1: 2.5,
471
+ y1: 0,
472
+ x2: 3.5,
473
+ y2: 'q3',
474
+ fill: '#22C55E',
475
+ opacity: 0.7,
476
+ },
477
+ {
478
+ id: 'bar4',
479
+ type: 'rectangle',
480
+ x1: 3.5,
481
+ y1: 0,
482
+ x2: 4.5,
483
+ y2: 'q4',
484
+ fill: '#3B82F6',
485
+ opacity: 0.7,
486
+ },
487
+ {
488
+ id: 'bar5',
489
+ type: 'rectangle',
490
+ x1: 4.5,
491
+ y1: 0,
492
+ x2: 5.5,
493
+ y2: 'q5',
494
+ fill: '#7C3AED',
495
+ opacity: 0.7,
496
+ },
497
+ // Equal distribution line
498
+ {
499
+ id: 'equal',
500
+ type: 'horizontalLine',
501
+ y: 20,
502
+ color: '#6B7280',
503
+ strokeDasharray: '5,5',
504
+ label: 'Perfect Equality (20%)',
505
+ },
506
+ ],
507
+ annotations: [
508
+ {
509
+ id: 'q1-label',
510
+ text: '${q1}%',
511
+ x: 1,
512
+ y: 'q1 + 2',
513
+ color: '#EF4444',
514
+ },
515
+ {
516
+ id: 'q2-label',
517
+ text: '${q2}%',
518
+ x: 2,
519
+ y: 'q2 + 2',
520
+ color: '#F59E0B',
521
+ },
522
+ {
523
+ id: 'q3-label',
524
+ text: '${q3}%',
525
+ x: 3,
526
+ y: 'q3 + 2',
527
+ color: '#22C55E',
528
+ },
529
+ {
530
+ id: 'q4-label',
531
+ text: '${q4}%',
532
+ x: 4,
533
+ y: 'q4 + 2',
534
+ color: '#3B82F6',
535
+ },
536
+ {
537
+ id: 'q5-label',
538
+ text: '${q5}%',
539
+ x: 5,
540
+ y: 'q5 + 2',
541
+ color: '#7C3AED',
542
+ },
543
+ {
544
+ id: 'ratio-label',
545
+ text: 'Top/Bottom Ratio: ${ratio:.1f}',
546
+ x: 3,
547
+ y: 55,
548
+ color: '#1F2937',
549
+ },
550
+ ],
551
+ },
552
+ ],
553
+ };
554
+ },
555
+ };
556
+ export const inequalityTemplates = [
557
+ lorenzCurve,
558
+ lafferCurve,
559
+ progressiveTax,
560
+ incomeQuintiles,
561
+ ];
562
+ //# sourceMappingURL=inequality.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inequality.js","sourceRoot":"","sources":["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E,EAAE,UAAU;4BACd,IAAI,EAAE,QAAQ;4BACd,CAAC,EAAE,CAAC;4BACJ,CAAC,EAAE,QAAQ;4BACX,KAAK,EAAE,SAAS;yBACjB;wBACD;4BACE,EAAE,EAAE,UAAU;4BACd,IAAI,EAAE,QAAQ;4BACd,CAAC,EAAE,CAAC;4BACJ,CAAC,EAAE,QAAQ;4BACX,KAAK,EAAE,SAAS;yBACjB;wBACD;4BACE,EAAE,EAAE,aAAa;4BACjB,IAAI,EAAE,gCAAgC;4BACtC,CAAC,EAAE,CAAC;4BACJ,CAAC,EAAE,EAAE;4BACL,KAAK,EAAE,SAAS;yBACjB;qBACF;iBACF;aACF;SAC+B,CAAC;IACrC,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAoB;IAClD,WAAW;IACX,WAAW;IACX,cAAc;IACd,eAAe;CAChB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Advanced Macro - Intertemporal Models
3
+ *
4
+ * Postgraduate-level templates for dynamic optimization and intertemporal models.
5
+ */
6
+ import type { ModelTemplate } from '../types/index.js';
7
+ export declare const intertemporalMacroTemplates: ModelTemplate[];
8
+ //# sourceMappingURL=intertemporalMacro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intertemporalMacro.d.ts","sourceRoot":"","sources":["../../src/templates/intertemporalMacro.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAuiBvD,eAAO,MAAM,2BAA2B,EAAE,aAAa,EAItD,CAAC"}