@compass-labs/api-sdk 2.2.95 → 2.2.96

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 (79) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/models/components/chainmarketinfo.d.ts +5 -1
  4. package/dist/commonjs/models/components/chainmarketinfo.d.ts.map +1 -1
  5. package/dist/commonjs/models/components/chainmarketinfo.js +2 -0
  6. package/dist/commonjs/models/components/chainmarketinfo.js.map +1 -1
  7. package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts +25 -3
  8. package/dist/commonjs/models/components/loopedpositioncurrentstate.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/loopedpositioncurrentstate.js +8 -0
  10. package/dist/commonjs/models/components/loopedpositioncurrentstate.js.map +1 -1
  11. package/dist/commonjs/models/components/morpholendingmarket.d.ts +8 -0
  12. package/dist/commonjs/models/components/morpholendingmarket.d.ts.map +1 -1
  13. package/dist/commonjs/models/components/morpholendingmarket.js +4 -0
  14. package/dist/commonjs/models/components/morpholendingmarket.js.map +1 -1
  15. package/dist/commonjs/models/components/reserveinfo.d.ts +5 -1
  16. package/dist/commonjs/models/components/reserveinfo.d.ts.map +1 -1
  17. package/dist/commonjs/models/components/reserveinfo.js +2 -0
  18. package/dist/commonjs/models/components/reserveinfo.js.map +1 -1
  19. package/dist/esm/lib/config.d.ts +2 -2
  20. package/dist/esm/lib/config.js +2 -2
  21. package/dist/esm/models/components/chainmarketinfo.d.ts +5 -1
  22. package/dist/esm/models/components/chainmarketinfo.d.ts.map +1 -1
  23. package/dist/esm/models/components/chainmarketinfo.js +2 -0
  24. package/dist/esm/models/components/chainmarketinfo.js.map +1 -1
  25. package/dist/esm/models/components/loopedpositioncurrentstate.d.ts +25 -3
  26. package/dist/esm/models/components/loopedpositioncurrentstate.d.ts.map +1 -1
  27. package/dist/esm/models/components/loopedpositioncurrentstate.js +8 -0
  28. package/dist/esm/models/components/loopedpositioncurrentstate.js.map +1 -1
  29. package/dist/esm/models/components/morpholendingmarket.d.ts +8 -0
  30. package/dist/esm/models/components/morpholendingmarket.d.ts.map +1 -1
  31. package/dist/esm/models/components/morpholendingmarket.js +4 -0
  32. package/dist/esm/models/components/morpholendingmarket.js.map +1 -1
  33. package/dist/esm/models/components/reserveinfo.d.ts +5 -1
  34. package/dist/esm/models/components/reserveinfo.d.ts.map +1 -1
  35. package/dist/esm/models/components/reserveinfo.js +2 -0
  36. package/dist/esm/models/components/reserveinfo.js.map +1 -1
  37. package/docs/models/components/chainmarketinfo.md +15 -14
  38. package/docs/models/components/loopedpositioncurrentstate.md +17 -13
  39. package/docs/models/components/morpholendingmarket.md +23 -21
  40. package/docs/models/components/reserveinfo.md +14 -13
  41. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +1 -1
  42. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -1
  43. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -1
  44. package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -1
  45. package/examples/node_modules/tsx/dist/cli.cjs +2 -2
  46. package/examples/node_modules/tsx/dist/cli.mjs +2 -2
  47. package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -1
  48. package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -1
  49. package/examples/node_modules/tsx/dist/esm/index.cjs +1 -1
  50. package/examples/node_modules/tsx/dist/esm/index.mjs +1 -1
  51. package/examples/node_modules/tsx/dist/index-CVGQLgGk.mjs +14 -0
  52. package/examples/node_modules/tsx/dist/index-LWEOpzQe.cjs +14 -0
  53. package/examples/node_modules/tsx/dist/loader.cjs +1 -1
  54. package/examples/node_modules/tsx/dist/loader.mjs +1 -1
  55. package/examples/node_modules/tsx/dist/package-BUjYdoyo.mjs +1 -0
  56. package/examples/node_modules/tsx/dist/package-BqWb5wzm.cjs +1 -0
  57. package/examples/node_modules/tsx/dist/preflight.cjs +1 -1
  58. package/examples/node_modules/tsx/dist/preflight.mjs +1 -1
  59. package/examples/node_modules/tsx/dist/{register-HWZIKnmC.mjs → register-A6mos5aG.mjs} +1 -1
  60. package/examples/node_modules/tsx/dist/{register-zZ7SWseA.mjs → register-B_kKY3fL.mjs} +1 -1
  61. package/examples/node_modules/tsx/dist/{register-BoI6-WNn.cjs → register-CptX03bE.cjs} +1 -1
  62. package/examples/node_modules/tsx/dist/{register-DlUHyDDv.cjs → register-DQV4TtD3.cjs} +2 -2
  63. package/examples/node_modules/tsx/dist/repl.cjs +1 -1
  64. package/examples/node_modules/tsx/dist/repl.mjs +1 -1
  65. package/examples/node_modules/tsx/dist/{require-awuW45Q3.mjs → require-Cbdk4ZrE.mjs} +1 -1
  66. package/examples/node_modules/tsx/dist/{require-C7ivLNeu.cjs → require-bPEuCWoO.cjs} +1 -1
  67. package/examples/node_modules/tsx/package.json +1 -1
  68. package/examples/package-lock.json +3 -3
  69. package/openapi_prepped_for_speakeasy.json +101 -5
  70. package/package.json +1 -1
  71. package/src/lib/config.ts +2 -2
  72. package/src/models/components/chainmarketinfo.ts +7 -1
  73. package/src/models/components/loopedpositioncurrentstate.ts +33 -3
  74. package/src/models/components/morpholendingmarket.ts +12 -0
  75. package/src/models/components/reserveinfo.ts +7 -1
  76. package/examples/node_modules/tsx/dist/index-BN2t1Mfo.cjs +0 -14
  77. package/examples/node_modules/tsx/dist/index-CQhDiIsg.mjs +0 -14
  78. package/examples/node_modules/tsx/dist/package-CiRlP2hu.mjs +0 -1
  79. package/examples/node_modules/tsx/dist/package-DYbiKo1t.cjs +0 -1
@@ -11906,7 +11906,19 @@
11906
11906
  "supply_apy": {
11907
11907
  "type": "string",
11908
11908
  "title": "Supply Apy",
11909
- "description": "Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%)."
11909
+ "description": "Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%). This is LENDING interest only \u2014 what borrowers pay. For a staked or wrapped asset it is not the whole yield; add `intrinsic_apy`."
11910
+ },
11911
+ "intrinsic_apy": {
11912
+ "anyOf": [
11913
+ {
11914
+ "type": "string"
11915
+ },
11916
+ {
11917
+ "type": "null"
11918
+ }
11919
+ ],
11920
+ "title": "Intrinsic Apy",
11921
+ "description": "What holding this asset earns OUTSIDE the lending pool, in percentage: staking rewards or vault yield accruing inside the token's own exchange rate, which the pool neither pays nor observes. A trailing 7-day measurement. ABSENT when no measurement is available (the route omits null fields) \u2014 absent does not mean zero. For an asset that plainly earns beyond lending (wstETH, sUSDe, wstHYPE) `supply_apy` alone understates what it earns by percentage points, since almost nobody borrows these and their supply rate rounds to nothing: Hyperlend's wstHYPE reserve pays 0.00006% against a ~2.5% staking yield. Treat an absent value as unknown rather than as the asset earning nothing beyond `supply_apy`."
11910
11922
  },
11911
11923
  "borrow_apy": {
11912
11924
  "type": "string",
@@ -16977,7 +16989,31 @@
16977
16989
  }
16978
16990
  ],
16979
16991
  "title": "Collateral Apy",
16980
- "description": "What the collateral leg currently earns, in percentage (e.g. 6.12 = 6.12%). Aave: the collateral reserve's spot supply APY. Morpho: the collateral token's own yield \u2014 its 7d vault APY when it is an indexed vault share (e.g. steakUSDC); null otherwise, since Morpho collateral earns nothing from the market itself and an unindexed token's intrinsic yield is unknown."
16992
+ "description": "What the collateral leg currently earns, in percentage (e.g. 6.12 = 6.12%) \u2014 the sum of collateral_lending_apy and collateral_intrinsic_apy where both apply. Null when the token earns a yield outside the lending pool (a staked or wrapped asset) and no source for that yield is available: the pool's supply APY alone would understate the leg by percentage points and can invert the sign of net_apy, so it is withheld rather than reported as the whole yield."
16993
+ },
16994
+ "collateral_lending_apy": {
16995
+ "anyOf": [
16996
+ {
16997
+ "type": "string"
16998
+ },
16999
+ {
17000
+ "type": "null"
17001
+ }
17002
+ ],
17003
+ "title": "Collateral Lending Apy",
17004
+ "description": "The supply half of the collateral leg, in percentage: interest paid by borrowers of the collateral asset (Aave supply APY). Near zero for staked assets, which almost nobody borrows. Exactly 0 on Morpho, whose collateral is held rather than lent \u2014 which is why a Morpho position's whole collateral leg is its vault yield."
17005
+ },
17006
+ "collateral_intrinsic_apy": {
17007
+ "anyOf": [
17008
+ {
17009
+ "type": "string"
17010
+ },
17011
+ {
17012
+ "type": "null"
17013
+ }
17014
+ ],
17015
+ "title": "Collateral Intrinsic Apy",
17016
+ "description": "The yield the collateral token earns inside its own price, in percentage, independent of the lending pool \u2014 a liquid-staking token's staking rewards (wstHYPE against HYPE) or an ERC-4626 share's vault yield \u2014 which of the two follows from the position's protocol. Null when the token has none or none is indexed.\n\nA TRAILING 7-DAY measurement, not a forward rate: a week is a short sample of a staking rate, so consecutive readings move around the longer-run average by a few tenths of a percent.\n\nA null here alongside a null collateral_apy and a NON-null collateral_lending_apy is the meaningful case: the token does earn outside the pool, but no source for that yield is available, so the total is withheld rather than understated."
16981
17017
  },
16982
17018
  "borrow_apy": {
16983
17019
  "anyOf": [
@@ -16989,7 +17025,31 @@
16989
17025
  }
16990
17026
  ],
16991
17027
  "title": "Borrow Apy",
16992
- "description": "What the debt leg currently costs, in percentage: the market's spot borrow APY (Morpho IRM rate / Aave variable borrow rate). Null when the rate read was unavailable."
17028
+ "description": "What the debt leg currently costs, in percentage \u2014 the sum of borrow_lending_apy and borrow_intrinsic_apy where both apply. Debt owed in a token that appreciates inside its own price (a staked or wrapped asset) grows by that appreciation on top of the pool's interest, so the pool rate alone would understate the cost and overstate net_apy; for such a token with no yield source available this is null (withheld) rather than the pool rate. For ordinary debt assets it equals the market's spot borrow APY. Null also when the rate read was unavailable."
17029
+ },
17030
+ "borrow_lending_apy": {
17031
+ "anyOf": [
17032
+ {
17033
+ "type": "string"
17034
+ },
17035
+ {
17036
+ "type": "null"
17037
+ }
17038
+ ],
17039
+ "title": "Borrow Lending Apy",
17040
+ "description": "The pool half of the debt leg, in percentage: the market's spot borrow APY (Morpho IRM rate / Aave variable borrow rate) \u2014 interest charged on the debt by the lending market itself."
17041
+ },
17042
+ "borrow_intrinsic_apy": {
17043
+ "anyOf": [
17044
+ {
17045
+ "type": "string"
17046
+ },
17047
+ {
17048
+ "type": "null"
17049
+ }
17050
+ ],
17051
+ "title": "Borrow Intrinsic Apy",
17052
+ "description": "The yield the DEBT token earns inside its own price, in percentage \u2014 which the borrower owes on top of pool interest, since the debt is denominated in an appreciating token. Same source and trailing 7-day window as collateral_intrinsic_apy. Null when the token has none or none is indexed; null alongside a null borrow_apy and a NON-null borrow_lending_apy means the debt token does earn outside the pool but no source is available, so the total cost is withheld rather than understated."
16993
17053
  },
16994
17054
  "net_apy": {
16995
17055
  "anyOf": [
@@ -17001,7 +17061,7 @@
17001
17061
  }
17002
17062
  ],
17003
17063
  "title": "Net Apy",
