isaacscript-common 9.19.2 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/index.d.ts +49 -6
  2. package/dist/isaacscript-common.lua +173 -47
  3. package/dist/lualib_bundle.lua +53 -37
  4. package/dist/package.lua +2 -2
  5. package/dist/src/callbacks/preGetPedestal.d.ts +3 -0
  6. package/dist/src/callbacks/preGetPedestal.d.ts.map +1 -0
  7. package/dist/src/callbacks/preGetPedestal.lua +40 -0
  8. package/dist/src/callbacks/subscriptions/preGetPedestal.d.ts +10 -0
  9. package/dist/src/callbacks/subscriptions/preGetPedestal.d.ts.map +1 -0
  10. package/dist/src/callbacks/subscriptions/preGetPedestal.lua +32 -0
  11. package/dist/src/enums/ModCallbackCustom.d.ts +21 -2
  12. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  13. package/dist/src/enums/ModCallbackCustom.lua +4 -2
  14. package/dist/src/features/saveDataManager/load.d.ts +1 -1
  15. package/dist/src/features/saveDataManager/maps.d.ts +1 -1
  16. package/dist/src/features/saveDataManager/merge.d.ts +1 -1
  17. package/dist/src/features/saveDataManager/save.d.ts +1 -1
  18. package/dist/src/functions/arrayLua.d.ts +13 -0
  19. package/dist/src/functions/arrayLua.d.ts.map +1 -1
  20. package/dist/src/functions/arrayLua.lua +15 -0
  21. package/dist/src/functions/bitSet128.d.ts +1 -1
  22. package/dist/src/functions/color.d.ts +1 -1
  23. package/dist/src/functions/entities.d.ts +1 -1
  24. package/dist/src/functions/globals.d.ts +1 -1
  25. package/dist/src/functions/jsonHelpers.d.ts +1 -1
  26. package/dist/src/functions/kColor.d.ts +1 -1
  27. package/dist/src/functions/log.d.ts +2 -2
  28. package/dist/src/functions/log.d.ts.map +1 -1
  29. package/dist/src/functions/positionVelocity.d.ts +3 -1
  30. package/dist/src/functions/positionVelocity.d.ts.map +1 -1
  31. package/dist/src/functions/positionVelocity.lua +9 -1
  32. package/dist/src/functions/rng.d.ts +1 -1
  33. package/dist/src/functions/table.d.ts +2 -2
  34. package/dist/src/functions/table.d.ts.map +1 -1
  35. package/dist/src/functions/table.lua +5 -2
  36. package/dist/src/functions/tstlClass.d.ts +1 -1
  37. package/dist/src/functions/types.d.ts +1 -1
  38. package/dist/src/functions/vector.d.ts +1 -1
  39. package/dist/src/initCustomCallbacks.d.ts.map +1 -1
  40. package/dist/src/initCustomCallbacks.lua +3 -0
  41. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts +2 -0
  42. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +1 -1
  43. package/dist/src/interfaces/private/TSTLClassMetatable.d.ts +1 -1
  44. package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
  45. package/dist/src/objects/callbackRegisterFunctions.lua +3 -0
  46. package/dist/src/types/SerializedIsaacAPIClass.d.ts +1 -1
  47. package/dist/src/types/TSTLClass.d.ts +1 -1
  48. package/package.json +2 -2
  49. package/src/callbacks/preGetPedestal.ts +60 -0
  50. package/src/callbacks/subscriptions/preGetPedestal.ts +55 -0
  51. package/src/enums/ModCallbackCustom.ts +20 -0
  52. package/src/functions/arrayLua.ts +25 -0
  53. package/src/functions/log.ts +8 -6
  54. package/src/functions/positionVelocity.ts +10 -0
  55. package/src/functions/table.ts +10 -4
  56. package/src/initCustomCallbacks.ts +2 -0
  57. package/src/interfaces/private/AddCallbackParameterCustom.ts +2 -0
  58. package/src/objects/callbackRegisterFunctions.ts +2 -0
@@ -255,11 +255,15 @@ local function __TS__ArrayPushArray(self, items)
255
255
  return len
256
256
  end
257
257
 
258
+ local function __TS__CountVarargs(...)
259
+ return select("#", ...)
260
+ end
261
+
258
262
  local function __TS__ArrayReduce(self, callbackFn, ...)
259
263
  local len = #self
260
264
  local k = 0
261
265
  local accumulator = nil
