{
  "_format": "hh3-sol-build-info-1",
  "id": "solc-0_8_30-ce7ccc34c8ce5a5834c5c7141e779845a204959a",
  "solcVersion": "0.8.30",
  "solcLongVersion": "0.8.30+commit.73712a01",
  "userSourceNameMap": {
    "@account-abstraction/contracts/interfaces/IEntryPoint.sol": "npm/@account-abstraction/contracts@0.8.0/interfaces/IEntryPoint.sol",
    "@openzeppelin/contracts/token/ERC20/IERC20.sol": "npm/@openzeppelin/contracts@5.6.1/token/ERC20/IERC20.sol",
    "contracts/AccessControlAccount.sol": "project/contracts/AccessControlAccount.sol",
    "contracts/AccessManagerAccount.sol": "project/contracts/AccessManagerAccount.sol",
    "contracts/dependencies/AccessManager.sol": "project/contracts/dependencies/AccessManager.sol",
    "contracts/dependencies/FrozenTime.sol": "project/contracts/dependencies/FrozenTime.sol",
    "contracts/ERC2771ForwarderAccount.sol": "project/contracts/ERC2771ForwarderAccount.sol",
    "contracts/mock/ERC20With2771.sol": "project/contracts/mock/ERC20With2771.sol",
    "contracts/mock/ERC2771Probe.sol": "project/contracts/mock/ERC2771Probe.sol",
    "contracts/mock/MockAccessManager.sol": "project/contracts/mock/MockAccessManager.sol",
    "contracts/mock/MockWorkload.sol": "project/contracts/mock/MockWorkload.sol",
    "contracts/UnifiedForwarderAccount.sol": "project/contracts/UnifiedForwarderAccount.sol"
  },
  "input": {
    "language": "Solidity",
    "settings": {
      "evmVersion": "prague",
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "": [
            "ast"
          ],
          "*": [
            "abi",
            "evm.bytecode",
            "evm.deployedBytecode",
            "evm.methodIdentifiers",
            "metadata"
          ]
        }
      },
      "remappings": [
        "npm/@openzeppelin/contracts-upgradeable@5.6.1/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@account-abstraction/contracts/=npm/@account-abstraction/contracts@0.8.0/",
        "project/:@openzeppelin/contracts-upgradeable/=npm/@openzeppelin/contracts-upgradeable@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:@openzeppelin/contracts/=npm/@openzeppelin/contracts@5.6.1/",
        "project/:solidity-bytes-utils/=npm/solidity-bytes-utils@0.8.4/"
      ]
    },
    "sources": {
      "npm/@account-abstraction/contracts@0.8.0/core/BaseAccount.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-empty-blocks */\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/IAccount.sol\";\nimport \"../interfaces/IEntryPoint.sol\";\nimport \"../utils/Exec.sol\";\nimport \"./UserOperationLib.sol\";\n\n/**\n * Basic account implementation.\n * This contract provides the basic logic for implementing the IAccount interface - validateUserOp\n * Specific account implementation should inherit it and provide the account-specific logic.\n */\nabstract contract BaseAccount is IAccount {\n    using UserOperationLib for PackedUserOperation;\n\n    struct Call {\n        address target;\n        uint256 value;\n        bytes data;\n    }\n\n    error ExecuteError(uint256 index, bytes error);\n\n    /**\n     * Return the account nonce.\n     * This method returns the next sequential nonce.\n     * For a nonce of a specific key, use `entrypoint.getNonce(account, key)`\n     */\n    function getNonce() public view virtual returns (uint256) {\n        return entryPoint().getNonce(address(this), 0);\n    }\n\n    /**\n     * Return the entryPoint used by this account.\n     * Subclass should return the current entryPoint used by this account.\n     */\n    function entryPoint() public view virtual returns (IEntryPoint);\n\n    /**\n     * execute a single call from the account.\n     */\n    function execute(address target, uint256 value, bytes calldata data) virtual external {\n        _requireForExecute();\n\n        bool ok = Exec.call(target, value, data, gasleft());\n        if (!ok) {\n            Exec.revertWithReturnData();\n        }\n    }\n\n    /**\n     * execute a batch of calls.\n     * revert on the first call that fails.\n     * If the batch reverts, and it contains more than a single call, then wrap the revert with ExecuteError,\n     *  to mark the failing call index.\n     */\n    function executeBatch(Call[] calldata calls) virtual external {\n        _requireForExecute();\n\n        uint256 callsLength = calls.length;\n        for (uint256 i = 0; i < callsLength; i++) {\n            Call calldata call = calls[i];\n            bool ok = Exec.call(call.target, call.value, call.data, gasleft());\n            if (!ok) {\n                if (callsLength == 1) {\n                    Exec.revertWithReturnData();\n                } else {\n                    revert ExecuteError(i, Exec.getReturnData(0));\n                }\n            }\n        }\n    }\n\n    /// @inheritdoc IAccount\n    function validateUserOp(\n        PackedUserOperation calldata userOp,\n        bytes32 userOpHash,\n        uint256 missingAccountFunds\n    ) external virtual override returns (uint256 validationData) {\n        _requireFromEntryPoint();\n        validationData = _validateSignature(userOp, userOpHash);\n        _validateNonce(userOp.nonce);\n        _payPrefund(missingAccountFunds);\n    }\n\n    /**\n     * Ensure the request comes from the known entrypoint.\n     */\n    function _requireFromEntryPoint() internal view virtual {\n        require(\n            msg.sender == address(entryPoint()),\n            \"account: not from EntryPoint\"\n        );\n    }\n\n    function _requireForExecute() internal view virtual {\n        _requireFromEntryPoint();\n    }\n\n    /**\n     * Validate the signature is valid for this message.\n     * @param userOp          - Validate the userOp.signature field.\n     * @param userOpHash      - Convenient field: the hash of the request, to check the signature against.\n     *                          (also hashes the entrypoint and chain id)\n     * @return validationData - Signature and time-range of this operation.\n     *                          <20-byte> aggregatorOrSigFail - 0 for valid signature, 1 to mark signature failure,\n     *                                    otherwise, an address of an aggregator contract.\n     *                          <6-byte> validUntil - Last timestamp this operation is valid at, or 0 for \"indefinitely\"\n     *                          <6-byte> validAfter - first timestamp this operation is valid\n     *                          If the account doesn't use time-range, it is enough to return\n     *                          SIG_VALIDATION_FAILED value (1) for signature failure.\n     *                          Note that the validation code cannot use block.timestamp (or block.number) directly.\n     */\n    function _validateSignature(\n        PackedUserOperation calldata userOp,\n        bytes32 userOpHash\n    ) internal virtual returns (uint256 validationData);\n\n    /**\n     * Validate the nonce of the UserOperation.\n     * This method may validate the nonce requirement of this account.\n     * e.g.\n     * To limit the nonce to use sequenced UserOps only (no \"out of order\" UserOps):\n     *      `require(nonce < type(uint64).max)`\n     * For a hypothetical account that *requires* the nonce to be out-of-order:\n     *      `require(nonce & type(uint64).max == 0)`\n     *\n     * The actual nonce uniqueness is managed by the EntryPoint, and thus no other\n     * action is needed by the account itself.\n     *\n     * @param nonce to validate\n     *\n     * solhint-disable-next-line no-empty-blocks\n     */\n    function _validateNonce(uint256 nonce) internal view virtual {\n    }\n\n    /**\n     * Sends to the entrypoint (msg.sender) the missing funds for this transaction.\n     * SubClass MAY override this method for better funds management\n     * (e.g. send to the entryPoint more than the minimum required, so that in future transactions\n     * it will not be required to send again).\n     * @param missingAccountFunds - The minimum value this method should send the entrypoint.\n     *                              This value MAY be zero, in case there is enough deposit,\n     *                              or the userOp has a paymaster.\n     */\n    function _payPrefund(uint256 missingAccountFunds) internal virtual {\n        if (missingAccountFunds != 0) {\n            (bool success,) = payable(msg.sender).call{\n                    value: missingAccountFunds\n                }(\"\");\n            (success);\n            // Ignore failure (its EntryPoint's job to verify, not account.)\n        }\n    }\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/core/Helpers.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n/* solhint-disable no-inline-assembly */\n\n\n /*\n  * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n  * must return this value in case of signature failure, instead of revert.\n  */\nuint256 constant SIG_VALIDATION_FAILED = 1;\n\n\n/*\n * For simulation purposes, validateUserOp (and validatePaymasterUserOp)\n * return this value on success.\n */\nuint256 constant SIG_VALIDATION_SUCCESS = 0;\n\n\n/**\n * Returned data from validateUserOp.\n * validateUserOp returns a uint256, which is created by `_packedValidationData` and\n * parsed by `_parseValidationData`.\n * @param aggregator  - address(0) - The account validated the signature by itself.\n *                      address(1) - The account failed to validate the signature.\n *                      otherwise - This is an address of a signature aggregator that must\n *                                  be used to validate the signature.\n * @param validAfter  - This UserOp is valid only after this timestamp.\n * @param validUntil - Last timestamp this operation is valid at, or 0 for \"indefinitely\".\n */\nstruct ValidationData {\n    address aggregator;\n    uint48 validAfter;\n    uint48 validUntil;\n}\n\n/**\n * Extract aggregator/sigFailed, validAfter, validUntil.\n * Also convert zero validUntil to type(uint48).max.\n * @param validationData - The packed validation data.\n * @return data - The unpacked in-memory validation data.\n */\nfunction _parseValidationData(\n    uint256 validationData\n) pure returns (ValidationData memory data) {\n    address aggregator = address(uint160(validationData));\n    uint48 validUntil = uint48(validationData >> 160);\n    if (validUntil == 0) {\n        validUntil = type(uint48).max;\n    }\n    uint48 validAfter = uint48(validationData >> (48 + 160));\n    return ValidationData(aggregator, validAfter, validUntil);\n}\n\n/**\n * Helper to pack the return value for validateUserOp.\n * @param data - The ValidationData to pack.\n * @return the packed validation data.\n */\nfunction _packValidationData(\n    ValidationData memory data\n) pure returns (uint256) {\n    return\n        uint160(data.aggregator) |\n        (uint256(data.validUntil) << 160) |\n        (uint256(data.validAfter) << (160 + 48));\n}\n\n/**\n * Helper to pack the return value for validateUserOp, when not using an aggregator.\n * @param sigFailed  - True for signature failure, false for success.\n * @param validUntil - Last timestamp this operation is valid at, or 0 for \"indefinitely\".\n * @param validAfter - First timestamp this UserOperation is valid.\n * @return the packed validation data.\n */\nfunction _packValidationData(\n    bool sigFailed,\n    uint48 validUntil,\n    uint48 validAfter\n) pure returns (uint256) {\n    return\n        (sigFailed ?  SIG_VALIDATION_FAILED : SIG_VALIDATION_SUCCESS) |\n        (uint256(validUntil) << 160) |\n        (uint256(validAfter) << (160 + 48));\n}\n\n/**\n * keccak function over calldata.\n * @dev copy calldata into memory, do keccak and drop allocated memory. Strangely, this is more efficient than letting solidity do it.\n *\n * @param data - the calldata bytes array to perform keccak on.\n * @return ret - the keccak hash of the 'data' array.\n */\n    function calldataKeccak(bytes calldata data) pure returns (bytes32 ret) {\n        assembly (\"memory-safe\") {\n            let mem := mload(0x40)\n            let len := data.length\n            calldatacopy(mem, data.offset, len)\n            ret := keccak256(mem, len)\n        }\n    }\n\n\n/**\n * The minimum of two numbers.\n * @param a - First number.\n * @param b - Second number.\n * @return - the minimum value.\n */\n    function min(uint256 a, uint256 b) pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n/**\n * standard solidity memory allocation finalization.\n * copied from solidity generated code\n * @param memPointer - The current memory pointer\n * @param allocationSize - Bytes allocated from memPointer.\n */\n    function finalizeAllocation(uint256 memPointer, uint256 allocationSize) pure {\n\n        assembly (\"memory-safe\"){\n            finalize_allocation(memPointer, allocationSize)\n\n            function finalize_allocation(memPtr, size) {\n                let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))\n                mstore(64, newFreePtr)\n            }\n\n            function round_up_to_mul_of_32(value) -> result {\n                result := and(add(value, 31), not(31))\n            }\n        }\n    }\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/core/UserOperationLib.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n/* solhint-disable no-inline-assembly */\n\nimport \"../interfaces/PackedUserOperation.sol\";\nimport {calldataKeccak, min} from \"./Helpers.sol\";\n\n/**\n * Utility functions helpful when working with UserOperation structs.\n */\nlibrary UserOperationLib {\n\n    uint256 public constant PAYMASTER_VALIDATION_GAS_OFFSET = 20;\n    uint256 public constant PAYMASTER_POSTOP_GAS_OFFSET = 36;\n    uint256 public constant PAYMASTER_DATA_OFFSET = 52;\n\n    /**\n     * Relayer/block builder might submit the TX with higher priorityFee,\n     * but the user should not pay above what he signed for.\n     * @param userOp - The user operation data.\n     */\n    function gasPrice(\n        PackedUserOperation calldata userOp\n    ) internal view returns (uint256) {\n        unchecked {\n            (uint256 maxPriorityFeePerGas, uint256 maxFeePerGas) = unpackUints(userOp.gasFees);\n            return min(maxFeePerGas, maxPriorityFeePerGas + block.basefee);\n        }\n    }\n\n    bytes32 internal constant PACKED_USEROP_TYPEHASH =\n    keccak256(\n        \"PackedUserOperation(address sender,uint256 nonce,bytes initCode,bytes callData,bytes32 accountGasLimits,uint256 preVerificationGas,bytes32 gasFees,bytes paymasterAndData)\"\n    );\n\n    /**\n     * Pack the user operation data into bytes for hashing.\n     * @param userOp - The user operation data.\n     * @param overrideInitCodeHash - If set, encode this instead of the initCode field in the userOp.\n     */\n    function encode(\n        PackedUserOperation calldata userOp,\n        bytes32 overrideInitCodeHash\n    ) internal pure returns (bytes memory ret) {\n        address sender = userOp.sender;\n        uint256 nonce = userOp.nonce;\n        bytes32 hashInitCode = overrideInitCodeHash != 0 ? overrideInitCodeHash : calldataKeccak(userOp.initCode);\n        bytes32 hashCallData = calldataKeccak(userOp.callData);\n        bytes32 accountGasLimits = userOp.accountGasLimits;\n        uint256 preVerificationGas = userOp.preVerificationGas;\n        bytes32 gasFees = userOp.gasFees;\n        bytes32 hashPaymasterAndData = calldataKeccak(userOp.paymasterAndData);\n\n        return abi.encode(\n            UserOperationLib.PACKED_USEROP_TYPEHASH,\n            sender, nonce,\n            hashInitCode, hashCallData,\n            accountGasLimits, preVerificationGas, gasFees,\n            hashPaymasterAndData\n        );\n    }\n\n    function unpackUints(\n        bytes32 packed\n    ) internal pure returns (uint256 high128, uint256 low128) {\n        return (unpackHigh128(packed), unpackLow128(packed));\n    }\n\n    // Unpack just the high 128-bits from a packed value\n    function unpackHigh128(bytes32 packed) internal pure returns (uint256) {\n        return uint256(packed) >> 128;\n    }\n\n    // Unpack just the low 128-bits from a packed value\n    function unpackLow128(bytes32 packed) internal pure returns (uint256) {\n        return uint128(uint256(packed));\n    }\n\n    function unpackMaxPriorityFeePerGas(PackedUserOperation calldata userOp)\n    internal pure returns (uint256) {\n        return unpackHigh128(userOp.gasFees);\n    }\n\n    function unpackMaxFeePerGas(PackedUserOperation calldata userOp)\n    internal pure returns (uint256) {\n        return unpackLow128(userOp.gasFees);\n    }\n\n    function unpackVerificationGasLimit(PackedUserOperation calldata userOp)\n    internal pure returns (uint256) {\n        return unpackHigh128(userOp.accountGasLimits);\n    }\n\n    function unpackCallGasLimit(PackedUserOperation calldata userOp)\n    internal pure returns (uint256) {\n        return unpackLow128(userOp.accountGasLimits);\n    }\n\n    function unpackPaymasterVerificationGasLimit(PackedUserOperation calldata userOp)\n    internal pure returns (uint256) {\n        return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET]));\n    }\n\n    function unpackPostOpGasLimit(PackedUserOperation calldata userOp)\n    internal pure returns (uint256) {\n        return uint128(bytes16(userOp.paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]));\n    }\n\n    function unpackPaymasterStaticFields(\n        bytes calldata paymasterAndData\n    ) internal pure returns (address paymaster, uint256 validationGasLimit, uint256 postOpGasLimit) {\n        return (\n            address(bytes20(paymasterAndData[: PAYMASTER_VALIDATION_GAS_OFFSET])),\n            uint128(bytes16(paymasterAndData[PAYMASTER_VALIDATION_GAS_OFFSET : PAYMASTER_POSTOP_GAS_OFFSET])),\n            uint128(bytes16(paymasterAndData[PAYMASTER_POSTOP_GAS_OFFSET : PAYMASTER_DATA_OFFSET]))\n        );\n    }\n\n    /**\n     * Hash the user operation data.\n     * @param userOp - The user operation data.\n     * @param overrideInitCodeHash - If set, the initCode hash will be replaced with this value just for UserOp hashing.\n     */\n    function hash(\n        PackedUserOperation calldata userOp,\n        bytes32 overrideInitCodeHash\n    ) internal pure returns (bytes32) {\n        return keccak256(encode(userOp, overrideInitCodeHash));\n    }\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/IAccount.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccount {\n    /**\n     * Validate user's signature and nonce\n     * the entryPoint will make the call to the recipient only if this validation call returns successfully.\n     * signature failure should be reported by returning SIG_VALIDATION_FAILED (1).\n     * This allows making a \"simulation call\" without a valid signature\n     * Other failures (e.g. nonce mismatch, or invalid signature format) should still revert to signal failure.\n     *\n     * @dev Must validate caller is the entryPoint.\n     *      Must validate the signature and nonce\n     * @param userOp              - The operation that is about to be executed.\n     * @param userOpHash          - Hash of the user's request data. can be used as the basis for signature.\n     * @param missingAccountFunds - Missing funds on the account's deposit in the entrypoint.\n     *                              This is the minimum amount to transfer to the sender(entryPoint) to be\n     *                              able to make the call. The excess is left as a deposit in the entrypoint\n     *                              for future calls. Can be withdrawn anytime using \"entryPoint.withdrawTo()\".\n     *                              In case there is a paymaster in the request (or the current deposit is high\n     *                              enough), this value will be zero.\n     * @return validationData       - Packaged ValidationData structure. use `_packValidationData` and\n     *                              `_unpackValidationData` to encode and decode.\n     *                              <20-byte> aggregatorOrSigFail - 0 for valid signature, 1 to mark signature failure,\n     *                                 otherwise, an address of an \"aggregator\" contract.\n     *                              <6-byte> validUntil - Last timestamp this operation is valid at, or 0 for \"indefinitely\"\n     *                              <6-byte> validAfter - First timestamp this operation is valid\n     *                                                    If an account doesn't use time-range, it is enough to\n     *                                                    return SIG_VALIDATION_FAILED value (1) for signature failure.\n     *                              Note that the validation code cannot use block.timestamp (or block.number) directly.\n     */\n    function validateUserOp(\n        PackedUserOperation calldata userOp,\n        bytes32 userOpHash,\n        uint256 missingAccountFunds\n    ) external returns (uint256 validationData);\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/IAccountExecute.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\nimport \"./PackedUserOperation.sol\";\n\ninterface IAccountExecute {\n    /**\n     * Account may implement this execute method.\n     * passing this methodSig at the beginning of callData will cause the entryPoint to pass the full UserOp (and hash)\n     * to the account.\n     * The account should skip the methodSig, and use the callData (and optionally, other UserOp fields)\n     *\n     * @param userOp              - The operation that was just validated.\n     * @param userOpHash          - Hash of the user's request data.\n     */\n    function executeUserOp(\n        PackedUserOperation calldata userOp,\n        bytes32 userOpHash\n    ) external;\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/IAggregator.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\nimport \"./PackedUserOperation.sol\";\n\n/**\n * Aggregated Signatures validator.\n */\ninterface IAggregator {\n    /**\n     * Validate an aggregated signature.\n     * Reverts if the aggregated signature does not match the given list of operations.\n     * @param userOps   - An array of UserOperations to validate the signature for.\n     * @param signature - The aggregated signature.\n     */\n    function validateSignatures(\n        PackedUserOperation[] calldata userOps,\n        bytes calldata signature\n    ) external;\n\n    /**\n     * Validate the signature of a single userOp.\n     * This method should be called by bundler after EntryPointSimulation.simulateValidation() returns\n     * the aggregator this account uses.\n     * First it validates the signature over the userOp. Then it returns data to be used when creating the handleOps.\n     * @param userOp        - The userOperation received from the user.\n     * @return sigForUserOp - The value to put into the signature field of the userOp when calling handleOps.\n     *                        (usually empty, unless account and aggregator support some kind of \"multisig\".\n     */\n    function validateUserOpSignature(\n        PackedUserOperation calldata userOp\n    ) external view returns (bytes memory sigForUserOp);\n\n    /**\n     * Aggregate multiple signatures into a single value.\n     * This method is called off-chain to calculate the signature to pass with handleOps()\n     * bundler MAY use optimized custom code to perform this aggregation.\n     * @param userOps              - An array of UserOperations to collect the signatures from.\n     * @return aggregatedSignature - The aggregated signature.\n     */\n    function aggregateSignatures(\n        PackedUserOperation[] calldata userOps\n    ) external view returns (bytes memory aggregatedSignature);\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/IEntryPoint.sol": {
        "content": "/**\n ** Account-Abstraction (EIP-4337) singleton EntryPoint implementation.\n ** Only one instance required on each chain.\n **/\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n/* solhint-disable avoid-low-level-calls */\n/* solhint-disable no-inline-assembly */\n/* solhint-disable reason-string */\n\nimport \"./PackedUserOperation.sol\";\nimport \"./IStakeManager.sol\";\nimport \"./IAggregator.sol\";\nimport \"./INonceManager.sol\";\nimport \"./ISenderCreator.sol\";\n\ninterface IEntryPoint is IStakeManager, INonceManager {\n    /***\n     * An event emitted after each successful request.\n     * @param userOpHash    - Unique identifier for the request (hash its entire content, except signature).\n     * @param sender        - The account that generates this request.\n     * @param paymaster     - If non-null, the paymaster that pays for this request.\n     * @param nonce         - The nonce value from the request.\n     * @param success       - True if the sender transaction succeeded, false if reverted.\n     * @param actualGasCost - Actual amount paid (by account or paymaster) for this UserOperation.\n     * @param actualGasUsed - Total gas used by this UserOperation (including preVerification, creation,\n     *                        validation and execution).\n     */\n    event UserOperationEvent(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        address indexed paymaster,\n        uint256 nonce,\n        bool success,\n        uint256 actualGasCost,\n        uint256 actualGasUsed\n    );\n\n    /**\n     * Account \"sender\" was deployed.\n     * @param userOpHash - The userOp that deployed this account. UserOperationEvent will follow.\n     * @param sender     - The account that is deployed\n     * @param factory    - The factory used to deploy this account (in the initCode)\n     * @param paymaster  - The paymaster used by this UserOp\n     */\n    event AccountDeployed(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        address factory,\n        address paymaster\n    );\n\n    /**\n     * An event emitted if the UserOperation \"callData\" reverted with non-zero length.\n     * @param userOpHash   - The request unique identifier.\n     * @param sender       - The sender of this request.\n     * @param nonce        - The nonce used in the request.\n     * @param revertReason - The return bytes from the reverted \"callData\" call.\n     */\n    event UserOperationRevertReason(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        uint256 nonce,\n        bytes revertReason\n    );\n\n    /**\n     * An event emitted if the UserOperation Paymaster's \"postOp\" call reverted with non-zero length.\n     * @param userOpHash   - The request unique identifier.\n     * @param sender       - The sender of this request.\n     * @param nonce        - The nonce used in the request.\n     * @param revertReason - The return bytes from the reverted call to \"postOp\".\n     */\n    event PostOpRevertReason(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        uint256 nonce,\n        bytes revertReason\n    );\n\n    /**\n     * UserOp consumed more than prefund. The UserOperation is reverted, and no refund is made.\n     * @param userOpHash   - The request unique identifier.\n     * @param sender       - The sender of this request.\n     * @param nonce        - The nonce used in the request.\n     */\n    event UserOperationPrefundTooLow(\n        bytes32 indexed userOpHash,\n        address indexed sender,\n        uint256 nonce\n    );\n\n    /**\n     * An event emitted by handleOps() and handleAggregatedOps(), before starting the execution loop.\n     * Any event emitted before this event, is part of the validation.\n     */\n    event BeforeExecution();\n\n    /**\n     * Signature aggregator used by the following UserOperationEvents within this bundle.\n     * @param aggregator - The aggregator used for the following UserOperationEvents.\n     */\n    event SignatureAggregatorChanged(address indexed aggregator);\n\n    /**\n     * A custom revert error of handleOps andhandleAggregatedOps, to identify the offending op.\n     * Should be caught in off-chain handleOps/handleAggregatedOps simulation and not happen on-chain.\n     * Useful for mitigating DoS attempts against batchers or for troubleshooting of factory/account/paymaster reverts.\n     * NOTE: If simulateValidation passes successfully, there should be no reason for handleOps to fail on it.\n     * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n     * @param reason  - Revert reason. The string starts with a unique code \"AAmn\",\n     *                  where \"m\" is \"1\" for factory, \"2\" for account and \"3\" for paymaster issues,\n     *                  so a failure can be attributed to the correct entity.\n     */\n    error FailedOp(uint256 opIndex, string reason);\n\n    /**\n     * A custom revert error of handleOps and handleAggregatedOps, to report a revert by account or paymaster.\n     * @param opIndex - Index into the array of ops to the failed one (in simulateValidation, this is always zero).\n     * @param reason  - Revert reason. see FailedOp(uint256,string), above\n     * @param inner   - data from inner cought revert reason\n     * @dev note that inner is truncated to 2048 bytes\n     */\n    error FailedOpWithRevert(uint256 opIndex, string reason, bytes inner);\n\n    error PostOpReverted(bytes returnData);\n\n    /**\n     * Error case when a signature aggregator fails to verify the aggregated signature it had created.\n     * @param aggregator The aggregator that failed to verify the signature\n     */\n    error SignatureValidationFailed(address aggregator);\n\n    // Return value of getSenderAddress.\n    error SenderAddressResult(address sender);\n\n    // UserOps handled, per aggregator.\n    struct UserOpsPerAggregator {\n        PackedUserOperation[] userOps;\n        // Aggregator address\n        IAggregator aggregator;\n        // Aggregated signature\n        bytes signature;\n    }\n\n    /**\n     * Execute a batch of UserOperations.\n     * No signature aggregator is used.\n     * If any account requires an aggregator (that is, it returned an aggregator when\n     * performing simulateValidation), then handleAggregatedOps() must be used instead.\n     * @param ops         - The operations to execute.\n     * @param beneficiary - The address to receive the fees.\n     */\n    function handleOps(\n        PackedUserOperation[] calldata ops,\n        address payable beneficiary\n    ) external;\n\n    /**\n     * Execute a batch of UserOperation with Aggregators\n     * @param opsPerAggregator - The operations to execute, grouped by aggregator (or address(0) for no-aggregator accounts).\n     * @param beneficiary      - The address to receive the fees.\n     */\n    function handleAggregatedOps(\n        UserOpsPerAggregator[] calldata opsPerAggregator,\n        address payable beneficiary\n    ) external;\n\n    /**\n     * Generate a request Id - unique identifier for this request.\n     * The request ID is a hash over the content of the userOp (except the signature), entrypoint address, chainId and (optionally) 7702 delegate address\n     * @param userOp - The user operation to generate the request ID for.\n     * @return hash the hash of this UserOperation\n     */\n    function getUserOpHash(\n        PackedUserOperation calldata userOp\n    ) external view returns (bytes32);\n\n    /**\n     * Gas and return values during simulation.\n     * @param preOpGas         - The gas used for validation (including preValidationGas)\n     * @param prefund          - The required prefund for this operation\n     * @param accountValidationData   - returned validationData from account.\n     * @param paymasterValidationData - return validationData from paymaster.\n     * @param paymasterContext - Returned by validatePaymasterUserOp (to be passed into postOp)\n     */\n    struct ReturnInfo {\n        uint256 preOpGas;\n        uint256 prefund;\n        uint256 accountValidationData;\n        uint256 paymasterValidationData;\n        bytes paymasterContext;\n    }\n\n    /**\n     * Get counterfactual sender address.\n     * Calculate the sender contract address that will be generated by the initCode and salt in the UserOperation.\n     * This method always revert, and returns the address in SenderAddressResult error.\n     * @notice this method cannot be used for EIP-7702 derived contracts.\n     *\n     * @param initCode - The constructor code to be passed into the UserOperation.\n     */\n    function getSenderAddress(bytes memory initCode) external;\n\n    error DelegateAndRevert(bool success, bytes ret);\n\n    /**\n     * Helper method for dry-run testing.\n     * @dev calling this method, the EntryPoint will make a delegatecall to the given data, and report (via revert) the result.\n     *  The method always revert, so is only useful off-chain for dry run calls, in cases where state-override to replace\n     *  actual EntryPoint code is less convenient.\n     * @param target a target contract to make a delegatecall from entrypoint\n     * @param data data to pass to target in a delegatecall\n     */\n    function delegateAndRevert(address target, bytes calldata data) external;\n\n    /**\n     * @notice Retrieves the immutable SenderCreator contract which is responsible for deployment of sender contracts.\n     */\n    function senderCreator() external view returns (ISenderCreator);\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/INonceManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\ninterface INonceManager {\n\n    /**\n     * Return the next nonce for this sender.\n     * Within a given key, the nonce values are sequenced (starting with zero, and incremented by one on each userop)\n     * But UserOp with different keys can come with arbitrary order.\n     *\n     * @param sender the account address\n     * @param key the high 192 bit of the nonce\n     * @return nonce a full nonce to pass for next UserOp with this sender.\n     */\n    function getNonce(address sender, uint192 key)\n    external view returns (uint256 nonce);\n\n    /**\n     * Manually increment the nonce of the sender.\n     * This method is exposed just for completeness..\n     * Account does NOT need to call it, neither during validation, nor elsewhere,\n     * as the EntryPoint will update the nonce regardless.\n     * Possible use-case is call it with various keys to \"initialize\" their nonces to one, so that future\n     * UserOperations will not pay extra for the first transaction with a given key.\n     *\n     * @param key - the \"nonce key\" to increment the \"nonce sequence\" for.\n     */\n    function incrementNonce(uint192 key) external;\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/ISenderCreator.sol": {
        "content": "\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\ninterface ISenderCreator {\n    /**\n     * @dev Creates a new sender contract.\n     * @return sender Address of the newly created sender contract.\n     */\n    function createSender(bytes calldata initCode) external returns (address sender);\n\n    /**\n     * Use initCallData to initialize an EIP-7702 account.\n     * The caller is the EntryPoint contract and it is already verified to be an EIP-7702 account.\n     * Note: Can be called multiple times as long as an appropriate initCode is supplied\n     *\n     * @param sender - the 'sender' EIP-7702 account to be initialized.\n     * @param initCallData - the call data to be passed to the sender account call.\n     */\n    function initEip7702Sender(address sender, bytes calldata initCallData) external;\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/IStakeManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n/**\n * Manage deposits and stakes.\n * Deposit is just a balance used to pay for UserOperations (either by a paymaster or an account).\n * Stake is value locked for at least \"unstakeDelay\" by the staked entity.\n */\ninterface IStakeManager {\n    event Deposited(address indexed account, uint256 totalDeposit);\n\n    event Withdrawn(\n        address indexed account,\n        address withdrawAddress,\n        uint256 amount\n    );\n\n    // Emitted when stake or unstake delay are modified.\n    event StakeLocked(\n        address indexed account,\n        uint256 totalStaked,\n        uint256 unstakeDelaySec\n    );\n\n    // Emitted once a stake is scheduled for withdrawal.\n    event StakeUnlocked(address indexed account, uint256 withdrawTime);\n\n    event StakeWithdrawn(\n        address indexed account,\n        address withdrawAddress,\n        uint256 amount\n    );\n\n    /**\n     * @param deposit         - The entity's deposit.\n     * @param staked          - True if this entity is staked.\n     * @param stake           - Actual amount of ether staked for this entity.\n     * @param unstakeDelaySec - Minimum delay to withdraw the stake.\n     * @param withdrawTime    - First block timestamp where 'withdrawStake' will be callable, or zero if already locked.\n     * @dev Sizes were chosen so that deposit fits into one cell (used during handleOp)\n     *      and the rest fit into a 2nd cell (used during stake/unstake)\n     *      - 112 bit allows for 10^15 eth\n     *      - 48 bit for full timestamp\n     *      - 32 bit allows 150 years for unstake delay\n     */\n    struct DepositInfo {\n        uint256 deposit;\n        bool staked;\n        uint112 stake;\n        uint32 unstakeDelaySec;\n        uint48 withdrawTime;\n    }\n\n    // API struct used by getStakeInfo and simulateValidation.\n    struct StakeInfo {\n        uint256 stake;\n        uint256 unstakeDelaySec;\n    }\n\n    /**\n     * Get deposit info.\n     * @param account - The account to query.\n     * @return info   - Full deposit information of given account.\n     */\n    function getDepositInfo(\n        address account\n    ) external view returns (DepositInfo memory info);\n\n    /**\n     * Get account balance.\n     * @param account - The account to query.\n     * @return        - The deposit (for gas payment) of the account.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * Add to the deposit of the given account.\n     * @param account - The account to add to.\n     */\n    function depositTo(address account) external payable;\n\n    /**\n     * Add to the account's stake - amount and delay\n     * any pending unstake is first cancelled.\n     * @param unstakeDelaySec - The new lock duration before the deposit can be withdrawn.\n     */\n    function addStake(uint32 unstakeDelaySec) external payable;\n\n    /**\n     * Attempt to unlock the stake.\n     * The value can be withdrawn (using withdrawStake) after the unstake delay.\n     */\n    function unlockStake() external;\n\n    /**\n     * Withdraw from the (unlocked) stake.\n     * Must first call unlockStake and wait for the unstakeDelay to pass.\n     * @param withdrawAddress - The address to send withdrawn value.\n     */\n    function withdrawStake(address payable withdrawAddress) external;\n\n    /**\n     * Withdraw from the deposit.\n     * @param withdrawAddress - The address to send withdrawn value.\n     * @param withdrawAmount  - The amount to withdraw.\n     */\n    function withdrawTo(\n        address payable withdrawAddress,\n        uint256 withdrawAmount\n    ) external;\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/interfaces/PackedUserOperation.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n/**\n * User Operation struct\n * @param sender                - The sender account of this request.\n * @param nonce                 - Unique value the sender uses to verify it is not a replay.\n * @param initCode              - If set, the account contract will be created by this constructor\n * @param callData              - The method call to execute on this account.\n * @param accountGasLimits      - Packed gas limits for validateUserOp and gas limit passed to the callData method call.\n * @param preVerificationGas    - Gas not calculated by the handleOps method, but added to the gas paid.\n *                                Covers batch overhead.\n * @param gasFees               - packed gas fields maxPriorityFeePerGas and maxFeePerGas - Same as EIP-1559 gas parameters.\n * @param paymasterAndData      - If set, this field holds the paymaster address, verification gas limit, postOp gas limit and paymaster-specific extra data\n *                                The paymaster will pay for the transaction instead of the sender.\n * @param signature             - Sender-verified signature over the entire request, the EntryPoint address and the chain ID.\n */\nstruct PackedUserOperation {\n    address sender;\n    uint256 nonce;\n    bytes initCode;\n    bytes callData;\n    bytes32 accountGasLimits;\n    uint256 preVerificationGas;\n    bytes32 gasFees;\n    bytes paymasterAndData;\n    bytes signature;\n}\n"
      },
      "npm/@account-abstraction/contracts@0.8.0/utils/Exec.sol": {
        "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n// solhint-disable no-inline-assembly\n\n/**\n * Utility functions helpful when making different kinds of contract calls in Solidity.\n */\nlibrary Exec {\n\n    function call(\n        address to,\n        uint256 value,\n        bytes memory data,\n        uint256 txGas\n    ) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := call(txGas, to, value, add(data, 0x20), mload(data), 0, 0)\n        }\n    }\n\n    function staticcall(\n        address to,\n        bytes memory data,\n        uint256 txGas\n    ) internal view returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := staticcall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n        }\n    }\n\n    function delegateCall(\n        address to,\n        bytes memory data,\n        uint256 txGas\n    ) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := delegatecall(txGas, to, add(data, 0x20), mload(data), 0, 0)\n        }\n    }\n\n    // get returned data from last call or delegateCall\n    // maxLen - maximum length of data to return, or zero, for the full length\n    function getReturnData(uint256 maxLen) internal pure returns (bytes memory returnData) {\n        assembly (\"memory-safe\") {\n            let len := returndatasize()\n            if gt(maxLen,0) {\n                if gt(len, maxLen) {\n                    len := maxLen\n                }\n            }\n            let ptr := mload(0x40)\n            mstore(0x40, add(ptr, add(len, 0x20)))\n            mstore(ptr, len)\n            returndatacopy(add(ptr, 0x20), 0, len)\n            returnData := ptr\n        }\n    }\n\n    // revert with explicit byte array (probably reverted info from call)\n    function revertWithData(bytes memory returnData) internal pure {\n        assembly (\"memory-safe\") {\n            revert(add(returnData, 32), mload(returnData))\n        }\n    }\n\n    // Propagate revert data from last call\n    function revertWithReturnData() internal pure {\n        revertWithData(getReturnData(0));\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts-upgradeable@5.6.1/proxy/utils/UUPSUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.22;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol\";\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/AccessControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessControl} from \"./IAccessControl.sol\";\nimport {Context} from \"../utils/Context.sol\";\nimport {ERC165} from \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```solidity\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```solidity\n * function foo() public {\n *     require(hasRole(MY_ROLE, msg.sender));\n *     ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\n * to enforce additional security measures for this role.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n    struct RoleData {\n        mapping(address account => bool) hasRole;\n        bytes32 adminRole;\n    }\n\n    mapping(bytes32 role => RoleData) private _roles;\n\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n    /**\n     * @dev Modifier that checks that an account has a specific role. Reverts\n     * with an {AccessControlUnauthorizedAccount} error including the required role.\n     */\n    modifier onlyRole(bytes32 role) {\n        _checkRole(role);\n        _;\n    }\n\n    /// @inheritdoc ERC165\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n    }\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) public view virtual returns (bool) {\n        return _roles[role].hasRole[account];\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`\n     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.\n     */\n    function _checkRole(bytes32 role) internal view virtual {\n        _checkRole(role, _msgSender());\n    }\n\n    /**\n     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`\n     * is missing `role`.\n     */\n    function _checkRole(bytes32 role, address account) internal view virtual {\n        if (!hasRole(role, account)) {\n            revert AccessControlUnauthorizedAccount(account, role);\n        }\n    }\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {\n        return _roles[role].adminRole;\n    }\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _grantRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {\n        _revokeRole(role, account);\n    }\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessControlBadConfirmation();\n        }\n\n        _revokeRole(role, callerConfirmation);\n    }\n\n    /**\n     * @dev Sets `adminRole` as ``role``'s admin role.\n     *\n     * Emits a {RoleAdminChanged} event.\n     */\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n        bytes32 previousAdminRole = getRoleAdmin(role);\n        _roles[role].adminRole = adminRole;\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\n    }\n\n    /**\n     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleGranted} event.\n     */\n    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {\n        if (!hasRole(role, account)) {\n            _roles[role].hasRole[account] = true;\n            emit RoleGranted(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked.\n     *\n     * Internal function without access restriction.\n     *\n     * May emit a {RoleRevoked} event.\n     */\n    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {\n        if (hasRole(role, account)) {\n            _roles[role].hasRole[account] = false;\n            emit RoleRevoked(role, account, _msgSender());\n            return true;\n        } else {\n            return false;\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/IAccessControl.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (access/IAccessControl.sol)\n\npragma solidity >=0.8.4;\n\n/**\n * @dev External interface of AccessControl declared to support ERC-165 detection.\n */\ninterface IAccessControl {\n    /**\n     * @dev The `account` is missing a role.\n     */\n    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);\n\n    /**\n     * @dev The caller of a function is not the expected one.\n     *\n     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.\n     */\n    error AccessControlBadConfirmation();\n\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted to signal this.\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).\n     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     */\n    function renounceRole(bytes32 role, address callerConfirmation) external;\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/manager/AccessManaged.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/AccessManaged.sol)\n\npragma solidity ^0.8.20;\n\nimport {AuthorityUtils} from \"./AuthorityUtils.sol\";\nimport {IAccessManager} from \"./IAccessManager.sol\";\nimport {IAccessManaged} from \"./IAccessManaged.sol\";\nimport {Context} from \"../../utils/Context.sol\";\n\n/**\n * @dev This contract module makes available a {restricted} modifier. Functions decorated with this modifier will be\n * permissioned according to an \"authority\": a contract like {AccessManager} that follows the {IAuthority} interface,\n * implementing a policy that allows certain callers to access certain functions.\n *\n * IMPORTANT: The `restricted` modifier should never be used on `internal` functions, judiciously used in `public`\n * functions, and ideally only used in `external` functions. See {restricted}.\n */\nabstract contract AccessManaged is Context, IAccessManaged {\n    address private _authority;\n\n    bool private _consumingSchedule;\n\n    /**\n     * @dev Initializes the contract connected to an initial authority.\n     */\n    constructor(address initialAuthority) {\n        _setAuthority(initialAuthority);\n    }\n\n    /**\n     * @dev Restricts access to a function as defined by the connected Authority for this contract and the\n     * caller and selector of the function that entered the contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * In general, this modifier should only be used on `external` functions. It is okay to use it on `public`\n     * functions that are used as external entry points and are not called internally. Unless you know what you're\n     * doing, it should never be used on `internal` functions. Failure to follow these rules can have critical security\n     * implications! This is because the permissions are determined by the function that entered the contract, i.e. the\n     * function at the bottom of the call stack, and not the function where the modifier is visible in the source code.\n     * ====\n     *\n     * [WARNING]\n     * ====\n     * Avoid adding this modifier to the https://docs.soliditylang.org/en/v0.8.20/contracts.html#receive-ether-function[`receive()`]\n     * function or the https://docs.soliditylang.org/en/v0.8.20/contracts.html#fallback-function[`fallback()`]. These\n     * functions are the only execution paths where a function selector cannot be unambiguously determined from the calldata\n     * since the selector defaults to `0x00000000` in the `receive()` function and similarly in the `fallback()` function\n     * if no calldata is provided. (See {_checkCanCall}).\n     *\n     * The `receive()` function will always panic whereas the `fallback()` may panic depending on the calldata length.\n     * ====\n     */\n    modifier restricted() {\n        _checkCanCall(_msgSender(), _msgData());\n        _;\n    }\n\n    /// @inheritdoc IAccessManaged\n    function authority() public view virtual returns (address) {\n        return _authority;\n    }\n\n    /// @inheritdoc IAccessManaged\n    function setAuthority(address newAuthority) public virtual {\n        address caller = _msgSender();\n        if (caller != authority()) {\n            revert AccessManagedUnauthorized(caller);\n        }\n        if (newAuthority.code.length == 0) {\n            revert AccessManagedInvalidAuthority(newAuthority);\n        }\n        _setAuthority(newAuthority);\n    }\n\n    /// @inheritdoc IAccessManaged\n    function isConsumingScheduledOp() public view returns (bytes4) {\n        return _consumingSchedule ? this.isConsumingScheduledOp.selector : bytes4(0);\n    }\n\n    /**\n     * @dev Transfers control to a new authority. Internal function with no access restriction. Allows bypassing the\n     * permissions set by the current authority.\n     */\n    function _setAuthority(address newAuthority) internal virtual {\n        _authority = newAuthority;\n        emit AuthorityUpdated(newAuthority);\n    }\n\n    /**\n     * @dev Reverts if the caller is not allowed to call the function identified by a selector. Panics if the calldata\n     * is less than 4 bytes long.\n     */\n    function _checkCanCall(address caller, bytes calldata data) internal virtual {\n        (bool immediate, uint32 delay) = AuthorityUtils.canCallWithDelay(\n            authority(),\n            caller,\n            address(this),\n            bytes4(data[0:4])\n        );\n        if (!immediate) {\n            if (delay > 0) {\n                _consumingSchedule = true;\n                IAccessManager(authority()).consumeScheduledOp(caller, data);\n                _consumingSchedule = false;\n            } else {\n                revert AccessManagedUnauthorized(caller);\n            }\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/manager/AccessManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (access/manager/AccessManager.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessManager} from \"./IAccessManager.sol\";\nimport {IAccessManaged} from \"./IAccessManaged.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {Multicall} from \"../../utils/Multicall.sol\";\nimport {Math} from \"../../utils/math/Math.sol\";\nimport {Time} from \"../../utils/types/Time.sol\";\nimport {Hashes} from \"../../utils/cryptography/Hashes.sol\";\n\n/**\n * @dev AccessManager is a central contract to store the permissions of a system.\n *\n * A smart contract under the control of an AccessManager instance is known as a target, and will inherit from the\n * {AccessManaged} contract, be connected to this contract as its manager and implement the {AccessManaged-restricted}\n * modifier on a set of functions selected to be permissioned. Note that any function without this setup won't be\n * effectively restricted.\n *\n * The restriction rules for such functions are defined in terms of \"roles\" identified by an `uint64` and scoped\n * by target (`address`) and function selectors (`bytes4`). These roles are stored in this contract and can be\n * configured by admins (`ADMIN_ROLE` members) after a delay (see {getTargetAdminDelay}).\n *\n * For each target contract, admins can configure the following without any delay:\n *\n * * The target's {AccessManaged-authority} via {updateAuthority}.\n * * Close or open a target via {setTargetClosed} keeping the permissions intact.\n * * The roles that are allowed (or disallowed) to call a given function (identified by its selector) through {setTargetFunctionRole}.\n *\n * By default every address is member of the `PUBLIC_ROLE` and every target function is restricted to the `ADMIN_ROLE` until configured otherwise.\n * Additionally, each role has the following configuration options restricted to this manager's admins:\n *\n * * A role's admin role via {setRoleAdmin} who can grant or revoke roles.\n * * A role's guardian role via {setRoleGuardian} who's allowed to cancel operations.\n * * A delay in which a role takes effect after being granted through {setGrantDelay}.\n * * A delay of any target's admin action via {setTargetAdminDelay}.\n * * A role label for discoverability purposes with {labelRole}.\n *\n * Any account can be added and removed into any number of these roles by using the {grantRole} and {revokeRole} functions\n * restricted to each role's admin (see {getRoleAdmin}).\n *\n * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that\n * they will be highly secured (e.g., a multisig or a well-configured DAO).\n *\n * NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it\n * doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of\n * the return data are a boolean as expected by that interface.\n *\n * NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an\n * {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}.\n * Users will be able to interact with these contracts through the {execute} function, following the access rules\n * registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions\n * will be {AccessManager} itself.\n *\n * WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very\n * mindful of the danger associated with functions such as {Ownable-renounceOwnership} or\n * {AccessControl-renounceRole}.\n */\ncontract AccessManager is Context, Multicall, IAccessManager {\n    using Time for *;\n\n    // Structure that stores the details for a target contract.\n    struct TargetConfig {\n        mapping(bytes4 selector => uint64 roleId) allowedRoles;\n        Time.Delay adminDelay;\n        bool closed;\n    }\n\n    // Structure that stores the details for a role/account pair. This structure fits into a single slot.\n    struct Access {\n        // Timepoint at which the user gets the permission.\n        // If this is either 0 or in the future, then the role permission is not available.\n        uint48 since;\n        // Delay for execution. Only applies to restricted() / execute() calls.\n        Time.Delay delay;\n    }\n\n    // Structure that stores the details of a role.\n    struct Role {\n        // Members of the role.\n        mapping(address user => Access access) members;\n        // Admin who can grant or revoke permissions.\n        uint64 admin;\n        // Guardian who can cancel operations targeting functions that need this role.\n        uint64 guardian;\n        // Delay in which the role takes effect after being granted.\n        Time.Delay grantDelay;\n    }\n\n    // Structure that stores the details for a scheduled operation. This structure fits into a single slot.\n    struct Schedule {\n        // Moment at which the operation can be executed.\n        uint48 timepoint;\n        // Operation nonce to allow third-party contracts to identify the operation.\n        uint32 nonce;\n    }\n\n    /**\n     * @dev The identifier of the admin role. Required to perform most configuration operations including\n     * other roles' management and target restrictions.\n     */\n    uint64 public constant ADMIN_ROLE = type(uint64).min; // 0\n\n    /**\n     * @dev The identifier of the public role. Automatically granted to all addresses with no delay.\n     */\n    uint64 public constant PUBLIC_ROLE = type(uint64).max; // 2**64-1\n\n    mapping(address target => TargetConfig mode) private _targets;\n    mapping(uint64 roleId => Role) private _roles;\n    mapping(bytes32 operationId => Schedule) private _schedules;\n\n    // Used to identify operations that are currently being executed via {execute}.\n    // This should be transient storage when supported by the EVM.\n    bytes32 private _executionId;\n\n    /**\n     * @dev Check that the caller is authorized to perform the operation.\n     * See {AccessManager} description for a detailed breakdown of the authorization logic.\n     */\n    modifier onlyAuthorized() {\n        _checkAuthorized();\n        _;\n    }\n\n    constructor(address initialAdmin) {\n        if (initialAdmin == address(0)) {\n            revert AccessManagerInvalidInitialAdmin(address(0));\n        }\n\n        // admin is active immediately and without any execution delay.\n        _grantRole(ADMIN_ROLE, initialAdmin, 0, 0);\n    }\n\n    // =================================================== GETTERS ====================================================\n    /// @inheritdoc IAccessManager\n    function canCall(\n        address caller,\n        address target,\n        bytes4 selector\n    ) public view virtual returns (bool immediate, uint32 delay) {\n        if (isTargetClosed(target)) {\n            return (false, 0);\n        } else if (caller == address(this)) {\n            // Caller is AccessManager, this means the call was sent through {execute} and it already checked\n            // permissions. We verify that the call \"identifier\", which is set during {execute}, is correct.\n            return (_isExecuting(target, selector), 0);\n        } else {\n            uint64 roleId = getTargetFunctionRole(target, selector);\n            (bool isMember, uint32 currentDelay) = hasRole(roleId, caller);\n            return isMember ? (currentDelay == 0, currentDelay) : (false, 0);\n        }\n    }\n\n    /// @inheritdoc IAccessManager\n    function expiration() public view virtual returns (uint32) {\n        return 1 weeks;\n    }\n\n    /// @inheritdoc IAccessManager\n    function minSetback() public view virtual returns (uint32) {\n        return 5 days;\n    }\n\n    /// @inheritdoc IAccessManager\n    function isTargetClosed(address target) public view virtual returns (bool) {\n        return _targets[target].closed;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) {\n        return _targets[target].allowedRoles[selector];\n    }\n\n    /// @inheritdoc IAccessManager\n    function getTargetAdminDelay(address target) public view virtual returns (uint32) {\n        return _targets[target].adminDelay.get();\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleAdmin(uint64 roleId) public view virtual returns (uint64) {\n        return _roles[roleId].admin;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleGuardian(uint64 roleId) public view virtual returns (uint64) {\n        return _roles[roleId].guardian;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) {\n        return _roles[roleId].grantDelay.get();\n    }\n\n    /// @inheritdoc IAccessManager\n    function getAccess(\n        uint64 roleId,\n        address account\n    ) public view virtual returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect) {\n        Access storage access = _roles[roleId].members[account];\n\n        since = access.since;\n        (currentDelay, pendingDelay, effect) = access.delay.getFull();\n\n        return (since, currentDelay, pendingDelay, effect);\n    }\n\n    /// @inheritdoc IAccessManager\n    function hasRole(\n        uint64 roleId,\n        address account\n    ) public view virtual returns (bool isMember, uint32 executionDelay) {\n        if (roleId == PUBLIC_ROLE) {\n            return (true, 0);\n        } else {\n            (uint48 hasRoleSince, uint32 currentDelay, , ) = getAccess(roleId, account);\n            return (hasRoleSince != 0 && hasRoleSince <= Time.timestamp(), currentDelay);\n        }\n    }\n\n    // =============================================== ROLE MANAGEMENT ===============================================\n    /// @inheritdoc IAccessManager\n    function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized {\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n        emit RoleLabel(roleId, label);\n    }\n\n    /// @inheritdoc IAccessManager\n    function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized {\n        _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay);\n    }\n\n    /// @inheritdoc IAccessManager\n    function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized {\n        _revokeRole(roleId, account);\n    }\n\n    /// @inheritdoc IAccessManager\n    function renounceRole(uint64 roleId, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessManagerBadConfirmation();\n        }\n        _revokeRole(roleId, callerConfirmation);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setRoleAdmin(uint64 roleId, uint64 admin) public virtual onlyAuthorized {\n        _setRoleAdmin(roleId, admin);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setRoleGuardian(uint64 roleId, uint64 guardian) public virtual onlyAuthorized {\n        _setRoleGuardian(roleId, guardian);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized {\n        _setGrantDelay(roleId, newDelay);\n    }\n\n    /**\n     * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted.\n     *\n     * Emits a {RoleGranted} event.\n     */\n    function _grantRole(\n        uint64 roleId,\n        address account,\n        uint32 grantDelay,\n        uint32 executionDelay\n    ) internal virtual returns (bool) {\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        bool newMember = _roles[roleId].members[account].since == 0;\n        uint48 since;\n\n        if (newMember) {\n            since = Time.timestamp() + grantDelay;\n            _roles[roleId].members[account] = Access({since: since, delay: executionDelay.toDelay()});\n        } else {\n            // No setback here. Value can be reset by doing revoke + grant, effectively allowing the admin to perform\n            // any change to the execution delay within the duration of the role admin delay.\n            (_roles[roleId].members[account].delay, since) = _roles[roleId].members[account].delay.withUpdate(\n                executionDelay,\n                0\n            );\n        }\n\n        emit RoleGranted(roleId, account, executionDelay, since, newMember);\n        return newMember;\n    }\n\n    /**\n     * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}.\n     * Returns true if the role was previously granted.\n     *\n     * Emits a {RoleRevoked} event if the account had the role.\n     */\n    function _revokeRole(uint64 roleId, address account) internal virtual returns (bool) {\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        if (_roles[roleId].members[account].since == 0) {\n            return false;\n        }\n\n        delete _roles[roleId].members[account];\n\n        emit RoleRevoked(roleId, account);\n        return true;\n    }\n\n    /**\n     * @dev Internal version of {setRoleAdmin} without access control.\n     *\n     * Emits a {RoleAdminChanged} event.\n     *\n     * NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow\n     * anyone to set grant or revoke such role.\n     */\n    function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual {\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        _roles[roleId].admin = admin;\n\n        emit RoleAdminChanged(roleId, admin);\n    }\n\n    /**\n     * @dev Internal version of {setRoleGuardian} without access control.\n     *\n     * Emits a {RoleGuardianChanged} event.\n     *\n     * NOTE: Setting the guardian role as the `PUBLIC_ROLE` is allowed, but it will effectively allow\n     * anyone to cancel any scheduled operation for such role.\n     */\n    function _setRoleGuardian(uint64 roleId, uint64 guardian) internal virtual {\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        _roles[roleId].guardian = guardian;\n\n        emit RoleGuardianChanged(roleId, guardian);\n    }\n\n    /**\n     * @dev Internal version of {setGrantDelay} without access control.\n     *\n     * Emits a {RoleGrantDelayChanged} event.\n     */\n    function _setGrantDelay(uint64 roleId, uint32 newDelay) internal virtual {\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        uint48 effect;\n        (_roles[roleId].grantDelay, effect) = _roles[roleId].grantDelay.withUpdate(newDelay, minSetback());\n\n        emit RoleGrantDelayChanged(roleId, newDelay, effect);\n    }\n\n    // ============================================= FUNCTION MANAGEMENT ==============================================\n    /// @inheritdoc IAccessManager\n    function setTargetFunctionRole(\n        address target,\n        bytes4[] calldata selectors,\n        uint64 roleId\n    ) public virtual onlyAuthorized {\n        for (uint256 i = 0; i < selectors.length; ++i) {\n            _setTargetFunctionRole(target, selectors[i], roleId);\n        }\n    }\n\n    /**\n     * @dev Internal version of {setTargetFunctionRole} without access control.\n     *\n     * Emits a {TargetFunctionRoleUpdated} event.\n     */\n    function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual {\n        _targets[target].allowedRoles[selector] = roleId;\n        emit TargetFunctionRoleUpdated(target, selector, roleId);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized {\n        _setTargetAdminDelay(target, newDelay);\n    }\n\n    /**\n     * @dev Internal version of {setTargetAdminDelay} without access control.\n     *\n     * Emits a {TargetAdminDelayUpdated} event.\n     */\n    function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual {\n        uint48 effect;\n        (_targets[target].adminDelay, effect) = _targets[target].adminDelay.withUpdate(newDelay, minSetback());\n\n        emit TargetAdminDelayUpdated(target, newDelay, effect);\n    }\n\n    // =============================================== MODE MANAGEMENT ================================================\n    /// @inheritdoc IAccessManager\n    function setTargetClosed(address target, bool closed) public virtual onlyAuthorized {\n        _setTargetClosed(target, closed);\n    }\n\n    /**\n     * @dev Set the closed flag for a contract. This is an internal setter with no access restrictions.\n     *\n     * Emits a {TargetClosed} event.\n     */\n    function _setTargetClosed(address target, bool closed) internal virtual {\n        _targets[target].closed = closed;\n        emit TargetClosed(target, closed);\n    }\n\n    // ============================================== DELAYED OPERATIONS ==============================================\n    /// @inheritdoc IAccessManager\n    function getSchedule(bytes32 id) public view virtual returns (uint48) {\n        uint48 timepoint = _schedules[id].timepoint;\n        return _isExpired(timepoint) ? 0 : timepoint;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getNonce(bytes32 id) public view virtual returns (uint32) {\n        return _schedules[id].nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function schedule(\n        address target,\n        bytes calldata data,\n        uint48 when\n    ) public virtual returns (bytes32 operationId, uint32 nonce) {\n        address caller = _msgSender();\n\n        // Fetch restrictions that apply to the caller on the targeted function\n        (, uint32 setback) = _canCallExtended(caller, target, data);\n\n        uint48 minWhen = Time.timestamp() + setback;\n\n        // If call with delay is not authorized, or if requested timing is too soon, revert\n        if (setback == 0 || (when > 0 && when < minWhen)) {\n            revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data));\n        }\n\n        // Reuse variable due to stack too deep\n        when = uint48(Math.max(when, minWhen)); // cast is safe: both inputs are uint48\n\n        // If caller is authorised, schedule operation\n        operationId = hashOperation(caller, target, data);\n\n        _checkNotScheduled(operationId);\n\n        unchecked {\n            // It's not feasible to overflow the nonce in less than 1000 years\n            nonce = _schedules[operationId].nonce + 1;\n        }\n        _schedules[operationId].timepoint = when;\n        _schedules[operationId].nonce = nonce;\n        emit OperationScheduled(operationId, nonce, when, caller, target, data);\n\n        // Using named return values because otherwise we get stack too deep\n    }\n\n    /**\n     * @dev Reverts if the operation is currently scheduled and has not expired.\n     *\n     * NOTE: This function was introduced due to stack too deep errors in schedule.\n     */\n    function _checkNotScheduled(bytes32 operationId) private view {\n        uint48 prevTimepoint = _schedules[operationId].timepoint;\n        if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) {\n            revert AccessManagerAlreadyScheduled(operationId);\n        }\n    }\n\n    /// @inheritdoc IAccessManager\n    // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally,\n    // _consumeScheduledOp guarantees a scheduled operation is only executed once.\n    // slither-disable-next-line reentrancy-no-eth\n    function execute(address target, bytes calldata data) public payable virtual returns (uint32) {\n        address caller = _msgSender();\n\n        // Fetch restrictions that apply to the caller on the targeted function\n        (bool immediate, uint32 setback) = _canCallExtended(caller, target, data);\n\n        // If call is not authorized, revert\n        if (!immediate && setback == 0) {\n            revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data));\n        }\n\n        bytes32 operationId = hashOperation(caller, target, data);\n        uint32 nonce;\n\n        // If caller is authorised, check operation was scheduled early enough\n        // Consume an available schedule even if there is no currently enforced delay\n        if (setback != 0 || getSchedule(operationId) != 0) {\n            nonce = _consumeScheduledOp(operationId);\n        }\n\n        // Mark the target and selector as authorised\n        bytes32 executionIdBefore = _executionId;\n        _executionId = _hashExecutionId(target, _checkSelector(data));\n\n        // Perform call\n        Address.functionCallWithValue(target, data, msg.value);\n\n        // Reset execute identifier\n        _executionId = executionIdBefore;\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) {\n        address msgsender = _msgSender();\n        bytes4 selector = _checkSelector(data);\n\n        bytes32 operationId = hashOperation(caller, target, data);\n        if (_schedules[operationId].timepoint == 0) {\n            revert AccessManagerNotScheduled(operationId);\n        } else if (caller != msgsender) {\n            // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role.\n            (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender);\n            (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender);\n            if (!isAdmin && !isGuardian) {\n                revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector);\n            }\n        }\n\n        delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce\n        uint32 nonce = _schedules[operationId].nonce;\n        emit OperationCanceled(operationId, nonce);\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function consumeScheduledOp(address caller, bytes calldata data) public virtual {\n        address target = _msgSender();\n        if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) {\n            revert AccessManagerUnauthorizedConsume(target);\n        }\n        _consumeScheduledOp(hashOperation(caller, target, data));\n    }\n\n    /**\n     * @dev Internal variant of {consumeScheduledOp} that operates on bytes32 operationId.\n     *\n     * Returns the nonce of the scheduled operation that is consumed.\n     */\n    function _consumeScheduledOp(bytes32 operationId) internal virtual returns (uint32) {\n        uint48 timepoint = _schedules[operationId].timepoint;\n        uint32 nonce = _schedules[operationId].nonce;\n\n        if (timepoint == 0) {\n            revert AccessManagerNotScheduled(operationId);\n        } else if (timepoint > Time.timestamp()) {\n            revert AccessManagerNotReady(operationId);\n        } else if (_isExpired(timepoint)) {\n            revert AccessManagerExpired(operationId);\n        }\n\n        delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce\n        emit OperationExecuted(operationId, nonce);\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function hashOperation(address caller, address target, bytes calldata data) public view virtual returns (bytes32) {\n        return keccak256(abi.encode(caller, target, data));\n    }\n\n    // ==================================================== OTHERS ====================================================\n    /// @inheritdoc IAccessManager\n    function updateAuthority(address target, address newAuthority) public virtual onlyAuthorized {\n        IAccessManaged(target).setAuthority(newAuthority);\n    }\n\n    // ================================================= ADMIN LOGIC ==================================================\n    /**\n     * @dev Check if the current call is authorized according to admin and roles logic.\n     *\n     * WARNING: Carefully review the considerations of {AccessManaged-restricted} since they apply to this modifier.\n     */\n    function _checkAuthorized() private {\n        address caller = _msgSender();\n        (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData());\n        if (!immediate) {\n            if (delay == 0) {\n                (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData());\n                revert AccessManagerUnauthorizedAccount(caller, requiredRole);\n            } else {\n                _consumeScheduledOp(hashOperation(caller, address(this), _msgData()));\n            }\n        }\n    }\n\n    /**\n     * @dev Get the admin restrictions of a given function call based on the function and arguments involved.\n     *\n     * Returns:\n     * - bool restricted: does this data match a restricted operation\n     * - uint64: which role is this operation restricted to\n     * - uint32: minimum delay to enforce for that operation (max between operation's delay and admin's execution delay)\n     */\n    function _getAdminRestrictions(\n        bytes calldata data\n    ) private view returns (bool adminRestricted, uint64 roleAdminId, uint32 executionDelay) {\n        if (data.length < 4) {\n            return (false, 0, 0);\n        }\n\n        bytes4 selector = _checkSelector(data);\n\n        // Restricted to ADMIN with no delay beside any execution delay the caller may have\n        if (\n            selector == this.labelRole.selector ||\n            selector == this.setRoleAdmin.selector ||\n            selector == this.setRoleGuardian.selector ||\n            selector == this.setGrantDelay.selector ||\n            selector == this.setTargetAdminDelay.selector\n        ) {\n            return (true, ADMIN_ROLE, 0);\n        }\n\n        // Restricted to ADMIN with the admin delay corresponding to the target\n        if (\n            selector == this.updateAuthority.selector ||\n            selector == this.setTargetClosed.selector ||\n            selector == this.setTargetFunctionRole.selector\n        ) {\n            // First argument is a target.\n            address target = abi.decode(data[0x04:0x24], (address));\n            uint32 delay = getTargetAdminDelay(target);\n            return (true, ADMIN_ROLE, delay);\n        }\n\n        // Restricted to that role's admin with no delay beside any execution delay the caller may have.\n        if (selector == this.grantRole.selector || selector == this.revokeRole.selector) {\n            // First argument is a roleId.\n            uint64 roleId = abi.decode(data[0x04:0x24], (uint64));\n            return (true, getRoleAdmin(roleId), 0);\n        }\n\n        return (false, getTargetFunctionRole(address(this), selector), 0);\n    }\n\n    // =================================================== HELPERS ====================================================\n    /**\n     * @dev An extended version of {canCall} for internal usage that checks {_canCallSelf}\n     * when the target is this contract.\n     *\n     * Returns:\n     * - bool immediate: whether the operation can be executed immediately (with no delay)\n     * - uint32 delay: the execution delay\n     */\n    function _canCallExtended(\n        address caller,\n        address target,\n        bytes calldata data\n    ) private view returns (bool immediate, uint32 delay) {\n        if (target == address(this)) {\n            return _canCallSelf(caller, data);\n        } else {\n            return data.length < 4 ? (false, 0) : canCall(caller, target, _checkSelector(data));\n        }\n    }\n\n    /**\n     * @dev A version of {canCall} that checks for restrictions in this contract.\n     */\n    function _canCallSelf(address caller, bytes calldata data) private view returns (bool immediate, uint32 delay) {\n        if (data.length < 4) {\n            return (false, 0);\n        }\n\n        if (caller == address(this)) {\n            // Caller is AccessManager, this means the call was sent through {execute} and it already checked\n            // permissions. We verify that the call \"identifier\", which is set during {execute}, is correct.\n            return (_isExecuting(address(this), _checkSelector(data)), 0);\n        }\n\n        (bool adminRestricted, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data);\n\n        // isTargetClosed apply to non-admin-restricted function\n        if (!adminRestricted && isTargetClosed(address(this))) {\n            return (false, 0);\n        }\n\n        (bool inRole, uint32 executionDelay) = hasRole(roleId, caller);\n        if (!inRole) {\n            return (false, 0);\n        }\n\n        // downcast is safe because both options are uint32\n        delay = uint32(Math.max(operationDelay, executionDelay));\n        return (delay == 0, delay);\n    }\n\n    /**\n     * @dev Returns true if a call with `target` and `selector` is being executed via {executed}.\n     */\n    function _isExecuting(address target, bytes4 selector) private view returns (bool) {\n        return _executionId == _hashExecutionId(target, selector);\n    }\n\n    /**\n     * @dev Returns true if a schedule timepoint is past its expiration deadline.\n     */\n    function _isExpired(uint48 timepoint) private view returns (bool) {\n        return timepoint + expiration() <= Time.timestamp();\n    }\n\n    /**\n     * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes\n     */\n    function _checkSelector(bytes calldata data) private pure returns (bytes4) {\n        return bytes4(data[0:4]);\n    }\n\n    /**\n     * @dev Hashing function for execute protection\n     */\n    function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) {\n        return Hashes.efficientKeccak256(bytes32(uint256(uint160(target))), selector);\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/manager/AuthorityUtils.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (access/manager/AuthorityUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAuthority} from \"./IAuthority.sol\";\n\nlibrary AuthorityUtils {\n    /**\n     * @dev Since `AccessManager` implements an extended IAuthority interface, invoking `canCall` with backwards compatibility\n     * for the preexisting `IAuthority` interface requires special care to avoid reverting on insufficient return data.\n     * This helper function takes care of invoking `canCall` in a backwards compatible way without reverting.\n     */\n    function canCallWithDelay(\n        address authority,\n        address caller,\n        address target,\n        bytes4 selector\n    ) internal view returns (bool immediate, uint32 delay) {\n        bytes memory data = abi.encodeCall(IAuthority.canCall, (caller, target, selector));\n\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x00)\n            mstore(0x20, 0x00)\n\n            if staticcall(gas(), authority, add(data, 0x20), mload(data), 0x00, 0x40) {\n                immediate := mload(0x00)\n                delay := mload(0x20)\n\n                // If delay does not fit in a uint32, return 0 (no delay)\n                // equivalent to: if gt(delay, 0xFFFFFFFF) { delay := 0 }\n                delay := mul(delay, iszero(shr(32, delay)))\n            }\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/manager/IAccessManaged.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAccessManaged.sol)\n\npragma solidity >=0.8.4;\n\ninterface IAccessManaged {\n    /**\n     * @dev Authority that manages this contract was updated.\n     */\n    event AuthorityUpdated(address authority);\n\n    error AccessManagedUnauthorized(address caller);\n    error AccessManagedRequiredDelay(address caller, uint32 delay);\n    error AccessManagedInvalidAuthority(address authority);\n\n    /**\n     * @dev Returns the current authority.\n     */\n    function authority() external view returns (address);\n\n    /**\n     * @dev Transfers control to a new authority. The caller must be the current authority.\n     */\n    function setAuthority(address) external;\n\n    /**\n     * @dev Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is\n     * being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs\n     * attacker controlled calls.\n     */\n    function isConsumingScheduledOp() external view returns (bytes4);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/manager/IAccessManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (access/manager/IAccessManager.sol)\n\npragma solidity >=0.8.4;\n\ninterface IAccessManager {\n    /**\n     * @dev A delayed operation was scheduled.\n     */\n    event OperationScheduled(\n        bytes32 indexed operationId,\n        uint32 indexed nonce,\n        uint48 schedule,\n        address caller,\n        address target,\n        bytes data\n    );\n\n    /**\n     * @dev A scheduled operation was executed.\n     */\n    event OperationExecuted(bytes32 indexed operationId, uint32 indexed nonce);\n\n    /**\n     * @dev A scheduled operation was canceled.\n     */\n    event OperationCanceled(bytes32 indexed operationId, uint32 indexed nonce);\n\n    /**\n     * @dev Informational labelling for a roleId.\n     */\n    event RoleLabel(uint64 indexed roleId, string label);\n\n    /**\n     * @dev Emitted when `account` is granted `roleId`.\n     *\n     * NOTE: The meaning of the `since` argument depends on the `newMember` argument.\n     * If the role is granted to a new member, the `since` argument indicates when the account becomes a member of the role,\n     * otherwise it indicates the timestamp when the execution delay update takes effect for this account and roleId.\n     */\n    event RoleGranted(uint64 indexed roleId, address indexed account, uint32 delay, uint48 since, bool newMember);\n\n    /**\n     * @dev Emitted when `account` membership or `roleId` is revoked. Unlike granting, revoking is instantaneous.\n     */\n    event RoleRevoked(uint64 indexed roleId, address indexed account);\n\n    /**\n     * @dev Role acting as admin over a given `roleId` is updated.\n     */\n    event RoleAdminChanged(uint64 indexed roleId, uint64 indexed admin);\n\n    /**\n     * @dev Role acting as guardian over a given `roleId` is updated.\n     */\n    event RoleGuardianChanged(uint64 indexed roleId, uint64 indexed guardian);\n\n    /**\n     * @dev Grant delay for a given `roleId` will be updated to `delay` when `since` is reached.\n     */\n    event RoleGrantDelayChanged(uint64 indexed roleId, uint32 delay, uint48 since);\n\n    /**\n     * @dev Target mode is updated (true = closed, false = open).\n     */\n    event TargetClosed(address indexed target, bool closed);\n\n    /**\n     * @dev Role required to invoke `selector` on `target` is updated to `roleId`.\n     */\n    event TargetFunctionRoleUpdated(address indexed target, bytes4 selector, uint64 indexed roleId);\n\n    /**\n     * @dev Admin delay for a given `target` will be updated to `delay` when `since` is reached.\n     */\n    event TargetAdminDelayUpdated(address indexed target, uint32 delay, uint48 since);\n\n    error AccessManagerAlreadyScheduled(bytes32 operationId);\n    error AccessManagerNotScheduled(bytes32 operationId);\n    error AccessManagerNotReady(bytes32 operationId);\n    error AccessManagerExpired(bytes32 operationId);\n    error AccessManagerLockedRole(uint64 roleId);\n    error AccessManagerBadConfirmation();\n    error AccessManagerUnauthorizedAccount(address msgsender, uint64 roleId);\n    error AccessManagerUnauthorizedCall(address caller, address target, bytes4 selector);\n    error AccessManagerUnauthorizedConsume(address target);\n    error AccessManagerUnauthorizedCancel(address msgsender, address caller, address target, bytes4 selector);\n    error AccessManagerInvalidInitialAdmin(address initialAdmin);\n\n    /**\n     * @dev Check if an address (`caller`) is authorised to call a given function on a given contract directly (with\n     * no restriction). Additionally, it returns the delay needed to perform the call indirectly through the {schedule}\n     * & {execute} workflow.\n     *\n     * This function is usually called by the targeted contract to control immediate execution of restricted functions.\n     * Therefore we only return true if the call can be performed without any delay. If the call is subject to a\n     * previously set delay (not zero), then the function should return false and the caller should schedule the operation\n     * for future execution.\n     *\n     * If `allowed` is true, the delay can be disregarded and the operation can be immediately executed, otherwise\n     * the operation can be executed if and only if delay is greater than 0.\n     *\n     * NOTE: The IAuthority interface does not include the `uint32` delay. This is an extension of that interface that\n     * is backward compatible. Some contracts may thus ignore the second return argument. In that case they will fail\n     * to identify the indirect workflow, and will consider calls that require a delay to be forbidden.\n     *\n     * NOTE: This function does not report the permissions of the admin functions in the manager itself. These are defined by the\n     * {AccessManager} documentation.\n     */\n    function canCall(\n        address caller,\n        address target,\n        bytes4 selector\n    ) external view returns (bool allowed, uint32 delay);\n\n    /**\n     * @dev Expiration delay for scheduled proposals. Defaults to 1 week.\n     *\n     * IMPORTANT: Avoid overriding the expiration with 0. Otherwise every contract proposal will be expired immediately,\n     * disabling any scheduling usage.\n     */\n    function expiration() external view returns (uint32);\n\n    /**\n     * @dev Minimum setback for all delay updates, with the exception of execution delays. It\n     * can be increased without setback (and reset via {revokeRole} in the event of an\n     * accidental increase). Defaults to 5 days.\n     */\n    function minSetback() external view returns (uint32);\n\n    /**\n     * @dev Get whether the contract is closed disabling any access. Otherwise role permissions are applied.\n     *\n     * NOTE: When the manager itself is closed, admin functions are still accessible to avoid locking the contract.\n     */\n    function isTargetClosed(address target) external view returns (bool);\n\n    /**\n     * @dev Get the role required to call a function.\n     */\n    function getTargetFunctionRole(address target, bytes4 selector) external view returns (uint64);\n\n    /**\n     * @dev Get the admin delay for a target contract. Changes to contract configuration are subject to this delay.\n     */\n    function getTargetAdminDelay(address target) external view returns (uint32);\n\n    /**\n     * @dev Get the id of the role that acts as an admin for the given role.\n     *\n     * The admin permission is required to grant the role, revoke the role and update the execution delay to execute\n     * an operation that is restricted to this role.\n     */\n    function getRoleAdmin(uint64 roleId) external view returns (uint64);\n\n    /**\n     * @dev Get the role that acts as a guardian for a given role.\n     *\n     * The guardian permission allows canceling operations that have been scheduled under the role.\n     */\n    function getRoleGuardian(uint64 roleId) external view returns (uint64);\n\n    /**\n     * @dev Get the role current grant delay.\n     *\n     * Its value may change at any point without an event emitted following a call to {setGrantDelay}.\n     * Changes to this value, including effect timepoint are notified in advance by the {RoleGrantDelayChanged} event.\n     */\n    function getRoleGrantDelay(uint64 roleId) external view returns (uint32);\n\n    /**\n     * @dev Get the access details for a given account for a given role. These details include the timepoint at which\n     * membership becomes active, and the delay applied to all operations by this user that requires this permission\n     * level.\n     *\n     * Returns:\n     * [0] Timestamp at which the account membership becomes valid. 0 means role is not granted.\n     * [1] Current execution delay for the account.\n     * [2] Pending execution delay for the account.\n     * [3] Timestamp at which the pending execution delay will become active. 0 means no delay update is scheduled.\n     */\n    function getAccess(\n        uint64 roleId,\n        address account\n    ) external view returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect);\n\n    /**\n     * @dev Check if a given account currently has the permission level corresponding to a given role. Note that this\n     * permission might be associated with an execution delay. {getAccess} can provide more details.\n     */\n    function hasRole(uint64 roleId, address account) external view returns (bool isMember, uint32 executionDelay);\n\n    /**\n     * @dev Give a label to a role, for improved role discoverability by UIs.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     * - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE`\n     *\n     * Emits a {RoleLabel} event.\n     */\n    function labelRole(uint64 roleId, string calldata label) external;\n\n    /**\n     * @dev Add `account` to `roleId`, or change its execution delay.\n     *\n     * This gives the account the authorization to call any function that is restricted to this role. An optional\n     * execution delay (in seconds) can be set. If that delay is non 0, the user is required to schedule any operation\n     * that is restricted to members of this role. The user will only be able to execute the operation after the delay has\n     * passed, before it has expired. During this period, admin and guardians can cancel the operation (see {cancel}).\n     *\n     * If the account has already been granted this role, the execution delay will be updated. This update is not\n     * immediate and follows the delay rules. For example, if a user currently has a delay of 3 hours, and this is\n     * called to reduce that delay to 1 hour, the new delay will take some time to take effect, enforcing that any\n     * operation executed in the 3 hours that follows this update was indeed scheduled before this update.\n     *\n     * Requirements:\n     *\n     * - the caller must be an admin for the role (see {getRoleAdmin})\n     * - granted role must not be the `PUBLIC_ROLE`\n     *\n     * Emits a {RoleGranted} event.\n     */\n    function grantRole(uint64 roleId, address account, uint32 executionDelay) external;\n\n    /**\n     * @dev Remove an account from a role, with immediate effect. If the account does not have the role, this call has\n     * no effect.\n     *\n     * Requirements:\n     *\n     * - the caller must be an admin for the role (see {getRoleAdmin})\n     * - revoked role must not be the `PUBLIC_ROLE`\n     *\n     * Emits a {RoleRevoked} event if the account had the role.\n     */\n    function revokeRole(uint64 roleId, address account) external;\n\n    /**\n     * @dev Renounce role permissions for the calling account with immediate effect. If the sender is not in\n     * the role this call has no effect.\n     *\n     * Requirements:\n     *\n     * - the caller must be `callerConfirmation`.\n     *\n     * Emits a {RoleRevoked} event if the account had the role.\n     */\n    function renounceRole(uint64 roleId, address callerConfirmation) external;\n\n    /**\n     * @dev Change admin role for a given role.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     * - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE`\n     *\n     * Emits a {RoleAdminChanged} event\n     */\n    function setRoleAdmin(uint64 roleId, uint64 admin) external;\n\n    /**\n     * @dev Change guardian role for a given role.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     * - `roleId` must not be the `ADMIN_ROLE` or `PUBLIC_ROLE`\n     *\n     * Emits a {RoleGuardianChanged} event\n     */\n    function setRoleGuardian(uint64 roleId, uint64 guardian) external;\n\n    /**\n     * @dev Update the delay for granting a `roleId`.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     * - `roleId` must not be the `PUBLIC_ROLE`\n     *\n     * Emits a {RoleGrantDelayChanged} event.\n     */\n    function setGrantDelay(uint64 roleId, uint32 newDelay) external;\n\n    /**\n     * @dev Set the role required to call functions identified by the `selectors` in the `target` contract.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {TargetFunctionRoleUpdated} event per selector.\n     */\n    function setTargetFunctionRole(address target, bytes4[] calldata selectors, uint64 roleId) external;\n\n    /**\n     * @dev Set the delay for changing the configuration of a given target contract.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {TargetAdminDelayUpdated} event.\n     */\n    function setTargetAdminDelay(address target, uint32 newDelay) external;\n\n    /**\n     * @dev Set the closed flag for a contract.\n     *\n     * Closing the manager itself won't disable access to admin methods to avoid locking the contract.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     *\n     * Emits a {TargetClosed} event.\n     */\n    function setTargetClosed(address target, bool closed) external;\n\n    /**\n     * @dev Return the timepoint at which a scheduled operation will be ready for execution. This returns 0 if the\n     * operation is not yet scheduled, has expired, was executed, or was canceled.\n     */\n    function getSchedule(bytes32 id) external view returns (uint48);\n\n    /**\n     * @dev Return the nonce for the latest scheduled operation with a given id. Returns 0 if the operation has never\n     * been scheduled.\n     */\n    function getNonce(bytes32 id) external view returns (uint32);\n\n    /**\n     * @dev Schedule a delayed operation for future execution, and return the operation identifier. It is possible to\n     * choose the timestamp at which the operation becomes executable as long as it satisfies the execution delays\n     * required for the caller. The special value zero will automatically set the earliest possible time.\n     *\n     * Returns the `operationId` that was scheduled. Since this value is a hash of the parameters, it can reoccur when\n     * the same parameters are used; if this is relevant, the returned `nonce` can be used to uniquely identify this\n     * scheduled operation from other occurrences of the same `operationId` in invocations of {execute} and {cancel}.\n     *\n     * Emits a {OperationScheduled} event.\n     *\n     * NOTE: It is not possible to concurrently schedule more than one operation with the same `target` and `data`. If\n     * this is necessary, a random byte can be appended to `data` to act as a salt that will be ignored by the target\n     * contract if it is using standard Solidity ABI encoding.\n     */\n    function schedule(\n        address target,\n        bytes calldata data,\n        uint48 when\n    ) external returns (bytes32 operationId, uint32 nonce);\n\n    /**\n     * @dev Execute a function that is delay restricted, provided it was properly scheduled beforehand, or the\n     * execution delay is 0.\n     *\n     * Returns the nonce that identifies the previously scheduled operation that is executed, or 0 if the\n     * operation wasn't previously scheduled (if the caller doesn't have an execution delay).\n     *\n     * Emits an {OperationExecuted} event only if the call was scheduled and delayed.\n     */\n    function execute(address target, bytes calldata data) external payable returns (uint32);\n\n    /**\n     * @dev Cancel a scheduled (delayed) operation. Returns the nonce that identifies the previously scheduled\n     * operation that is cancelled.\n     *\n     * Requirements:\n     *\n     * - the caller must be the proposer, a guardian of the targeted function, or a global admin\n     *\n     * Emits a {OperationCanceled} event.\n     */\n    function cancel(address caller, address target, bytes calldata data) external returns (uint32);\n\n    /**\n     * @dev Consume a scheduled operation targeting the caller. If such an operation exists, mark it as consumed\n     * (emit an {OperationExecuted} event and clean the state). Otherwise, throw an error.\n     *\n     * This is useful for contracts that want to enforce that calls targeting them were scheduled on the manager,\n     * with all the verifications that it implies.\n     *\n     * Emit a {OperationExecuted} event.\n     */\n    function consumeScheduledOp(address caller, bytes calldata data) external;\n\n    /**\n     * @dev Hashing function for delayed operations.\n     */\n    function hashOperation(address caller, address target, bytes calldata data) external view returns (bytes32);\n\n    /**\n     * @dev Changes the authority of a target managed by this manager instance.\n     *\n     * Requirements:\n     *\n     * - the caller must be a global admin\n     */\n    function updateAuthority(address target, address newAuthority) external;\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/access/manager/IAuthority.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (access/manager/IAuthority.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Standard interface for permissioning originally defined in Dappsys.\n */\ninterface IAuthority {\n    /**\n     * @dev Returns true if the caller can invoke on a target the function identified by a function selector.\n     */\n    function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/interfaces/draft-IERC1822.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n    /**\n     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n     * address.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy.\n     */\n    function proxiableUUID() external view returns (bytes32);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/interfaces/draft-IERC6093.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/draft-IERC6093.sol)\n\npragma solidity >=0.8.4;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC20InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC20InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     * @param allowance Amount of tokens a `spender` is allowed to operate with.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC20InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n    /**\n     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-721.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC1155InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC1155InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC1155MissingApprovalForAll(address operator, address owner);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC1155InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC1155InvalidOperator(address operator);\n\n    /**\n     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n     * Used in batch transfers.\n     * @param idsLength Length of the array of token identifiers\n     * @param valuesLength Length of the array of token amounts\n     */\n    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/interfaces/IERC1967.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol)\n\npragma solidity >=0.4.11;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n */\ninterface IERC1967 {\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Emitted when the beacon is changed.\n     */\n    event BeaconUpgraded(address indexed beacon);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/metatx/ERC2771Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (metatx/ERC2771Context.sol)\n\npragma solidity ^0.8.20;\n\nimport {Context} from \"../utils/Context.sol\";\n\n/**\n * @dev Context variant with ERC-2771 support. See {_msgSender} for the calldata format.\n *\n * WARNING: Avoid using this pattern in contracts that rely on a specific calldata length as they'll\n * be affected by any forwarder whose `msg.data` is suffixed with the `from` address according to the ERC-2771\n * specification adding the address size in bytes (20) to the calldata size. An example of an unexpected\n * behavior could be an unintended fallback (or another function) invocation while trying to invoke the `receive`\n * function only accessible if `msg.data.length == 0`.\n *\n * WARNING: The usage of `delegatecall` in this contract is dangerous and may result in context corruption.\n * Any forwarded request to this contract triggering a `delegatecall` to itself will result in an invalid {_msgSender}\n * recovery.\n */\nabstract contract ERC2771Context is Context {\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n    address private immutable _trustedForwarder;\n\n    /**\n     * @dev Initializes the contract with a trusted forwarder, which will be able to\n     * invoke functions on this contract on behalf of other accounts.\n     *\n     * NOTE: The trusted forwarder can be replaced by overriding {trustedForwarder}.\n     */\n    /// @custom:oz-upgrades-unsafe-allow constructor\n    constructor(address trustedForwarder_) {\n        _trustedForwarder = trustedForwarder_;\n    }\n\n    /**\n     * @dev Returns the address of the trusted forwarder.\n     */\n    function trustedForwarder() public view virtual returns (address) {\n        return _trustedForwarder;\n    }\n\n    /**\n     * @dev Indicates whether any particular address is the trusted forwarder.\n     */\n    function isTrustedForwarder(address forwarder) public view virtual returns (bool) {\n        return forwarder == trustedForwarder();\n    }\n\n    /**\n     * @dev Override for `msg.sender`. Defaults to the original `msg.sender` whenever\n     * a call is not performed by the trusted forwarder or the calldata length is less than\n     * 20 bytes (an address length).\n     */\n    function _msgSender() internal view virtual override returns (address) {\n        uint256 calldataLength = msg.data.length;\n        uint256 contextSuffixLength = _contextSuffixLength();\n        if (calldataLength >= contextSuffixLength && isTrustedForwarder(msg.sender)) {\n            unchecked {\n                return address(bytes20(msg.data[calldataLength - contextSuffixLength:]));\n            }\n        } else {\n            return super._msgSender();\n        }\n    }\n\n    /**\n     * @dev Override for `msg.data`. Defaults to the original `msg.data` whenever\n     * a call is not performed by the trusted forwarder or the calldata length is less than\n     * 20 bytes (an address length).\n     */\n    function _msgData() internal view virtual override returns (bytes calldata) {\n        uint256 calldataLength = msg.data.length;\n        uint256 contextSuffixLength = _contextSuffixLength();\n        if (calldataLength >= contextSuffixLength && isTrustedForwarder(msg.sender)) {\n            unchecked {\n                return msg.data[:calldataLength - contextSuffixLength];\n            }\n        } else {\n            return super._msgData();\n        }\n    }\n\n    /**\n     * @dev ERC-2771 specifies the context as being a single address (20 bytes).\n     */\n    function _contextSuffixLength() internal view virtual override returns (uint256) {\n        return 20;\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/proxy/beacon/IBeacon.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {UpgradeableBeacon} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/proxy/ERC1967/ERC1967Utils.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (proxy/ERC1967/ERC1967Utils.sol)\n\npragma solidity ^0.8.21;\n\nimport {IBeacon} from \"../beacon/IBeacon.sol\";\nimport {IERC1967} from \"../../interfaces/IERC1967.sol\";\nimport {Address} from \"../../utils/Address.sol\";\nimport {StorageSlot} from \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This library provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.\n */\nlibrary ERC1967Utils {\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev The `implementation` of the proxy is invalid.\n     */\n    error ERC1967InvalidImplementation(address implementation);\n\n    /**\n     * @dev The `admin` of the proxy is invalid.\n     */\n    error ERC1967InvalidAdmin(address admin);\n\n    /**\n     * @dev The `beacon` of the proxy is invalid.\n     */\n    error ERC1967InvalidBeacon(address beacon);\n\n    /**\n     * @dev An upgrade function sees `msg.value > 0` that may be lost.\n     */\n    error ERC1967NonPayable();\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function getImplementation() internal view returns (address) {\n        return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the ERC-1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        if (newImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(newImplementation);\n        }\n        StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Performs implementation upgrade with additional setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) internal {\n        _setImplementation(newImplementation);\n        emit IERC1967.Upgraded(newImplementation);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(newImplementation, data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Returns the current admin.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using\n     * the https://ethereum.org/developers/docs/apis/json-rpc/#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n     */\n    function getAdmin() internal view returns (address) {\n        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the ERC-1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        if (newAdmin == address(0)) {\n            revert ERC1967InvalidAdmin(address(0));\n        }\n        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {IERC1967-AdminChanged} event.\n     */\n    function changeAdmin(address newAdmin) internal {\n        emit IERC1967.AdminChanged(getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is the keccak-256 hash of \"eip1967.proxy.beacon\" subtracted by 1.\n     */\n    // solhint-disable-next-line private-vars-leading-underscore\n    bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function getBeacon() internal view returns (address) {\n        return StorageSlot.getAddressSlot(BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the ERC-1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        if (newBeacon.code.length == 0) {\n            revert ERC1967InvalidBeacon(newBeacon);\n        }\n\n        StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;\n\n        address beaconImplementation = IBeacon(newBeacon).implementation();\n        if (beaconImplementation.code.length == 0) {\n            revert ERC1967InvalidImplementation(beaconImplementation);\n        }\n    }\n\n    /**\n     * @dev Change the beacon and trigger a setup call if data is nonempty.\n     * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected\n     * to avoid stuck value in the contract.\n     *\n     * Emits an {IERC1967-BeaconUpgraded} event.\n     *\n     * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since\n     * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for\n     * efficiency.\n     */\n    function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {\n        _setBeacon(newBeacon);\n        emit IERC1967.BeaconUpgraded(newBeacon);\n\n        if (data.length > 0) {\n            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n        } else {\n            _checkNonPayable();\n        }\n    }\n\n    /**\n     * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract\n     * if an upgrade doesn't perform an initialization call.\n     */\n    function _checkNonPayable() private {\n        if (msg.value > 0) {\n            revert ERC1967NonPayable();\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/proxy/utils/UUPSUpgradeable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.22;\n\nimport {IERC1822Proxiable} from \"../../interfaces/draft-IERC1822.sol\";\nimport {ERC1967Utils} from \"../ERC1967/ERC1967Utils.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * @custom:stateless\n */\nabstract contract UUPSUpgradeable is IERC1822Proxiable {\n    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n    address private immutable __self = address(this);\n\n    /**\n     * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`\n     * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,\n     * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.\n     * If the getter returns `\"5.0.0\"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must\n     * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function\n     * during an upgrade.\n     */\n    string public constant UPGRADE_INTERFACE_VERSION = \"5.0.0\";\n\n    /**\n     * @dev The call is from an unauthorized context.\n     */\n    error UUPSUnauthorizedCallContext();\n\n    /**\n     * @dev The storage `slot` is unsupported as a UUID.\n     */\n    error UUPSUnsupportedProxiableUUID(bytes32 slot);\n\n    /**\n     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n     * a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case\n     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n     * function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n     * fail.\n     */\n    modifier onlyProxy() {\n        _checkProxy();\n        _;\n    }\n\n    /**\n     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n     * callable on the implementing contract but not through proxies.\n     */\n    modifier notDelegated() {\n        _checkNotDelegated();\n        _;\n    }\n\n    /**\n     * @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the\n     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\n     *\n     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\n     */\n    function proxiableUUID() external view notDelegated returns (bytes32) {\n        return ERC1967Utils.IMPLEMENTATION_SLOT;\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n     * encoded in `data`.\n     *\n     * Calls {_authorizeUpgrade}.\n     *\n     * Emits an {Upgraded} event.\n     *\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n        _authorizeUpgrade(newImplementation);\n        _upgradeToAndCallUUPS(newImplementation, data);\n    }\n\n    /**\n     * @dev Reverts if the execution is not performed via delegatecall or the execution\n     * context is not of a proxy with an ERC-1967 compliant implementation pointing to self.\n     */\n    function _checkProxy() internal view virtual {\n        if (\n            address(this) == __self || // Must be called through delegatecall\n            ERC1967Utils.getImplementation() != __self // Must be called through an active proxy\n        ) {\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Reverts if the execution is performed via delegatecall.\n     * See {notDelegated}.\n     */\n    function _checkNotDelegated() internal view virtual {\n        if (address(this) != __self) {\n            // Must not be called through delegatecall\n            revert UUPSUnauthorizedCallContext();\n        }\n    }\n\n    /**\n     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n     * {upgradeToAndCall}.\n     *\n     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n     *\n     * ```solidity\n     * function _authorizeUpgrade(address) internal onlyOwner {}\n     * ```\n     */\n    function _authorizeUpgrade(address newImplementation) internal virtual;\n\n    /**\n     * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.\n     *\n     * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value\n     * is expected to be the implementation slot in ERC-1967.\n     *\n     * Emits an {IERC1967-Upgraded} event.\n     */\n    function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {\n        try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n            if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {\n                revert UUPSUnsupportedProxiableUUID(slot);\n            }\n            ERC1967Utils.upgradeToAndCall(newImplementation, data);\n        } catch {\n            // The implementation is not UUPS\n            revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/token/ERC20/ERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n    mapping(address account => uint256) private _balances;\n\n    mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * Both values are immutable: they can only be set once during construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the default value returned by this function, unless\n     * it's overridden.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual returns (uint8) {\n        return 18;\n    }\n\n    /// @inheritdoc IERC20\n    function totalSupply() public view virtual returns (uint256) {\n        return _totalSupply;\n    }\n\n    /// @inheritdoc IERC20\n    function balanceOf(address account) public view virtual returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `value`.\n     */\n    function transfer(address to, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, value);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function allowance(address owner, address spender) public view virtual returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Skips emitting an {Approval} event indicating an allowance update. This is not\n     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `value`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `value`.\n     */\n    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, value);\n        _transfer(from, to, value);\n        return true;\n    }\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _transfer(address from, address to, uint256 value) internal {\n        if (from == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        if (to == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(from, to, value);\n    }\n\n    /**\n     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n     * this function.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _update(address from, address to, uint256 value) internal virtual {\n        if (from == address(0)) {\n            // Overflow check required: The rest of the code assumes that totalSupply never overflows\n            _totalSupply += value;\n        } else {\n            uint256 fromBalance = _balances[from];\n            if (fromBalance < value) {\n                revert ERC20InsufficientBalance(from, fromBalance, value);\n            }\n            unchecked {\n                // Overflow not possible: value <= fromBalance <= totalSupply.\n                _balances[from] = fromBalance - value;\n            }\n        }\n\n        if (to == address(0)) {\n            unchecked {\n                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n                _totalSupply -= value;\n            }\n        } else {\n            unchecked {\n                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n                _balances[to] += value;\n            }\n        }\n\n        emit Transfer(from, to, value);\n    }\n\n    /**\n     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n     * Relies on the `_update` mechanism\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _mint(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(address(0), account, value);\n    }\n\n    /**\n     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n     * Relies on the `_update` mechanism.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead\n     */\n    function _burn(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        _update(account, address(0), value);\n    }\n\n    /**\n     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     *\n     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n     */\n    function _approve(address owner, address spender, uint256 value) internal {\n        _approve(owner, spender, value, true);\n    }\n\n    /**\n     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n     *\n     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n     * `_spendAllowance` during the `transferFrom` operation sets the flag to false. This saves gas by not emitting any\n     * `Approval` event during `transferFrom` operations.\n     *\n     * Anyone who wishes to continue emitting `Approval` events on the `transferFrom` operation can force the flag to\n     * true using the following override:\n     *\n     * ```solidity\n     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n     *     super._approve(owner, spender, value, true);\n     * }\n     * ```\n     *\n     * Requirements are the same as {_approve}.\n     */\n    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n        if (owner == address(0)) {\n            revert ERC20InvalidApprover(address(0));\n        }\n        if (spender == address(0)) {\n            revert ERC20InvalidSpender(address(0));\n        }\n        _allowances[owner][spender] = value;\n        if (emitEvent) {\n            emit Approval(owner, spender, value);\n        }\n    }\n\n    /**\n     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n     *\n     * Does not update the allowance value in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Does not emit an {Approval} event.\n     */\n    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance < type(uint256).max) {\n            if (currentAllowance < value) {\n                revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n            }\n            unchecked {\n                _approve(owner, spender, currentAllowance - value, false);\n            }\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/token/ERC20/extensions/IERC20Metadata.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/token/ERC20/IERC20.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/Address.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.20;\n\nimport {Errors} from \"./Errors.sol\";\nimport {LowLevelCall} from \"./LowLevelCall.sol\";\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev There's no code at `target` (it is not a contract).\n     */\n    error AddressEmptyCode(address target);\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        if (address(this).balance < amount) {\n            revert Errors.InsufficientBalance(address(this).balance, amount);\n        }\n        if (LowLevelCall.callNoReturn(recipient, amount, \"\")) {\n            // call successful, nothing to do\n            return;\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason or custom error, it is bubbled\n     * up by this function (like regular Solidity function calls). However, if\n     * the call reverted with no returned reason, this function reverts with a\n     * {Errors.FailedCall} error.\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        if (address(this).balance < value) {\n            revert Errors.InsufficientBalance(address(this).balance, value);\n        }\n        bool success = LowLevelCall.callNoReturn(target, value, data);\n        if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {\n            return LowLevelCall.returnData();\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        bool success = LowLevelCall.staticcallNoReturn(target, data);\n        if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {\n            return LowLevelCall.returnData();\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        bool success = LowLevelCall.delegatecallNoReturn(target, data);\n        if (success && (LowLevelCall.returnDataSize() > 0 || target.code.length > 0)) {\n            return LowLevelCall.returnData();\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (LowLevelCall.returnDataSize() > 0) {\n            LowLevelCall.bubbleRevert();\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target\n     * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case\n     * of an unsuccessful call.\n     *\n     * NOTE: This function is DEPRECATED and may be removed in the next major release.\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata\n    ) internal view returns (bytes memory) {\n        // only check if target is a contract if the call was successful and the return data is empty\n        // otherwise we already know that it was a contract\n        if (success && (returndata.length > 0 || target.code.length > 0)) {\n            return returndata;\n        } else if (success) {\n            revert AddressEmptyCode(target);\n        } else if (returndata.length > 0) {\n            LowLevelCall.bubbleRevert(returndata);\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the\n     * revert reason or with a default {Errors.FailedCall} error.\n     */\n    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else if (returndata.length > 0) {\n            LowLevelCall.bubbleRevert(returndata);\n        } else {\n            revert Errors.FailedCall();\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/Bytes.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/Bytes.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\n\n/**\n * @dev Bytes operations.\n */\nlibrary Bytes {\n    /**\n     * @dev Forward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the first instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return indexOf(buffer, s, 0);\n    }\n\n    /**\n     * @dev Forward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or after `pos`), returns the index of the next instance\n     * * If `s` is not present in the buffer (at or after `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf[Javascript's `Array.indexOf`]\n     */\n    function indexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        uint256 length = buffer.length;\n        for (uint256 i = pos; i < length; ++i) {\n            if (bytes1(_unsafeReadBytesOffset(buffer, i)) == s) {\n                return i;\n            }\n        }\n        return type(uint256).max;\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer`\n     * * If `s` is present in the buffer, returns the index of the last instance\n     * * If `s` is not present in the buffer, returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s) internal pure returns (uint256) {\n        return lastIndexOf(buffer, s, type(uint256).max);\n    }\n\n    /**\n     * @dev Backward search for `s` in `buffer` starting at position `pos`\n     * * If `s` is present in the buffer (at or before `pos`), returns the index of the previous instance\n     * * If `s` is not present in the buffer (at or before `pos`), returns type(uint256).max\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf[Javascript's `Array.lastIndexOf`]\n     */\n    function lastIndexOf(bytes memory buffer, bytes1 s, uint256 pos) internal pure returns (uint256) {\n        unchecked {\n            uint256 length = buffer.length;\n            for (uint256 i = Math.min(Math.saturatingAdd(pos, 1), length); i > 0; --i) {\n                if (bytes1(_unsafeReadBytesOffset(buffer, i - 1)) == s) {\n                    return i - 1;\n                }\n            }\n            return type(uint256).max;\n        }\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to the end of `buffer` into a new bytes object in\n     * memory.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n        return slice(buffer, start, buffer.length);\n    }\n\n    /**\n     * @dev Copies the content of `buffer`, from `start` (included) to `end` (excluded) into a new bytes object in\n     * memory. The `end` argument is truncated to the length of the `buffer`.\n     *\n     * NOTE: replicates the behavior of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice[Javascript's `Array.slice`]\n     */\n    function slice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n        // sanitize\n        end = Math.min(end, buffer.length);\n        start = Math.min(start, end);\n\n        // allocate and copy\n        bytes memory result = new bytes(end - start);\n        assembly (\"memory-safe\") {\n            mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n        }\n\n        return result;\n    }\n\n    /**\n     * @dev Moves the content of `buffer`, from `start` (included) to the end of `buffer` to the start of that buffer,\n     * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:].\n     *\n     * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n     */\n    function splice(bytes memory buffer, uint256 start) internal pure returns (bytes memory) {\n        return splice(buffer, start, buffer.length);\n    }\n\n    /**\n     * @dev Moves the content of `buffer`, from `start` (included) to `end` (excluded) to the start of that buffer,\n     * and shrinks the buffer length accordingly, effectively overriding the content of buffer with buffer[start:end].\n     * The `end` argument is truncated to the length of the `buffer`.\n     *\n     * NOTE: This function modifies the provided buffer in place. If you need to preserve the original buffer, use {slice} instead\n     */\n    function splice(bytes memory buffer, uint256 start, uint256 end) internal pure returns (bytes memory) {\n        // sanitize\n        end = Math.min(end, buffer.length);\n        start = Math.min(start, end);\n\n        // move and resize\n        assembly (\"memory-safe\") {\n            mcopy(add(buffer, 0x20), add(add(buffer, 0x20), start), sub(end, start))\n            mstore(buffer, sub(end, start))\n        }\n\n        return buffer;\n    }\n\n    /**\n     * @dev Replaces bytes in `buffer` starting at `pos` with all bytes from `replacement`.\n     *\n     * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`).\n     * If `pos >= buffer.length`, no replacement occurs and the buffer is returned unchanged.\n     *\n     * NOTE: This function modifies the provided buffer in place.\n     */\n    function replace(bytes memory buffer, uint256 pos, bytes memory replacement) internal pure returns (bytes memory) {\n        return replace(buffer, pos, replacement, 0, replacement.length);\n    }\n\n    /**\n     * @dev Replaces bytes in `buffer` starting at `pos` with bytes from `replacement` starting at `offset`.\n     * Copies at most `length` bytes from `replacement` to `buffer`.\n     *\n     * Parameters are clamped to valid ranges (i.e. `pos` is clamped to `[0, buffer.length]`, `offset` is\n     * clamped to `[0, replacement.length]`, and `length` is clamped to `min(length, replacement.length - offset,\n     * buffer.length - pos))`. If `pos >= buffer.length` or `offset >= replacement.length`, no replacement occurs\n     * and the buffer is returned unchanged.\n     *\n     * NOTE: This function modifies the provided buffer in place.\n     */\n    function replace(\n        bytes memory buffer,\n        uint256 pos,\n        bytes memory replacement,\n        uint256 offset,\n        uint256 length\n    ) internal pure returns (bytes memory) {\n        // sanitize\n        pos = Math.min(pos, buffer.length);\n        offset = Math.min(offset, replacement.length);\n        length = Math.min(length, Math.min(replacement.length - offset, buffer.length - pos));\n\n        // replace\n        assembly (\"memory-safe\") {\n            mcopy(add(add(buffer, 0x20), pos), add(add(replacement, 0x20), offset), length)\n        }\n\n        return buffer;\n    }\n\n    /**\n     * @dev Concatenate an array of bytes into a single bytes object.\n     *\n     * For fixed bytes types, we recommend using the solidity built-in `bytes.concat` or (equivalent)\n     * `abi.encodePacked`.\n     *\n     * NOTE: this could be done in assembly with a single loop that expands starting at the FMP, but that would be\n     * significantly less readable. It might be worth benchmarking the savings of the full-assembly approach.\n     */\n    function concat(bytes[] memory buffers) internal pure returns (bytes memory) {\n        uint256 length = 0;\n        for (uint256 i = 0; i < buffers.length; ++i) {\n            length += buffers[i].length;\n        }\n\n        bytes memory result = new bytes(length);\n\n        uint256 offset = 0x20;\n        for (uint256 i = 0; i < buffers.length; ++i) {\n            bytes memory input = buffers[i];\n            assembly (\"memory-safe\") {\n                mcopy(add(result, offset), add(input, 0x20), mload(input))\n            }\n            unchecked {\n                offset += input.length;\n            }\n        }\n\n        return result;\n    }\n\n    /**\n     * @dev Split each byte in `input` into two nibbles (4 bits each)\n     *\n     * Example: hex\"01234567\" → hex\"0001020304050607\"\n     */\n    function toNibbles(bytes memory input) internal pure returns (bytes memory output) {\n        assembly (\"memory-safe\") {\n            let length := mload(input)\n            output := mload(0x40)\n            mstore(0x40, add(add(output, 0x20), mul(length, 2)))\n            mstore(output, mul(length, 2))\n            for {\n                let i := 0\n            } lt(i, length) {\n                i := add(i, 0x10)\n            } {\n                let chunk := shr(128, mload(add(add(input, 0x20), i)))\n                chunk := and(\n                    0x0000000000000000ffffffffffffffff0000000000000000ffffffffffffffff,\n                    or(shl(64, chunk), chunk)\n                )\n                chunk := and(\n                    0x00000000ffffffff00000000ffffffff00000000ffffffff00000000ffffffff,\n                    or(shl(32, chunk), chunk)\n                )\n                chunk := and(\n                    0x0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff,\n                    or(shl(16, chunk), chunk)\n                )\n                chunk := and(\n                    0x00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff,\n                    or(shl(8, chunk), chunk)\n                )\n                chunk := and(\n                    0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f,\n                    or(shl(4, chunk), chunk)\n                )\n                mstore(add(add(output, 0x20), mul(i, 2)), chunk)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns true if the two byte buffers are equal.\n     */\n    function equal(bytes memory a, bytes memory b) internal pure returns (bool) {\n        return a.length == b.length && keccak256(a) == keccak256(b);\n    }\n\n    /**\n     * @dev Reverses the byte order of a bytes32 value, converting between little-endian and big-endian.\n     * Inspired by https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel[Reverse Parallel]\n     */\n    function reverseBytes32(bytes32 value) internal pure returns (bytes32) {\n        value = // swap bytes\n            ((value >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\n            ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n        value = // swap 2-byte long pairs\n            ((value >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\n            ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n        value = // swap 4-byte long pairs\n            ((value >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\n            ((value & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\n        value = // swap 8-byte long pairs\n            ((value >> 64) & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) |\n            ((value & 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) << 64);\n        return (value >> 128) | (value << 128); // swap 16-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 128-bit values.\n    function reverseBytes16(bytes16 value) internal pure returns (bytes16) {\n        value = // swap bytes\n            ((value & 0xFF00FF00FF00FF00FF00FF00FF00FF00) >> 8) |\n            ((value & 0x00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\n        value = // swap 2-byte long pairs\n            ((value & 0xFFFF0000FFFF0000FFFF0000FFFF0000) >> 16) |\n            ((value & 0x0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\n        value = // swap 4-byte long pairs\n            ((value & 0xFFFFFFFF00000000FFFFFFFF00000000) >> 32) |\n            ((value & 0x00000000FFFFFFFF00000000FFFFFFFF) << 32);\n        return (value >> 64) | (value << 64); // swap 8-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 64-bit values.\n    function reverseBytes8(bytes8 value) internal pure returns (bytes8) {\n        value = ((value & 0xFF00FF00FF00FF00) >> 8) | ((value & 0x00FF00FF00FF00FF) << 8); // swap bytes\n        value = ((value & 0xFFFF0000FFFF0000) >> 16) | ((value & 0x0000FFFF0000FFFF) << 16); // swap 2-byte long pairs\n        return (value >> 32) | (value << 32); // swap 4-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 32-bit values.\n    function reverseBytes4(bytes4 value) internal pure returns (bytes4) {\n        value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); // swap bytes\n        return (value >> 16) | (value << 16); // swap 2-byte long pairs\n    }\n\n    /// @dev Same as {reverseBytes32} but optimized for 16-bit values.\n    function reverseBytes2(bytes2 value) internal pure returns (bytes2) {\n        return (value >> 8) | (value << 8);\n    }\n\n    /**\n     * @dev Counts the number of leading zero bits a bytes array. Returns `8 * buffer.length`\n     * if the buffer is all zeros.\n     */\n    function clz(bytes memory buffer) internal pure returns (uint256) {\n        for (uint256 i = 0; i < buffer.length; i += 0x20) {\n            bytes32 chunk = _unsafeReadBytesOffset(buffer, i);\n            if (chunk != bytes32(0)) {\n                return Math.min(8 * i + Math.clz(uint256(chunk)), 8 * buffer.length);\n            }\n        }\n        return 8 * buffer.length;\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/cryptography/ECDSA.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSA {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS\n    }\n\n    /**\n     * @dev The signature is invalid.\n     */\n    error ECDSAInvalidSignature();\n\n    /**\n     * @dev The signature has an invalid length.\n     */\n    error ECDSAInvalidSignatureLength(uint256 length);\n\n    /**\n     * @dev The signature has an S value that is in the upper half order.\n     */\n    error ECDSAInvalidSignatureS(bytes32 s);\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not\n     * return address(0) without also returning an error description. Errors are documented using an enum (error type)\n     * and a bytes32 providing additional information about the error.\n     *\n     * If no error is returned, then the address can be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n     * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n     * invalidation or nonces for replay protection.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     *\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes memory signature\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            assembly (\"memory-safe\") {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Variant of {tryRecover} that takes a signature in calldata\n     */\n    function tryRecoverCalldata(\n        bytes32 hash,\n        bytes calldata signature\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, calldata slices would work here, but are\n            // significantly more expensive (length check) than using calldataload in assembly.\n            assembly (\"memory-safe\") {\n                r := calldataload(signature.offset)\n                s := calldataload(add(signature.offset, 0x20))\n                v := byte(0, calldataload(add(signature.offset, 0x40)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * NOTE: This function only supports 65-byte signatures. ERC-2098 short signatures are rejected. This restriction\n     * is DEPRECATED and will be removed in v6.0. Developers SHOULD NOT use signatures as unique identifiers; use hash\n     * invalidation or nonces for replay protection.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Variant of {recover} that takes a signature in calldata\n     */\n    function recoverCalldata(bytes32 hash, bytes calldata signature) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecoverCalldata(hash, signature);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures]\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        unchecked {\n            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n            // We do not check for an overflow here since the shift operation results in 0 or 1.\n            uint8 v = uint8((uint256(vs) >> 255) + 27);\n            return tryRecover(hash, v, r, s);\n        }\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r` and `vs` short-signature fields separately.\n     */\n    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address recovered, RecoverError err, bytes32 errArg) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS, s);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature, bytes32(0));\n        }\n\n        return (signer, RecoverError.NoError, bytes32(0));\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {\n        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);\n        _throwError(error, errorArg);\n        return recovered;\n    }\n\n    /**\n     * @dev Parse a signature into its `v`, `r` and `s` components. Supports 65-byte and 64-byte (ERC-2098)\n     * formats. Returns (0,0,0) for invalid signatures.\n     *\n     * For 64-byte signatures, `v` is automatically normalized to 27 or 28.\n     * For 65-byte signatures, `v` is returned as-is and MUST already be 27 or 28 for use with ecrecover.\n     *\n     * Consider validating the result before use, or use {tryRecover}/{recover} which perform full validation.\n     */\n    function parse(bytes memory signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n        assembly (\"memory-safe\") {\n            // Check the signature length\n            switch mload(signature)\n            // - case 65: r,s,v signature (standard)\n            case 65 {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n            case 64 {\n                let vs := mload(add(signature, 0x40))\n                r := mload(add(signature, 0x20))\n                s := and(vs, shr(1, not(0)))\n                v := add(shr(255, vs), 27)\n            }\n            default {\n                r := 0\n                s := 0\n                v := 0\n            }\n        }\n    }\n\n    /**\n     * @dev Variant of {parse} that takes a signature in calldata\n     */\n    function parseCalldata(bytes calldata signature) internal pure returns (uint8 v, bytes32 r, bytes32 s) {\n        assembly (\"memory-safe\") {\n            // Check the signature length\n            switch signature.length\n            // - case 65: r,s,v signature (standard)\n            case 65 {\n                r := calldataload(signature.offset)\n                s := calldataload(add(signature.offset, 0x20))\n                v := byte(0, calldataload(add(signature.offset, 0x40)))\n            }\n            // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098)\n            case 64 {\n                let vs := calldataload(add(signature.offset, 0x20))\n                r := calldataload(signature.offset)\n                s := and(vs, shr(1, not(0)))\n                v := add(shr(255, vs), 27)\n            }\n            default {\n                r := 0\n                s := 0\n                v := 0\n            }\n        }\n    }\n\n    /**\n     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.\n     */\n    function _throwError(RecoverError error, bytes32 errorArg) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert ECDSAInvalidSignature();\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert ECDSAInvalidSignatureLength(uint256(errorArg));\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert ECDSAInvalidSignatureS(errorArg);\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/cryptography/Hashes.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/Hashes.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library of standard hash functions.\n *\n * _Available since v5.1._\n */\nlibrary Hashes {\n    /**\n     * @dev Commutative Keccak256 hash of a sorted pair of bytes32. Frequently used when working with merkle proofs.\n     *\n     * NOTE: Equivalent to the `standardNodeHash` in our https://github.com/OpenZeppelin/merkle-tree[JavaScript library].\n     */\n    function commutativeKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32) {\n        return a < b ? efficientKeccak256(a, b) : efficientKeccak256(b, a);\n    }\n\n    /**\n     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.\n     */\n    function efficientKeccak256(bytes32 a, bytes32 b) internal pure returns (bytes32 value) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, a)\n            mstore(0x20, b)\n            value := keccak256(0x00, 0x40)\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/cryptography/MessageHashUtils.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.24;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n    error ERC5267ExtensionsNotSupported();\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing a bytes32 `messageHash` with\n     * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n     * keccak256, although any bytes32 value can be safely used because the final digest will\n     * be re-hashed.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x45` (`personal_sign` messages).\n     *\n     * The digest is calculated by prefixing an arbitrary `message` with\n     * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n     * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n        return\n            keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n     * `0x00` (data with intended validator).\n     *\n     * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n     * `validator` address. Then hashing the result.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n    }\n\n    /**\n     * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n     */\n    function toDataWithIntendedValidatorHash(\n        address validator,\n        bytes32 messageHash\n    ) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            mstore(0x00, hex\"19_00\")\n            mstore(0x02, shl(96, validator))\n            mstore(0x16, messageHash)\n            digest := keccak256(0x00, 0x36)\n        }\n    }\n\n    /**\n     * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n     *\n     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n     * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n     *\n     * See {ECDSA-recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            mstore(ptr, hex\"19_01\")\n            mstore(add(ptr, 0x02), domainSeparator)\n            mstore(add(ptr, 0x22), structHash)\n            digest := keccak256(ptr, 0x42)\n        }\n    }\n\n    /**\n     * @dev Returns the EIP-712 domain separator constructed from an `eip712Domain`. See {IERC5267-eip712Domain}\n     *\n     * This function dynamically constructs the domain separator based on which fields are present in the\n     * `fields` parameter. It contains flags that indicate which domain fields are present:\n     *\n     * * Bit 0 (0x01): name\n     * * Bit 1 (0x02): version\n     * * Bit 2 (0x04): chainId\n     * * Bit 3 (0x08): verifyingContract\n     * * Bit 4 (0x10): salt\n     *\n     * Arguments that correspond to fields which are not present in `fields` are ignored. For example, if `fields` is\n     * `0x0f` (`0b01111`), then the `salt` parameter is ignored.\n     */\n    function toDomainSeparator(\n        bytes1 fields,\n        string memory name,\n        string memory version,\n        uint256 chainId,\n        address verifyingContract,\n        bytes32 salt\n    ) internal pure returns (bytes32 hash) {\n        return\n            toDomainSeparator(\n                fields,\n                keccak256(bytes(name)),\n                keccak256(bytes(version)),\n                chainId,\n                verifyingContract,\n                salt\n            );\n    }\n\n    /// @dev Variant of {toDomainSeparator-bytes1-string-string-uint256-address-bytes32} that uses hashed name and version.\n    function toDomainSeparator(\n        bytes1 fields,\n        bytes32 nameHash,\n        bytes32 versionHash,\n        uint256 chainId,\n        address verifyingContract,\n        bytes32 salt\n    ) internal pure returns (bytes32 hash) {\n        bytes32 domainTypeHash = toDomainTypeHash(fields);\n\n        assembly (\"memory-safe\") {\n            // align fields to the right for easy processing\n            fields := shr(248, fields)\n\n            // FMP used as scratch space\n            let fmp := mload(0x40)\n            mstore(fmp, domainTypeHash)\n\n            let ptr := add(fmp, 0x20)\n            if and(fields, 0x01) {\n                mstore(ptr, nameHash)\n                ptr := add(ptr, 0x20)\n            }\n            if and(fields, 0x02) {\n                mstore(ptr, versionHash)\n                ptr := add(ptr, 0x20)\n            }\n            if and(fields, 0x04) {\n                mstore(ptr, chainId)\n                ptr := add(ptr, 0x20)\n            }\n            if and(fields, 0x08) {\n                mstore(ptr, verifyingContract)\n                ptr := add(ptr, 0x20)\n            }\n            if and(fields, 0x10) {\n                mstore(ptr, salt)\n                ptr := add(ptr, 0x20)\n            }\n\n            hash := keccak256(fmp, sub(ptr, fmp))\n        }\n    }\n\n    /// @dev Builds an EIP-712 domain type hash depending on the `fields` provided, following https://eips.ethereum.org/EIPS/eip-5267[ERC-5267]\n    function toDomainTypeHash(bytes1 fields) internal pure returns (bytes32 hash) {\n        if (fields & 0x20 == 0x20) revert ERC5267ExtensionsNotSupported();\n\n        assembly (\"memory-safe\") {\n            // align fields to the right for easy processing\n            fields := shr(248, fields)\n\n            // FMP used as scratch space\n            let fmp := mload(0x40)\n            mstore(fmp, \"EIP712Domain(\")\n\n            let ptr := add(fmp, 0x0d)\n            // name field\n            if and(fields, 0x01) {\n                mstore(ptr, \"string name,\")\n                ptr := add(ptr, 0x0c)\n            }\n            // version field\n            if and(fields, 0x02) {\n                mstore(ptr, \"string version,\")\n                ptr := add(ptr, 0x0f)\n            }\n            // chainId field\n            if and(fields, 0x04) {\n                mstore(ptr, \"uint256 chainId,\")\n                ptr := add(ptr, 0x10)\n            }\n            // verifyingContract field\n            if and(fields, 0x08) {\n                mstore(ptr, \"address verifyingContract,\")\n                ptr := add(ptr, 0x1a)\n            }\n            // salt field\n            if and(fields, 0x10) {\n                mstore(ptr, \"bytes32 salt,\")\n                ptr := add(ptr, 0x0d)\n            }\n            // if any field is enabled, remove the trailing comma\n            ptr := sub(ptr, iszero(iszero(and(fields, 0x1f))))\n            // add the closing brace\n            mstore8(ptr, 0x29) // add closing brace\n            ptr := add(ptr, 1)\n\n            hash := keccak256(fmp, sub(ptr, fmp))\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/Errors.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Collection of common custom errors used in multiple contracts\n *\n * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.\n * It is recommended to avoid relying on the error API for critical functionality.\n *\n * _Available since v5.1._\n */\nlibrary Errors {\n    /**\n     * @dev The ETH balance of the account is not enough to perform the operation.\n     */\n    error InsufficientBalance(uint256 balance, uint256 needed);\n\n    /**\n     * @dev A call to an address target failed. The target may have reverted.\n     */\n    error FailedCall();\n\n    /**\n     * @dev The deployment failed.\n     */\n    error FailedDeployment();\n\n    /**\n     * @dev A necessary precompile is missing.\n     */\n    error MissingPrecompile(address);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/introspection/ERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC165} from \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n */\nabstract contract ERC165 is IERC165 {\n    /// @inheritdoc IERC165\n    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/introspection/IERC165.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[ERC].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/LowLevelCall.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/LowLevelCall.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library of low level call functions that implement different calling strategies to deal with the return data.\n *\n * WARNING: Using this library requires an advanced understanding of Solidity and how the EVM works. It is recommended\n * to use the {Address} library instead.\n */\nlibrary LowLevelCall {\n    /// @dev Performs a Solidity function call using a low level `call` and ignoring the return data.\n    function callNoReturn(address target, bytes memory data) internal returns (bool success) {\n        return callNoReturn(target, 0, data);\n    }\n\n    /// @dev Same as {callNoReturn-address-bytes}, but allows specifying the value to be sent in the call.\n    function callNoReturn(address target, uint256 value, bytes memory data) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x00)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `call` and returns the first 64 bytes of the result\n    /// in the scratch space of memory. Useful for functions that return a tuple with two single-word values.\n    ///\n    /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated\n    /// and this function doesn't zero it out.\n    function callReturn64Bytes(\n        address target,\n        bytes memory data\n    ) internal returns (bool success, bytes32 result1, bytes32 result2) {\n        return callReturn64Bytes(target, 0, data);\n    }\n\n    /// @dev Same as {callReturn64Bytes-address-bytes}, but allows specifying the value to be sent in the call.\n    function callReturn64Bytes(\n        address target,\n        uint256 value,\n        bytes memory data\n    ) internal returns (bool success, bytes32 result1, bytes32 result2) {\n        assembly (\"memory-safe\") {\n            success := call(gas(), target, value, add(data, 0x20), mload(data), 0x00, 0x40)\n            result1 := mload(0x00)\n            result2 := mload(0x20)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `staticcall` and ignoring the return data.\n    function staticcallNoReturn(address target, bytes memory data) internal view returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `staticcall` and returns the first 64 bytes of the result\n    /// in the scratch space of memory. Useful for functions that return a tuple with two single-word values.\n    ///\n    /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated\n    /// and this function doesn't zero it out.\n    function staticcallReturn64Bytes(\n        address target,\n        bytes memory data\n    ) internal view returns (bool success, bytes32 result1, bytes32 result2) {\n        assembly (\"memory-safe\") {\n            success := staticcall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40)\n            result1 := mload(0x00)\n            result2 := mload(0x20)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `delegatecall` and ignoring the return data.\n    function delegatecallNoReturn(address target, bytes memory data) internal returns (bool success) {\n        assembly (\"memory-safe\") {\n            success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x00)\n        }\n    }\n\n    /// @dev Performs a Solidity function call using a low level `delegatecall` and returns the first 64 bytes of the result\n    /// in the scratch space of memory. Useful for functions that return a tuple with two single-word values.\n    ///\n    /// WARNING: Do not assume that the results are zero if `success` is false. Memory can be already allocated\n    /// and this function doesn't zero it out.\n    function delegatecallReturn64Bytes(\n        address target,\n        bytes memory data\n    ) internal returns (bool success, bytes32 result1, bytes32 result2) {\n        assembly (\"memory-safe\") {\n            success := delegatecall(gas(), target, add(data, 0x20), mload(data), 0x00, 0x40)\n            result1 := mload(0x00)\n            result2 := mload(0x20)\n        }\n    }\n\n    /// @dev Returns the size of the return data buffer.\n    function returnDataSize() internal pure returns (uint256 size) {\n        assembly (\"memory-safe\") {\n            size := returndatasize()\n        }\n    }\n\n    /// @dev Returns a buffer containing the return data from the last call.\n    function returnData() internal pure returns (bytes memory result) {\n        assembly (\"memory-safe\") {\n            result := mload(0x40)\n            mstore(result, returndatasize())\n            returndatacopy(add(result, 0x20), 0x00, returndatasize())\n            mstore(0x40, add(result, add(0x20, returndatasize())))\n        }\n    }\n\n    /// @dev Revert with the return data from the last call.\n    function bubbleRevert() internal pure {\n        assembly (\"memory-safe\") {\n            let fmp := mload(0x40)\n            returndatacopy(fmp, 0x00, returndatasize())\n            revert(fmp, returndatasize())\n        }\n    }\n\n    function bubbleRevert(bytes memory returndata) internal pure {\n        assembly (\"memory-safe\") {\n            revert(add(returndata, 0x20), mload(returndata))\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/math/Math.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Return the 512-bit addition of two uint256.\n     *\n     * The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.\n     */\n    function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        assembly (\"memory-safe\") {\n            low := add(a, b)\n            high := lt(low, a)\n        }\n    }\n\n    /**\n     * @dev Return the 512-bit multiplication of two uint256.\n     *\n     * The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.\n     */\n    function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {\n        // 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n        // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n        // variables such that product = high * 2²⁵⁶ + low.\n        assembly (\"memory-safe\") {\n            let mm := mulmod(a, b, not(0))\n            low := mul(a, b)\n            high := sub(sub(mm, low), lt(mm, low))\n        }\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            success = c >= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a - b;\n            success = c <= a;\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a * b;\n            assembly (\"memory-safe\") {\n                // Only true when the multiplication doesn't overflow\n                // (c / a == b) || (a == 0)\n                success := or(eq(div(c, a), b), iszero(a))\n            }\n            // equivalent to: success ? c : 0\n            result = c * SafeCast.toUint(success);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `DIV` opcode returns zero when the denominator is 0.\n                result := div(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            success = b > 0;\n            assembly (\"memory-safe\") {\n                // The `MOD` opcode returns zero when the denominator is 0.\n                result := mod(a, b)\n            }\n        }\n    }\n\n    /**\n     * @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryAdd(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.\n     */\n    function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {\n        (, uint256 result) = trySub(a, b);\n        return result;\n    }\n\n    /**\n     * @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.\n     */\n    function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {\n        (bool success, uint256 result) = tryMul(a, b);\n        return ternary(success, result, type(uint256).max);\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `condition ? a : b`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `condition ? a : b`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // (a + b) / 2 can overflow.\n            return (a & b) + (a ^ b) / 2;\n        }\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (high == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return low / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= high) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [high low].\n            uint256 remainder;\n            assembly (\"memory-safe\") {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                high := sub(high, gt(remainder, low))\n                low := sub(low, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly (\"memory-safe\") {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [high low] by twos.\n                low := div(low, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from high into low.\n            low |= high * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high\n            // is no longer required.\n            result = low * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {\n        unchecked {\n            (uint256 high, uint256 low) = mul512(x, y);\n            if (high >= 1 << n) {\n                Panic.panic(Panic.UNDER_OVERFLOW);\n            }\n            return (high << (256 - n)) | (low >> n);\n        }\n    }\n\n    /**\n     * @dev Calculates x * y >> n with full precision, following the selected rounding direction.\n     */\n    function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {\n        return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory buffer) private pure returns (bool) {\n        uint256 chunk;\n        for (uint256 i = 0; i < buffer.length; i += 0x20) {\n            // See _unsafeReadBytesOffset from utils/Bytes.sol\n            assembly (\"memory-safe\") {\n                chunk := mload(add(add(buffer, 0x20), i))\n            }\n            if (chunk >> (8 * saturatingSub(i + 0x20, buffer.length)) != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // If upper 8 bits of 16-bit half set, add 8 to result\n        r |= SafeCast.toUint((x >> r) > 0xff) << 3;\n        // If upper 4 bits of 8-bit half set, add 4 to result\n        r |= SafeCast.toUint((x >> r) > 0xf) << 2;\n\n        // Shifts value right by the current result and use it as an index into this lookup table:\n        //\n        // | x (4 bits) |  index  | table[index] = MSB position |\n        // |------------|---------|-----------------------------|\n        // |    0000    |    0    |        table[0] = 0         |\n        // |    0001    |    1    |        table[1] = 0         |\n        // |    0010    |    2    |        table[2] = 1         |\n        // |    0011    |    3    |        table[3] = 1         |\n        // |    0100    |    4    |        table[4] = 2         |\n        // |    0101    |    5    |        table[5] = 2         |\n        // |    0110    |    6    |        table[6] = 2         |\n        // |    0111    |    7    |        table[7] = 2         |\n        // |    1000    |    8    |        table[8] = 3         |\n        // |    1001    |    9    |        table[9] = 3         |\n        // |    1010    |   10    |        table[10] = 3        |\n        // |    1011    |   11    |        table[11] = 3        |\n        // |    1100    |   12    |        table[12] = 3        |\n        // |    1101    |   13    |        table[13] = 3        |\n        // |    1110    |   14    |        table[14] = 3        |\n        // |    1111    |   15    |        table[15] = 3        |\n        //\n        // The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the first 16 bytes (most significant half).\n        assembly (\"memory-safe\") {\n            r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 x) internal pure returns (uint256 r) {\n        // If value has upper 128 bits set, log2 result is at least 128\n        r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;\n        // If upper 64 bits of 128-bit half set, add 64 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;\n        // If upper 32 bits of 64-bit half set, add 32 to result\n        r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;\n        // If upper 16 bits of 32-bit half set, add 16 to result\n        r |= SafeCast.toUint((x >> r) > 0xffff) << 4;\n        // Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8\n        return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n\n    /**\n     * @dev Counts the number of leading zero bits in a uint256.\n     */\n    function clz(uint256 x) internal pure returns (uint256) {\n        return ternary(x == 0, 256, 255 - log2(x));\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/math/SafeCast.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in a uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in a uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev A uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/math/SignedMath.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.20;\n\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, int256 a, int256 b) internal pure returns (int256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * int256(SafeCast.toUint(condition)));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two signed numbers.\n     */\n    function max(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two signed numbers.\n     */\n    function min(int256 a, int256 b) internal pure returns (int256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two signed numbers without overflow.\n     * The result is rounded towards zero.\n     */\n    function average(int256 a, int256 b) internal pure returns (int256) {\n        // Formula from the book \"Hacker's Delight\"\n        int256 x = (a & b) + ((a ^ b) >> 1);\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\n    }\n\n    /**\n     * @dev Returns the absolute unsigned value of a signed value.\n     */\n    function abs(int256 n) internal pure returns (uint256) {\n        unchecked {\n            // Formula from the \"Bit Twiddling Hacks\" by Sean Eron Anderson.\n            // Since `n` is a signed integer, the generated bytecode will use the SAR opcode to perform the right shift,\n            // taking advantage of the most significant (or \"sign\" bit) in two's complement representation.\n            // This opcode adds new most significant bits set to the value of the previous most significant bit. As a result,\n            // the mask will either be `bytes32(0)` (if n is positive) or `~bytes32(0)` (if n is negative).\n            int256 mask = n >> 255;\n\n            // A `bytes32(0)` mask leaves the input unchanged, while a `~bytes32(0)` mask complements it.\n            return uint256((n + mask) ^ mask);\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/Multicall.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/Multicall.sol)\n\npragma solidity ^0.8.20;\n\nimport {Address} from \"./Address.sol\";\nimport {Context} from \"./Context.sol\";\n\n/**\n * @dev Provides a function to batch together multiple calls in a single external call.\n *\n * Consider any assumption about calldata validation performed by the sender may be violated if it's not especially\n * careful about sending transactions invoking {multicall}. For example, a relay address that filters function\n * selectors won't filter calls nested within a {multicall} operation.\n *\n * NOTE: Since 5.0.1 and 4.9.4, this contract identifies non-canonical contexts (i.e. `msg.sender` is not {Context-_msgSender}).\n * If a non-canonical context is identified, the following self `delegatecall` appends the last bytes of `msg.data`\n * to the subcall. This makes it safe to use with {ERC2771Context}. Contexts that don't affect the resolution of\n * {Context-_msgSender} are not propagated to subcalls.\n */\nabstract contract Multicall is Context {\n    /**\n     * @dev Receives and executes a batch of function calls on this contract.\n     * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n     */\n    function multicall(bytes[] calldata data) public virtual returns (bytes[] memory results) {\n        bytes memory context = msg.sender == _msgSender()\n            ? new bytes(0)\n            : msg.data[msg.data.length - _contextSuffixLength():];\n\n        results = new bytes[](data.length);\n        for (uint256 i = 0; i < data.length; i++) {\n            results[i] = Address.functionDelegateCall(address(this), bytes.concat(data[i], context));\n        }\n        return results;\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/Panic.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/StorageSlot.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC-1967 implementation slot:\n * ```solidity\n * contract ERC1967 {\n *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(newImplementation.code.length > 0);\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * TIP: Consider using this library along with {SlotDerivation}.\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    struct Int256Slot {\n        int256 value;\n    }\n\n    struct StringSlot {\n        string value;\n    }\n\n    struct BytesSlot {\n        bytes value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `Int256Slot` with member `value` located at `slot`.\n     */\n    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns a `StringSlot` with member `value` located at `slot`.\n     */\n    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n     */\n    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n\n    /**\n     * @dev Returns a `BytesSlot` with member `value` located at `slot`.\n     */\n    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n     */\n    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n        assembly (\"memory-safe\") {\n            r.slot := store.slot\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/Strings.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.6.0) (utils/Strings.sol)\n\npragma solidity ^0.8.24;\n\nimport {Math} from \"./math/Math.sol\";\nimport {SafeCast} from \"./math/SafeCast.sol\";\nimport {SignedMath} from \"./math/SignedMath.sol\";\nimport {Bytes} from \"./Bytes.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n    using SafeCast for *;\n\n    bytes16 private constant HEX_DIGITS = \"0123456789abcdef\";\n    uint8 private constant ADDRESS_LENGTH = 20;\n    uint256 private constant SPECIAL_CHARS_LOOKUP =\n        0xffffffff | // first 32 bits corresponding to the control characters (U+0000 to U+001F)\n            (1 << 0x22) | // double quote\n            (1 << 0x5c); // backslash\n\n    /**\n     * @dev The `value` string doesn't fit in the specified `length`.\n     */\n    error StringsInsufficientHexLength(uint256 value, uint256 length);\n\n    /**\n     * @dev The string being parsed contains characters that are not in scope of the given base.\n     */\n    error StringsInvalidChar();\n\n    /**\n     * @dev The string being parsed is not a properly formatted address.\n     */\n    error StringsInvalidAddressFormat();\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = Math.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            assembly (\"memory-safe\") {\n                ptr := add(add(buffer, 0x20), length)\n            }\n            while (true) {\n                ptr--;\n                assembly (\"memory-safe\") {\n                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\n     */\n    function toStringSigned(int256 value) internal pure returns (string memory) {\n        return string.concat(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value)));\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, Math.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        uint256 localValue = value;\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = HEX_DIGITS[localValue & 0xf];\n            localValue >>= 4;\n        }\n        if (localValue != 0) {\n            revert StringsInsufficientHexLength(value, length);\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal\n     * representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its checksummed ASCII `string` hexadecimal\n     * representation, according to EIP-55.\n     */\n    function toChecksumHexString(address addr) internal pure returns (string memory) {\n        bytes memory buffer = bytes(toHexString(addr));\n\n        // hash the hex part of buffer (skip length + 2 bytes, length 40)\n        uint256 hashValue;\n        assembly (\"memory-safe\") {\n            hashValue := shr(96, keccak256(add(buffer, 0x22), 40))\n        }\n\n        for (uint256 i = 41; i > 1; --i) {\n            // possible values for buffer[i] are 48 (0) to 57 (9) and 97 (a) to 102 (f)\n            if (hashValue & 0xf > 7 && uint8(buffer[i]) > 96) {\n                // case shift by xoring with 0x20\n                buffer[i] ^= 0x20;\n            }\n            hashValue >>= 4;\n        }\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts a `bytes` buffer to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(bytes memory input) internal pure returns (string memory) {\n        unchecked {\n            bytes memory buffer = new bytes(2 * input.length + 2);\n            buffer[0] = \"0\";\n            buffer[1] = \"x\";\n            for (uint256 i = 0; i < input.length; ++i) {\n                uint8 v = uint8(input[i]);\n                buffer[2 * i + 2] = HEX_DIGITS[v >> 4];\n                buffer[2 * i + 3] = HEX_DIGITS[v & 0xf];\n            }\n            return string(buffer);\n        }\n    }\n\n    /**\n     * @dev Returns true if the two strings are equal.\n     */\n    function equal(string memory a, string memory b) internal pure returns (bool) {\n        return Bytes.equal(bytes(a), bytes(b));\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input) internal pure returns (uint256) {\n        return parseUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[0-9]*`\n     * - The result must fit into an `uint256` type\n     */\n    function parseUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseUint-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        uint256 result = 0;\n        for (uint256 i = begin; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 9) return (false, 0);\n            result *= 10;\n            result += chr;\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a decimal string and returns the value as a `int256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input) internal pure returns (int256) {\n        return parseInt(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `[-+]?[0-9]*`\n     * - The result must fit in an `int256` type.\n     */\n    function parseInt(string memory input, uint256 begin, uint256 end) internal pure returns (int256) {\n        (bool success, int256 value) = tryParseInt(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseInt-string} that returns false if the parsing fails because of an invalid character or if\n     * the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(string memory input) internal pure returns (bool success, int256 value) {\n        return _tryParseIntUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    uint256 private constant ABS_MIN_INT256 = 2 ** 255;\n\n    /**\n     * @dev Variant of {parseInt-string-uint256-uint256} that returns false if the parsing fails because of an invalid\n     * character or if the result does not fit in a `int256`.\n     *\n     * NOTE: This function will revert if the absolute value of the result does not fit in a `uint256`.\n     */\n    function tryParseInt(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, int256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseIntUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseInt-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseIntUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, int256 value) {\n        bytes memory buffer = bytes(input);\n\n        // Check presence of a negative sign.\n        bytes1 sign = begin == end ? bytes1(0) : bytes1(_unsafeReadBytesOffset(buffer, begin)); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        bool positiveSign = sign == bytes1(\"+\");\n        bool negativeSign = sign == bytes1(\"-\");\n        uint256 offset = (positiveSign || negativeSign).toUint();\n\n        (bool absSuccess, uint256 absValue) = tryParseUint(input, begin + offset, end);\n\n        if (absSuccess && absValue < ABS_MIN_INT256) {\n            return (true, negativeSign ? -int256(absValue) : int256(absValue));\n        } else if (absSuccess && negativeSign && absValue == ABS_MIN_INT256) {\n            return (true, type(int256).min);\n        } else return (false, 0);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as a `uint256`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input) internal pure returns (uint256) {\n        return parseHexUint(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]*`\n     * - The result must fit in an `uint256` type.\n     */\n    function parseHexUint(string memory input, uint256 begin, uint256 end) internal pure returns (uint256) {\n        (bool success, uint256 value) = tryParseHexUint(input, begin, end);\n        if (!success) revert StringsInvalidChar();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string} that returns false if the parsing fails because of an invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(string memory input) internal pure returns (bool success, uint256 value) {\n        return _tryParseHexUintUncheckedBounds(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseHexUint-string-uint256-uint256} that returns false if the parsing fails because of an\n     * invalid character.\n     *\n     * NOTE: This function will revert if the result does not fit in a `uint256`.\n     */\n    function tryParseHexUint(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, uint256 value) {\n        if (end > bytes(input).length || begin > end) return (false, 0);\n        return _tryParseHexUintUncheckedBounds(input, begin, end);\n    }\n\n    /**\n     * @dev Implementation of {tryParseHexUint-string-uint256-uint256} that does not check bounds. Caller should make sure that\n     * `begin <= end <= input.length`. Other inputs would result in undefined behavior.\n     */\n    function _tryParseHexUintUncheckedBounds(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) private pure returns (bool success, uint256 value) {\n        bytes memory buffer = bytes(input);\n\n        // skip 0x prefix if present\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(buffer, begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 offset = hasPrefix.toUint() * 2;\n\n        uint256 result = 0;\n        for (uint256 i = begin + offset; i < end; ++i) {\n            uint8 chr = _tryParseChr(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (chr > 15) return (false, 0);\n            result *= 16;\n            unchecked {\n                // Multiplying by 16 is equivalent to a shift of 4 bits (with additional overflow check).\n                // This guarantees that adding a value < 16 will not cause an overflow, hence the unchecked.\n                result += chr;\n            }\n        }\n        return (true, result);\n    }\n\n    /**\n     * @dev Parse a hexadecimal string (with or without \"0x\" prefix), and returns the value as an `address`.\n     *\n     * Requirements:\n     * - The string must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input) internal pure returns (address) {\n        return parseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that parses a substring of `input` located between position `begin` (included) and\n     * `end` (excluded).\n     *\n     * Requirements:\n     * - The substring must be formatted as `(0x)?[0-9a-fA-F]{40}`\n     */\n    function parseAddress(string memory input, uint256 begin, uint256 end) internal pure returns (address) {\n        (bool success, address value) = tryParseAddress(input, begin, end);\n        if (!success) revert StringsInvalidAddressFormat();\n        return value;\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string} that returns false if the parsing fails because the input is not a properly\n     * formatted address. See {parseAddress-string} requirements.\n     */\n    function tryParseAddress(string memory input) internal pure returns (bool success, address value) {\n        return tryParseAddress(input, 0, bytes(input).length);\n    }\n\n    /**\n     * @dev Variant of {parseAddress-string-uint256-uint256} that returns false if the parsing fails because input is not a properly\n     * formatted address. See {parseAddress-string-uint256-uint256} requirements.\n     */\n    function tryParseAddress(\n        string memory input,\n        uint256 begin,\n        uint256 end\n    ) internal pure returns (bool success, address value) {\n        if (end > bytes(input).length || begin > end) return (false, address(0));\n\n        bool hasPrefix = (end > begin + 1) && bytes2(_unsafeReadBytesOffset(bytes(input), begin)) == bytes2(\"0x\"); // don't do out-of-bound (possibly unsafe) read if sub-string is empty\n        uint256 expectedLength = 40 + hasPrefix.toUint() * 2;\n\n        // check that input is the correct length\n        if (end - begin == expectedLength) {\n            // length guarantees that this does not overflow, and value is at most type(uint160).max\n            (bool s, uint256 v) = _tryParseHexUintUncheckedBounds(input, begin, end);\n            return (s, address(uint160(v)));\n        } else {\n            return (false, address(0));\n        }\n    }\n\n    function _tryParseChr(bytes1 chr) private pure returns (uint8) {\n        uint8 value = uint8(chr);\n\n        // Try to parse `chr`:\n        // - Case 1: [0-9]\n        // - Case 2: [a-f]\n        // - Case 3: [A-F]\n        // - otherwise not supported\n        unchecked {\n            if (value > 47 && value < 58) value -= 48;\n            else if (value > 96 && value < 103) value -= 87;\n            else if (value > 64 && value < 71) value -= 55;\n            else return type(uint8).max;\n        }\n\n        return value;\n    }\n\n    /**\n     * @dev Escape special characters in JSON strings. This can be useful to prevent JSON injection in NFT metadata.\n     *\n     * WARNING: This function should only be used in double quoted JSON strings. Single quotes are not escaped.\n     *\n     * NOTE: This function escapes backslashes (including those in \\uXXXX sequences) and the characters in ranges\n     * defined in section 2.5 of RFC-4627 (U+0000 to U+001F, U+0022 and U+005C). All control characters in U+0000\n     * to U+001F are escaped (\\b, \\t, \\n, \\f, \\r use short form; others use \\u00XX). ECMAScript's `JSON.parse` does\n     * recover escaped unicode characters that are not in this range, but other tooling may provide different results.\n     */\n    function escapeJSON(string memory input) internal pure returns (string memory) {\n        bytes memory buffer = bytes(input);\n\n        // Put output at the FMP. Memory will be reserved later when we figure out the actual length of the escaped\n        // string. All write are done using _unsafeWriteBytesOffset, which avoid the (expensive) length checks for\n        // each character written.\n        bytes memory output;\n        assembly (\"memory-safe\") {\n            output := mload(0x40)\n        }\n        uint256 outputLength = 0;\n\n        for (uint256 i = 0; i < buffer.length; ++i) {\n            uint8 char = uint8(bytes1(_unsafeReadBytesOffset(buffer, i)));\n            if (((SPECIAL_CHARS_LOOKUP & (1 << char)) != 0)) {\n                _unsafeWriteBytesOffset(output, outputLength++, \"\\\\\");\n                if (char == 0x08) _unsafeWriteBytesOffset(output, outputLength++, \"b\");\n                else if (char == 0x09) _unsafeWriteBytesOffset(output, outputLength++, \"t\");\n                else if (char == 0x0a) _unsafeWriteBytesOffset(output, outputLength++, \"n\");\n                else if (char == 0x0c) _unsafeWriteBytesOffset(output, outputLength++, \"f\");\n                else if (char == 0x0d) _unsafeWriteBytesOffset(output, outputLength++, \"r\");\n                else if (char == 0x5c) _unsafeWriteBytesOffset(output, outputLength++, \"\\\\\");\n                else if (char == 0x22) {\n                    // solhint-disable-next-line quotes\n                    _unsafeWriteBytesOffset(output, outputLength++, '\"');\n                } else {\n                    // U+0000 to U+001F without short form: output \\u00XX\n                    _unsafeWriteBytesOffset(output, outputLength++, \"u\");\n                    _unsafeWriteBytesOffset(output, outputLength++, \"0\");\n                    _unsafeWriteBytesOffset(output, outputLength++, \"0\");\n                    _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char >> 4]);\n                    _unsafeWriteBytesOffset(output, outputLength++, HEX_DIGITS[char & 0x0f]);\n                }\n            } else {\n                _unsafeWriteBytesOffset(output, outputLength++, bytes1(char));\n            }\n        }\n        // write the actual length and reserve memory\n        assembly (\"memory-safe\") {\n            mstore(output, outputLength)\n            mstore(0x40, add(output, add(outputLength, 0x20)))\n        }\n\n        return string(output);\n    }\n\n    /**\n     * @dev Reads a bytes32 from a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            value := mload(add(add(buffer, 0x20), offset))\n        }\n    }\n\n    /**\n     * @dev Write a bytes1 to a bytes array without bounds checking.\n     *\n     * NOTE: making this function internal would mean it could be used with memory unsafe offset, and marking the\n     * assembly block as such would prevent some optimizations.\n     */\n    function _unsafeWriteBytesOffset(bytes memory buffer, uint256 offset, bytes1 value) private pure {\n        // This is not memory safe in the general case, but all calls to this private function are within bounds.\n        assembly (\"memory-safe\") {\n            mstore8(add(add(buffer, 0x20), offset), shr(248, value))\n        }\n    }\n}\n"
      },
      "npm/@openzeppelin/contracts@5.6.1/utils/types/Time.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.5.0) (utils/types/Time.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"../math/Math.sol\";\nimport {SafeCast} from \"../math/SafeCast.sol\";\n\n/**\n * @dev This library provides helpers for manipulating time-related objects.\n *\n * It uses the following types:\n * - `uint48` for timepoints\n * - `uint32` for durations\n *\n * While the library doesn't provide specific types for timepoints and duration, it does provide:\n * - a `Delay` type to represent duration that can be programmed to change value automatically at a given point\n * - additional helper functions\n */\nlibrary Time {\n    using Time for *;\n\n    /**\n     * @dev Get the block timestamp as a Timepoint.\n     */\n    function timestamp() internal view returns (uint48) {\n        return SafeCast.toUint48(block.timestamp);\n    }\n\n    /**\n     * @dev Get the block number as a Timepoint.\n     */\n    function blockNumber() internal view returns (uint48) {\n        return SafeCast.toUint48(block.number);\n    }\n\n    // ==================================================== Delay =====================================================\n    /**\n     * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the\n     * future. The \"effect\" timepoint describes when the transition happens from the \"old\" value to the \"new\" value.\n     * This allows updating the delay applied to some operation while keeping some guarantees.\n     *\n     * In particular, the {update} function guarantees that if the delay is reduced, the old delay still applies for\n     * some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set\n     * the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should\n     * still apply for some time.\n     *\n     *\n     * The `Delay` type is 112 bits long, and packs the following:\n     *\n     * ```\n     *   | [uint48]: effect date (timepoint)\n     *   |           | [uint32]: value before (duration)\n     *   ↓           ↓       ↓ [uint32]: value after (duration)\n     * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC\n     * ```\n     *\n     * NOTE: The {get} and {withUpdate} functions operate using timestamps. Block number based delays are not currently\n     * supported.\n     */\n    type Delay is uint112;\n\n    /**\n     * @dev Wrap a duration into a Delay to add the one-step \"update in the future\" feature\n     */\n    function toDelay(uint32 duration) internal pure returns (Delay) {\n        return Delay.wrap(duration);\n    }\n\n    /**\n     * @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled\n     * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered.\n     */\n    function _getFullAt(\n        Delay self,\n        uint48 timepoint\n    ) private pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {\n        (valueBefore, valueAfter, effect) = self.unpack();\n        return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect);\n    }\n\n    /**\n     * @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the\n     * effect timepoint is 0, then the pending value should not be considered.\n     */\n    function getFull(Delay self) internal view returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {\n        return _getFullAt(self, timestamp());\n    }\n\n    /**\n     * @dev Get the current value.\n     */\n    function get(Delay self) internal view returns (uint32) {\n        (uint32 delay, , ) = self.getFull();\n        return delay;\n    }\n\n    /**\n     * @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to\n     * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the\n     * new delay becomes effective.\n     */\n    function withUpdate(\n        Delay self,\n        uint32 newValue,\n        uint32 minSetback\n    ) internal view returns (Delay updatedDelay, uint48 effect) {\n        uint32 value = self.get();\n        uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0));\n        effect = timestamp() + setback;\n        return (pack(value, newValue, effect), effect);\n    }\n\n    /**\n     * @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint).\n     */\n    function unpack(Delay self) internal pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {\n        uint112 raw = Delay.unwrap(self);\n\n        valueAfter = uint32(raw);\n        valueBefore = uint32(raw >> 32);\n        effect = uint48(raw >> 64);\n\n        return (valueBefore, valueAfter, effect);\n    }\n\n    /**\n     * @dev pack the components into a Delay object.\n     */\n    function pack(uint32 valueBefore, uint32 valueAfter, uint48 effect) internal pure returns (Delay) {\n        return Delay.wrap((uint112(effect) << 64) | (uint112(valueBefore) << 32) | uint112(valueAfter));\n    }\n}\n"
      },
      "npm/solidity-bytes-utils@0.8.4/contracts/BytesLib.sol": {
        "content": "// SPDX-License-Identifier: Unlicense\n/*\n * @title Solidity Bytes Arrays Utils\n * @author Gonçalo Sá <goncalo.sa@consensys.net>\n *\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\n *      The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\n */\npragma solidity >=0.8.0 <0.9.0;\n\n\nlibrary BytesLib {\n    function concat(\n        bytes memory _preBytes,\n        bytes memory _postBytes\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        bytes memory tempBytes;\n\n        assembly {\n            // Get a location of some free memory and store it in tempBytes as\n            // Solidity does for memory variables.\n            tempBytes := mload(0x40)\n\n            // Store the length of the first bytes array at the beginning of\n            // the memory for tempBytes.\n            let length := mload(_preBytes)\n            mstore(tempBytes, length)\n\n            // Maintain a memory counter for the current write location in the\n            // temp bytes array by adding the 32 bytes for the array length to\n            // the starting location.\n            let mc := add(tempBytes, 0x20)\n            // Stop copying when the memory counter reaches the length of the\n            // first bytes array.\n            let end := add(mc, length)\n\n            for {\n                // Initialize a copy counter to the start of the _preBytes data,\n                // 32 bytes into its memory.\n                let cc := add(_preBytes, 0x20)\n            } lt(mc, end) {\n                // Increase both counters by 32 bytes each iteration.\n                mc := add(mc, 0x20)\n                cc := add(cc, 0x20)\n            } {\n                // Write the _preBytes data into the tempBytes memory 32 bytes\n                // at a time.\n                mstore(mc, mload(cc))\n            }\n\n            // Add the length of _postBytes to the current length of tempBytes\n            // and store it as the new length in the first 32 bytes of the\n            // tempBytes memory.\n            length := mload(_postBytes)\n            mstore(tempBytes, add(length, mload(tempBytes)))\n\n            // Move the memory counter back from a multiple of 0x20 to the\n            // actual end of the _preBytes data.\n            mc := end\n            // Stop copying when the memory counter reaches the new combined\n            // length of the arrays.\n            end := add(mc, length)\n\n            for {\n                let cc := add(_postBytes, 0x20)\n            } lt(mc, end) {\n                mc := add(mc, 0x20)\n                cc := add(cc, 0x20)\n            } {\n                mstore(mc, mload(cc))\n            }\n\n            // Update the free-memory pointer by padding our last write location\n            // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\n            // next 32 byte block, then round down to the nearest multiple of\n            // 32. If the sum of the length of the two arrays is zero then add\n            // one before rounding down to leave a blank 32 bytes (the length block with 0).\n            mstore(0x40, and(\n              add(add(end, iszero(add(length, mload(_preBytes)))), 31),\n              not(31) // Round down to the nearest 32 bytes.\n            ))\n        }\n\n        return tempBytes;\n    }\n\n    function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\n        assembly {\n            // Read the first 32 bytes of _preBytes storage, which is the length\n            // of the array. (We don't need to use the offset into the slot\n            // because arrays use the entire slot.)\n            let fslot := sload(_preBytes.slot)\n            // Arrays of 31 bytes or less have an even value in their slot,\n            // while longer arrays have an odd value. The actual length is\n            // the slot divided by two for odd values, and the lowest order\n            // byte divided by two for even values.\n            // If the slot is even, bitwise and the slot with 255 and divide by\n            // two to get the length. If the slot is odd, bitwise and the slot\n            // with -1 and divide by two.\n            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n            let mlength := mload(_postBytes)\n            let newlength := add(slength, mlength)\n            // slength can contain both the length and contents of the array\n            // if length < 32 bytes so let's prepare for that\n            // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n            switch add(lt(slength, 32), lt(newlength, 32))\n            case 2 {\n                // Since the new array still fits in the slot, we just need to\n                // update the contents of the slot.\n                // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\n                sstore(\n                    _preBytes.slot,\n                    // all the modifications to the slot are inside this\n                    // next block\n                    add(\n                        // we can just add to the slot contents because the\n                        // bytes we want to change are the LSBs\n                        fslot,\n                        add(\n                            mul(\n                                div(\n                                    // load the bytes from memory\n                                    mload(add(_postBytes, 0x20)),\n                                    // zero all bytes to the right\n                                    exp(0x100, sub(32, mlength))\n                                ),\n                                // and now shift left the number of bytes to\n                                // leave space for the length in the slot\n                                exp(0x100, sub(32, newlength))\n                            ),\n                            // increase length by the double of the memory\n                            // bytes length\n                            mul(mlength, 2)\n                        )\n                    )\n                )\n            }\n            case 1 {\n                // The stored value fits in the slot, but the combined value\n                // will exceed it.\n                // get the keccak hash to get the contents of the array\n                mstore(0x0, _preBytes.slot)\n                let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n                // save new length\n                sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n                // The contents of the _postBytes array start 32 bytes into\n                // the structure. Our first read should obtain the `submod`\n                // bytes that can fit into the unused space in the last word\n                // of the stored array. To get this, we read 32 bytes starting\n                // from `submod`, so the data we read overlaps with the array\n                // contents by `submod` bytes. Masking the lowest-order\n                // `submod` bytes allows us to add that value directly to the\n                // stored value.\n\n                let submod := sub(32, slength)\n                let mc := add(_postBytes, submod)\n                let end := add(_postBytes, mlength)\n                let mask := sub(exp(0x100, submod), 1)\n\n                sstore(\n                    sc,\n                    add(\n                        and(\n                            fslot,\n                            0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\n                        ),\n                        and(mload(mc), mask)\n                    )\n                )\n\n                for {\n                    mc := add(mc, 0x20)\n                    sc := add(sc, 1)\n                } lt(mc, end) {\n                    sc := add(sc, 1)\n                    mc := add(mc, 0x20)\n                } {\n                    sstore(sc, mload(mc))\n                }\n\n                mask := exp(0x100, sub(mc, end))\n\n                sstore(sc, mul(div(mload(mc), mask), mask))\n            }\n            default {\n                // get the keccak hash to get the contents of the array\n                mstore(0x0, _preBytes.slot)\n                // Start copying to the last used word of the stored array.\n                let sc := add(keccak256(0x0, 0x20), div(slength, 32))\n\n                // save new length\n                sstore(_preBytes.slot, add(mul(newlength, 2), 1))\n\n                // Copy over the first `submod` bytes of the new data as in\n                // case 1 above.\n                let slengthmod := mod(slength, 32)\n                let mlengthmod := mod(mlength, 32)\n                let submod := sub(32, slengthmod)\n                let mc := add(_postBytes, submod)\n                let end := add(_postBytes, mlength)\n                let mask := sub(exp(0x100, submod), 1)\n\n                sstore(sc, add(sload(sc), and(mload(mc), mask)))\n\n                for {\n                    sc := add(sc, 1)\n                    mc := add(mc, 0x20)\n                } lt(mc, end) {\n                    sc := add(sc, 1)\n                    mc := add(mc, 0x20)\n                } {\n                    sstore(sc, mload(mc))\n                }\n\n                mask := exp(0x100, sub(mc, end))\n\n                sstore(sc, mul(div(mload(mc), mask), mask))\n            }\n        }\n    }\n\n    function slice(\n        bytes memory _bytes,\n        uint256 _start,\n        uint256 _length\n    )\n        internal\n        pure\n        returns (bytes memory)\n    {\n        // We're using the unchecked block below because otherwise execution ends \n        // with the native overflow error code.\n        unchecked {\n            require(_length + 31 >= _length, \"slice_overflow\");\n        }\n        require(_bytes.length >= _start + _length, \"slice_outOfBounds\");\n\n        bytes memory tempBytes;\n\n        assembly {\n            switch iszero(_length)\n            case 0 {\n                // Get a location of some free memory and store it in tempBytes as\n                // Solidity does for memory variables.\n                tempBytes := mload(0x40)\n\n                // The first word of the slice result is potentially a partial\n                // word read from the original array. To read it, we calculate\n                // the length of that partial word and start copying that many\n                // bytes into the array. The first word we copy will start with\n                // data we don't care about, but the last `lengthmod` bytes will\n                // land at the beginning of the contents of the new array. When\n                // we're done copying, we overwrite the full first word with\n                // the actual length of the slice.\n                let lengthmod := and(_length, 31)\n\n                // The multiplication in the next line is necessary\n                // because when slicing multiples of 32 bytes (lengthmod == 0)\n                // the following copy loop was copying the origin's length\n                // and then ending prematurely not copying everything it should.\n                let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\n                let end := add(mc, _length)\n\n                for {\n                    // The multiplication in the next line has the same exact purpose\n                    // as the one above.\n                    let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\n                } lt(mc, end) {\n                    mc := add(mc, 0x20)\n                    cc := add(cc, 0x20)\n                } {\n                    mstore(mc, mload(cc))\n                }\n\n                mstore(tempBytes, _length)\n\n                //update free-memory pointer\n                //allocating the array padded to 32 bytes like the compiler does now\n                mstore(0x40, and(add(mc, 31), not(31)))\n            }\n            //if we want a zero-length slice let's just return a zero-length array\n            default {\n                tempBytes := mload(0x40)\n                //zero out the 32 bytes slice we are about to return\n                //we need to do it because Solidity does not garbage collect\n                mstore(tempBytes, 0)\n\n                mstore(0x40, add(tempBytes, 0x20))\n            }\n        }\n\n        return tempBytes;\n    }\n\n    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\n        require(_bytes.length >= _start + 20, \"toAddress_outOfBounds\");\n        address tempAddress;\n\n        assembly {\n            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\n        }\n\n        return tempAddress;\n    }\n\n    function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\n        require(_bytes.length >= _start + 1 , \"toUint8_outOfBounds\");\n        uint8 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0x1), _start))\n        }\n\n        return tempUint;\n    }\n\n    function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\n        require(_bytes.length >= _start + 2, \"toUint16_outOfBounds\");\n        uint16 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0x2), _start))\n        }\n\n        return tempUint;\n    }\n\n    function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\n        require(_bytes.length >= _start + 4, \"toUint32_outOfBounds\");\n        uint32 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0x4), _start))\n        }\n\n        return tempUint;\n    }\n\n    function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\n        require(_bytes.length >= _start + 8, \"toUint64_outOfBounds\");\n        uint64 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0x8), _start))\n        }\n\n        return tempUint;\n    }\n\n    function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\n        require(_bytes.length >= _start + 12, \"toUint96_outOfBounds\");\n        uint96 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0xc), _start))\n        }\n\n        return tempUint;\n    }\n\n    function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\n        require(_bytes.length >= _start + 16, \"toUint128_outOfBounds\");\n        uint128 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0x10), _start))\n        }\n\n        return tempUint;\n    }\n\n    function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\n        require(_bytes.length >= _start + 32, \"toUint256_outOfBounds\");\n        uint256 tempUint;\n\n        assembly {\n            tempUint := mload(add(add(_bytes, 0x20), _start))\n        }\n\n        return tempUint;\n    }\n\n    function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\n        require(_bytes.length >= _start + 32, \"toBytes32_outOfBounds\");\n        bytes32 tempBytes32;\n\n        assembly {\n            tempBytes32 := mload(add(add(_bytes, 0x20), _start))\n        }\n\n        return tempBytes32;\n    }\n\n    function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\n        bool success = true;\n\n        assembly {\n            let length := mload(_preBytes)\n\n            // if lengths don't match the arrays are not equal\n            switch eq(length, mload(_postBytes))\n            case 1 {\n                // cb is a circuit breaker in the for loop since there's\n                //  no said feature for inline assembly loops\n                // cb = 1 - don't breaker\n                // cb = 0 - break\n                let cb := 1\n\n                let mc := add(_preBytes, 0x20)\n                let end := add(mc, length)\n\n                for {\n                    let cc := add(_postBytes, 0x20)\n                // the next line is the loop condition:\n                // while(uint256(mc < end) + cb == 2)\n                } eq(add(lt(mc, end), cb), 2) {\n                    mc := add(mc, 0x20)\n                    cc := add(cc, 0x20)\n                } {\n                    // if any of these checks fails then arrays are not equal\n                    if iszero(eq(mload(mc), mload(cc))) {\n                        // unsuccess:\n                        success := 0\n                        cb := 0\n                    }\n                }\n            }\n            default {\n                // unsuccess:\n                success := 0\n            }\n        }\n\n        return success;\n    }\n\n    function equalStorage(\n        bytes storage _preBytes,\n        bytes memory _postBytes\n    )\n        internal\n        view\n        returns (bool)\n    {\n        bool success = true;\n\n        assembly {\n            // we know _preBytes_offset is 0\n            let fslot := sload(_preBytes.slot)\n            // Decode the length of the stored array like in concatStorage().\n            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\n            let mlength := mload(_postBytes)\n\n            // if lengths don't match the arrays are not equal\n            switch eq(slength, mlength)\n            case 1 {\n                // slength can contain both the length and contents of the array\n                // if length < 32 bytes so let's prepare for that\n                // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\n                if iszero(iszero(slength)) {\n                    switch lt(slength, 32)\n                    case 1 {\n                        // blank the last byte which is the length\n                        fslot := mul(div(fslot, 0x100), 0x100)\n\n                        if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\n                            // unsuccess:\n                            success := 0\n                        }\n                    }\n                    default {\n                        // cb is a circuit breaker in the for loop since there's\n                        //  no said feature for inline assembly loops\n                        // cb = 1 - don't breaker\n                        // cb = 0 - break\n                        let cb := 1\n\n                        // get the keccak hash to get the contents of the array\n                        mstore(0x0, _preBytes.slot)\n                        let sc := keccak256(0x0, 0x20)\n\n                        let mc := add(_postBytes, 0x20)\n                        let end := add(mc, mlength)\n\n                        // the next line is the loop condition:\n                        // while(uint256(mc < end) + cb == 2)\n                        for {} eq(add(lt(mc, end), cb), 2) {\n                            sc := add(sc, 1)\n                            mc := add(mc, 0x20)\n                        } {\n                            if iszero(eq(sload(sc), mload(mc))) {\n                                // unsuccess:\n                                success := 0\n                                cb := 0\n                            }\n                        }\n                    }\n                }\n            }\n            default {\n                // unsuccess:\n                success := 0\n            }\n        }\n\n        return success;\n    }\n}\n"
      },
      "project/contracts/AccessControlAccount.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.23;\n\nimport {AccessControl} from \"@openzeppelin/contracts/access/AccessControl.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {BaseAccount} from \"@account-abstraction/contracts/core/BaseAccount.sol\";\nimport {SIG_VALIDATION_SUCCESS, SIG_VALIDATION_FAILED} from \"@account-abstraction/contracts/core/Helpers.sol\";\nimport {IEntryPoint} from \"@account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"@account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\n\ncontract AccessControlAccount is AccessControl, BaseAccount {\n  bytes32 public constant WITHDRAW_ROLE = keccak256(\"WITHDRAW_ROLE\");\n  bytes32 public constant EXECUTOR_ROLE = keccak256(\"EXECUTOR_ROLE\");\n\n  IEntryPoint private immutable _entryPoint;\n\n  error RequiredEntryPointOrExecutor(address sender);\n  error WrongArrayLength();\n\n  /// @inheritdoc BaseAccount\n  function entryPoint() public view virtual override returns (IEntryPoint) {\n    return _entryPoint;\n  }\n\n  // solhint-disable-next-line no-empty-blocks\n  receive() external payable {}\n\n  constructor(IEntryPoint anEntryPoint, address admin, address[] memory executors) {\n    _entryPoint = anEntryPoint;\n    _grantRole(DEFAULT_ADMIN_ROLE, admin);\n    for (uint256 i; i < executors.length; i++) {\n      _grantRole(EXECUTOR_ROLE, executors[i]);\n    }\n  }\n\n  // Require the function call went through EntryPoint or owner\n  function _requireFromEntryPointOrExecutor() internal view {\n    if (msg.sender != address(entryPoint()) && !hasRole(EXECUTOR_ROLE, msg.sender))\n      revert RequiredEntryPointOrExecutor(msg.sender);\n  }\n\n  /**\n   * execute a transaction (called directly from owner, or by entryPoint)\n   * @param dest destination address to call\n   * @param value the value to pass in this call\n   * @param func the calldata to pass in this call\n   */\n  function execute(address dest, uint256 value, bytes calldata func) external override {\n    _requireFromEntryPointOrExecutor();\n    Address.functionCallWithValue(dest, func, value);\n  }\n\n  /**\n   * execute a sequence of transactions\n   * @dev to reduce gas consumption for trivial case (no value), use a zero-length array to mean zero value\n   * @param dest an array of destination addresses\n   * @param value an array of values to pass to each call. can be zero-length for no-value calls\n   * @param func an array of calldata to pass to each call\n   */\n  function executeBatch(address[] calldata dest, uint256[] calldata value, bytes[] calldata func) external {\n    _requireFromEntryPointOrExecutor();\n    if (dest.length != func.length || (value.length != 0 && value.length != func.length)) revert WrongArrayLength();\n    if (value.length == 0) {\n      for (uint256 i = 0; i < dest.length; i++) {\n        Address.functionCallWithValue(dest[i], func[i], 0);\n      }\n    } else {\n      for (uint256 i = 0; i < dest.length; i++) {\n        Address.functionCallWithValue(dest[i], func[i], value[i]);\n      }\n    }\n  }\n\n  /// implement template method of BaseAccount\n  function _validateSignature(\n    PackedUserOperation calldata userOp,\n    bytes32 userOpHash\n  ) internal virtual override returns (uint256 validationData) {\n    bytes32 hash = MessageHashUtils.toEthSignedMessageHash(userOpHash);\n    address recovered = ECDSA.recover(hash, userOp.signature);\n    if (!hasRole(EXECUTOR_ROLE, recovered)) return SIG_VALIDATION_FAILED;\n    return SIG_VALIDATION_SUCCESS;\n  }\n\n  /**\n   * check current account deposit in the entryPoint\n   */\n  function getDeposit() public view returns (uint256) {\n    return entryPoint().balanceOf(address(this));\n  }\n\n  /**\n   * deposit more funds for this account in the entryPoint\n   */\n  function addDeposit() public payable {\n    entryPoint().depositTo{value: msg.value}(address(this));\n  }\n\n  /**\n   * withdraw value from the account's deposit\n   * @param withdrawAddress target to send to\n   * @param amount to withdraw\n   */\n  function withdrawDepositTo(address payable withdrawAddress, uint256 amount) public onlyRole(WITHDRAW_ROLE) {\n    entryPoint().withdrawTo(withdrawAddress, amount);\n  }\n}\n"
      },
      "project/contracts/AccessManagerAccount.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.23;\n\nimport {AccessManager} from \"./dependencies/AccessManager.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {BaseAccount} from \"@account-abstraction/contracts/core/BaseAccount.sol\";\nimport {SIG_VALIDATION_SUCCESS, SIG_VALIDATION_FAILED} from \"@account-abstraction/contracts/core/Helpers.sol\";\nimport {IEntryPoint} from \"@account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"@account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {BytesLib} from \"solidity-bytes-utils/contracts/BytesLib.sol\";\n\ncontract AccessManagerAccount is AccessManager, BaseAccount {\n  using BytesLib for bytes;\n\n  IEntryPoint private immutable _entryPoint;\n\n  bytes4 private constant EXECUTE_SELECTOR = bytes4(keccak256(\"execute(address,uint256,bytes)\"));\n\n  error OnlyExecuteAllowedFromEntryPoint(bytes4 receivedSelector);\n  error OnlyExternalTargets();\n  error DelayNotAllowed();\n\n  /// @inheritdoc BaseAccount\n  function entryPoint() public view virtual override returns (IEntryPoint) {\n    return _entryPoint;\n  }\n\n  // solhint-disable-next-line no-empty-blocks\n  receive() external payable {}\n\n  constructor(IEntryPoint anEntryPoint, address initialAdmin) AccessManager(initialAdmin) {\n    _entryPoint = anEntryPoint;\n  }\n\n  /**\n   * execute a transaction (called directly from owner, or by entryPoint)\n   * @param dest destination address to call\n   * @param value the value to pass in this call\n   * @param func the calldata to pass in this call\n   */\n  function execute(address dest, uint256 value, bytes calldata func) external override {\n    _requireFromEntryPoint();\n    Address.functionCallWithValue(dest, func, value);\n  }\n\n  // hashOperation variant that receives bytes memory\n  function _hashOperation(address caller, address target, bytes memory data) internal pure returns (bytes32) {\n    return keccak256(abi.encode(caller, target, data));\n  }\n\n  function _checkAAExecuteCall(address signer, bytes calldata userOpCallData) internal returns (uint256) {\n    (address target, , bytes memory funcCall) = abi.decode(\n      userOpCallData[4:userOpCallData.length - 4],\n      (address, uint256, bytes)\n    );\n    (bool immediate, uint32 delay) = canCall(signer, target, bytes4(funcCall.toBytes32(0)));\n    if (immediate || delay == 0) return immediate ? SIG_VALIDATION_SUCCESS : SIG_VALIDATION_FAILED;\n    _consumeScheduledOp(_hashOperation(signer, target, funcCall));\n    return SIG_VALIDATION_SUCCESS;\n  }\n\n  /// implement template method of BaseAccount\n  function _validateSignature(\n    PackedUserOperation calldata userOp,\n    bytes32 userOpHash\n  ) internal virtual override frozenTime returns (uint256 validationData) {\n    // First check the initial selector, from EntryPoint only execute and executeBatch are allowed\n    bytes4 selector = bytes4(userOp.callData[0:4]);\n    if (selector != EXECUTE_SELECTOR) revert OnlyExecuteAllowedFromEntryPoint(selector);\n    address target = abi.decode(userOp.callData[4:36], (address));\n    // Calls to address(this) are not allowed through AA. It might be possible to implement, but this\n    // complicates the testing and it might introduce security issues\n    if (target == address(this)) revert OnlyExternalTargets();\n    bytes32 hash = MessageHashUtils.toEthSignedMessageHash(userOpHash);\n    address recovered = ECDSA.recover(hash, userOp.signature);\n    // Check first the signer can call execute\n    if (!_checkCanCall(recovered, userOp.callData, false)) return SIG_VALIDATION_FAILED;\n    // Then check it can call the specific target/selector\n    return _checkAAExecuteCall(recovered, userOp.callData);\n  }\n\n  /**\n   * check current account deposit in the entryPoint\n   */\n  function getDeposit() public view returns (uint256) {\n    return entryPoint().balanceOf(address(this));\n  }\n\n  /**\n   * deposit more funds for this account in the entryPoint\n   */\n  function addDeposit() public payable {\n    entryPoint().depositTo{value: msg.value}(address(this));\n  }\n\n  /**\n   * @dev Adapted from AccessManaged._checkCanCall, checks a method can be called as if the AccessManagerAccount\n   *      was an access managed contract (not validating against admin permissions)\n   */\n  function _checkCanCall(address caller, bytes calldata data, bool fail) internal view returns (bool) {\n    (bool immediate, uint32 delay) = canCall(caller, address(this), bytes4(data[0:4]));\n    if (!immediate) {\n      if (delay > 0) {\n        revert DelayNotAllowed();\n        // Is not possible to handle scheduled operations, because when target=address(this), schedule\n        // doesn't work the same way, otherwise here we should do just\n        // _consumeScheduledOp(hashOperation(caller, address(this), data));\n      } else {\n        if (fail)\n          revert AccessManagerUnauthorizedAccount(caller, getTargetFunctionRole(address(this), bytes4(data[0:4])));\n        else return false;\n      }\n    }\n    return true;\n  }\n  /**\n   * withdraw value from the account's deposit\n   * @param withdrawAddress target to send to\n   * @param amount to withdraw\n   */\n  function withdrawDepositTo(address payable withdrawAddress, uint256 amount) public {\n    _checkCanCall(_msgSender(), _msgData(), true);\n    entryPoint().withdrawTo(withdrawAddress, amount);\n  }\n}\n"
      },
      "project/contracts/dependencies/AccessManager.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (access/manager/AccessManager.sol)\n\npragma solidity ^0.8.20;\n\nimport {IAccessManager} from \"@openzeppelin/contracts/access/manager/IAccessManager.sol\";\nimport {IAccessManaged} from \"@openzeppelin/contracts/access/manager/IAccessManaged.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {Context} from \"@openzeppelin/contracts/utils/Context.sol\";\nimport {Multicall} from \"@openzeppelin/contracts/utils/Multicall.sol\";\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {Time} from \"@openzeppelin/contracts/utils/types/Time.sol\";\nimport {FrozenTime} from \"./FrozenTime.sol\";\n\n/**\n * @dev AccessManager is a central contract to store the permissions of a system.\n *\n * A smart contract under the control of an AccessManager instance is known as a target, and will inherit from the\n * {AccessManaged} contract, be connected to this contract as its manager and implement the {AccessManaged-restricted}\n * modifier on a set of functions selected to be permissioned. Note that any function without this setup won't be\n * effectively restricted.\n *\n * The restriction rules for such functions are defined in terms of \"roles\" identified by an `uint64` and scoped\n * by target (`address`) and function selectors (`bytes4`). These roles are stored in this contract and can be\n * configured by admins (`ADMIN_ROLE` members) after a delay (see {getTargetAdminDelay}).\n *\n * For each target contract, admins can configure the following without any delay:\n *\n * * The target's {AccessManaged-authority} via {updateAuthority}.\n * * Close or open a target via {setTargetClosed} keeping the permissions intact.\n * * The roles that are allowed (or disallowed) to call a given function (identified by its selector) through {setTargetFunctionRole}.\n *\n * By default every address is member of the `PUBLIC_ROLE` and every target function is restricted to the `ADMIN_ROLE` until configured otherwise.\n * Additionally, each role has the following configuration options restricted to this manager's admins:\n *\n * * A role's admin role via {setRoleAdmin} who can grant or revoke roles.\n * * A role's guardian role via {setRoleGuardian} who's allowed to cancel operations.\n * * A delay in which a role takes effect after being granted through {setGrantDelay}.\n * * A delay of any target's admin action via {setTargetAdminDelay}.\n * * A role label for discoverability purposes with {labelRole}.\n *\n * Any account can be added and removed into any number of these roles by using the {grantRole} and {revokeRole} functions\n * restricted to each role's admin (see {getRoleAdmin}).\n *\n * Since all the permissions of the managed system can be modified by the admins of this instance, it is expected that\n * they will be highly secured (e.g., a multisig or a well-configured DAO).\n *\n * NOTE: This contract implements a form of the {IAuthority} interface, but {canCall} has additional return data so it\n * doesn't inherit `IAuthority`. It is however compatible with the `IAuthority` interface since the first 32 bytes of\n * the return data are a boolean as expected by that interface.\n *\n * NOTE: Systems that implement other access control mechanisms (for example using {Ownable}) can be paired with an\n * {AccessManager} by transferring permissions (ownership in the case of {Ownable}) directly to the {AccessManager}.\n * Users will be able to interact with these contracts through the {execute} function, following the access rules\n * registered in the {AccessManager}. Keep in mind that in that context, the msg.sender seen by restricted functions\n * will be {AccessManager} itself.\n *\n * WARNING: When granting permissions over an {Ownable} or {AccessControl} contract to an {AccessManager}, be very\n * mindful of the danger associated with functions such as {Ownable-renounceOwnership} or\n * {AccessControl-renounceRole}.\n */\ncontract AccessManager is Context, Multicall, IAccessManager {\n    using Time for *;\n\n    // Structure that stores the details for a target contract.\n    struct TargetConfig {\n        mapping(bytes4 selector => uint64 roleId) allowedRoles;\n        Time.Delay adminDelay;\n        bool closed;\n    }\n\n    // Structure that stores the details for a role/account pair. This structures fit into a single slot.\n    struct Access {\n        // Timepoint at which the user gets the permission.\n        // If this is either 0 or in the future, then the role permission is not available.\n        uint48 since;\n        // Delay for execution. Only applies to restricted() / execute() calls.\n        Time.Delay delay;\n    }\n\n    // Structure that stores the details of a role.\n    struct Role {\n        // Members of the role.\n        mapping(address user => Access access) members;\n        // Admin who can grant or revoke permissions.\n        uint64 admin;\n        // Guardian who can cancel operations targeting functions that need this role.\n        uint64 guardian;\n        // Delay in which the role takes effect after being granted.\n        Time.Delay grantDelay;\n    }\n\n    // Structure that stores the details for a scheduled operation. This structure fits into a single slot.\n    struct Schedule {\n        // Moment at which the operation can be executed.\n        uint48 timepoint;\n        // Operation nonce to allow third-party contracts to identify the operation.\n        uint32 nonce;\n    }\n\n    /**\n     * @dev The identifier of the admin role. Required to perform most configuration operations including\n     * other roles' management and target restrictions.\n     */\n    uint64 public constant ADMIN_ROLE = type(uint64).min; // 0\n\n    /**\n     * @dev The identifier of the public role. Automatically granted to all addresses with no delay.\n     */\n    uint64 public constant PUBLIC_ROLE = type(uint64).max; // 2**64-1\n\n    mapping(address target => TargetConfig mode) private _targets;\n    mapping(uint64 roleId => Role) private _roles;\n    mapping(bytes32 operationId => Schedule) private _schedules;\n\n    // Used to identify operations that are currently being executed via {execute}.\n    // This should be transient storage when supported by the EVM.\n    bytes32 private _executionId;\n\n    bool transient _isFrozen;\n\n    /**\n     * @dev Check that the caller is authorized to perform the operation.\n     * See {AccessManager} description for a detailed breakdown of the authorization logic.\n     */\n    modifier onlyAuthorized() {\n        _checkAuthorized();\n        _;\n    }\n\n    modifier frozenTime() {\n        _isFrozen = true;\n        _;\n        _isFrozen = false;\n    }\n\n    constructor(address initialAdmin) {\n        if (initialAdmin == address(0)) {\n            revert AccessManagerInvalidInitialAdmin(address(0));\n        }\n\n        // admin is active immediately and without any execution delay.\n        _grantRole(ADMIN_ROLE, initialAdmin, 0, 0);\n    }\n\n    // =================================================== GETTERS ====================================================\n    /// @inheritdoc IAccessManager\n    function canCall(\n        address caller,\n        address target,\n        bytes4 selector\n    ) public view virtual returns (bool immediate, uint32 delay) {\n        if (isTargetClosed(target)) {\n            return (false, 0);\n        } else if (caller == address(this)) {\n            // Caller is AccessManager, this means the call was sent through {execute} and it already checked\n            // permissions. We verify that the call \"identifier\", which is set during {execute}, is correct.\n            return (_isExecuting(target, selector), 0);\n        } else {\n            uint64 roleId = getTargetFunctionRole(target, selector);\n            (bool isMember, uint32 currentDelay) = hasRole(roleId, caller);\n            return isMember ? (currentDelay == 0, currentDelay) : (false, 0);\n        }\n    }\n\n    /// @inheritdoc IAccessManager\n    function expiration() public view virtual returns (uint32) {\n        return 1 weeks;\n    }\n\n    /// @inheritdoc IAccessManager\n    function minSetback() public view virtual returns (uint32) {\n        return 5 days;\n    }\n\n    /// @inheritdoc IAccessManager\n    function isTargetClosed(address target) public view virtual returns (bool) {\n        return _targets[target].closed;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getTargetFunctionRole(address target, bytes4 selector) public view virtual returns (uint64) {\n        return _targets[target].allowedRoles[selector];\n    }\n\n    /// @inheritdoc IAccessManager\n    function getTargetAdminDelay(address target) public view virtual returns (uint32) {\n        return _targets[target].adminDelay.get();\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleAdmin(uint64 roleId) public view virtual returns (uint64) {\n        return _roles[roleId].admin;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleGuardian(uint64 roleId) public view virtual returns (uint64) {\n        return _roles[roleId].guardian;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getRoleGrantDelay(uint64 roleId) public view virtual returns (uint32) {\n        return _roles[roleId].grantDelay.get();\n    }\n\n    /// @inheritdoc IAccessManager\n    function getAccess(\n        uint64 roleId,\n        address account\n    ) public view virtual returns (uint48 since, uint32 currentDelay, uint32 pendingDelay, uint48 effect) {\n        Access storage access = _roles[roleId].members[account];\n\n        since = access.since;\n        if (_isFrozen) {\n            (currentDelay, pendingDelay, effect) = FrozenTime.getFull(FrozenTime.Delay.wrap(Time.Delay.unwrap(access.delay)));\n        } else {\n            (currentDelay, pendingDelay, effect) = access.delay.getFull();\n        }\n\n        return (since, currentDelay, pendingDelay, effect);\n    }\n\n    /// @inheritdoc IAccessManager\n    function hasRole(\n        uint64 roleId,\n        address account\n    ) public view virtual returns (bool isMember, uint32 executionDelay) {\n        if (roleId == PUBLIC_ROLE) {\n            return (true, 0);\n        } else {\n            (uint48 hasRoleSince, uint32 currentDelay, , ) = getAccess(roleId, account);\n            return (hasRoleSince != 0 && (_isFrozen || hasRoleSince <= Time.timestamp()), currentDelay);\n        }\n    }\n\n    // =============================================== ROLE MANAGEMENT ===============================================\n    /// @inheritdoc IAccessManager\n    function labelRole(uint64 roleId, string calldata label) public virtual onlyAuthorized {\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n        emit RoleLabel(roleId, label);\n    }\n\n    /// @inheritdoc IAccessManager\n    function grantRole(uint64 roleId, address account, uint32 executionDelay) public virtual onlyAuthorized {\n        _grantRole(roleId, account, getRoleGrantDelay(roleId), executionDelay);\n    }\n\n    /// @inheritdoc IAccessManager\n    function revokeRole(uint64 roleId, address account) public virtual onlyAuthorized {\n        _revokeRole(roleId, account);\n    }\n\n    /// @inheritdoc IAccessManager\n    function renounceRole(uint64 roleId, address callerConfirmation) public virtual {\n        if (callerConfirmation != _msgSender()) {\n            revert AccessManagerBadConfirmation();\n        }\n        _revokeRole(roleId, callerConfirmation);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setRoleAdmin(uint64 roleId, uint64 admin) public virtual onlyAuthorized {\n        _setRoleAdmin(roleId, admin);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setRoleGuardian(uint64 roleId, uint64 guardian) public virtual onlyAuthorized {\n        _setRoleGuardian(roleId, guardian);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setGrantDelay(uint64 roleId, uint32 newDelay) public virtual onlyAuthorized {\n        _setGrantDelay(roleId, newDelay);\n    }\n\n    /**\n     * @dev Internal version of {grantRole} without access control. Returns true if the role was newly granted.\n     *\n     * Emits a {RoleGranted} event.\n     */\n    function _grantRole(\n        uint64 roleId,\n        address account,\n        uint32 grantDelay,\n        uint32 executionDelay\n    ) internal virtual returns (bool) {\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        bool newMember = _roles[roleId].members[account].since == 0;\n        uint48 since;\n\n        if (newMember) {\n            since = Time.timestamp() + grantDelay;\n            _roles[roleId].members[account] = Access({since: since, delay: executionDelay.toDelay()});\n        } else {\n            // No setback here. Value can be reset by doing revoke + grant, effectively allowing the admin to perform\n            // any change to the execution delay within the duration of the role admin delay.\n            (_roles[roleId].members[account].delay, since) = _roles[roleId].members[account].delay.withUpdate(\n                executionDelay,\n                0\n            );\n        }\n\n        emit RoleGranted(roleId, account, executionDelay, since, newMember);\n        return newMember;\n    }\n\n    /**\n     * @dev Internal version of {revokeRole} without access control. This logic is also used by {renounceRole}.\n     * Returns true if the role was previously granted.\n     *\n     * Emits a {RoleRevoked} event if the account had the role.\n     */\n    function _revokeRole(uint64 roleId, address account) internal virtual returns (bool) {\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        if (_roles[roleId].members[account].since == 0) {\n            return false;\n        }\n\n        delete _roles[roleId].members[account];\n\n        emit RoleRevoked(roleId, account);\n        return true;\n    }\n\n    /**\n     * @dev Internal version of {setRoleAdmin} without access control.\n     *\n     * Emits a {RoleAdminChanged} event.\n     *\n     * NOTE: Setting the admin role as the `PUBLIC_ROLE` is allowed, but it will effectively allow\n     * anyone to set grant or revoke such role.\n     */\n    function _setRoleAdmin(uint64 roleId, uint64 admin) internal virtual {\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        _roles[roleId].admin = admin;\n\n        emit RoleAdminChanged(roleId, admin);\n    }\n\n    /**\n     * @dev Internal version of {setRoleGuardian} without access control.\n     *\n     * Emits a {RoleGuardianChanged} event.\n     *\n     * NOTE: Setting the guardian role as the `PUBLIC_ROLE` is allowed, but it will effectively allow\n     * anyone to cancel any scheduled operation for such role.\n     */\n    function _setRoleGuardian(uint64 roleId, uint64 guardian) internal virtual {\n        if (roleId == ADMIN_ROLE || roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        _roles[roleId].guardian = guardian;\n\n        emit RoleGuardianChanged(roleId, guardian);\n    }\n\n    /**\n     * @dev Internal version of {setGrantDelay} without access control.\n     *\n     * Emits a {RoleGrantDelayChanged} event.\n     */\n    function _setGrantDelay(uint64 roleId, uint32 newDelay) internal virtual {\n        if (roleId == PUBLIC_ROLE) {\n            revert AccessManagerLockedRole(roleId);\n        }\n\n        uint48 effect;\n        (_roles[roleId].grantDelay, effect) = _roles[roleId].grantDelay.withUpdate(newDelay, minSetback());\n\n        emit RoleGrantDelayChanged(roleId, newDelay, effect);\n    }\n\n    // ============================================= FUNCTION MANAGEMENT ==============================================\n    /// @inheritdoc IAccessManager\n    function setTargetFunctionRole(\n        address target,\n        bytes4[] calldata selectors,\n        uint64 roleId\n    ) public virtual onlyAuthorized {\n        for (uint256 i = 0; i < selectors.length; ++i) {\n            _setTargetFunctionRole(target, selectors[i], roleId);\n        }\n    }\n\n    /**\n     * @dev Internal version of {setTargetFunctionRole} without access control.\n     *\n     * Emits a {TargetFunctionRoleUpdated} event.\n     */\n    function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual {\n        _targets[target].allowedRoles[selector] = roleId;\n        emit TargetFunctionRoleUpdated(target, selector, roleId);\n    }\n\n    /// @inheritdoc IAccessManager\n    function setTargetAdminDelay(address target, uint32 newDelay) public virtual onlyAuthorized {\n        _setTargetAdminDelay(target, newDelay);\n    }\n\n    /**\n     * @dev Internal version of {setTargetAdminDelay} without access control.\n     *\n     * Emits a {TargetAdminDelayUpdated} event.\n     */\n    function _setTargetAdminDelay(address target, uint32 newDelay) internal virtual {\n        uint48 effect;\n        (_targets[target].adminDelay, effect) = _targets[target].adminDelay.withUpdate(newDelay, minSetback());\n\n        emit TargetAdminDelayUpdated(target, newDelay, effect);\n    }\n\n    // =============================================== MODE MANAGEMENT ================================================\n    /// @inheritdoc IAccessManager\n    function setTargetClosed(address target, bool closed) public virtual onlyAuthorized {\n        _setTargetClosed(target, closed);\n    }\n\n    /**\n     * @dev Set the closed flag for a contract. This is an internal setter with no access restrictions.\n     *\n     * Emits a {TargetClosed} event.\n     */\n    function _setTargetClosed(address target, bool closed) internal virtual {\n        _targets[target].closed = closed;\n        emit TargetClosed(target, closed);\n    }\n\n    // ============================================== DELAYED OPERATIONS ==============================================\n    /// @inheritdoc IAccessManager\n    function getSchedule(bytes32 id) public view virtual returns (uint48) {\n        uint48 timepoint = _schedules[id].timepoint;\n        return _isExpired(timepoint) ? 0 : timepoint;\n    }\n\n    /// @inheritdoc IAccessManager\n    function getNonce(bytes32 id) public view virtual returns (uint32) {\n        return _schedules[id].nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function schedule(\n        address target,\n        bytes calldata data,\n        uint48 when\n    ) public virtual returns (bytes32 operationId, uint32 nonce) {\n        address caller = _msgSender();\n\n        // Fetch restrictions that apply to the caller on the targeted function\n        (, uint32 setback) = _canCallExtended(caller, target, data);\n\n        uint48 minWhen = Time.timestamp() + setback;\n\n        // If call with delay is not authorized, or if requested timing is too soon, revert\n        if (setback == 0 || (when > 0 && when < minWhen)) {\n            revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data));\n        }\n\n        // Reuse variable due to stack too deep\n        when = uint48(Math.max(when, minWhen)); // cast is safe: both inputs are uint48\n\n        // If caller is authorised, schedule operation\n        operationId = hashOperation(caller, target, data);\n\n        _checkNotScheduled(operationId);\n\n        unchecked {\n            // It's not feasible to overflow the nonce in less than 1000 years\n            nonce = _schedules[operationId].nonce + 1;\n        }\n        _schedules[operationId].timepoint = when;\n        _schedules[operationId].nonce = nonce;\n        emit OperationScheduled(operationId, nonce, when, caller, target, data);\n\n        // Using named return values because otherwise we get stack too deep\n    }\n\n    /**\n     * @dev Reverts if the operation is currently scheduled and has not expired.\n     *\n     * NOTE: This function was introduced due to stack too deep errors in schedule.\n     */\n    function _checkNotScheduled(bytes32 operationId) private view {\n        uint48 prevTimepoint = _schedules[operationId].timepoint;\n        if (prevTimepoint != 0 && !_isExpired(prevTimepoint)) {\n            revert AccessManagerAlreadyScheduled(operationId);\n        }\n    }\n\n    /// @inheritdoc IAccessManager\n    // Reentrancy is not an issue because permissions are checked on msg.sender. Additionally,\n    // _consumeScheduledOp guarantees a scheduled operation is only executed once.\n    // slither-disable-next-line reentrancy-no-eth\n    function execute(address target, bytes calldata data) public payable virtual returns (uint32) {\n        address caller = _msgSender();\n\n        // Fetch restrictions that apply to the caller on the targeted function\n        (bool immediate, uint32 setback) = _canCallExtended(caller, target, data);\n\n        // If call is not authorized, revert\n        if (!immediate && setback == 0) {\n            revert AccessManagerUnauthorizedCall(caller, target, _checkSelector(data));\n        }\n\n        bytes32 operationId = hashOperation(caller, target, data);\n        uint32 nonce;\n\n        // If caller is authorised, check operation was scheduled early enough\n        // Consume an available schedule even if there is no currently enforced delay\n        if (setback != 0 || getSchedule(operationId) != 0) {\n            nonce = _consumeScheduledOp(operationId);\n        }\n\n        // Mark the target and selector as authorised\n        bytes32 executionIdBefore = _executionId;\n        _executionId = _hashExecutionId(target, _checkSelector(data));\n\n        // Perform call\n        Address.functionCallWithValue(target, data, msg.value);\n\n        // Reset execute identifier\n        _executionId = executionIdBefore;\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function cancel(address caller, address target, bytes calldata data) public virtual returns (uint32) {\n        address msgsender = _msgSender();\n        bytes4 selector = _checkSelector(data);\n\n        bytes32 operationId = hashOperation(caller, target, data);\n        if (_schedules[operationId].timepoint == 0) {\n            revert AccessManagerNotScheduled(operationId);\n        } else if (caller != msgsender) {\n            // calls can only be canceled by the account that scheduled them, a global admin, or by a guardian of the required role.\n            (bool isAdmin, ) = hasRole(ADMIN_ROLE, msgsender);\n            (bool isGuardian, ) = hasRole(getRoleGuardian(getTargetFunctionRole(target, selector)), msgsender);\n            if (!isAdmin && !isGuardian) {\n                revert AccessManagerUnauthorizedCancel(msgsender, caller, target, selector);\n            }\n        }\n\n        delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce\n        uint32 nonce = _schedules[operationId].nonce;\n        emit OperationCanceled(operationId, nonce);\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function consumeScheduledOp(address caller, bytes calldata data) public virtual {\n        address target = _msgSender();\n        if (IAccessManaged(target).isConsumingScheduledOp() != IAccessManaged.isConsumingScheduledOp.selector) {\n            revert AccessManagerUnauthorizedConsume(target);\n        }\n        _consumeScheduledOp(hashOperation(caller, target, data));\n    }\n\n    /**\n     * @dev Internal variant of {consumeScheduledOp} that operates on bytes32 operationId.\n     *\n     * Returns the nonce of the scheduled operation that is consumed.\n     */\n    function _consumeScheduledOp(bytes32 operationId) internal virtual returns (uint32) {\n        uint48 timepoint = _schedules[operationId].timepoint;\n        uint32 nonce = _schedules[operationId].nonce;\n\n        if (timepoint == 0) {\n            revert AccessManagerNotScheduled(operationId);\n        } else if (timepoint > Time.timestamp()) {\n            revert AccessManagerNotReady(operationId);\n        } else if (_isExpired(timepoint)) {\n            revert AccessManagerExpired(operationId);\n        }\n\n        delete _schedules[operationId].timepoint; // reset the timepoint, keep the nonce\n        emit OperationExecuted(operationId, nonce);\n\n        return nonce;\n    }\n\n    /// @inheritdoc IAccessManager\n    function hashOperation(address caller, address target, bytes calldata data) public view virtual returns (bytes32) {\n        return keccak256(abi.encode(caller, target, data));\n    }\n\n    // ==================================================== OTHERS ====================================================\n    /// @inheritdoc IAccessManager\n    function updateAuthority(address target, address newAuthority) public virtual onlyAuthorized {\n        IAccessManaged(target).setAuthority(newAuthority);\n    }\n\n    // ================================================= ADMIN LOGIC ==================================================\n    /**\n     * @dev Check if the current call is authorized according to admin and roles logic.\n     *\n     * WARNING: Carefully review the considerations of {AccessManaged-restricted} since they apply to this modifier.\n     */\n    function _checkAuthorized() private {\n        address caller = _msgSender();\n        (bool immediate, uint32 delay) = _canCallSelf(caller, _msgData());\n        if (!immediate) {\n            if (delay == 0) {\n                (, uint64 requiredRole, ) = _getAdminRestrictions(_msgData());\n                revert AccessManagerUnauthorizedAccount(caller, requiredRole);\n            } else {\n                _consumeScheduledOp(hashOperation(caller, address(this), _msgData()));\n            }\n        }\n    }\n\n    /**\n     * @dev Get the admin restrictions of a given function call based on the function and arguments involved.\n     *\n     * Returns:\n     * - bool restricted: does this data match a restricted operation\n     * - uint64: which role is this operation restricted to\n     * - uint32: minimum delay to enforce for that operation (max between operation's delay and admin's execution delay)\n     */\n    function _getAdminRestrictions(\n        bytes calldata data\n    ) private view returns (bool adminRestricted, uint64 roleAdminId, uint32 executionDelay) {\n        if (data.length < 4) {\n            return (false, 0, 0);\n        }\n\n        bytes4 selector = _checkSelector(data);\n\n        // Restricted to ADMIN with no delay beside any execution delay the caller may have\n        if (\n            selector == this.labelRole.selector ||\n            selector == this.setRoleAdmin.selector ||\n            selector == this.setRoleGuardian.selector ||\n            selector == this.setGrantDelay.selector ||\n            selector == this.setTargetAdminDelay.selector\n        ) {\n            return (true, ADMIN_ROLE, 0);\n        }\n\n        // Restricted to ADMIN with the admin delay corresponding to the target\n        if (\n            selector == this.updateAuthority.selector ||\n            selector == this.setTargetClosed.selector ||\n            selector == this.setTargetFunctionRole.selector\n        ) {\n            // First argument is a target.\n            address target = abi.decode(data[0x04:0x24], (address));\n            uint32 delay = getTargetAdminDelay(target);\n            return (true, ADMIN_ROLE, delay);\n        }\n\n        // Restricted to that role's admin with no delay beside any execution delay the caller may have.\n        if (selector == this.grantRole.selector || selector == this.revokeRole.selector) {\n            // First argument is a roleId.\n            uint64 roleId = abi.decode(data[0x04:0x24], (uint64));\n            return (true, getRoleAdmin(roleId), 0);\n        }\n\n        return (false, getTargetFunctionRole(address(this), selector), 0);\n    }\n\n    // =================================================== HELPERS ====================================================\n    /**\n     * @dev An extended version of {canCall} for internal usage that checks {_canCallSelf}\n     * when the target is this contract.\n     *\n     * Returns:\n     * - bool immediate: whether the operation can be executed immediately (with no delay)\n     * - uint32 delay: the execution delay\n     */\n    function _canCallExtended(\n        address caller,\n        address target,\n        bytes calldata data\n    ) private view returns (bool immediate, uint32 delay) {\n        if (target == address(this)) {\n            return _canCallSelf(caller, data);\n        } else {\n            return data.length < 4 ? (false, 0) : canCall(caller, target, _checkSelector(data));\n        }\n    }\n\n    /**\n     * @dev A version of {canCall} that checks for restrictions in this contract.\n     */\n    function _canCallSelf(address caller, bytes calldata data) private view returns (bool immediate, uint32 delay) {\n        if (data.length < 4) {\n            return (false, 0);\n        }\n\n        if (caller == address(this)) {\n            // Caller is AccessManager, this means the call was sent through {execute} and it already checked\n            // permissions. We verify that the call \"identifier\", which is set during {execute}, is correct.\n            return (_isExecuting(address(this), _checkSelector(data)), 0);\n        }\n\n        (bool adminRestricted, uint64 roleId, uint32 operationDelay) = _getAdminRestrictions(data);\n\n        // isTargetClosed apply to non-admin-restricted function\n        if (!adminRestricted && isTargetClosed(address(this))) {\n            return (false, 0);\n        }\n\n        (bool inRole, uint32 executionDelay) = hasRole(roleId, caller);\n        if (!inRole) {\n            return (false, 0);\n        }\n\n        // downcast is safe because both options are uint32\n        delay = uint32(Math.max(operationDelay, executionDelay));\n        return (delay == 0, delay);\n    }\n\n    /**\n     * @dev Returns true if a call with `target` and `selector` is being executed via {executed}.\n     */\n    function _isExecuting(address target, bytes4 selector) private view returns (bool) {\n        return _executionId == _hashExecutionId(target, selector);\n    }\n\n    /**\n     * @dev Returns true if a schedule timepoint is past its expiration deadline.\n     */\n    function _isExpired(uint48 timepoint) private view returns (bool) {\n        return timepoint + expiration() <= Time.timestamp();\n    }\n\n    /**\n     * @dev Extracts the selector from calldata. Panics if data is not at least 4 bytes\n     */\n    function _checkSelector(bytes calldata data) private pure returns (bytes4) {\n        return bytes4(data[0:4]);\n    }\n\n    /**\n     * @dev Hashing function for execute protection\n     */\n    function _hashExecutionId(address target, bytes4 selector) private pure returns (bytes32) {\n        return keccak256(abi.encode(target, selector));\n    }\n}\n"
      },
      "project/contracts/dependencies/FrozenTime.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/types/Time.sol)\n\npragma solidity ^0.8.20;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\nimport {SafeCast} from \"@openzeppelin/contracts/utils/math/SafeCast.sol\";\n\n/**\n * @dev This library provides helpers for manipulating time-related objects.\n *\n * It uses the following types:\n * - `uint48` for timepoints\n * - `uint32` for durations\n *\n * While the library doesn't provide specific types for timepoints and duration, it does provide:\n * - a `Delay` type to represent duration that can be programmed to change value automatically at a given point\n * - additional helper functions\n */\nlibrary FrozenTime {\n    using FrozenTime for *;\n\n    /**\n     * @dev Get the block timestamp as a Timepoint.\n     */\n    function timestamp() internal pure returns (uint48) {\n        // return SafeCast.toUint48(block.timestamp);\n        return SafeCast.toUint48(32503680000); // 3000-01-01\n    }\n\n    /**\n     * @dev Get the block number as a Timepoint.\n     */\n    function blockNumber() internal view returns (uint48) {\n        return SafeCast.toUint48(block.number);\n    }\n\n    // ==================================================== Delay =====================================================\n    /**\n     * @dev A `Delay` is a uint32 duration that can be programmed to change value automatically at a given point in the\n     * future. The \"effect\" timepoint describes when the transitions happens from the \"old\" value to the \"new\" value.\n     * This allows updating the delay applied to some operation while keeping some guarantees.\n     *\n     * In particular, the {update} function guarantees that if the delay is reduced, the old delay still applies for\n     * some time. For example if the delay is currently 7 days to do an upgrade, the admin should not be able to set\n     * the delay to 0 and upgrade immediately. If the admin wants to reduce the delay, the old delay (7 days) should\n     * still apply for some time.\n     *\n     *\n     * The `Delay` type is 112 bits long, and packs the following:\n     *\n     * ```\n     *   | [uint48]: effect date (timepoint)\n     *   |           | [uint32]: value before (duration)\n     *   ↓           ↓       ↓ [uint32]: value after (duration)\n     * 0xAAAAAAAAAAAABBBBBBBBCCCCCCCC\n     * ```\n     *\n     * NOTE: The {get} and {withUpdate} functions operate using timestamps. Block number based delays are not currently\n     * supported.\n     */\n    type Delay is uint112;\n\n    /**\n     * @dev Wrap a duration into a Delay to add the one-step \"update in the future\" feature\n     */\n    function toDelay(uint32 duration) internal pure returns (Delay) {\n        return Delay.wrap(duration);\n    }\n\n    /**\n     * @dev Get the value at a given timepoint plus the pending value and effect timepoint if there is a scheduled\n     * change after this timepoint. If the effect timepoint is 0, then the pending value should not be considered.\n     */\n    function _getFullAt(Delay self, uint48 timepoint) private pure returns (uint32, uint32, uint48) {\n        (uint32 valueBefore, uint32 valueAfter, uint48 effect) = self.unpack();\n        return effect <= timepoint ? (valueAfter, 0, 0) : (valueBefore, valueAfter, effect);\n    }\n\n    /**\n     * @dev Get the current value plus the pending value and effect timepoint if there is a scheduled change. If the\n     * effect timepoint is 0, then the pending value should not be considered.\n     */\n    function getFull(Delay self) internal pure returns (uint32, uint32, uint48) {\n        return _getFullAt(self, timestamp());\n    }\n\n    /**\n     * @dev Get the current value.\n     */\n    function get(Delay self) internal pure returns (uint32) {\n        (uint32 delay, , ) = self.getFull();\n        return delay;\n    }\n\n    /**\n     * @dev Update a Delay object so that it takes a new duration after a timepoint that is automatically computed to\n     * enforce the old delay at the moment of the update. Returns the updated Delay object and the timestamp when the\n     * new delay becomes effective.\n     */\n    function withUpdate(\n        Delay self,\n        uint32 newValue,\n        uint32 minSetback\n    ) internal pure returns (Delay updatedDelay, uint48 effect) {\n        uint32 value = self.get();\n        uint32 setback = uint32(Math.max(minSetback, value > newValue ? value - newValue : 0));\n        effect = timestamp() + setback;\n        return (pack(value, newValue, effect), effect);\n    }\n\n    /**\n     * @dev Split a delay into its components: valueBefore, valueAfter and effect (transition timepoint).\n     */\n    function unpack(Delay self) internal pure returns (uint32 valueBefore, uint32 valueAfter, uint48 effect) {\n        uint112 raw = Delay.unwrap(self);\n\n        valueAfter = uint32(raw);\n        valueBefore = uint32(raw >> 32);\n        effect = uint48(raw >> 64);\n\n        return (valueBefore, valueAfter, effect);\n    }\n\n    /**\n     * @dev pack the components into a Delay object.\n     */\n    function pack(uint32 valueBefore, uint32 valueAfter, uint48 effect) internal pure returns (Delay) {\n        return Delay.wrap((uint112(effect) << 64) | (uint112(valueBefore) << 32) | uint112(valueAfter));\n    }\n}\n"
      },
      "project/contracts/ERC2771ForwarderAccount.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.23;\n\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {BaseAccount} from \"@account-abstraction/contracts/core/BaseAccount.sol\";\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {ERC2771Context} from \"@openzeppelin/contracts/metatx/ERC2771Context.sol\";\nimport {IAccountExecute} from \"@account-abstraction/contracts/interfaces/IAccountExecute.sol\";\nimport {IEntryPoint} from \"@account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {PackedUserOperation} from \"@account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\nimport {SIG_VALIDATION_SUCCESS, SIG_VALIDATION_FAILED} from \"@account-abstraction/contracts/core/Helpers.sol\";\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\n/**\n * @title ERC2771ForwarderAccount\n *\n * @dev Smart Account that acts as an ERC2771 Trusted Forwarder, forwarding calls to a pre-defined contract\n *      on behalf of the signer of the userOp.\n *\n *      Assumes the target contract is designed to work with ERC2771Context and trusts this account as a forwarder.\n *\n *      This contract is designed to be used with an AccessManagedProxy for runtime access control management.\n *\n * @custom:security-contact security@ensuro.co\n * @author Ensuro\n */\ncontract ERC2771ForwarderAccount is UUPSUpgradeable, BaseAccount, IAccountExecute {\n  // 132 = 4 (method bytes4) + 32 (expectedSigner) + 32 (target) + 32 (value) + 32 (calldata offset)\n  uint256 private constant MIN_USER_OP_CALLDATA = 132;\n  IEntryPoint private immutable _entryPoint;\n\n  /// @custom:storage-location erc7201:ensuro.storage.ERC2771ForwarderAccount\n  struct ERC2771ForwarderAccountStorage {\n    mapping(address => ERC2771Context) targets;\n  }\n\n  // keccak256(abi.encode(uint256(keccak256(\"ensuro.storage.ERC2771ForwarderAccount\")) - 1)) & ~bytes32(uint256(0xff))\n  // solhint-disable-next-line const-name-snakecase\n  bytes32 internal constant ERC2771ForwarderAccountStorageLocation =\n    0x32800a8a254400b8b55434a22b827759dcb96a572133b419f26b7155e3843000;\n\n  function _getAccountStorage() internal pure returns (ERC2771ForwarderAccountStorage storage $) {\n    // solhint-disable-next-line no-inline-assembly\n    assembly {\n      $.slot := ERC2771ForwarderAccountStorageLocation\n    }\n  }\n\n  event ExecutorAdded(address indexed executor, ERC2771Context indexed target);\n  event ExecutorRemoved(address indexed executor);\n\n  error RequiredEntryPointOrExecutor(address sender);\n  error InvalidTarget(ERC2771Context target, address signer);\n  error InvalidCall();\n  error MethodNotSupported(bytes4 selector);\n\n  constructor(IEntryPoint anEntryPoint) {\n    _entryPoint = anEntryPoint;\n  }\n\n  // solhint-disable-next-line no-empty-blocks\n  function _authorizeUpgrade(address newImpl) internal view override {}\n\n  /**\n   * @dev This is a noop, for deployment convenience where an initializer is expected.\n   */\n  //solhint-disable-next-line no-empty-blocks\n  function initialize() external {}\n\n  // solhint-disable-next-line no-empty-blocks\n  receive() external payable {}\n\n  function executeBatch(Call[] calldata) external virtual override {\n    revert InvalidCall();\n  }\n\n  function execute(address, uint256, bytes calldata) external virtual override {\n    revert InvalidCall();\n  }\n\n  function _getSigner(PackedUserOperation calldata userop, bytes32 userOpHash) internal pure returns (address) {\n    bytes32 hash = MessageHashUtils.toEthSignedMessageHash(userOpHash);\n    return ECDSA.recover(hash, userop.signature);\n  }\n\n  /**\n   * @dev Validates that the user operation is well formed and that the destination is correct. Does not validate signature.\n   * @return expectedSigner The address included in the call data, expected to be the signer of the userOp\n   * @return call A Call struct containing the call to be made\n   * @return selector The selector used (execute or executeUserOp)\n   */\n  function _validateAndDecodeCall(\n    PackedUserOperation calldata userOp,\n    bytes32 userOpHash\n  ) internal pure returns (address expectedSigner, Call memory call, bytes4 selector) {\n    require(userOp.callData.length >= MIN_USER_OP_CALLDATA, InvalidCall());\n    selector = bytes4(userOp.callData[0:4]);\n    if (selector != this.executeUserOp.selector && selector != this.erc2771Forward.selector) {\n      revert MethodNotSupported(selector);\n    }\n    (expectedSigner, call.target, call.value, call.data) = abi.decode(\n      userOp.callData[4:],\n      (address, address, uint256, bytes)\n    );\n    if (call.target == address(0)) {\n      revert InvalidTarget(ERC2771Context(call.target), _getSigner(userOp, userOpHash));\n    }\n  }\n\n  function _isAuthorized(address signer, address expectedSigner, address target) internal view returns (bool) {\n    ERC2771ForwarderAccountStorage storage $ = _getAccountStorage();\n    return signer == expectedSigner && $.targets[signer] == ERC2771Context(target);\n  }\n\n  /**\n   * @notice Add an executor and its corresponding target contract.\n   * @param executor The executor address to add\n   * @param target The ERC2771Context target contract for this executor\n   */\n  function addExecutor(address executor, ERC2771Context target) external {\n    ERC2771ForwarderAccountStorage storage $ = _getAccountStorage();\n    $.targets[executor] = target;\n    emit ExecutorAdded(executor, target);\n  }\n\n  /**\n   * @notice Remove an executor by setting its target to the zero address.\n   * @param executor The executor address to remove\n   */\n  function removeExecutor(address executor) external {\n    ERC2771ForwarderAccountStorage storage $ = _getAccountStorage();\n    $.targets[executor] = ERC2771Context(address(0));\n    emit ExecutorRemoved(executor);\n  }\n\n  /// implement template method of BaseAccount\n  function _validateSignature(\n    PackedUserOperation calldata userOp,\n    bytes32 userOpHash\n  ) internal virtual override returns (uint256 validationData) {\n    (address expectedSigner, Call memory call, ) = _validateAndDecodeCall(userOp, userOpHash);\n    address signer = _getSigner(userOp, userOpHash);\n    if (!_isAuthorized(signer, expectedSigner, call.target)) {\n      return SIG_VALIDATION_FAILED;\n    }\n    return SIG_VALIDATION_SUCCESS;\n  }\n\n  /**\n   * @dev Executes a user operation by forwarding the call to the target contract with the signer as the msgSender.\n   *      The calldata is expected to contain this function's selector followed by the signer and the ABI-encoded call:\n   *         - signer (address): the signer of the userop, must match the signature\n   *         - dest (address): the target contract address (must be the same as _target)\n   *         - value (uint256): the amount of ETH to send with the call\n   *         - func (bytes): the calldata for the target function\n   *\n   * @param userOp The packed user operation containing the call data and signature.\n   * @param userOpHash The hash of the user operation, used for signature verification.\n   */\n  function executeUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash) external override {\n    _requireFromEntryPoint();\n\n    (address expectedSigner, Call memory call, ) = _validateAndDecodeCall(userOp, userOpHash);\n\n    Address.functionCallWithValue(call.target, abi.encodePacked(call.data, expectedSigner), call.value);\n  }\n\n  /**\n   * @notice Forwards a call to the target contract with `caller` as the msgSender.\n   * @dev Since this method is called from the entryPoint, the method _validateSignature was passed before,\n   *      validating the signer of the userOp is equal to `caller` and `caller` is authorized to call `target`.\n   *\n   * @param caller The real caller of the operation that will be appended to the call, and decoded by the target\n   *               contract as _msgSender()\n   * @param target The target contract to be called\n   * @param value The amount of ETH to send with the call\n   * @param func The calldata for the target function\n   */\n  function erc2771Forward(address caller, address target, uint256 value, bytes calldata func) external virtual {\n    _requireFromEntryPoint();\n    Address.functionCallWithValue(target, abi.encodePacked(func, caller), value);\n  }\n\n  /**\n   * check current account deposit in the entryPoint\n   */\n  function getDeposit() public view returns (uint256) {\n    return entryPoint().balanceOf(address(this));\n  }\n\n  /**\n   * deposit more funds for this account in the entryPoint\n   */\n  function addDeposit() public payable {\n    entryPoint().depositTo{value: msg.value}(address(this));\n  }\n\n  /**\n   * withdraw value from the account's deposit\n   * @param withdrawAddress target to send to\n   * @param amount to withdraw\n   */\n  function withdrawDepositTo(address payable withdrawAddress, uint256 amount) public {\n    entryPoint().withdrawTo(withdrawAddress, amount);\n  }\n\n  /// @inheritdoc BaseAccount\n  function entryPoint() public view virtual override returns (IEntryPoint) {\n    return _entryPoint;\n  }\n}\n"
      },
      "project/contracts/mock/ERC20With2771.sol": {
        "content": "//SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {ERC2771Context} from \"@openzeppelin/contracts/metatx/ERC2771Context.sol\";\nimport {Context} from \"@openzeppelin/contracts/utils/Context.sol\";\n\ncontract ERC20With2771 is ERC20, ERC2771Context {\n  uint8 internal immutable _decimals;\n\n  constructor(\n    string memory name_,\n    string memory symbol_,\n    uint256 initialSupply,\n    uint8 decimals_,\n    address trustedForwarder\n  ) ERC20(name_, symbol_) ERC2771Context(trustedForwarder) {\n    _decimals = decimals_;\n    _mint(msg.sender, initialSupply);\n  }\n\n  function decimals() public view virtual override returns (uint8) {\n    return _decimals;\n  }\n\n  /// @inheritdoc ERC2771Context\n  function _contextSuffixLength() internal view override(Context, ERC2771Context) returns (uint256) {\n    return ERC2771Context._contextSuffixLength();\n  }\n\n  /// @inheritdoc ERC2771Context\n  function _msgSender() internal view override(Context, ERC2771Context) returns (address) {\n    return ERC2771Context._msgSender();\n  }\n\n  /// @inheritdoc ERC2771Context\n  function _msgData() internal view override(Context, ERC2771Context) returns (bytes calldata) {\n    return ERC2771Context._msgData();\n  }\n}\n"
      },
      "project/contracts/mock/ERC2771Probe.sol": {
        "content": "//SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport {ERC2771Context} from \"@openzeppelin/contracts/metatx/ERC2771Context.sol\";\n\n/// @dev Test target that reveals how it was called: the ERC2771 sender, the calldata length\n///      (4 with no appended sender, 24 when the forwarder appends one) and the forwarded value.\ncontract ERC2771Probe is ERC2771Context {\n  event Pinged(address sender, uint256 dataLength, uint256 value);\n\n  constructor(address trustedForwarder) ERC2771Context(trustedForwarder) {}\n\n  function ping() external payable {\n    emit Pinged(_msgSender(), msg.data.length, msg.value);\n  }\n}\n"
      },
      "project/contracts/mock/MockAccessManager.sol": {
        "content": "//SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport {AccessManager} from \"@openzeppelin/contracts/access/manager/AccessManager.sol\";\n\n/// @dev Stock OZ AccessManager, exposed for tests as the authority of an AccessManaged contract\n///      (the local artifact name avoids the collision with the forked dependencies/AccessManager).\ncontract MockAccessManager is AccessManager {\n  constructor(address admin) AccessManager(admin) {}\n}\n"
      },
      "project/contracts/mock/MockWorkload.sol": {
        "content": "//SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport {ERC2771Context} from \"@openzeppelin/contracts/metatx/ERC2771Context.sol\";\n\n/// @dev A contract simulating a realistic workload for userops and bundles: looping over a large\n///      calldata payload with several storage writes per item.\ncontract MockWorkload is ERC2771Context {\n  struct Record {\n    bytes32 hash;\n    bytes32 derived;\n    address caller;\n  }\n\n  uint256 private constant ROUNDS = 8;\n\n  mapping(uint256 id => Record) public records;\n  mapping(bytes32 digest => uint256 id) public digests;\n  mapping(address caller => uint256) public itemsBy;\n  uint256 public count;\n\n  event Stored(uint256 indexed id, address indexed caller);\n\n  constructor(address forwarder) ERC2771Context(forwarder) {}\n\n  function store(bytes[] calldata items) external {\n    address caller = _msgSender();\n    uint256 n = count;\n    for (uint256 i = 0; i < items.length; ++i) {\n      bytes32 h = _digest(items[i]);\n      records[++n] = Record(h, keccak256(abi.encode(h, caller)), caller);\n      digests[h] = n;\n      emit Stored(n, caller);\n    }\n    count = n;\n    itemsBy[caller] += items.length;\n  }\n\n  function _digest(bytes calldata blob) private pure returns (bytes32 h) {\n    h = keccak256(blob);\n    for (uint256 i = 0; i < ROUNDS; ++i) h = keccak256(abi.encode(h, i));\n  }\n}\n"
      },
      "project/contracts/UnifiedForwarderAccount.sol": {
        "content": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.20;\n\nimport {ECDSA} from \"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\";\nimport {MessageHashUtils} from \"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\";\nimport {AccessManaged} from \"@openzeppelin/contracts/access/manager/AccessManaged.sol\";\nimport {IEntryPoint} from \"@account-abstraction/contracts/interfaces/IEntryPoint.sol\";\nimport {PackedUserOperation} from \"@account-abstraction/contracts/interfaces/PackedUserOperation.sol\";\n\n/// @dev Only used to derive the accepted callData tag selectors by name+type (see EXECUTE_SELECTOR).\ninterface IExecute {\n  function execute(address signer, address target, uint256 value, bytes calldata data) external;\n\n  function executeUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash) external;\n}\n\n/// @notice ERC-4337 forwarder account + entrypoint merged into one contract.\n/// @dev handleOps validates (signature, authorized signer, nonce) and forwards, internally.\n///      The ERC-2771 sender is appended ONLY when calling `erc2771Target` (fixed at\n///      construction). It is never up to the signer, which would let a signer route a call\n///      to an ERC-2771 target through the plain path with a forged trailing sender and\n///      impersonate any account.\n///\n///      Deployment invariant, assumed but NOT enforced on-chain: `erc2771Target` is the only\n///      ERC-2771 contract that trusts this account as a forwarder. If any other ERC-2771 contract\n///      trusts it, an authorized signer can impersonate arbitrary accounts on that contract via\n///      the plain path. Wiring this up correctly is a deployment responsibility.\ncontract UnifiedForwarderAccount is AccessManaged {\n  // Accepted callData tags (the 4-byte prefix). The encoded args after the tag are always\n  // (signer, target, value, data) regardless of which tag is used.\n  bytes4 private constant EXECUTE_SELECTOR = IExecute.execute.selector;\n  bytes4 private constant EXECUTE_USER_OP_SELECTOR = IExecute.executeUserOp.selector;\n\n  uint256 private constant SELECTOR_SIZE = 4; // 4-byte callData tag\n  uint256 private constant WORD_SIZE = 32; // ABI head word\n  uint256 private constant NONCE_SEQ_BITS = 64; // 2D nonce: high 192 bits = key, low 64 = sequence\n\n  address public immutable erc2771Target;\n\n  mapping(address signer => bool) public authorizedSigner;\n  mapping(uint192 key => uint64 sequence) private _nonceSeq;\n\n  event AuthorizedSignerSet(address indexed signer, bool authorized);\n\n  error UnauthorizedSigner(address signer);\n  error InvalidSignature(address recovered, address expected);\n  error InvalidNonce(uint192 key, uint64 expected, uint64 actual);\n  error UnsupportedSelector(bytes4 selector);\n  error InvalidSender(address sender);\n  error ZeroAddress();\n\n  constructor(address authority, address erc2771Target_, address[] memory signers) AccessManaged(authority) {\n    require(erc2771Target_ != address(0), ZeroAddress());\n    erc2771Target = erc2771Target_;\n    for (uint256 i = 0; i < signers.length; ++i) {\n      require(signers[i] != address(0), ZeroAddress());\n      authorizedSigner[signers[i]] = true;\n      emit AuthorizedSignerSet(signers[i], true);\n    }\n  }\n\n  // solhint-disable-next-line no-empty-blocks\n  receive() external payable {}\n\n  /// @notice Add or remove an authorized signer. Gated by the AccessManager `authority`; the signer\n  ///         set stays in plain storage so `_validate` reads it cheaply.\n  function setAuthorizedSigner(address signer, bool authorized) external restricted {\n    require(signer != address(0), ZeroAddress());\n    authorizedSigner[signer] = authorized;\n    emit AuthorizedSignerSet(signer, authorized);\n  }\n\n  function handleOps(PackedUserOperation[] calldata ops, address /* beneficiary */) external {\n    bytes32[] memory hashes = new bytes32[](ops.length);\n    for (uint256 i = 0; i < ops.length; ++i) hashes[i] = _validate(ops[i]);\n    for (uint256 i = 0; i < ops.length; ++i) _execute(ops[i], hashes[i]);\n  }\n\n  /// @notice Next packed nonce for a 2D-nonce key, matching EntryPoint semantics.\n  function getNonce(uint192 key) external view returns (uint256) {\n    return (uint256(key) << NONCE_SEQ_BITS) | _nonceSeq[key];\n  }\n\n  /// @notice The userOp hash this account signs over and verifies (the same value reported as\n  ///         `userOpHash` in UserOperationEvent). Exposed under the canonical EntryPoint signature\n  ///         for bundler simulation/estimation; it is this account's own hash (see `_userOpHash`),\n  ///         not the v0.8 EIP-712 hash.\n  function getUserOpHash(PackedUserOperation calldata userOp) external view returns (bytes32) {\n    return _userOpHash(userOp);\n  }\n\n  function _validate(PackedUserOperation calldata op) private returns (bytes32 userOpHash) {\n    require(op.sender == address(this), InvalidSender(op.sender));\n    bytes4 selector = bytes4(op.callData[:SELECTOR_SIZE]);\n    require(selector == EXECUTE_SELECTOR || selector == EXECUTE_USER_OP_SELECTOR, UnsupportedSelector(selector));\n\n    // signer is the first encoded word; reading it directly avoids decoding `data` into memory here\n    // saves about 8k gas per op for large calldata\n    address signer = abi.decode(op.callData[SELECTOR_SIZE:SELECTOR_SIZE + WORD_SIZE], (address));\n    userOpHash = _userOpHash(op);\n    address recovered = ECDSA.recover(MessageHashUtils.toEthSignedMessageHash(userOpHash), op.signature);\n    require(recovered == signer, InvalidSignature(recovered, signer));\n    require(authorizedSigner[signer], UnauthorizedSigner(signer));\n\n    // TODO: We're currently using RANDOM_KEY_EVERYTIME to support multiple signers, userop reordering and userop dropping.\n    // This wastes a lot of gas, which we could save with a different nonce scheme. At least 15k per userop.\n    // Get this account released and in use to get the bigger gains from dropping the standard EntryPoint, then fix this TODO.\n    uint192 key = uint192(op.nonce >> NONCE_SEQ_BITS);\n    uint64 seq = uint64(op.nonce);\n    uint64 expected = _nonceSeq[key];\n    require(seq == expected, InvalidNonce(key, expected, seq));\n    _nonceSeq[key] = expected + 1;\n  }\n\n  /// @dev A failing op does not revert the bundle: earlier ops are already paid for, so we just\n  ///      report it via the canonical events and move on. The call is bounded by the op's signed\n  ///      `callGasLimit` so a looping/heavy op can't starve the rest of the bundle.\n  ///\n  ///      This isolation only covers reverts INSIDE the forwarded call. `_validate` checks just the\n  ///      signer word, so an op with a valid signature but malformed callData (a bogus tuple that\n  ///      makes `_decode` below revert) reverts the whole bundle. Producers are trusted to build\n  ///      well-formed callData, so this is accepted rather than guarded: an up-front full decode\n  ///      isn't justified for this self-bundled, trusted-signer setup.\n  function _execute(PackedUserOperation calldata op, bytes32 userOpHash) private {\n    (address signer, address target, uint256 value, bytes memory data) = _decode(op.callData);\n    bytes memory payload = target == erc2771Target ? abi.encodePacked(data, signer) : data;\n    // low 128 bits of accountGasLimits = callGasLimit (EntryPoint packing)\n    uint256 callGasLimit = uint128(uint256(op.accountGasLimits));\n\n    // solhint-disable-next-line avoid-low-level-calls\n    (bool success, bytes memory ret) = target.call{gas: callGasLimit, value: value}(payload);\n    if (!success && ret.length > 0) emit IEntryPoint.UserOperationRevertReason(userOpHash, op.sender, op.nonce, ret);\n    // paymaster is address(0) (none) and actualGasCost/actualGasUsed are 0: this self-bundled account\n    // does no on-chain gas accounting or reimbursement (the caller pays the tx directly).\n    emit IEntryPoint.UserOperationEvent(userOpHash, op.sender, address(0), op.nonce, success, 0, 0);\n  }\n\n  /// @dev callData == <4-byte tag> ++ abi.encode(signer, target, value, data), the format the\n  ///      producers already build. The tag is only checked against the accepted selectors (see\n  ///      _validate); it never influences the append, which is target-based.\n  function _decode(\n    bytes calldata callData\n  ) private pure returns (address signer, address target, uint256 value, bytes memory data) {\n    return abi.decode(callData[SELECTOR_SIZE:], (address, address, uint256, bytes));\n  }\n\n  /// @dev v0.7 userOpHash layout, but bound to this account's address (not the canonical\n  ///      EntryPoint) for per-deployment domain separation. Producers sign over address(this).\n  function _userOpHash(PackedUserOperation calldata op) private view returns (bytes32) {\n    bytes32 inner = keccak256(\n      abi.encode(\n        op.sender,\n        op.nonce,\n        keccak256(op.initCode),\n        keccak256(op.callData),\n        op.accountGasLimits,\n        op.preVerificationGas,\n        op.gasFees,\n        keccak256(op.paymasterAndData)\n      )\n    );\n    return keccak256(abi.encode(inner, address(this), block.chainid));\n  }\n}\n"
      }
    }
  }
}