17004
- "description": "Levered net yield on the position's equity, in percentage: leverage x collateral_apy - (leverage - 1) x borrow_apy. Negative means the carry is upside down (borrowing costs more than the collateral earns). Null when leverage or either leg is unknown. The collateral leg of a Morpho vault-share position is a 7d average while the borrow leg is spot."
17064
+ "description": "Levered net yield on the position's equity, in percentage: leverage x collateral_apy - (leverage - 1) x borrow_apy. Negative means the carry is upside down (borrowing costs more than the collateral earns). Null when leverage or either leg is unknown. This is a SNAPSHOT at today's rates, not a forecast, and it mixes a trailing collateral measurement with a spot borrow rate. It is also denominated in the debt asset, not USD: a wstHYPE/WHYPE loop earning a positive net_apy still loses USD value if HYPE falls. The borrow leg floats with the debt reserve's utilisation, so this figure can move without the position changing at all."
17005
17065
  }
17006
17066
  },
17007
17067
  "additionalProperties": false,
@@ -18372,6 +18432,30 @@
18372
18432
  "title": "Borrow Apy",
18373
18433
  "description": "Current borrow APY for the loan token, in percentage (e.g. 5.25 means 5.25%). Null if the rate is unavailable."
18374
18434
  },
18435
+ "collateral_intrinsic_apy": {
18436
+ "anyOf": [
18437
+ {
18438
+ "type": "string"
18439
+ },
18440
+ {
18441
+ "type": "null"
18442
+ }
18443
+ ],
18444
+ "title": "Collateral Intrinsic Apy",
18445
+ "description": "What the COLLATERAL token earns inside its own price, in percentage: an ERC-4626 share's vault yield or a staking token's rewards, trailing 7 days. Morpho holds collateral without lending it out, so this is the collateral leg's ENTIRE yield. Null means unmeasured, NOT zero \u2014 a plain token (WETH, cbBTC) earns nothing and a yield-bearing one may simply not be indexed yet."
18446
+ },
18447
+ "loan_intrinsic_apy": {
18448
+ "anyOf": [
18449
+ {
18450
+ "type": "string"
18451
+ },
18452
+ {
18453
+ "type": "null"
18454
+ }
18455
+ ],
18456
+ "title": "Loan Intrinsic Apy",
18457
+ "description": "What the LOAN token earns inside its own price, in percentage, trailing 7 days. Debt owed in such a token grows by this on top of borrow_apy \u2014 a borrower's true cost is their sum. Null means unmeasured, NOT zero."
18458
+ },
18375
18459
  "utilization": {
18376
18460
  "type": "string",
18377
18461
  "title": "Utilization",
@@ -23542,7 +23626,19 @@
23542
23626
  "supply_apy": {
23543
23627
  "type": "string",
23544
23628
  "title": "Supply Apy",
23545
- "description": "Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%)."
23629
+ "description": "Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%). This is LENDING interest only \u2014 what borrowers pay. For a staked or wrapped asset it is not the whole yield; add `intrinsic_apy`."
23630
+ },
23631
+ "intrinsic_apy": {
23632
+ "anyOf": [
23633
+ {
23634
+ "type": "string"
23635
+ },
23636
+ {
23637
+ "type": "null"
23638
+ }
23639
+ ],
23640
+ "title": "Intrinsic Apy",
23641
+ "description": "What holding this asset earns OUTSIDE the lending pool, in percentage: staking rewards or vault yield accruing inside the token's own exchange rate, which the pool neither pays nor observes. A trailing 7-day measurement. ABSENT when no measurement is available (the route omits null fields) \u2014 absent does not mean zero. For an asset that plainly earns beyond lending (wstETH, sUSDe, wstHYPE) `supply_apy` alone understates what it earns by percentage points, since almost nobody borrows these and their supply rate rounds to nothing: Hyperlend's wstHYPE reserve pays 0.00006% against a ~2.5% staking yield. Treat an absent value as unknown rather than as the asset earning nothing beyond `supply_apy`."
23546
23642
  },
23547
23643
  "borrow_apy": {
23548
23644
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.95",
3
+ "version": "2.2.96",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
package/src/lib/config.ts CHANGED
@@ -62,7 +62,7 @@ export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.1",
64
64
  sdkVersion: "2.0.0",
65
- genVersion: "2.924.0",
65
+ genVersion: "2.926.2",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 2.0.0 2.924.0 0.0.1 @compass-labs/api-sdk",
67
+ "speakeasy-sdk/typescript 2.0.0 2.926.2 0.0.1 @compass-labs/api-sdk",
68
68
  } as const;
@@ -29,9 +29,13 @@ export type ChainMarketInfo = {
29
29
  */
30
30
  aTokenAddress: string;
31
31
  /**
32
- * Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%).
32
+ * Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%). This is LENDING interest only — what borrowers pay. For a staked or wrapped asset it is not the whole yield; add `intrinsic_apy`.
33
33
  */
34
34
  supplyApy: string;
35
+ /**
36
+ * What holding this asset earns OUTSIDE the lending pool, in percentage: staking rewards or vault yield accruing inside the token's own exchange rate, which the pool neither pays nor observes. A trailing 7-day measurement. ABSENT when no measurement is available (the route omits null fields) — absent does not mean zero. For an asset that plainly earns beyond lending (wstETH, sUSDe, wstHYPE) `supply_apy` alone understates what it earns by percentage points, since almost nobody borrows these and their supply rate rounds to nothing: Hyperlend's wstHYPE reserve pays 0.00006% against a ~2.5% staking yield. Treat an absent value as unknown rather than as the asset earning nothing beyond `supply_apy`.
37
+ */
38
+ intrinsicApy?: string | null | undefined;
35
39
  /**
36
40
  * Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%).
37
41
  */
@@ -79,6 +83,7 @@ export const ChainMarketInfo$inboundSchema: z.ZodType<
79
83
  address: z.string(),
80
84
  a_token_address: z.string(),
81
85
  supply_apy: z.string(),
86
+ intrinsic_apy: z.nullable(z.string()).optional(),
82
87
  borrow_apy: z.string(),
83
88
  supply_apy_avg: z.string(),
84
89
  borrow_apy_avg: z.string(),
@@ -92,6 +97,7 @@ export const ChainMarketInfo$inboundSchema: z.ZodType<
92
97
  return remap$(v, {
93
98
  "a_token_address": "aTokenAddress",
94
99
  "supply_apy": "supplyApy",
100
+ "intrinsic_apy": "intrinsicApy",
95
101
  "borrow_apy": "borrowApy",
96
102
  "supply_apy_avg": "supplyApyAvg",
97
103
  "borrow_apy_avg": "borrowApyAvg",
@@ -60,15 +60,37 @@ export type LoopedPositionCurrentState = {
60
60
  */
61
61
  healthFactorScope: LoopedPositionCurrentStateHealthFactorScope;
62
62
  /**
63
- * What the collateral leg currently earns, in percentage (e.g. 6.12 = 6.12%). Aave: the collateral reserve's spot supply APY. Morpho: the collateral token's own yield its 7d vault APY when it is an indexed vault share (e.g. steakUSDC); null otherwise, since Morpho collateral earns nothing from the market itself and an unindexed token's intrinsic yield is unknown.
63
+ * What the collateral leg currently earns, in percentage (e.g. 6.12 = 6.12%) the sum of collateral_lending_apy and collateral_intrinsic_apy where both apply. Null when the token earns a yield outside the lending pool (a staked or wrapped asset) and no source for that yield is available: the pool's supply APY alone would understate the leg by percentage points and can invert the sign of net_apy, so it is withheld rather than reported as the whole yield.
64
64
  */
65
65
  collateralApy?: string | null | undefined;
66
66
  /**
67
- * What the debt leg currently costs, in percentage: the market's spot borrow APY (Morpho IRM rate / Aave variable borrow rate). Null when the rate read was unavailable.
67
+ * The supply half of the collateral leg, in percentage: interest paid by borrowers of the collateral asset (Aave supply APY). Near zero for staked assets, which almost nobody borrows. Exactly 0 on Morpho, whose collateral is held rather than lent — which is why a Morpho position's whole collateral leg is its vault yield.
68
+ */
69
+ collateralLendingApy?: string | null | undefined;
70
+ /**
71
+ * The yield the collateral token earns inside its own price, in percentage, independent of the lending pool — a liquid-staking token's staking rewards (wstHYPE against HYPE) or an ERC-4626 share's vault yield — which of the two follows from the position's protocol. Null when the token has none or none is indexed.
72
+ *
73
+ * @remarks
74
+ *
75
+ * A TRAILING 7-DAY measurement, not a forward rate: a week is a short sample of a staking rate, so consecutive readings move around the longer-run average by a few tenths of a percent.
76
+ *
77
+ * A null here alongside a null collateral_apy and a NON-null collateral_lending_apy is the meaningful case: the token does earn outside the pool, but no source for that yield is available, so the total is withheld rather than understated.
78
+ */
79
+ collateralIntrinsicApy?: string | null | undefined;
80
+ /**
81
+ * What the debt leg currently costs, in percentage — the sum of borrow_lending_apy and borrow_intrinsic_apy where both apply. Debt owed in a token that appreciates inside its own price (a staked or wrapped asset) grows by that appreciation on top of the pool's interest, so the pool rate alone would understate the cost and overstate net_apy; for such a token with no yield source available this is null (withheld) rather than the pool rate. For ordinary debt assets it equals the market's spot borrow APY. Null also when the rate read was unavailable.
68
82
  */
69
83
  borrowApy?: string | null | undefined;
70
84
  /**
71
- * Levered net yield on the position's equity, in percentage: leverage x collateral_apy - (leverage - 1) x borrow_apy. Negative means the carry is upside down (borrowing costs more than the collateral earns). Null when leverage or either leg is unknown. The collateral leg of a Morpho vault-share position is a 7d average while the borrow leg is spot.
85
+ * The pool half of the debt leg, in percentage: the market's spot borrow APY (Morpho IRM rate / Aave variable borrow rate) interest charged on the debt by the lending market itself.
86
+ */
87
+ borrowLendingApy?: string | null | undefined;
88
+ /**
89
+ * The yield the DEBT token earns inside its own price, in percentage — which the borrower owes on top of pool interest, since the debt is denominated in an appreciating token. Same source and trailing 7-day window as collateral_intrinsic_apy. Null when the token has none or none is indexed; null alongside a null borrow_apy and a NON-null borrow_lending_apy means the debt token does earn outside the pool but no source is available, so the total cost is withheld rather than understated.
90
+ */
91
+ borrowIntrinsicApy?: string | null | undefined;
92
+ /**
93
+ * Levered net yield on the position's equity, in percentage: leverage x collateral_apy - (leverage - 1) x borrow_apy. Negative means the carry is upside down (borrowing costs more than the collateral earns). Null when leverage or either leg is unknown. This is a SNAPSHOT at today's rates, not a forecast, and it mixes a trailing collateral measurement with a spot borrow rate. It is also denominated in the debt asset, not USD: a wstHYPE/WHYPE loop earning a positive net_apy still loses USD value if HYPE falls. The borrow leg floats with the debt reserve's utilisation, so this figure can move without the position changing at all.
72
94
  */
73
95
  netApy?: string | null | undefined;
74
96
  };
@@ -94,7 +116,11 @@ export const LoopedPositionCurrentState$inboundSchema: z.ZodType<
94
116
  health_factor_scope:
95
117
  LoopedPositionCurrentStateHealthFactorScope$inboundSchema,
96
118
  collateral_apy: z.nullable(z.string()).optional(),
119
+ collateral_lending_apy: z.nullable(z.string()).optional(),
120
+ collateral_intrinsic_apy: z.nullable(z.string()).optional(),
97
121
  borrow_apy: z.nullable(z.string()).optional(),
122
+ borrow_lending_apy: z.nullable(z.string()).optional(),
123
+ borrow_intrinsic_apy: z.nullable(z.string()).optional(),
98
124
  net_apy: z.nullable(z.string()).optional(),
99
125
  }).transform((v) => {
100
126
  return remap$(v, {
@@ -106,7 +132,11 @@ export const LoopedPositionCurrentState$inboundSchema: z.ZodType<
106
132
  "health_factor": "healthFactor",
107
133
  "health_factor_scope": "healthFactorScope",
108
134
  "collateral_apy": "collateralApy",
135
+ "collateral_lending_apy": "collateralLendingApy",
136
+ "collateral_intrinsic_apy": "collateralIntrinsicApy",
109
137
  "borrow_apy": "borrowApy",
138
+ "borrow_lending_apy": "borrowLendingApy",
139
+ "borrow_intrinsic_apy": "borrowIntrinsicApy",
110
140
  "net_apy": "netApy",
111
141
  });
112
142
  });
@@ -60,6 +60,14 @@ export type MorphoLendingMarket = {
60
60
  * Current borrow APY for the loan token, in percentage (e.g. 5.25 means 5.25%). Null if the rate is unavailable.
61
61
  */
62
62
  borrowApy?: string | null | undefined;
63
+ /**
64
+ * What the COLLATERAL token earns inside its own price, in percentage: an ERC-4626 share's vault yield or a staking token's rewards, trailing 7 days. Morpho holds collateral without lending it out, so this is the collateral leg's ENTIRE yield. Null means unmeasured, NOT zero — a plain token (WETH, cbBTC) earns nothing and a yield-bearing one may simply not be indexed yet.
65
+ */
66
+ collateralIntrinsicApy?: string | null | undefined;
67
+ /**
68
+ * What the LOAN token earns inside its own price, in percentage, trailing 7 days. Debt owed in such a token grows by this on top of borrow_apy — a borrower's true cost is their sum. Null means unmeasured, NOT zero.
69
+ */
70
+ loanIntrinsicApy?: string | null | undefined;
63
71
  /**
64
72
  * Borrowed share of supplied assets, in percentage 0-100.
65
73
  */
@@ -108,6 +116,8 @@ export const MorphoLendingMarket$inboundSchema: z.ZodType<
108
116
  lltv: z.string(),
109
117
  supply_apy: z.nullable(z.string()).optional(),
110
118
  borrow_apy: z.nullable(z.string()).optional(),
119
+ collateral_intrinsic_apy: z.nullable(z.string()).optional(),
120
+ loan_intrinsic_apy: z.nullable(z.string()).optional(),
111
121
  utilization: z.string(),
112
122
  total_supply_assets: z.string(),
113
123
  total_borrow_assets: z.string(),
@@ -126,6 +136,8 @@ export const MorphoLendingMarket$inboundSchema: z.ZodType<
126
136
  "collateral_token_decimals": "collateralTokenDecimals",
127
137
  "supply_apy": "supplyApy",
128
138
  "borrow_apy": "borrowApy",
139
+ "collateral_intrinsic_apy": "collateralIntrinsicApy",
140
+ "loan_intrinsic_apy": "loanIntrinsicApy",
129
141
  "total_supply_assets": "totalSupplyAssets",
130
142
  "total_borrow_assets": "totalBorrowAssets",
131
143
  "available_liquidity": "availableLiquidity",
@@ -28,9 +28,13 @@ export type ReserveInfo = {
28
28
  */
29
29
  aTokenAddress: string;
30
30
  /**
31
- * Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%).
31
+ * Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%). This is LENDING interest only — what borrowers pay. For a staked or wrapped asset it is not the whole yield; add `intrinsic_apy`.
32
32
  */
33
33
  supplyApy: string;
34
+ /**
35
+ * What holding this asset earns OUTSIDE the lending pool, in percentage: staking rewards or vault yield accruing inside the token's own exchange rate, which the pool neither pays nor observes. A trailing 7-day measurement. ABSENT when no measurement is available (the route omits null fields) — absent does not mean zero. For an asset that plainly earns beyond lending (wstETH, sUSDe, wstHYPE) `supply_apy` alone understates what it earns by percentage points, since almost nobody borrows these and their supply rate rounds to nothing: Hyperlend's wstHYPE reserve pays 0.00006% against a ~2.5% staking yield. Treat an absent value as unknown rather than as the asset earning nothing beyond `supply_apy`.
36
+ */
37
+ intrinsicApy?: string | null | undefined;
34
38
  /**
35
39
  * Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%).
36
40
  */
@@ -74,6 +78,7 @@ export const ReserveInfo$inboundSchema: z.ZodType<
74
78
  address: z.string(),
75
79
  a_token_address: z.string(),
76
80
  supply_apy: z.string(),
81
+ intrinsic_apy: z.nullable(z.string()).optional(),
77
82
  borrow_apy: z.string(),
78
83
  supply_apy_avg: z.string(),
79
84
  borrow_apy_avg: z.string(),
@@ -86,6 +91,7 @@ export const ReserveInfo$inboundSchema: z.ZodType<
86
91
  return remap$(v, {
87
92
  "a_token_address": "aTokenAddress",
88
93
  "supply_apy": "supplyApy",
94
+ "intrinsic_apy": "intrinsicApy",
89
95
  "borrow_apy": "borrowApy",
90
96
  "supply_apy_avg": "supplyApyAvg",
91
97
  "borrow_apy_avg": "borrowApyAvg",
@@ -1,14 +0,0 @@
1
- "use strict";var Kt=Object.defineProperty;var f=(s,e)=>Kt(s,"name",{value:e,configurable:!0});var q=require("node:path"),Fe=require("node:url"),J=require("esbuild"),Yt=require("node:crypto"),Be=require("./node-features-CEjg7cMX.cjs"),$=require("node:fs"),Qt=require("node:os"),Zt=require("./temporary-directory-B83uKxJF.cjs");const Se=f(s=>Yt.createHash("sha1").update(s).digest("hex"),"sha1");var Vt=44,en=59,Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",We=new Uint8Array(64),tn=new Uint8Array(128);for(let s=0;s<Pe.length;s++){const e=Pe.charCodeAt(s);We[s]=e,tn[e]=s}function Q(s,e,n){let i=e-n;i=i<0?-i<<1|1:i<<1;do{let o=i&31;i>>>=5,i>0&&(o|=32),s.write(We[o])}while(i>0);return e}f(Q,"encodeInteger$1");var qe=1024*16,Je=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(s){return Buffer.from(s.buffer,s.byteOffset,s.byteLength).toString()}}:{decode(s){let e="";for(let n=0;n<s.length;n++)e+=String.fromCharCode(s[n]);return e}},nn=class{static{f(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(qe)}write(s){const{buffer:e}=this;e[this.pos++]=s,this.pos===qe&&(this.out+=Je.decode(e),this.pos=0)}flush(){const{buffer:s,out:e,pos:n}=this;return n>0?e+Je.decode(s.subarray(0,n)):e}};function rn(s){const e=new nn;let n=0,i=0,o=0,c=0;for(let u=0;u<s.length;u++){const p=s[u];if(u>0&&e.write(en),p.length===0)continue;let g=0;for(let b=0;b<p.length;b++){const d=p[b];b>0&&e.write(Vt),g=Q(e,d[0],g),d.length!==1&&(n=Q(e,d[1],n),i=Q(e,d[2],i),o=Q(e,d[3],o),d.length!==4&&(c=Q(e,d[4],c)))}}return e.flush()}f(rn,"encode$1");class le{static{f(this,"BitSet")}constructor(e){this.bits=e instanceof le?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class ie{static{f(this,"Chunk")}constructor(e,n,i){this.start=e,this.end=n,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ie(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let n=this;for(;n;)e(n),n=n.next}eachPrevious(e){let n=this;for(;n;)e(n),n=n.previous}edit(e,n,i){return this.content=e,i||(this.intro="",this.outro=""),this.storeName=n,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const n=e-this.start,i=this.original.slice(0,n),o=this.original.slice(n);this.original=i;const c=new ie(e,this.end,o);return c.outro=this.outro,this.outro="",this.end=e,this.edited?(c.edit("",!1),this.content=""):this.content=i,c.next=this.next,c.next&&(c.next.previous=c),c.previous=this,this.next=c,c}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const n=this.content.replace(e,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,!0),this.edited&&this.edit(n,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const n=this.content.replace(e,"");if(n.length){if(n!==this.content){const i=this.split(this.end-n.length);this.edited&&i.edit(n,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}}function sn(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?s=>globalThis.btoa(unescape(encodeURIComponent(s))):typeof Buffer=="function"?s=>Buffer.from(s,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}f(sn,"getBtoa");const on=sn();let an=class{static{f(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=rn(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+on(this.toString())}};function cn(s){const e=s.split(`
2
- `),n=e.filter(c=>/^\t+/.test(c)),i=e.filter(c=>/^ {2,}/.test(c));if(n.length===0&&i.length===0)return null;if(n.length>=i.length)return" ";const o=i.reduce((c,u)=>{const p=/^ +/.exec(u)[0].length;return Math.min(p,c)},1/0);return new Array(o+1).join(" ")}f(cn,"guessIndent");function un(s,e){const n=s.split(/[/\\]/),i=e.split(/[/\\]/);for(n.pop();n[0]===i[0];)n.shift(),i.shift();if(n.length){let o=n.length;for(;o--;)n[o]=".."}return n.concat(i).join("/")}f(un,"getRelativePath");const hn=Object.prototype.toString;function ln(s){return hn.call(s)==="[object Object]"}f(ln,"isObject");function Ge(s){const e=s.split(`
3
- `),n=[];for(let i=0,o=0;i<e.length;i++)n.push(o),o+=e[i].length+1;return f(function(o){let c=0,u=n.length;for(;c<u;){const b=c+u>>1;o<n[b]?u=b:c=b+1}const p=c-1,g=o-n[p];return{line:p,column:g}},"locate")}f(Ge,"getLocator");const fn=/\w/;class dn{static{f(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,n,i,o){if(n.length){const c=n.length-1;let u=n.indexOf(`
4
- `,0),p=-1;for(;u>=0&&c>u;){const b=[this.generatedCodeColumn,e,i.line,i.column];o>=0&&b.push(o),this.rawSegments.push(b),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=u,u=n.indexOf(`
5
- `,u+1)}const g=[this.generatedCodeColumn,e,i.line,i.column];o>=0&&g.push(o),this.rawSegments.push(g),this.advance(n.slice(p+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(e,n,i,o,c){let u=n.start,p=!0,g=!1;for(;u<n.end;){if(i[u]===`
6
- `)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=!0,g=!1;else{if(this.hires||p||c.has(u)){const b=[this.generatedCodeColumn,e,o.line,o.column];this.hires==="boundary"?fn.test(i[u])?g||(this.rawSegments.push(b),g=!0):(this.rawSegments.push(b),g=!1):this.rawSegments.push(b)}o.column+=1,this.generatedCodeColumn+=1,p=!1}u+=1}this.pending=null}advance(e){if(!e)return;const n=e.split(`
7
- `);if(n.length>1){for(let i=0;i<n.length-1;i++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=n[n.length-1].length}}const Z=`
8
- `,G={insertLeft:!1,insertRight:!1,storeName:!1};class De{static{f(this,"MagicString")}constructor(e,n={}){const i=new ie(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new le},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}}),this.byStart[0]=i,this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.appendLeft(n):this.intro+=n,this}appendRight(e,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.appendRight(n):this.outro+=n,this}clone(){const e=new De(this.original,{filename:this.filename,offset:this.offset});let n=this.firstChunk,i=e.firstChunk=e.lastSearchedChunk=n.clone();for(;n;){e.byStart[i.start]=i,e.byEnd[i.end]=i;const o=n.next,c=o&&o.clone();c&&(i.next=c,c.previous=i,i=c),n=o}return e.lastChunk=i,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new le(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const n=0,i=Object.keys(this.storedNames),o=new dn(e.hires),c=Ge(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(u=>{const p=c(u.start);u.intro.length&&o.advance(u.intro),u.edited?o.addEdit(n,u.content,p,u.storeName?i.indexOf(u.original):-1):o.addUneditedChunk(n,u,this.original,p,this.sourcemapLocations),u.outro.length&&o.advance(u.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?un(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:i,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(e){return new an(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=cn(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,n){const i=/^[^\r\n]/gm;if(ln(e)&&(n=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;n=n||{};const o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(d=>{for(let r=d[0];r<d[1];r+=1)o[r]=!0});let c=n.indentStart!==!1;const u=f(b=>c?`${e}${b}`:(c=!0,b),"replacer");this.intro=this.intro.replace(i,u);let p=0,g=this.firstChunk;for(;g;){const b=g.end;if(g.edited)o[p]||(g.content=g.content.replace(i,u),g.content.length&&(c=g.content[g.content.length-1]===`
9
- `));else for(p=g.start;p<b;){if(!o[p]){const d=this.original[p];d===`
10
- `?c=!0:d!=="\r"&&c&&(c=!1,p===g.start||(this._splitChunk(g,p),g=g.next),g.prependRight(e))}p+=1}p=g.end,g=g.next}return this.outro=this.outro.replace(i,u),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,n){return G.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),G.insertLeft=!0),this.appendLeft(e,n)}insertRight(e,n){return G.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),G.insertRight=!0),this.prependRight(e,n)}move(e,n,i){if(e=e+this.offset,n=n+this.offset,i=i+this.offset,i>=e&&i<=n)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(n),this._split(i);const o=this.byStart[e],c=this.byEnd[n],u=o.previous,p=c.next,g=this.byStart[i];if(!g&&c===this.lastChunk)return this;const b=g?g.previous:this.lastChunk;return u&&(u.next=p),p&&(p.previous=u),b&&(b.next=o),g&&(g.previous=c),o.previous||(this.firstChunk=c.next),c.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=b,c.next=g||null,b||(this.firstChunk=o),g||(this.lastChunk=c),this}overwrite(e,n,i,o){return o=o||{},this.update(e,n,i,{...o,overwrite:!o.contentOnly})}update(e,n,i,o){if(e=e+this.offset,n=n+this.offset,typeof i!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(n>this.original.length)throw new Error("end is out of bounds");if(e===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(n),o===!0&&(G.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),G.storeName=!0),o={storeName:!0});const c=o!==void 0?o.storeName:!1,u=o!==void 0?o.overwrite:!1;if(c){const b=this.original.slice(e,n);Object.defineProperty(this.storedNames,b,{writable:!0,value:!0,enumerable:!0})}const p=this.byStart[e],g=this.byEnd[n];if(p){let b=p;for(;b!==g;){if(b.next!==this.byStart[b.end])throw new Error("Cannot overwrite across a split point");b=b.next,b.edit("",!1)}p.edit(i,c,!u)}else{const b=new ie(e,n,"").edit(i,c);g.next=b,b.previous=g}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.prependLeft(n):this.intro=n+this.intro,this}prependRight(e,n){if(e=e+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.prependRight(n):this.outro=n+this.outro,this}remove(e,n){if(e=e+this.offset,n=n+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=n>i.end?this.byStart[i.end]:null;return this}reset(e,n){if(e=e+this.offset,n=n+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let i=this.byStart[e];for(;i;)i.reset(),i=n>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Z);if(e!==-1)return this.outro.substr(e+1);let n=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(Z),e!==-1)return i.outro.substr(e+1)+n;n=i.outro+n}if(i.content.length>0){if(e=i.content.lastIndexOf(Z),e!==-1)return i.content.substr(e+1)+n;n=i.content+n}if(i.intro.length>0){if(e=i.intro.lastIndexOf(Z),e!==-1)return i.intro.substr(e+1)+n;n=i.intro+n}}while(i=i.previous);return e=this.intro.lastIndexOf(Z),e!==-1?this.intro.substr(e+1)+n:this.intro+n}slice(e=0,n=this.original.length-this.offset){if(e=e+this.offset,n=n+this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}let i="",o=this.firstChunk;for(;o&&(o.start>e||o.end<=e);){if(o.start<n&&o.end>=n)return i;o=o.next}if(o&&o.edited&&o.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const c=o;for(;o;){o.intro&&(c!==o||o.start===e)&&(i+=o.intro);const u=o.start<n&&o.end>=n;if(u&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);const p=c===o?e-o.start:0,g=u?o.content.length+n-o.end:o.content.length;if(i+=o.content.slice(p,g),o.outro&&(!u||o.end===n)&&(i+=o.outro),u)break;o=o.next}return i}snip(e,n){const i=this.clone();return i.remove(0,e),i.remove(n,i.original.length),i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let n=this.lastSearchedChunk,i=n;const o=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);if(n=o?this.byStart[n.end]:this.byEnd[n.start],n===i)return;i=n}}_splitChunk(e,n){if(e.edited&&e.content.length){const o=Ge(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${e.original}")`)}const i=e.split(n);return this.byEnd[n]=e,this.byStart[n]=i,this.byEnd[i.end]=i,e===this.lastChunk&&(this.lastChunk=i),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,n=this.firstChunk;for(;n;)e+=n.toString(),n=n.next;return e+this.outro}isEmpty(){let e=this.firstChunk;do if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;while(e=e.next);return!0}length(){let e=this.firstChunk,n=0;do n+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const n=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let i=this.lastChunk;do{const o=i.end,c=i.trimEnd(n);if(i.end!==o&&(this.lastChunk===i&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.previous}while(i);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let i=this.firstChunk;do{const o=i.end,c=i.trimStart(n);if(i.end!==o&&(i===this.lastChunk&&(this.lastChunk=i.next),this.byEnd[i.end]=i,this.byStart[i.next.start]=i.next,this.byEnd[i.next.end]=i.next),c)return!0;i=i.next}while(i);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,n){function i(c,u){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(p,g)=>g==="$"?"$":g==="&"?c[0]:+g<c.length?c[+g]:`$${g}`):n(...c,c.index,u,c.groups)}f(i,"getReplacement");function o(c,u){let p;const g=[];for(;p=c.exec(u);)g.push(p);return g}if(f(o,"matchAll"),e.global)o(e,this.original).forEach(u=>{if(u.index!=null){const p=i(u,this.original);p!==u[0]&&this.overwrite(u.index,u.index+u[0].length,p)}});else{const c=this.original.match(e);if(c&&c.index!=null){const u=i(c,this.original);u!==c[0]&&this.overwrite(c.index,c.index+c[0].length,u)}}return this}_replaceString(e,n){const{original:i}=this,o=i.indexOf(e);return o!==-1&&this.overwrite(o,o+e.length,n),this}replace(e,n){return typeof e=="string"?this._replaceString(e,n):this._replaceRegexp(e,n)}_replaceAllString(e,n){const{original:i}=this,o=e.length;for(let c=i.indexOf(e);c!==-1;c=i.indexOf(e,c+o))i.slice(c,c+o)!==n&&this.overwrite(c,c+o,n);return this}replaceAll(e,n){if(typeof e=="string")return this._replaceAllString(e,n);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,n)}}let x,ae,ve,V=2<<19;const ze=new Uint8Array(new Uint16Array([1]).buffer)[0]===1?function(s,e){const n=s.length;let i=0;for(;i<n;)e[i]=s.charCodeAt(i++)}:function(s,e){const n=s.length;let i=0;for(;i<n;){const o=s.charCodeAt(i);e[i++]=(255&o)<<8|o>>>8}},gn="xportmportlassforetaourceromsyncunctionssertvoyiedelecontininstantybreareturdebuggeawaithrwhileifcatcfinallels";let _,He,C;function bn(s,e="@"){_=s,He=e;const n=2*_.length+(2<<18);if(n>V||!x){for(;n>V;)V*=2;ae=new ArrayBuffer(V),ze(gn,new Uint16Array(ae,16,110)),x=function(u,p,g){var b=new u.Int8Array(g),d=new u.Int16Array(g),r=new u.Int32Array(g),O=new u.Uint8Array(g),I=new u.Uint16Array(g),E=1040;function R(){var t=0,a=0,l=0,h=0,m=0,w=0,y=0;y=E,E=E+10240|0,b[804]=1,b[803]=0,d[399]=0,d[400]=0,r[69]=r[2],b[805]=0,r[68]=0,b[802]=0,r[70]=y+2048,r[71]=y,b[806]=0,t=(r[3]|0)+-2|0,r[72]=t,a=t+(r[66]<<1)|0,r[73]=a;e:for(;;){if(l=t+2|0,r[72]=l,t>>>0>=a>>>0){h=18;break}t:do switch(d[l>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{if(!(d[400]|0)&&K(l)|0&&!(A(t+4|0,16,10)|0)&&(D(),(b[804]|0)==0)){h=9;break e}else h=17;break}case 105:{K(l)|0&&!(A(t+4|0,26,10)|0)&&B(),h=17;break}case 59:{h=17;break}case 47:switch(d[t+4>>1]|0){case 47:{pe();break t}case 42:{ge(1);break t}default:{h=16;break e}}default:{h=16;break e}}while(!1);(h|0)==17&&(h=0,r[69]=r[72]),t=r[72]|0,a=r[73]|0}(h|0)==9?(t=r[72]|0,r[69]=t,h=19):(h|0)==16?(b[804]=0,r[72]=t,h=19):(h|0)==18&&(b[802]|0?t=0:(t=l,h=19));do if((h|0)==19){e:for(;;){if(a=t+2|0,r[72]=a,t>>>0>=(r[73]|0)>>>0){h=92;break}t:do switch(d[a>>1]|0){case 9:case 10:case 11:case 12:case 13:case 32:break;case 101:{!(d[400]|0)&&K(a)|0&&!(A(t+4|0,16,10)|0)&&D(),h=91;break}case 105:{K(a)|0&&!(A(t+4|0,26,10)|0)&&B(),h=91;break}case 99:{K(a)|0&&!(A(t+4|0,36,8)|0)&&W(d[t+12>>1]|0)|0&&(b[806]=1),h=91;break}case 40:{l=r[70]|0,t=d[400]|0,h=t&65535,r[l+(h<<3)>>2]=1,a=r[69]|0,d[400]=t+1<<16>>16,r[l+(h<<3)+4>>2]=a,h=91;break}case 41:{if(a=d[400]|0,!(a<<16>>16)){h=36;break e}l=a+-1<<16>>16,d[400]=l,h=d[399]|0,a=h&65535,h<<16>>16&&(r[(r[70]|0)+((l&65535)<<3)>>2]|0)==5&&(a=r[(r[71]|0)+(a+-1<<2)>>2]|0,l=a+4|0,r[l>>2]|0||(r[l>>2]=(r[69]|0)+2),r[a+12>>2]=t+4,d[399]=h+-1<<16>>16),h=91;break}case 123:{h=r[69]|0,l=r[63]|0,t=h;do if((d[h>>1]|0)==41&(l|0)!=0&&(r[l+4>>2]|0)==(h|0))if(a=r[64]|0,r[63]=a,a){r[a+32>>2]=0;break}else{r[59]=0;break}while(!1);l=r[70]|0,a=d[400]|0,h=a&65535,r[l+(h<<3)>>2]=b[806]|0?6:2,d[400]=a+1<<16>>16,r[l+(h<<3)+4>>2]=t,b[806]=0,h=91;break}case 125:{if(t=d[400]|0,!(t<<16>>16)){h=49;break e}l=r[70]|0,h=t+-1<<16>>16,d[400]=h,(r[l+((h&65535)<<3)>>2]|0)==4&&$e(),h=91;break}case 39:{N(39),h=91;break}case 34:{N(34),h=91;break}case 47:switch(d[t+4>>1]|0){case 47:{pe();break t}case 42:{ge(1);break t}default:{t=r[69]|0,a=d[t>>1]|0;n:do if(!(_t(a)|0))a<<16>>16==41?(l=d[400]|0,At(r[(r[70]|0)+((l&65535)<<3)+4>>2]|0)|0||(h=65)):h=64;else switch(a<<16>>16){case 46:if(((d[t+-2>>1]|0)+-48&65535)<10){h=64;break n}else break n;case 43:if((d[t+-2>>1]|0)==43){h=64;break n}else break n;case 45:if((d[t+-2>>1]|0)==45){h=64;break n}else break n;default:break n}while(!1);(h|0)==64&&(l=d[400]|0,h=65);n:do if((h|0)==65){if(h=0,l<<16>>16&&(m=r[70]|0,w=(l&65535)+-1|0,a<<16>>16==102?(r[m+(w<<3)>>2]|0)==1:0)){if((d[t+-2>>1]|0)==111&&L(r[m+(w<<3)+4>>2]|0,44,3)|0)break}else h=69;if((h|0)==69&&a<<16>>16==125&&(h=r[70]|0,l=l&65535,Et(r[h+(l<<3)+4>>2]|0)|0||(r[h+(l<<3)>>2]|0)==6))break;if(!(vt(t)|0)){switch(a<<16>>16){case 0:break n;case 47:{if(b[805]|0)break n;break}default:}if(h=r[65]|0,h|0&&t>>>0>=(r[h>>2]|0)>>>0&&t>>>0<=(r[h+4>>2]|0)>>>0){de(),b[805]=0,h=91;break t}l=r[3]|0;do{if(t>>>0<=l>>>0)break;t=t+-2|0,r[69]=t,a=d[t>>1]|0}while(!(be(a)|0));if(oe(a)|0){do{if(t>>>0<=l>>>0)break;t=t+-2|0,r[69]=t}while(oe(d[t>>1]|0)|0);if(It(t)|0){de(),b[805]=0,h=91;break t}}b[805]=1,h=91;break t}}while(!1);de(),b[805]=0,h=91;break t}}case 96:{l=r[70]|0,a=d[400]|0,h=a&65535,r[l+(h<<3)+4>>2]=r[69],d[400]=a+1<<16>>16,r[l+(h<<3)>>2]=3,$e(),h=91;break}default:h=91}while(!1);(h|0)==91&&(h=0,r[69]=r[72]),t=r[72]|0}if((h|0)==36){M(),t=0;break}else if((h|0)==49){M(),t=0;break}else if((h|0)==92){t=b[802]|0?0:(d[399]|d[400])<<16>>16==0;break}}while(!1);return E=y,t|0}f(R,"b");function D(){var t=0,a=0,l=0,h=0,m=0,w=0,y=0,T=0,we=0,ke=0,Ce=0,ye=0,S=0,v=0;T=r[72]|0,we=r[65]|0,v=T+12|0,r[72]=v,l=k(1)|0,t=r[72]|0,(t|0)==(v|0)&&!(se(l)|0)||(S=3);e:do if((S|0)==3){t:do switch(l<<16>>16){case 123:{for(r[72]=t+2,t=k(1)|0,a=r[72]|0;;){if(Y(t)|0?(N(t),t=(r[72]|0)+2|0,r[72]=t):(j(t)|0,t=r[72]|0),k(1)|0,t=je(a,t)|0,t<<16>>16==44&&(r[72]=(r[72]|0)+2,t=k(1)|0),t<<16>>16==125){S=15;break}if(v=a,a=r[72]|0,(a|0)==(v|0)){S=12;break}if(a>>>0>(r[73]|0)>>>0){S=14;break}}if((S|0)==12){M();break e}else if((S|0)==14){M();break e}else if((S|0)==15){b[803]=1,r[72]=(r[72]|0)+2;break t}break}case 42:{r[72]=t+2,k(1)|0,v=r[72]|0,je(v,v)|0;break}default:{switch(b[804]=0,l<<16>>16){case 100:{switch(T=t+14|0,r[72]=T,(k(1)|0)<<16>>16){case 97:{a=r[72]|0,!(A(a+2|0,72,8)|0)&&(m=a+10|0,oe(d[m>>1]|0)|0)&&(r[72]=m,k(0)|0,S=22);break}case 102:{S=22;break}case 99:{a=r[72]|0,!(A(a+2|0,36,8)|0)&&(h=a+10|0,v=d[h>>1]|0,W(v)|0|v<<16>>16==123)&&(r[72]=h,w=k(1)|0,w<<16>>16!=123)&&(ye=w,S=31);break}default:}n:do if((S|0)==22&&(y=r[72]|0,(A(y+2|0,80,14)|0)==0)){if(l=y+16|0,a=d[l>>1]|0,!(W(a)|0))switch(a<<16>>16){case 40:case 42:break;default:break n}r[72]=l,a=k(1)|0,a<<16>>16==42&&(r[72]=(r[72]|0)+2,a=k(1)|0),a<<16>>16!=40&&(ye=a,S=31)}while(!1);if((S|0)==31&&(ke=r[72]|0,j(ye)|0,Ce=r[72]|0,Ce>>>0>ke>>>0)){P(t,T,ke,Ce),r[72]=(r[72]|0)+-2;break e}P(t,T,0,0),r[72]=t+12;break e}case 97:{r[72]=t+10,k(0)|0,t=r[72]|0,S=35;break}case 102:{S=35;break}case 99:{if(!(A(t+2|0,36,8)|0)&&(a=t+10|0,be(d[a>>1]|0)|0)){r[72]=a,v=k(1)|0,S=r[72]|0,j(v)|0,v=r[72]|0,P(S,v,S,v),r[72]=(r[72]|0)+-2;break e}t=t+4|0,r[72]=t;break}case 108:case 118:break;default:break e}if((S|0)==35){r[72]=t+16,t=k(1)|0,t<<16>>16==42&&(r[72]=(r[72]|0)+2,t=k(1)|0),S=r[72]|0,j(t)|0,v=r[72]|0,P(S,v,S,v),r[72]=(r[72]|0)+-2;break e}r[72]=t+6,b[804]=0,l=k(1)|0,t=r[72]|0,l=(j(l)|0|32)<<16>>16==123,h=r[72]|0,l&&(r[72]=h+2,v=k(1)|0,t=r[72]|0,j(v)|0);n:for(;a=r[72]|0,(a|0)!=(t|0);){if(P(t,a,t,a),a=k(1)|0,l)switch(a<<16>>16){case 93:case 125:break e;default:}if(t=r[72]|0,a<<16>>16!=44){S=51;break}switch(r[72]=t+2,a=k(1)|0,t=r[72]|0,a<<16>>16){case 91:case 123:{S=51;break n}default:}j(a)|0}if((S|0)==51&&(r[72]=t+-2),!l)break e;r[72]=h+-2;break e}}while(!1);if(v=(k(1)|0)<<16>>16==102,t=r[72]|0,v&&!(A(t+2|0,66,6)|0))for(r[72]=t+8,H(T,k(1)|0,0),t=we|0?we+16|0:240;;){if(t=r[t>>2]|0,!t)break e;r[t+12>>2]=0,r[t+8>>2]=0,t=t+16|0}r[72]=t+-2}while(!1)}f(D,"k");function B(){var t=0,a=0,l=0,h=0,m=0,w=0,y=0;m=r[72]|0,l=m+12|0,r[72]=l,h=k(1)|0,a=r[72]|0;e:do if(h<<16>>16!=46)h<<16>>16==115&a>>>0>l>>>0?!(A(a+2|0,56,10)|0)&&(t=a+12|0,W(d[t>>1]|0)|0)?w=14:(a=6,l=0,w=46):(t=h,l=0,w=15);else switch(r[72]=a+2,(k(1)|0)<<16>>16){case 109:{if(t=r[72]|0,A(t+2|0,50,6)|0||(a=r[69]|0,!(me(a)|0)&&(d[a>>1]|0)==46))break e;fe(m,m,t+8|0,2);break e}case 115:{if(t=r[72]|0,A(t+2|0,56,10)|0||(a=r[69]|0,!(me(a)|0)&&(d[a>>1]|0)==46))break e;t=t+12|0,w=14;break e}default:break e}while(!1);(w|0)==14&&(r[72]=t,t=k(1)|0,l=1,w=15);e:do if((w|0)==15)switch(t<<16>>16){case 40:{if(a=r[70]|0,y=d[400]|0,h=y&65535,r[a+(h<<3)>>2]=5,t=r[72]|0,d[400]=y+1<<16>>16,r[a+(h<<3)+4>>2]=t,(d[r[69]>>1]|0)==46)break e;switch(r[72]=t+2,a=k(1)|0,fe(m,r[72]|0,0,t),l?(t=r[63]|0,r[t+28>>2]=5):t=r[63]|0,m=r[71]|0,y=d[399]|0,d[399]=y+1<<16>>16,r[m+((y&65535)<<2)>>2]=t,a<<16>>16){case 39:{N(39);break}case 34:{N(34);break}default:{r[72]=(r[72]|0)+-2;break e}}switch(t=(r[72]|0)+2|0,r[72]=t,(k(1)|0)<<16>>16){case 44:{r[72]=(r[72]|0)+2,k(1)|0,m=r[63]|0,r[m+4>>2]=t,y=r[72]|0,r[m+16>>2]=y,b[m+24>>0]=1,r[72]=y+-2;break e}case 41:{d[400]=(d[400]|0)+-1<<16>>16,y=r[63]|0,r[y+4>>2]=t,r[y+12>>2]=(r[72]|0)+2,b[y+24>>0]=1,d[399]=(d[399]|0)+-1<<16>>16;break e}default:{r[72]=(r[72]|0)+-2;break e}}}case 123:{if(l){a=12,l=1,w=46;break e}if(t=r[72]|0,d[400]|0){r[72]=t+-2;break e}for(;!(t>>>0>=(r[73]|0)>>>0);){if(t=k(1)|0,Y(t)|0)N(t);else if(t<<16>>16==125){w=36;break}t=(r[72]|0)+2|0,r[72]=t}if((w|0)==36&&(r[72]=(r[72]|0)+2),y=(k(1)|0)<<16>>16==102,t=r[72]|0,y&&A(t+2|0,66,6)|0){M();break e}if(r[72]=t+8,t=k(1)|0,Y(t)|0){H(m,t,0);break e}else{M();break e}}default:{if(l){a=12,l=1,w=46;break e}switch(t<<16>>16){case 42:case 39:case 34:{l=0,w=48;break e}default:{a=6,l=0,w=46;break e}}}}while(!1);(w|0)==46&&(t=r[72]|0,(t|0)==(m+(a<<1)|0)?r[72]=t+-2:w=48);do if((w|0)==48){if(d[400]|0){r[72]=(r[72]|0)+-2;break}for(t=r[73]|0,a=r[72]|0;;){if(a>>>0>=t>>>0){w=55;break}if(h=d[a>>1]|0,Y(h)|0){w=53;break}y=a+2|0,r[72]=y,a=y}if((w|0)==53){H(m,h,l);break}else if((w|0)==55){M();break}}while(!1)}f(B,"l");function H(t,a,l){t=t|0,a=a|0,l=l|0;var h=0,m=0;switch(h=(r[72]|0)+2|0,a<<16>>16){case 39:{N(39),m=5;break}case 34:{N(34),m=5;break}default:M()}do if((m|0)==5){if(fe(t,h,r[72]|0,1),l&&(r[(r[63]|0)+28>>2]=4),r[72]=(r[72]|0)+2,a=k(0)|0,l=a<<16>>16==97,l?(h=r[72]|0,A(h+2|0,94,10)|0&&(m=13)):(h=r[72]|0,a<<16>>16==119&&(d[h+2>>1]|0)==105&&(d[h+4>>1]|0)==116&&(d[h+6>>1]|0)==104||(m=13)),(m|0)==13){r[72]=h+-2;break}if(r[72]=h+((l?6:4)<<1),(k(1)|0)<<16>>16!=123){r[72]=h;break}l=r[72]|0,a=l;e:for(;;){switch(r[72]=a+2,a=k(1)|0,a<<16>>16){case 39:{N(39),r[72]=(r[72]|0)+2,a=k(1)|0;break}case 34:{N(34),r[72]=(r[72]|0)+2,a=k(1)|0;break}default:a=j(a)|0}if(a<<16>>16!=58){m=22;break}switch(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16){case 39:{N(39);break}case 34:{N(34);break}default:{m=26;break e}}switch(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16){case 125:{m=31;break e}case 44:break;default:{m=30;break e}}if(r[72]=(r[72]|0)+2,(k(1)|0)<<16>>16==125){m=31;break}a=r[72]|0}if((m|0)==22){r[72]=h;break}else if((m|0)==26){r[72]=h;break}else if((m|0)==30){r[72]=h;break}else if((m|0)==31){m=r[63]|0,r[m+16>>2]=l,r[m+12>>2]=(r[72]|0)+2;break}}while(!1)}f(H,"u");function vt(t){t=t|0;e:do switch(d[t>>1]|0){case 100:switch(d[t+-2>>1]|0){case 105:{t=L(t+-4|0,104,2)|0;break e}case 108:{t=L(t+-4|0,108,3)|0;break e}default:{t=0;break e}}case 101:switch(d[t+-2>>1]|0){case 115:switch(d[t+-4>>1]|0){case 108:{t=X(t+-6|0,101)|0;break e}case 97:{t=X(t+-6|0,99)|0;break e}default:{t=0;break e}}case 116:{t=L(t+-4|0,114,4)|0;break e}case 117:{t=L(t+-4|0,122,6)|0;break e}default:{t=0;break e}}case 102:{if((d[t+-2>>1]|0)==111&&(d[t+-4>>1]|0)==101)switch(d[t+-6>>1]|0){case 99:{t=L(t+-8|0,134,6)|0;break e}case 112:{t=L(t+-8|0,146,2)|0;break e}default:{t=0;break e}}else t=0;break}case 107:{t=L(t+-2|0,150,4)|0;break}case 110:{t=t+-2|0,X(t,105)|0?t=1:t=L(t,158,5)|0;break}case 111:{t=X(t+-2|0,100)|0;break}case 114:{t=L(t+-2|0,168,7)|0;break}case 116:{t=L(t+-2|0,182,4)|0;break}case 119:switch(d[t+-2>>1]|0){case 101:{t=X(t+-4|0,110)|0;break e}case 111:{t=L(t+-4|0,190,3)|0;break e}default:{t=0;break e}}default:t=0}while(!1);return t|0}f(vt,"o");function $e(){var t=0,a=0,l=0,h=0;a=r[73]|0,l=r[72]|0;e:for(;;){if(t=l+2|0,l>>>0>=a>>>0){a=10;break}switch(d[t>>1]|0){case 96:{a=7;break e}case 36:{if((d[l+4>>1]|0)==123){a=6;break e}break}case 92:{t=l+4|0;break}default:}l=t}(a|0)==6?(t=l+4|0,r[72]=t,a=r[70]|0,h=d[400]|0,l=h&65535,r[a+(l<<3)>>2]=4,d[400]=h+1<<16>>16,r[a+(l<<3)+4>>2]=t):(a|0)==7?(r[72]=t,l=r[70]|0,h=(d[400]|0)+-1<<16>>16,d[400]=h,(r[l+((h&65535)<<3)>>2]|0)!=3&&M()):(a|0)==10&&(r[72]=t,M())}f($e,"h");function k(t){t=t|0;var a=0,l=0,h=0;l=r[72]|0;e:do{a=d[l>>1]|0;t:do if(a<<16>>16!=47)if(t){if(W(a)|0)break;break e}else{if(oe(a)|0)break;break e}else switch(d[l+2>>1]|0){case 47:{pe();break t}case 42:{ge(t);break t}default:{a=47;break e}}while(!1);h=r[72]|0,l=h+2|0,r[72]=l}while(h>>>0<(r[73]|0)>>>0);return a|0}f(k,"w");function fe(t,a,l,h){t=t|0,a=a|0,l=l|0,h=h|0;var m=0,w=0;w=r[67]|0,r[67]=w+36,m=r[63]|0,r[(m|0?m+32|0:236)>>2]=w,r[64]=m,r[63]=w,r[w+8>>2]=t,(h|0)==2?(t=3,m=l):(m=(h|0)==1,t=m?1:2,m=m?l+2|0:0),r[w+12>>2]=m,r[w+28>>2]=t,r[w>>2]=a,r[w+4>>2]=l,r[w+16>>2]=0,r[w+20>>2]=h,a=(h|0)==1,b[w+24>>0]=a&1,r[w+32>>2]=0,a|(h|0)==2&&(b[803]=1)}f(fe,"d");function N(t){t=t|0;var a=0,l=0,h=0,m=0;for(m=r[73]|0,a=r[72]|0;;){if(h=a+2|0,a>>>0>=m>>>0){a=9;break}if(l=d[h>>1]|0,l<<16>>16==t<<16>>16){a=10;break}if(l<<16>>16==92)l=a+4|0,(d[l>>1]|0)==13?(a=a+6|0,a=(d[a>>1]|0)==10?a:l):a=l;else if(Te(l)|0){a=9;break}else a=h}(a|0)==9?(r[72]=h,M()):(a|0)==10&&(r[72]=h)}f(N,"v");function je(t,a){t=t|0,a=a|0;var l=0,h=0,m=0,w=0;return l=r[72]|0,h=d[l>>1]|0,w=(t|0)==(a|0),m=w?0:t,w=w?0:a,h<<16>>16==97&&(r[72]=l+4,l=k(1)|0,t=r[72]|0,Y(l)|0?(N(l),a=(r[72]|0)+2|0,r[72]=a):(j(l)|0,a=r[72]|0),h=k(1)|0,l=r[72]|0),(l|0)!=(t|0)&&P(t,a,m,w),h|0}f(je,"A");function xt(){var t=0,a=0,l=0;l=r[73]|0,a=r[72]|0;e:for(;;){if(t=a+2|0,a>>>0>=l>>>0){a=6;break}switch(d[t>>1]|0){case 13:case 10:{a=6;break e}case 93:{a=7;break e}case 92:{t=a+4|0;break}default:}a=t}return(a|0)==6?(r[72]=t,M(),t=0):(a|0)==7&&(r[72]=t,t=93),t|0}f(xt,"C");function de(){var t=0,a=0,l=0;e:for(;;){if(t=r[72]|0,a=t+2|0,r[72]=a,t>>>0>=(r[73]|0)>>>0){l=7;break}switch(d[a>>1]|0){case 13:case 10:{l=7;break e}case 47:break e;case 91:{xt()|0;break}case 92:{r[72]=t+4;break}default:}}(l|0)==7&&M()}f(de,"g");function Et(t){switch(t=t|0,d[t>>1]|0){case 62:{t=(d[t+-2>>1]|0)==61;break}case 41:case 59:{t=1;break}case 104:{t=L(t+-2|0,210,4)|0;break}case 121:{t=L(t+-2|0,218,6)|0;break}case 101:{t=L(t+-2|0,230,3)|0;break}default:t=0}return t|0}f(Et,"p");function ge(t){t=t|0;var a=0,l=0,h=0,m=0,w=0;for(m=(r[72]|0)+2|0,r[72]=m,l=r[73]|0;a=m+2|0,!(m>>>0>=l>>>0||(h=d[a>>1]|0,!t&&Te(h)|0));){if(h<<16>>16==42&&(d[m+4>>1]|0)==47){w=8;break}m=a}(w|0)==8&&(r[72]=a,a=m+4|0),r[72]=a}f(ge,"y");function A(t,a,l){t=t|0,a=a|0,l=l|0;var h=0,m=0;e:do if(!l)t=0;else{for(;h=b[t>>0]|0,m=b[a>>0]|0,h<<24>>24==m<<24>>24;)if(l=l+-1|0,l)t=t+1|0,a=a+1|0;else{t=0;break e}t=(h&255)-(m&255)|0}while(!1);return t|0}f(A,"m");function se(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:{t=1;break}default:if((t&-8)<<16>>16==40|(t+-58&65535)<6)t=1;else{switch(t<<16>>16){case 91:case 93:case 94:{t=1;break e}default:}t=(t+-123&65535)<4}}while(!1);return t|0}f(se,"I");function _t(t){t=t|0;e:do switch(t<<16>>16){case 38:case 37:case 33:break;default:if(!((t+-58&65535)<6|(t+-40&65535)<7&t<<16>>16!=41)){switch(t<<16>>16){case 91:case 94:break e;default:}return t<<16>>16!=125&(t+-123&65535)<4|0}}while(!1);return 1}f(_t,"U");function Ue(t){t=t|0;var a=0;a=d[t>>1]|0;e:do if((a+-9&65535)>=5){switch(a<<16>>16){case 160:case 32:{a=1;break e}default:}if(se(a)|0)return a<<16>>16!=46|(me(t)|0)|0;a=0}else a=1;while(!1);return a|0}f(Ue,"x");function Lt(t){t=t|0;var a=0,l=0,h=0,m=0;return l=E,E=E+16|0,h=l,r[h>>2]=0,r[66]=t,a=r[3]|0,m=a+(t<<1)|0,t=m+2|0,d[m>>1]=0,r[h>>2]=t,r[67]=t,r[59]=0,r[63]=0,r[61]=0,r[60]=0,r[65]=0,r[62]=0,E=l,a|0}f(Lt,"S");function P(t,a,l,h){t=t|0,a=a|0,l=l|0,h=h|0;var m=0,w=0;m=r[67]|0,r[67]=m+20,w=r[65]|0,r[(w|0?w+16|0:240)>>2]=m,r[65]=m,r[m>>2]=t,r[m+4>>2]=a,r[m+8>>2]=l,r[m+12>>2]=h,r[m+16>>2]=0,b[803]=1}f(P,"O");function L(t,a,l){t=t|0,a=a|0,l=l|0;var h=0,m=0;return h=t+(0-l<<1)|0,m=h+2|0,t=r[3]|0,m>>>0>=t>>>0&&!(A(m,a,l<<1)|0)?(m|0)==(t|0)?t=1:t=Ue(h)|0:t=0,t|0}f(L,"$");function It(t){switch(t=t|0,d[t>>1]|0){case 107:{t=L(t+-2|0,150,4)|0;break}case 101:{(d[t+-2>>1]|0)==117?t=L(t+-4|0,122,6)|0:t=0;break}default:t=0}return t|0}f(It,"j");function X(t,a){t=t|0,a=a|0;var l=0;return l=r[3]|0,l>>>0<=t>>>0&&(d[t>>1]|0)==a<<16>>16?(l|0)==(t|0)?l=1:l=be(d[t+-2>>1]|0)|0:l=0,l|0}f(X,"B");function be(t){t=t|0;e:do if((t+-9&65535)<5)t=1;else{switch(t<<16>>16){case 32:case 160:{t=1;break e}default:}t=t<<16>>16!=46&(se(t)|0)}while(!1);return t|0}f(be,"E");function pe(){var t=0,a=0,l=0;t=r[73]|0,l=r[72]|0;e:for(;a=l+2|0,!(l>>>0>=t>>>0);)switch(d[a>>1]|0){case 13:case 10:break e;default:l=a}r[72]=a}f(pe,"P");function j(t){for(t=t|0;!(W(t)|0||se(t)|0);)if(t=(r[72]|0)+2|0,r[72]=t,t=d[t>>1]|0,!(t<<16>>16)){t=0;break}return t|0}f(j,"q");function Ot(){var t=0;switch(t=r[(r[61]|0)+20>>2]|0,t|0){case 1:{t=-1;break}case 2:{t=-2;break}default:t=t-(r[3]|0)>>1}return t|0}f(Ot,"z");function At(t){return t=t|0,!(L(t,196,5)|0)&&!(L(t,44,3)|0)?t=L(t,206,2)|0:t=1,t|0}f(At,"D");function oe(t){switch(t=t|0,t<<16>>16){case 160:case 32:case 12:case 11:case 9:{t=1;break}default:t=0}return t|0}f(oe,"F");function me(t){return t=t|0,(d[t>>1]|0)==46&&(d[t+-2>>1]|0)==46?t=(d[t+-4>>1]|0)==46:t=0,t|0}f(me,"G");function K(t){return t=t|0,(r[3]|0)==(t|0)?t=1:t=Ue(t+-2|0)|0,t|0}f(K,"H");function Rt(){var t=0;return t=r[(r[62]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(Rt,"J");function Nt(){var t=0;return t=r[(r[61]|0)+12>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(Nt,"K");function Mt(){var t=0;return t=r[(r[62]|0)+8>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(Mt,"L");function Dt(){var t=0;return t=r[(r[61]|0)+16>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f(Dt,"M");function $t(){var t=0;return t=r[(r[61]|0)+4>>2]|0,t?t=t-(r[3]|0)>>1:t=-1,t|0}f($t,"N");function jt(){var t=0;return t=r[61]|0,t=r[(t|0?t+32|0:236)>>2]|0,r[61]=t,(t|0)!=0|0}f(jt,"Q");function Ut(){var t=0;return t=r[62]|0,t=r[(t|0?t+16|0:240)>>2]|0,r[62]=t,(t|0)!=0|0}f(Ut,"R");function M(){b[802]=1,r[68]=(r[72]|0)-(r[3]|0)>>1,r[72]=(r[73]|0)+2}f(M,"T");function W(t){return t=t|0,(t|128)<<16>>16==160|(t+-9&65535)<5|0}f(W,"V");function Y(t){return t=t|0,t<<16>>16==39|t<<16>>16==34|0}f(Y,"W");function Tt(){return(r[(r[61]|0)+8>>2]|0)-(r[3]|0)>>1|0}f(Tt,"X");function Ft(){return(r[(r[62]|0)+4>>2]|0)-(r[3]|0)>>1|0}f(Ft,"Y");function Te(t){return t=t|0,t<<16>>16==13|t<<16>>16==10|0}f(Te,"Z");function Bt(){return(r[r[61]>>2]|0)-(r[3]|0)>>1|0}f(Bt,"_");function Pt(){return(r[r[62]>>2]|0)-(r[3]|0)>>1|0}f(Pt,"ee");function Wt(){return O[(r[61]|0)+24>>0]|0|0}f(Wt,"ae");function qt(t){t=t|0,r[3]=t}f(qt,"re");function Jt(){return r[(r[61]|0)+28>>2]|0}f(Jt,"ie");function Gt(){return(b[803]|0)!=0|0}f(Gt,"se");function zt(){return(b[804]|0)!=0|0}f(zt,"fe");function Ht(){return r[68]|0}f(Ht,"te");function Xt(t){return t=t|0,E=t+992+15&-16,992}return f(Xt,"ce"),{su:Xt,ai:Dt,e:Ht,ee:Ft,ele:Rt,els:Mt,es:Pt,f:zt,id:Ot,ie:$t,ip:Wt,is:Bt,it:Jt,ms:Gt,p:R,re:Ut,ri:jt,sa:Lt,se:Nt,ses:qt,ss:Tt}}(typeof self<"u"?self:global,{},ae),ve=x.su(V-(2<<17))}const i=_.length+1;x.ses(ve),x.sa(i-1),ze(_,new Uint16Array(ae,ve,i)),x.p()||(C=x.e(),U());const o=[],c=[];for(;x.ri();){const u=x.is(),p=x.ie(),g=x.ai(),b=x.id(),d=x.ss(),r=x.se(),O=x.it();let I;x.ip()&&(I=xe(b===-1?u:u+1,_.charCodeAt(b===-1?u-1:u))),o.push({t:O,n:I,s:u,e:p,ss:d,se:r,d:b,a:g})}for(;x.re();){const u=x.es(),p=x.ee(),g=x.els(),b=x.ele(),d=_.charCodeAt(u),r=g>=0?_.charCodeAt(g):-1;c.push({s:u,e:p,ls:g,le:b,n:d===34||d===39?xe(u+1,d):_.slice(u,p),ln:g<0?void 0:r===34||r===39?xe(g+1,r):_.slice(g,b)})}return[o,c,!!x.f(),!!x.ms()]}f(bn,"parse");function xe(s,e){C=s;let n="",i=C;for(;;){C>=_.length&&U();const o=_.charCodeAt(C);if(o===e)break;o===92?(n+=_.slice(i,C),n+=pn(),i=C):(o===8232||o===8233||Xe(o)&&U(),++C)}return n+=_.slice(i,C++),n}f(xe,"b");function pn(){let s=_.charCodeAt(++C);switch(++C,s){case 110:return`
11
- `;case 114:return"\r";case 120:return String.fromCharCode(Ee(2));case 117:return function(){const e=_.charCodeAt(C);let n;return e===123?(++C,n=Ee(_.indexOf("}",C)-C),++C,n>1114111&&U()):n=Ee(4),n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:_.charCodeAt(C)===10&&++C;case 10:return"";case 56:case 57:U();default:if(s>=48&&s<=55){let e=_.substr(C-1,3).match(/^[0-7]+/)[0],n=parseInt(e,8);return n>255&&(e=e.slice(0,-1),n=parseInt(e,8)),C+=e.length-1,s=_.charCodeAt(C),e==="0"&&s!==56&&s!==57||U(),String.fromCharCode(n)}return Xe(s)?"":String.fromCharCode(s)}}f(pn,"k");function Ee(s){const e=C;let n=0,i=0;for(let o=0;o<s;++o,++C){let c,u=_.charCodeAt(C);if(u!==95){if(u>=97)c=u-97+10;else if(u>=65)c=u-65+10;else{if(!(u>=48&&u<=57))break;c=u-48}if(c>=16)break;i=u,n=16*n+c}else i!==95&&o!==0||U(),i=u}return i!==95&&C-e===s||U(),n}f(Ee,"l");function Xe(s){return s===13||s===10}f(Xe,"u");function U(){throw Object.assign(Error(`Parse error ${He}:${_.slice(0,C).split(`
12
- `).length}:${C-_.lastIndexOf(`
13
- `,C-1)}`),{idx:C})}f(U,"o");let _e;typeof WebAssembly<"u"&&(async()=>{const{parse:s,init:e}=await Promise.resolve().then(function(){return require("./lexer-DgIbo0BU.cjs")});await e,_e=s})();const Le=f((s,e)=>_e?_e(s,e):bn(s,e),"parseEsm"),mn=f(s=>{if(!s.includes("import")&&!s.includes("export"))return!1;try{return Le(s)[3]}catch{return!0}},"isESM"),Ie="2",wn=(s=>{const e="default";return s[e]&&typeof s[e]=="object"&&"__esModule"in s[e]?s[e]:s}).toString(),kn=`.then(${wn})`,ce=f((s,e,n)=>{if(n){if(!e.includes("import("))return}else if(!e.includes("import"))return;const o=Le(e,s)[0].filter(g=>g.d>-1);if(o.length===0)return;const c=new De(e);for(const g of o)c.appendRight(g.se,kn);const u=c.toString(),p=c.generateMap({source:s,includeContent:!1,hires:"boundary"});return{code:u,map:p}},"transformDynamicImport"),Ke=f(s=>{try{const e=$.readFileSync(s,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),ee=f(()=>{},"noop"),Ye=f(()=>Math.floor(Date.now()/1e8),"getTime"),Cn=/^(\d+)-([^-]+)$/;class yn extends Map{static{f(this,"FileCache")}cacheDirectory;oldCacheDirectory;diskCacheIndex;diskCacheEntries;constructor(e=Zt.tmpdir,n=q.join(Qt.tmpdir(),"tsx")){super(),this.cacheDirectory=e,this.oldCacheDirectory=n}getDiskCacheIndex(){if(this.diskCacheIndex)return this.diskCacheIndex;$.mkdirSync(this.cacheDirectory,{recursive:!0});const e=new Map,n=[];for(const i of $.readdirSync(this.cacheDirectory)){const o=Cn.exec(i);if(!o)continue;const c=Number(o[1]);if(!Number.isSafeInteger(c))continue;const u=o[2],p={time:c,key:u,fileName:i};n.push(p);const g=e.get(u);(!g||g.time<c)&&e.set(u,p)}return this.diskCacheIndex=e,this.diskCacheEntries=n,setImmediate(()=>{this.expireDiskCache().catch(ee),this.removeOldCacheDirectory().catch(ee)}),e}removeDiskCacheEntry(e){const n=this.diskCacheEntries.indexOf(e);if(n!==-1&&this.diskCacheEntries.splice(n,1),this.diskCacheIndex.get(e.key)===e){let i;for(const o of this.diskCacheEntries)o.key===e.key&&(!i||o.time>i.time)&&(i=o);i?this.diskCacheIndex.set(e.key,i):this.diskCacheIndex.delete(e.key)}}get(e){const n=super.get(e);if(n)return n;const i=this.getDiskCacheIndex();let o=i.get(e);for(;o;){const c=q.join(this.cacheDirectory,o.fileName),u=Ke(c);if(u)return super.set(e,u),u;this.removeDiskCacheEntry(o),$.promises.unlink(c).catch(ee),o=i.get(e)}}set(e,n){if(super.set(e,n),n){const i=Ye(),o=`${i}-${e}`,c=this.getDiskCacheIndex(),u={time:i,key:e,fileName:o};$.promises.writeFile(q.join(this.cacheDirectory,o),JSON.stringify(n)).then(()=>{const p=c.get(e);p?.fileName===o&&this.removeDiskCacheEntry(p),c.set(e,u),this.diskCacheEntries.push(u)},ee)}return this}async expireDiskCache(){this.getDiskCacheIndex();const e=Ye(),n=[];for(const i of this.diskCacheEntries)e-i.time>7&&n.push($.promises.unlink(q.join(this.cacheDirectory,i.fileName)).then(()=>this.removeDiskCacheEntry(i),ee));await Promise.all(n)}async removeOldCacheDirectory(){try{await $.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in $.promises?await $.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await $.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var z=process.env.TSX_DISABLE_CACHE?new Map:new yn;const Qe=44,Sn=59,Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ve=new Uint8Array(64),et=new Uint8Array(128);for(let s=0;s<Ze.length;s++){const e=Ze.charCodeAt(s);Ve[s]=e,et[e]=s}const Oe=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(s){return Buffer.from(s.buffer,s.byteOffset,s.byteLength).toString()}}:{decode(s){let e="";for(let n=0;n<s.length;n++)e+=String.fromCharCode(s[n]);return e}};function vn(s){const e=new Int32Array(5),n=[];let i=0;do{const o=xn(s,i),c=[];let u=!0,p=0;e[0]=0;for(let g=i;g<o;g++){let b;g=te(s,g,e,0);const d=e[0];d<p&&(u=!1),p=d,tt(s,g,o)?(g=te(s,g,e,1),g=te(s,g,e,2),g=te(s,g,e,3),tt(s,g,o)?(g=te(s,g,e,4),b=[d,e[1],e[2],e[3],e[4]]):b=[d,e[1],e[2],e[3]]):b=[d],c.push(b)}u||En(c),n.push(c),i=o+1}while(i<=s.length);return n}f(vn,"decode");function xn(s,e){const n=s.indexOf(";",e);return n===-1?s.length:n}f(xn,"indexOf");function te(s,e,n,i){let o=0,c=0,u=0;do{const g=s.charCodeAt(e++);u=et[g],o|=(u&31)<<c,c+=5}while(u&32);const p=o&1;return o>>>=1,p&&(o=-2147483648|-o),n[i]+=o,e}f(te,"decodeInteger");function tt(s,e,n){return e>=n?!1:s.charCodeAt(e)!==Qe}f(tt,"hasMoreVlq");function En(s){s.sort(_n)}f(En,"sort");function _n(s,e){return s[0]-e[0]}f(_n,"sortComparator$1");function Ln(s){const e=new Int32Array(5),n=1024*16,i=n-36,o=new Uint8Array(n),c=o.subarray(0,i);let u=0,p="";for(let g=0;g<s.length;g++){const b=s[g];if(g>0&&(u===n&&(p+=Oe.decode(o),u=0),o[u++]=Sn),b.length!==0){e[0]=0;for(let d=0;d<b.length;d++){const r=b[d];u>i&&(p+=Oe.decode(c),o.copyWithin(0,i,u),u-=i),d>0&&(o[u++]=Qe),u=ne(o,u,e,r,0),r.length!==1&&(u=ne(o,u,e,r,1),u=ne(o,u,e,r,2),u=ne(o,u,e,r,3),r.length!==4&&(u=ne(o,u,e,r,4)))}}}return p+Oe.decode(o.subarray(0,u))}f(Ln,"encode");function ne(s,e,n,i,o){const c=i[o];let u=c-n[o];n[o]=c,u=u<0?-u<<1|1:u<<1;do{let p=u&31;u>>>=5,u>0&&(p|=32),s[e++]=Ve[p]}while(u>0);return e}f(ne,"encodeInteger");const In=/^[\w+.-]+:\/\//,On=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,An=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function Rn(s){return In.test(s)}f(Rn,"isAbsoluteUrl");function Nn(s){return s.startsWith("//")}f(Nn,"isSchemeRelativeUrl");function nt(s){return s.startsWith("/")}f(nt,"isAbsolutePath");function Mn(s){return s.startsWith("file:")}f(Mn,"isFileUrl");function rt(s){return/^[.?#]/.test(s)}f(rt,"isRelative");function ue(s){const e=On.exec(s);return it(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}f(ue,"parseAbsoluteUrl");function Dn(s){const e=An.exec(s),n=e[2];return it("file:","",e[1]||"","",nt(n)?n:"/"+n,e[3]||"",e[4]||"")}f(Dn,"parseFileUrl");function it(s,e,n,i,o,c,u){return{scheme:s,user:e,host:n,port:i,path:o,query:c,hash:u,type:7}}f(it,"makeUrl");function st(s){if(Nn(s)){const n=ue("http:"+s);return n.scheme="",n.type=6,n}if(nt(s)){const n=ue("http://foo.com"+s);return n.scheme="",n.host="",n.type=5,n}if(Mn(s))return Dn(s);if(Rn(s))return ue(s);const e=ue("http://foo.com/"+s);return e.scheme="",e.host="",e.type=s?s.startsWith("?")?3:s.startsWith("#")?2:4:1,e}f(st,"parseUrl");function $n(s){if(s.endsWith("/.."))return s;const e=s.lastIndexOf("/");return s.slice(0,e+1)}f($n,"stripPathFilename");function jn(s,e){ot(e,e.type),s.path==="/"?s.path=e.path:s.path=$n(e.path)+s.path}f(jn,"mergePaths");function ot(s,e){const n=e<=4,i=s.path.split("/");let o=1,c=0,u=!1;for(let g=1;g<i.length;g++){const b=i[g];if(!b){u=!0;continue}if(u=!1,b!=="."){if(b===".."){c?(u=!0,c--,o--):n&&(i[o++]=b);continue}i[o++]=b,c++}}let p="";for(let g=1;g<o;g++)p+="/"+i[g];(!p||u&&!p.endsWith("/.."))&&(p+="/"),s.path=p}f(ot,"normalizePath");function Un(s,e){if(!s&&!e)return"";const n=st(s);let i=n.type;if(e&&i!==7){const c=st(e),u=c.type;switch(i){case 1:n.hash=c.hash;case 2:n.query=c.query;case 3:case 4:jn(n,c);case 5:n.user=c.user,n.host=c.host,n.port=c.port;case 6:n.scheme=c.scheme}u>i&&(i=u)}ot(n,i);const o=n.query+n.hash;switch(i){case 2:case 3:return o;case 4:{const c=n.path.slice(1);return c?rt(e||s)&&!rt(c)?"./"+c+o:c+o:o||"."}case 5:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}f(Un,"resolve$1");function at(s,e){return e&&!e.endsWith("/")&&(e+="/"),Un(s,e)}f(at,"resolve");function Tn(s){if(!s)return"";const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(Tn,"stripFilename");const F=0;function Fn(s,e){const n=ct(s,0);if(n===s.length)return s;e||(s=s.slice());for(let i=n;i<s.length;i=ct(s,i+1))s[i]=Pn(s[i],e);return s}f(Fn,"maybeSort");function ct(s,e){for(let n=e;n<s.length;n++)if(!Bn(s[n]))return n;return s.length}f(ct,"nextUnsortedSegmentLine");function Bn(s){for(let e=1;e<s.length;e++)if(s[e][F]<s[e-1][F])return!1;return!0}f(Bn,"isSorted");function Pn(s,e){return e||(s=s.slice()),s.sort(Wn)}f(Pn,"sortSegments");function Wn(s,e){return s[F]-e[F]}f(Wn,"sortComparator");let he=!1;function qn(s,e,n,i){for(;n<=i;){const o=n+(i-n>>1),c=s[o][F]-e;if(c===0)return he=!0,o;c<0?n=o+1:i=o-1}return he=!1,n-1}f(qn,"binarySearch");function Jn(s,e,n){for(let i=n-1;i>=0&&s[i][F]===e;n=i--);return n}f(Jn,"lowerBound");function Gn(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}f(Gn,"memoizedState");function zn(s,e,n,i){const{lastKey:o,lastNeedle:c,lastIndex:u}=n;let p=0,g=s.length-1;if(i===o){if(e===c)return he=u!==-1&&s[u][F]===e,u;e>=c?p=u===-1?0:u:g=u}return n.lastKey=i,n.lastNeedle=e,n.lastIndex=qn(s,e,p,g)}f(zn,"memoizedBinarySearch");class ut{static{f(this,"TraceMap")}constructor(e,n){const i=typeof e=="string";if(!i&&e._decodedMemo)return e;const o=i?JSON.parse(e):e,{version:c,file:u,names:p,sourceRoot:g,sources:b,sourcesContent:d}=o;this.version=c,this.file=u,this.names=p||[],this.sourceRoot=g,this.sources=b,this.sourcesContent=d,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;const r=at(g||"",Tn(n));this.resolvedSources=b.map(I=>at(I||"",r));const{mappings:O}=o;typeof O=="string"?(this._encoded=O,this._decoded=void 0):(this._encoded=void 0,this._decoded=Fn(O,i)),this._decodedMemo=Gn(),this._bySources=void 0,this._bySourceMemos=void 0}}function Ir(s){return s}f(Ir,"cast$2");function ht(s){var e;return(e=s)._decoded||(e._decoded=vn(s._encoded))}f(ht,"decodedMappings");function Hn(s,e,n){const i=ht(s);if(e>=i.length)return null;const o=i[e],c=Xn(o,s._decodedMemo,e,n);return c===-1?null:o[c]}f(Hn,"traceSegment");function Xn(s,e,n,i,o){let c=zn(s,i,e,n);return he&&(c=Jn(s,i,c)),c===-1||c===s.length?-1:c}f(Xn,"traceSegmentInternal");class Ae{static{f(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}}function Or(s){return s}f(Or,"cast$1");function lt(s,e){return s._indexes[e]}f(lt,"get");function re(s,e){const n=lt(s,e);if(n!==void 0)return n;const{array:i,_indexes:o}=s,c=i.push(e);return o[e]=c-1}f(re,"put");function Kn(s,e){const n=lt(s,e);if(n===void 0)return;const{array:i,_indexes:o}=s;for(let c=n+1;c<i.length;c++){const u=i[c];i[c-1]=u,o[u]--}o[e]=void 0,i.pop()}f(Kn,"remove");const Yn=0,Qn=1,Zn=2,Vn=3,er=4,ft=-1;class tr{static{f(this,"GenMapping")}constructor({file:e,sourceRoot:n}={}){this._names=new Ae,this._sources=new Ae,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=n,this._ignoreList=new Ae}}function Ar(s){return s}f(Ar,"cast");const nr=f((s,e,n,i,o,c,u,p)=>or(!0,s,e,n,i,o,c,u),"maybeAddSegment");function rr(s,e,n){const{_sources:i,_sourcesContent:o}=s,c=re(i,e);o[c]=n}f(rr,"setSourceContent");function ir(s,e,n=!0){const{_sources:i,_sourcesContent:o,_ignoreList:c}=s,u=re(i,e);u===o.length&&(o[u]=null),n?re(c,u):Kn(c,u)}f(ir,"setIgnore");function dt(s){const{_mappings:e,_sources:n,_sourcesContent:i,_names:o,_ignoreList:c}=s;return ur(e),{version:3,file:s.file||void 0,names:o.array,sourceRoot:s.sourceRoot||void 0,sources:n.array,sourcesContent:i,mappings:e,ignoreList:c.array}}f(dt,"toDecodedMap");function sr(s){const e=dt(s);return Object.assign(Object.assign({},e),{mappings:Ln(e.mappings)})}f(sr,"toEncodedMap");function or(s,e,n,i,o,c,u,p,g){const{_mappings:b,_sources:d,_sourcesContent:r,_names:O}=e,I=ar(b,n),E=cr(I,i);if(!o)return hr(I,E)?void 0:gt(I,E,[i]);const R=re(d,o),D=p?re(O,p):ft;if(R===r.length&&(r[R]=null),!lr(I,E,R,c,u,D))return gt(I,E,p?[i,R,c,u,D]:[i,R,c,u])}f(or,"addSegmentInternal");function ar(s,e){for(let n=s.length;n<=e;n++)s[n]=[];return s[e]}f(ar,"getLine");function cr(s,e){let n=s.length;for(let i=n-1;i>=0;n=i--){const o=s[i];if(e>=o[Yn])break}return n}f(cr,"getColumnIndex");function gt(s,e,n){for(let i=s.length;i>e;i--)s[i]=s[i-1];s[e]=n}f(gt,"insert");function ur(s){const{length:e}=s;let n=e;for(let i=n-1;i>=0&&!(s[i].length>0);n=i,i--);n<e&&(s.length=n)}f(ur,"removeEmptyFinalLines");function hr(s,e){return e===0?!0:s[e-1].length===1}f(hr,"skipSourceless");function lr(s,e,n,i,o,c){if(e===0)return!1;const u=s[e-1];return u.length===1?!1:n===u[Qn]&&i===u[Zn]&&o===u[Vn]&&c===(u.length===5?u[er]:ft)}f(lr,"skipSource");const bt=pt("",-1,-1,"",null,!1),fr=[];function pt(s,e,n,i,o,c){return{source:s,line:e,column:n,name:i,content:o,ignore:c}}f(pt,"SegmentObject");function mt(s,e,n,i,o){return{map:s,sources:e,source:n,content:i,ignore:o}}f(mt,"Source");function wt(s,e){return mt(s,e,"",null,!1)}f(wt,"MapSource");function dr(s,e,n){return mt(null,fr,s,e,n)}f(dr,"OriginalSource");function gr(s){const e=new tr({file:s.map.file}),{sources:n,map:i}=s,o=i.names,c=ht(i);for(let u=0;u<c.length;u++){const p=c[u];for(let g=0;g<p.length;g++){const b=p[g],d=b[0];let r=bt;if(b.length!==1){const H=n[b[1]];if(r=kt(H,b[2],b[3],b.length===5?o[b[4]]:""),r==null)continue}const{column:O,line:I,name:E,content:R,source:D,ignore:B}=r;nr(e,u,d,D,I,O,E),D&&R!=null&&rr(e,D,R),B&&ir(e,D,!0)}}return e}f(gr,"traceMappings");function kt(s,e,n,i){if(!s.map)return pt(s.source,e,n,i,s.content,s.ignore);const o=Hn(s.map,e,n);return o==null?null:o.length===1?bt:kt(s.sources[o[1]],o[2],o[3],o.length===5?s.map.names[o[4]]:i)}f(kt,"originalPositionFor");function br(s){return Array.isArray(s)?s:[s]}f(br,"asArray");function pr(s,e){const n=br(s).map(c=>new ut(c,"")),i=n.pop();for(let c=0;c<n.length;c++)if(n[c].sources.length>1)throw new Error(`Transformation map ${c} must have exactly one source file.
14
- Did you specify these with the most recent transformation maps first?`);let o=Ct(i,e,"",0);for(let c=n.length-1;c>=0;c--)o=wt(n[c],[o]);return o}f(pr,"buildSourceMapTree");function Ct(s,e,n,i){const{resolvedSources:o,sourcesContent:c,ignoreList:u}=s,p=i+1,g=o.map((b,d)=>{const r={importer:n,depth:p,source:b||"",content:void 0,ignore:void 0},O=e(r.source,r),{source:I,content:E,ignore:R}=r;if(O)return Ct(new ut(O,I),e,I,p);const D=E!==void 0?E:c?c[d]:null,B=R!==void 0?R:u?u.includes(d):!1;return dr(I,D,B)});return wt(s,g)}f(Ct,"build");class mr{static{f(this,"SourceMap")}constructor(e,n){const i=n.decodedMappings?dt(e):sr(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,n.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function yt(s,e,n){const i={excludeContent:!!n,decodedMappings:!1},o=pr(s,e);return new mr(gr(o),i)}f(yt,"remapping");const St=f((s,e,n)=>{const i=[],o={code:e};for(const c of n){const u=c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:yt(i,()=>null)}},"applyTransformersSync"),wr=f(async(s,e,n)=>{const i=[],o={code:e};for(const c of n){const u=await c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:yt(i,()=>null)}},"applyTransformers"),kr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),Cr=/^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/,yr=process.execArgv.some(s=>Cr.test(s)),Re={...kr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||yr,minifyWhitespace:!0,keepNames:!0},Ne=f(s=>{const e=s.sourcefile;if(e){const n=q.extname(e.split("?")[0]);n?n===".cts"||n===".mts"?s.sourcefile=`${e.slice(0,-3)}ts`:n===".mjs"&&(s.sourcefile=`${e.slice(0,-3)}js`):s.sourcefile+=".js"}return n=>(n.map&&(s.sourcefile!==e&&(n.map=n.map.replace(JSON.stringify(s.sourcefile),JSON.stringify(e))),n.map=JSON.parse(n.map)),n)},"patchOptions"),Me=f(s=>{throw s.name="TransformError",delete s.errors,delete s.warnings,s},"formatEsbuildError"),Sr=f((s,e)=>({...Be.isFeatureSupported(Be.importMetaPathProperties)?{dirname:q.dirname(s),filename:s}:{},url:e}),"getImportMeta"),vr=f((s,e,n)=>{let i,o,c;if(e.startsWith("file://")){i=e;const r=new URL(e);o=Fe.fileURLToPath(r)}else[o,c]=e.split("?"),i=Fe.pathToFileURL(o)+(c?`?${c}`:"");const{cjsBanner:u,...p}=n??{},g={...Re,format:"cjs",sourcefile:o,banner:`__filename=${JSON.stringify(o)};(()=>{${u??""}`,footer:"})()",platform:"node",...p};s.includes("import.meta")&&g.format==="cjs"&&!o.endsWith(".cjs")&&!o.endsWith(".cts")&&(g.define={...g.define,"import.meta":JSON.stringify(Sr(o,i))});const b=Se([s,i,JSON.stringify(g),J.version,Ie].join("-"));let d=z.get(b);return d||(d=St(e,s,[(r,O)=>{const I=Ne(g);let E;try{E=J.transformSync(O,g)}catch(R){throw Me(R)}return I(E)},(r,O)=>ce(r,O,!0)]),z.set(b,d)),d},"transformSync"),xr=f(async(s,e,n)=>{const i={...Re,format:"esm",sourcefile:e,...n},o=Se([s,JSON.stringify(i),J.version,Ie].join("-"));let c=z.get(o);return c||(c=await wr(e,s,[async(u,p)=>{const g=Ne(i);let b;try{b=await J.transform(p,i)}catch(d){throw Me(d)}return g(b)},(u,p)=>ce(u,p,!0)]),z.set(o,c)),c},"transform"),Er=f((s,e,n)=>{const i={...Re,format:"esm",sourcefile:e,...n},o=Se([s,JSON.stringify(i),J.version,Ie].join("-"));let c=z.get(o);return c||(c=St(e,s,[(u,p)=>{const g=Ne(i);let b;try{b=J.transformSync(p,i)}catch(d){throw Me(d)}return g(b)},(u,p)=>ce(u,p,!0)]),z.set(o,c)),c},"transformEsmSync");exports.isESM=mn,exports.parseEsm=Le,exports.readJsonFile=Ke,exports.transform=xr,exports.transformDynamicImport=ce,exports.transformEsmSync=Er,exports.transformSync=vr;