@strutvane/redis 0.0.0-stage → 0.2.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +146 -2
- package/dist/driver-DEW-Sggt.mjs +93 -0
- package/dist/driver-DEW-Sggt.mjs.map +1 -0
- package/dist/index.d.mts +628 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +47 -0
- package/dist/index.mjs.map +1 -0
- package/dist/installer.d.mts +72 -0
- package/dist/installer.d.mts.map +1 -0
- package/dist/installer.mjs +228 -0
- package/dist/installer.mjs.map +1 -0
- package/dist/keys-BeX5p2wm.d.mts +169 -0
- package/dist/keys-BeX5p2wm.d.mts.map +1 -0
- package/dist/provider.d.mts +63 -0
- package/dist/provider.d.mts.map +1 -0
- package/dist/provider.mjs +176 -0
- package/dist/provider.mjs.map +1 -0
- package/dist/queue.d.mts +102 -0
- package/dist/queue.d.mts.map +1 -0
- package/dist/queue.mjs +181 -0
- package/dist/queue.mjs.map +1 -0
- package/dist/tokens-CnThleYU.mjs +1626 -0
- package/dist/tokens-CnThleYU.mjs.map +1 -0
- package/package.json +105 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 The Strutvane Authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,147 @@
|
|
|
1
|
-
#
|
|
1
|
+
# strutvane-redis
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Status: `0.2.0-next.0`, not on npm yet.** Built and tested against the published
|
|
4
|
+
> `@strutvane/framework` `0.2.0-next.1`. The queue driver is
|
|
5
|
+
> **experimental** until framework queues land (0.3).
|
|
6
|
+
|
|
7
|
+
**`@strutvane/redis`**: Redis and Valkey for [Strutvane](https://github.com/vishwajit-vm/strutvane)
|
|
8
|
+
apps: a cache store, atomic locks, a session store, rate limiting, an idempotency store, and a
|
|
9
|
+
queue-driver interface ready for framework queues. Every key lives under the app's prefix, and can
|
|
10
|
+
be scoped to a tenant.
|
|
11
|
+
|
|
12
|
+
| | |
|
|
13
|
+
|---|---|
|
|
14
|
+
| Package | `@strutvane/redis` |
|
|
15
|
+
| Needs | Node 24.3+, npm 11.19+, `@strutvane/framework` `^0.2.0-next.0` (peer), Redis 6.2+ or Valkey 7.2+ |
|
|
16
|
+
| Client | [`@redis/client`](https://www.npmjs.com/package/@redis/client) (MIT, official, no runtime dependencies) |
|
|
17
|
+
| License | MIT |
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
node strut install:redis # today: node strut add redis
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The installer (idempotent; `node strut remove redis` reverses it):
|
|
26
|
+
|
|
27
|
+
- writes `config/redis.ts` (non-secret settings, read from `.env`) and registers it in `config/index.ts`;
|
|
28
|
+
- adds the `REDIS_*` keys to `.env` and `.env.example` (secrets empty, existing values never overwritten);
|
|
29
|
+
- adds `RedisServiceProvider` to `bootstrap/providers.ts`;
|
|
30
|
+
- allows `SESSION_DRIVER=redis` in `config/session.ts`.
|
|
31
|
+
|
|
32
|
+
It does **not** switch your app to Redis. Choose it in `.env` when the server is ready:
|
|
33
|
+
|
|
34
|
+
```dotenv
|
|
35
|
+
CACHE_STORE=redis
|
|
36
|
+
SESSION_DRIVER=redis
|
|
37
|
+
REDIS_URL=rediss://app:secret@cache.example.com:6380/0 # or REDIS_HOST/PORT/USERNAME/PASSWORD/DB
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
A file the installer doesn't recognise (you changed its shape) is left alone, and the step is printed
|
|
41
|
+
for you to do by hand.
|
|
42
|
+
|
|
43
|
+
## Configuration
|
|
44
|
+
|
|
45
|
+
| Variable | Default | Notes |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `REDIS_URL` | | `redis://` or `rediss://` (TLS). Wins over the keys below. Holds the password: `.env` only. |
|
|
48
|
+
| `REDIS_HOST` / `REDIS_PORT` | `127.0.0.1` / `6379` | |
|
|
49
|
+
| `REDIS_USERNAME` / `REDIS_PASSWORD` | | ACL user (Redis 6+) and password. |
|
|
50
|
+
| `REDIS_DB` | `0` | |
|
|
51
|
+
| `REDIS_TLS` | `false` | `true` for TLS. A `rediss://` URL can't be downgraded with `REDIS_TLS=false` (boot fails). |
|
|
52
|
+
| `REDIS_TLS_CA` / `REDIS_TLS_SERVERNAME` | | A PEM CA file for a private CA; the name the certificate must carry. |
|
|
53
|
+
| `REDIS_PREFIX` | app name as a slug + `:` | One prefix per app (and per environment) when apps share a server. |
|
|
54
|
+
| `REDIS_CONNECT_TIMEOUT` / `REDIS_COMMAND_TIMEOUT` | `5000` ms | |
|
|
55
|
+
|
|
56
|
+
`config/redis.ts` (or Laravel's spot, `config/database.ts` → `redis`) may set the non-secret keys;
|
|
57
|
+
`password` and `url` are refused there, because the config tree is cached and easy to dump. TLS
|
|
58
|
+
always verifies the server certificate; there is no switch to turn that off. A bad value stops boot
|
|
59
|
+
with `invalid_redis_config`.
|
|
60
|
+
|
|
61
|
+
## Use
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { Cache } from '@strutvane/framework/facades'
|
|
65
|
+
import { RedisLocksToken, RedisRateLimiterToken } from '@strutvane/redis'
|
|
66
|
+
|
|
67
|
+
// Cache (CACHE_STORE=redis, or by name)
|
|
68
|
+
await Cache.store('redis').put('stats', { posts: 3 }, 60)
|
|
69
|
+
|
|
70
|
+
// Laravel's extras live on the store itself
|
|
71
|
+
const store = app.make(CacheManagerToken).store('redis') as RedisCacheStore
|
|
72
|
+
await store.flexible('dashboard', [5, 60], () => buildDashboard()) // stale-while-revalidate
|
|
73
|
+
await store.forTenant(tenant.id).remember('report', 300, () => buildReport(tenant))
|
|
74
|
+
|
|
75
|
+
// Atomic locks: owner tokens, safe release, expiry if the holder crashes
|
|
76
|
+
await app.make(RedisLocksToken).create('reports:build', 120).block(10, () => buildReports())
|
|
77
|
+
|
|
78
|
+
// Rate limits in your own code (fixed or sliding window)
|
|
79
|
+
const limit = await app.make(RedisRateLimiterToken).hit(`export:${user.id}`, {
|
|
80
|
+
max: 5,
|
|
81
|
+
windowSeconds: 3600,
|
|
82
|
+
algorithm: 'sliding',
|
|
83
|
+
})
|
|
84
|
+
if (!limit.allowed) throw new RateLimitedError({ retryAfter: limit.retryAfterSeconds })
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### What the provider binds
|
|
88
|
+
|
|
89
|
+
| Token | What | When |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| `RedisConnectionToken` | the shared, lazily opened connection (`health()` for readiness probes) | always |
|
|
92
|
+
| `RedisKeySpaceToken`, `RedisLocksToken`, `RedisRateLimiterToken` | key prefixes, locks, limiter | always |
|
|
93
|
+
| `CacheManagerToken` | the framework's stores plus `redis` and any `driver: 'redis'` store | always (a superset of the framework's) |
|
|
94
|
+
| `SessionStoreToken` | `RedisSessionStore` | `SESSION_DRIVER=redis` |
|
|
95
|
+
| `IdempotencyStoreToken` | `RedisIdempotencyStore` | the default cache store is a Redis store |
|
|
96
|
+
|
|
97
|
+
With `CACHE_STORE=redis`, the framework's `throttle` middleware counts in Redis, so `throttle:api`
|
|
98
|
+
holds across every server.
|
|
99
|
+
|
|
100
|
+
### Keys and tenants
|
|
101
|
+
|
|
102
|
+
Every key is `<prefix><area>:<key>`; a tenant scope adds `t:<tenant>:`. Tenant ids may only contain
|
|
103
|
+
letters, digits, `_` and `-` (anything else is refused, so a tenant can't reach into another's
|
|
104
|
+
namespace), global keys can't start with `t:`, and flushes match the prefix literally (`SCAN` +
|
|
105
|
+
`UNLINK`, never `FLUSHDB`). Session ids and idempotency keys are stored as SHA-256 hashes.
|
|
106
|
+
|
|
107
|
+
### Failure behaviour
|
|
108
|
+
|
|
109
|
+
- Redis down: commands fail fast with the 503 `redis_unavailable` problem (no in-memory pile-up);
|
|
110
|
+
after a failed connect, new attempts wait a second (circuit breaker); the log says why, never the
|
|
111
|
+
password.
|
|
112
|
+
- A wrong password or a missing ACL permission: also `redis_unavailable` (fail closed), logged as
|
|
113
|
+
`redis.access_denied`.
|
|
114
|
+
- `lock.block()` running out of time: 503 `lock_timeout`.
|
|
115
|
+
- Shutdown closes the connection gracefully (pending replies awaited, bounded).
|
|
116
|
+
- In production, boot warns about plain text to a non-local host and about a missing password.
|
|
117
|
+
|
|
118
|
+
## Queue (experimental)
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
import { RedisQueueDriver } from '@strutvane/redis/queue'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`QueueDriver` (push, pop with a visibility timeout, ack, release with delay, size, clear) and a
|
|
125
|
+
Redis implementation laid out like Laravel's. Not wired into the app until the framework defines
|
|
126
|
+
queues; expect breaking changes.
|
|
127
|
+
|
|
128
|
+
## Not built yet
|
|
129
|
+
|
|
130
|
+
- Sentinel and cluster (node-redis supports both; they plug in behind the same driver seam).
|
|
131
|
+
- Cache tags (the framework's cache contract has none).
|
|
132
|
+
- Binding the used-signature store and the rate-limit store separately from the cache: the framework
|
|
133
|
+
doesn't export those tokens yet (see `NEXT.md`).
|
|
134
|
+
- Broadcasting (pub/sub) for realtime.
|
|
135
|
+
|
|
136
|
+
## Development
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm install
|
|
140
|
+
npm run ci # lint, typecheck, unit tests + coverage, build (no Redis needed)
|
|
141
|
+
npm run test:integration # real Redis in Docker: every suite, coverage over all files
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The integration suite starts one uniquely named container (`redis:8.2.10-alpine`; set
|
|
145
|
+
`REDIS_TEST_IMAGE=valkey/valkey:8-alpine` to try Valkey, or `REDIS_TEST_URL` to use your own server)
|
|
146
|
+
with ACL users and a TLS port, and removes it afterwards. Without Docker running Linux containers,
|
|
147
|
+
it skips with the reason printed.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
// src/driver.ts
|
|
3
|
+
/**
|
|
4
|
+
* The narrow seam between this package's stores and a Redis client: one command, one Lua script,
|
|
5
|
+
* a ping and a close. Every store (cache, locks, sessions, rate limits, queue) is written against
|
|
6
|
+
* {@link RedisDriver}, never against the client library, so:
|
|
7
|
+
*
|
|
8
|
+
* - the client can be swapped (node-redis today, see `connection.ts`) without touching the stores;
|
|
9
|
+
* - every multi-step operation is a Lua script, which Redis and Valkey run atomically: no other
|
|
10
|
+
* command interleaves, so "check then set" races can't happen;
|
|
11
|
+
* - replies are `unknown` and narrowed by the helpers below, so a surprising reply (a server bug,
|
|
12
|
+
* a proxy, a different engine) fails loudly instead of being mis-typed.
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Define a Lua script.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* const script = defineLua("return redis.call('GET', KEYS[1])")
|
|
21
|
+
*/
|
|
22
|
+
function defineLua(source) {
|
|
23
|
+
return Object.freeze({
|
|
24
|
+
source,
|
|
25
|
+
sha1: createHash("sha1").update(source).digest("hex")
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Narrow a reply to a string or `null` (bulk string or nil). Numbers become strings.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* asNullableString(await driver.command(['GET', key]))
|
|
33
|
+
*/
|
|
34
|
+
function asNullableString(reply) {
|
|
35
|
+
if (reply === null || reply === void 0) return null;
|
|
36
|
+
if (typeof reply === "string") return reply;
|
|
37
|
+
if (typeof reply === "number" || typeof reply === "bigint") return String(reply);
|
|
38
|
+
if (Buffer.isBuffer(reply)) return reply.toString("utf8");
|
|
39
|
+
throw unexpected("a string", reply);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Narrow a reply to a safe integer (integer reply, or a numeric string from Lua).
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* asInteger(await driver.command(['PTTL', key]))
|
|
46
|
+
*/
|
|
47
|
+
function asInteger(reply) {
|
|
48
|
+
const value = typeof reply === "bigint" ? Number(reply) : typeof reply === "string" ? Number(reply) : reply;
|
|
49
|
+
if (typeof value === "number" && Number.isSafeInteger(value)) return value;
|
|
50
|
+
throw unexpected("an integer", reply);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Narrow a reply to an array.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const [cursor, keys] = asArray(await driver.command(['SCAN', '0']))
|
|
57
|
+
*/
|
|
58
|
+
function asArray(reply) {
|
|
59
|
+
if (Array.isArray(reply)) return reply;
|
|
60
|
+
throw unexpected("an array", reply);
|
|
61
|
+
}
|
|
62
|
+
function unexpected(expected, reply) {
|
|
63
|
+
return /* @__PURE__ */ new TypeError(`Redis replied with ${reply === null ? "null" : Array.isArray(reply) ? "array" : typeof reply} where ${expected} was expected.`);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Delete every key matching a `SCAN` pattern, in batches (`UNLINK`, so large values are freed in
|
|
67
|
+
* the background). Never `FLUSHDB`: other apps may share the database. Returns how many keys were
|
|
68
|
+
* removed.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await deleteMatching(driver, space.pattern())
|
|
72
|
+
*/
|
|
73
|
+
async function deleteMatching(driver, pattern, batch = 500) {
|
|
74
|
+
let cursor = "0";
|
|
75
|
+
let removed = 0;
|
|
76
|
+
do {
|
|
77
|
+
const [next, keys] = asArray(await driver.command([
|
|
78
|
+
"SCAN",
|
|
79
|
+
cursor,
|
|
80
|
+
"MATCH",
|
|
81
|
+
pattern,
|
|
82
|
+
"COUNT",
|
|
83
|
+
String(batch)
|
|
84
|
+
]));
|
|
85
|
+
cursor = asNullableString(next) ?? "0";
|
|
86
|
+
const found = asArray(keys).map((key) => asNullableString(key) ?? "");
|
|
87
|
+
if (found.length > 0) removed += asInteger(await driver.command(["UNLINK", ...found]));
|
|
88
|
+
} while (cursor !== "0");
|
|
89
|
+
return removed;
|
|
90
|
+
}
|
|
91
|
+
export { deleteMatching as a, defineLua as i, asInteger as n, asNullableString as r, asArray as t };
|
|
92
|
+
|
|
93
|
+
//# sourceMappingURL=driver-DEW-Sggt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-DEW-Sggt.mjs","names":[],"sources":["../src/driver.ts"],"sourcesContent":["/**\n * The narrow seam between this package's stores and a Redis client: one command, one Lua script,\n * a ping and a close. Every store (cache, locks, sessions, rate limits, queue) is written against\n * {@link RedisDriver}, never against the client library, so:\n *\n * - the client can be swapped (node-redis today, see `connection.ts`) without touching the stores;\n * - every multi-step operation is a Lua script, which Redis and Valkey run atomically: no other\n * command interleaves, so \"check then set\" races can't happen;\n * - replies are `unknown` and narrowed by the helpers below, so a surprising reply (a server bug,\n * a proxy, a different engine) fails loudly instead of being mis-typed.\n *\n * @module\n */\nimport { createHash } from 'node:crypto'\n\n/**\n * A Lua script with its SHA-1, for `EVALSHA` (the script body is sent only once per server).\n *\n * @example\n * const GET_DEL = defineLua(\"local v = redis.call('GET', KEYS[1]) redis.call('DEL', KEYS[1]) return v\")\n */\nexport interface LuaScript {\n readonly source: string\n readonly sha1: string\n}\n\n/**\n * Define a Lua script.\n *\n * @example\n * const script = defineLua(\"return redis.call('GET', KEYS[1])\")\n */\nexport function defineLua(source: string): LuaScript {\n return Object.freeze({ source, sha1: createHash('sha1').update(source).digest('hex') })\n}\n\n/**\n * What the stores need from a Redis connection.\n *\n * @example\n * const value = await driver.command(['GET', 'blog:cache:posts'])\n */\nexport interface RedisDriver {\n /** Run one command. Errors are the 503 `redis_unavailable` problem when the server is unreachable. */\n command(args: readonly string[]): Promise<unknown>\n /** Run a Lua script atomically (`EVALSHA`, loading it with `EVAL` on `NOSCRIPT`). */\n script(script: LuaScript, keys: readonly string[], args: readonly string[]): Promise<unknown>\n /** Round-trip time of a `PING`, in milliseconds. */\n ping(): Promise<number>\n /** Close the connection gracefully (pending replies are awaited, bounded by a timeout). */\n close(): Promise<void>\n}\n\n/**\n * Narrow a reply to a string or `null` (bulk string or nil). Numbers become strings.\n *\n * @example\n * asNullableString(await driver.command(['GET', key]))\n */\nexport function asNullableString(reply: unknown): string | null {\n if (reply === null || reply === undefined) return null\n if (typeof reply === 'string') return reply\n if (typeof reply === 'number' || typeof reply === 'bigint') return String(reply)\n if (Buffer.isBuffer(reply)) return reply.toString('utf8')\n throw unexpected('a string', reply)\n}\n\n/**\n * Narrow a reply to a safe integer (integer reply, or a numeric string from Lua).\n *\n * @example\n * asInteger(await driver.command(['PTTL', key]))\n */\nexport function asInteger(reply: unknown): number {\n const value =\n typeof reply === 'bigint' ? Number(reply) : typeof reply === 'string' ? Number(reply) : reply\n if (typeof value === 'number' && Number.isSafeInteger(value)) return value\n throw unexpected('an integer', reply)\n}\n\n/**\n * Narrow a reply to an array.\n *\n * @example\n * const [cursor, keys] = asArray(await driver.command(['SCAN', '0']))\n */\nexport function asArray(reply: unknown): readonly unknown[] {\n if (Array.isArray(reply)) return reply\n throw unexpected('an array', reply)\n}\n\nfunction unexpected(expected: string, reply: unknown): TypeError {\n const kind = reply === null ? 'null' : Array.isArray(reply) ? 'array' : typeof reply\n return new TypeError(`Redis replied with ${kind} where ${expected} was expected.`)\n}\n\n/**\n * Delete every key matching a `SCAN` pattern, in batches (`UNLINK`, so large values are freed in\n * the background). Never `FLUSHDB`: other apps may share the database. Returns how many keys were\n * removed.\n *\n * @example\n * await deleteMatching(driver, space.pattern())\n */\nexport async function deleteMatching(\n driver: RedisDriver,\n pattern: string,\n batch = 500,\n): Promise<number> {\n let cursor = '0'\n let removed = 0\n do {\n const [next, keys] = asArray(\n await driver.command(['SCAN', cursor, 'MATCH', pattern, 'COUNT', String(batch)]),\n )\n cursor = asNullableString(next) ?? '0'\n const found = asArray(keys).map((key) => asNullableString(key) ?? '')\n if (found.length > 0) removed += asInteger(await driver.command(['UNLINK', ...found]))\n } while (cursor !== '0')\n return removed\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,UAAU,QAA2B;CACnD,OAAO,OAAO,OAAO;EAAE;EAAQ,MAAM,WAAW,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,OAAO,KAAK;CAAE,CAAC;AACxF;;;;;;;AAyBA,SAAgB,iBAAiB,OAA+B;CAC9D,IAAI,UAAU,QAAQ,UAAU,KAAA,GAAW,OAAO;CAClD,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU,OAAO,OAAO,KAAK;CAC/E,IAAI,OAAO,SAAS,KAAK,GAAG,OAAO,MAAM,SAAS,MAAM;CACxD,MAAM,WAAW,YAAY,KAAK;AACpC;;;;;;;AAQA,SAAgB,UAAU,OAAwB;CAChD,MAAM,QACJ,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI,OAAO,UAAU,WAAW,OAAO,KAAK,IAAI;CAC1F,IAAI,OAAO,UAAU,YAAY,OAAO,cAAc,KAAK,GAAG,OAAO;CACrE,MAAM,WAAW,cAAc,KAAK;AACtC;;;;;;;AAQA,SAAgB,QAAQ,OAAoC;CAC1D,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO;CACjC,MAAM,WAAW,YAAY,KAAK;AACpC;AAEA,SAAS,WAAW,UAAkB,OAA2B;CAE/D,uBAAO,IAAI,UAAU,sBADR,UAAU,OAAO,SAAS,MAAM,QAAQ,KAAK,IAAI,UAAU,OAAO,MAC/B,SAAS,SAAS,eAAe;AACnF;;;;;;;;;AAUA,eAAsB,eACpB,QACA,SACA,QAAQ,KACS;CACjB,IAAI,SAAS;CACb,IAAI,UAAU;CACd,GAAG;EACD,MAAM,CAAC,MAAM,QAAQ,QACnB,MAAM,OAAO,QAAQ;GAAC;GAAQ;GAAQ;GAAS;GAAS;GAAS,OAAO,KAAK;EAAC,CAAC,CACjF;EACA,SAAS,iBAAiB,IAAI,KAAK;EACnC,MAAM,QAAQ,QAAQ,IAAI,CAAC,CAAC,KAAK,QAAQ,iBAAiB,GAAG,KAAK,EAAE;EACpE,IAAI,MAAM,SAAS,GAAG,WAAW,UAAU,MAAM,OAAO,QAAQ,CAAC,UAAU,GAAG,KAAK,CAAC,CAAC;CACvF,SAAS,WAAW;CACpB,OAAO;AACT"}
|