262
- if select("#", ...) ~= 0 then
266
+ if __TS__CountVarargs(...) ~= 0 then
263
267
  accumulator = ...
264
268
  elseif len > 0 then
265
269
  accumulator = self[1]
@@ -283,7 +287,7 @@ local function __TS__ArrayReduceRight(self, callbackFn, ...)
283
287
  local len = #self
284
288
  local k = len - 1
285
289
  local accumulator = nil
286
- if select("#", ...) ~= 0 then
290
+ if __TS__CountVarargs(...) ~= 0 then
287
291
  accumulator = ...
288
292
  elseif len > 0 then
289
293
  accumulator = self[k + 1]
@@ -399,7 +403,7 @@ end
399
403
  local function __TS__ArraySplice(self, ...)
400
404
  local args = {...}
401
405
  local len = #self
402
- local actualArgumentCount = select("#", ...)
406
+ local actualArgumentCount = __TS__CountVarargs(...)
403
407
  local start = args[1]
404
408
  local deleteCount = args[2]
405
409
  if start < 0 then
@@ -1016,6 +1020,16 @@ local function __TS__DecorateParam(paramIndex, decorator)
1016
1020
  return function(____, target, key) return decorator(nil, target, key, paramIndex) end
1017
1021
  end
1018
1022
 
1023
+ local function __TS__StringIncludes(self, searchString, position)
1024
+ if not position then
1025
+ position = 1
1026
+ else
1027
+ position = position + 1
1028
+ end
1029
+ local index = string.find(self, searchString, position, true)
1030
+ return index ~= nil
1031
+ end
1032
+
1019
1033
  local Error, RangeError, ReferenceError, SyntaxError, TypeError, URIError
1020
1034
  do
1021
1035
  local function getErrorStack(self, constructor)
@@ -1030,13 +1044,18 @@ do
1030
1044
  break
1031
1045
  end
1032
1046
  end
1033
- return debug.traceback(nil, level)
1047
+ if __TS__StringIncludes(_VERSION, "Lua 5.0") then
1048
+ return debug.traceback(("[Level " .. tostring(level)) .. "]")
1049
+ else
1050
+ return debug.traceback(nil, level)
1051
+ end
1034
1052
  end
1035
1053
  local function wrapErrorToString(self, getDescription)
1036
1054
  return function(self)
1037
1055
  local description = getDescription(self)
1038
1056
  local caller = debug.getinfo(3, "f")
1039
- if _VERSION == "Lua 5.1" or caller and caller.func ~= error then
1057
+ local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0") or _VERSION == "Lua 5.1"
1058
+ if isClassicLua or caller and caller.func ~= error then
1040
1059
  return description
1041
1060
  else
1042
1061
  return (tostring(description) .. "\n") .. self.stack
@@ -1185,16 +1204,9 @@ do
1185
1204
  function __TS__Generator(fn)
1186
1205
  return function(...)
1187
1206
  local args = {...}
1188
- local argsLength = select("#", ...)
1207
+ local argsLength = __TS__CountVarargs(...)
1189
1208
  return {
1190
- ____coroutine = coroutine.create(function()
1191
- local ____fn_1 = fn
1192
- local ____unpack_0 = unpack
1193
- if ____unpack_0 == nil then
1194
- ____unpack_0 = table.unpack
1195
- end
1196
- return ____fn_1(____unpack_0(args, 1, argsLength))
1197
- end),
1209
+ ____coroutine = coroutine.create(function() return fn(__TS__Unpack(args, 1, argsLength)) end),
1198
1210
  [Symbol.iterator] = generatorIterator,
1199
1211
  next = generatorNext
1200
1212
  }
@@ -1358,8 +1370,12 @@ do
1358
1370
  Map[Symbol.species] = Map
1359
1371
  end
1360
1372
 
1373
+ local __TS__Match = string.match
1374
+
1361
1375
  local __TS__MathAtan2 = math.atan2 or math.atan
1362
1376
 
1377
+ local __TS__MathModf = math.modf
1378
+
1363
1379
  local function __TS__MathSign(val)
1364
1380
  if val > 0 then
1365
1381
  return 1
@@ -1369,6 +1385,10 @@ local function __TS__MathSign(val)
1369
1385
  return 0
1370
1386
  end
1371
1387
 
1388
+ local function __TS__Modulo50(a, b)
1389
+ return a - math.floor(a / b) * b
1390
+ end
1391
+
1372
1392
  local function __TS__Number(value)
