@unocss/language-server 66.6.7 → 66.6.8

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/dist/server.cjs CHANGED
@@ -37,6 +37,7 @@ let node_process = require("node:process");
37
37
  node_process = __toESM(node_process);
38
38
  let node_url = require("node:url");
39
39
  let node_util = require("node:util");
40
+ let node_diagnostics_channel = require("node:diagnostics_channel");
40
41
  let node_fs = require("node:fs");
41
42
  node_fs = __toESM(node_fs);
42
43
  let node_fs_promises = require("node:fs/promises");
@@ -280,7 +281,7 @@ function normalizeCSSEntries(obj) {
280
281
  return (!Array.isArray(obj) ? Object.entries(obj) : obj).filter((i) => i[1] != null);
281
282
  }
282
283
  function normalizeCSSValues(obj) {
283
- if (Array.isArray(obj)) if (obj.find((i) => !Array.isArray(i) || Array.isArray(i[0]))) return obj.map((i) => normalizeCSSEntries(i));
284
+ if (Array.isArray(obj)) if (obj.some((i) => !Array.isArray(i) || Array.isArray(i[0]))) return obj.map((i) => normalizeCSSEntries(i));
284
285
  else return [obj];
285
286
  else return [normalizeCSSEntries(obj)];
286
287
  }