1373
1393
  local valueType = type(value)
1374
1394
  if valueType == "number" then
@@ -1415,7 +1435,7 @@ do
1415
1435
  if radix < 2 or radix > 36 then
1416
1436
  error("toString() radix argument must be between 2 and 36", 0)
1417
1437
  end
1418
- local integer, fraction = math.modf(math.abs(self))
1438
+ local integer, fraction = __TS__MathModf(math.abs(self))
1419
1439
  local result = ""
1420
1440
  if radix == 8 then
1421
1441
  result = string.format("%o", integer)
@@ -1571,7 +1591,7 @@ local function __TS__ObjectValues(obj)
1571
1591
  end
1572
1592
 
1573
1593
  local function __TS__ParseFloat(numberString)
1574
- local infinityMatch = string.match(numberString, "^%s*(-?Infinity)")
1594
+ local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
1575
1595
  if infinityMatch then
1576
1596
  local ____temp_0
1577
1597
  if __TS__StringAccess(infinityMatch, 0) == "-" then
@@ -1581,7 +1601,7 @@ local function __TS__ParseFloat(numberString)
1581
1601
  end
1582
1602
  return ____temp_0
1583
1603
  end
1584
- local number = tonumber(string.match(numberString, "^%s*(-?%d+%.?%d*)"))
1604
+ local number = tonumber(__TS__Match(numberString, "^%s*(-?%d+%.?%d*)"))
1585
1605
  local ____number_1 = number
1586
1606
  if ____number_1 == nil then
1587
1607
  ____number_1 = 0 / 0
@@ -1629,16 +1649,16 @@ do
1629
1649
  function __TS__ParseInt(numberString, base)
1630
1650
  if base == nil then
1631
1651
  base = 10
1632
- local hexMatch = string.match(numberString, "^%s*-?0[xX]")
1652
+ local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
1633
1653
  if hexMatch then
1634
1654
  base = 16
1635
- local ____string_match_result__0_0
1636
- if string.match(hexMatch, "-") then
1637
- ____string_match_result__0_0 = "-" .. __TS__StringSubstr(numberString, #hexMatch)
1655
+ local ____TS__Match_result__0_0
1656
+ if __TS__Match(hexMatch, "-") then
1657
+ ____TS__Match_result__0_0 = "-" .. __TS__StringSubstr(numberString, #hexMatch)
1638
1658
  else
1639
- ____string_match_result__0_0 = __TS__StringSubstr(numberString, #hexMatch)
1659
+ ____TS__Match_result__0_0 = __TS__StringSubstr(numberString, #hexMatch)
1640
1660
  end
1641
- numberString = ____string_match_result__0_0
1661
+ numberString = ____TS__Match_result__0_0
1642
1662
  end
1643
1663
  end
1644
1664
  if base < 2 or base > 36 then
@@ -1653,7 +1673,7 @@ do
1653
1673
  local allowedDigits = ____temp_1
1654
1674
  local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
1655
1675
  local number = tonumber(
1656
- string.match(numberString, pattern),
1676
+ __TS__Match(numberString, pattern),
1657
1677
  base
1658
1678
  )
1659
1679
  if number == nil then
@@ -1965,13 +1985,13 @@ end
1965
1985
 
1966
1986
  local function __TS__SparseArrayNew(...)
1967
1987
  local sparseArray = {...}
1968
- sparseArray.sparseLength = select("#", ...)
1988
+ sparseArray.sparseLength = __TS__CountVarargs(...)
1969
1989
  return sparseArray
1970
1990
  end
1971
1991
 
1972
1992
  local function __TS__SparseArrayPush(sparseArray, ...)
1973
1993
  local args = {...}
1974
- local argsLen = select("#", ...)
1994
+ local argsLen = __TS__CountVarargs(...)
1975
1995
  local listLen = sparseArray.sparseLength
1976
1996
  for i = 1, argsLen do
1977
1997
  sparseArray[listLen + i] = args[i]
@@ -2086,6 +2106,8 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
2086
2106
  local trace
2087
2107
  if thread == nil and message == nil and level == nil then
2088
2108
  trace = originalTraceback()
2109
+ elseif __TS__StringIncludes(_VERSION, "Lua 5.0") then
2110
+ trace = originalTraceback((("[Level " .. tostring(level)) .. "] ") .. message)
2089
2111
  else
2090
2112
  trace = originalTraceback(thread, message, level)
2091
2113
  end
@@ -2111,7 +2133,7 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
2111
2133
  local function stringReplacer(____, file, line)
2112
2134
  local fileSourceMap = _G.__TS__sourcemap[file]
2113
2135
  if fileSourceMap and fileSourceMap[line] then
2114
- local chunkName = string.match(file, "%[string \"([^\"]+)\"%]")
2136
+ local chunkName = __TS__Match(file, "%[string \"([^\"]+)\"%]")
2115
2137
  local sourceName = string.gsub(chunkName, ".lua$", ".ts")
2116
2138
  local data = fileSourceMap[line]
2117
2139
  if type(data) == "number" then
@@ -2178,16 +2200,6 @@ local function __TS__StringEndsWith(self, searchString, endPosition)
2178
2200
  return string.sub(self, endPosition - #searchString + 1, endPosition) == searchString
2179
2201
  end
2180
2202
 
2181
- local function __TS__StringIncludes(self, searchString, position)
2182
- if not position then
2183
- position = 1
2184
- else
2185
- position = position + 1
2186
- end
2187
- local index = string.find(self, searchString, position, true)
2188
- return index ~= nil
2189
- end
2190
-
2191
2203
  local function __TS__StringPadEnd(self, maxLength, fillString)
2192
2204
  if fillString == nil then
2193
2205
  fillString = " "
@@ -2443,6 +2455,7 @@ return {
2443
2455
  __TS__Class = __TS__Class,
2444
2456
  __TS__ClassExtends = __TS__ClassExtends,
2445
2457
  __TS__CloneDescriptor = __TS__CloneDescriptor,
2458
+ __TS__CountVarargs = __TS__CountVarargs,
2446
2459
  __TS__Decorate = __TS__Decorate,
2447
2460
  __TS__DecorateParam = __TS__DecorateParam,
2448
2461
  __TS__Delete = __TS__Delete,
@@ -2460,8 +2473,11 @@ return {
2460
2473
  __TS__Iterator = __TS__Iterator,
2461
2474
  __TS__LuaIteratorSpread = __TS__LuaIteratorSpread,
2462
2475
  Map = Map,
2476
+ __TS__Match = __TS__Match,
2463
2477
  __TS__MathAtan2 = __TS__MathAtan2,
2478
+ __TS__MathModf = __TS__MathModf,
2464
2479
  __TS__MathSign = __TS__MathSign,
2480
+ __TS__Modulo50 = __TS__Modulo50,
2465
2481
  __TS__New = __TS__New,
2466
2482
  __TS__Number = __TS__Number,
2467
2483
  __TS__NumberIsFinite = __TS__NumberIsFinite,
package/dist/package.lua CHANGED
@@ -1,6 +1,6 @@
1
1
  return {
2
2
  name = "isaacscript-common",
3
- version = "9.19.2",
3
+ version = "10.0.0",
4
4
  description = "Helper functions and features for IsaacScript mods.",
5
5
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
6
6
  homepage = "https://isaacscript.github.io/",
@@ -11,5 +11,5 @@ return {
11
11
  type = "commonjs",
12
12
  main = "dist/src/index",
13
13
  types = "dist/src/index.d.ts",
14
- dependencies = {["isaac-typescript-definitions"] = "^5.0.5"}
14
+ dependencies = {["isaac-typescript-definitions"] = "^7.0.0"}
15
15
  }
@@ -0,0 +1,3 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ export declare function preGetPedestalInit(mod: Mod): void;
3
+ //# sourceMappingURL=preGetPedestal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preGetPedestal.d.ts","sourceRoot":"","sources":["../../../src/callbacks/preGetPedestal.ts"],"names":[],"mappings":";AAUA,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAMjD"}
@@ -0,0 +1,40 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, prePickupCollision
3
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
+ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
5
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
6
+ local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
7
+ local ____preGetPedestal = require("src.callbacks.subscriptions.preGetPedestal")
8
+ local preGetPedestalFire = ____preGetPedestal.preGetPedestalFire
9
+ local preGetPedestalHasSubscriptions = ____preGetPedestal.preGetPedestalHasSubscriptions
10
+ function hasSubscriptions(self)
11
+ return preGetPedestalHasSubscriptions(nil)
12
+ end
13
+ function prePickupCollision(self, pickup, collider, _low)
14
+ if not hasSubscriptions(nil) then
15
+ return nil
16
+ end
17
+ local collectible = pickup
18
+ if collectible.SubType == CollectibleType.NULL then
19
+ return nil
20
+ end
21
+ local player = collider:ToPlayer()
22
+ if player == nil then
23
+ return nil
24
+ end
25
+ local numCoins = player:GetNumCoins()
26
+ if collectible.Price > numCoins then
27
+ return nil
28
+ end
29
+ if collectible.Wait > 0 or player.ItemHoldCooldown > 0 then
30
+ return nil
31
+ end
32
+ if player:IsHoldingItem() then
33
+ return nil
34
+ end
35
+ return preGetPedestalFire(nil, player, collectible)
36
+ end
37
+ function ____exports.preGetPedestalInit(self, mod)
38
+ mod:AddCallback(ModCallback.PRE_PICKUP_COLLISION, prePickupCollision, PickupVariant.COLLECTIBLE)
39
+ end
40
+ return ____exports
@@ -0,0 +1,10 @@
1
+ import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
+ export declare type PreGetPedestalRegisterParameters = [
3
+ callback: (player: EntityPlayer, collectible: EntityPickupCollectible) => boolean | undefined,
4
+ playerVariant?: PlayerVariant,
5
+ character?: PlayerType
6
+ ];
7
+ export declare function preGetPedestalHasSubscriptions(): boolean;
8
+ export declare function preGetPedestalRegister(...args: PreGetPedestalRegisterParameters): void;
9
+ export declare function preGetPedestalFire(player: EntityPlayer, collectible: EntityPickupCollectible): boolean | undefined;
10
+ //# sourceMappingURL=preGetPedestal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preGetPedestal.d.ts","sourceRoot":"","sources":["../../../../src/callbacks/subscriptions/preGetPedestal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEzE,oBAAY,gCAAgC,GAAG;IAC7C,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,uBAAuB,KACjC,OAAO,GAAG,SAAS;IACxB,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC;AAIF,wBAAgB,8BAA8B,IAAI,OAAO,CAExD;AAED,wBAAgB,sBAAsB,CACpC,GAAG,IAAI,EAAE,gCAAgC,GACxC,IAAI,CAEN;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,uBAAuB,GACnC,OAAO,GAAG,SAAS,CA4BrB"}
@@ -0,0 +1,32 @@
1
+ local ____exports = {}
2
+ local subscriptions = {}
3
+ function ____exports.preGetPedestalHasSubscriptions(self)
4
+ return #subscriptions > 0
5
+ end
6
+ function ____exports.preGetPedestalRegister(self, ...)
7
+ local args = {...}
8
+ subscriptions[#subscriptions + 1] = args
9
+ end
10
+ function ____exports.preGetPedestalFire(self, player, collectible)
11
+ local character = player:GetPlayerType()
12
+ for ____, ____value in ipairs(subscriptions) do
13
+ local callback = ____value[1]
14
+ local callbackPlayerVariant = ____value[2]
15
+ local callbackCharacter = ____value[3]
16
+ do
17
+ if callbackPlayerVariant ~= nil and callbackPlayerVariant ~= player.Variant then
18
+ goto __continue5
19
+ end
20
+ if callbackCharacter ~= nil and callbackCharacter ~= character then
21
+ goto __continue5
22
+ end
23
+ local returnValue = callback(nil, player, collectible)
24
+ if returnValue ~= nil then
25
+ return returnValue
26
+ end
27
+ end
28
+ ::__continue5::
29
+ end
30
+ return nil
31
+ end
32
+ return ____exports
@@ -1392,6 +1392,25 @@ export declare enum ModCallbackCustom {
1392
1392
  * ```
1393
1393
  */
1394
1394
  PRE_CUSTOM_REVIVE = 90,
1395
+ /**
1396
+ * Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
1397
+ * meets all of the conditions to pick it up.
1398
+ *
1399
+ * The return values of this callback are the same as the `PRE_PICKUP_COLLISION` callback. For
1400
+ * example, you can prevent a player from picking up the collectible by returning false. (However,
1401
+ * note that this callback will continue to fire for every frame that the player touches the
1402
+ * pedestal, so you would need to continue returning false.)
1403
+ *
1404
+ * - When registering the callback, takes an optional second argument that will make the callback
1405
+ * only fire if the player matches the `PlayerVariant` provided.
1406
+ * - When registering the callback, takes an optional third argument that will make the callback
1407
+ * only fire if the player matches the `PlayerType` provided.
1408
+ *
1409
+ * ```ts
1410
+ * function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
1411
+ * ```
1412
+ */
1413
+ PRE_GET_PEDESTAL = 91,
1395
1414
  /**
1396
1415
  * Fires from the `POST_PEFFECT_UPDATE` callback when an item becomes queued (i.e. when the player
1397
1416
  * begins to hold the item above their head).
@@ -1410,7 +1429,7 @@ export declare enum ModCallbackCustom {
1410
1429
  * ): void {}
1411
1430
  * ```
1412
1431
  */
1413
- PRE_ITEM_PICKUP = 91,
1432
+ PRE_ITEM_PICKUP = 92,
1414
1433
  /**
1415
1434
  * Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
1416
1435
  * player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
@@ -1424,6 +1443,6 @@ export declare enum ModCallbackCustom {
1424
1443
  * function preNewLevel(player: EntityPlayer): void {}
1425
1444
  * ```
1426
1445
  */
1427
- PRE_NEW_LEVEL = 92
1446
+ PRE_NEW_LEVEL = 93
1428
1447
  }
1429
1448
  //# sourceMappingURL=ModCallbackCustom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;;;;;OAUG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;OAUG;IACH,mBAAmB,IAAA;IAEnB;;;;;;;;;OASG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;OAYG;IACH,mBAAmB,IAAA;IAEnB;;;;;;OAMG;IACH,eAAe,IAAA;IAEf;;;;;;;;;;;;;OAaG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,2BAA2B,IAAA;IAE3B;;;;;;;;OAQG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;;;;OAYG;IACH,qBAAqB,KAAA;IAErB;;;;;;;;;;;;;;OAcG;IACH,yBAAyB,KAAA;IAEzB;;;;;;;OAOG;IACH,YAAY,KAAA;IAEZ;;;;;;;;;;;;OAYG;IACH,uBAAuB,KAAA;IAEvB;;;;;;;;;;;;;;;OAeG;IACH,2BAA2B,KAAA;IAE3B;;;;;;;;;;OAUG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;OAWG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;OAWG;IACH,SAAS,KAAA;IAET;;;;;;;;;OASG;IACH,2BA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;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;;OAUG;IACH,uBAAuB,KAAA;IAEvB;;;;;;;;;;;;OAYG;IACH,cAAc,KAAA;IAEd;;;;;;;;;OASG;IACH,2BAA2B,KAAA;IAE3B;;;;;;;;;;;;;;;;;;OAkBG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;;;OAcG;IACH,cAAc,KAAA;IAEd;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;OAYG;IACH,aAAa,KAAA;CACd"}
1
+ {"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;;;;;OAUG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;OAUG;IACH,mBAAmB,IAAA;IAEnB;;;;;;;;;OASG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;OAYG;IACH,mBAAmB,IAAA;IAEnB;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IAElB;;;;;;;;;;;;;OAaG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;;OAiBG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;OAYG;IACH,aAAa,KAAA;CACd"}
@@ -188,8 +188,10 @@ ____exports.ModCallbackCustom.PRE_BERSERK_DEATH = 89
188
188
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.PRE_BERSERK_DEATH] = "PRE_BERSERK_DEATH"
189
189
  ____exports.ModCallbackCustom.PRE_CUSTOM_REVIVE = 90
190
190
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.PRE_CUSTOM_REVIVE] = "PRE_CUSTOM_REVIVE"
191
- ____exports.ModCallbackCustom.PRE_ITEM_PICKUP = 91
191
+ ____exports.ModCallbackCustom.PRE_GET_PEDESTAL = 91
192
+ ____exports.ModCallbackCustom[____exports.ModCallbackCustom.PRE_GET_PEDESTAL] = "PRE_GET_PEDESTAL"
193
+ ____exports.ModCallbackCustom.PRE_ITEM_PICKUP = 92
192
194
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.PRE_ITEM_PICKUP] = "PRE_ITEM_PICKUP"
193
- ____exports.ModCallbackCustom.PRE_NEW_LEVEL = 92
195
+ ____exports.ModCallbackCustom.PRE_NEW_LEVEL = 93
194
196
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.PRE_NEW_LEVEL] = "PRE_NEW_LEVEL"
195
197
  return ____exports
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- /// <reference types="typescript-to-lua/language-extensions" />
2
+ /// <reference types="@typescript-to-lua/language-extensions" />
3
3
  import { SaveData } from "../../interfaces/SaveData";
4
4
  export declare function loadFromDisk(mod: Mod, oldSaveData: LuaMap<string, SaveData>): void;
5
5
  //# sourceMappingURL=load.d.ts.map
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  import { SaveData } from "../../interfaces/SaveData";
3
3
  /**
4
4
  * The save data map is indexed by subscriber name. We use Lua tables instead of TypeScriptToLua
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  /**
3
3
  * `merge` takes the values from a new table and recursively merges them into an old object (while
4
4
  * performing appropriate deserialization).
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
- /// <reference types="typescript-to-lua/language-extensions" />
2
+ /// <reference types="@typescript-to-lua/language-extensions" />
3
3
  import { SaveData } from "../../interfaces/SaveData";
4
4
  export declare function saveToDisk(mod: Mod, saveDataMap: LuaMap<string, SaveData>, saveDataConditionalFuncMap: LuaMap<string, () => boolean>): void;
5
5
  //# sourceMappingURL=save.d.ts.map
@@ -27,6 +27,12 @@ export declare function filter<T>(array: T[], func: (value: T, index: number, ar
27
27
  * Internally, this just calls `array.find`.
28
28
  */
29
29
  export declare function find<T>(array: T[], func: (value: T, index: number, array: T[]) => boolean): T | undefined;
30
+ /**
31
+ * Helper function for non-TypeScript users to iterate over an array.
32
+ *
33
+ * Internally, this just calls `array.forEach`.
34
+ */
35
+ export declare function forEach<T>(array: T[], func: (value: T, index: number, array: T[]) => void): void;
30
36
  /**
31
37
  * Helper function for non-TypeScript users to check if an element is in an array.
32
38
  *
@@ -50,4 +56,11 @@ export declare function join<T>(array: T[], separator: string): string;
50
56
  * Internally, this just calls `array.map`.
51
57
  */
52
58
  export declare function map<T, U>(array: T[], func: (value: T, index: number, array: T[]) => U): U[];
59
+ /**
60
+ * Helper function for non-TypeScript users to check if one or more elements in the array is equal
61
+ * to a condition.
62
+ *
63
+ * Internally, this just calls `array.some`.
64
+ */
65
+ export declare function some<T>(array: T[], func: (value: T, index: number, array: T[]) => boolean): boolean;
53
66
  //# sourceMappingURL=arrayLua.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrayLua.d.ts","sourceRoot":"","sources":["../../../src/functions/arrayLua.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,EACrB,KAAK,EAAE,CAAC,EAAE,EACV,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,GACrD,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,KAAK,EAAE,CAAC,EAAE,EACV,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,GACrD,CAAC,EAAE,CAEL;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,KAAK,EAAE,CAAC,EAAE,EACV,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,GACrD,CAAC,GAAG,SAAS,CAEf;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EA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C,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EACtB,KAAK,EAAE,CAAC,EAAE,EACV,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,GAC/C,CAAC,EAAE,CAEL;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,EACpB,KAAK,EAAE,CAAC,EAAE,EACV,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,GACrD,OAAO,CAET"}
@@ -2,9 +2,11 @@ local ____lualib = require("lualib_bundle")
2
2
  local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
3
3
  local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
4
4
  local __TS__ArrayFind = ____lualib.__TS__ArrayFind
5
+ local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
5
6
  local __TS__ArrayIncludes = ____lualib.__TS__ArrayIncludes
6
7
  local __TS__ArrayJoin = ____lualib.__TS__ArrayJoin
7
8
  local __TS__ArrayMap = ____lualib.__TS__ArrayMap
9
+ local __TS__ArraySome = ____lualib.__TS__ArraySome
8
10
  local ____exports = {}
9
11
  --- Helper function for non-TypeScript users to check if every element in the array is equal to a
10
12
  -- condition.
@@ -26,6 +28,12 @@ end
26
28
  function ____exports.find(self, array, func)
27
29
  return __TS__ArrayFind(array, func)
28
30
  end
31
+ --- Helper function for non-TypeScript users to iterate over an array.
32
+ --
33
+ -- Internally, this just calls `array.forEach`.
34
+ function ____exports.forEach(self, array, func)
35
+ __TS__ArrayForEach(array, func)
36
+ end
29
37
  --- Helper function for non-TypeScript users to check if an element is in an array.
30
38
  --
31
39
  -- Since this takes O(N) time, using this function is usually a mistake, since you can use a `Map`
@@ -49,4 +57,11 @@ end
49
57
  function ____exports.map(self, array, func)
50
58
  return __TS__ArrayMap(array, func)
51
59
  end
60
+ --- Helper function for non-TypeScript users to check if one or more elements in the array is equal
61
+ -- to a condition.
62
+ --
63
+ -- Internally, this just calls `array.some`.
64
+ function ____exports.some(self, array, func)
65
+ return __TS__ArraySome(array, func)
66
+ end
52
67
  return ____exports
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  export declare type SerializedBitSet128 = LuaMap<string, unknown> & {
4
4
  readonly __serializedBitSet128Brand: symbol;
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  /// <reference types="isaac-typescript-definitions" />
4
4
  /// <reference types="isaac-typescript-definitions" />
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  import { EntityType } from "isaac-typescript-definitions";
3
3
  import { AnyEntity } from "../types/AnyEntity";
4
4
  /**
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  /**
3
3
  * Helper function to get a set containing all of the global variable names that are contained
4
4
  * within the Isaac environment by default.
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  /**
3
3
  * Converts a JSON string to a Lua table.
4
4
  *
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  /// <reference types="isaac-typescript-definitions" />
4
4
  /// <reference types="isaac-typescript-definitions" />
@@ -1,4 +1,4 @@
1
- /// <reference types="typescript-to-lua/language-extensions" />
1
+ /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  import { CollectibleType, DamageFlag, EntityFlag, ProjectileFlag, TearFlag, UseFlag } from "isaac-typescript-definitions";
3
3
  /**
4
4
  * Helper function to prefix the name of the function and the line number before a debug message.
@@ -66,7 +66,7 @@ export declare function logTable(luaTable: unknown, parentTables?: number): void
66
66
  * Helper function to print out the differences between the entries of two tables. Note that this
67
67
  * will only do a shallow comparison.
68
68
  */
69
- export declare function logTableDifferences<K, V>(table1: LuaMap<K, V>, table2: LuaMap<K, V>): void;
69
+ export declare function logTableDifferences<K extends AnyNotNil, V>(table1: LuaMap<K, V>, table2: LuaMap<K, V>): void;
70
70
  /** Helper function for printing out every tear flag that is turned on. Useful when debugging. */
71
71
  export declare function logTearFlags(flags: TearFlag | BitFlags<TearFlag>): void;
72
72
  /** Helper function for printing out every use flag that is turned on. Useful when debugging. */
@@ -1 +1 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/functions/log.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,eAAe,EACf,UAAU,EACV,UAAU,EAKV,cAAc,EAGd,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAkBtC;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EAKX,kBAAkB,SAAI,GACrB,MAAM,CAiBR;AAED;;;;;GAKG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGrC;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,IAAI,CAG3D;AAED,wBAAgB,mBA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AAI,CAoB1D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC,GAC/C,IAAI,CAEN;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CA4B9B;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAiBrC;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,CAUzE;AAED,gFAAgF;AAChF,wBAAgB,SAAS,IAAI,IAAI,CAQhC;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,SAAI,GAAG,IAAI,CA2ClE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EACxD,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACnB,IAAI,CA8BN;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAEvE;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAEpE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAoBnD;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,IAAI,CAG7D"}
@@ -20,8 +20,10 @@ export declare function anyPlayerCloserThan(position: Vector, distance: float):
20
20
  * @param startingPosition The position to start searching from. If this position is not overlapping
21
21
  * with anything, then it will be returned.
22
22
  * @param avoidActiveEntities Optional. Default is false.
23
+ * @param minimumDistance Optional. If specified, will ensure that the randomly generated position
24
+ * is equal to or greater than the distance provided.
23
25
  */
24
- export declare function findFreePosition(startingPosition: Vector, avoidActiveEntities?: boolean): Vector;
26
+ export declare function findFreePosition(startingPosition: Vector, avoidActiveEntities?: boolean, minimumDistance?: float): Vector;
25
27
  /**
26
28
  * Helper function to get a map containing the positions of every entity in the current room.
27
29
  *
@@ -1 +1 @@
1
- {"version":3,"file":"positionVelocity.d.ts","sourceRoot":"","sources":["../../../src/functions/positionVelocity.ts"],"names":[],"mappings":";;;;AAaA,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,GACZ,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,KAAK,GACd,OAAO,CAKT;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,gBAAgB,EAAE,MAAM,EACxB,mBAAmB,UAAQ,GAC1B,MAAM,CAiCR;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY7E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,IAAI,CAYN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EACtC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,IAAI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