@@ -580,7 +581,7 @@ function flatternFilterPattern(pattern) {
580
581
  function definePreset(preset) {
581
582
  return preset;
582
583
  }
583
- var version = "66.6.7";
584
+ var version = "66.6.8";
584
585
  const symbols = {
585
586
  shortcutsNoMerge: "$$symbol-shortcut-no-merge",
586
587
  noMerge: "$$symbol-no-merge",
@@ -35170,69 +35171,42 @@ var Fzf = class {
35170
35171
  }
35171
35172
  };
35172
35173
  //#endregion
35173
- //#region ../../node_modules/.pnpm/lru-cache@11.2.6/node_modules/lru-cache/dist/esm/index.min.js
35174
- var M = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, I$1 = /* @__PURE__ */ new Set(), R$1 = typeof process == "object" && process ? process : {}, x = (a, t, e, i) => {
35175
- typeof R$1.emitWarning == "function" ? R$1.emitWarning(a, t, e, i) : console.error(`[${e}] ${t}: ${a}`);
35176
- }, C$1 = globalThis.AbortController, D$1 = globalThis.AbortSignal;
35177
- if (typeof C$1 > "u") {
35178
- D$1 = class {
35179
- onabort;
35180
- _onabort = [];
35181
- reason;
35182
- aborted = !1;
35183
- addEventListener(i, s) {
35184
- this._onabort.push(s);
35185
- }
35186
- }, C$1 = class {
35187
- constructor() {
35188
- t();
35189
- }
35190
- signal = new D$1();
35191
- abort(i) {
35192
- if (!this.signal.aborted) {
35193
- this.signal.reason = i, this.signal.aborted = !0;
35194
- for (let s of this.signal._onabort) s(i);
35195
- this.signal.onabort?.(i);
35196
- }
35197
- }
35198
- };
35199
- let a = R$1.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
35200
- a && (a = !1, x("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
35201
- };
35202
- }
35203
- var G$1 = (a) => !I$1.has(a), y$1 = (a) => a && a === Math.floor(a) && a > 0 && isFinite(a), U = (a) => y$1(a) ? a <= Math.pow(2, 8) ? Uint8Array : a <= Math.pow(2, 16) ? Uint16Array : a <= Math.pow(2, 32) ? Uint32Array : a <= Number.MAX_SAFE_INTEGER ? z : null : null, z = class extends Array {
35204
- constructor(t) {
35205
- super(t), this.fill(0);
35206
- }
35207
- }, W = class a {
35174
+ //#region ../../node_modules/.pnpm/lru-cache@11.3.2/node_modules/lru-cache/dist/esm/node/index.min.js
35175
+ var S$1 = (0, node_diagnostics_channel.channel)("lru-cache:metrics"), W = (0, node_diagnostics_channel.tracingChannel)("lru-cache"), x = () => S$1.hasSubscribers || W.hasSubscribers, G$1 = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, M = /* @__PURE__ */ new Set(), C$1 = typeof process == "object" && process ? process : {}, P = (u, e, t, i) => {
35176
+ typeof C$1.emitWarning == "function" ? C$1.emitWarning(u, e, t, i) : console.error(`[${t}] ${e}: ${u}`);
35177
+ }, H = (u) => !M.has(u), F$1 = (u) => !!u && u === Math.floor(u) && u > 0 && isFinite(u), U = (u) => F$1(u) ? u <= Math.pow(2, 8) ? Uint8Array : u <= Math.pow(2, 16) ? Uint16Array : u <= Math.pow(2, 32) ? Uint32Array : u <= Number.MAX_SAFE_INTEGER ? O$1 : null : null, O$1 = class extends Array {
35178
+ constructor(e) {
35179
+ super(e), this.fill(0);
35180
+ }
35181
+ }, R$1 = class u {
35208
35182
  heap;
35209
35183
  length;
35210
35184
  static #o = !1;
35211
- static create(t) {
35212
- let e = U(t);
35213
- if (!e) return [];
35214
- a.#o = !0;
35215
- let i = new a(t, e);
35216
- return a.#o = !1, i;
35185
+ static create(e) {
35186
+ let t = U(e);
35187
+ if (!t) return [];
35188
+ u.#o = !0;
35189
+ let i = new u(e, t);
35190
+ return u.#o = !1, i;
35217
35191
  }
35218
- constructor(t, e) {
35219
- if (!a.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
35220
- this.heap = new e(t), this.length = 0;
35192
+ constructor(e, t) {
35193
+ if (!u.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
35194
+ this.heap = new t(e), this.length = 0;
35221
35195
  }
35222
- push(t) {
35223
- this.heap[this.length++] = t;
35196
+ push(e) {
35197
+ this.heap[this.length++] = e;
35224
35198
  }
35225
35199
  pop() {
35226
35200
  return this.heap[--this.length];
35227
35201
  }
35228
- }, L$1 = class a {
35202
+ }, L$1 = class u {
35229
35203
  #o;
35230
- #c;
35204
+ #u;
35231
35205
  #w;
35232
- #C;
35206
+ #x;
35233
35207
  #S;
35234
- #L;
35235
- #I;
35208
+ #M;
35209
+ #U;
35236
35210
  #m;
35237
35211
  get perf() {
35238
35212
  return this.#m;
@@ -35253,515 +35227,576 @@ var G$1 = (a) => !I$1.has(a), y$1 = (a) => a && a === Math.floor(a) && a > 0 &&
35253
35227
  allowStaleOnFetchRejection;
35254
35228
  ignoreFetchAbort;
35255
35229
  #n;
35256
- #_;
35230
+ #b;
35257
35231
  #s;
35258
35232
  #i;
35259
35233
  #t;
35260
35234
  #a;
35261
- #u;
35235
+ #c;
35262
35236
  #l;
35263
35237
  #h;
35264
- #b;
35265
- #r;
35266
35238
  #y;
35267
- #A;
35239
+ #r;
35240
+ #_;
35241
+ #F;
35268
35242
  #d;
35269
35243
  #g;
35270
35244
  #T;
35271
- #v;
35245
+ #W;
35272
35246
  #f;
35273
- #x;
35274
- static unsafeExposeInternals(t) {
35247
+ #j;
35248
+ static unsafeExposeInternals(e) {
35275
35249
  return {
35276
- starts: t.#A,
35277
- ttls: t.#d,
35278
- autopurgeTimers: t.#g,
35279
- sizes: t.#y,
35280
- keyMap: t.#s,
35281
- keyList: t.#i,
35282
- valList: t.#t,
35283
- next: t.#a,
35284
- prev: t.#u,
35250
+ starts: e.#F,
35251
+ ttls: e.#d,
35252
+ autopurgeTimers: e.#g,
35253
+ sizes: e.#_,
35254
+ keyMap: e.#s,
35255
+ keyList: e.#i,
35256
+ valList: e.#t,
35257
+ next: e.#a,
35258
+ prev: e.#c,
35285
35259
  get head() {
35286
- return t.#l;
35260
+ return e.#l;
35287
35261
  },
35288
35262
  get tail() {
35289
- return t.#h;
35263
+ return e.#h;
35290
35264
  },
35291
- free: t.#b,
35292
- isBackgroundFetch: (e) => t.#e(e),
35293
- backgroundFetch: (e, i, s, h) => t.#G(e, i, s, h),
35294
- moveToTail: (e) => t.#D(e),
35295
- indexes: (e) => t.#F(e),
35296
- rindexes: (e) => t.#O(e),
35297
- isStale: (e) => t.#p(e)
35265
+ free: e.#y,
35266
+ isBackgroundFetch: (t) => e.#e(t),
35267
+ backgroundFetch: (t, i, s, n) => e.#P(t, i, s, n),
35268
+ moveToTail: (t) => e.#L(t),
35269
+ indexes: (t) => e.#A(t),
35270
+ rindexes: (t) => e.#z(t),
35271
+ isStale: (t) => e.#p(t)
35298
35272
  };
35299
35273
  }
35300
35274
  get max() {
35301
35275
  return this.#o;
35302
35276
  }
35303
35277
  get maxSize() {
35304
- return this.#c;
35278
+ return this.#u;
35305
35279
  }
35306
35280
  get calculatedSize() {
35307
- return this.#_;
35281
+ return this.#b;
35308
35282
  }
35309
35283
  get size() {
35310
35284
  return this.#n;
35311
35285
  }
35312
35286
  get fetchMethod() {
35313
- return this.#L;
35287
+ return this.#M;
35314
35288
  }
35315
35289
  get memoMethod() {
35316
- return this.#I;
35290
+ return this.#U;
35317
35291
  }
35318
35292
  get dispose() {
35319
35293
  return this.#w;
35320
35294
  }
35321
35295
  get onInsert() {
35322
- return this.#C;
35296
+ return this.#x;
35323
35297
  }
35324
35298
  get disposeAfter() {
35325
35299
  return this.#S;
35326
35300
  }
35327
- constructor(t) {
35328
- let { max: e = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: h, updateAgeOnGet: n, updateAgeOnHas: o, allowStale: r, dispose: f, onInsert: m, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: g, maxSize: A = 0, maxEntrySize: p = 0, sizeCalculation: _, fetchMethod: l, memoMethod: w, noDeleteOnFetchRejection: b, noDeleteOnStaleGet: S, allowStaleOnFetchRejection: u, allowStaleOnFetchAbort: T, ignoreFetchAbort: F, perf: v } = t;
35329
- if (v !== void 0 && typeof v?.now != "function") throw new TypeError("perf option must have a now() method if specified");
35330
- if (this.#m = v ?? M, e !== 0 && !y$1(e)) throw new TypeError("max option must be a nonnegative integer");
35331
- let O = e ? U(e) : Array;
35332
- if (!O) throw new Error("invalid max value: " + e);
35333
- if (this.#o = e, this.#c = A, this.maxEntrySize = p || this.#c, this.sizeCalculation = _, this.sizeCalculation) {
35334
- if (!this.#c && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
35301
+ constructor(e) {
35302
+ let { max: t = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: r, allowStale: h, dispose: l, onInsert: c, disposeAfter: f, noDisposeOnSet: g, noUpdateTTL: p, maxSize: T = 0, maxEntrySize: w = 0, sizeCalculation: y, fetchMethod: a, memoMethod: m, noDeleteOnFetchRejection: _, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: A, ignoreFetchAbort: z, perf: D } = e;
35303
+ if (D !== void 0 && typeof D?.now != "function") throw new TypeError("perf option must have a now() method if specified");
35304
+ if (this.#m = D ?? G$1, t !== 0 && !F$1(t)) throw new TypeError("max option must be a nonnegative integer");
35305
+ let v = t ? U(t) : Array;
35306
+ if (!v) throw new Error("invalid max value: " + t);
35307
+ if (this.#o = t, this.#u = T, this.maxEntrySize = w || this.#u, this.sizeCalculation = y, this.sizeCalculation) {
35308
+ if (!this.#u && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
35335
35309
  if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
35336
35310
  }
35337
- if (w !== void 0 && typeof w != "function") throw new TypeError("memoMethod must be a function if defined");
35338
- if (this.#I = w, l !== void 0 && typeof l != "function") throw new TypeError("fetchMethod must be a function if specified");
35339
- if (this.#L = l, this.#v = !!l, this.#s = /* @__PURE__ */ new Map(), this.#i = new Array(e).fill(void 0), this.#t = new Array(e).fill(void 0), this.#a = new O(e), this.#u = new O(e), this.#l = 0, this.#h = 0, this.#b = W.create(e), this.#n = 0, this.#_ = 0, typeof f == "function" && (this.#w = f), typeof m == "function" && (this.#C = m), typeof c == "function" ? (this.#S = c, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#x = !!this.#C, this.#f = !!this.#S, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!g, this.noDeleteOnFetchRejection = !!b, this.allowStaleOnFetchRejection = !!u, this.allowStaleOnFetchAbort = !!T, this.ignoreFetchAbort = !!F, this.maxEntrySize !== 0) {
35340
- if (this.#c !== 0 && !y$1(this.#c)) throw new TypeError("maxSize must be a positive integer if specified");
35341
- if (!y$1(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
35342
- this.#B();
35311
+ if (m !== void 0 && typeof m != "function") throw new TypeError("memoMethod must be a function if defined");
35312
+ if (this.#U = m, a !== void 0 && typeof a != "function") throw new TypeError("fetchMethod must be a function if specified");
35313
+ if (this.#M = a, this.#W = !!a, this.#s = /* @__PURE__ */ new Map(), this.#i = Array.from({ length: t }).fill(void 0), this.#t = Array.from({ length: t }).fill(void 0), this.#a = new v(t), this.#c = new v(t), this.#l = 0, this.#h = 0, this.#y = R$1.create(t), this.#n = 0, this.#b = 0, typeof l == "function" && (this.#w = l), typeof c == "function" && (this.#x = c), typeof f == "function" ? (this.#S = f, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#j = !!this.#x, this.#f = !!this.#S, this.noDisposeOnSet = !!g, this.noUpdateTTL = !!p, this.noDeleteOnFetchRejection = !!_, this.allowStaleOnFetchRejection = !!d, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z, this.maxEntrySize !== 0) {
35314
+ if (this.#u !== 0 && !F$1(this.#u)) throw new TypeError("maxSize must be a positive integer if specified");
35315
+ if (!F$1(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
35316
+ this.#X();
35343
35317
  }
35344
- if (this.allowStale = !!r, this.noDeleteOnStaleGet = !!S, this.updateAgeOnGet = !!n, this.updateAgeOnHas = !!o, this.ttlResolution = y$1(s) || s === 0 ? s : 1, this.ttlAutopurge = !!h, this.ttl = i || 0, this.ttl) {
35345
- if (!y$1(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
35346
- this.#j();
35318
+ if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!r, this.ttlResolution = F$1(s) || s === 0 ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
35319
+ if (!F$1(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
35320
+ this.#H();
35347
35321
  }
35348
- if (this.#o === 0 && this.ttl === 0 && this.#c === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
35349
- if (!this.ttlAutopurge && !this.#o && !this.#c) {
35322
+ if (this.#o === 0 && this.ttl === 0 && this.#u === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
35323
+ if (!this.ttlAutopurge && !this.#o && !this.#u) {
35350
35324
  let E = "LRU_CACHE_UNBOUNDED";
35351
- G$1(E) && (I$1.add(E), x("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, a));
35352
- }
35353
- }
35354
- getRemainingTTL(t) {
35355
- return this.#s.has(t) ? Infinity : 0;
35356
- }
35357
- #j() {
35358
- let t = new z(this.#o), e = new z(this.#o);
35359
- this.#d = t, this.#A = e;
35360
- let i = this.ttlAutopurge ? new Array(this.#o) : void 0;
35361
- this.#g = i, this.#N = (n, o, r = this.#m.now()) => {
35362
- if (e[n] = o !== 0 ? r : 0, t[n] = o, i?.[n] && (clearTimeout(i[n]), i[n] = void 0), o !== 0 && i) {
35363
- let f = setTimeout(() => {
35364
- this.#p(n) && this.#E(this.#i[n], "expire");
35365
- }, o + 1);
35366
- f.unref && f.unref(), i[n] = f;
35367
- }
35368
- }, this.#R = (n) => {
35369
- e[n] = t[n] !== 0 ? this.#m.now() : 0;
35370
- }, this.#z = (n, o) => {
35371
- if (t[o]) {
35372
- let r = t[o], f = e[o];
35373
- if (!r || !f) return;
35374
- n.ttl = r, n.start = f, n.now = s || h();
35375
- n.remainingTTL = r - (n.now - f);
35325
+ H(E) && (M.add(E), P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, u));
35326
+ }
35327
+ }
35328
+ getRemainingTTL(e) {
35329
+ return this.#s.has(e) ? Infinity : 0;
35330
+ }
35331
+ #H() {
35332
+ let e = new O$1(this.#o), t = new O$1(this.#o);
35333
+ this.#d = e, this.#F = t;
35334
+ let i = this.ttlAutopurge ? Array.from({ length: this.#o }) : void 0;
35335
+ this.#g = i, this.#N = (r, h, l = this.#m.now()) => {
35336
+ t[r] = h !== 0 ? l : 0, e[r] = h, s(r, h);
35337
+ }, this.#D = (r) => {
35338
+ t[r] = e[r] !== 0 ? this.#m.now() : 0, s(r, e[r]);
35339
+ };
35340
+ let s = this.ttlAutopurge ? (r, h) => {
35341
+ if (i?.[r] && (clearTimeout(i[r]), i[r] = void 0), h && h !== 0 && i) {
35342
+ let l = setTimeout(() => {
35343
+ this.#p(r) && this.#v(this.#i[r], "expire");
35344
+ }, h + 1);
35345
+ l.unref && l.unref(), i[r] = l;
35346
+ }
35347
+ } : () => {};
35348
+ this.#E = (r, h) => {
35349
+ if (e[h]) {
35350
+ let l = e[h], c = t[h];
35351
+ if (!l || !c) return;
35352
+ r.ttl = l, r.start = c, r.now = n || o();
35353
+ r.remainingTTL = l - (r.now - c);
35376
35354
  }
35377
35355
  };
35378
- let s = 0, h = () => {
35379
- let n = this.#m.now();
35356
+ let n = 0, o = () => {
35357
+ let r = this.#m.now();
35380
35358
  if (this.ttlResolution > 0) {
35381
- s = n;
35382
- let o = setTimeout(() => s = 0, this.ttlResolution);
35383
- o.unref && o.unref();
35359
+ n = r;
35360
+ let h = setTimeout(() => n = 0, this.ttlResolution);
35361
+ h.unref && h.unref();
35384
35362
  }
35385
- return n;
35363
+ return r;
35386
35364
  };
35387
- this.getRemainingTTL = (n) => {
35388
- let o = this.#s.get(n);
35389
- if (o === void 0) return 0;
35390
- let r = t[o], f = e[o];
35391
- if (!r || !f) return Infinity;
35392
- return r - ((s || h()) - f);
35393
- }, this.#p = (n) => {
35394
- let o = e[n], r = t[n];
35395
- return !!r && !!o && (s || h()) - o > r;
35365
+ this.getRemainingTTL = (r) => {
35366
+ let h = this.#s.get(r);
35367
+ if (h === void 0) return 0;
35368
+ let l = e[h], c = t[h];
35369
+ if (!l || !c) return Infinity;
35370
+ return l - ((n || o()) - c);
35371
+ }, this.#p = (r) => {
35372
+ let h = t[r], l = e[r];
35373
+ return !!l && !!h && (n || o()) - h > l;
35396
35374
  };
35397
35375
  }
35398
- #R = () => {};
35399
- #z = () => {};
35376
+ #D = () => {};
35377
+ #E = () => {};
35400
35378
  #N = () => {};
35401
35379
  #p = () => !1;
35402
- #B() {
35403
- let t = new z(this.#o);
35404
- this.#_ = 0, this.#y = t, this.#W = (e) => {
35405
- this.#_ -= t[e], t[e] = 0;
35406
- }, this.#P = (e, i, s, h) => {
35380
+ #X() {
35381
+ let e = new O$1(this.#o);
35382
+ this.#b = 0, this.#_ = e, this.#R = (t) => {
35383
+ this.#b -= e[t], e[t] = 0;
35384
+ }, this.#k = (t, i, s, n) => {
35407
35385
  if (this.#e(i)) return 0;
35408
- if (!y$1(s)) if (h) {
35409
- if (typeof h != "function") throw new TypeError("sizeCalculation must be a function");
35410
- if (s = h(i, e), !y$1(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
35386
+ if (!F$1(s)) if (n) {
35387
+ if (typeof n != "function") throw new TypeError("sizeCalculation must be a function");
35388
+ if (s = n(i, t), !F$1(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
35411
35389
  } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
35412
35390
  return s;
35413
- }, this.#U = (e, i, s) => {
35414
- if (t[e] = i, this.#c) {
35415
- let h = this.#c - t[e];
35416
- for (; this.#_ > h;) this.#M(!0);
35391
+ }, this.#I = (t, i, s) => {
35392
+ if (e[t] = i, this.#u) {
35393
+ let n = this.#u - e[t];
35394
+ for (; this.#b > n;) this.#G(!0);
35417
35395
  }
35418
- this.#_ += t[e], s && (s.entrySize = i, s.totalCalculatedSize = this.#_);
35396
+ this.#b += e[t], s && (s.entrySize = i, s.totalCalculatedSize = this.#b);
35419
35397
  };
35420
35398
  }
35421
- #W = (t) => {};
35422
- #U = (t, e, i) => {};
35423
- #P = (t, e, i, s) => {
35399
+ #R = (e) => {};
35400
+ #I = (e, t, i) => {};
35401
+ #k = (e, t, i, s) => {
35424
35402
  if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
35425
35403
  return 0;
35426
35404
  };
35427
- *#F({ allowStale: t = this.allowStale } = {}) {
35428
- if (this.#n) for (let e = this.#h; !(!this.#H(e) || ((t || !this.#p(e)) && (yield e), e === this.#l));) e = this.#u[e];
35405
+ *#A({ allowStale: e = this.allowStale } = {}) {
35406
+ if (this.#n) for (let t = this.#h; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#l);) t = this.#c[t];
35429
35407
  }
35430
- *#O({ allowStale: t = this.allowStale } = {}) {
35431
- if (this.#n) for (let e = this.#l; !(!this.#H(e) || ((t || !this.#p(e)) && (yield e), e === this.#h));) e = this.#a[e];
35408
+ *#z({ allowStale: e = this.allowStale } = {}) {
35409
+ if (this.#n) for (let t = this.#l; this.#V(t) && ((e || !this.#p(t)) && (yield t), t !== this.#h);) t = this.#a[t];
35432
35410
  }
35433
- #H(t) {
35434
- return t !== void 0 && this.#s.get(this.#i[t]) === t;
35411
+ #V(e) {
35412
+ return e !== void 0 && this.#s.get(this.#i[e]) === e;
35435
35413
  }
35436
35414
  *entries() {
35437
- for (let t of this.#F()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
35415
+ for (let e of this.#A()) this.#t[e] !== void 0 && this.#i[e] !== void 0 && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
35438
35416
  }
35439
35417
  *rentries() {
35440
- for (let t of this.#O()) this.#t[t] !== void 0 && this.#i[t] !== void 0 && !this.#e(this.#t[t]) && (yield [this.#i[t], this.#t[t]]);
35418
+ for (let e of this.#z()) this.#t[e] !== void 0 && this.#i[e] !== void 0 && !this.#e(this.#t[e]) && (yield [this.#i[e], this.#t[e]]);
35441
35419
  }
35442
35420
  *keys() {
35443
- for (let t of this.#F()) {
35444
- let e = this.#i[t];
35445
- e !== void 0 && !this.#e(this.#t[t]) && (yield e);
35421
+ for (let e of this.#A()) {
35422
+ let t = this.#i[e];
35423
+ t !== void 0 && !this.#e(this.#t[e]) && (yield t);
35446
35424
  }
35447
35425
  }
35448
35426
  *rkeys() {
35449
- for (let t of this.#O()) {
35450
- let e = this.#i[t];
35451
- e !== void 0 && !this.#e(this.#t[t]) && (yield e);
35427
+ for (let e of this.#z()) {
35428
+ let t = this.#i[e];
35429
+ t !== void 0 && !this.#e(this.#t[e]) && (yield t);
35452
35430
  }
35453
35431
  }
35454
35432
  *values() {
35455
- for (let t of this.#F()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
35433
+ for (let e of this.#A()) this.#t[e] !== void 0 && !this.#e(this.#t[e]) && (yield this.#t[e]);
35456
35434
  }
35457
35435
  *rvalues() {
35458
- for (let t of this.#O()) this.#t[t] !== void 0 && !this.#e(this.#t[t]) && (yield this.#t[t]);
35436
+ for (let e of this.#z()) this.#t[e] !== void 0 && !this.#e(this.#t[e]) && (yield this.#t[e]);
35459
35437
  }
35460
35438
  [Symbol.iterator]() {
35461
35439
  return this.entries();
35462
35440
  }
35463
35441
  [Symbol.toStringTag] = "LRUCache";
35464
- find(t, e = {}) {
35465
- for (let i of this.#F()) {
35466
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
35467
- if (h !== void 0 && t(h, this.#i[i], this)) return this.get(this.#i[i], e);
35442
+ find(e, t = {}) {
35443
+ for (let i of this.#A()) {
35444
+ let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
35445
+ if (n !== void 0 && e(n, this.#i[i], this)) return this.#C(this.#i[i], t);
35468
35446
  }
35469
35447
  }
35470
- forEach(t, e = this) {
35471
- for (let i of this.#F()) {
35472
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
35473
- h !== void 0 && t.call(e, h, this.#i[i], this);
35448
+ forEach(e, t = this) {
35449
+ for (let i of this.#A()) {
35450
+ let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
35451
+ n !== void 0 && e.call(t, n, this.#i[i], this);
35474
35452
  }
35475
35453
  }
35476
- rforEach(t, e = this) {
35477
- for (let i of this.#O()) {
35478
- let s = this.#t[i], h = this.#e(s) ? s.__staleWhileFetching : s;
35479
- h !== void 0 && t.call(e, h, this.#i[i], this);
35454
+ rforEach(e, t = this) {
35455
+ for (let i of this.#z()) {
35456
+ let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
35457
+ n !== void 0 && e.call(t, n, this.#i[i], this);
35480
35458
  }
35481
35459
  }
35482
35460
  purgeStale() {
35483
- let t = !1;
35484
- for (let e of this.#O({ allowStale: !0 })) this.#p(e) && (this.#E(this.#i[e], "expire"), t = !0);
35485
- return t;
35486
- }
35487
- info(t) {
35488
- let e = this.#s.get(t);
35489
- if (e === void 0) return;
35490
- let i = this.#t[e], s = this.#e(i) ? i.__staleWhileFetching : i;
35461
+ let e = !1;
35462
+ for (let t of this.#z({ allowStale: !0 })) this.#p(t) && (this.#v(this.#i[t], "expire"), e = !0);
35463
+ return e;
35464
+ }
35465
+ info(e) {
35466
+ let t = this.#s.get(e);
35467
+ if (t === void 0) return;
35468
+ let i = this.#t[t], s = this.#e(i) ? i.__staleWhileFetching : i;
35491
35469
  if (s === void 0) return;
35492
- let h = { value: s };
35493
- if (this.#d && this.#A) {
35494
- let n = this.#d[e], o = this.#A[e];
35495
- if (n && o) h.ttl = n - (this.#m.now() - o), h.start = Date.now();
35470
+ let n = { value: s };
35471
+ if (this.#d && this.#F) {
35472
+ let o = this.#d[t], r = this.#F[t];
35473
+ if (o && r) n.ttl = o - (this.#m.now() - r), n.start = Date.now();
35496
35474
  }
35497
- return this.#y && (h.size = this.#y[e]), h;
35475
+ return this.#_ && (n.size = this.#_[t]), n;
35498
35476
  }
35499
35477
  dump() {
35500
- let t = [];
35501
- for (let e of this.#F({ allowStale: !0 })) {
35502
- let i = this.#i[e], s = this.#t[e], h = this.#e(s) ? s.__staleWhileFetching : s;
35503
- if (h === void 0 || i === void 0) continue;
35504
- let n = { value: h };
35505
- if (this.#d && this.#A) {
35506
- n.ttl = this.#d[e];
35507
- let o = this.#m.now() - this.#A[e];
35508
- n.start = Math.floor(Date.now() - o);
35478
+ let e = [];
35479
+ for (let t of this.#A({ allowStale: !0 })) {
35480
+ let i = this.#i[t], s = this.#t[t], n = this.#e(s) ? s.__staleWhileFetching : s;
35481
+ if (n === void 0 || i === void 0) continue;
35482
+ let o = { value: n };
35483
+ if (this.#d && this.#F) {
35484
+ o.ttl = this.#d[t];
35485
+ let r = this.#m.now() - this.#F[t];
35486
+ o.start = Math.floor(Date.now() - r);
35509
35487
  }
35510
- this.#y && (n.size = this.#y[e]), t.unshift([i, n]);
35488
+ this.#_ && (o.size = this.#_[t]), e.unshift([i, o]);
35511
35489
  }
35512
- return t;
35490
+ return e;
35513
35491
  }
35514
- load(t) {
35492
+ load(e) {
35515
35493
  this.clear();
35516
- for (let [e, i] of t) {
35494
+ for (let [t, i] of e) {
35517
35495
  if (i.start) {
35518
35496
  let s = Date.now() - i.start;
35519
35497
  i.start = this.#m.now() - s;
35520
35498
  }
35521
- this.set(e, i.value, i);
35499
+ this.#O(t, i.value, i);
35522
35500
  }
35523
35501
  }
35524
- set(t, e, i = {}) {
35525
- if (e === void 0) return this.delete(t), this;
35526
- let { ttl: s = this.ttl, start: h, noDisposeOnSet: n = this.noDisposeOnSet, sizeCalculation: o = this.sizeCalculation, status: r } = i, { noUpdateTTL: f = this.noUpdateTTL } = i, m = this.#P(t, e, i.size || 0, o);
35527
- if (this.maxEntrySize && m > this.maxEntrySize) return r && (r.set = "miss", r.maxEntrySizeExceeded = !0), this.#E(t, "set"), this;
35528
- let c = this.#n === 0 ? void 0 : this.#s.get(t);
35529
- if (c === void 0) c = this.#n === 0 ? this.#h : this.#b.length !== 0 ? this.#b.pop() : this.#n === this.#o ? this.#M(!1) : this.#n, this.#i[c] = t, this.#t[c] = e, this.#s.set(t, c), this.#a[this.#h] = c, this.#u[c] = this.#h, this.#h = c, this.#n++, this.#U(c, m, r), r && (r.set = "add"), f = !1, this.#x && this.#C?.(e, t, "add");
35502
+ set(e, t, i = {}) {
35503
+ let { status: s = S$1.hasSubscribers ? {} : void 0 } = i;
35504
+ i.status = s, s && (s.op = "set", s.key = e, t !== void 0 && (s.value = t));
35505
+ let n = this.#O(e, t, i);
35506
+ return s && S$1.hasSubscribers && S$1.publish(s), n;
35507
+ }
35508
+ #O(e, t, i = {}) {
35509
+ let { ttl: s = this.ttl, start: n, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: r = this.sizeCalculation, status: h } = i;
35510
+ if (t === void 0) return h && (h.set = "deleted"), this.delete(e), this;
35511
+ let { noUpdateTTL: l = this.noUpdateTTL } = i;
35512
+ h && !this.#e(t) && (h.value = t);
35513
+ let c = this.#k(e, t, i.size || 0, r, h);
35514
+ if (this.maxEntrySize && c > this.maxEntrySize) return this.#v(e, "set"), h && (h.set = "miss", h.maxEntrySizeExceeded = !0), this;
35515
+ let f = this.#n === 0 ? void 0 : this.#s.get(e);
35516
+ if (f === void 0) f = this.#n === 0 ? this.#h : this.#y.length !== 0 ? this.#y.pop() : this.#n === this.#o ? this.#G(!1) : this.#n, this.#i[f] = e, this.#t[f] = t, this.#s.set(e, f), this.#a[this.#h] = f, this.#c[f] = this.#h, this.#h = f, this.#n++, this.#I(f, c, h), h && (h.set = "add"), l = !1, this.#j && this.#x?.(t, e, "add");
35530
35517
  else {
35531
- this.#D(c);
35532
- let d = this.#t[c];
35533
- if (e !== d) {
35534
- if (this.#v && this.#e(d)) {
35535
- d.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
35536
- let { __staleWhileFetching: g } = d;
35537
- g !== void 0 && !n && (this.#T && this.#w?.(g, t, "set"), this.#f && this.#r?.push([
35538
- g,
35539
- t,
35518
+ this.#L(f);
35519
+ let g = this.#t[f];
35520
+ if (t !== g) {
35521
+ if (this.#W && this.#e(g)) {
35522
+ g.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
35523
+ let { __staleWhileFetching: p } = g;
35524
+ p !== void 0 && !o && (this.#T && this.#w?.(p, e, "set"), this.#f && this.#r?.push([
35525
+ p,
35526
+ e,
35540
35527
  "set"
35541
35528
  ]));
35542
- } else n || (this.#T && this.#w?.(d, t, "set"), this.#f && this.#r?.push([
35543
- d,
35544
- t,
35529
+ } else o || (this.#T && this.#w?.(g, e, "set"), this.#f && this.#r?.push([
35530
+ g,
35531
+ e,
35545
35532
  "set"
35546
35533
  ]));
35547
- if (this.#W(c), this.#U(c, m, r), this.#t[c] = e, r) {
35548
- r.set = "replace";
35549
- let g = d && this.#e(d) ? d.__staleWhileFetching : d;
35550
- g !== void 0 && (r.oldValue = g);
35534
+ if (this.#R(f), this.#I(f, c, h), this.#t[f] = t, h) {
35535
+ h.set = "replace";
35536
+ let p = g && this.#e(g) ? g.__staleWhileFetching : g;
35537
+ p !== void 0 && (h.oldValue = p);
35551
35538
  }
35552
- } else r && (r.set = "update");
35553
- this.#x && this.onInsert?.(e, t, e === d ? "update" : "replace");
35539
+ } else h && (h.set = "update");
35540
+ this.#j && this.onInsert?.(t, e, t === g ? "update" : "replace");
35554
35541
  }
35555
- if (s !== 0 && !this.#d && this.#j(), this.#d && (f || this.#N(c, s, h), r && this.#z(r, c)), !n && this.#f && this.#r) {
35556
- let d = this.#r, g;
35557
- for (; g = d?.shift();) this.#S?.(...g);
35542
+ if (s !== 0 && !this.#d && this.#H(), this.#d && (l || this.#N(f, s, n), h && this.#E(h, f)), !o && this.#f && this.#r) {
35543
+ let g = this.#r, p;
35544
+ for (; p = g?.shift();) this.#S?.(...p);
35558
35545
  }
35559
35546
  return this;
35560
35547
  }
35561
35548
  pop() {
35562
35549
  try {
35563
35550
  for (; this.#n;) {
35564
- let t = this.#t[this.#l];
35565
- if (this.#M(!0), this.#e(t)) {
35566
- if (t.__staleWhileFetching) return t.__staleWhileFetching;
35567
- } else if (t !== void 0) return t;
35551
+ let e = this.#t[this.#l];
35552
+ if (this.#G(!0), this.#e(e)) {
35553
+ if (e.__staleWhileFetching) return e.__staleWhileFetching;
35554
+ } else if (e !== void 0) return e;
35568
35555
  }
35569
35556
  } finally {
35570
35557
  if (this.#f && this.#r) {
35571
- let t = this.#r, e;
35572
- for (; e = t?.shift();) this.#S?.(...e);
35558
+ let e = this.#r, t;
35559
+ for (; t = e?.shift();) this.#S?.(...t);
35573
35560
  }
35574
35561
  }
35575
35562
  }
35576
- #M(t) {
35577
- let e = this.#l, i = this.#i[e], s = this.#t[e];
35578
- return this.#v && this.#e(s) ? s.__abortController.abort(/* @__PURE__ */ new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i, "evict"), this.#f && this.#r?.push([
35563
+ #G(e) {
35564
+ let t = this.#l, i = this.#i[t], s = this.#t[t];
35565
+ return this.#W && this.#e(s) ? s.__abortController.abort(/* @__PURE__ */ new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i, "evict"), this.#f && this.#r?.push([
35579
35566
  s,
35580
35567
  i,
35581
35568
  "evict"
35582
- ])), this.#W(e), this.#g?.[e] && (clearTimeout(this.#g[e]), this.#g[e] = void 0), t && (this.#i[e] = void 0, this.#t[e] = void 0, this.#b.push(e)), this.#n === 1 ? (this.#l = this.#h = 0, this.#b.length = 0) : this.#l = this.#a[e], this.#s.delete(i), this.#n--, e;
35583
- }
35584
- has(t, e = {}) {
35585
- let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, h = this.#s.get(t);
35586
- if (h !== void 0) {
35587
- let n = this.#t[h];
35588
- if (this.#e(n) && n.__staleWhileFetching === void 0) return !1;
35589
- if (this.#p(h)) s && (s.has = "stale", this.#z(s, h));
35590
- else return i && this.#R(h), s && (s.has = "hit", this.#z(s, h)), !0;
35569
+ ])), this.#R(t), this.#g?.[t] && (clearTimeout(this.#g[t]), this.#g[t] = void 0), e && (this.#i[t] = void 0, this.#t[t] = void 0, this.#y.push(t)), this.#n === 1 ? (this.#l = this.#h = 0, this.#y.length = 0) : this.#l = this.#a[t], this.#s.delete(i), this.#n--, t;
35570
+ }
35571
+ has(e, t = {}) {
35572
+ let { status: i = S$1.hasSubscribers ? {} : void 0 } = t;
35573
+ t.status = i, i && (i.op = "has", i.key = e);
35574
+ let s = this.#Y(e, t);
35575
+ return S$1.hasSubscribers && S$1.publish(i), s;
35576
+ }
35577
+ #Y(e, t = {}) {
35578
+ let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = t, n = this.#s.get(e);
35579
+ if (n !== void 0) {
35580
+ let o = this.#t[n];
35581
+ if (this.#e(o) && o.__staleWhileFetching === void 0) return !1;
35582
+ if (this.#p(n)) s && (s.has = "stale", this.#E(s, n));
35583
+ else return i && this.#D(n), s && (s.has = "hit", this.#E(s, n)), !0;
35591
35584
  } else s && (s.has = "miss");
35592
35585
  return !1;
35593
35586
  }
35594
- peek(t, e = {}) {
35595
- let { allowStale: i = this.allowStale } = e, s = this.#s.get(t);
35596
- if (s === void 0 || !i && this.#p(s)) return;
35597
- let h = this.#t[s];
35598
- return this.#e(h) ? h.__staleWhileFetching : h;
35599
- }
35600
- #G(t, e, i, s) {
35601
- let h = e === void 0 ? void 0 : this.#t[e];
35602
- if (this.#e(h)) return h;
35603
- let n = new C$1(), { signal: o } = i;
35604
- o?.addEventListener("abort", () => n.abort(o.reason), { signal: n.signal });
35605
- let r = {
35606
- signal: n.signal,
35587
+ peek(e, t = {}) {
35588
+ let { status: i = x() ? {} : void 0 } = t;
35589
+ i && (i.op = "peek", i.key = e), t.status = i;
35590
+ let s = this.#J(e, t);
35591
+ return S$1.hasSubscribers && S$1.publish(i), s;
35592
+ }
35593
+ #J(e, t) {
35594
+ let { status: i, allowStale: s = this.allowStale } = t, n = this.#s.get(e);
35595
+ if (n === void 0 || !s && this.#p(n)) {
35596
+ i && (i.peek = n === void 0 ? "miss" : "stale");
35597
+ return;
35598
+ }
35599
+ let o = this.#t[n], r = this.#e(o) ? o.__staleWhileFetching : o;
35600
+ return i && (r !== void 0 ? (i.peek = "hit", i.value = r) : i.peek = "miss"), r;
35601
+ }
35602
+ #P(e, t, i, s) {
35603
+ let n = t === void 0 ? void 0 : this.#t[t];
35604
+ if (this.#e(n)) return n;
35605
+ let o = new AbortController(), { signal: r } = i;
35606
+ r?.addEventListener("abort", () => o.abort(r.reason), { signal: o.signal });
35607
+ let h = {
35608
+ signal: o.signal,
35607
35609
  options: i,
35608
35610
  context: s
35609
- }, f = (p, _ = !1) => {
35610
- let { aborted: l } = n.signal, w = i.ignoreFetchAbort && p !== void 0, b = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && p !== void 0);
35611
- if (i.status && (l && !_ ? (i.status.fetchAborted = !0, i.status.fetchError = n.signal.reason, w && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), l && !w && !_) return c(n.signal.reason, b);
35612
- let S = g, u = this.#t[e];
35613
- return (u === g || w && _ && u === void 0) && (p === void 0 ? S.__staleWhileFetching !== void 0 ? this.#t[e] = S.__staleWhileFetching : this.#E(t, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.set(t, p, r.options))), p;
35614
- }, m = (p) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = p), c(p, !1)), c = (p, _) => {
35615
- let { aborted: l } = n.signal, w = l && i.allowStaleOnFetchAbort, b = w || i.allowStaleOnFetchRejection, S = b || i.noDeleteOnFetchRejection, u = g;
35616
- if (this.#t[e] === g && (!S || !_ && u.__staleWhileFetching === void 0 ? this.#E(t, "fetch") : w || (this.#t[e] = u.__staleWhileFetching)), b) return i.status && u.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), u.__staleWhileFetching;
35617
- if (u.__returned === u) throw p;
35618
- }, d = (p, _) => {
35619
- let l = this.#L?.(t, h, r);
35620
- l && l instanceof Promise && l.then((w) => p(w === void 0 ? void 0 : w), _), n.signal.addEventListener("abort", () => {
35621
- (!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (p(void 0), i.allowStaleOnFetchAbort && (p = (w) => f(w, !0)));
35611
+ }, l = (w, y = !1) => {
35612
+ let { aborted: a } = o.signal, m = i.ignoreFetchAbort && w !== void 0, _ = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && w !== void 0);
35613
+ if (i.status && (a && !y ? (i.status.fetchAborted = !0, i.status.fetchError = o.signal.reason, m && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), a && !m && !y) return f(o.signal.reason, _);
35614
+ let b = p, d = this.#t[t];
35615
+ return (d === p || d === void 0 && m && y) && (w === void 0 ? b.__staleWhileFetching !== void 0 ? this.#t[t] = b.__staleWhileFetching : this.#v(e, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.#O(e, w, h.options))), w;
35616
+ }, c = (w) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = w), f(w, !1)), f = (w, y) => {
35617
+ let { aborted: a } = o.signal, m = a && i.allowStaleOnFetchAbort, _ = m || i.allowStaleOnFetchRejection, b = _ || i.noDeleteOnFetchRejection, d = p;
35618
+ if (this.#t[t] === p && (!b || !y && d.__staleWhileFetching === void 0 ? this.#v(e, "fetch") : m || (this.#t[t] = d.__staleWhileFetching)), _) return i.status && d.__staleWhileFetching !== void 0 && (i.status.returnedStale = !0), d.__staleWhileFetching;
35619
+ if (d.__returned === d) throw w;
35620
+ }, g = (w, y) => {
35621
+ let a = this.#M?.(e, n, h);
35622
+ a && a instanceof Promise && a.then((m) => w(m === void 0 ? void 0 : m), y), o.signal.addEventListener("abort", () => {
35623
+ (!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (w(void 0), i.allowStaleOnFetchAbort && (w = (m) => l(m, !0)));
35622
35624
  });
35623
35625
  };
35624
35626
  i.status && (i.status.fetchDispatched = !0);
35625
- let g = new Promise(d).then(f, m), A = Object.assign(g, {
35626
- __abortController: n,
35627
- __staleWhileFetching: h,
35627
+ let p = new Promise(g).then(l, c), T = Object.assign(p, {
35628
+ __abortController: o,
35629
+ __staleWhileFetching: n,
35628
35630
  __returned: void 0
35629
35631
  });
35630
- return e === void 0 ? (this.set(t, A, {
35631
- ...r.options,
35632
+ return t === void 0 ? (this.#O(e, T, {
35633
+ ...h.options,
35632
35634
  status: void 0
35633
- }), e = this.#s.get(t)) : this.#t[e] = A, A;
35634
- }
35635
- #e(t) {
35636
- if (!this.#v) return !1;
35637
- let e = t;
35638
- return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof C$1;
35639
- }
35640
- async fetch(t, e = {}) {
35641
- let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, ttl: n = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: r = 0, sizeCalculation: f = this.sizeCalculation, noUpdateTTL: m = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: g = this.ignoreFetchAbort, allowStaleOnFetchAbort: A = this.allowStaleOnFetchAbort, context: p, forceRefresh: _ = !1, status: l, signal: w } = e;
35642
- if (!this.#v) return l && (l.fetch = "get"), this.get(t, {
35635
+ }), t = this.#s.get(e)) : this.#t[t] = T, T;
35636
+ }
35637
+ #e(e) {
35638
+ if (!this.#W) return !1;
35639
+ let t = e;
35640
+ return !!t && t instanceof Promise && t.hasOwnProperty("__staleWhileFetching") && t.__abortController instanceof AbortController;
35641
+ }
35642
+ fetch(e, t = {}) {
35643
+ let i = W.hasSubscribers, { status: s = x() ? {} : void 0 } = t;
35644
+ t.status = s, s && t.context && (s.context = t.context);
35645
+ let n = this.#B(e, t);
35646
+ return s && x() && i && (s.trace = !0, W.tracePromise(() => n, s).catch(() => {})), n;
35647
+ }
35648
+ async #B(e, t = {}) {
35649
+ let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: r = this.noDisposeOnSet, size: h = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: g = this.allowStaleOnFetchRejection, ignoreFetchAbort: p = this.ignoreFetchAbort, allowStaleOnFetchAbort: T = this.allowStaleOnFetchAbort, context: w, forceRefresh: y = !1, status: a, signal: m } = t;
35650
+ if (a && (a.op = "fetch", a.key = e, y && (a.forceRefresh = !0)), !this.#W) return a && (a.fetch = "get"), this.#C(e, {
35643
35651
  allowStale: i,
35644
35652
  updateAgeOnGet: s,
35645
- noDeleteOnStaleGet: h,
35646
- status: l
35653
+ noDeleteOnStaleGet: n,
35654
+ status: a
35647
35655
  });
35648
- let b = {
35656
+ let _ = {
35649
35657
  allowStale: i,
35650
35658
  updateAgeOnGet: s,
35651
- noDeleteOnStaleGet: h,
35652
- ttl: n,
35653
- noDisposeOnSet: o,
35654
- size: r,
35655
- sizeCalculation: f,
35656
- noUpdateTTL: m,
35657
- noDeleteOnFetchRejection: c,
35658
- allowStaleOnFetchRejection: d,
35659
- allowStaleOnFetchAbort: A,
35660
- ignoreFetchAbort: g,
35661
- status: l,
35662
- signal: w
35663
- }, S = this.#s.get(t);
35664
- if (S === void 0) {
35665
- l && (l.fetch = "miss");
35666
- let u = this.#G(t, S, b, p);
35667
- return u.__returned = u;
35659
+ noDeleteOnStaleGet: n,
35660
+ ttl: o,
35661
+ noDisposeOnSet: r,
35662
+ size: h,
35663
+ sizeCalculation: l,
35664
+ noUpdateTTL: c,
35665
+ noDeleteOnFetchRejection: f,
35666
+ allowStaleOnFetchRejection: g,
35667
+ allowStaleOnFetchAbort: T,
35668
+ ignoreFetchAbort: p,
35669
+ status: a,
35670
+ signal: m
35671
+ }, b = this.#s.get(e);
35672
+ if (b === void 0) {
35673
+ a && (a.fetch = "miss");
35674
+ let d = this.#P(e, b, _, w);
35675
+ return d.__returned = d;
35668
35676
  } else {
35669
- let u = this.#t[S];
35670
- if (this.#e(u)) {
35671
- let E = i && u.__staleWhileFetching !== void 0;
35672
- return l && (l.fetch = "inflight", E && (l.returnedStale = !0)), E ? u.__staleWhileFetching : u.__returned = u;
35677
+ let d = this.#t[b];
35678
+ if (this.#e(d)) {
35679
+ let E = i && d.__staleWhileFetching !== void 0;
35680
+ return a && (a.fetch = "inflight", E && (a.returnedStale = !0)), E ? d.__staleWhileFetching : d.__returned = d;
35673
35681
  }
35674
- let T = this.#p(S);
35675
- if (!_ && !T) return l && (l.fetch = "hit"), this.#D(S), s && this.#R(S), l && this.#z(l, S), u;
35676
- let F = this.#G(t, S, b, p), O = F.__staleWhileFetching !== void 0 && i;
35677
- return l && (l.fetch = T ? "stale" : "refresh", O && T && (l.returnedStale = !0)), O ? F.__staleWhileFetching : F.__returned = F;
35682
+ let A = this.#p(b);
35683
+ if (!y && !A) return a && (a.fetch = "hit"), this.#L(b), s && this.#D(b), a && this.#E(a, b), d;
35684
+ let z = this.#P(e, b, _, w), v = z.__staleWhileFetching !== void 0 && i;
35685
+ return a && (a.fetch = A ? "stale" : "refresh", v && A && (a.returnedStale = !0)), v ? z.__staleWhileFetching : z.__returned = z;
35678
35686
  }
35679
35687
  }
35680
- async forceFetch(t, e = {}) {
35681
- let i = await this.fetch(t, e);
35688
+ forceFetch(e, t = {}) {
35689
+ let i = W.hasSubscribers, { status: s = x() ? {} : void 0 } = t;
35690
+ t.status = s, s && t.context && (s.context = t.context);
35691
+ let n = this.#K(e, t);
35692
+ return s && x() && i && (s.trace = !0, W.tracePromise(() => n, s).catch(() => {})), n;
35693
+ }
35694
+ async #K(e, t = {}) {
35695
+ let i = await this.#B(e, t);
35682
35696
  if (i === void 0) throw new Error("fetch() returned undefined");
35683
35697
  return i;
35684
35698
  }
35685
- memo(t, e = {}) {
35686
- let i = this.#I;
35699
+ memo(e, t = {}) {
35700
+ let { status: i = S$1.hasSubscribers ? {} : void 0 } = t;
35701
+ t.status = i, i && (i.op = "memo", i.key = e, t.context && (i.context = t.context));
35702
+ let s = this.#Q(e, t);
35703
+ return i && (i.value = s), S$1.hasSubscribers && S$1.publish(i), s;
35704
+ }
35705
+ #Q(e, t = {}) {
35706
+ let i = this.#U;
35687
35707
  if (!i) throw new Error("no memoMethod provided to constructor");
35688
- let { context: s, forceRefresh: h, ...n } = e, o = this.get(t, n);
35689
- if (!h && o !== void 0) return o;
35690
- let r = i(t, o, {
35691
- options: n,
35708
+ let { context: s, status: n, forceRefresh: o, ...r } = t;
35709
+ n && o && (n.forceRefresh = !0);
35710
+ let h = this.#C(e, r), l = o || h === void 0;
35711
+ if (n && (n.memo = l ? "miss" : "hit", l || (n.value = h)), !l) return h;
35712
+ let c = i(e, h, {
35713
+ options: r,
35692
35714
  context: s
35693
35715
  });
35694
- return this.set(t, r, n), r;
35695
- }
35696
- get(t, e = {}) {
35697
- let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, status: n } = e, o = this.#s.get(t);
35698
- if (o !== void 0) {
35699
- let r = this.#t[o], f = this.#e(r);
35700
- return n && this.#z(n, o), this.#p(o) ? (n && (n.get = "stale"), f ? (n && i && r.__staleWhileFetching !== void 0 && (n.returnedStale = !0), i ? r.__staleWhileFetching : void 0) : (h || this.#E(t, "expire"), n && i && (n.returnedStale = !0), i ? r : void 0)) : (n && (n.get = "hit"), f ? r.__staleWhileFetching : (this.#D(o), s && this.#R(o), r));
35701
- } else n && (n.get = "miss");
35716
+ return n && (n.value = c), this.#O(e, c, r), c;
35717
+ }
35718
+ get(e, t = {}) {
35719
+ let { status: i = S$1.hasSubscribers ? {} : void 0 } = t;
35720
+ t.status = i, i && (i.op = "get", i.key = e);
35721
+ let s = this.#C(e, t);
35722
+ return i && (s !== void 0 && (i.value = s), S$1.hasSubscribers && S$1.publish(i)), s;
35723
+ }
35724
+ #C(e, t = {}) {
35725
+ let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: o } = t, r = this.#s.get(e);
35726
+ if (r === void 0) {
35727
+ o && (o.get = "miss");
35728
+ return;
35729
+ }
35730
+ let h = this.#t[r], l = this.#e(h);
35731
+ return o && this.#E(o, r), this.#p(r) ? l ? (o && (o.get = "stale-fetching"), i && h.__staleWhileFetching !== void 0 ? (o && (o.returnedStale = !0), h.__staleWhileFetching) : void 0) : (n || this.#v(e, "expire"), o && (o.get = "stale"), i ? (o && (o.returnedStale = !0), h) : void 0) : (o && (o.get = l ? "fetching" : "hit"), this.#L(r), s && this.#D(r), l ? h.__staleWhileFetching : h);
35702
35732
  }
35703
- #k(t, e) {
35704
- this.#u[e] = t, this.#a[t] = e;
35733
+ #$(e, t) {
35734
+ this.#c[t] = e, this.#a[e] = t;
35705
35735
  }
35706
- #D(t) {
35707
- t !== this.#h && (t === this.#l ? this.#l = this.#a[t] : this.#k(this.#u[t], this.#a[t]), this.#k(this.#h, t), this.#h = t);
35736
+ #L(e) {
35737
+ e !== this.#h && (e === this.#l ? this.#l = this.#a[e] : this.#$(this.#c[e], this.#a[e]), this.#$(this.#h, e), this.#h = e);
35708
35738
  }
35709
- delete(t) {
35710
- return this.#E(t, "delete");
35739
+ delete(e) {
35740
+ return this.#v(e, "delete");
35711
35741
  }
35712
- #E(t, e) {
35742
+ #v(e, t) {
35743
+ S$1.hasSubscribers && S$1.publish({
35744
+ op: "delete",
35745
+ delete: t,
35746
+ key: e
35747
+ });
35713
35748
  let i = !1;
35714
35749
  if (this.#n !== 0) {
35715
- let s = this.#s.get(t);
35716
- if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this.#V(e);
35750
+ let s = this.#s.get(e);
35751
+ if (s !== void 0) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, this.#n === 1) this.#q(t);
35717
35752
  else {
35718
- this.#W(s);
35719
- let h = this.#t[s];
35720
- if (this.#e(h) ? h.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(h, t, e), this.#f && this.#r?.push([
35721
- h,
35722
- t,
35723
- e
35724
- ])), this.#s.delete(t), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#u[s];
35753
+ this.#R(s);
35754
+ let n = this.#t[s];
35755
+ if (this.#e(n) ? n.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n, e, t), this.#f && this.#r?.push([
35756
+ n,
35757
+ e,
35758
+ t
35759
+ ])), this.#s.delete(e), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#c[s];
35725
35760
  else if (s === this.#l) this.#l = this.#a[s];
35726
35761
  else {
35727
- let n = this.#u[s];
35728
- this.#a[n] = this.#a[s];
35729
- let o = this.#a[s];
35730
- this.#u[o] = this.#u[s];
35762
+ let o = this.#c[s];
35763
+ this.#a[o] = this.#a[s];
35764
+ let r = this.#a[s];
35765
+ this.#c[r] = this.#c[s];
35731
35766
  }
35732
- this.#n--, this.#b.push(s);
35767
+ this.#n--, this.#y.push(s);
35733
35768
  }
35734
35769
  }
35735
35770
  if (this.#f && this.#r?.length) {
35736
- let s = this.#r, h;
35737
- for (; h = s?.shift();) this.#S?.(...h);
35771
+ let s = this.#r, n;
35772
+ for (; n = s?.shift();) this.#S?.(...n);
35738
35773
  }
35739
35774
  return i;
35740
35775
  }
35741
35776
  clear() {
35742
- return this.#V("delete");
35777
+ return this.#q("delete");
35743
35778
  }
35744
- #V(t) {
35745
- for (let e of this.#O({ allowStale: !0 })) {
35746
- let i = this.#t[e];
35779
+ #q(e) {
35780
+ for (let t of this.#z({ allowStale: !0 })) {
35781
+ let i = this.#t[t];
35747
35782
  if (this.#e(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
35748
35783
  else {
35749
- let s = this.#i[e];
35750
- this.#T && this.#w?.(i, s, t), this.#f && this.#r?.push([
35784
+ let s = this.#i[t];
35785
+ this.#T && this.#w?.(i, s, e), this.#f && this.#r?.push([
35751
35786
  i,
35752
35787
  s,
35753
- t
35788
+ e
35754
35789
  ]);
35755
35790
  }
35756
35791
  }
35757
- if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#A) {
35758
- this.#d.fill(0), this.#A.fill(0);
35759
- for (let e of this.#g ?? []) e !== void 0 && clearTimeout(e);
35792
+ if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
35793
+ this.#d.fill(0), this.#F.fill(0);
35794
+ for (let t of this.#g ?? []) t !== void 0 && clearTimeout(t);
35760
35795
  this.#g?.fill(void 0);
35761
35796
  }
35762
- if (this.#y && this.#y.fill(0), this.#l = 0, this.#h = 0, this.#b.length = 0, this.#_ = 0, this.#n = 0, this.#f && this.#r) {
35763
- let e = this.#r, i;
35764
- for (; i = e?.shift();) this.#S?.(...i);
35797
+ if (this.#_ && this.#_.fill(0), this.#l = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
35798
+ let t = this.#r, i;
35799
+ for (; i = t?.shift();) this.#S?.(...i);
35765
35800
  }
35766
35801
  }
35767
35802
  };
@@ -45452,7 +45487,7 @@ const variantNegative$1 = {
45452
45487
  return {
45453
45488
  matcher: matcher.slice(1),
45454
45489
  body: (body) => {
45455
- if (body.find((v) => v[0] === "$$mini-no-negative")) return;
45490
+ if (body.some((v) => v[0] === "$$mini-no-negative")) return;
45456
45491
  let changed = false;
45457
45492
  body.forEach((v) => {
45458
45493
  const value = v[1]?.toString();
@@ -45926,7 +45961,7 @@ function variantAttributify(options = {}) {
45926
45961
  const [, bodyVariant, bracketValue] = content.match(variantsValueRE) || [];
45927
45962
  if (bracketValue) return `${bodyVariant}${variants}${name}-${bracketValue}`;
45928
45963
  }
45929
- if (variants && body.match(/^[\d.]+$/)) {
45964
+ if (variants && /^[\d.]+$/.test(body)) {
45930
45965
  const variantParts = variants.split(/([^:]*:)/g).filter(Boolean);
45931
45966
  const _body = variantParts.pop() + body;
45932
45967
  const _variants = variantParts.join("");
@@ -46564,7 +46599,7 @@ function encodeSvgForCss(svg) {
46564
46599
  return encodeSVGforURL(useSvg);
46565
46600
  }
46566
46601
  //#endregion
46567
- //#region ../../packages-presets/preset-icons/dist/core-CVWr9MHW.mjs
46602
+ //#region ../../packages-presets/preset-icons/dist/core-DIrlUwzK.mjs
46568
46603
  function getEnvFlags() {
46569
46604
  const isNode = typeof process !== "undefined" && process.stdout;
46570
46605
  return {
@@ -46660,6 +46695,7 @@ var collections_default = [
46660
46695
  "gala",
46661
46696
  "game-icons",
46662
46697
  "garden",
46698
+ "gcp",
46663
46699
  "geo",
46664
46700
  "gg",
46665
46701
  "gis",
@@ -46945,7 +46981,7 @@ async function parseIconWithLoader(body, loader, options = {}, safeCollectionsNa
46945
46981
  };
46946
46982
  }
46947
46983
  //#endregion
46948
- //#region ../../packages-presets/preset-icons/dist/cdn-fz6F-x8c.mjs
46984
+ //#region ../../packages-presets/preset-icons/dist/cdn-DYTPkoFm.mjs
46949
46985
  async function createCDNLoader(cdnBase) {
46950
46986
  const { $fetch } = await Promise.resolve().then(() => require("./node-3wiZdXIz.cjs"));
46951
46987
  return createCDNFetchLoader($fetch, cdnBase);
@@ -48632,7 +48668,7 @@ var __exportAll = (all, no_symbols) => {
48632
48668
  return target;
48633
48669
  };
48634
48670
  //#endregion
48635
- //#region ../../packages-presets/preset-wind4/dist/utils-BamiTVVE.mjs
48671
+ //#region ../../packages-presets/preset-wind4/dist/utils-B60b98El.mjs
48636
48672
  const PRESET_NAME = "@unocss/preset-wind4";
48637
48673
  const CONTROL_NO_NEGATIVE = "$$mini-no-negative";
48638
48674
  const SpecialColorKey = {
@@ -48766,6 +48802,7 @@ const unitOnlyMap = {
48766
48802
  };
48767
48803
  const bracketTypeRe = /^\[(color|image|length|size|position|quoted|string|number|family):/i;
48768
48804
  const splitComma = /,(?![^()]*\))/g;
48805
+ const cssVarsRE = /(?<!var\()--([\w.-]+)(\([^)]+\)|,[#.\s\w]+)?/g;
48769
48806
  var handlers_exports = /* @__PURE__ */ __exportAll({
48770
48807
  auto: () => auto,
48771
48808
  bracket: () => bracket,
@@ -48900,13 +48937,23 @@ function fraction(str) {
48900
48937
  return `${round(num * 100)}%`;
48901
48938
  }
48902
48939
  }
48903
- function processThemeVariable(name, key, paths, theme) {
48904
- const valOrObj = getThemeByKey(theme, key, paths);
48940
+ /**
48941
+ * Process a theme variable reference and retrieve its value and corresponding CSS variable key.
48942
+ *
48943
+ * @example theme => Theme object
48944
+ * @example themeKey => 'colors
48945
+ * @example themeKeyPaths => ['blue', '500']
48946
+ * @example varPaths => 'colors.blue.500'
48947
+ *
48948
+ * @returns An object containing the resolved value from the theme and the corresponding CSS variable key.
48949
+ */
48950
+ function processThemeVariable(theme, themeKey, themeKeyPaths, varPaths) {
48951
+ const valOrObj = getThemeByKey(theme, themeKey, themeKeyPaths);
48905
48952
  const hasDefault = typeof valOrObj === "object" && "DEFAULT" in valOrObj;
48906
- if (hasDefault) paths.push("DEFAULT");
48953
+ if (hasDefault) themeKeyPaths.push("DEFAULT");
48907
48954
  const val = hasDefault ? valOrObj.DEFAULT : valOrObj;
48908
- const varKey = hasDefault && key !== "spacing" ? `${name}.DEFAULT` : name;
48909
- if (val != null) themeTracking(key, paths.length ? paths : void 0);
48955
+ const varKey = hasDefault && themeKey !== "spacing" ? `${varPaths}.DEFAULT` : varPaths;
48956
+ if (val != null) themeTracking(themeKey, themeKeyPaths.length ? themeKeyPaths : void 0);
48910
48957
  return {
48911
48958
  val,
48912
48959
  varKey
@@ -48925,23 +48972,24 @@ function bracketWithType(str, requiredType, theme) {
48925
48972
  }
48926
48973
  if (!base) return;
48927
48974
  if (base === "=\"\"") return;
48928
- if (base.startsWith("--")) {
48929
- const calcMatch = base.match(/^--([\w.-]+)\(([^)]+)\)$/);
48930
- if (calcMatch != null && theme) {
48931
- const [, name, factor] = calcMatch;
48932
- const [key, ...paths] = name.split(".");
48933
- const { val, varKey } = processThemeVariable(name, key, paths, theme);
48934
- if (val != null) base = `calc(var(--${escapeSelector(varKey.replaceAll(".", "-"))}) * ${factor})`;
48935
- } else {
48936
- const [name, defaultValue] = base.slice(2).split(",");
48937
- const suffix = defaultValue ? `, ${defaultValue}` : "";
48938
- const escapedName = escapeSelector(name);
48939
- if (theme) {
48940
- const [key, ...paths] = name.split(".");
48941
- const { val, varKey } = processThemeVariable(name, key, paths, theme);
48942
- base = val != null ? `var(--${escapeSelector(varKey.replaceAll(".", "-"))}${suffix})` : `var(--${escapedName}${suffix})`;
48943
- } else base = `var(--${escapedName}${suffix})`;
48975
+ if (theme) base = transformThemeFn(base, theme);
48976
+ const matches = Array.from(base.matchAll(cssVarsRE));
48977
+ for (const match of matches) {
48978
+ const [full, varPaths, _value] = match;
48979
+ if (theme) {
48980
+ const [key, ...paths] = varPaths.split(".");
48981
+ const { val, varKey } = processThemeVariable(theme, key, paths, varPaths);
48982
+ if (val != null) {
48983
+ const cssVar = `--${varKey.replaceAll(".", "-")}`;
48984
+ if (_value && !_value.startsWith(",")) base = base.replace(full, `calc(var(${cssVar}) * ${_value.slice(1, -1)})`);
48985
+ else {
48986
+ const fallback = _value?.slice(1);
48987
+ base = base.replace(full, `var(${cssVar}${fallback ? `, ${fallback}` : ""})`);
48988
+ }
48989
+ continue;
48990
+ }
48944
48991
  }
48992
+ base = base.replace(full, `var(${full})`);
48945
48993
  }
48946
48994
  let curly = 0;
48947
48995
  for (const i of base) if (i === "[") curly += 1;
@@ -49323,7 +49371,7 @@ function propertyTracking(property, value) {
49323
49371
  if (!trackedProperties.has(property)) trackedProperties.set(property, value);
49324
49372
  }
49325
49373
  //#endregion
49326
- //#region ../../packages-presets/preset-wind4/dist/container-_7pdPWQl.mjs
49374
+ //#region ../../packages-presets/preset-wind4/dist/container-m1WfKD7R.mjs
49327
49375
  const containerParent = [[/^@container(?:\/(\w+))?(?:-(normal))?$/, ([, l, v]) => {
49328
49376
  return {
49329
49377
  "container-type": v ?? "inline-size",
@@ -51147,7 +51195,7 @@ function getSizeValue(theme, hw, prop) {
51147
51195
  themeTracking(`spacing`);
51148
51196
  v = `calc(var(--spacing) * ${h.number(prop)})`;
51149
51197
  }
51150
- return v ?? h.bracket.cssvar.global.auto.none.fraction.rem(prop);
51198
+ return v ?? h.bracket.cssvar.global.auto.none.fraction.rem(prop, theme);
51151
51199
  }
51152
51200
  const sizes = [
51153
51201
  [/^size-(min-|max-)?(.+)$/, ([, m, s], { theme }) => ({
@@ -53353,7 +53401,7 @@ const theme = {
53353
53401
  supports
53354
53402
  };
53355
53403
  //#endregion
53356
- //#region ../../packages-presets/preset-wind4/dist/variants-BQhcPCjX.mjs
53404
+ //#region ../../packages-presets/preset-wind4/dist/variants-B5PDncV-.mjs
53357
53405
  const variantAria = {
53358
53406
  name: "aria",
53359
53407
  match(matcher, ctx) {
@@ -53841,7 +53889,7 @@ const variantNegative = {
53841
53889
  return {
53842
53890
  matcher: matcher.slice(1),
53843
53891
  body: (body) => {
53844
- if (body.find((v) => v[0] === "$$mini-no-negative")) return;
53892
+ if (body.some((v) => v[0] === "$$mini-no-negative")) return;
53845
53893
  let changed = false;
53846
53894
  for (const v of body) {
53847
53895
  const [prop, rawValue, meta] = v;