Token

 

Overview

TokenID:
9682350841321034075043756219762990338094...

Transfers:
-

Contract:
0xe11d346757d052214686bcbc860c94363afb4a9a0xe11d346757d052214686bCbC860C94363AfB4a9A

Social Profiles:
Not Available, Update ?

TokenID: 9682350841321034075043756219762990338094...
Loading
[ Download CSV Export  ] 
Loading
Loading

Click here to update the token ICO / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
UniswapV3SingleTickLiquidityHandler

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 0 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Arbiscan.io on 2023-11-11
*/

// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0 <0.9.0;

// Interfaces

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// @return tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// @return observationIndex The index of the last oracle observation that was written,
    /// @return observationCardinality The current maximum number of observations stored in the pool,
    /// @return observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// @return feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees()
        external
        view
        returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    /// @return The liquidity at the current price of the pool
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper
    /// @return liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// @return feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// @return feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// @return tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// @return secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// @return secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// @return initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(
        int24 tick
    )
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return liquidity The amount of liquidity in the position,
    /// @return feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// @return feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// @return tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// @return tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(
        bytes32 key
    )
        external
        view
        returns (
            uint128 liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// @return tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// @return secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// @return initialized whether the observation has been initialized and the values are safe to use
    function observations(
        uint256 index
    )
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(
        uint32[] calldata secondsAgos
    )
        external
        view
        returns (
            int56[] memory tickCumulatives,
            uint160[] memory secondsPerLiquidityCumulativeX128s
        );

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(
        int24 tickLower,
        int24 tickUpper
    )
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(
        uint16 observationCardinalityNext
    ) external;
}

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

/// @title Errors emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolErrors {
    error LOK();
    error TLU();
    error TLM();
    error TUM();
    error AI();
    error M0();
    error M1();
    error AS();
    error IIA();
    error L();
    error F0();
    error F1();
}

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(
        uint8 feeProtocol0Old,
        uint8 feeProtocol1Old,
        uint8 feeProtocol0New,
        uint8 feeProtocol1New
    );

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(
        address indexed sender,
        address indexed recipient,
        uint128 amount0,
        uint128 amount1
    );
}

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolErrors,
    IUniswapV3PoolEvents
{

}

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(
        address owner,
        address spender
    ) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

/// @title Safe casting methods
/// @notice Contains methods for safely casting between types
library SafeCast {
    /// @notice Cast a uint256 to a uint160, revert on overflow
    /// @param y The uint256 to be downcasted
    /// @return z The downcasted integer, now type uint160
    function toUint160(uint256 y) internal pure returns (uint160 z) {
        require((z = uint160(y)) == y);
    }

    /// @notice Cast a int256 to a int128, revert on overflow or underflow
    /// @param y The int256 to be downcasted
    /// @return z The downcasted integer, now type int128
    function toInt128(int256 y) internal pure returns (int128 z) {
        require((z = int128(y)) == y);
    }

    /// @notice Cast a uint256 to a int256, revert on overflow
    /// @param y The uint256 to be casted
    /// @return z The casted integer, now type int256
    function toInt256(uint256 y) internal pure returns (int256 z) {
        require(y < 2 ** 255);
        z = int256(y);
    }
}

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    error T();
    error R();

    /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
    int24 internal constant MIN_TICK = -887272;
    /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
    int24 internal constant MAX_TICK = -MIN_TICK;

    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO =
        1461446703485210103287273052203988822378723970342;

    /// @notice Calculates sqrt(1.0001^tick) * 2^96
    /// @dev Throws if |tick| > max tick
    /// @param tick The input tick for the above formula
    /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
    /// at the given tick
    function getSqrtRatioAtTick(
        int24 tick
    ) internal pure returns (uint160 sqrtPriceX96) {
        unchecked {
            uint256 absTick = tick < 0
                ? uint256(-int256(tick))
                : uint256(int256(tick));
            if (absTick > uint256(int256(MAX_TICK))) revert T();

            uint256 ratio = absTick & 0x1 != 0
                ? 0xfffcb933bd6fad37aa2d162d1a594001
                : 0x100000000000000000000000000000000;
            if (absTick & 0x2 != 0)
                ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
            if (absTick & 0x4 != 0)
                ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
            if (absTick & 0x8 != 0)
                ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
            if (absTick & 0x10 != 0)
                ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
            if (absTick & 0x20 != 0)
                ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
            if (absTick & 0x40 != 0)
                ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
            if (absTick & 0x80 != 0)
                ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
            if (absTick & 0x100 != 0)
                ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
            if (absTick & 0x200 != 0)
                ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
            if (absTick & 0x400 != 0)
                ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
            if (absTick & 0x800 != 0)
                ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
            if (absTick & 0x1000 != 0)
                ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
            if (absTick & 0x2000 != 0)
                ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
            if (absTick & 0x4000 != 0)
                ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
            if (absTick & 0x8000 != 0)
                ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
            if (absTick & 0x10000 != 0)
                ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
            if (absTick & 0x20000 != 0)
                ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
            if (absTick & 0x40000 != 0)
                ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
            if (absTick & 0x80000 != 0)
                ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;

            if (tick > 0) ratio = type(uint256).max / ratio;

            // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
            // we then downcast because we know the result always fits within 160 bits due to our tick input constraint
            // we round up in the division so getTickAtSqrtRatio of the output price is always consistent
            sqrtPriceX96 = uint160(
                (ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1)
            );
        }
    }

    /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
    /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
    /// ever return.
    /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96
    /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
    function getTickAtSqrtRatio(
        uint160 sqrtPriceX96
    ) internal pure returns (int24 tick) {
        unchecked {
            // second inequality must be < because the price can never reach the price at the max tick
            if (
                !(sqrtPriceX96 >= MIN_SQRT_RATIO &&
                    sqrtPriceX96 < MAX_SQRT_RATIO)
            ) revert R();
            uint256 ratio = uint256(sqrtPriceX96) << 32;

            uint256 r = ratio;
            uint256 msb = 0;

            assembly {
                let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(5, gt(r, 0xFFFFFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(4, gt(r, 0xFFFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(3, gt(r, 0xFF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(2, gt(r, 0xF))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := shl(1, gt(r, 0x3))
                msb := or(msb, f)
                r := shr(f, r)
            }
            assembly {
                let f := gt(r, 0x1)
                msb := or(msb, f)
            }

            if (msb >= 128) r = ratio >> (msb - 127);
            else r = ratio << (127 - msb);

            int256 log_2 = (int256(msb) - 128) << 64;

            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(63, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(62, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(61, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(60, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(59, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(58, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(57, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(56, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(55, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(54, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(53, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(52, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(51, f))
                r := shr(f, r)
            }
            assembly {
                r := shr(127, mul(r, r))
                let f := shr(128, r)
                log_2 := or(log_2, shl(50, f))
            }

            int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number

            int24 tickLow = int24(
                (log_sqrt10001 - 3402992956809132418596140100660247210) >> 128
            );
            int24 tickHi = int24(
                (log_sqrt10001 + 291339464771989622907027621153398088495) >> 128
            );

            tick = tickLow == tickHi
                ? tickLow
                : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96
                ? tickHi
                : tickLow;
        }
    }
}

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

/// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3
interface ISwapRouter is IUniswapV3SwapCallback {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInputSingle(
        ExactInputSingleParams calldata params
    ) external payable returns (uint256 amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
    }

    /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
    /// @return amountOut The amount of the received token
    function exactInput(
        ExactInputParams calldata params
    ) external payable returns (uint256 amountOut);

    struct ExactOutputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
        uint160 sqrtPriceLimitX96;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another token
    /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutputSingle(
        ExactOutputSingleParams calldata params
    ) external payable returns (uint256 amountIn);

    struct ExactOutputParams {
        bytes path;
        address recipient;
        uint256 deadline;
        uint256 amountOut;
        uint256 amountInMaximum;
    }

    /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
    /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
    /// @return amountIn The amount of the input token
    function exactOutput(
        ExactOutputParams calldata params
    ) external payable returns (uint256 amountIn);
}

/// @title Immutable state
/// @notice Functions that return immutable state of the router
interface IPeripheryImmutableState {
    /// @return Returns the address of the Uniswap V3 factory
    function factory() external view returns (address);

    /// @return Returns the address of WETH9
    function WETH9() external view returns (address);
}

/// @title Immutable state
/// @notice Immutable state used by periphery contracts
abstract contract PeripheryImmutableState is IPeripheryImmutableState {
    /// @inheritdoc IPeripheryImmutableState
    address public immutable override factory;
    /// @inheritdoc IPeripheryImmutableState
    address public immutable override WETH9;

    constructor(address _factory, address _WETH9) {
        factory = _factory;
        WETH9 = _WETH9;
    }
}

/// @title Function for getting block timestamp
/// @dev Base contract that is overridden for tests
abstract contract BlockTimestamp {
    /// @dev Method that exists purely to be overridden for tests
    /// @return The current block timestamp
    function _blockTimestamp() internal view virtual returns (uint256) {
        return block.timestamp;
    }
}

abstract contract PeripheryValidation is BlockTimestamp {
    modifier checkDeadline(uint256 deadline) {
        require(_blockTimestamp() <= deadline, "Transaction too old");
        _;
    }
}

/// @title Periphery Payments
/// @notice Functions to ease deposits and withdrawals of ETH
interface IPeripheryPayments {
    /// @notice Unwraps the contract's WETH9 balance and sends it to recipient as ETH.
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
    /// @param amountMinimum The minimum amount of WETH9 to unwrap
    /// @param recipient The address receiving ETH
    function unwrapWETH9(
        uint256 amountMinimum,
        address recipient
    ) external payable;

    /// @notice Refunds any ETH balance held by this contract to the `msg.sender`
    /// @dev Useful for bundling with mint or increase liquidity that uses ether, or exact output swaps
    /// that use ether for the input amount
    function refundETH() external payable;

    /// @notice Transfers the full amount of a token held by this contract to recipient
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing the token from users
    /// @param token The contract address of the token which will be transferred to `recipient`
    /// @param amountMinimum The minimum amount of token required for a transfer
    /// @param recipient The destination address of the token
    function sweepToken(
        address token,
        uint256 amountMinimum,
        address recipient
    ) external payable;
}

/// @title Interface for WETH9
interface IWETH9 is IERC20 {
    /// @notice Deposit ether to get wrapped ether
    function deposit() external payable;

    /// @notice Withdraw wrapped ether to get ether
    function withdraw(uint256) external;
}

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(
                IERC20.transferFrom.selector,
                from,
                to,
                value
            )
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "STF"
        );
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(address token, address to, uint256 value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transfer.selector, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "ST"
        );
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(address token, address to, uint256 value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.approve.selector, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "SA"
        );
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, "STE");
    }
}

abstract contract PeripheryPayments is
    IPeripheryPayments,
    PeripheryImmutableState
{
    receive() external payable {
        require(msg.sender == WETH9, "Not WETH9");
    }

    /// @inheritdoc IPeripheryPayments
    function unwrapWETH9(
        uint256 amountMinimum,
        address recipient
    ) public payable override {
        uint256 balanceWETH9 = IWETH9(WETH9).balanceOf(address(this));
        require(balanceWETH9 >= amountMinimum, "Insufficient WETH9");

        if (balanceWETH9 > 0) {
            IWETH9(WETH9).withdraw(balanceWETH9);
            TransferHelper.safeTransferETH(recipient, balanceWETH9);
        }
    }

    /// @inheritdoc IPeripheryPayments
    function sweepToken(
        address token,
        uint256 amountMinimum,
        address recipient
    ) public payable override {
        uint256 balanceToken = IERC20(token).balanceOf(address(this));
        require(balanceToken >= amountMinimum, "Insufficient token");

        if (balanceToken > 0) {
            TransferHelper.safeTransfer(token, recipient, balanceToken);
        }
    }

    /// @inheritdoc IPeripheryPayments
    function refundETH() external payable override {
        if (address(this).balance > 0)
            TransferHelper.safeTransferETH(msg.sender, address(this).balance);
    }

    /// @param token The token to pay
    /// @param payer The entity that must pay
    /// @param recipient The entity that will receive payment
    /// @param value The amount to pay
    function pay(
        address token,
        address payer,
        address recipient,
        uint256 value
    ) internal {
        if (token == WETH9 && address(this).balance >= value) {
            // pay with WETH9
            IWETH9(WETH9).deposit{value: value}(); // wrap only what is needed to pay
            IWETH9(WETH9).transfer(recipient, value);
        } else if (payer == address(this)) {
            // pay with tokens already in the contract (for the exact input multihop case)
            TransferHelper.safeTransfer(token, recipient, value);
        } else {
            // pull payment
            TransferHelper.safeTransferFrom(token, payer, recipient, value);
        }
    }
}

/// @title Periphery Payments
/// @notice Functions to ease deposits and withdrawals of ETH
interface IPeripheryPaymentsWithFee is IPeripheryPayments {
    /// @notice Unwraps the contract's WETH9 balance and sends it to recipient as ETH, with a percentage between
    /// 0 (exclusive), and 1 (inclusive) going to feeRecipient
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
    function unwrapWETH9WithFee(
        uint256 amountMinimum,
        address recipient,
        uint256 feeBips,
        address feeRecipient
    ) external payable;

    /// @notice Transfers the full amount of a token held by this contract to recipient, with a percentage between
    /// 0 (exclusive) and 1 (inclusive) going to feeRecipient
    /// @dev The amountMinimum parameter prevents malicious contracts from stealing the token from users
    function sweepTokenWithFee(
        address token,
        uint256 amountMinimum,
        address recipient,
        uint256 feeBips,
        address feeRecipient
    ) external payable;
}

abstract contract PeripheryPaymentsWithFee is
    PeripheryPayments,
    IPeripheryPaymentsWithFee
{
    /// @inheritdoc IPeripheryPaymentsWithFee
    function unwrapWETH9WithFee(
        uint256 amountMinimum,
        address recipient,
        uint256 feeBips,
        address feeRecipient
    ) public payable override {
        require(feeBips > 0 && feeBips <= 100);

        uint256 balanceWETH9 = IWETH9(WETH9).balanceOf(address(this));
        require(balanceWETH9 >= amountMinimum, "Insufficient WETH9");

        if (balanceWETH9 > 0) {
            IWETH9(WETH9).withdraw(balanceWETH9);
            uint256 feeAmount = (balanceWETH9 * feeBips) / 10_000;
            if (feeAmount > 0)
                TransferHelper.safeTransferETH(feeRecipient, feeAmount);
            TransferHelper.safeTransferETH(recipient, balanceWETH9 - feeAmount);
        }
    }

    /// @inheritdoc IPeripheryPaymentsWithFee
    function sweepTokenWithFee(
        address token,
        uint256 amountMinimum,
        address recipient,
        uint256 feeBips,
        address feeRecipient
    ) public payable override {
        require(feeBips > 0 && feeBips <= 100);

        uint256 balanceToken = IERC20(token).balanceOf(address(this));
        require(balanceToken >= amountMinimum, "Insufficient token");

        if (balanceToken > 0) {
            uint256 feeAmount = (balanceToken * feeBips) / 10_000;
            if (feeAmount > 0)
                TransferHelper.safeTransfer(token, feeRecipient, feeAmount);
            TransferHelper.safeTransfer(
                token,
                recipient,
                balanceToken - feeAmount
            );
        }
    }
}

/// @title Multicall interface
/// @notice Enables calling multiple methods in a single call to the contract
interface IMulticall {
    /// @notice Call multiple functions in the current contract and return the data from all of them if they all succeed
    /// @dev The `msg.value` should not be trusted for any method callable from multicall.
    /// @param data The encoded function data for each of the calls to make to this contract
    /// @return results The results from each of the calls passed in via data
    function multicall(
        bytes[] calldata data
    ) external payable returns (bytes[] memory results);
}

/// @title Multicall
/// @notice Enables calling multiple methods in a single call to the contract
abstract contract Multicall is IMulticall {
    /// @inheritdoc IMulticall
    function multicall(
        bytes[] calldata data
    ) public payable override returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            (bool success, bytes memory result) = address(this).delegatecall(
                data[i]
            );

            if (!success) {
                // Next 5 lines from https://ethereum.stackexchange.com/a/83577
                if (result.length < 68) revert();
                assembly {
                    result := add(result, 0x04)
                }
                revert(abi.decode(result, (string)));
            }

            results[i] = result;
        }
    }
}

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol)

// EIP-2612 is Final as of 2022-11-01. This file is deprecated.

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

/// @title Self Permit
/// @notice Functionality to call permit on any EIP-2612-compliant token for use in the route
interface ISelfPermit {
    /// @notice Permits this contract to spend a given token from `msg.sender`
    /// @dev The `owner` is always msg.sender and the `spender` is always address(this).
    /// @param token The address of the token spent
    /// @param value The amount that can be spent of token
    /// @param deadline A timestamp, the current blocktime must be less than or equal to this timestamp
    /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s`
    /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s`
    /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v`
    function selfPermit(
        address token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable;

    /// @notice Permits this contract to spend a given token from `msg.sender`
    /// @dev The `owner` is always msg.sender and the `spender` is always address(this).
    /// Can be used instead of #selfPermit to prevent calls from failing due to a frontrun of a call to #selfPermit
    /// @param token The address of the token spent
    /// @param value The amount that can be spent of token
    /// @param deadline A timestamp, the current blocktime must be less than or equal to this timestamp
    /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s`
    /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s`
    /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v`
    function selfPermitIfNecessary(
        address token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable;

    /// @notice Permits this contract to spend the sender's tokens for permit signatures that have the `allowed` parameter
    /// @dev The `owner` is always msg.sender and the `spender` is always address(this)
    /// @param token The address of the token spent
    /// @param nonce The current nonce of the owner
    /// @param expiry The timestamp at which the permit is no longer valid
    /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s`
    /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s`
    /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v`
    function selfPermitAllowed(
        address token,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable;

    /// @notice Permits this contract to spend the sender's tokens for permit signatures that have the `allowed` parameter
    /// @dev The `owner` is always msg.sender and the `spender` is always address(this)
    /// Can be used instead of #selfPermitAllowed to prevent calls from failing due to a frontrun of a call to #selfPermitAllowed.
    /// @param token The address of the token spent
    /// @param nonce The current nonce of the owner
    /// @param expiry The timestamp at which the permit is no longer valid
    /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s`
    /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s`
    /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v`
    function selfPermitAllowedIfNecessary(
        address token,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable;
}

/// @title Interface for permit
/// @notice Interface used by DAI/CHAI for permit
interface IERC20PermitAllowed {
    /// @notice Approve the spender to spend some tokens via the holder signature
    /// @dev This is the permit interface used by DAI and CHAI
    /// @param holder The address of the token holder, the token owner
    /// @param spender The address of the token spender
    /// @param nonce The holder's nonce, increases at each call to permit
    /// @param expiry The timestamp at which the permit is no longer valid
    /// @param allowed Boolean that sets approval amount, true for type(uint256).max and false for 0
    /// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s`
    /// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s`
    /// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v`
    function permit(
        address holder,
        address spender,
        uint256 nonce,
        uint256 expiry,
        bool allowed,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

/// @title Self Permit
/// @notice Functionality to call permit on any EIP-2612-compliant token for use in the route
/// @dev These functions are expected to be embedded in multicalls to allow EOAs to approve a contract and call a function
/// that requires an approval in a single transaction.
abstract contract SelfPermit is ISelfPermit {
    /// @inheritdoc ISelfPermit
    function selfPermit(
        address token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable override {
        IERC20Permit(token).permit(
            msg.sender,
            address(this),
            value,
            deadline,
            v,
            r,
            s
        );
    }

    /// @inheritdoc ISelfPermit
    function selfPermitIfNecessary(
        address token,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable override {
        if (IERC20(token).allowance(msg.sender, address(this)) < value)
            selfPermit(token, value, deadline, v, r, s);
    }

    /// @inheritdoc ISelfPermit
    function selfPermitAllowed(
        address token,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable override {
        IERC20PermitAllowed(token).permit(
            msg.sender,
            address(this),
            nonce,
            expiry,
            true,
            v,
            r,
            s
        );
    }

    /// @inheritdoc ISelfPermit
    function selfPermitAllowedIfNecessary(
        address token,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable override {
        if (
            IERC20(token).allowance(msg.sender, address(this)) <
            type(uint256).max
        ) selfPermitAllowed(token, nonce, expiry, v, r, s);
    }
}

/*
 * @title Solidity Bytes Arrays Utils
 * @author Gonçalo Sá <[email protected]>
 *
 * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
 *      The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
 */

library BytesLib {
    function slice(
        bytes memory _bytes,
        uint256 _start,
        uint256 _length
    ) internal pure returns (bytes memory) {
        require(_length + 31 >= _length, "slice_overflow");
        require(_bytes.length >= _start + _length, "slice_outOfBounds");

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
            case 0 {
                // Get a location of some free memory and store it in tempBytes as
                // Solidity does for memory variables.
                tempBytes := mload(0x40)

                // The first word of the slice result is potentially a partial
                // word read from the original array. To read it, we calculate
                // the length of that partial word and start copying that many
                // bytes into the array. The first word we copy will start with
                // data we don't care about, but the last `lengthmod` bytes will
                // land at the beginning of the contents of the new array. When
                // we're done copying, we overwrite the full first word with
                // the actual length of the slice.
                let lengthmod := and(_length, 31)

                // The multiplication in the next line is necessary
                // because when slicing multiples of 32 bytes (lengthmod == 0)
                // the following copy loop was copying the origin's length
                // and then ending prematurely not copying everything it should.
                let mc := add(
                    add(tempBytes, lengthmod),
                    mul(0x20, iszero(lengthmod))
                )
                let end := add(mc, _length)

                for {
                    // The multiplication in the next line has the same exact purpose
                    // as the one above.
                    let cc := add(
                        add(
                            add(_bytes, lengthmod),
                            mul(0x20, iszero(lengthmod))
                        ),
                        _start
                    )
                } lt(mc, end) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    mstore(mc, mload(cc))
                }

                mstore(tempBytes, _length)

                //update free-memory pointer
                //allocating the array padded to 32 bytes like the compiler does now
                mstore(0x40, and(add(mc, 31), not(31)))
            }
            //if we want a zero-length slice let's just return a zero-length array
            default {
                tempBytes := mload(0x40)
                //zero out the 32 bytes slice we are about to return
                //we need to do it because Solidity does not garbage collect
                mstore(tempBytes, 0)

                mstore(0x40, add(tempBytes, 0x20))
            }
        }

        return tempBytes;
    }

    function toAddress(
        bytes memory _bytes,
        uint256 _start
    ) internal pure returns (address) {
        require(_bytes.length >= _start + 20, "toAddress_outOfBounds");
        address tempAddress;

        assembly {
            tempAddress := div(
                mload(add(add(_bytes, 0x20), _start)),
                0x1000000000000000000000000
            )
        }

        return tempAddress;
    }

    function toUint24(
        bytes memory _bytes,
        uint256 _start
    ) internal pure returns (uint24) {
        require(_start + 3 >= _start, "toUint24_overflow");
        require(_bytes.length >= _start + 3, "toUint24_outOfBounds");
        uint24 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x3), _start))
        }

        return tempUint;
    }
}

/// @title Functions for manipulating path data for multihop swaps
library Path {
    using BytesLib for bytes;

    /// @dev The length of the bytes encoded address
    uint256 private constant ADDR_SIZE = 20;
    /// @dev The length of the bytes encoded fee
    uint256 private constant FEE_SIZE = 3;

    /// @dev The offset of a single token address and pool fee
    uint256 private constant NEXT_OFFSET = ADDR_SIZE + FEE_SIZE;
    /// @dev The offset of an encoded pool key
    uint256 private constant POP_OFFSET = NEXT_OFFSET + ADDR_SIZE;
    /// @dev The minimum length of an encoding that contains 2 or more pools
    uint256 private constant MULTIPLE_POOLS_MIN_LENGTH =
        POP_OFFSET + NEXT_OFFSET;

    /// @notice Returns true iff the path contains two or more pools
    /// @param path The encoded swap path
    /// @return True if path contains two or more pools, otherwise false
    function hasMultiplePools(bytes memory path) internal pure returns (bool) {
        return path.length >= MULTIPLE_POOLS_MIN_LENGTH;
    }

    /// @notice Returns the number of pools in the path
    /// @param path The encoded swap path
    /// @return The number of pools in the path
    function numPools(bytes memory path) internal pure returns (uint256) {
        // Ignore the first token address. From then on every fee and token offset indicates a pool.
        return ((path.length - ADDR_SIZE) / NEXT_OFFSET);
    }

    /// @notice Decodes the first pool in path
    /// @param path The bytes encoded swap path
    /// @return tokenA The first token of the given pool
    /// @return tokenB The second token of the given pool
    /// @return fee The fee level of the pool
    function decodeFirstPool(
        bytes memory path
    ) internal pure returns (address tokenA, address tokenB, uint24 fee) {
        tokenA = path.toAddress(0);
        fee = path.toUint24(ADDR_SIZE);
        tokenB = path.toAddress(NEXT_OFFSET);
    }

    /// @notice Gets the segment corresponding to the first pool in the path
    /// @param path The bytes encoded swap path
    /// @return The segment containing all data necessary to target the first pool in the path
    function getFirstPool(
        bytes memory path
    ) internal pure returns (bytes memory) {
        return path.slice(0, POP_OFFSET);
    }

    /// @notice Skips a token + fee element from the buffer and returns the remainder
    /// @param path The swap path
    /// @return The remaining token + fee elements in the path
    function skipToken(bytes memory path) internal pure returns (bytes memory) {
        return path.slice(NEXT_OFFSET, path.length - NEXT_OFFSET);
    }
}

/// @title Provides functions for deriving a pool address from the factory, tokens, and the fee
library PoolAddress {
    bytes32 internal constant POOL_INIT_CODE_HASH =
        0xa598dd2fba360510c5a8f02f44423a4468e902df5857dbce3ca162a43a3a31ff;

    /// @notice The identifying key of the pool
    struct PoolKey {
        address token0;
        address token1;
        uint24 fee;
    }

    /// @notice Returns PoolKey: the ordered tokens with the matched fee levels
    /// @param tokenA The first token of a pool, unsorted
    /// @param tokenB The second token of a pool, unsorted
    /// @param fee The fee level of the pool
    /// @return Poolkey The pool details with ordered token0 and token1 assignments
    function getPoolKey(
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal pure returns (PoolKey memory) {
        if (tokenA > tokenB) (tokenA, tokenB) = (tokenB, tokenA);
        return PoolKey({token0: tokenA, token1: tokenB, fee: fee});
    }

    /// @notice Deterministically computes the pool address given the factory and PoolKey
    /// @param factory The Uniswap V3 factory contract address
    /// @param key The PoolKey
    /// @return pool The contract address of the V3 pool
    function computeAddress(
        address factory,
        PoolKey memory key
    ) internal pure returns (address pool) {
        require(key.token0 < key.token1);
        pool = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            factory,
                            keccak256(
                                abi.encode(key.token0, key.token1, key.fee)
                            ),
                            POOL_INIT_CODE_HASH
                        )
                    )
                )
            )
        );
    }
}

/// @notice Provides validation for callbacks from Uniswap V3 Pools
library CallbackValidation {
    /// @notice Returns the address of a valid Uniswap V3 Pool
    /// @param factory The contract address of the Uniswap V3 factory
    /// @param tokenA The contract address of either token0 or token1
    /// @param tokenB The contract address of the other token
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @return pool The V3 pool contract address
    function verifyCallback(
        address factory,
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal view returns (IUniswapV3Pool pool) {
        return
            verifyCallback(
                factory,
                PoolAddress.getPoolKey(tokenA, tokenB, fee)
            );
    }

    /// @notice Returns the address of a valid Uniswap V3 Pool
    /// @param factory The contract address of the Uniswap V3 factory
    /// @param poolKey The identifying key of the V3 pool
    /// @return pool The V3 pool contract address
    function verifyCallback(
        address factory,
        PoolAddress.PoolKey memory poolKey
    ) internal view returns (IUniswapV3Pool pool) {
        pool = IUniswapV3Pool(PoolAddress.computeAddress(factory, poolKey));
        require(msg.sender == address(pool));
    }
}

/// @title Uniswap V3 Swap Router
/// @notice Router for stateless execution of swaps against Uniswap V3
contract SwapRouter is
    ISwapRouter,
    PeripheryImmutableState,
    PeripheryValidation,
    PeripheryPaymentsWithFee,
    Multicall,
    SelfPermit
{
    using Path for bytes;
    using SafeCast for uint256;

    /// @dev Used as the placeholder value for amountInCached, because the computed amount in for an exact output swap
    /// can never actually be this value
    uint256 private constant DEFAULT_AMOUNT_IN_CACHED = type(uint256).max;

    /// @dev Transient storage variable used for returning the computed amount in for an exact output swap.
    uint256 private amountInCached = DEFAULT_AMOUNT_IN_CACHED;

    constructor(
        address _factory,
        address _WETH9
    ) PeripheryImmutableState(_factory, _WETH9) {}

    /// @dev Returns the pool for the given token pair and fee. The pool contract may or may not exist.
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) private view returns (IUniswapV3Pool) {
        return
            IUniswapV3Pool(
                PoolAddress.computeAddress(
                    factory,
                    PoolAddress.getPoolKey(tokenA, tokenB, fee)
                )
            );
    }

    struct SwapCallbackData {
        bytes path;
        address payer;
    }

    /// @inheritdoc IUniswapV3SwapCallback
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata _data
    ) external override {
        require(amount0Delta > 0 || amount1Delta > 0); // swaps entirely within 0-liquidity regions are not supported
        SwapCallbackData memory data = abi.decode(_data, (SwapCallbackData));
        (address tokenIn, address tokenOut, uint24 fee) = data
            .path
            .decodeFirstPool();
        CallbackValidation.verifyCallback(factory, tokenIn, tokenOut, fee);

        (bool isExactInput, uint256 amountToPay) = amount0Delta > 0
            ? (tokenIn < tokenOut, uint256(amount0Delta))
            : (tokenOut < tokenIn, uint256(amount1Delta));
        if (isExactInput) {
            pay(tokenIn, data.payer, msg.sender, amountToPay);
        } else {
            // either initiate the next swap or pay
            if (data.path.hasMultiplePools()) {
                data.path = data.path.skipToken();
                exactOutputInternal(amountToPay, msg.sender, 0, data);
            } else {
                amountInCached = amountToPay;
                tokenIn = tokenOut; // swap in/out because exact output swaps are reversed
                pay(tokenIn, data.payer, msg.sender, amountToPay);
            }
        }
    }

    /// @dev Performs a single exact input swap
    function exactInputInternal(
        uint256 amountIn,
        address recipient,
        uint160 sqrtPriceLimitX96,
        SwapCallbackData memory data
    ) private returns (uint256 amountOut) {
        // allow swapping to the router address with address 0
        if (recipient == address(0)) recipient = address(this);

        (address tokenIn, address tokenOut, uint24 fee) = data
            .path
            .decodeFirstPool();

        bool zeroForOne = tokenIn < tokenOut;

        (int256 amount0, int256 amount1) = getPool(tokenIn, tokenOut, fee).swap(
            recipient,
            zeroForOne,
            amountIn.toInt256(),
            sqrtPriceLimitX96 == 0
                ? (
                    zeroForOne
                        ? TickMath.MIN_SQRT_RATIO + 1
                        : TickMath.MAX_SQRT_RATIO - 1
                )
                : sqrtPriceLimitX96,
            abi.encode(data)
        );

        return uint256(-(zeroForOne ? amount1 : amount0));
    }

    /// @inheritdoc ISwapRouter
    function exactInputSingle(
        ExactInputSingleParams calldata params
    )
        external
        payable
        override
        checkDeadline(params.deadline)
        returns (uint256 amountOut)
    {
        amountOut = exactInputInternal(
            params.amountIn,
            params.recipient,
            params.sqrtPriceLimitX96,
            SwapCallbackData({
                path: abi.encodePacked(
                    params.tokenIn,
                    params.fee,
                    params.tokenOut
                ),
                payer: msg.sender
            })
        );
        require(amountOut >= params.amountOutMinimum, "Too little received");
    }

    /// @inheritdoc ISwapRouter
    function exactInput(
        ExactInputParams memory params
    )
        external
        payable
        override
        checkDeadline(params.deadline)
        returns (uint256 amountOut)
    {
        address payer = msg.sender; // msg.sender pays for the first hop

        while (true) {
            bool hasMultiplePools = params.path.hasMultiplePools();

            // the outputs of prior swaps become the inputs to subsequent ones
            params.amountIn = exactInputInternal(
                params.amountIn,
                hasMultiplePools ? address(this) : params.recipient, // for intermediate swaps, this contract custodies
                0,
                SwapCallbackData({
                    path: params.path.getFirstPool(), // only the first pool in the path is necessary
                    payer: payer
                })
            );

            // decide whether to continue or terminate
            if (hasMultiplePools) {
                payer = address(this); // at this point, the caller has paid
                params.path = params.path.skipToken();
            } else {
                amountOut = params.amountIn;
                break;
            }
        }

        require(amountOut >= params.amountOutMinimum, "Too little received");
    }

    /// @dev Performs a single exact output swap
    function exactOutputInternal(
        uint256 amountOut,
        address recipient,
        uint160 sqrtPriceLimitX96,
        SwapCallbackData memory data
    ) private returns (uint256 amountIn) {
        // allow swapping to the router address with address 0
        if (recipient == address(0)) recipient = address(this);

        (address tokenOut, address tokenIn, uint24 fee) = data
            .path
            .decodeFirstPool();

        bool zeroForOne = tokenIn < tokenOut;

        (int256 amount0Delta, int256 amount1Delta) = getPool(
            tokenIn,
            tokenOut,
            fee
        ).swap(
                recipient,
                zeroForOne,
                -amountOut.toInt256(),
                sqrtPriceLimitX96 == 0
                    ? (
                        zeroForOne
                            ? TickMath.MIN_SQRT_RATIO + 1
                            : TickMath.MAX_SQRT_RATIO - 1
                    )
                    : sqrtPriceLimitX96,
                abi.encode(data)
            );

        uint256 amountOutReceived;
        (amountIn, amountOutReceived) = zeroForOne
            ? (uint256(amount0Delta), uint256(-amount1Delta))
            : (uint256(amount1Delta), uint256(-amount0Delta));
        // it's technically possible to not receive the full output amount,
        // so if no price limit has been specified, require this possibility away
        if (sqrtPriceLimitX96 == 0) require(amountOutReceived == amountOut);
    }

    /// @inheritdoc ISwapRouter
    function exactOutputSingle(
        ExactOutputSingleParams calldata params
    )
        external
        payable
        override
        checkDeadline(params.deadline)
        returns (uint256 amountIn)
    {
        // avoid an SLOAD by using the swap return data
        amountIn = exactOutputInternal(
            params.amountOut,
            params.recipient,
            params.sqrtPriceLimitX96,
            SwapCallbackData({
                path: abi.encodePacked(
                    params.tokenOut,
                    params.fee,
                    params.tokenIn
                ),
                payer: msg.sender
            })
        );

        require(amountIn <= params.amountInMaximum, "Too much requested");
        // has to be reset even though we don't use it in the single hop case
        amountInCached = DEFAULT_AMOUNT_IN_CACHED;
    }

    /// @inheritdoc ISwapRouter
    function exactOutput(
        ExactOutputParams calldata params
    )
        external
        payable
        override
        checkDeadline(params.deadline)
        returns (uint256 amountIn)
    {
        // it's okay that the payer is fixed to msg.sender here, as they're only paying for the "final" exact output
        // swap, which happens first, and subsequent swaps are paid for within nested callback frames
        exactOutputInternal(
            params.amountOut,
            params.recipient,
            0,
            SwapCallbackData({path: params.path, payer: msg.sender})
        );

        amountIn = amountInCached;
        require(amountIn <= params.amountInMaximum, "Too much requested");
        amountInCached = DEFAULT_AMOUNT_IN_CACHED;
    }
}

interface IHandler {
    function getHandlerIdentifier(
        bytes calldata _data
    ) external view returns (uint256 handlerIdentifierId);

    function tokensToPullForMint(
        bytes calldata _mintPositionData
    ) external view returns (address[] memory tokens, uint256[] memory amounts);

    function mintPositionHandler(
        address context,
        bytes calldata _mintPositionData
    ) external returns (uint256 sharesMinted);

    function burnPositionHandler(
        address context,
        bytes calldata _burnPositionData
    ) external returns (uint256 sharesBurned);

    function usePositionHandler(
        bytes calldata _usePositionData
    )
        external
        returns (
            address[] memory tokens,
            uint256[] memory amounts,
            uint256 liquidityUsed
        );

    function tokensToPullForUnUse(
        bytes calldata _unusePositionData
    ) external view returns (address[] memory tokens, uint256[] memory amounts);

    function unusePositionHandler(
        bytes calldata _unusePositionData
    ) external returns (uint256[] memory amounts, uint256 liquidity);

    function donateToPosition(
        bytes calldata _donatePosition
    ) external returns (uint256[] memory amounts, uint256 liquidity);

    function tokensToPullForDonate(
        bytes calldata _donatePosition
    ) external view returns (address[] memory tokens, uint256[] memory amounts);
}

// Libraries

// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(
        uint256 a,
        Rounding rounding
    ) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return
                result +
                (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(
        uint256 value,
        Rounding rounding
    ) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return
                result +
                (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(
        uint256 value,
        Rounding rounding
    ) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return
                result +
                (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(
        uint256 value,
        Rounding rounding
    ) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return
                result +
                (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(
            address(this).balance >= amount,
            "Address: insufficient balance"
        );

        (bool success, ) = recipient.call{value: amount}("");
        require(
            success,
            "Address: unable to send value, recipient may have reverted"
        );
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                0,
                "Address: low-level call failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                "Address: low-level call with value failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            "Address: insufficient balance for call"
        );
        (bool success, bytes memory returndata) = target.call{value: value}(
            data
        );
        return
            verifyCallResultFromTarget(
                target,
                success,
                returndata,
                errorMessage
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data
    ) internal view returns (bytes memory) {
        return
            functionStaticCall(
                target,
                data,
                "Address: low-level static call failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return
            verifyCallResultFromTarget(
                target,
                success,
                returndata,
                errorMessage
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data
    ) internal returns (bytes memory) {
        return
            functionDelegateCall(
                target,
                data,
                "Address: low-level delegate call failed"
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return
            verifyCallResultFromTarget(
                target,
                success,
                returndata,
                errorMessage
            );
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(
        bytes memory returndata,
        string memory errorMessage
    ) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transfer.selector, to, value)
        );
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.transferFrom.selector, from, to, value)
        );
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(token.approve.selector, spender, value)
        );
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                oldAllowance + value
            )
        );
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(
                oldAllowance >= value,
                "SafeERC20: decreased allowance below zero"
            );
            _callOptionalReturn(
                token,
                abi.encodeWithSelector(
                    token.approve.selector,
                    spender,
                    oldAllowance - value
                )
            );
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        bytes memory approvalCall = abi.encodeWithSelector(
            token.approve.selector,
            spender,
            value
        );

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(
                token,
                abi.encodeWithSelector(token.approve.selector, spender, 0)
            );
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(
            nonceAfter == nonceBefore + 1,
            "SafeERC20: permit did not succeed"
        );
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(
            data,
            "SafeERC20: low-level call failed"
        );
        require(
            returndata.length == 0 || abi.decode(returndata, (bool)),
            "SafeERC20: ERC20 operation did not succeed"
        );
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(
        IERC20 token,
        bytes memory data
    ) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success &&
            (returndata.length == 0 || abi.decode(returndata, (bool))) &&
            Address.isContract(address(token));
    }
}

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = a * b
            // Compute the product mod 2**256 and mod 2**256 - 1
            // then use the Chinese Remainder Theorem to reconstruct
            // the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2**256 + prod0
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(a, b, not(0))
                prod0 := mul(a, b)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division
            if (prod1 == 0) {
                require(denominator > 0);
                assembly {
                    result := div(prod0, denominator)
                }
                return result;
            }

            // Make sure the result is less than 2**256.
            // Also prevents denominator == 0
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0]
            // Compute remainder using mulmod
            uint256 remainder;
            assembly {
                remainder := mulmod(a, b, denominator)
            }
            // Subtract 256 bit number from 512 bit number
            assembly {
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator
            // Compute largest power of two divisor of denominator.
            // Always >= 1.
            uint256 twos = (0 - denominator) & denominator;
            // Divide denominator by power of two
            assembly {
                denominator := div(denominator, twos)
            }

            // Divide [prod1 prod0] by the factors of two
            assembly {
                prod0 := div(prod0, twos)
            }
            // Shift in bits from prod1 into prod0. For this we need
            // to flip `twos` such that it is 2**256 / twos.
            // If twos is zero, then it becomes one
            assembly {
                twos := add(div(sub(0, twos), twos), 1)
            }
            prod0 |= prod1 * twos;

            // Invert denominator mod 2**256
            // Now that denominator is an odd number, it has an inverse
            // modulo 2**256 such that denominator * inv = 1 mod 2**256.
            // Compute the inverse by starting with a seed that is correct
            // correct for four bits. That is, denominator * inv = 1 mod 2**4
            uint256 inv = (3 * denominator) ^ 2;
            // Now use Newton-Raphson iteration to improve the precision.
            // Thanks to Hensel's lifting lemma, this also works in modular
            // arithmetic, doubling the correct bits in each step.
            inv *= 2 - denominator * inv; // inverse mod 2**8
            inv *= 2 - denominator * inv; // inverse mod 2**16
            inv *= 2 - denominator * inv; // inverse mod 2**32
            inv *= 2 - denominator * inv; // inverse mod 2**64
            inv *= 2 - denominator * inv; // inverse mod 2**128
            inv *= 2 - denominator * inv; // inverse mod 2**256

            // Because the division is now exact we can divide by multiplying
            // with the modular inverse of denominator. This will give us the
            // correct result modulo 2**256. Since the precoditions guarantee
            // that the outcome is less than 2**256, this is the final result.
            // We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inv;
            return result;
        }
    }

    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    function mulDivRoundingUp(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            result = mulDiv(a, b, denominator);
            if (mulmod(a, b, denominator) > 0) {
                require(result < type(uint256).max);
                result++;
            }
        }
    }
}

/// @title FixedPoint96
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
/// @dev Used in SqrtPriceMath.sol
library FixedPoint96 {
    uint8 internal constant RESOLUTION = 96;
    uint256 internal constant Q96 = 0x1000000000000000000000000;
}

/// @title Liquidity amount functions
/// @notice Provides functions for computing liquidity amounts from token amounts and prices
library LiquidityAmounts {
    /// @notice Downcasts uint256 to uint128
    /// @param x The uint258 to be downcasted
    /// @return y The passed value, downcasted to uint128
    function toUint128(uint256 x) private pure returns (uint128 y) {
        require((y = uint128(x)) == x);
    }

    /// @notice Computes the amount of liquidity received for a given amount of token0 and price range
    /// @dev Calculates amount0 * (sqrt(upper) * sqrt(lower)) / (sqrt(upper) - sqrt(lower))
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount0 The amount0 being sent in
    /// @return liquidity The amount of returned liquidity
    function getLiquidityForAmount0(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount0
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96)
            (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);
        uint256 intermediate = FullMath.mulDiv(
            sqrtRatioAX96,
            sqrtRatioBX96,
            FixedPoint96.Q96
        );
        unchecked {
            return
                toUint128(
                    FullMath.mulDiv(
                        amount0,
                        intermediate,
                        sqrtRatioBX96 - sqrtRatioAX96
                    )
                );
        }
    }

    /// @notice Computes the amount of liquidity received for a given amount of token1 and price range
    /// @dev Calculates amount1 / (sqrt(upper) - sqrt(lower)).
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount1 The amount1 being sent in
    /// @return liquidity The amount of returned liquidity
    function getLiquidityForAmount1(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount1
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96)
            (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);
        unchecked {
            return
                toUint128(
                    FullMath.mulDiv(
                        amount1,
                        FixedPoint96.Q96,
                        sqrtRatioBX96 - sqrtRatioAX96
                    )
                );
        }
    }

    /// @notice Computes the maximum amount of liquidity received for a given amount of token0, token1, the current
    /// pool prices and the prices at the tick boundaries
    /// @param sqrtRatioX96 A sqrt price representing the current pool prices
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param amount0 The amount of token0 being sent in
    /// @param amount1 The amount of token1 being sent in
    /// @return liquidity The maximum amount of liquidity received
    function getLiquidityForAmounts(
        uint160 sqrtRatioX96,
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint256 amount0,
        uint256 amount1
    ) internal pure returns (uint128 liquidity) {
        if (sqrtRatioAX96 > sqrtRatioBX96)
            (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        if (sqrtRatioX96 <= sqrtRatioAX96) {
            liquidity = getLiquidityForAmount0(
                sqrtRatioAX96,
                sqrtRatioBX96,
                amount0
            );
        } else if (sqrtRatioX96 < sqrtRatioBX96) {
            uint128 liquidity0 = getLiquidityForAmount0(
                sqrtRatioX96,
                sqrtRatioBX96,
                amount0
            );
            uint128 liquidity1 = getLiquidityForAmount1(
                sqrtRatioAX96,
                sqrtRatioX96,
                amount1
            );

            liquidity = liquidity0 < liquidity1 ? liquidity0 : liquidity1;
        } else {
            liquidity = getLiquidityForAmount1(
                sqrtRatioAX96,
                sqrtRatioBX96,
                amount1
            );
        }
    }

    /// @notice Computes the amount of token0 for a given amount of liquidity and a price range
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount0 The amount of token0
    function getAmount0ForLiquidity(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount0) {
        unchecked {
            if (sqrtRatioAX96 > sqrtRatioBX96)
                (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

            return
                FullMath.mulDiv(
                    uint256(liquidity) << FixedPoint96.RESOLUTION,
                    sqrtRatioBX96 - sqrtRatioAX96,
                    sqrtRatioBX96
                ) / sqrtRatioAX96;
        }
    }

    /// @notice Computes the amount of token1 for a given amount of liquidity and a price range
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount1 The amount of token1
    function getAmount1ForLiquidity(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount1) {
        if (sqrtRatioAX96 > sqrtRatioBX96)
            (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        unchecked {
            return
                FullMath.mulDiv(
                    liquidity,
                    sqrtRatioBX96 - sqrtRatioAX96,
                    FixedPoint96.Q96
                );
        }
    }

    /// @notice Computes the token0 and token1 value for a given amount of liquidity, the current
    /// pool prices and the prices at the tick boundaries
    /// @param sqrtRatioX96 A sqrt price representing the current pool prices
    /// @param sqrtRatioAX96 A sqrt price representing the first tick boundary
    /// @param sqrtRatioBX96 A sqrt price representing the second tick boundary
    /// @param liquidity The liquidity being valued
    /// @return amount0 The amount of token0
    /// @return amount1 The amount of token1
    function getAmountsForLiquidity(
        uint160 sqrtRatioX96,
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity
    ) internal pure returns (uint256 amount0, uint256 amount1) {
        if (sqrtRatioAX96 > sqrtRatioBX96)
            (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        if (sqrtRatioX96 <= sqrtRatioAX96) {
            amount0 = getAmount0ForLiquidity(
                sqrtRatioAX96,
                sqrtRatioBX96,
                liquidity
            );
        } else if (sqrtRatioX96 < sqrtRatioBX96) {
            amount0 = getAmount0ForLiquidity(
                sqrtRatioX96,
                sqrtRatioBX96,
                liquidity
            );
            amount1 = getAmount1ForLiquidity(
                sqrtRatioAX96,
                sqrtRatioX96,
                liquidity
            );
        } else {
            amount1 = getAmount1ForLiquidity(
                sqrtRatioAX96,
                sqrtRatioBX96,
                liquidity
            );
        }
    }
}

/// @title FixedPoint128
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
library FixedPoint128 {
    uint256 internal constant Q128 = 0x100000000000000000000000000000000;
}

// Contracts

// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)

// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(
        bytes32 indexed role,
        bytes32 indexed previousAdminRole,
        bytes32 indexed newAdminRole
    );

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(
        bytes32 indexed role,
        address indexed account,
        address indexed sender
    );

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(
        bytes32 indexed role,
        address indexed account,
        address indexed sender
    );

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(
        bytes32 role,
        address account
    ) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return
            string(
                abi.encodePacked(
                    value < 0 ? "-" : "",
                    toString(SignedMath.abs(value))
                )
            );
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(
        uint256 value,
        uint256 length
    ) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(
        string memory a,
        string memory b
    ) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override returns (bool) {
        return
            interfaceId == type(IAccessControl).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(
        bytes32 role,
        address account
    ) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(
        bytes32 role
    ) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(
        bytes32 role,
        address account
    ) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(
        bytes32 role,
        address account
    ) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(
        bytes32 role,
        address account
    ) public virtual override {
        require(
            account == _msgSender(),
            "AccessControl: can only renounce roles for self"
        );

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256 id,
        uint256 value
    );

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(
        address indexed account,
        address indexed operator,
        bool approved
    );

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(
        address account,
        uint256 id
    ) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(
        address account,
        address operator
    ) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

    // Mapping from account to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC1155).interfaceId ||
            interfaceId == type(IERC1155MetadataURI).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(
        address account,
        uint256 id
    ) public view virtual override returns (uint256) {
        require(
            account != address(0),
            "ERC1155: address zero is not a valid owner"
        );
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] memory accounts,
        uint256[] memory ids
    ) public view virtual override returns (uint256[] memory) {
        require(
            accounts.length == ids.length,
            "ERC1155: accounts and ids length mismatch"
        );

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(
        address operator,
        bool approved
    ) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(
        address account,
        address operator
    ) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(
            fromBalance >= amount,
            "ERC1155: insufficient balance for transfer"
        );
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(
            ids.length == amounts.length,
            "ERC1155: ids and amounts length mismatch"
        );
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(
                fromBalance >= amount,
                "ERC1155: insufficient balance for transfer"
            );
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(
            operator,
            from,
            to,
            ids,
            amounts,
            data
        );
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(
            operator,
            address(0),
            to,
            id,
            amount,
            data
        );
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(
            ids.length == amounts.length,
            "ERC1155: ids and amounts length mismatch"
        );

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(
            operator,
            address(0),
            to,
            ids,
            amounts,
            data
        );
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(address from, uint256 id, uint256 amount) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(
            ids.length == amounts.length,
            "ERC1155: ids and amounts length mismatch"
        );

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(
                fromBalance >= amount,
                "ERC1155: burn amount exceeds balance"
            );
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try
                IERC1155Receiver(to).onERC1155Received(
                    operator,
                    from,
                    id,
                    amount,
                    data
                )
            returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try
                IERC1155Receiver(to).onERC1155BatchReceived(
                    operator,
                    from,
                    ids,
                    amounts,
                    data
                )
            returns (bytes4 response) {
                if (
                    response != IERC1155Receiver.onERC1155BatchReceived.selector
                ) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(
        uint256 element
    ) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

// Interfaces

/// @title The interface for the Uniswap V3 Factory
/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
    /// @notice Emitted when the owner of the factory is changed
    /// @param oldOwner The owner before the owner was changed
    /// @param newOwner The owner after the owner was changed
    event OwnerChanged(address indexed oldOwner, address indexed newOwner);

    /// @notice Emitted when a pool is created
    /// @param token0 The first token of the pool by address sort order
    /// @param token1 The second token of the pool by address sort order
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks
    /// @param pool The address of the created pool
    event PoolCreated(
        address indexed token0,
        address indexed token1,
        uint24 indexed fee,
        int24 tickSpacing,
        address pool
    );

    /// @notice Emitted when a new fee amount is enabled for pool creation via the factory
    /// @param fee The enabled fee, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee
    event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);

    /// @notice Returns the current owner of the factory
    /// @dev Can be changed by the current owner via setOwner
    /// @return The address of the factory owner
    function owner() external view returns (address);

    /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
    /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context
    /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee
    /// @return The tick spacing
    function feeAmountTickSpacing(uint24 fee) external view returns (int24);

    /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
    /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
    /// @param tokenA The contract address of either token0 or token1
    /// @param tokenB The contract address of the other token
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @return pool The pool address
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external view returns (address pool);

    /// @notice Creates a pool for the given two tokens and fee
    /// @param tokenA One of the two tokens in the desired pool
    /// @param tokenB The other of the two tokens in the desired pool
    /// @param fee The desired fee for the pool
    /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved
    /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments
    /// are invalid.
    /// @return pool The address of the newly created pool
    function createPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external returns (address pool);

    /// @notice Updates the owner of the factory
    /// @dev Must be called by the current owner
    /// @param _owner The new owner of the factory
    function setOwner(address _owner) external;

    /// @notice Enables a fee amount with the given tickSpacing
    /// @dev Fee amounts may never be removed once enabled
    /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
    /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount
    function enableFeeAmount(uint24 fee, int24 tickSpacing) external;
}

/// @title Callback for IUniswapV3PoolActions#mint
/// @notice Any contract that calls IUniswapV3PoolActions#mint must implement this interface
interface IUniswapV3MintCallback {
    /// @notice Called to `msg.sender` after minting liquidity to a position from IUniswapV3Pool#mint.
    /// @dev In the implementation you must pay the pool tokens owed for the minted liquidity.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// @param amount0Owed The amount of token0 due to the pool for the minted liquidity
    /// @param amount1Owed The amount of token1 due to the pool for the minted liquidity
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#mint call
    function uniswapV3MintCallback(
        uint256 amount0Owed,
        uint256 amount1Owed,
        bytes calldata data
    ) external;
}

// Libraries

/// @title Liquidity management functions
/// @notice Internal functions for safely managing liquidity in Uniswap V3
abstract contract LiquidityManager is IUniswapV3MintCallback {
    address public immutable factory;
    bytes32 public immutable POOL_INIT_CODE_HASH;
    // bytes32 internal constant POOL_INIT_CODE_HASH =
    //     0xa598dd2fba360510c5a8f02f44423a4468e902df5857dbce3ca162a43a3a31ff;

    // bytes32 internal constant POOL_INIT_CODE_HASH =
    //     0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54;

    struct PoolKey {
        address token0;
        address token1;
        uint24 fee;
    }

    constructor(address _factory, bytes32 _pool_init_code_hash) {
        factory = _factory;
        POOL_INIT_CODE_HASH = _pool_init_code_hash;
    }

    struct MintCallbackData {
        PoolKey poolKey;
        address payer;
    }

    /// @inheritdoc IUniswapV3MintCallback
    function uniswapV3MintCallback(
        uint256 amount0Owed,
        uint256 amount1Owed,
        bytes calldata data
    ) external override {
        MintCallbackData memory decoded = abi.decode(data, (MintCallbackData));
        verifyCallback(factory, decoded.poolKey);

        if (amount0Owed > 0)
            pay(decoded.poolKey.token0, decoded.payer, msg.sender, amount0Owed);
        if (amount1Owed > 0)
            pay(decoded.poolKey.token1, decoded.payer, msg.sender, amount1Owed);
    }

    struct AddLiquidityParams {
        address token0;
        address token1;
        uint24 fee;
        address recipient;
        int24 tickLower;
        int24 tickUpper;
        uint256 amount0Desired;
        uint256 amount1Desired;
        uint256 amount0Min;
        uint256 amount1Min;
    }

    /// @notice Add liquidity to an initialized pool
    function addLiquidity(
        AddLiquidityParams memory params
    )
        public
        returns (
            uint128 liquidity,
            uint256 amount0,
            uint256 amount1,
            IUniswapV3Pool pool
        )
    {
        PoolKey memory poolKey = PoolKey({
            token0: params.token0,
            token1: params.token1,
            fee: params.fee
        });

        pool = IUniswapV3Pool(computeAddress(factory, poolKey));

        // compute the liquidity amount
        {
            (uint160 sqrtPriceX96, , , , , , ) = pool.slot0();
            uint160 sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(
                params.tickLower
            );
            uint160 sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(
                params.tickUpper
            );

            liquidity = LiquidityAmounts.getLiquidityForAmounts(
                sqrtPriceX96,
                sqrtRatioAX96,
                sqrtRatioBX96,
                params.amount0Desired,
                params.amount1Desired
            );
        }

        (amount0, amount1) = pool.mint(
            params.recipient,
            params.tickLower,
            params.tickUpper,
            liquidity,
            abi.encode(MintCallbackData({poolKey: poolKey, payer: msg.sender}))
        );
    }

    /// @param token The token to pay
    /// @param payer The entity that must pay
    /// @param recipient The entity that will receive payment
    /// @param value The amount to pay
    function pay(
        address token,
        address payer,
        address recipient,
        uint256 value
    ) internal {
        // pull payment
        if (payer == address(this)) {
            SafeERC20.safeTransfer(IERC20(token), recipient, value);
        } else {
            SafeERC20.safeTransferFrom(IERC20(token), payer, recipient, value);
        }
    }

    function getPoolKey(
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal pure returns (PoolKey memory) {
        if (tokenA > tokenB) (tokenA, tokenB) = (tokenB, tokenA);
        return PoolKey({token0: tokenA, token1: tokenB, fee: fee});
    }

    function computeAddress(
        address _factory,
        PoolKey memory key
    ) internal view returns (address pool) {
        require(key.token0 < key.token1);
        pool = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            _factory,
                            keccak256(
                                abi.encode(key.token0, key.token1, key.fee)
                            ),
                            POOL_INIT_CODE_HASH
                        )
                    )
                )
            )
        );
    }

    function verifyCallback(
        address _factory,
        address tokenA,
        address tokenB,
        uint24 fee
    ) internal view returns (IUniswapV3Pool pool) {
        return verifyCallback(_factory, getPoolKey(tokenA, tokenB, fee));
    }

    function verifyCallback(
        address _factory,
        PoolKey memory poolKey
    ) internal view returns (IUniswapV3Pool pool) {
        pool = IUniswapV3Pool(computeAddress(_factory, poolKey));
        require(msg.sender == address(pool));
    }
}

/**
 * @title UniswapV3SingleTickLiquidityHandler
 * @author 0xcarrot
 * @dev This is a handler contract for providing liquidity
 * for Uniswap V3 Style AMMs.
 */
contract UniswapV3SingleTickLiquidityHandler is
    ERC1155(""),
    IHandler,
    Pausable,
    AccessControl,
    LiquidityManager
{
    using Math for uint128;
    using TickMath for int24;
    using SafeERC20 for IERC20;

    struct TokenIdInfo {
        uint128 totalLiquidity;
        uint128 totalSupply;
        uint128 liquidityUsed;
        uint256 feeGrowthInside0LastX128;
        uint256 feeGrowthInside1LastX128;
        uint128 tokensOwed0;
        uint128 tokensOwed1;
        uint64 lastDonation;
        uint128 donatedLiquidity;
        address token0;
        address token1;
        uint24 fee;
    }

    struct MintPositionParams {
        IUniswapV3Pool pool;
        int24 tickLower;
        int24 tickUpper;
        uint128 liquidity;
    }

    struct BurnPositionParams {
        IUniswapV3Pool pool;
        int24 tickLower;
        int24 tickUpper;
        uint128 shares;
    }

    struct UsePositionParams {
        IUniswapV3Pool pool;
        int24 tickLower;
        int24 tickUpper;
        uint128 liquidityToUse;
    }

    struct UnusePositionParams {
        IUniswapV3Pool pool;
        int24 tickLower;
        int24 tickUpper;
        uint128 liquidityToUnuse;
    }

    struct DonateParams {
        IUniswapV3Pool pool;
        int24 tickLower;
        int24 tickUpper;
        uint128 liquidityToDonate;
    }

    // events
    event LogMintedPosition(
        uint256 tokenId,
        uint128 liquidityMinted,
        address pool,
        address user,
        int24 tickLower,
        int24 tickUpper
    );
    event LogBurnedPosition(
        uint256 tokenId,
        uint128 liquidityBurned,
        address pool,
        address user,
        int24 tickLower,
        int24 tickUpper
    );

    event LogFeeCompound(
        address handler,
        IUniswapV3Pool pool,
        uint256 tokenId,
        int24 tickLower,
        int24 tickUpper,
        uint128 liquidity
    );
    event LogUsePosition(uint256 tokenId, uint128 liquidityUsed);
    event LogUnusePosition(uint256 tokenId, uint128 liquidityUnused);
    event LogDonation(uint256 tokenId, uint128 liquidityDonated);
    event LogUpdateWhitelistedApp(address _app, bool _status);
    event LogUpdatedLockedBlockDuration(uint64 _newLockedBlockDuration);

    // errors
    error UniswapV3SingleTickLiquidityHandler__NotWhitelisted();
    error UniswapV3SingleTickLiquidityHandler__InRangeLP();

    mapping(uint256 => TokenIdInfo) public tokenIds;
    mapping(address => bool) public whitelistedApps;

    ISwapRouter swapRouter;

    uint64 public lockedBlockDuration = 100;
    uint64 public newLockedBlockDuration;

    bytes32 public constant PAUSER_ROLE = keccak256("P");
    bytes32 public constant SOS_ROLE = keccak256("SOS");

    // modifiers
    modifier onlyWhitelisted() {
        if (!whitelistedApps[msg.sender])
            revert UniswapV3SingleTickLiquidityHandler__NotWhitelisted();
        _;
    }

    constructor(
        address _factory,
        bytes32 _pool_init_code_hash,
        address _swapRouter
    ) LiquidityManager(_factory, _pool_init_code_hash) {
        swapRouter = ISwapRouter(_swapRouter);
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    /**
     * @notice Mints a new position for the user.
     * @param context The address of the user minting the position.
     * @param _mintPositionData The data required to mint the position.
     * @dev Only whitelisted DopexV2PositionManager can call it. It auto-compounds
     * the fees on mint. You cannot mint in range liquidity. Recommended to add liquidity
     * on a single ticks only.
     * @return sharesMinted The number of shares minted.
     */
    function mintPositionHandler(
        address context,
        bytes calldata _mintPositionData
    ) external onlyWhitelisted whenNotPaused returns (uint256 sharesMinted) {
        MintPositionParams memory _params = abi.decode(
            _mintPositionData,
            (MintPositionParams)
        );

        uint256 tokenId = uint256(
            keccak256(
                abi.encode(
                    address(this),
                    _params.pool,
                    _params.tickLower,
                    _params.tickUpper
                )
            )
        );

        TokenIdInfo storage tki = tokenIds[tokenId];

        if (tki.token0 == address(0)) {
            tki.token0 = _params.pool.token0();
            tki.token1 = _params.pool.token1();
            tki.fee = _params.pool.fee();
        }

        (uint256 amount0, uint256 amount1) = LiquidityAmounts
            .getAmountsForLiquidity(
                _getCurrentSqrtPriceX96(_params.pool),
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(_params.liquidity)
            );

        if (amount0 > 0 && amount1 > 0)
            revert UniswapV3SingleTickLiquidityHandler__InRangeLP();

        (uint128 liquidity, , , ) = addLiquidity(
            LiquidityManager.AddLiquidityParams({
                token0: tki.token0,
                token1: tki.token1,
                fee: tki.fee,
                recipient: address(this),
                tickLower: _params.tickLower,
                tickUpper: _params.tickUpper,
                amount0Desired: amount0,
                amount1Desired: amount1,
                amount0Min: amount0,
                amount1Min: amount1
            })
        );

        _feeCalculation(
            tki,
            _params.pool,
            _params.tickLower,
            _params.tickUpper
        );

        if (tki.totalSupply > 0) {
            // compound fees
            if (tki.tokensOwed0 > 0 || tki.tokensOwed1 > 0) {
                (uint256 a0, uint256 a1) = _params.pool.collect(
                    address(this),
                    _params.tickLower,
                    _params.tickUpper,
                    uint128(tki.tokensOwed0),
                    uint128(tki.tokensOwed1)
                );

                (tki.tokensOwed0, tki.tokensOwed1) = (0, 0);

                bool isAmount0 = amount0 > 0;

                uint256 amountOut;
                if (isAmount0 ? a1 > 0 : a0 > 0) {
                    IERC20(isAmount0 ? tki.token1 : tki.token0)
                        .safeIncreaseAllowance(
                            address(swapRouter),
                            isAmount0 ? a1 : a0
                        );

                    amountOut = swapRouter.exactInputSingle(
                        ISwapRouter.ExactInputSingleParams({
                            tokenIn: isAmount0 ? tki.token1 : tki.token0,
                            tokenOut: isAmount0 ? tki.token0 : tki.token1,
                            fee: tki.fee,
                            recipient: address(this),
                            deadline: block.timestamp,
                            amountIn: isAmount0 ? a1 : a0,
                            amountOutMinimum: 0,
                            sqrtPriceLimitX96: 0
                        })
                    );
                }

                (
                    uint128 liquidityFee,
                    ,
                    ,

                ) = UniswapV3SingleTickLiquidityHandler(address(this))
                        .addLiquidity(
                            LiquidityManager.AddLiquidityParams({
                                token0: tki.token0,
                                token1: tki.token1,
                                fee: tki.fee,
                                recipient: address(this),
                                tickLower: _params.tickLower,
                                tickUpper: _params.tickUpper,
                                amount0Desired: a0 +
                                    (isAmount0 ? amountOut : 0),
                                amount1Desired: a1 +
                                    (isAmount0 ? 0 : amountOut),
                                amount0Min: a0 + (isAmount0 ? amountOut : 0),
                                amount1Min: a1 + (isAmount0 ? 0 : amountOut)
                            })
                        );
                tki.totalLiquidity += liquidityFee;

                emit LogFeeCompound(
                    address(this),
                    _params.pool,
                    tokenId,
                    _params.tickLower,
                    _params.tickUpper,
                    liquidityFee
                );
            }

            uint128 shares = _convertToShares(liquidity, tokenId);

            tki.totalLiquidity += liquidity;
            tki.totalSupply += shares;

            sharesMinted = shares;
        } else {
            tki.totalLiquidity += liquidity;
            tki.totalSupply += liquidity;

            sharesMinted = liquidity;
        }

        _mint(context, tokenId, sharesMinted, "");

        emit LogMintedPosition(
            tokenId,
            liquidity,
            address(_params.pool),
            context,
            _params.tickLower,
            _params.tickUpper
        );
    }

    /**
     * @notice Burn an existing position.
     * @param context The address of the user burning the position.
     * @param _burnPositionData The data required to burn the position.
     * @dev Only whitelisted DopexV2PositionManager can call it. Users will receive the fees
     * in either token0 or token1 or both based on the fee collection.
     * @return The number of shares burned.
     */
    function burnPositionHandler(
        address context,
        bytes calldata _burnPositionData
    ) external onlyWhitelisted whenNotPaused returns (uint256) {
        BurnPositionParams memory _params = abi.decode(
            _burnPositionData,
            (BurnPositionParams)
        );

        uint256 tokenId = uint256(
            keccak256(
                abi.encode(
                    address(this),
                    _params.pool,
                    _params.tickLower,
                    _params.tickUpper
                )
            )
        );

        TokenIdInfo storage tki = tokenIds[tokenId];

        uint128 liquidityToBurn = _convertToAssets(_params.shares, tokenId);

        (uint256 amount0, uint256 amount1) = _params.pool.burn(
            _params.tickLower,
            _params.tickUpper,
            liquidityToBurn
        );

        _feeCalculation(
            tki,
            _params.pool,
            _params.tickLower,
            _params.tickUpper
        );

        uint128 feesOwedToken0;
        uint128 feesOwedToken1;

        {
            uint256 userLiquidity0 = LiquidityAmounts.getAmount0ForLiquidity(
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(liquidityToBurn)
            );

            uint256 userLiquidity1 = LiquidityAmounts.getAmount1ForLiquidity(
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(liquidityToBurn)
            );

            uint256 totalLiquidity0 = LiquidityAmounts.getAmount0ForLiquidity(
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(tki.totalLiquidity)
            );

            uint256 totalLiquidity1 = LiquidityAmounts.getAmount1ForLiquidity(
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(tki.totalLiquidity)
            );

            feesOwedToken0 = uint128(
                (tki.tokensOwed0 * userLiquidity0) / totalLiquidity0
            );
            feesOwedToken1 = uint128(
                (tki.tokensOwed1 * userLiquidity1) / totalLiquidity1
            );
        }

        tki.tokensOwed0 -= feesOwedToken0;
        tki.tokensOwed1 -= feesOwedToken1;

        _params.pool.collect(
            context,
            _params.tickLower,
            _params.tickUpper,
            uint128(amount0 + feesOwedToken0),
            uint128(amount1 + feesOwedToken1)
        );

        tki.totalLiquidity -= liquidityToBurn;
        tki.totalSupply -= _params.shares;

        _burn(context, tokenId, _params.shares);

        emit LogBurnedPosition(
            tokenId,
            liquidityToBurn,
            address(_params.pool),
            context,
            _params.tickLower,
            _params.tickUpper
        );
        return (_params.shares);
    }

    /**
     * @notice Use an existing position.
     * @param _usePositionHandler The data required to use the position.
     * @dev Only whitelisted DopexV2PositionManager can call it.
     * @return tokens The addresses of the tokens that were unwrapped.
     * @return amounts The amounts of the tokens that were unwrapped.
     * @return liquidityUsed The amount of liquidity that was used.
     */
    function usePositionHandler(
        bytes calldata _usePositionHandler
    )
        external
        onlyWhitelisted
        whenNotPaused
        returns (address[] memory, uint256[] memory, uint256)
    {
        UsePositionParams memory _params = abi.decode(
            _usePositionHandler,
            (UsePositionParams)
        );
        uint256 tokenId = uint256(
            keccak256(
                abi.encode(
                    address(this),
                    _params.pool,
                    _params.tickLower,
                    _params.tickUpper
                )
            )
        );

        TokenIdInfo storage tki = tokenIds[tokenId];

        (uint256 amount0, uint256 amount1) = _params.pool.burn(
            _params.tickLower,
            _params.tickUpper,
            uint128(_params.liquidityToUse)
        );

        _params.pool.collect(
            msg.sender,
            _params.tickLower,
            _params.tickUpper,
            uint128(amount0),
            uint128(amount1)
        );

        _feeCalculation(
            tki,
            _params.pool,
            _params.tickLower,
            _params.tickUpper
        );

        tki.liquidityUsed += _params.liquidityToUse;

        address[] memory tokens = new address[](2);
        tokens[0] = tki.token0;
        tokens[1] = tki.token1;

        uint256[] memory amounts = new uint256[](2);
        amounts[0] = amount0;
        amounts[1] = amount1;

        emit LogUsePosition(tokenId, _params.liquidityToUse);
        return (tokens, amounts, _params.liquidityToUse);
    }

    /**
     * @notice Unuse a portion of an existing position.
     * @param _unusePositionData The data required to unuse the position.
     * @dev Only whitelisted DopexV2PositionManager can call it.
     * @return amounts The amounts of the tokens that were wrapped.
     * @return liquidityUnused The amount of liquidity that was unused.
     */
    function unusePositionHandler(
        bytes calldata _unusePositionData
    )
        external
        onlyWhitelisted
        whenNotPaused
        returns (uint256[] memory, uint256)
    {
        UnusePositionParams memory _params = abi.decode(
            _unusePositionData,
            (UnusePositionParams)
        );

        uint256 tokenId = uint256(
            keccak256(
                abi.encode(
                    address(this),
                    _params.pool,
                    _params.tickLower,
                    _params.tickUpper
                )
            )
        );

        TokenIdInfo storage tki = tokenIds[tokenId];

        (uint256 amount0, uint256 amount1) = LiquidityAmounts
            .getAmountsForLiquidity(
                _getCurrentSqrtPriceX96(_params.pool),
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(_params.liquidityToUnuse)
            );

        (uint128 liquidity, , , ) = addLiquidity(
            LiquidityManager.AddLiquidityParams({
                token0: tki.token0,
                token1: tki.token1,
                fee: tki.fee,
                recipient: address(this),
                tickLower: _params.tickLower,
                tickUpper: _params.tickUpper,
                amount0Desired: amount0,
                amount1Desired: amount1,
                amount0Min: amount0,
                amount1Min: amount1
            })
        );

        _feeCalculation(
            tki,
            _params.pool,
            _params.tickLower,
            _params.tickUpper
        );

        if (tki.liquidityUsed >= liquidity) {
            tki.liquidityUsed -= liquidity;
        } else {
            tki.totalLiquidity += (liquidity - tki.liquidityUsed);
            tki.liquidityUsed = 0;
        }

        uint256[] memory amounts = new uint256[](2);
        amounts[0] = amount0;
        amounts[1] = amount1;

        emit LogUnusePosition(tokenId, liquidity);
        return (amounts, uint256(liquidity));
    }

    /**
     * @notice Donate liquidity to an existing position.
     * @param _donateData The data required to donate liquidity to the position.
     * @dev Only whitelisted DopexV2PositionManager can call it.
     * @return amounts The amounts of the tokens that were donated.
     * @return liquidityDonated The amount of liquidity that was donated.
     */
    function donateToPosition(
        bytes calldata _donateData
    )
        external
        onlyWhitelisted
        whenNotPaused
        returns (uint256[] memory, uint256)
    {
        DonateParams memory _params = abi.decode(_donateData, (DonateParams));

        uint256 tokenId = uint256(
            keccak256(
                abi.encode(
                    address(this),
                    _params.pool,
                    _params.tickLower,
                    _params.tickUpper
                )
            )
        );

        TokenIdInfo storage tki = tokenIds[tokenId];

        (uint256 amount0, uint256 amount1) = LiquidityAmounts
            .getAmountsForLiquidity(
                _getCurrentSqrtPriceX96(_params.pool),
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(_params.liquidityToDonate)
            );

        (uint128 liquidity, , , ) = addLiquidity(
            LiquidityManager.AddLiquidityParams({
                token0: tki.token0,
                token1: tki.token1,
                fee: tki.fee,
                recipient: address(this),
                tickLower: _params.tickLower,
                tickUpper: _params.tickUpper,
                amount0Desired: amount0,
                amount1Desired: amount1,
                amount0Min: amount0,
                amount1Min: amount1
            })
        );

        _feeCalculation(
            tki,
            _params.pool,
            _params.tickLower,
            _params.tickUpper
        );

        tki.totalLiquidity += liquidity;

        // can it overflow?
        tki.donatedLiquidity = _donationLocked(tokenId) + liquidity;

        tki.lastDonation = uint64(block.number);

        if (newLockedBlockDuration != 0) {
            lockedBlockDuration = newLockedBlockDuration;
            newLockedBlockDuration = 0;
        }

        uint256[] memory amounts = new uint256[](2);
        amounts[0] = amount0;
        amounts[1] = amount1;

        emit LogDonation(tokenId, liquidity);
        return (amounts, liquidity);
    }

    /**
     * @notice Calculates the fees owed to the position.
     * @param _tki The TokenIdInfo struct for the position.
     * @param _pool The UniswapV3Pool contract.
     * @param _tickLower The lower tick of the position.
     * @param _tickUpper The upper tick of the position.
     */
    function _feeCalculation(
        TokenIdInfo storage _tki,
        IUniswapV3Pool _pool,
        int24 _tickLower,
        int24 _tickUpper
    ) internal {
        bytes32 positionKey = _computePositionKey(
            address(this),
            _tickLower,
            _tickUpper
        );
        (
            ,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            ,

        ) = _pool.positions(positionKey);
        unchecked {
            _tki.tokensOwed0 += uint128(
                FullMath.mulDiv(
                    feeGrowthInside0LastX128 - _tki.feeGrowthInside0LastX128,
                    _tki.totalLiquidity - _tki.liquidityUsed,
                    FixedPoint128.Q128
                )
            );
            _tki.tokensOwed1 += uint128(
                FullMath.mulDiv(
                    feeGrowthInside1LastX128 - _tki.feeGrowthInside1LastX128,
                    _tki.totalLiquidity - _tki.liquidityUsed,
                    FixedPoint128.Q128
                )
            );

            _tki.feeGrowthInside0LastX128 = feeGrowthInside0LastX128;
            _tki.feeGrowthInside1LastX128 = feeGrowthInside1LastX128;
        }
    }

    /**
     * @notice Calculates the handler identifier for a position.
     * @param _data The encoded position data.
     * @return handlerIdentifierId The handler identifier for the position.
     */
    function getHandlerIdentifier(
        bytes calldata _data
    ) external view returns (uint256 handlerIdentifierId) {
        (IUniswapV3Pool pool, int24 tickLower, int24 tickUpper) = abi.decode(
            _data,
            (IUniswapV3Pool, int24, int24)
        );

        return
            uint256(
                keccak256(abi.encode(address(this), pool, tickLower, tickUpper))
            );
    }

    /**
     * @notice Calculates the amount of tokens that need to be pulled for a mint position.
     * @param _mintPositionData The encoded mint position data.
     * @return tokens The tokens that need to be pulled.
     * @return amounts The amount of each token that needs to be pulled.
     */
    function tokensToPullForMint(
        bytes calldata _mintPositionData
    ) external view returns (address[] memory, uint256[] memory) {
        MintPositionParams memory _params = abi.decode(
            _mintPositionData,
            (MintPositionParams)
        );

        (uint256 amount0, uint256 amount1) = LiquidityAmounts
            .getAmountsForLiquidity(
                _getCurrentSqrtPriceX96(_params.pool),
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(_params.liquidity)
            );

        address[] memory tokens = new address[](2);
        tokens[0] = _params.pool.token0();
        tokens[1] = _params.pool.token1();

        uint256[] memory amounts = new uint256[](2);
        amounts[0] = amount0;
        amounts[1] = amount1;

        return (tokens, amounts);
    }

    /**
     * @notice Calculates the amount of tokens that need to be pulled for an unuse position.
     * @param _unusePositionData The encoded unuse position data.
     * @return tokens The tokens that need to be pulled.
     * @return amounts The amount of each token that needs to be pulled.
     */
    function tokensToPullForUnUse(
        bytes calldata _unusePositionData
    ) external view returns (address[] memory, uint256[] memory) {
        UnusePositionParams memory _params = abi.decode(
            _unusePositionData,
            (UnusePositionParams)
        );

        (uint256 amount0, uint256 amount1) = LiquidityAmounts
            .getAmountsForLiquidity(
                _getCurrentSqrtPriceX96(_params.pool),
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(_params.liquidityToUnuse)
            );

        address[] memory tokens = new address[](2);
        tokens[0] = _params.pool.token0();
        tokens[1] = _params.pool.token1();

        uint256[] memory amounts = new uint256[](2);
        amounts[0] = amount0;
        amounts[1] = amount1;

        return (tokens, amounts);
    }

    /**
     * @notice Calculates the amount of tokens that need to be pulled for a donate position.
     * @param _donatePosition The encoded donate position data.
     * @return tokens The tokens that need *
     */
    function tokensToPullForDonate(
        bytes calldata _donatePosition
    ) external view returns (address[] memory, uint256[] memory) {
        DonateParams memory _params = abi.decode(
            _donatePosition,
            (DonateParams)
        );

        (uint256 amount0, uint256 amount1) = LiquidityAmounts
            .getAmountsForLiquidity(
                _getCurrentSqrtPriceX96(_params.pool),
                _params.tickLower.getSqrtRatioAtTick(),
                _params.tickUpper.getSqrtRatioAtTick(),
                uint128(_params.liquidityToDonate)
            );

        address[] memory tokens = new address[](2);
        tokens[0] = _params.pool.token0();
        tokens[1] = _params.pool.token1();

        uint256[] memory amounts = new uint256[](2);
        amounts[0] = amount0;
        amounts[1] = amount1;

        return (tokens, amounts);
    }

    /**
     * @notice Calculates the amount of donated liquidity that is locked.
     * @param tokenId The tokenId of the position.
     * @return donationLocked The amount of donated liquidity that is locked.
     */
    function _donationLocked(uint256 tokenId) internal view returns (uint128) {
        TokenIdInfo memory tki = tokenIds[tokenId];

        if (block.number >= tki.lastDonation + lockedBlockDuration) return 0;

        uint128 donationLocked = tki.donatedLiquidity -
            (tki.donatedLiquidity * (uint64(block.number) - tki.lastDonation)) /
            lockedBlockDuration;

        return donationLocked;
    }

    /**
     * @notice Converts an amount of assets to shares.
     * @param assets The amount of assets.
     * @param tokenId The tokenId of the position.
     * @return shares The number of shares.
     */
    function convertToShares(
        uint128 assets,
        uint256 tokenId
    ) external view returns (uint128) {
        return _convertToShares(assets, tokenId);
    }

    /**
     * @notice Converts an amount of shares to assets.
     * @param shares The number of shares.
     * @param tokenId The tokenId of the position.
     * @return assets The amount of assets.
     */
    function convertToAssets(
        uint128 shares,
        uint256 tokenId
    ) external view returns (uint128) {
        return _convertToAssets(shares, tokenId);
    }

    /**
     * @notice Converts an amount of assets to shares.
     * @param assets The amount of assets.
     * @param tokenId The tokenId of the position.
     * @return shares The number of shares.
     */
    function _convertToShares(
        uint128 assets,
        uint256 tokenId
    ) internal view returns (uint128) {
        return
            uint128(
                assets.mulDiv(
                    tokenIds[tokenId].totalSupply,
                    (tokenIds[tokenId].totalLiquidity + 1) -
                        _donationLocked(tokenId),
                    Math.Rounding.Down
                )
            );
    }

    /**
     * @notice Converts an amount of shares to assets.
     * @param shares The number of shares.
     * @param tokenId The tokenId of the position.
     * @return assets The amount of assets.
     */
    function _convertToAssets(
        uint128 shares,
        uint256 tokenId
    ) internal view returns (uint128) {
        return
            uint128(
                shares.mulDiv(
                    (tokenIds[tokenId].totalLiquidity + 1) -
                        _donationLocked(tokenId),
                    tokenIds[tokenId].totalSupply,
                    Math.Rounding.Up
                )
            );
    }

    /**
     * @notice Gets the current sqrtPriceX96 of the given UniswapV3Pool.
     * @param pool The UniswapV3Pool to get the sqrtPriceX96 from.
     * @return sqrtPriceX96 The current sqrtPriceX96 of the given UniswapV3Pool.
     */
    function _getCurrentSqrtPriceX96(
        IUniswapV3Pool pool
    ) internal view returns (uint160 sqrtPriceX96) {
        (sqrtPriceX96, , , , , , ) = pool.slot0();
    }

    /**
     * @notice Computes the position key for the given owner, tickLower, and tickUpper.
     * @param owner The owner of the position.
     * @param tickLower The lower tick of the position.
     * @param tickUpper The upper tick of the position.
     * @return positionKey The position key for the given owner, tickLower, and tickUpper.
     */
    function _computePositionKey(
        address owner,
        int24 tickLower,
        int24 tickUpper
    ) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(owner, tickLower, tickUpper));
    }

    // admin functions
    /**
     * @notice Updates the whitelist status of the given app.
     * @param _app The app to update the whitelist status of.
     * @param _status The new whitelist status of the app.
     */
    function updateWhitelistedApps(
        address _app,
        bool _status
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        whitelistedApps[_app] = _status;
        emit LogUpdateWhitelistedApp(_app, _status);
    }

    /**
     * @notice Updates the locked block duration.
     * @param _newLockedBlockDuration The new locked block duration.
     */
    function updateLockedBlockDuration(
        uint64 _newLockedBlockDuration
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        newLockedBlockDuration = _newLockedBlockDuration;
        emit LogUpdatedLockedBlockDuration(_newLockedBlockDuration);
    }

    // SOS admin functions

    /**
     * @notice Forcefully withdraws UniswapV3 liquidity from the given position.
     * @param pool The UniswapV3Pool to withdraw liquidity from.
     * @param tickLower The lower tick of the position to withdraw liquidity from.
     * @param tickUpper The upper tick of the position to withdraw liquidity from.
     * @param liquidity The amount of liquidity to withdraw.
     */
    function forceWithdrawUniswapV3Liquidity(
        IUniswapV3Pool pool,
        int24 tickLower,
        int24 tickUpper,
        uint128 liquidity
    ) external onlyRole(SOS_ROLE) {
        pool.burn(tickLower, tickUpper, liquidity);
        (, , , uint128 t0, uint128 t1) = pool.positions(
            _computePositionKey(address(this), tickLower, tickUpper)
        );
        pool.collect(msg.sender, tickLower, tickUpper, t0, t1);
    }

    /**
     * @notice Emergency withdraws the given token from the contract.
     * @param token The token to withdraw.
     */
    function emergencyWithdraw(address token) external onlyRole(SOS_ROLE) {
        IERC20(token).transfer(
            msg.sender,
            IERC20(token).balanceOf(address(this))
        );
    }

    /**
     * @notice Emergency pauses the contract.
     */
    function emergencyPause() external onlyRole(PAUSER_ROLE) {
        _pause();
    }

    /**
     * @notice Emergency unpauses the contract.
     */
    function emergencyUnpause() external onlyRole(PAUSER_ROLE) {
        _unpause();
    }

    /**
     * @notice Interface Support
     * @param interfaceId The Id of the interface
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view override(ERC1155, AccessControl) returns (bool) {
        return super.supportsInterface(interfaceId);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"bytes32","name":"_pool_init_code_hash","type":"bytes32"},{"internalType":"address","name":"_swapRouter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"T","type":"error"},{"inputs":[],"name":"UniswapV3SingleTickLiquidityHandler__InRangeLP","type":"error"},{"inputs":[],"name":"UniswapV3SingleTickLiquidityHandler__NotWhitelisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidityBurned","type":"uint128"},{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":false,"internalType":"int24","name":"tickUpper","type":"int24"}],"name":"LogBurnedPosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidityDonated","type":"uint128"}],"name":"LogDonation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"handler","type":"address"},{"indexed":false,"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":false,"internalType":"int24","name":"tickUpper","type":"int24"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"}],"name":"LogFeeCompound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidityMinted","type":"uint128"},{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":false,"internalType":"int24","name":"tickUpper","type":"int24"}],"name":"LogMintedPosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidityUnused","type":"uint128"}],"name":"LogUnusePosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_app","type":"address"},{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"LogUpdateWhitelistedApp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"_newLockedBlockDuration","type":"uint64"}],"name":"LogUpdatedLockedBlockDuration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint128","name":"liquidityUsed","type":"uint128"}],"name":"LogUsePosition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL_INIT_CODE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SOS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint256","name":"amount0Desired","type":"uint256"},{"internalType":"uint256","name":"amount1Desired","type":"uint256"},{"internalType":"uint256","name":"amount0Min","type":"uint256"},{"internalType":"uint256","name":"amount1Min","type":"uint256"}],"internalType":"struct LiquidityManager.AddLiquidityParams","name":"params","type":"tuple"}],"name":"addLiquidity","outputs":[{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"context","type":"address"},{"internalType":"bytes","name":"_burnPositionData","type":"bytes"}],"name":"burnPositionHandler","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"shares","type":"uint128"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"assets","type":"uint128"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_donateData","type":"bytes"}],"name":"donateToPosition","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyUnpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV3Pool","name":"pool","type":"address"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"liquidity","type":"uint128"}],"name":"forceWithdrawUniswapV3Liquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"getHandlerIdentifier","outputs":[{"internalType":"uint256","name":"handlerIdentifierId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedBlockDuration","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"context","type":"address"},{"internalType":"bytes","name":"_mintPositionData","type":"bytes"}],"name":"mintPositionHandler","outputs":[{"internalType":"uint256","name":"sharesMinted","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"newLockedBlockDuration","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIds","outputs":[{"internalType":"uint128","name":"totalLiquidity","type":"uint128"},{"internalType":"uint128","name":"totalSupply","type":"uint128"},{"internalType":"uint128","name":"liquidityUsed","type":"uint128"},{"internalType":"uint256","name":"feeGrowthInside0LastX128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthInside1LastX128","type":"uint256"},{"internalType":"uint128","name":"tokensOwed0","type":"uint128"},{"internalType":"uint128","name":"tokensOwed1","type":"uint128"},{"internalType":"uint64","name":"lastDonation","type":"uint64"},{"internalType":"uint128","name":"donatedLiquidity","type":"uint128"},{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_donatePosition","type":"bytes"}],"name":"tokensToPullForDonate","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_mintPositionData","type":"bytes"}],"name":"tokensToPullForMint","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_unusePositionData","type":"bytes"}],"name":"tokensToPullForUnUse","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount0Owed","type":"uint256"},{"internalType":"uint256","name":"amount1Owed","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"uniswapV3MintCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_unusePositionData","type":"bytes"}],"name":"unusePositionHandler","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_newLockedBlockDuration","type":"uint64"}],"name":"updateLockedBlockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_app","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateWhitelistedApps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_usePositionHandler","type":"bytes"}],"name":"usePositionHandler","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedApps","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60c060405260078054600160a01b600160e01b031916601960a21b1790553480156200002a57600080fd5b506040516200619c3803806200619c8339810160408190526200004d9162000195565b8282604051806020016040528060008152506200007081620000b960201b60201c565b506003805460ff191690556001600160a01b0391821660805260a052600780546001600160a01b031916918316919091179055620000b0600033620000cb565b50505062000347565b6002620000c782826200027b565b5050565b60008281526004602090815260408083206001600160a01b0385168452909152902054620000c7908390839060ff16620000c75760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001343390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200019057600080fd5b919050565b600080600060608486031215620001ab57600080fd5b620001b68462000178565b925060208401519150620001cd6040850162000178565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200020157607f821691505b6020821081036200022257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200027657600081815260208120601f850160051c81016020861015620002515750805b601f850160051c820191505b8181101562000272578281556001016200025d565b5050505b505050565b81516001600160401b03811115620002975762000297620001d6565b620002af81620002a88454620001ec565b8462000228565b602080601f831160018114620002e75760008415620002ce5750858301515b600019600386901b1c1916600185901b17855562000272565b600085815260208120601f198616915b828110156200031857888601518255948401946001909101908401620002f7565b5085821015620003375787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a051615e1a62000382600039600081816105f50152613b780152600081816104ce0152818161243101526129fe0152615e1a6000f3fe608060405234801561001057600080fd5b50600436106101ed5760003560e01c8062fdd58e146101f257806301ffc9a7146102185780630c774f4a1461023b5780630e89341c146102625780631575e94814610282578063248a9ca31461029557806328daa117146102a85780632b4d93ea146102d35780632eb2c2d6146102f45780632f2ff15d1461030957806336568abe1461031c5780634a4e3bd51461032f5780634d0b1de3146103375780634e1273f41461034a57806351858e271461036a5780635b94b748146103725780635c975abb1461038557806363f558c8146103905780636ff1c9bc146103a3578063742b5fdd146103b65780637b3fd965146103d75780637da68a65146103ea5780638cf69998146103fd57806391d14854146104205780639981bb9b14610433578063a217fddf14610479578063a22cb46514610481578063b220e47014610494578063b8ea4a84146103b6578063bdb76955146104b6578063c45a0155146104c9578063ca83cb22146104fd578063d348799714610510578063d547741f14610523578063d58778d614610536578063dc6fd8ab146105f0578063e0f19adf146103b6578063e63ab1e914610617578063e985e9c51461062c578063ec944b6d14610668578063f242432a1461067b578063f7239fca1461068e575b600080fd5b61020561020036600461493b565b6106a3565b6040519081526020015b60405180910390f35b61022b61022636600461497d565b61073c565b604051901515815260200161020f565b60075461025590600160a01b90046001600160401b031681565b60405161020f919061499a565b6102756102703660046149ae565b610747565b60405161020f9190614a1f565b610205610290366004614a73565b6107db565b6102056102a33660046149ae565b610c91565b6102bb6102b6366004614adc565b610ca6565b6040516001600160801b03909116815260200161020f565b6102e66102e1366004614afa565b610cb2565b60405161020f929190614b76565b610307610302366004614d0a565b610faf565b005b610307610317366004614db7565b610ffb565b61030761032a366004614db7565b61101c565b61030761109a565b6102e6610345366004614afa565b6110bd565b61035d610358366004614de7565b61137e565b60405161020f9190614eb3565b6103076114a7565b610307610380366004614ee0565b6114c7565b60035460ff1661022b565b61020561039e366004614afa565b611658565b6103076103b1366004614f3c565b6116a8565b6103c96103c4366004614afa565b611797565b60405161020f929190614f9f565b6102056103e5366004614a73565b6119a9565b6102bb6103f8366004614adc565b6123ad565b61022b61040b366004614f3c565b60066020526000908152604090205460ff1681565b61022b61042e366004614db7565b6123b9565b610446610441366004614fe0565b6123e4565b604080516001600160801b0390951685526020850193909352918301526001600160a01b0316606082015260800161020f565b610205600081565b61030761048f36600461509c565b612607565b6104a76104a2366004614afa565b612612565b60405161020f939291906150ca565b6103076104c4366004615100565b612987565b6104f07f000000000000000000000000000000000000000000000000000000000000000081565b60405161020f9190615129565b600854610255906001600160401b031681565b61030761051e36600461513d565b6129e9565b610307610531366004614db7565b612a60565b6105d86105443660046149ae565b6005602081905260009182526040909120805460018201546002830154600384015460048501549585015460068601546007909601546001600160801b0380871698600160801b9788900482169896821697959694958282169591048216936001600160401b03811693600160401b909104909216916001600160a01b0391821691811690600160a01b900462ffffff168c565b60405161020f9c9b9a9998979695949392919061518f565b6102057f000000000000000000000000000000000000000000000000000000000000000081565b610205600080516020615da583398151915281565b61022b61063a366004615221565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61030761067636600461509c565b612a7c565b61030761068936600461524f565b612aeb565b610205600080516020615dc583398151915281565b60006001600160a01b0383166107135760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061073682612b30565b606060028054610756906152b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610782906152b7565b80156107cf5780601f106107a4576101008083540402835291602001916107cf565b820191906000526020600020905b8154815290600101906020018083116107b257829003601f168201915b50505050509050919050565b3360009081526006602052604081205460ff1661080b5760405163acaf6b0f60e01b815260040160405180910390fd5b610813612b55565b600061082183850185615379565b90506000308260000151836020015184604001516040516020016108489493929190615395565b60408051601f19818403018152918152815160209283012060008181526005909352908220606085015191935091906108819084612b9d565b84516020860151604080880151905163a34123a760e01b815293945060009384936001600160a01b03169263a34123a7926108c09288906004016153c4565b60408051808303816000875af11580156108de573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090291906153ea565b9150915061091e84876000015188602001518960400151612c05565b600080600061094c6109368a6020015160020b612d46565b6109468b6040015160020b612d46565b8861305e565b905060006109796109638b6020015160020b612d46565b6109738c6040015160020b612d46565b896130cd565b905060006109b06109908c6020015160020b612d46565b6109a08d6040015160020b612d46565b8b546001600160801b031661305e565b905060006109e76109c78d6020015160020b612d46565b6109d78e6040015160020b612d46565b8c546001600160801b03166130cd565b60048b01549091508290610a059086906001600160801b0316615424565b610a0f9190615459565b60048b01549096508190610a34908590600160801b90046001600160801b0316615424565b610a3e9190615459565b60048b018054919650879550935060009250610a65915084906001600160801b031661546d565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550808660040160108282829054906101000a90046001600160801b0316610aaf919061546d565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555087600001516001600160a01b0316634f1eb3d88d8a602001518b60400151866001600160801b031689610b069190615495565b610b196001600160801b0388168a615495565b6040518663ffffffff1660e01b8152600401610b399594939291906154ad565b60408051808303816000875af1158015610b57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7b91906154ea565b5050855485908790600090610b9a9084906001600160801b031661546d565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555087606001518660000160108282829054906101000a90046001600160801b0316610be8919061546d565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610c248c888a606001516001600160801b0316613118565b7f2d671af43b1498ab3a886911d347788afef173fbbc14c4ad8421f0de25906a6787868a600001518f8c602001518d60400151604051610c6996959493929190615519565b60405180910390a187606001516001600160801b0316985050505050505050505b9392505050565b60009081526004602052604090206001015490565b6000610c8a8383612b9d565b336000908152600660205260408120546060919060ff16610ce65760405163acaf6b0f60e01b815260040160405180910390fd5b610cee612b55565b6000610cfc84860186615379565b9050600030826000015183602001518460400151604051602001610d239493929190615395565b60408051601f19818403018152918152815160209283012060008181526005909352908220845191935091908190610d8890610d5e90613287565b610d6e876020015160020b612d46565b610d7e886040015160020b612d46565b88606001516132f8565b604080516101408101825260068701546001600160a01b0390811682526007880154908116602080840191909152600160a01b90910462ffffff1682840152306060830152890151600290810b60808301529189015190910b60a082015260c0810183905260e08101829052610100810183905261012081018290529193509150600090610e15906123e4565b5050509050610e3284876000015188602001518960400151612c05565b60018401546001600160801b03808316911610610e9257600184018054829190600090610e699084906001600160801b031661546d565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610efb565b6001840154610eaa906001600160801b03168261546d565b84548590600090610ec59084906001600160801b031661555a565b82546001600160801b039182166101009390930a9283029190920219909116179055506001840180546001600160801b03191690555b6040805160028082526060820183526000926020830190803683370190505090508381600081518110610f3057610f30615585565b6020026020010181815250508281600181518110610f5057610f50615585565b6020026020010181815250507f64d8efec9e37db387b761d25cf5596ba293cd64d72fbcd86d7bb43b14c3bfaa88683604051610f8d92919061559b565b60405180910390a197506001600160801b0316955050505050505b9250929050565b6001600160a01b038516331480610fcb5750610fcb853361063a565b610fe75760405162461bcd60e51b815260040161070a906155b2565b610ff48585858585613394565b5050505050565b61100482610c91565b61100d81613571565b611017838361357b565b505050565b6001600160a01b038116331461108c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161070a565b6110968282613601565b5050565b600080516020615da58339815191526110b281613571565b6110ba613668565b50565b336000908152600660205260408120546060919060ff166110f15760405163acaf6b0f60e01b815260040160405180910390fd5b6110f9612b55565b600061110784860186615379565b905060003082600001518360200151846040015160405160200161112e9493929190615395565b60408051601f1981840301815291815281516020928301206000818152600590935290822084519193509190819061116990610d5e90613287565b604080516101408101825260068701546001600160a01b0390811682526007880154908116602080840191909152600160a01b90910462ffffff1682840152306060830152890151600290810b60808301529189015190910b60a082015260c0810183905260e081018290526101008101839052610120810182905291935091506000906111f6906123e4565b505050905061121384876000015188602001518960400151612c05565b8354819085906000906112309084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508061125e866136b4565b611268919061555a565b6005850180546001600160401b034381166001600160401b03196001600160801b0395909516600160401b02949094166001600160c01b03199092169190911792909217905560085416156112ec576008805460078054600160a01b600160e01b0319166001600160401b038316600160a01b021790556001600160401b03191690555b604080516002808252606082018352600092602083019080368337019050509050838160008151811061132157611321615585565b602002602001018181525050828160018151811061134157611341615585565b6020026020010181815250507f504089073b229a89dd5c190e4348d0ba4fcfcf103683f51f771deb19bd9fc27a8683604051610f8d92919061559b565b606081518351146113e35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161070a565b600083516001600160401b038111156113fe576113fe614b98565b604051908082528060200260200182016040528015611427578160200160208202803683370190505b50905060005b845181101561149f5761147285828151811061144b5761144b615585565b602002602001015185838151811061146557611465615585565b60200260200101516106a3565b82828151811061148457611484615585565b602090810291909101015261149881615600565b905061142d565b509392505050565b600080516020615da58339815191526114bf81613571565b6110ba61380d565b600080516020615dc58339815191526114df81613571565b60405163a34123a760e01b81526001600160a01b0386169063a34123a79061150f908790879087906004016153c4565b60408051808303816000875af115801561152d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155191906153ea565b5050600080866001600160a01b031663514ea4bf61157030898961384a565b6040518263ffffffff1660e01b815260040161158e91815260200190565b60a060405180830381865afa1580156115ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cf9190615619565b6040516309e3d67b60e31b815291965094506001600160a01b038b169350634f1eb3d8925061160b915033908a908a90889088906004016154ad565b60408051808303816000875af1158015611629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164d91906154ea565b505050505050505050565b60008080806116698587018761567b565b925092509250308383836040516020016116869493929190615395565b60408051601f1981840301815291905280516020909101209695505050505050565b600080516020615dc58339815191526116c081613571565b6040516370a0823160e01b81526001600160a01b0383169063a9059cbb90339083906370a08231906116f6903090600401615129565b602060405180830381865afa158015611713573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173791906156c6565b6040518363ffffffff1660e01b81526004016117549291906156df565b6020604051808303816000875af1158015611773573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101791906156f8565b60608060006117a884860186615379565b90506000806117e76117bd8460000151613287565b6117cd856020015160020b612d46565b6117dd866040015160020b612d46565b86606001516132f8565b6040805160028082526060820183529395509193506000929060208301908036833701905050905083600001516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611851573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118759190615715565b8160008151811061188857611888615585565b60200260200101906001600160a01b031690816001600160a01b03168152505083600001516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190e9190615715565b8160018151811061192157611921615585565b6001600160a01b03929092166020928302919091018201526040805160028082526060820183526000939192909183019080368337019050509050838160008151811061197057611970615585565b602002602001018181525050828160018151811061199057611990615585565b6020908102919091010152909890975095505050505050565b3360009081526006602052604081205460ff166119d95760405163acaf6b0f60e01b815260040160405180910390fd5b6119e1612b55565b60006119ef83850185615379565b9050600030826000015183602001518460400151604051602001611a169493929190615395565b60408051601f1981840301815291815281516020928301206000818152600590935291206006810154919250906001600160a01b0316611bf35782600001516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab69190615715565b8160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b449190615715565b8160070160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001516001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd29190615732565b8160070160146101000a81548162ffffff021916908362ffffff1602179055505b600080611c06610d5e8660000151613287565b91509150600082118015611c1a5750600081115b15611c385760405163f314248960e01b815260040160405180910390fd5b604080516101408101825260068501546001600160a01b0390811682526007860154908116602080840191909152600160a01b90910462ffffff1682840152306060830152870151600290810b60808301529187015190910b60a082015260c0810183905260e0810182905261010081018390526101208101829052600090611cc0906123e4565b5050509050611cdd84876000015188602001518960400151612c05565b8354600160801b90046001600160801b0316156122a05760048401546001600160801b0316151580611d2257506004840154600160801b90046001600160801b031615155b156121f4578551602087015160408089015160048089015492516309e3d67b60e31b815260009586956001600160a01b0390911694634f1eb3d894611d8194309491926001600160801b0380821693600160801b9092041691016154ad565b60408051808303816000875af1158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc391906154ea565b6000600489018190556001600160801b039283169450911691508515159081611def5760008411611df4565b600083115b15611fda57600754611e4d906001600160a01b031683611e145785611e16565b845b84611e2e5760068b01546001600160a01b0316611e3d565b60078b01546001600160a01b03165b6001600160a01b03169190613898565b6007546040805161010081019091526001600160a01b039091169063414bf389908085611e875760068c01546001600160a01b0316611e96565b60078c01546001600160a01b03165b6001600160a01b0316815260200185611ebc5760078c01546001600160a01b0316611ecb565b60068c01546001600160a01b03165b6001600160a01b0316815260078c0154600160a01b900462ffffff16602082015230604082015242606082015260800185611f065787611f08565b865b815260006020808301829052604092830191909152815160e085811b6001600160e01b031916825284516001600160a01b03908116600484015292850151831660248301529284015162ffffff1660448201526060840151821660648201526080840151608482015260a084015160a482015260c084015160c482015292909101511660e4820152610104016020604051808303816000875af1158015611fb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd791906156c6565b90505b604080516101408101825260068a01546001600160a01b03908116825260078b0154908116602080840191909152600160a01b90910462ffffff16828401523060608301819052908d0151600290810b6080840152928d015190920b60a082015260009190639981bb9b9060c0810186612055576000612057565b855b612061908a615495565b8152602001866120715785612074565b60005b61207e9089615495565b81526020018661208f576000612091565b855b61209b908a615495565b8152602001866120ab57856120ae565b60005b6120b89089615495565b8152506040518263ffffffff1660e01b81526004016120d7919061574f565b6080604051808303816000875af11580156120f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211a91906157fc565b50508a5491925082918b915060009061213d9084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b031602179055507fac625f3c119d91f686e26c248c9faeb771664f8da88187bf7560fe575803724b308c600001518c8e602001518f60400151866040516121e6969594939291906001600160a01b0396871681529490951660208501526040840192909252600290810b60608401520b60808201526001600160801b039190911660a082015260c00190565b60405180910390a150505050505b60006122008287613973565b8554909150829086906000906122209084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550808560000160108282829054906101000a90046001600160801b031661226a919061555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550806001600160801b0316975050612338565b8354819085906000906122bd9084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550808460000160108282829054906101000a90046001600160801b0316612307919061555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550806001600160801b031696505b6123538a8689604051806020016040528060008152506139e1565b7fea81bdfb1d47d9eb5bb6a569717abbc71cdacc852406e81ca1a3003daf05df48858288600001518d8a602001518b6040015160405161239896959493929190615519565b60405180910390a15050505050509392505050565b6000610c8a8383613973565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000806000806000604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b03168152602001876040015162ffffff1681525090506124567f000000000000000000000000000000000000000000000000000000000000000082613ada565b91506000826001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015612498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bc919061584f565b505050505050905060006124d38860800151612d46565b905060006124e48960a00151612d46565b90506124fb8383838c60c001518d60e00151613bbe565b9750505050816001600160a01b0316633c8a7d8d876060015188608001518960a00151896040518060400160405280888152602001336001600160a01b03168152506040516020016125889190815180516001600160a01b03908116835260208083015182168185015260409283015162ffffff1692840192909252920151909116606082015260800190565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016125b79594939291906158e7565b60408051808303816000875af11580156125d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f991906153ea565b959790965091935090915050565b611096338383613c82565b33600090815260066020526040812054606091829160ff166126475760405163acaf6b0f60e01b815260040160405180910390fd5b61264f612b55565b600061265d85870187615379565b90506000308260000151836020015184604001516040516020016126849493929190615395565b60408051601f19818403018152828252805160209182012060008181526005835283812087519388015194880151606089015163a34123a760e01b88529397509095919485946001600160a01b03169363a34123a7936126e89391906004016153c4565b60408051808303816000875af1158015612706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272a91906153ea565b9150915084600001516001600160a01b0316634f1eb3d8338760200151886040015186866040518663ffffffff1660e01b815260040161276e9594939291906154ad565b60408051808303816000875af115801561278c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127b091906154ea565b50506127ca83866000015187602001518860400151612c05565b60608501516001840180546000906127ec9084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550600060026001600160401b0381111561282b5761282b614b98565b604051908082528060200260200182016040528015612854578160200160208202803683370190505b50600685015481519192506001600160a01b031690829060009061287a5761287a615585565b6001600160a01b03928316602091820292909201015260078501548251911690829060019081106128ad576128ad615585565b6001600160a01b0392909216602092830291909101820152604080516002808252606082018352600093919290918301908036833701905050905083816000815181106128fc576128fc615585565b602002602001018181525050828160018151811061291c5761291c615585565b6020026020010181815250507f7fc7ce728583421fb192c9bac9c143fabf47263826e2fb21203a8f7038c093d486886060015160405161295d92919061559b565b60405180910390a160609690960151909b959a506001600160801b03169850939650505050505050565b600061299281613571565b600880546001600160401b0319166001600160401b0384161790556040517f23972d806205feef2a8dc5325d5e6ca1394a8c39ddf60db08ebfa1b6b90c40a5906129dd90849061499a565b60405180910390a15050565b60006129f78284018461592c565b9050612a277f00000000000000000000000000000000000000000000000000000000000000008260000151613d62565b508415612a42578051516020820151612a4291903388613d85565b8315610ff457610ff481600001516020015182602001513387613d85565b612a6982610c91565b612a7281613571565b6110178383613601565b6000612a8781613571565b6001600160a01b038316600081815260066020908152604091829020805460ff19168615159081179091558251938452908301527f6bf75a1f3a54afacac4f907472d898c39eb17762894b2a10c33bca0d1b7f2eba910160405180910390a1505050565b6001600160a01b038516331480612b075750612b07853361063a565b612b235760405162461bcd60e51b815260040161070a906155b2565b610ff48585858585613db1565b60006001600160e01b03198216637965db0b60e01b1480610736575061073682613ebe565b60035460ff1615612b9b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161070a565b565b6000610c8a612bab836136b4565b600084815260056020526040902054612bce906001600160801b0316600161555a565b612bd8919061546d565b6000848152600560205260409020546001600160801b0386811692811691600160801b9004166001613f0e565b6000612c1230848461384a565b9050600080856001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401612c4591815260200190565b60a060405180830381865afa158015612c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c869190615619565b505060028a015460018b01548b54939650919450612cbc93508503916001600160801b039182169082160316600160801b613f5f565b6004880180546001600160801b0380821690930183166001600160801b0319909116179055600388015460018901548954612d0793928503929182169082160316600160801b613f5f565b6004880180546001600160801b03600160801b808304821690940181169093029216919091179055600287019190915560039095019490945550505050565b60008060008360020b12612d5d578260020b612d65565b8260020b6000035b9050620d89e8811115612d8b576040516315e4079d60e11b815260040160405180910390fd5b600081600116600003612da257600160801b612db4565b6ffffcb933bd6fad37aa2d162d1a5940015b6001600160881b031690506002821615612dde576ffff97272373d413259a46990580e213a0260801c5b6004821615612dfd576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615612e1c576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615612e3b576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615612e5a576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615612e79576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615612e98576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615612eb8576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615612ed8576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615612ef8576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615612f18576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615612f38576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615612f58576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615612f78576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615612f98576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615612fb9576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615612fd9576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615612ff8576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615613015576b048a170391f7dc42444e8fa20260801c5b60008460020b131561303657806000198161303257613032615443565b0490505b600160201b81061561304957600161304c565b60005b60ff16602082901c0192505050919050565b6000826001600160a01b0316846001600160a01b0316111561307e579192915b836001600160a01b03166130b7606060ff16846001600160801b0316901b8686036001600160a01b0316866001600160a01b0316613f5f565b816130c4576130c4615443565b04949350505050565b6000826001600160a01b0316846001600160a01b031611156130ed579192915b613110826001600160801b03168585036001600160a01b0316600160601b613f5f565b949350505050565b6001600160a01b03831661317a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161070a565b33600061318684614011565b9050600061319384614011565b60408051602080820183526000918290528882528181528282206001600160a01b038b168352905220549091508481101561321c5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161070a565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a9052909290881691600080516020615d85833981519152910160405180910390a46040805160208101909152600090525b50505050505050565b6000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa1580156132c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132eb919061584f565b5094979650505050505050565b600080836001600160a01b0316856001600160a01b03161115613319579293925b846001600160a01b0316866001600160a01b0316116133445761333d85858561305e565b915061338b565b836001600160a01b0316866001600160a01b0316101561337d5761336986858561305e565b91506133768587856130cd565b905061338b565b6133888585856130cd565b90505b94509492505050565b81518351146133f65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161070a565b6001600160a01b03841661341c5760405162461bcd60e51b815260040161070a906159f1565b3360005b845181101561350357600085828151811061343d5761343d615585565b60200260200101519050600085838151811061345b5761345b615585565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156134ab5760405162461bcd60e51b815260040161070a90615a36565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906134e8908490615495565b92505081905550505050806134fc90615600565b9050613420565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613553929190615a80565b60405180910390a461356981878787878761405c565b505050505050565b6110ba81336141be565b61358582826123b9565b6110965760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135bd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61360b82826123b9565b156110965760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b613670614217565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516136aa9190615129565b60405180910390a1565b600081815260056020818152604080842081516101808101835281546001600160801b038082168352600160801b9182900481169583019590955260018301548516938201939093526002820154606082015260038201546080820152600482015480851660a083015292909204831660c0830152928301546001600160401b0380821660e08401819052600160401b90920490931661010083015260068401546001600160a01b0390811661012084015260079485015490811661014084015262ffffff600160a01b91829004166101608401529354919361379c93920490911690615a93565b6001600160401b031643106137b45750600092915050565b60075460e0820151600091600160a01b90046001600160401b0316906137da9043615ab5565b6001600160401b03168361010001516137f39190615ad5565b6137fd9190615b04565b826101000151613110919061546d565b613815612b55565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861369d3390565b6040516001600160601b0319606085901b16602082015260e883811b603483015282901b6037820152600090603a016040516020818303038152906040528051906020012090509392505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156138e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061390c91906156c6565b905061396d8463095ea7b360e01b856139258686615495565b6040516024016139369291906156df565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614260565b50505050565b600081815260056020526040812054610c8a90600160801b90046001600160801b031661399f846136b4565b6000858152600560205260409020546139c2906001600160801b0316600161555a565b6139cc919061546d565b6001600160801b038681169291166000613f0e565b6001600160a01b038416613a415760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161070a565b336000613a4d85614011565b90506000613a5a85614011565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290613a8c908490615495565b909155505060408051878152602081018790526001600160a01b03808a169260009291871691600080516020615d85833981519152910160405180910390a461327e83600089898989614335565b600081602001516001600160a01b031682600001516001600160a01b031610613b0257600080fd5b815160208084015160408086015181516001600160a01b0395861681860152949092168482015262ffffff90911660608085019190915281518085038201815260808501909252815191909201206001600160f81b031960a08401529085901b6001600160601b03191660a183015260b58201527f000000000000000000000000000000000000000000000000000000000000000060d582015260f50160408051601f1981840301815291905280516020909101209392505050565b6000836001600160a01b0316856001600160a01b03161115613bde579293925b846001600160a01b0316866001600160a01b031611613c0957613c028585856143f7565b9050613c79565b836001600160a01b0316866001600160a01b03161015613c6b576000613c308786866143f7565b90506000613c3f87898661445a565b9050806001600160801b0316826001600160801b031610613c605780613c62565b815b92505050613c79565b613c7685858461445a565b90505b95945050505050565b816001600160a01b0316836001600160a01b031603613cf55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161070a565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000613d6e8383613ada565b9050336001600160a01b0382161461073657600080fd5b306001600160a01b03841603613da557613da0848383614497565b61396d565b61396d848484846144b6565b6001600160a01b038416613dd75760405162461bcd60e51b815260040161070a906159f1565b336000613de385614011565b90506000613df085614011565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015613e335760405162461bcd60e51b815260040161070a90615a36565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613e70908490615495565b909155505060408051888152602081018890526001600160a01b03808b16928c82169291881691600080516020615d85833981519152910160405180910390a461164d848a8a8a8a8a614335565b60006001600160e01b03198216636cdb3d1360e11b1480613eef57506001600160e01b031982166303a24d0760e21b145b8061073657506301ffc9a760e01b6001600160e01b0319831614610736565b600080613f1c8686866144ee565b90506001836002811115613f3257613f32615b2a565b148015613f4f575060008480613f4a57613f4a615443565b868809115b15613c7957613c76600182615495565b6000808060001985870985870292508281108382030391505080600003613f985760008411613f8d57600080fd5b508290049050610c8a565b808411613fa457600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061404b5761404b615585565b602090810291909101015292915050565b61406e846001600160a01b03166145d8565b156135695760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906140a79089908990889088908890600401615b40565b6020604051808303816000875af19250505080156140e2575060408051601f3d908101601f191682019092526140df91810190615b9e565b60015b61418e576140ee615bbb565b806308c379a0036141275750614102615bd7565b8061410d5750614129565b8060405162461bcd60e51b815260040161070a9190614a1f565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161070a565b6001600160e01b0319811663bc197c8160e01b1461327e5760405162461bcd60e51b815260040161070a90615c60565b6141c882826123b9565b611096576141d5816145e7565b6141e08360206145f9565b6040516020016141f1929190615ca8565b60408051601f198184030181529082905262461bcd60e51b825261070a91600401614a1f565b60035460ff16612b9b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161070a565b60006142b5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166147949092919063ffffffff16565b90508051600014806142d65750808060200190518101906142d691906156f8565b6110175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161070a565b614347846001600160a01b03166145d8565b156135695760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906143809089908990889088908890600401615d17565b6020604051808303816000875af19250505080156143bb575060408051601f3d908101601f191682019092526143b891810190615b9e565b60015b6143c7576140ee615bbb565b6001600160e01b0319811663f23a6e6160e01b1461327e5760405162461bcd60e51b815260040161070a90615c60565b6000826001600160a01b0316846001600160a01b03161115614417579192915b600061443a856001600160a01b0316856001600160a01b0316600160601b613f5f565b9050613c7961445584838888036001600160a01b0316613f5f565b6147a3565b6000826001600160a01b0316846001600160a01b0316111561447a579192915b61311061445583600160601b8787036001600160a01b0316613f5f565b6110178363a9059cbb60e01b84846040516024016139369291906156df565b6040516001600160a01b038085166024830152831660448201526064810182905261396d9085906323b872dd60e01b90608401613936565b60008080600019858709858702925082811083820303915050806000036145285783828161451e5761451e615443565b0492505050610c8a565b80841161456f5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161070a565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6001600160a01b03163b151590565b60606107366001600160a01b03831660145b60606000614608836002615424565b614613906002615495565b6001600160401b0381111561462a5761462a614b98565b6040519080825280601f01601f191660200182016040528015614654576020820181803683370190505b509050600360fc1b8160008151811061466f5761466f615585565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061469e5761469e615585565b60200101906001600160f81b031916908160001a90535060006146c2846002615424565b6146cd906001615495565b90505b6001811115614745576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061470157614701615585565b1a60f81b82828151811061471757614717615585565b60200101906001600160f81b031916908160001a90535060049490941c9361473e81615d51565b90506146d0565b508315610c8a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161070a565b606061311084846000856147be565b806001600160801b03811681146147b957600080fd5b919050565b60608247101561481f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161070a565b600080866001600160a01b0316858760405161483b9190615d68565b60006040518083038185875af1925050503d8060008114614878576040519150601f19603f3d011682016040523d82523d6000602084013e61487d565b606091505b509150915061488e87838387614899565b979650505050505050565b606083156149065782516000036148ff576148b3856145d8565b6148ff5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161070a565b5081613110565b613110838381511561410d5781518083602001fd5b6001600160a01b03811681146110ba57600080fd5b80356147b98161491b565b6000806040838503121561494e57600080fd5b82356149598161491b565b946020939093013593505050565b6001600160e01b0319811681146110ba57600080fd5b60006020828403121561498f57600080fd5b8135610c8a81614967565b6001600160401b0391909116815260200190565b6000602082840312156149c057600080fd5b5035919050565b60005b838110156149e25781810151838201526020016149ca565b8381111561396d5750506000910152565b60008151808452614a0b8160208601602086016149c7565b601f01601f19169290920160200192915050565b602081526000610c8a60208301846149f3565b60008083601f840112614a4457600080fd5b5081356001600160401b03811115614a5b57600080fd5b602083019150836020828501011115610fa857600080fd5b600080600060408486031215614a8857600080fd5b8335614a938161491b565b925060208401356001600160401b03811115614aae57600080fd5b614aba86828701614a32565b9497909650939450505050565b6001600160801b03811681146110ba57600080fd5b60008060408385031215614aef57600080fd5b823561495981614ac7565b60008060208385031215614b0d57600080fd5b82356001600160401b03811115614b2357600080fd5b614b2f85828601614a32565b90969095509350505050565b600081518084526020808501945080840160005b83811015614b6b57815187529582019590820190600101614b4f565b509495945050505050565b604081526000614b896040830185614b3b565b90508260208301529392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614bd357614bd3614b98565b6040525050565b60405161014081016001600160401b0381118282101715614bfd57614bfd614b98565b60405290565b60006001600160401b03821115614c1c57614c1c614b98565b5060051b60200190565b600082601f830112614c3757600080fd5b81356020614c4482614c03565b604051614c518282614bae565b83815260059390931b8501820192828101915086841115614c7157600080fd5b8286015b84811015614c8c5780358352918301918301614c75565b509695505050505050565b600082601f830112614ca857600080fd5b81356001600160401b03811115614cc157614cc1614b98565b604051614cd8601f8301601f191660200182614bae565b818152846020838601011115614ced57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614d2257600080fd5b8535614d2d8161491b565b94506020860135614d3d8161491b565b935060408601356001600160401b0380821115614d5957600080fd5b614d6589838a01614c26565b94506060880135915080821115614d7b57600080fd5b614d8789838a01614c26565b93506080880135915080821115614d9d57600080fd5b50614daa88828901614c97565b9150509295509295909350565b60008060408385031215614dca57600080fd5b823591506020830135614ddc8161491b565b809150509250929050565b60008060408385031215614dfa57600080fd5b82356001600160401b0380821115614e1157600080fd5b818501915085601f830112614e2557600080fd5b81356020614e3282614c03565b604051614e3f8282614bae565b83815260059390931b8501820192828101915089841115614e5f57600080fd5b948201945b83861015614e86578535614e778161491b565b82529482019490820190614e64565b96505086013592505080821115614e9c57600080fd5b50614ea985828601614c26565b9150509250929050565b602081526000610c8a6020830184614b3b565b8060020b81146110ba57600080fd5b80356147b981614ec6565b60008060008060808587031215614ef657600080fd5b8435614f018161491b565b93506020850135614f1181614ec6565b92506040850135614f2181614ec6565b91506060850135614f3181614ac7565b939692955090935050565b600060208284031215614f4e57600080fd5b8135610c8a8161491b565b6001600160a01b03169052565b600081518084526020808501945080840160005b83811015614b6b5781516001600160a01b031687529582019590820190600101614f7a565b604081526000614fb26040830185614f66565b8281036020840152613c798185614b3b565b62ffffff811681146110ba57600080fd5b80356147b981614fc4565b60006101408284031215614ff357600080fd5b614ffb614bda565b61500483614930565b815261501260208401614930565b602082015261502360408401614fd5565b604082015261503460608401614930565b606082015261504560808401614ed5565b608082015261505660a08401614ed5565b60a082015260c0838101359082015260e080840135908201526101008084013590820152610120928301359281019290925250919050565b80151581146110ba57600080fd5b600080604083850312156150af57600080fd5b82356150ba8161491b565b91506020830135614ddc8161508e565b6060815260006150dd6060830186614f66565b82810360208401526150ef8186614b3b565b915050826040830152949350505050565b60006020828403121561511257600080fd5b81356001600160401b0381168114610c8a57600080fd5b6001600160a01b0391909116815260200190565b6000806000806060858703121561515357600080fd5b843593506020850135925060408501356001600160401b0381111561517757600080fd5b61518387828801614a32565b95989497509550505050565b6001600160801b038d811682528c811660208301528b81166040830152606082018b9052608082018a905288811660a083015287811660c08301526001600160401b03871660e083015285166101008201526001600160a01b0384166101208201526101808101615204610140830185614f59565b62ffffff83166101608301529d9c50505050505050505050505050565b6000806040838503121561523457600080fd5b823561523f8161491b565b91506020830135614ddc8161491b565b600080600080600060a0868803121561526757600080fd5b85356152728161491b565b945060208601356152828161491b565b9350604086013592506060860135915060808601356001600160401b038111156152ab57600080fd5b614daa88828901614c97565b600181811c908216806152cb57607f821691505b6020821081036152eb57634e487b7160e01b600052602260045260246000fd5b50919050565b60006080828403121561530357600080fd5b604051608081016001600160401b038111828210171561532557615325614b98565b60405290508082356153368161491b565b8152602083013561534681614ec6565b6020820152604083013561535981614ec6565b6040820152606083013561536c81614ac7565b6060919091015292915050565b60006080828403121561538b57600080fd5b610c8a83836152f1565b6001600160a01b039485168152929093166020830152600290810b60408301529190910b606082015260800190565b600293840b81529190920b60208201526001600160801b03909116604082015260600190565b600080604083850312156153fd57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561543e5761543e61540e565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261546857615468615443565b500490565b60006001600160801b038381169083168181101561548d5761548d61540e565b039392505050565b600082198211156154a8576154a861540e565b500190565b6001600160a01b03959095168552600293840b60208601529190920b60408401526001600160801b03918216606084015216608082015260a00190565b600080604083850312156154fd57600080fd5b825161550881614ac7565b6020840151909250614ddc81614ac7565b9586526001600160801b039490941660208601526001600160a01b03928316604086015291166060840152600290810b60808401520b60a082015260c00190565b60006001600160801b0382811684821680830382111561557c5761557c61540e565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b9182526001600160801b0316602082015260400190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6000600182016156125761561261540e565b5060010190565b600080600080600060a0868803121561563157600080fd5b855161563c81614ac7565b809550506020860151935060408601519250606086015161565c81614ac7565b608087015190925061566d81614ac7565b809150509295509295909350565b60008060006060848603121561569057600080fd5b833561569b8161491b565b925060208401356156ab81614ec6565b915060408401356156bb81614ec6565b809150509250925092565b6000602082840312156156d857600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561570a57600080fd5b8151610c8a8161508e565b60006020828403121561572757600080fd5b8151610c8a8161491b565b60006020828403121561574457600080fd5b8151610c8a81614fc4565b600061014082019050615763828451614f59565b60208301516157756020840182614f59565b50604083015161578c604084018262ffffff169052565b50606083015161579f6060840182614f59565b5060808301516157b4608084018260020b9052565b5060a08301516157c960a084018260020b9052565b5060c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525092915050565b6000806000806080858703121561581257600080fd5b845161581d81614ac7565b8094505060208501519250604085015191506060850151614f318161491b565b805161ffff811681146147b957600080fd5b600080600080600080600060e0888a03121561586a57600080fd5b87516158758161491b565b602089015190975061588681614ec6565b95506158946040890161583d565b94506158a26060890161583d565b93506158b06080890161583d565b925060a088015160ff811681146158c657600080fd5b60c08901519092506158d78161508e565b8091505092959891949750929550565b6001600160a01b0386168152600285810b602083015284900b60408201526001600160801b038316606082015260a06080820181905260009061488e908301846149f3565b6000818303608081121561593f57600080fd5b604080519081016001600160401b03808211838310171561596257615962614b98565b81604052606084121561597457600080fd5b60a083019350818410818511171561598e5761598e614b98565b5082604052843592506159a08361491b565b9182526020840135916159b28361491b565b826060830152604085013592506159c883614fc4565b82608083015280825250606084013591506159e28261491b565b60208101919091529392505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000614fb26040830185614b3b565b60006001600160401b0382811684821680830382111561557c5761557c61540e565b60006001600160401b038381169083168181101561548d5761548d61540e565b60006001600160801b0382811684821681151582840482111615615afb57615afb61540e565b02949350505050565b60006001600160801b0383811680615b1e57615b1e615443565b92169190910492915050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090615b6c90830186614b3b565b8281036060840152615b7e8186614b3b565b90508281036080840152615b9281856149f3565b98975050505050505050565b600060208284031215615bb057600080fd5b8151610c8a81614967565b600060033d1115615bd45760046000803e5060005160e01c5b90565b600060443d1015615be55790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715615c1457505050505090565b8285019150815181811115615c2c5750505050505090565b843d8701016020828501011115615c465750505050505090565b615c5560208286010187614bae565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615cda8160178501602088016149c7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615d0b8160288401602088016149c7565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061488e908301846149f3565b600081615d6057615d6061540e565b506000190190565b60008251615d7a8184602087016149c7565b919091019291505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f627b2ab94bb7d45041581aa3757ae020084674ccad6f75dc3750eb2ea8a92c4e9a0a82b25974fd602b636b85d2a46fd7e8e40145d9a7739850ececf3c2b6eab34ca26469706673582212207f2be54bb6ed8fc7d1d504f3f73da6ad8136433bc335f28620b7bbc6624b1e7564736f6c634300080f00330000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984e34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ed5760003560e01c8062fdd58e146101f257806301ffc9a7146102185780630c774f4a1461023b5780630e89341c146102625780631575e94814610282578063248a9ca31461029557806328daa117146102a85780632b4d93ea146102d35780632eb2c2d6146102f45780632f2ff15d1461030957806336568abe1461031c5780634a4e3bd51461032f5780634d0b1de3146103375780634e1273f41461034a57806351858e271461036a5780635b94b748146103725780635c975abb1461038557806363f558c8146103905780636ff1c9bc146103a3578063742b5fdd146103b65780637b3fd965146103d75780637da68a65146103ea5780638cf69998146103fd57806391d14854146104205780639981bb9b14610433578063a217fddf14610479578063a22cb46514610481578063b220e47014610494578063b8ea4a84146103b6578063bdb76955146104b6578063c45a0155146104c9578063ca83cb22146104fd578063d348799714610510578063d547741f14610523578063d58778d614610536578063dc6fd8ab146105f0578063e0f19adf146103b6578063e63ab1e914610617578063e985e9c51461062c578063ec944b6d14610668578063f242432a1461067b578063f7239fca1461068e575b600080fd5b61020561020036600461493b565b6106a3565b6040519081526020015b60405180910390f35b61022b61022636600461497d565b61073c565b604051901515815260200161020f565b60075461025590600160a01b90046001600160401b031681565b60405161020f919061499a565b6102756102703660046149ae565b610747565b60405161020f9190614a1f565b610205610290366004614a73565b6107db565b6102056102a33660046149ae565b610c91565b6102bb6102b6366004614adc565b610ca6565b6040516001600160801b03909116815260200161020f565b6102e66102e1366004614afa565b610cb2565b60405161020f929190614b76565b610307610302366004614d0a565b610faf565b005b610307610317366004614db7565b610ffb565b61030761032a366004614db7565b61101c565b61030761109a565b6102e6610345366004614afa565b6110bd565b61035d610358366004614de7565b61137e565b60405161020f9190614eb3565b6103076114a7565b610307610380366004614ee0565b6114c7565b60035460ff1661022b565b61020561039e366004614afa565b611658565b6103076103b1366004614f3c565b6116a8565b6103c96103c4366004614afa565b611797565b60405161020f929190614f9f565b6102056103e5366004614a73565b6119a9565b6102bb6103f8366004614adc565b6123ad565b61022b61040b366004614f3c565b60066020526000908152604090205460ff1681565b61022b61042e366004614db7565b6123b9565b610446610441366004614fe0565b6123e4565b604080516001600160801b0390951685526020850193909352918301526001600160a01b0316606082015260800161020f565b610205600081565b61030761048f36600461509c565b612607565b6104a76104a2366004614afa565b612612565b60405161020f939291906150ca565b6103076104c4366004615100565b612987565b6104f07f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98481565b60405161020f9190615129565b600854610255906001600160401b031681565b61030761051e36600461513d565b6129e9565b610307610531366004614db7565b612a60565b6105d86105443660046149ae565b6005602081905260009182526040909120805460018201546002830154600384015460048501549585015460068601546007909601546001600160801b0380871698600160801b9788900482169896821697959694958282169591048216936001600160401b03811693600160401b909104909216916001600160a01b0391821691811690600160a01b900462ffffff168c565b60405161020f9c9b9a9998979695949392919061518f565b6102057fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5481565b610205600080516020615da583398151915281565b61022b61063a366004615221565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61030761067636600461509c565b612a7c565b61030761068936600461524f565b612aeb565b610205600080516020615dc583398151915281565b60006001600160a01b0383166107135760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061073682612b30565b606060028054610756906152b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610782906152b7565b80156107cf5780601f106107a4576101008083540402835291602001916107cf565b820191906000526020600020905b8154815290600101906020018083116107b257829003601f168201915b50505050509050919050565b3360009081526006602052604081205460ff1661080b5760405163acaf6b0f60e01b815260040160405180910390fd5b610813612b55565b600061082183850185615379565b90506000308260000151836020015184604001516040516020016108489493929190615395565b60408051601f19818403018152918152815160209283012060008181526005909352908220606085015191935091906108819084612b9d565b84516020860151604080880151905163a34123a760e01b815293945060009384936001600160a01b03169263a34123a7926108c09288906004016153c4565b60408051808303816000875af11580156108de573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090291906153ea565b9150915061091e84876000015188602001518960400151612c05565b600080600061094c6109368a6020015160020b612d46565b6109468b6040015160020b612d46565b8861305e565b905060006109796109638b6020015160020b612d46565b6109738c6040015160020b612d46565b896130cd565b905060006109b06109908c6020015160020b612d46565b6109a08d6040015160020b612d46565b8b546001600160801b031661305e565b905060006109e76109c78d6020015160020b612d46565b6109d78e6040015160020b612d46565b8c546001600160801b03166130cd565b60048b01549091508290610a059086906001600160801b0316615424565b610a0f9190615459565b60048b01549096508190610a34908590600160801b90046001600160801b0316615424565b610a3e9190615459565b60048b018054919650879550935060009250610a65915084906001600160801b031661546d565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550808660040160108282829054906101000a90046001600160801b0316610aaf919061546d565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555087600001516001600160a01b0316634f1eb3d88d8a602001518b60400151866001600160801b031689610b069190615495565b610b196001600160801b0388168a615495565b6040518663ffffffff1660e01b8152600401610b399594939291906154ad565b60408051808303816000875af1158015610b57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7b91906154ea565b5050855485908790600090610b9a9084906001600160801b031661546d565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555087606001518660000160108282829054906101000a90046001600160801b0316610be8919061546d565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610c248c888a606001516001600160801b0316613118565b7f2d671af43b1498ab3a886911d347788afef173fbbc14c4ad8421f0de25906a6787868a600001518f8c602001518d60400151604051610c6996959493929190615519565b60405180910390a187606001516001600160801b0316985050505050505050505b9392505050565b60009081526004602052604090206001015490565b6000610c8a8383612b9d565b336000908152600660205260408120546060919060ff16610ce65760405163acaf6b0f60e01b815260040160405180910390fd5b610cee612b55565b6000610cfc84860186615379565b9050600030826000015183602001518460400151604051602001610d239493929190615395565b60408051601f19818403018152918152815160209283012060008181526005909352908220845191935091908190610d8890610d5e90613287565b610d6e876020015160020b612d46565b610d7e886040015160020b612d46565b88606001516132f8565b604080516101408101825260068701546001600160a01b0390811682526007880154908116602080840191909152600160a01b90910462ffffff1682840152306060830152890151600290810b60808301529189015190910b60a082015260c0810183905260e08101829052610100810183905261012081018290529193509150600090610e15906123e4565b5050509050610e3284876000015188602001518960400151612c05565b60018401546001600160801b03808316911610610e9257600184018054829190600090610e699084906001600160801b031661546d565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550610efb565b6001840154610eaa906001600160801b03168261546d565b84548590600090610ec59084906001600160801b031661555a565b82546001600160801b039182166101009390930a9283029190920219909116179055506001840180546001600160801b03191690555b6040805160028082526060820183526000926020830190803683370190505090508381600081518110610f3057610f30615585565b6020026020010181815250508281600181518110610f5057610f50615585565b6020026020010181815250507f64d8efec9e37db387b761d25cf5596ba293cd64d72fbcd86d7bb43b14c3bfaa88683604051610f8d92919061559b565b60405180910390a197506001600160801b0316955050505050505b9250929050565b6001600160a01b038516331480610fcb5750610fcb853361063a565b610fe75760405162461bcd60e51b815260040161070a906155b2565b610ff48585858585613394565b5050505050565b61100482610c91565b61100d81613571565b611017838361357b565b505050565b6001600160a01b038116331461108c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161070a565b6110968282613601565b5050565b600080516020615da58339815191526110b281613571565b6110ba613668565b50565b336000908152600660205260408120546060919060ff166110f15760405163acaf6b0f60e01b815260040160405180910390fd5b6110f9612b55565b600061110784860186615379565b905060003082600001518360200151846040015160405160200161112e9493929190615395565b60408051601f1981840301815291815281516020928301206000818152600590935290822084519193509190819061116990610d5e90613287565b604080516101408101825260068701546001600160a01b0390811682526007880154908116602080840191909152600160a01b90910462ffffff1682840152306060830152890151600290810b60808301529189015190910b60a082015260c0810183905260e081018290526101008101839052610120810182905291935091506000906111f6906123e4565b505050905061121384876000015188602001518960400151612c05565b8354819085906000906112309084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508061125e866136b4565b611268919061555a565b6005850180546001600160401b034381166001600160401b03196001600160801b0395909516600160401b02949094166001600160c01b03199092169190911792909217905560085416156112ec576008805460078054600160a01b600160e01b0319166001600160401b038316600160a01b021790556001600160401b03191690555b604080516002808252606082018352600092602083019080368337019050509050838160008151811061132157611321615585565b602002602001018181525050828160018151811061134157611341615585565b6020026020010181815250507f504089073b229a89dd5c190e4348d0ba4fcfcf103683f51f771deb19bd9fc27a8683604051610f8d92919061559b565b606081518351146113e35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161070a565b600083516001600160401b038111156113fe576113fe614b98565b604051908082528060200260200182016040528015611427578160200160208202803683370190505b50905060005b845181101561149f5761147285828151811061144b5761144b615585565b602002602001015185838151811061146557611465615585565b60200260200101516106a3565b82828151811061148457611484615585565b602090810291909101015261149881615600565b905061142d565b509392505050565b600080516020615da58339815191526114bf81613571565b6110ba61380d565b600080516020615dc58339815191526114df81613571565b60405163a34123a760e01b81526001600160a01b0386169063a34123a79061150f908790879087906004016153c4565b60408051808303816000875af115801561152d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155191906153ea565b5050600080866001600160a01b031663514ea4bf61157030898961384a565b6040518263ffffffff1660e01b815260040161158e91815260200190565b60a060405180830381865afa1580156115ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cf9190615619565b6040516309e3d67b60e31b815291965094506001600160a01b038b169350634f1eb3d8925061160b915033908a908a90889088906004016154ad565b60408051808303816000875af1158015611629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164d91906154ea565b505050505050505050565b60008080806116698587018761567b565b925092509250308383836040516020016116869493929190615395565b60408051601f1981840301815291905280516020909101209695505050505050565b600080516020615dc58339815191526116c081613571565b6040516370a0823160e01b81526001600160a01b0383169063a9059cbb90339083906370a08231906116f6903090600401615129565b602060405180830381865afa158015611713573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173791906156c6565b6040518363ffffffff1660e01b81526004016117549291906156df565b6020604051808303816000875af1158015611773573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101791906156f8565b60608060006117a884860186615379565b90506000806117e76117bd8460000151613287565b6117cd856020015160020b612d46565b6117dd866040015160020b612d46565b86606001516132f8565b6040805160028082526060820183529395509193506000929060208301908036833701905050905083600001516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611851573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118759190615715565b8160008151811061188857611888615585565b60200260200101906001600160a01b031690816001600160a01b03168152505083600001516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190e9190615715565b8160018151811061192157611921615585565b6001600160a01b03929092166020928302919091018201526040805160028082526060820183526000939192909183019080368337019050509050838160008151811061197057611970615585565b602002602001018181525050828160018151811061199057611990615585565b6020908102919091010152909890975095505050505050565b3360009081526006602052604081205460ff166119d95760405163acaf6b0f60e01b815260040160405180910390fd5b6119e1612b55565b60006119ef83850185615379565b9050600030826000015183602001518460400151604051602001611a169493929190615395565b60408051601f1981840301815291815281516020928301206000818152600590935291206006810154919250906001600160a01b0316611bf35782600001516001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab69190615715565b8160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001516001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b449190615715565b8160070160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001516001600160a01b031663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd29190615732565b8160070160146101000a81548162ffffff021916908362ffffff1602179055505b600080611c06610d5e8660000151613287565b91509150600082118015611c1a5750600081115b15611c385760405163f314248960e01b815260040160405180910390fd5b604080516101408101825260068501546001600160a01b0390811682526007860154908116602080840191909152600160a01b90910462ffffff1682840152306060830152870151600290810b60808301529187015190910b60a082015260c0810183905260e0810182905261010081018390526101208101829052600090611cc0906123e4565b5050509050611cdd84876000015188602001518960400151612c05565b8354600160801b90046001600160801b0316156122a05760048401546001600160801b0316151580611d2257506004840154600160801b90046001600160801b031615155b156121f4578551602087015160408089015160048089015492516309e3d67b60e31b815260009586956001600160a01b0390911694634f1eb3d894611d8194309491926001600160801b0380821693600160801b9092041691016154ad565b60408051808303816000875af1158015611d9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc391906154ea565b6000600489018190556001600160801b039283169450911691508515159081611def5760008411611df4565b600083115b15611fda57600754611e4d906001600160a01b031683611e145785611e16565b845b84611e2e5760068b01546001600160a01b0316611e3d565b60078b01546001600160a01b03165b6001600160a01b03169190613898565b6007546040805161010081019091526001600160a01b039091169063414bf389908085611e875760068c01546001600160a01b0316611e96565b60078c01546001600160a01b03165b6001600160a01b0316815260200185611ebc5760078c01546001600160a01b0316611ecb565b60068c01546001600160a01b03165b6001600160a01b0316815260078c0154600160a01b900462ffffff16602082015230604082015242606082015260800185611f065787611f08565b865b815260006020808301829052604092830191909152815160e085811b6001600160e01b031916825284516001600160a01b03908116600484015292850151831660248301529284015162ffffff1660448201526060840151821660648201526080840151608482015260a084015160a482015260c084015160c482015292909101511660e4820152610104016020604051808303816000875af1158015611fb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd791906156c6565b90505b604080516101408101825260068a01546001600160a01b03908116825260078b0154908116602080840191909152600160a01b90910462ffffff16828401523060608301819052908d0151600290810b6080840152928d015190920b60a082015260009190639981bb9b9060c0810186612055576000612057565b855b612061908a615495565b8152602001866120715785612074565b60005b61207e9089615495565b81526020018661208f576000612091565b855b61209b908a615495565b8152602001866120ab57856120ae565b60005b6120b89089615495565b8152506040518263ffffffff1660e01b81526004016120d7919061574f565b6080604051808303816000875af11580156120f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211a91906157fc565b50508a5491925082918b915060009061213d9084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b031602179055507fac625f3c119d91f686e26c248c9faeb771664f8da88187bf7560fe575803724b308c600001518c8e602001518f60400151866040516121e6969594939291906001600160a01b0396871681529490951660208501526040840192909252600290810b60608401520b60808201526001600160801b039190911660a082015260c00190565b60405180910390a150505050505b60006122008287613973565b8554909150829086906000906122209084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550808560000160108282829054906101000a90046001600160801b031661226a919061555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550806001600160801b0316975050612338565b8354819085906000906122bd9084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550808460000160108282829054906101000a90046001600160801b0316612307919061555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550806001600160801b031696505b6123538a8689604051806020016040528060008152506139e1565b7fea81bdfb1d47d9eb5bb6a569717abbc71cdacc852406e81ca1a3003daf05df48858288600001518d8a602001518b6040015160405161239896959493929190615519565b60405180910390a15050505050509392505050565b6000610c8a8383613973565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000806000806000604051806060016040528087600001516001600160a01b0316815260200187602001516001600160a01b03168152602001876040015162ffffff1681525090506124567f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98482613ada565b91506000826001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa158015612498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bc919061584f565b505050505050905060006124d38860800151612d46565b905060006124e48960a00151612d46565b90506124fb8383838c60c001518d60e00151613bbe565b9750505050816001600160a01b0316633c8a7d8d876060015188608001518960a00151896040518060400160405280888152602001336001600160a01b03168152506040516020016125889190815180516001600160a01b03908116835260208083015182168185015260409283015162ffffff1692840192909252920151909116606082015260800190565b6040516020818303038152906040526040518663ffffffff1660e01b81526004016125b79594939291906158e7565b60408051808303816000875af11580156125d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f991906153ea565b959790965091935090915050565b611096338383613c82565b33600090815260066020526040812054606091829160ff166126475760405163acaf6b0f60e01b815260040160405180910390fd5b61264f612b55565b600061265d85870187615379565b90506000308260000151836020015184604001516040516020016126849493929190615395565b60408051601f19818403018152828252805160209182012060008181526005835283812087519388015194880151606089015163a34123a760e01b88529397509095919485946001600160a01b03169363a34123a7936126e89391906004016153c4565b60408051808303816000875af1158015612706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272a91906153ea565b9150915084600001516001600160a01b0316634f1eb3d8338760200151886040015186866040518663ffffffff1660e01b815260040161276e9594939291906154ad565b60408051808303816000875af115801561278c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127b091906154ea565b50506127ca83866000015187602001518860400151612c05565b60608501516001840180546000906127ec9084906001600160801b031661555a565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550600060026001600160401b0381111561282b5761282b614b98565b604051908082528060200260200182016040528015612854578160200160208202803683370190505b50600685015481519192506001600160a01b031690829060009061287a5761287a615585565b6001600160a01b03928316602091820292909201015260078501548251911690829060019081106128ad576128ad615585565b6001600160a01b0392909216602092830291909101820152604080516002808252606082018352600093919290918301908036833701905050905083816000815181106128fc576128fc615585565b602002602001018181525050828160018151811061291c5761291c615585565b6020026020010181815250507f7fc7ce728583421fb192c9bac9c143fabf47263826e2fb21203a8f7038c093d486886060015160405161295d92919061559b565b60405180910390a160609690960151909b959a506001600160801b03169850939650505050505050565b600061299281613571565b600880546001600160401b0319166001600160401b0384161790556040517f23972d806205feef2a8dc5325d5e6ca1394a8c39ddf60db08ebfa1b6b90c40a5906129dd90849061499a565b60405180910390a15050565b60006129f78284018461592c565b9050612a277f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9848260000151613d62565b508415612a42578051516020820151612a4291903388613d85565b8315610ff457610ff481600001516020015182602001513387613d85565b612a6982610c91565b612a7281613571565b6110178383613601565b6000612a8781613571565b6001600160a01b038316600081815260066020908152604091829020805460ff19168615159081179091558251938452908301527f6bf75a1f3a54afacac4f907472d898c39eb17762894b2a10c33bca0d1b7f2eba910160405180910390a1505050565b6001600160a01b038516331480612b075750612b07853361063a565b612b235760405162461bcd60e51b815260040161070a906155b2565b610ff48585858585613db1565b60006001600160e01b03198216637965db0b60e01b1480610736575061073682613ebe565b60035460ff1615612b9b5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161070a565b565b6000610c8a612bab836136b4565b600084815260056020526040902054612bce906001600160801b0316600161555a565b612bd8919061546d565b6000848152600560205260409020546001600160801b0386811692811691600160801b9004166001613f0e565b6000612c1230848461384a565b9050600080856001600160a01b031663514ea4bf846040518263ffffffff1660e01b8152600401612c4591815260200190565b60a060405180830381865afa158015612c62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c869190615619565b505060028a015460018b01548b54939650919450612cbc93508503916001600160801b039182169082160316600160801b613f5f565b6004880180546001600160801b0380821690930183166001600160801b0319909116179055600388015460018901548954612d0793928503929182169082160316600160801b613f5f565b6004880180546001600160801b03600160801b808304821690940181169093029216919091179055600287019190915560039095019490945550505050565b60008060008360020b12612d5d578260020b612d65565b8260020b6000035b9050620d89e8811115612d8b576040516315e4079d60e11b815260040160405180910390fd5b600081600116600003612da257600160801b612db4565b6ffffcb933bd6fad37aa2d162d1a5940015b6001600160881b031690506002821615612dde576ffff97272373d413259a46990580e213a0260801c5b6004821615612dfd576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615612e1c576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615612e3b576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615612e5a576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615612e79576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615612e98576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615612eb8576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615612ed8576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615612ef8576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615612f18576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615612f38576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615612f58576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615612f78576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615612f98576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615612fb9576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615612fd9576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615612ff8576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615613015576b048a170391f7dc42444e8fa20260801c5b60008460020b131561303657806000198161303257613032615443565b0490505b600160201b81061561304957600161304c565b60005b60ff16602082901c0192505050919050565b6000826001600160a01b0316846001600160a01b0316111561307e579192915b836001600160a01b03166130b7606060ff16846001600160801b0316901b8686036001600160a01b0316866001600160a01b0316613f5f565b816130c4576130c4615443565b04949350505050565b6000826001600160a01b0316846001600160a01b031611156130ed579192915b613110826001600160801b03168585036001600160a01b0316600160601b613f5f565b949350505050565b6001600160a01b03831661317a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161070a565b33600061318684614011565b9050600061319384614011565b60408051602080820183526000918290528882528181528282206001600160a01b038b168352905220549091508481101561321c5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161070a565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a9052909290881691600080516020615d85833981519152910160405180910390a46040805160208101909152600090525b50505050505050565b6000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa1580156132c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132eb919061584f565b5094979650505050505050565b600080836001600160a01b0316856001600160a01b03161115613319579293925b846001600160a01b0316866001600160a01b0316116133445761333d85858561305e565b915061338b565b836001600160a01b0316866001600160a01b0316101561337d5761336986858561305e565b91506133768587856130cd565b905061338b565b6133888585856130cd565b90505b94509492505050565b81518351146133f65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161070a565b6001600160a01b03841661341c5760405162461bcd60e51b815260040161070a906159f1565b3360005b845181101561350357600085828151811061343d5761343d615585565b60200260200101519050600085838151811061345b5761345b615585565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156134ab5760405162461bcd60e51b815260040161070a90615a36565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906134e8908490615495565b92505081905550505050806134fc90615600565b9050613420565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613553929190615a80565b60405180910390a461356981878787878761405c565b505050505050565b6110ba81336141be565b61358582826123b9565b6110965760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556135bd3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61360b82826123b9565b156110965760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b613670614217565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516136aa9190615129565b60405180910390a1565b600081815260056020818152604080842081516101808101835281546001600160801b038082168352600160801b9182900481169583019590955260018301548516938201939093526002820154606082015260038201546080820152600482015480851660a083015292909204831660c0830152928301546001600160401b0380821660e08401819052600160401b90920490931661010083015260068401546001600160a01b0390811661012084015260079485015490811661014084015262ffffff600160a01b91829004166101608401529354919361379c93920490911690615a93565b6001600160401b031643106137b45750600092915050565b60075460e0820151600091600160a01b90046001600160401b0316906137da9043615ab5565b6001600160401b03168361010001516137f39190615ad5565b6137fd9190615b04565b826101000151613110919061546d565b613815612b55565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861369d3390565b6040516001600160601b0319606085901b16602082015260e883811b603483015282901b6037820152600090603a016040516020818303038152906040528051906020012090509392505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156138e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061390c91906156c6565b905061396d8463095ea7b360e01b856139258686615495565b6040516024016139369291906156df565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614260565b50505050565b600081815260056020526040812054610c8a90600160801b90046001600160801b031661399f846136b4565b6000858152600560205260409020546139c2906001600160801b0316600161555a565b6139cc919061546d565b6001600160801b038681169291166000613f0e565b6001600160a01b038416613a415760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161070a565b336000613a4d85614011565b90506000613a5a85614011565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290613a8c908490615495565b909155505060408051878152602081018790526001600160a01b03808a169260009291871691600080516020615d85833981519152910160405180910390a461327e83600089898989614335565b600081602001516001600160a01b031682600001516001600160a01b031610613b0257600080fd5b815160208084015160408086015181516001600160a01b0395861681860152949092168482015262ffffff90911660608085019190915281518085038201815260808501909252815191909201206001600160f81b031960a08401529085901b6001600160601b03191660a183015260b58201527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d582015260f50160408051601f1981840301815291905280516020909101209392505050565b6000836001600160a01b0316856001600160a01b03161115613bde579293925b846001600160a01b0316866001600160a01b031611613c0957613c028585856143f7565b9050613c79565b836001600160a01b0316866001600160a01b03161015613c6b576000613c308786866143f7565b90506000613c3f87898661445a565b9050806001600160801b0316826001600160801b031610613c605780613c62565b815b92505050613c79565b613c7685858461445a565b90505b95945050505050565b816001600160a01b0316836001600160a01b031603613cf55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161070a565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000613d6e8383613ada565b9050336001600160a01b0382161461073657600080fd5b306001600160a01b03841603613da557613da0848383614497565b61396d565b61396d848484846144b6565b6001600160a01b038416613dd75760405162461bcd60e51b815260040161070a906159f1565b336000613de385614011565b90506000613df085614011565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015613e335760405162461bcd60e51b815260040161070a90615a36565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613e70908490615495565b909155505060408051888152602081018890526001600160a01b03808b16928c82169291881691600080516020615d85833981519152910160405180910390a461164d848a8a8a8a8a614335565b60006001600160e01b03198216636cdb3d1360e11b1480613eef57506001600160e01b031982166303a24d0760e21b145b8061073657506301ffc9a760e01b6001600160e01b0319831614610736565b600080613f1c8686866144ee565b90506001836002811115613f3257613f32615b2a565b148015613f4f575060008480613f4a57613f4a615443565b868809115b15613c7957613c76600182615495565b6000808060001985870985870292508281108382030391505080600003613f985760008411613f8d57600080fd5b508290049050610c8a565b808411613fa457600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061404b5761404b615585565b602090810291909101015292915050565b61406e846001600160a01b03166145d8565b156135695760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906140a79089908990889088908890600401615b40565b6020604051808303816000875af19250505080156140e2575060408051601f3d908101601f191682019092526140df91810190615b9e565b60015b61418e576140ee615bbb565b806308c379a0036141275750614102615bd7565b8061410d5750614129565b8060405162461bcd60e51b815260040161070a9190614a1f565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161070a565b6001600160e01b0319811663bc197c8160e01b1461327e5760405162461bcd60e51b815260040161070a90615c60565b6141c882826123b9565b611096576141d5816145e7565b6141e08360206145f9565b6040516020016141f1929190615ca8565b60408051601f198184030181529082905262461bcd60e51b825261070a91600401614a1f565b60035460ff16612b9b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161070a565b60006142b5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166147949092919063ffffffff16565b90508051600014806142d65750808060200190518101906142d691906156f8565b6110175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161070a565b614347846001600160a01b03166145d8565b156135695760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906143809089908990889088908890600401615d17565b6020604051808303816000875af19250505080156143bb575060408051601f3d908101601f191682019092526143b891810190615b9e565b60015b6143c7576140ee615bbb565b6001600160e01b0319811663f23a6e6160e01b1461327e5760405162461bcd60e51b815260040161070a90615c60565b6000826001600160a01b0316846001600160a01b03161115614417579192915b600061443a856001600160a01b0316856001600160a01b0316600160601b613f5f565b9050613c7961445584838888036001600160a01b0316613f5f565b6147a3565b6000826001600160a01b0316846001600160a01b0316111561447a579192915b61311061445583600160601b8787036001600160a01b0316613f5f565b6110178363a9059cbb60e01b84846040516024016139369291906156df565b6040516001600160a01b038085166024830152831660448201526064810182905261396d9085906323b872dd60e01b90608401613936565b60008080600019858709858702925082811083820303915050806000036145285783828161451e5761451e615443565b0492505050610c8a565b80841161456f5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640161070a565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6001600160a01b03163b151590565b60606107366001600160a01b03831660145b60606000614608836002615424565b614613906002615495565b6001600160401b0381111561462a5761462a614b98565b6040519080825280601f01601f191660200182016040528015614654576020820181803683370190505b509050600360fc1b8160008151811061466f5761466f615585565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061469e5761469e615585565b60200101906001600160f81b031916908160001a90535060006146c2846002615424565b6146cd906001615495565b90505b6001811115614745576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061470157614701615585565b1a60f81b82828151811061471757614717615585565b60200101906001600160f81b031916908160001a90535060049490941c9361473e81615d51565b90506146d0565b508315610c8a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161070a565b606061311084846000856147be565b806001600160801b03811681146147b957600080fd5b919050565b60608247101561481f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161070a565b600080866001600160a01b0316858760405161483b9190615d68565b60006040518083038185875af1925050503d8060008114614878576040519150601f19603f3d011682016040523d82523d6000602084013e61487d565b606091505b509150915061488e87838387614899565b979650505050505050565b606083156149065782516000036148ff576148b3856145d8565b6148ff5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161070a565b5081613110565b613110838381511561410d5781518083602001fd5b6001600160a01b03811681146110ba57600080fd5b80356147b98161491b565b6000806040838503121561494e57600080fd5b82356149598161491b565b946020939093013593505050565b6001600160e01b0319811681146110ba57600080fd5b60006020828403121561498f57600080fd5b8135610c8a81614967565b6001600160401b0391909116815260200190565b6000602082840312156149c057600080fd5b5035919050565b60005b838110156149e25781810151838201526020016149ca565b8381111561396d5750506000910152565b60008151808452614a0b8160208601602086016149c7565b601f01601f19169290920160200192915050565b602081526000610c8a60208301846149f3565b60008083601f840112614a4457600080fd5b5081356001600160401b03811115614a5b57600080fd5b602083019150836020828501011115610fa857600080fd5b600080600060408486031215614a8857600080fd5b8335614a938161491b565b925060208401356001600160401b03811115614aae57600080fd5b614aba86828701614a32565b9497909650939450505050565b6001600160801b03811681146110ba57600080fd5b60008060408385031215614aef57600080fd5b823561495981614ac7565b60008060208385031215614b0d57600080fd5b82356001600160401b03811115614b2357600080fd5b614b2f85828601614a32565b90969095509350505050565b600081518084526020808501945080840160005b83811015614b6b57815187529582019590820190600101614b4f565b509495945050505050565b604081526000614b896040830185614b3b565b90508260208301529392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614bd357614bd3614b98565b6040525050565b60405161014081016001600160401b0381118282101715614bfd57614bfd614b98565b60405290565b60006001600160401b03821115614c1c57614c1c614b98565b5060051b60200190565b600082601f830112614c3757600080fd5b81356020614c4482614c03565b604051614c518282614bae565b83815260059390931b8501820192828101915086841115614c7157600080fd5b8286015b84811015614c8c5780358352918301918301614c75565b509695505050505050565b600082601f830112614ca857600080fd5b81356001600160401b03811115614cc157614cc1614b98565b604051614cd8601f8301601f191660200182614bae565b818152846020838601011115614ced57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614d2257600080fd5b8535614d2d8161491b565b94506020860135614d3d8161491b565b935060408601356001600160401b0380821115614d5957600080fd5b614d6589838a01614c26565b94506060880135915080821115614d7b57600080fd5b614d8789838a01614c26565b93506080880135915080821115614d9d57600080fd5b50614daa88828901614c97565b9150509295509295909350565b60008060408385031215614dca57600080fd5b823591506020830135614ddc8161491b565b809150509250929050565b60008060408385031215614dfa57600080fd5b82356001600160401b0380821115614e1157600080fd5b818501915085601f830112614e2557600080fd5b81356020614e3282614c03565b604051614e3f8282614bae565b83815260059390931b8501820192828101915089841115614e5f57600080fd5b948201945b83861015614e86578535614e778161491b565b82529482019490820190614e64565b96505086013592505080821115614e9c57600080fd5b50614ea985828601614c26565b9150509250929050565b602081526000610c8a6020830184614b3b565b8060020b81146110ba57600080fd5b80356147b981614ec6565b60008060008060808587031215614ef657600080fd5b8435614f018161491b565b93506020850135614f1181614ec6565b92506040850135614f2181614ec6565b91506060850135614f3181614ac7565b939692955090935050565b600060208284031215614f4e57600080fd5b8135610c8a8161491b565b6001600160a01b03169052565b600081518084526020808501945080840160005b83811015614b6b5781516001600160a01b031687529582019590820190600101614f7a565b604081526000614fb26040830185614f66565b8281036020840152613c798185614b3b565b62ffffff811681146110ba57600080fd5b80356147b981614fc4565b60006101408284031215614ff357600080fd5b614ffb614bda565b61500483614930565b815261501260208401614930565b602082015261502360408401614fd5565b604082015261503460608401614930565b606082015261504560808401614ed5565b608082015261505660a08401614ed5565b60a082015260c0838101359082015260e080840135908201526101008084013590820152610120928301359281019290925250919050565b80151581146110ba57600080fd5b600080604083850312156150af57600080fd5b82356150ba8161491b565b91506020830135614ddc8161508e565b6060815260006150dd6060830186614f66565b82810360208401526150ef8186614b3b565b915050826040830152949350505050565b60006020828403121561511257600080fd5b81356001600160401b0381168114610c8a57600080fd5b6001600160a01b0391909116815260200190565b6000806000806060858703121561515357600080fd5b843593506020850135925060408501356001600160401b0381111561517757600080fd5b61518387828801614a32565b95989497509550505050565b6001600160801b038d811682528c811660208301528b81166040830152606082018b9052608082018a905288811660a083015287811660c08301526001600160401b03871660e083015285166101008201526001600160a01b0384166101208201526101808101615204610140830185614f59565b62ffffff83166101608301529d9c50505050505050505050505050565b6000806040838503121561523457600080fd5b823561523f8161491b565b91506020830135614ddc8161491b565b600080600080600060a0868803121561526757600080fd5b85356152728161491b565b945060208601356152828161491b565b9350604086013592506060860135915060808601356001600160401b038111156152ab57600080fd5b614daa88828901614c97565b600181811c908216806152cb57607f821691505b6020821081036152eb57634e487b7160e01b600052602260045260246000fd5b50919050565b60006080828403121561530357600080fd5b604051608081016001600160401b038111828210171561532557615325614b98565b60405290508082356153368161491b565b8152602083013561534681614ec6565b6020820152604083013561535981614ec6565b6040820152606083013561536c81614ac7565b6060919091015292915050565b60006080828403121561538b57600080fd5b610c8a83836152f1565b6001600160a01b039485168152929093166020830152600290810b60408301529190910b606082015260800190565b600293840b81529190920b60208201526001600160801b03909116604082015260600190565b600080604083850312156153fd57600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561543e5761543e61540e565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261546857615468615443565b500490565b60006001600160801b038381169083168181101561548d5761548d61540e565b039392505050565b600082198211156154a8576154a861540e565b500190565b6001600160a01b03959095168552600293840b60208601529190920b60408401526001600160801b03918216606084015216608082015260a00190565b600080604083850312156154fd57600080fd5b825161550881614ac7565b6020840151909250614ddc81614ac7565b9586526001600160801b039490941660208601526001600160a01b03928316604086015291166060840152600290810b60808401520b60a082015260c00190565b60006001600160801b0382811684821680830382111561557c5761557c61540e565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b9182526001600160801b0316602082015260400190565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6000600182016156125761561261540e565b5060010190565b600080600080600060a0868803121561563157600080fd5b855161563c81614ac7565b809550506020860151935060408601519250606086015161565c81614ac7565b608087015190925061566d81614ac7565b809150509295509295909350565b60008060006060848603121561569057600080fd5b833561569b8161491b565b925060208401356156ab81614ec6565b915060408401356156bb81614ec6565b809150509250925092565b6000602082840312156156d857600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561570a57600080fd5b8151610c8a8161508e565b60006020828403121561572757600080fd5b8151610c8a8161491b565b60006020828403121561574457600080fd5b8151610c8a81614fc4565b600061014082019050615763828451614f59565b60208301516157756020840182614f59565b50604083015161578c604084018262ffffff169052565b50606083015161579f6060840182614f59565b5060808301516157b4608084018260020b9052565b5060a08301516157c960a084018260020b9052565b5060c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525092915050565b6000806000806080858703121561581257600080fd5b845161581d81614ac7565b8094505060208501519250604085015191506060850151614f318161491b565b805161ffff811681146147b957600080fd5b600080600080600080600060e0888a03121561586a57600080fd5b87516158758161491b565b602089015190975061588681614ec6565b95506158946040890161583d565b94506158a26060890161583d565b93506158b06080890161583d565b925060a088015160ff811681146158c657600080fd5b60c08901519092506158d78161508e565b8091505092959891949750929550565b6001600160a01b0386168152600285810b602083015284900b60408201526001600160801b038316606082015260a06080820181905260009061488e908301846149f3565b6000818303608081121561593f57600080fd5b604080519081016001600160401b03808211838310171561596257615962614b98565b81604052606084121561597457600080fd5b60a083019350818410818511171561598e5761598e614b98565b5082604052843592506159a08361491b565b9182526020840135916159b28361491b565b826060830152604085013592506159c883614fc4565b82608083015280825250606084013591506159e28261491b565b60208101919091529392505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000614fb26040830185614b3b565b60006001600160401b0382811684821680830382111561557c5761557c61540e565b60006001600160401b038381169083168181101561548d5761548d61540e565b60006001600160801b0382811684821681151582840482111615615afb57615afb61540e565b02949350505050565b60006001600160801b0383811680615b1e57615b1e615443565b92169190910492915050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0386811682528516602082015260a060408201819052600090615b6c90830186614b3b565b8281036060840152615b7e8186614b3b565b90508281036080840152615b9281856149f3565b98975050505050505050565b600060208284031215615bb057600080fd5b8151610c8a81614967565b600060033d1115615bd45760046000803e5060005160e01c5b90565b600060443d1015615be55790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715615c1457505050505090565b8285019150815181811115615c2c5750505050505090565b843d8701016020828501011115615c465750505050505090565b615c5560208286010187614bae565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351615cda8160178501602088016149c7565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615d0b8160288401602088016149c7565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061488e908301846149f3565b600081615d6057615d6061540e565b506000190190565b60008251615d7a8184602087016149c7565b919091019291505056fec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f627b2ab94bb7d45041581aa3757ae020084674ccad6f75dc3750eb2ea8a92c4e9a0a82b25974fd602b636b85d2a46fd7e8e40145d9a7739850ececf3c2b6eab34ca26469706673582212207f2be54bb6ed8fc7d1d504f3f73da6ad8136433bc335f28620b7bbc6624b1e7564736f6c634300080f0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984e34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564

-----Decoded View---------------
Arg [0] : _factory (address): 0x1F98431c8aD98523631AE4a59f267346ea31F984
Arg [1] : _pool_init_code_hash (bytes32): 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54
Arg [2] : _swapRouter (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Arg [1] : e34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54
Arg [2] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564


Deployed ByteCode Sourcemap

189497:32394:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;162566:292;;;;;;:::i;:::-;;:::i;:::-;;;755:25:1;;;743:2;728:18;162566:292:0;;;;;;;;221703:185;;;;;;:::i;:::-;;:::i;:::-;;;1342:14:1;;1335:22;1317:41;;1305:2;1290:18;221703:185:0;1177:187:1;192154:39:0;;;;;-1:-1:-1;;;192154:39:0;;-1:-1:-1;;;;;192154:39:0;;;;;;;;;;:::i;162310:105::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;199301:3126::-;;;;;;:::i;:::-;;:::i;146759:147::-;;;;;;:::i;:::-;;:::i;216672:174::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;4398:32:1;;;4380:51;;4368:2;4353:18;216672:174:0;4234:203:1;204861:2153:0;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;164633:438::-;;;;;;:::i;:::-;;:::i;:::-;;147216:172;;;;;;:::i;:::-;;:::i;148410:280::-;;;;;;:::i;:::-;;:::i;221504:88::-;;;:::i;207390:2198::-;;;;;;:::i;:::-;;:::i;163024:536::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;221345:84::-;;;:::i;220479:452::-;;;;;;:::i;:::-;;:::i;152317:86::-;152388:7;;;;152317:86;;211367:421;;;;;;:::i;:::-;;:::i;221072:200::-;;;;;;:::i;:::-;;:::i;212103:912::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;193312:5567::-;;;;;;:::i;:::-;;:::i;216275:174::-;;;;;;:::i;:::-;;:::i;192067:47::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;145207:172;;;;;;:::i;:::-;;:::i;185869:1354::-;;;;;;:::i;:::-;;:::i;:::-;;;;-1:-1:-1;;;;;14427:32:1;;;14409:51;;14491:2;14476:18;;14469:34;;;;14519:18;;;14512:34;-1:-1:-1;;;;;14582:32:1;14577:2;14562:18;;14555:60;14396:3;14381:19;185869:1354:0;14156:465:1;144270:49:0;;144315:4;144270:49;;163633:180;;;;;;:::i;:::-;;:::i;202847:1648::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;:::i;219787:258::-;;;;;;:::i;:::-;;:::i;184218:32::-;;;;;;;;;;;;:::i;192200:36::-;;;;;-1:-1:-1;;;;;192200:36:0;;;184978:512;;;;;;:::i;:::-;;:::i;147681:174::-;;;;;;:::i;:::-;;:::i;192013:47::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;192013:47:0;;;;-1:-1:-1;;;192013:47:0;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;192013:47:0;;;-1:-1:-1;;;192013:47:0;;;;;;;-1:-1:-1;;;;;192013:47:0;;;;;;;-1:-1:-1;;;192013:47:0;;;;;;;;;;;;;;;;;;;;;;;;:::i;184257:44::-;;;;;192245:52;;-1:-1:-1;;;;;;;;;;;192245:52:0;;163885:193;;;;;;:::i;:::-;-1:-1:-1;;;;;164033:27:0;;;164009:4;164033:27;;;:18;:27;;;;;;;;:37;;;;;;;;;;;;;;;163885:193;219414:226;;;;;;:::i;:::-;;:::i;164150:406::-;;;;;;:::i;:::-;;:::i;192304:51::-;;-1:-1:-1;;;;;;;;;;;192304:51:0;;162566:292;162677:7;-1:-1:-1;;;;;162719:21:0;;162697:113;;;;-1:-1:-1;;;162697:113:0;;19293:2:1;162697:113:0;;;19275:21:1;19332:2;19312:18;;;19305:30;19371:34;19351:18;;;19344:62;-1:-1:-1;;;19422:18:1;;;19415:40;19472:19;;162697:113:0;;;;;;;;;-1:-1:-1;162828:9:0;:13;;;;;;;;;;;-1:-1:-1;;;;;162828:22:0;;;;;;;;;;162566:292;;;;;:::o;221703:185::-;221820:4;221844:36;221868:11;221844:23;:36::i;162310:105::-;162370:13;162403:4;162396:11;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;162310:105;;;:::o;199301:3126::-;192441:10;199454:7;192425:27;;;:15;:27;;;;;;;;192420:107;;192474:53;;-1:-1:-1;;;192474:53:0;;;;;;;;;;;192420:107;151922:19:::1;:17;:19::i;:::-;199474:33:::2;199510:88;::::0;;::::2;199535:17:::0;199510:88:::2;:::i;:::-;199474:124;;199611:15;199720:4;199748:7;:12;;;199783:7;:17;;;199823:7;:17;;;199679:180;;;;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;199679:180:0;;::::2;::::0;;;;;;199651:223;;199679:180:::2;199651:223:::0;;::::2;::::0;199629:256:::2;199924:17:::0;;;:8:::2;:17:::0;;;;;;199997:14:::2;::::0;::::2;::::0;199651:223;;-1:-1:-1;199924:17:0;199629:256;199980:41:::2;::::0;199651:223;199980:16:::2;:41::i;:::-;200071:12:::0;;200103:17:::2;::::0;::::2;::::0;200135::::2;::::0;;::::2;::::0;200071:122;;-1:-1:-1;;;200071:122:0;;199954:67;;-1:-1:-1;200035:15:0::2;::::0;;;-1:-1:-1;;;;;200071:17:0::2;::::0;::::2;::::0;:122:::2;::::0;199954:67;;200071:122:::2;;;:::i;:::-;;::::0;::::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;200034:159;;;;200206:135;200236:3;200254:7;:12;;;200281:7;:17;;;200313:7;:17;;;200206:15;:135::i;:::-;200354:22;200387::::0;200437::::2;200462:211;200520:38;:7;:17;;;:36;;;:38::i;:::-;200577;:7;:17;;;:36;;;:38::i;:::-;200642:15;200462:39;:211::i;:::-;200437:236;;200690:22;200715:211;200773:38;:7;:17;;;:36;;;:38::i;:::-;200830;:7;:17;;;:36;;;:38::i;:::-;200895:15;200715:39;:211::i;:::-;200690:236;;200943:23;200969:214;201027:38;:7;:17;;;:36;;;:38::i;:::-;201084;:7;:17;;;:36;;;:38::i;:::-;201149:18:::0;;-1:-1:-1;;;;;201149:18:0::2;200969:39;:214::i;:::-;200943:240;;201200:23;201226:214;201284:38;:7;:17;;;:36;;;:38::i;:::-;201341;:7;:17;;;:36;;;:38::i;:::-;201406:18:::0;;-1:-1:-1;;;;;201406:18:0::2;201226:39;:214::i;:::-;201501:15;::::0;::::2;::::0;201200:240;;-1:-1:-1;201537:15:0;;201501:32:::2;::::0;201519:14;;-1:-1:-1;;;;;201501:15:0::2;:32;:::i;:::-;201500:52;;;;:::i;:::-;201626:15;::::0;::::2;::::0;201457:110;;-1:-1:-1;201662:15:0;;201626:32:::2;::::0;201644:14;;-1:-1:-1;;;201626:15:0;::::2;-1:-1:-1::0;;;;;201626:15:0::2;:32;:::i;:::-;201625:52;;;;:::i;:::-;201716:15;::::0;::::2;:33:::0;;201582:110;;-1:-1:-1;201735:14:0;;-1:-1:-1;201716:15:0;-1:-1:-1;201716:15:0::2;::::0;-1:-1:-1;201716:33:0::2;::::0;-1:-1:-1;201735:14:0;;-1:-1:-1;;;;;201716:33:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;201716:33:0::2;;;;;-1:-1:-1::0;;;;;201716:33:0::2;;;;;;201779:14;201760:3;:15;;;:33;;;;;;;;;;-1:-1:-1::0;;;;;201760:33:0::2;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;201760:33:0::2;;;;;-1:-1:-1::0;;;;;201760:33:0::2;;;;;;201806:7;:12;;;-1:-1:-1::0;;;;;201806:20:0::2;;201841:7;201863;:17;;;201895:7;:17;;;201945:14;-1:-1:-1::0;;;;;201935:24:0::2;:7;:24;;;;:::i;:::-;201983;-1:-1:-1::0;;;;;201983:24:0;::::2;:7:::0;:24:::2;:::i;:::-;201806:213;;;;;;;;;;;;;;;;;;;:::i;:::-;;::::0;::::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;202032:37:0;;202054:15;;202032:3;;:18:::2;::::0;:37:::2;::::0;202054:15;;-1:-1:-1;;;;;202032:37:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;202032:37:0::2;;;;;-1:-1:-1::0;;;;;202032:37:0::2;;;;;;202099:7;:14;;;202080:3;:15;;;:33;;;;;;;;;;-1:-1:-1::0;;;;;202080:33:0::2;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;202080:33:0::2;;;;;-1:-1:-1::0;;;;;202080:33:0::2;;;;;;202126:39;202132:7;202141;202150;:14;;;-1:-1:-1::0;;;;;202126:39:0::2;:5;:39::i;:::-;202183:202;202215:7;202237:15;202275:7;:12;;;202303:7;202325;:17;;;202357:7;:17;;;202183:202;;;;;;;;;;;:::i;:::-;;;;;;;;202404:7;:14;;;-1:-1:-1::0;;;;;202396:23:0::2;;;;;;;;;;;151952:1;199301:3126:::0;;;;;:::o;146759:147::-;146849:7;146876:12;;;:6;:12;;;;;:22;;;;146759:147::o;216672:174::-;216778:7;216805:33;216822:6;216830:7;216805:16;:33::i;204861:2153::-;192441:10;205044:7;192425:27;;;:15;:27;;;;;;205026:16;;205044:7;192425:27;;192420:107;;192474:53;;-1:-1:-1;;;192474:53:0;;;;;;;;;;;192420:107;151922:19:::1;:17;:19::i;:::-;205069:34:::2;205106:90;::::0;;::::2;205131:18:::0;205106:90:::2;:::i;:::-;205069:127;;205209:15;205318:4;205346:7;:12;;;205381:7;:17;;;205421:7;:17;;;205277:180;;;;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;205277:180:0;;::::2;::::0;;;;;;205249:223;;205277:180:::2;205249:223:::0;;::::2;::::0;205227:256:::2;205522:17:::0;;;:8:::2;:17:::0;;;;;;205685:12;;205249:223;;-1:-1:-1;205522:17:0;205227:256;;;205589:290:::2;::::0;205661:37:::2;::::0;:23:::2;:37::i;:::-;205717:38;:7;:17;;;:36;;;:38::i;:::-;205774;:7;:17;;;:36;;;:38::i;:::-;205839:7;:24;;;205589:53;:290::i;:::-;205947:454;::::0;;::::2;::::0;::::2;::::0;;206010:10:::2;::::0;::::2;::::0;-1:-1:-1;;;;;206010:10:0;;::::2;205947:454:::0;;206047:10:::2;::::0;::::2;::::0;;;::::2;205947:454;::::0;;::::2;::::0;;;;-1:-1:-1;;;206081:7:0;;::::2;;;205947:454:::0;;;;206126:4:::2;205947:454:::0;;;;206161:17;::::2;::::0;205947:454:::2;::::0;;::::2;::::0;;;;206208:17;;::::2;::::0;205947:454;;::::2;::::0;;;;;;;;;;;;;;;;206010:10:::2;205947:454:::0;;;;;;;;;;;;;-1:-1:-1;205947:454:0;-1:-1:-1;;;205920:492:0::2;::::0;:12:::2;:492::i;:::-;205892:520;;;;;206425:135;206455:3;206473:7;:12;;;206500:7;:17;;;206532:7;:17;;;206425:15;:135::i;:::-;206577:17;::::0;::::2;::::0;-1:-1:-1;;;;;206577:30:0;;::::2;:17:::0;::::2;:30;206573:215;;206624:17;::::0;::::2;:30:::0;;206645:9;;206624:17;::::2;::::0;:30:::2;::::0;206645:9;;-1:-1:-1;;;;;206624:30:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;206624:30:0::2;;;;;-1:-1:-1::0;;;;;206624:30:0::2;;;;;;206573:215;;;206722:17;::::0;::::2;::::0;206710:29:::2;::::0;-1:-1:-1;;;;;206722:17:0::2;206710:9:::0;:29:::2;:::i;:::-;206687:53:::0;;:3;;:18:::2;::::0;:53:::2;::::0;;;-1:-1:-1;;;;;206687:53:0::2;;:::i;:::-;::::0;;-1:-1:-1;;;;;206687:53:0;;::::2;;::::0;;;::::2;::::0;;::::2;::::0;;;::::2;;::::0;;::::2;;::::0;;-1:-1:-1;;206755:17:0;::::2;:21:::0;;-1:-1:-1;;;;;;206755:21:0::2;::::0;;206573:215:::2;206827:16;::::0;;206841:1:::2;206827:16:::0;;;;;::::2;::::0;;206800:24:::2;::::0;206827:16:::2;::::0;::::2;::::0;;::::2;::::0;::::2;;::::0;-1:-1:-1;206827:16:0::2;206800:43;;206867:7;206854;206862:1;206854:10;;;;;;;;:::i;:::-;;;;;;:20;;;::::0;::::2;206898:7;206885;206893:1;206885:10;;;;;;;;:::i;:::-;;;;;;:20;;;::::0;::::2;206923:36;206940:7;206949:9;206923:36;;;;;;;:::i;:::-;;;;;;;;206978:7:::0;-1:-1:-1;;;;;;206987:18:0::2;::::0;-1:-1:-1;;;;;;151952:1:0::2;204861:2153:::0;;;;;:::o;164633:438::-;-1:-1:-1;;;;;164866:20:0;;136291:10;164866:20;;:60;;-1:-1:-1;164890:36:0;164907:4;136291:10;163885:193;:::i;164890:36::-;164844:156;;;;-1:-1:-1;;;164844:156:0;;;;;;;:::i;:::-;165011:52;165034:4;165040:2;165044:3;165049:7;165058:4;165011:22;:52::i;:::-;164633:438;;;;;:::o;147216:172::-;147324:18;147337:4;147324:12;:18::i;:::-;144761:16;144772:4;144761:10;:16::i;:::-;147355:25:::1;147366:4;147372:7;147355:10;:25::i;:::-;147216:172:::0;;;:::o;148410:280::-;-1:-1:-1;;;;;148545:23:0;;136291:10;148545:23;148523:120;;;;-1:-1:-1;;;148523:120:0;;26328:2:1;148523:120:0;;;26310:21:1;26367:2;26347:18;;;26340:30;26406:34;26386:18;;;26379:62;-1:-1:-1;;;26457:18:1;;;26450:45;26512:19;;148523:120:0;26126:411:1;148523:120:0;148656:26;148668:4;148674:7;148656:11;:26::i;:::-;148410:280;;:::o;221504:88::-;-1:-1:-1;;;;;;;;;;;144761:16:0;144772:4;144761:10;:16::i;:::-;221574:10:::1;:8;:10::i;:::-;221504:88:::0;:::o;207390:2198::-;192441:10;207562:7;192425:27;;;:15;:27;;;;;;207544:16;;207562:7;192425:27;;192420:107;;192474:53;;-1:-1:-1;;;192474:53:0;;;;;;;;;;;192420:107;151922:19:::1;:17;:19::i;:::-;207587:27:::2;207617:39;::::0;;::::2;207628:11:::0;207617:39:::2;:::i;:::-;207587:69;;207669:15;207778:4;207806:7;:12;;;207841:7;:17;;;207881:7;:17;;;207737:180;;;;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;207737:180:0;;::::2;::::0;;;;;;207709:223;;207737:180:::2;207709:223:::0;;::::2;::::0;207687:256:::2;207982:17:::0;;;:8:::2;:17:::0;;;;;;208145:12;;207709:223;;-1:-1:-1;207982:17:0;207687:256;;;208049:291:::2;::::0;208121:37:::2;::::0;:23:::2;:37::i;208049:291::-;208408:454;::::0;;::::2;::::0;::::2;::::0;;208471:10:::2;::::0;::::2;::::0;-1:-1:-1;;;;;208471:10:0;;::::2;208408:454:::0;;208508:10:::2;::::0;::::2;::::0;;;::::2;208408:454;::::0;;::::2;::::0;;;;-1:-1:-1;;;208542:7:0;;::::2;;;208408:454:::0;;;;208587:4:::2;208408:454:::0;;;;208622:17;::::2;::::0;208408:454:::2;::::0;;::::2;::::0;;;;208669:17;;::::2;::::0;208408:454;;::::2;::::0;;;;;;;;;;;;;;;;208471:10:::2;208408:454:::0;;;;;;;;;;;;;-1:-1:-1;208408:454:0;-1:-1:-1;;;208381:492:0::2;::::0;:12:::2;:492::i;:::-;208353:520;;;;;208886:135;208916:3;208934:7;:12;;;208961:7;:17;;;208993:7;:17;;;208886:15;:135::i;:::-;209034:31:::0;;209056:9;;209034:3;;:18:::2;::::0;:31:::2;::::0;209056:9;;-1:-1:-1;;;;;209034:31:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;209034:31:0::2;;;;;-1:-1:-1::0;;;;;209034:31:0::2;;;;;;209157:9;209130:24;209146:7;209130:15;:24::i;:::-;:36;;;;:::i;:::-;209107:20;::::0;::::2;:59:::0;;-1:-1:-1;;;;;209205:12:0::2;209179:39:::0;::::2;-1:-1:-1::0;;;;;;;;;;;209107:59:0;;;::::2;-1:-1:-1::0;;;209107:59:0::2;209179:39:::0;;;;-1:-1:-1;;;;;;209179:39:0;;;;;;;;;;::::2;::::0;;209107:20:::2;209235:22:::0;::::2;:27:::0;209231:145:::2;;209301:22;::::0;;209279:19:::2;:44:::0;;-1:-1:-1;;;;;;;;209279:44:0::2;-1:-1:-1::0;;;;;209301:22:0;::::2;-1:-1:-1::0;;;209279:44:0::2;;::::0;;-1:-1:-1;;;;;;209338:26:0::2;::::0;;209231:145:::2;209415:16;::::0;;209429:1:::2;209415:16:::0;;;;;::::2;::::0;;209388:24:::2;::::0;209415:16:::2;::::0;::::2;::::0;;::::2;::::0;::::2;;::::0;-1:-1:-1;209415:16:0::2;209388:43;;209455:7;209442;209450:1;209442:10;;;;;;;;:::i;:::-;;;;;;:20;;;::::0;::::2;209486:7;209473;209481:1;209473:10;;;;;;;;:::i;:::-;;;;;;:20;;;::::0;::::2;209511:31;209523:7;209532:9;209511:31;;;;;;;:::i;163024:536::-:0;163160:16;163230:3;:10;163211:8;:15;:29;163189:120;;;;-1:-1:-1;;;163189:120:0;;26993:2:1;163189:120:0;;;26975:21:1;27032:2;27012:18;;;27005:30;27071:34;27051:18;;;27044:62;-1:-1:-1;;;27122:18:1;;;27115:39;27171:19;;163189:120:0;26791:405:1;163189:120:0;163322:30;163369:8;:15;-1:-1:-1;;;;;163355:30:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;163355:30:0;;163322:63;;163403:9;163398:122;163422:8;:15;163418:1;:19;163398:122;;;163478:30;163488:8;163497:1;163488:11;;;;;;;;:::i;:::-;;;;;;;163501:3;163505:1;163501:6;;;;;;;;:::i;:::-;;;;;;;163478:9;:30::i;:::-;163459:13;163473:1;163459:16;;;;;;;;:::i;:::-;;;;;;;;;;:49;163439:3;;;:::i;:::-;;;163398:122;;;-1:-1:-1;163539:13:0;163024:536;-1:-1:-1;;;163024:536:0:o;221345:84::-;-1:-1:-1;;;;;;;;;;;144761:16:0;144772:4;144761:10;:16::i;:::-;221413:8:::1;:6;:8::i;220479:452::-:0;-1:-1:-1;;;;;;;;;;;144761:16:0;144772:4;144761:10;:16::i;:::-;220676:42:::1;::::0;-1:-1:-1;;;220676:42:0;;-1:-1:-1;;;;;220676:9:0;::::1;::::0;::::1;::::0;:42:::1;::::0;220686:9;;220697;;220708;;220676:42:::1;;;:::i;:::-;;::::0;::::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;220736:10;220748::::0;220762:4:::1;-1:-1:-1::0;;;;;220762:14:0::1;;220791:56;220819:4;220826:9;220837;220791:19;:56::i;:::-;220762:96;;;;;;;;;;;;;755:25:1::0;;743:2;728:18;;609:177;220762:96:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;220869:54;::::0;-1:-1:-1;;;220869:54:0;;220729:129;;-1:-1:-1;220729:129:0;-1:-1:-1;;;;;;220869:12:0;::::1;::::0;-1:-1:-1;220869:12:0::1;::::0;-1:-1:-1;220869:54:0::1;::::0;-1:-1:-1;220882:10:0::1;::::0;220894:9;;220905;;220729:129;;;;220869:54:::1;;;:::i;:::-;;::::0;::::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;220665:266;;220479:452:::0;;;;;:::o;211367:421::-;211458:27;;;;211556:86;;;;211581:5;211556:86;:::i;:::-;211498:144;;;;;;211730:4;211737;211743:9;211754;211711:53;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;211711:53:0;;;;;;;;;211701:64;;211711:53;211701:64;;;;;211367:421;-1:-1:-1;;;;;;211367:421:0:o;221072:200::-;-1:-1:-1;;;;;;;;;;;144761:16:0;144772:4;144761:10;:16::i;:::-;221215:38:::1;::::0;-1:-1:-1;;;221215:38:0;;-1:-1:-1;;;;;221153:22:0;::::1;::::0;::::1;::::0;221190:10:::1;::::0;221153:22;;221215:23:::1;::::0;:38:::1;::::0;221247:4:::1;::::0;221215:38:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;221153:111;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;212103:912::-:0;212205:16;;212252:33;212288:88;;;;212313:17;212288:88;:::i;:::-;212252:124;;212390:15;212407;212426:283;212498:37;212522:7;:12;;;212498:23;:37::i;:::-;212554:38;:7;:17;;;:36;;;:38::i;:::-;212611;:7;:17;;;:36;;;:38::i;:::-;212676:7;:17;;;212426:53;:283::i;:::-;212748:16;;;212762:1;212748:16;;;;;;;;212389:320;;-1:-1:-1;212389:320:0;;-1:-1:-1;212722:23:0;;212762:1;212748:16;;;;;;;;;;-1:-1:-1;212748:16:0;212722:42;;212787:7;:12;;;-1:-1:-1;;;;;212787:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;212775:6;212782:1;212775:9;;;;;;;;:::i;:::-;;;;;;:33;-1:-1:-1;;;;;212775:33:0;;;-1:-1:-1;;;;;212775:33:0;;;;;212831:7;:12;;;-1:-1:-1;;;;;212831:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;212819:6;212826:1;212819:9;;;;;;;;:::i;:::-;-1:-1:-1;;;;;212819:33:0;;;;:9;;;;;;;;;;:33;212892:16;;;212906:1;212892:16;;;;;;;;212865:24;;212892:16;;212906:1;;212892:16;;;;;;;;;-1:-1:-1;212892:16:0;212865:43;;212932:7;212919;212927:1;212919:10;;;;;;;;:::i;:::-;;;;;;:20;;;;;212963:7;212950;212958:1;212950:10;;;;;;;;:::i;:::-;;;;;;;;;;:20;212991:6;;;;-1:-1:-1;212103:912:0;-1:-1:-1;;;;;;212103:912:0:o;193312:5567::-;192441:10;193465:20;192425:27;;;:15;:27;;;;;;;;192420:107;;192474:53;;-1:-1:-1;;;192474:53:0;;;;;;;;;;;192420:107;151922:19:::1;:17;:19::i;:::-;193498:33:::2;193534:88;::::0;;::::2;193559:17:::0;193534:88:::2;:::i;:::-;193498:124;;193635:15;193744:4;193772:7;:12;;;193807:7;:17;;;193847:7;:17;;;193703:180;;;;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;193703:180:0;;::::2;::::0;;;;;;193675:223;;193703:180:::2;193675:223:::0;;::::2;::::0;193653:256:::2;193948:17:::0;;;:8:::2;:17:::0;;;;;193982:10:::2;::::0;::::2;::::0;193675:223;;-1:-1:-1;193948:17:0;-1:-1:-1;;;;;193982:10:0::2;193978:183;;194036:7;:12;;;-1:-1:-1::0;;;;;194036:19:0::2;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;194023:3;:10;;;:34;;;;;-1:-1:-1::0;;;;;194023:34:0::2;;;;;-1:-1:-1::0;;;;;194023:34:0::2;;;;;;194085:7;:12;;;-1:-1:-1::0;;;;;194085:19:0::2;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;194072:3;:10;;;:34;;;;;-1:-1:-1::0;;;;;194072:34:0::2;;;;;-1:-1:-1::0;;;;;194072:34:0::2;;;;;;194131:7;:12;;;-1:-1:-1::0;;;;;194131:16:0::2;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;194121:3;:7;;;:28;;;;;;;;;;;;;;;;;;193978:183;194174:15;194191::::0;194210:283:::2;194282:37;194306:7;:12;;;194282:23;:37::i;194210:283::-;194173:320;;;;194520:1;194510:7;:11;:26;;;;;194535:1;194525:7;:11;194510:26;194506:100;;;194558:48;;-1:-1:-1::0;;;194558:48:0::2;;;;;;;;;;;194506:100;194674:454;::::0;;::::2;::::0;::::2;::::0;;194737:10:::2;::::0;::::2;::::0;-1:-1:-1;;;;;194737:10:0;;::::2;194674:454:::0;;194774:10:::2;::::0;::::2;::::0;;;::::2;194674:454;::::0;;::::2;::::0;;;;-1:-1:-1;;;194808:7:0;;::::2;;;194674:454:::0;;;;194853:4:::2;194674:454:::0;;;;194888:17;::::2;::::0;194674:454:::2;::::0;;::::2;::::0;;;;194935:17;;::::2;::::0;194674:454;;::::2;::::0;;;;;;;;;;;;;;;;194737:10:::2;194674:454:::0;;;;;;;;;;;-1:-1:-1;;194647:492:0::2;::::0;:12:::2;:492::i;:::-;194619:520;;;;;195152:135;195182:3;195200:7;:12;;;195227:7;:17;;;195259:7;:17;;;195152:15;:135::i;:::-;195304:15:::0;;-1:-1:-1;;;195304:15:0;::::2;-1:-1:-1::0;;;;;195304:15:0::2;:19:::0;195300:3304:::2;;195374:15;::::0;::::2;::::0;-1:-1:-1;;;;;195374:15:0::2;:19:::0;;;:42:::2;;-1:-1:-1::0;195397:15:0::2;::::0;::::2;::::0;-1:-1:-1;;;195397:15:0;::::2;-1:-1:-1::0;;;;;195397:15:0::2;:19:::0;;195374:42:::2;195370:2879;;;195464:12:::0;;195543:17:::2;::::0;::::2;::::0;195583::::2;::::0;;::::2;::::0;195631:15:::2;::::0;;::::2;::::0;195464:249;;-1:-1:-1;;;195464:249:0;;195438:10:::2;::::0;;;-1:-1:-1;;;;;195464:20:0;;::::2;::::0;::::2;::::0;:249:::2;::::0;195515:4:::2;::::0;195583:17;;-1:-1:-1;;;;;195631:15:0;;::::2;::::0;-1:-1:-1;;;195678:15:0;;::::2;;::::0;195464:249:::2;;:::i;:::-;;::::0;::::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;195772:1;195735:15;::::0;::::2;195734:43:::0;;;-1:-1:-1;;;;;195437:276:0;;::::2;::::0;-1:-1:-1;195437:276:0;::::2;::::0;-1:-1:-1;195815:11:0;;;;;195887:27:::2;;195913:1;195908:2;:6;195887:27;;;195904:1;195899:2;:6;195887:27;195883:937;;;196069:10;::::0;195939:218:::2;::::0;-1:-1:-1;;;;;196069:10:0::2;196111:9:::0;:19:::2;;196128:2;196111:19;;;196123:2;196111:19;195946:9;:35;;195971:10;::::0;::::2;::::0;-1:-1:-1;;;;;195971:10:0::2;195946:35;;;195958:10;::::0;::::2;::::0;-1:-1:-1;;;;;195958:10:0::2;195946:35;-1:-1:-1::0;;;;;195939:91:0::2;::::0;:218;:91:::2;:218::i;:::-;196194:10;::::0;196248:529:::2;::::0;;196194:10:::2;196248:529:::0;::::2;::::0;;;-1:-1:-1;;;;;196194:10:0;;::::2;::::0;:27:::2;::::0;196248:529;196323:9;:35:::2;;196348:10;::::0;::::2;::::0;-1:-1:-1;;;;;196348:10:0::2;196323:35;;;196335:10;::::0;::::2;::::0;-1:-1:-1;;;;;196335:10:0::2;196323:35;-1:-1:-1::0;;;;;196248:529:0::2;;;;;196399:9;:35;;196424:10;::::0;::::2;::::0;-1:-1:-1;;;;;196424:10:0::2;196399:35;;;196411:10;::::0;::::2;::::0;-1:-1:-1;;;;;196411:10:0::2;196399:35;-1:-1:-1::0;;;;;196248:529:0::2;::::0;;196470:7:::2;::::0;::::2;::::0;-1:-1:-1;;;196470:7:0;::::2;;;196248:529;::::0;::::2;::::0;196527:4:::2;196248:529:::0;;;;196573:15:::2;196248:529:::0;;;;;;196629:9;:19:::2;;196646:2;196629:19;;;196641:2;196629:19;196248:529:::0;;196697:1:::2;196248:529;::::0;;::::2;::::0;;;;;;;;;;;196194:606;;::::2;::::0;;;-1:-1:-1;;;;;;196194:606:0;;;30307:13:1;;-1:-1:-1;;;;;30303:22:1;;;196194:606:0::2;::::0;::::2;30285:41:1::0;30374:17;;;30368:24;30364:33;;30342:20;;;30335:63;30446:17;;;30440:24;30466:8;30436:39;30414:20;;;30407:69;30536:4;30524:17;;30518:24;30514:33;;30492:20;;;30485:63;30604:4;30592:17;;30586:24;30564:20;;;30557:54;30265:3;30655:17;;30649:24;30627:20;;;30620:54;30730:4;30718:17;;30712:24;30690:20;;;30683:54;30785:17;;;;30779:24;30775:33;30753:20;;;30746:63;30219:19;;196194:606:0::2;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;196182:618;;195883:937;197074:804;::::0;;::::2;::::0;::::2;::::0;;197153:10:::2;::::0;::::2;::::0;-1:-1:-1;;;;;197153:10:0;;::::2;197074:804:::0;;197206:10:::2;::::0;::::2;::::0;;;::::2;197074:804;::::0;;::::2;::::0;;;;-1:-1:-1;;;197256:7:0;;::::2;;;197074:804:::0;;;;196998:4:::2;197074:804:::0;;;;;;197368:17;;::::2;::::0;197074:804:::2;::::0;;::::2;::::0;;;;197431:17;;::::2;::::0;197074:804;;::::2;::::0;;;;-1:-1:-1;;196998:4:0;196954:89:::2;::::0;197074:804;;;197542:9;:25:::2;;197566:1;197542:25;;;197554:9;197542:25;197499:69;::::0;:2;:69:::2;:::i;:::-;197074:804;;;;197662:9;:25;;197678:9;197662:25;;;197674:1;197662:25;197619:69;::::0;:2;:69:::2;:::i;:::-;197074:804;;;;197741:9;:25;;197765:1;197741:25;;;197753:9;197741:25;197735:32;::::0;:2;:32:::2;:::i;:::-;197074:804;;;;197820:9;:25;;197836:9;197820:25;;;197832:1;197820:25;197814:32;::::0;:2;:32:::2;:::i;:::-;197074:804;;::::0;196954:951:::2;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;197924:34:0;;196840:1065;;-1:-1:-1;196840:1065:0;;197924:3;;-1:-1:-1;197924:18:0::2;::::0;:34:::2;::::0;196840:1065;;-1:-1:-1;;;;;197924:34:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;197924:34:0::2;;;;;-1:-1:-1::0;;;;;197924:34:0::2;;;;;;197984:249;198029:4;198057:7;:12;;;198092:7;198122;:17;;;198162:7;:17;;;198202:12;197984:249;;;;;;;;;;-1:-1:-1::0;;;;;32871:15:1;;;32853:34;;32923:15;;;;32918:2;32903:18;;32896:43;32970:2;32955:18;;32948:34;;;;33029:1;33018:21;;;33013:2;32998:18;;32991:49;33077:21;33071:3;33056:19;;33049:50;-1:-1:-1;;;;;33136:32:1;;;;32833:3;33115:19;;33108:61;32802:3;32787:19;;32514:661;197984:249:0::2;;;;;;;;195418:2831;;;;;195370:2879;198265:14;198282:36;198299:9;198310:7;198282:16;:36::i;:::-;198335:31:::0;;198265:53;;-1:-1:-1;198357:9:0;;198335:3;;:18:::2;::::0;:31:::2;::::0;198357:9;;-1:-1:-1;;;;;198335:31:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;198335:31:0::2;;;;;-1:-1:-1::0;;;;;198335:31:0::2;;;;;;198400:6;198381:3;:15;;;:25;;;;;;;;;;-1:-1:-1::0;;;;;198381:25:0::2;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;198381:25:0::2;;;;;-1:-1:-1::0;;;;;198381:25:0::2;;;;;;198438:6;-1:-1:-1::0;;;;;198423:21:0::2;;;195325:3131;195300:3304;;;198477:31:::0;;198499:9;;198477:3;;:18:::2;::::0;:31:::2;::::0;198499:9;;-1:-1:-1;;;;;198477:31:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;198477:31:0::2;;;;;-1:-1:-1::0;;;;;198477:31:0::2;;;;;;198542:9;198523:3;:15;;;:28;;;;;;;;;;-1:-1:-1::0;;;;;198523:28:0::2;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;198523:28:0::2;;;;;-1:-1:-1::0;;;;;198523:28:0::2;;;;;;198583:9;-1:-1:-1::0;;;;;198568:24:0::2;;;195300:3304;198616:41;198622:7;198631;198640:12;198616:41;;;;;;;;;;;::::0;:5:::2;:41::i;:::-;198675:196;198707:7;198729:9;198761:7;:12;;;198789:7;198811;:17;;;198843:7;:17;;;198675:196;;;;;;;;;;;:::i;:::-;;;;;;;;193487:5392;;;;;;193312:5567:::0;;;;;:::o;216275:174::-;216381:7;216408:33;216425:6;216433:7;216408:16;:33::i;145207:172::-;145318:4;145342:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;145342:29:0;;;;;;;;;;;;;;;145207:172::o;185869:1354::-;185989:17;186021:15;186051;186081:19;186128:22;186153:122;;;;;;;;186184:6;:13;;;-1:-1:-1;;;;;186153:122:0;;;;;186220:6;:13;;;-1:-1:-1;;;;;186153:122:0;;;;;186253:6;:10;;;186153:122;;;;;186128:147;;186310:32;186325:7;186334;186310:14;:32::i;:::-;186288:55;;186413:20;186449:4;-1:-1:-1;;;;;186449:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;186412:49;;;;;;;;186476:21;186500:77;186546:6;:16;;;186500:27;:77::i;:::-;186476:101;;186592:21;186616:77;186662:6;:16;;;186616:27;:77::i;:::-;186592:101;;186722:229;186780:12;186811:13;186843;186875:6;:21;;;186915:6;:21;;;186722:39;:229::i;:::-;186710:241;;186397:566;;;186996:4;-1:-1:-1;;;;;186996:9:0;;187020:6;:16;;;187051:6;:16;;;187082:6;:16;;;187113:9;187148:55;;;;;;;;187175:7;187148:55;;;;187191:10;-1:-1:-1;;;;;187148:55:0;;;;187137:67;;;;;;;34498:13:1;;34580:9;;-1:-1:-1;;;;;34576:18:1;;;34558:37;;34651:4;34643:13;;;34637:20;34633:29;;34611:20;;;34604:59;34719:4;34711:13;;;34705:20;34727:8;34701:35;34679:20;;;34672:65;;;;34785:17;;34779:24;34775:33;;;34768:4;34753:20;;34746:63;34475:3;34460:19;;34273:542;187137:67:0;;;;;;;;;;;;;186996:219;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;185869:1354;;186975:240;;-1:-1:-1;185869:1354:0;;-1:-1:-1;185869:1354:0;;-1:-1:-1;;185869:1354:0:o;163633:180::-;163753:52;136291:10;163786:8;163796;163753:18;:52::i;202847:1648::-;192441:10;203047:7;192425:27;;;:15;:27;;;;;;203011:16;;;;192425:27;;192420:107;;192474:53;;-1:-1:-1;;;192474:53:0;;;;;;;;;;;192420:107;151922:19:::1;:17;:19::i;:::-;203072:32:::2;203107:89;::::0;;::::2;203132:19:::0;203107:89:::2;:::i;:::-;203072:124;;203207:15;203316:4;203344:7;:12;;;203379:7;:17;;;203419:7;:17;;;203275:180;;;;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;203275:180:0;;::::2;::::0;;;;;;203247:223;;203275:180:::2;203247:223:::0;;::::2;::::0;203225:256:::2;203520:17:::0;;;:8:::2;:17:::0;;;;;203587:12;;203619:17;;::::2;::::0;203651;;::::2;::::0;203691:22:::2;::::0;::::2;::::0;-1:-1:-1;;;203587:138:0;;203247:223;;-1:-1:-1;203520:17:0;;203225:256;;;;-1:-1:-1;;;;;203587:17:0::2;::::0;::::2;::::0;:138:::2;::::0;203651:17;203691:22;203587:138:::2;;;:::i;:::-;;::::0;::::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;203550:175;;;;203738:7;:12;;;-1:-1:-1::0;;;;;203738:20:0::2;;203773:10;203798:7;:17;;;203830:7;:17;;;203870:7;203901;203738:182;;;;;;;;;;;;;;;;;;;:::i;:::-;;::::0;::::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;203933:135;203963:3;203981:7;:12;;;204008:7;:17;;;204040:7;:17;;;203933:15;:135::i;:::-;204102:22;::::0;::::2;::::0;204081:17:::2;::::0;::::2;:43:::0;;:17:::2;::::0;:43:::2;::::0;204102:22;;-1:-1:-1;;;;;204081:43:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;204081:43:0::2;;;;;-1:-1:-1::0;;;;;204081:43:0::2;;;;;;204137:23;204177:1;-1:-1:-1::0;;;;;204163:16:0::2;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;-1:-1:-1;204163:16:0::2;-1:-1:-1::0;204202:10:0::2;::::0;::::2;::::0;204190:9;;204137:42;;-1:-1:-1;;;;;;204202:10:0::2;::::0;204137:42;;204202:10:::2;::::0;204190:9:::2;;;;:::i;:::-;-1:-1:-1::0;;;;;204190:22:0;;::::2;:9;::::0;;::::2;::::0;;;;;:22;204235:10:::2;::::0;::::2;::::0;204223:9;;204235:10;::::2;::::0;204223:6;;204235:10;;204223:9;::::2;;;;;:::i;:::-;-1:-1:-1::0;;;;;204223:22:0;;;::::2;:9;::::0;;::::2;::::0;;;;;;:22;204285:16:::2;::::0;;204299:1:::2;204285:16:::0;;;;;::::2;::::0;;204258:24:::2;::::0;204285:16;;204299:1;;204285:16;::::2;::::0;;::::2;::::0;::::2;;::::0;-1:-1:-1;204285:16:0::2;204258:43;;204325:7;204312;204320:1;204312:10;;;;;;;;:::i;:::-;;;;;;:20;;;::::0;::::2;204356:7;204343;204351:1;204343:10;;;;;;;;:::i;:::-;;;;;;:20;;;::::0;::::2;204381:47;204396:7;204405;:22;;;204381:47;;;;;;;:::i;:::-;;;;;;;;204464:22;::::0;;;::::2;::::0;204447:6;;204464:22;;-1:-1:-1;;;;;;204439:48:0::2;::::0;-1:-1:-1;202847:1648:0;;-1:-1:-1;;;;;;;202847:1648:0:o;219787:258::-;144315:4;144761:16;144315:4;144761:10;:16::i;:::-;219919:22:::1;:48:::0;;-1:-1:-1;;;;;;219919:48:0::1;-1:-1:-1::0;;;;;219919:48:0;::::1;;::::0;;219983:54:::1;::::0;::::1;::::0;::::1;::::0;219919:48;;219983:54:::1;:::i;:::-;;;;;;;;219787:258:::0;;:::o;184978:512::-;185135:31;185169:36;;;;185180:4;185169:36;:::i;:::-;185135:70;;185216:40;185231:7;185240;:15;;;185216:14;:40::i;:::-;-1:-1:-1;185273:15:0;;185269:101;;185307:15;;:22;185331:13;;;;185303:67;;185307:22;185346:10;185358:11;185303:3;:67::i;:::-;185385:15;;185381:101;;185415:67;185419:7;:15;;;:22;;;185443:7;:13;;;185458:10;185470:11;185415:3;:67::i;147681:174::-;147790:18;147803:4;147790:12;:18::i;:::-;144761:16;144772:4;144761:10;:16::i;:::-;147821:26:::1;147833:4;147839:7;147821:11;:26::i;219414:226::-:0;144315:4;144761:16;144315:4;144761:10;:16::i;:::-;-1:-1:-1;;;;;219547:21:0;::::1;;::::0;;;:15:::1;:21;::::0;;;;;;;;:31;;-1:-1:-1;;219547:31:0::1;::::0;::::1;;::::0;;::::1;::::0;;;219594:38;;37067:51:1;;;37134:18;;;37127:50;219594:38:0::1;::::0;37040:18:1;219594:38:0::1;;;;;;;219414:226:::0;;;:::o;164150:406::-;-1:-1:-1;;;;;164358:20:0;;136291:10;164358:20;;:60;;-1:-1:-1;164382:36:0;164399:4;136291:10;163885:193;:::i;164382:36::-;164336:156;;;;-1:-1:-1;;;164336:156:0;;;;;;;:::i;:::-;164503:45;164521:4;164527:2;164531;164535:6;164543:4;164503:17;:45::i;144869:246::-;144970:4;-1:-1:-1;;;;;;145007:47:0;;-1:-1:-1;;;145007:47:0;;:100;;;145071:36;145095:11;145071:23;:36::i;152476:108::-;152388:7;;;;152546:9;152538:38;;;;-1:-1:-1;;;152538:38:0;;37390:2:1;152538:38:0;;;37372:21:1;37429:2;37409:18;;;37402:30;-1:-1:-1;;;37448:18:1;;;37441:46;37504:18;;152538:38:0;37188:340:1;152538:38:0;152476:108::o;217726:432::-;217833:7;217899:236;218001:24;218017:7;218001:15;:24::i;:::-;217936:17;;;;:8;:17;;;;;:32;:36;;-1:-1:-1;;;;;217936:32:0;;:36;:::i;:::-;217935:90;;;;:::i;:::-;218048:17;;;;:8;:17;;;;;:29;-1:-1:-1;;;;;217899:13:0;;;;:236;;;-1:-1:-1;;;218048:29:0;;;218100:16;217899:13;:236::i;209898:1252::-;210070:19;210092:108;210134:4;210154:10;210179;210092:19;:108::i;:::-;210070:130;;210241:32;210288;210352:5;-1:-1:-1;;;;;210352:15:0;;210368:11;210352:28;;;;;;;;;;;;;755:25:1;;743:2;728:18;;609:177;210352:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;210527:29:0;;;;210601:18;;;;210579:19;;210211:169;;-1:-1:-1;210211:169:0;;-1:-1:-1;210462:217:0;;-1:-1:-1;210500:56:0;;;-1:-1:-1;;;;;210601:18:0;;;210579:19;;;:40;210462:217;-1:-1:-1;;;210462:15:0;:217::i;:::-;210416:16;;;:278;;-1:-1:-1;;;;;210416:278:0;;;;;;;;-1:-1:-1;;;;;;210416:278:0;;;;;;210820:29;;;;210416:278;210894:18;;;210872:19;;210755:217;;210793:56;;;;210894:18;;;210872:19;;;:40;210755:217;-1:-1:-1;;;210755:15:0;:217::i;:::-;210709:16;;;:278;;-1:-1:-1;;;;;;;;210709:278:0;;;;;;;;;;;;;;;;;;;;;211004:29;;;:56;;;;211075:29;;;;:56;;;;-1:-1:-1;;;;209898:1252:0:o;30940:3199::-;31019:20;31077:15;31102:1;31095:4;:8;;;:91;;31180:4;31173:12;;31095:91;;;31139:4;31132:12;;31131:13;;31095:91;31077:109;-1:-1:-1;30201:9:0;31205:35;;31201:51;;;31249:3;;-1:-1:-1;;;31249:3:0;;;;;;;;;;;31201:51;31269:13;31285:7;31295:3;31285:13;31302:1;31285:18;:127;;-1:-1:-1;;;31285:127:0;;;31323:34;31285:127;-1:-1:-1;;;;;31269:143:0;;-1:-1:-1;31441:3:0;31431:13;;:18;31427:100;;31485:34;31477:42;31524:3;31476:51;31427:100;31556:3;31546:13;;:18;31542:100;;31600:34;31592:42;31639:3;31591:51;31542:100;31671:3;31661:13;;:18;31657:100;;31715:34;31707:42;31754:3;31706:51;31657:100;31786:4;31776:14;;:19;31772:101;;31831:34;31823:42;31870:3;31822:51;31772:101;31902:4;31892:14;;:19;31888:101;;31947:34;31939:42;31986:3;31938:51;31888:101;32018:4;32008:14;;:19;32004:101;;32063:34;32055:42;32102:3;32054:51;32004:101;32134:4;32124:14;;:19;32120:101;;32179:34;32171:42;32218:3;32170:51;32120:101;32250:5;32240:15;;:20;32236:102;;32296:34;32288:42;32335:3;32287:51;32236:102;32367:5;32357:15;;:20;32353:102;;32413:34;32405:42;32452:3;32404:51;32353:102;32484:5;32474:15;;:20;32470:102;;32530:34;32522:42;32569:3;32521:51;32470:102;32601:5;32591:15;;:20;32587:102;;32647:34;32639:42;32686:3;32638:51;32587:102;32718:6;32708:16;;:21;32704:103;;32765:34;32757:42;32804:3;32756:51;32704:103;32836:6;32826:16;;:21;32822:103;;32883:34;32875:42;32922:3;32874:51;32822:103;32954:6;32944:16;;:21;32940:103;;33001:34;32993:42;33040:3;32992:51;32940:103;33072:6;33062:16;;:21;33058:103;;33119:34;33111:42;33158:3;33110:51;33058:103;33190:7;33180:17;;:22;33176:103;;33238:33;33230:41;33276:3;33229:50;33176:103;33308:7;33298:17;;:22;33294:102;;33356:32;33348:40;33393:3;33347:49;33294:102;33425:7;33415:17;;:22;33411:100;;33473:30;33465:38;33508:3;33464:47;33411:100;33540:7;33530:17;;:22;33526:95;;33588:25;33580:33;33618:3;33579:42;33526:95;33649:1;33642:4;:8;;;33638:47;;;33680:5;-1:-1:-1;;33660:25:0;;;;;:::i;:::-;;33652:33;;33638:47;-1:-1:-1;;;34074:5:0;:17;:22;:30;;34103:1;34074:30;;;34099:1;34074:30;34057:48;;34067:2;34058:5;:11;;34057:48;34016:104;;31052:3080;;30940:3199;;;:::o;129063:588::-;129217:15;129290:13;-1:-1:-1;;;;;129274:29:0;:13;-1:-1:-1;;;;;129274:29:0;;129270:115;;;129356:13;;129371;129270:115;129619:13;-1:-1:-1;;;;;129426:206:0;:190;124132:2;129464:45;;129472:9;-1:-1:-1;;;;;129464:18:0;:45;;129548:13;129532;:29;-1:-1:-1;;;;;129426:190:0;129584:13;-1:-1:-1;;;;;129426:190:0;:15;:190::i;:::-;:206;;;;;:::i;:::-;;;129063:588;-1:-1:-1;;;;129063:588:0:o;130016:531::-;130170:15;130218:13;-1:-1:-1;;;;;130202:29:0;:13;-1:-1:-1;;;;;130202:29:0;;130198:111;;;130280:13;;130295;130198:111;130371:157;130409:9;-1:-1:-1;;;;;130371:157:0;130457:13;130441;:29;-1:-1:-1;;;;;130371:157:0;-1:-1:-1;;;130371:15:0;:157::i;:::-;130347:181;130016:531;-1:-1:-1;;;;130016:531:0:o;172001:774::-;-1:-1:-1;;;;;172094:18:0;;172086:66;;;;-1:-1:-1;;;172086:66:0;;37735:2:1;172086:66:0;;;37717:21:1;37774:2;37754:18;;;37747:30;37813:34;37793:18;;;37786:62;-1:-1:-1;;;37864:18:1;;;37857:33;37907:19;;172086:66:0;37533:399:1;172086:66:0;136291:10;172165:16;172230:21;172248:2;172230:17;:21::i;:::-;172207:44;;172262:24;172289:25;172307:6;172289:17;:25::i;:::-;172327:66;;;;;;;;;-1:-1:-1;172327:66:0;;;;172428:13;;;;;;;;;-1:-1:-1;;;;;172428:19:0;;;;;;;;172262:52;;-1:-1:-1;172466:21:0;;;;172458:70;;;;-1:-1:-1;;;172458:70:0;;38139:2:1;172458:70:0;;;38121:21:1;38178:2;38158:18;;;38151:30;38217:34;38197:18;;;38190:62;-1:-1:-1;;;38268:18:1;;;38261:34;38312:19;;172458:70:0;37937:400:1;172458:70:0;172564:9;:13;;;;;;;;;;;-1:-1:-1;;;;;172564:19:0;;;;;;;;;;;;172586:20;;;172564:42;;172635:54;;38516:25:1;;;38557:18;;;38550:34;;;172564:19:0;;172635:54;;;;-1:-1:-1;;;;;;;;;;;172635:54:0;38489:18:1;172635:54:0;;;;;;;172702:65;;;;;;;;;172746:1;172702:65;;;172075:700;;;;172001:774;;;:::o;218408:175::-;218501:20;218563:4;-1:-1:-1;;;;;218563:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;218534:41:0;;218408:175;-1:-1:-1;;;;;;;218408:175:0:o;131098:1092::-;131283:15;131300;131348:13;-1:-1:-1;;;;;131332:29:0;:13;-1:-1:-1;;;;;131332:29:0;;131328:111;;;131410:13;;131425;131328:111;131472:13;-1:-1:-1;;;;;131456:29:0;:12;-1:-1:-1;;;;;131456:29:0;;131452:731;;131512:129;131553:13;131585;131617:9;131512:22;:129::i;:::-;131502:139;;131452:731;;;131678:13;-1:-1:-1;;;;;131663:28:0;:12;-1:-1:-1;;;;;131663:28:0;;131659:524;;;131718:128;131759:12;131790:13;131822:9;131718:22;:128::i;:::-;131708:138;;131871:128;131912:13;131944:12;131975:9;131871:22;:128::i;:::-;131861:138;;131659:524;;;132042:129;132083:13;132115;132147:9;132042:22;:129::i;:::-;132032:139;;131659:524;131098:1092;;;;;;;:::o;166904:1321::-;167145:7;:14;167131:3;:10;:28;167109:118;;;;-1:-1:-1;;;167109:118:0;;38797:2:1;167109:118:0;;;38779:21:1;38836:2;38816:18;;;38809:30;38875:34;38855:18;;;38848:62;-1:-1:-1;;;38926:18:1;;;38919:38;38974:19;;167109:118:0;38595:404:1;167109:118:0;-1:-1:-1;;;;;167246:16:0;;167238:66;;;;-1:-1:-1;;;167238:66:0;;;;;;;:::i;:::-;136291:10;167317:16;167434:470;167458:3;:10;167454:1;:14;167434:470;;;167490:10;167503:3;167507:1;167503:6;;;;;;;;:::i;:::-;;;;;;;167490:19;;167524:14;167541:7;167549:1;167541:10;;;;;;;;:::i;:::-;;;;;;;;;;;;167568:19;167590:13;;;;;;;;;;-1:-1:-1;;;;;167590:19:0;;;;;;;;;;;;167541:10;;-1:-1:-1;167650:21:0;;;;167624:125;;;;-1:-1:-1;;;167624:125:0;;;;;;;:::i;:::-;167793:9;:13;;;;;;;;;;;-1:-1:-1;;;;;167793:19:0;;;;;;;;;;167815:20;;;167793:42;;167865:17;;;;;;;:27;;167815:20;;167793:9;167865:27;;167815:20;;167865:27;:::i;:::-;;;;;;;;167475:429;;;167470:3;;;;:::i;:::-;;;167434:470;;;;167951:2;-1:-1:-1;;;;;167921:47:0;167945:4;-1:-1:-1;;;;;167921:47:0;167935:8;-1:-1:-1;;;;;167921:47:0;;167955:3;167960:7;167921:47;;;;;;;:::i;:::-;;;;;;;;168053:164;168103:8;168126:4;168145:2;168162:3;168180:7;168202:4;168053:35;:164::i;:::-;167098:1127;166904:1321;;;;;:::o;145683:105::-;145750:30;145761:4;136291:10;145750;:30::i;150069:238::-;150153:22;150161:4;150167:7;150153;:22::i;:::-;150148:152;;150192:12;;;;:6;:12;;;;;;;;-1:-1:-1;;;;;150192:29:0;;;;;;;;;:36;;-1:-1:-1;;150192:36:0;150224:4;150192:36;;;150275:12;136291:10;;136211:98;150275:12;-1:-1:-1;;;;;150248:40:0;150266:7;-1:-1:-1;;;;;150248:40:0;150260:4;150248:40;;;;;;;;;;150069:238;;:::o;150487:239::-;150571:22;150579:4;150585:7;150571;:22::i;:::-;150567:152;;;150642:5;150610:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;150610:29:0;;;;;;;;;;:37;;-1:-1:-1;;150610:37:0;;;150667:40;136291:10;;150610:12;;150667:40;;150642:5;150667:40;150487:239;;:::o;153172:120::-;152181:16;:14;:16::i;:::-;153231:7:::1;:15:::0;;-1:-1:-1;;153231:15:0::1;::::0;;153262:22:::1;136291:10:::0;153271:12:::1;153262:22;;;;;;:::i;:::-;;;;;;;;153172:120::o:0;215627:425::-;215692:7;215737:17;;;:8;:17;;;;;;;;215712:42;;;;;;;;;-1:-1:-1;;;;;215712:42:0;;;;;-1:-1:-1;;;215712:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;215712:42:0;;;;;;;;;-1:-1:-1;;;215712:42:0;;;;;;;;;;;;;;-1:-1:-1;;;;;215712:42:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;215712:42:0;;;;;;;;;215806:19;;215712:42;;215787:38;;215806:19;;;;;;215787:38;:::i;:::-;-1:-1:-1;;;;;215771:54:0;:12;:54;215767:68;;-1:-1:-1;215834:1:0;;215627:425;-1:-1:-1;;215627:425:0:o;215767:68::-;215991:19;;215957:16;;;;215848:22;;-1:-1:-1;;;215991:19:0;;-1:-1:-1;;;;;215991:19:0;;215934:39;;215941:12;215934:39;:::i;:::-;-1:-1:-1;;;;;215910:64:0;:3;:20;;;:64;;;;:::i;:::-;215909:101;;;;:::i;:::-;215873:3;:20;;;:137;;;;:::i;152913:118::-;151922:19;:17;:19::i;:::-;152973:7:::1;:14:::0;;-1:-1:-1;;152973:14:0::1;152983:4;152973:14;::::0;;153003:20:::1;153010:12;136291:10:::0;;136211:98;218952:226;219124:45;;-1:-1:-1;;;;;;41471:2:1;41442:15;;;41438:45;219124::0;;;41426:58:1;41518:3;41514:16;;;41500:12;;;41493:38;41561:16;;;41547:12;;;41540:38;219087:7:0;;41594:12:1;;219124:45:0;;;;;;;;;;;;219114:56;;;;;;219107:63;;218952:226;;;;;:::o;113239:420::-;113393:39;;-1:-1:-1;;;113393:39:0;;113417:4;113393:39;;;41829:34:1;-1:-1:-1;;;;;41899:15:1;;;41879:18;;;41872:43;113370:20:0;;113393:15;;;;;;41764:18:1;;113393:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;113370:62;-1:-1:-1;113443:208:0;113477:5;-1:-1:-1;;;113579:7:0;113605:20;113620:5;113370:62;113605:20;:::i;:::-;113497:143;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;113497:143:0;;;;;;;;;;;;;;-1:-1:-1;;;;;113497:143:0;-1:-1:-1;;;;;;113497:143:0;;;;;;;;;;113443:19;:208::i;:::-;113359:300;113239:420;;;:::o;217069:434::-;217176:7;217278:17;;;:8;:17;;;;;:29;217242:238;;-1:-1:-1;;;217278:29:0;;-1:-1:-1;;;;;217278:29:0;217396:24;217278:17;217396:15;:24::i;:::-;217331:17;;;;:8;:17;;;;;:32;:36;;-1:-1:-1;;;;;217331:32:0;;:36;:::i;:::-;217330:90;;;;:::i;:::-;-1:-1:-1;;;;;217242:13:0;;;;:238;;217443:18;217242:13;:238::i;169543:818::-;-1:-1:-1;;;;;169696:16:0;;169688:62;;;;-1:-1:-1;;;169688:62:0;;42128:2:1;169688:62:0;;;42110:21:1;42167:2;42147:18;;;42140:30;42206:34;42186:18;;;42179:62;-1:-1:-1;;;42257:18:1;;;42250:31;42298:19;;169688:62:0;41926:397:1;169688:62:0;136291:10;169763:16;169828:21;169846:2;169828:17;:21::i;:::-;169805:44;;169860:24;169887:25;169905:6;169887:17;:25::i;:::-;169860:52;;170004:9;:13;;;;;;;;;;;-1:-1:-1;;;;;170004:17:0;;;;;;;;;:27;;170025:6;;170004:9;:27;;170025:6;;170004:27;:::i;:::-;;;;-1:-1:-1;;170047:52:0;;;38516:25:1;;;38572:2;38557:18;;38550:34;;;-1:-1:-1;;;;;170047:52:0;;;;170080:1;;170047:52;;;;-1:-1:-1;;;;;;;;;;;170047:52:0;38489:18:1;170047:52:0;;;;;;;170190:163;170235:8;170266:1;170283:2;170300;170317:6;170338:4;170190:30;:163::i;188098:694::-;188208:12;188254:3;:10;;;-1:-1:-1;;;;;188241:23:0;:3;:10;;;-1:-1:-1;;;;;188241:23:0;;188233:32;;;;;;188576:10;;188588;;;;;188600:7;;;;;188565:43;;-1:-1:-1;;;;;42584:15:1;;;188565:43:0;;;42566:34:1;42636:15;;;;42616:18;;;42609:43;42700:8;42688:21;;;42668:18;;;;42661:49;;;;188565:43:0;;;;;;;;;42501:18:1;;;188565:43:0;;;188521:118;;;;;;;-1:-1:-1;;;;;;188397:319:0;;;43007:26:1;43066:15;;;;-1:-1:-1;;;;;;43062:45:1;43049:11;;;43042:66;43124:12;;;43117:28;188670:19:0;43161:12:1;;;43154:28;43198:12;;188397:319:0;;;-1:-1:-1;;188397:319:0;;;;;;;;;188361:378;;188397:319;188361:378;;;;;188098:694;-1:-1:-1;;;188098:694:0:o;127501:1197::-;127710:17;127760:13;-1:-1:-1;;;;;127744:29:0;:13;-1:-1:-1;;;;;127744:29:0;;127740:111;;;127822:13;;127837;127740:111;127884:13;-1:-1:-1;;;;;127868:29:0;:12;-1:-1:-1;;;;;127868:29:0;;127864:827;;127926:127;127967:13;127999;128031:7;127926:22;:127::i;:::-;127914:139;;127864:827;;;128090:13;-1:-1:-1;;;;;128075:28:0;:12;-1:-1:-1;;;;;128075:28:0;;128071:620;;;128120:18;128141:126;128182:12;128213:13;128245:7;128141:22;:126::i;:::-;128120:147;;128282:18;128303:126;128344:13;128376:12;128407:7;128303:22;:126::i;:::-;128282:147;;128471:10;-1:-1:-1;;;;;128458:23:0;:10;-1:-1:-1;;;;;128458:23:0;;:49;;128497:10;128458:49;;;128484:10;128458:49;128446:61;;128105:414;;128071:620;;;128552:127;128593:13;128625;128657:7;128552:22;:127::i;:::-;128540:139;;128071:620;127501:1197;;;;;;;:::o;174223:331::-;174378:8;-1:-1:-1;;;;;174369:17:0;:5;-1:-1:-1;;;;;174369:17:0;;174361:71;;;;-1:-1:-1;;;174361:71:0;;43423:2:1;174361:71:0;;;43405:21:1;43462:2;43442:18;;;43435:30;43501:34;43481:18;;;43474:62;-1:-1:-1;;;43552:18:1;;;43545:39;43601:19;;174361:71:0;43221:405:1;174361:71:0;-1:-1:-1;;;;;174443:25:0;;;;;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;:46;;-1:-1:-1;;174443:46:0;;;;;;;;;;174505:41;;1317::1;;;174505::0;;1290:18:1;174505:41:0;;;;;;;174223:331;;;:::o;189064:257::-;189178:19;189232:33;189247:8;189257:7;189232:14;:33::i;:::-;189210:56;-1:-1:-1;189285:10:0;-1:-1:-1;;;;;189285:27:0;;;189277:36;;;;;187420:381;187606:4;-1:-1:-1;;;;;187589:22:0;;;187585:209;;187628:55;187658:5;187666:9;187677:5;187628:22;:55::i;:::-;187585:209;;;187716:66;187750:5;187758;187765:9;187776:5;187716:26;:66::i;165535:1011::-;-1:-1:-1;;;;;165723:16:0;;165715:66;;;;-1:-1:-1;;;165715:66:0;;;;;;;:::i;:::-;136291:10;165794:16;165859:21;165877:2;165859:17;:21::i;:::-;165836:44;;165891:24;165918:25;165936:6;165918:17;:25::i;:::-;165891:52;;166029:19;166051:13;;;;;;;;;;;-1:-1:-1;;;;;166051:19:0;;;;;;;;;;166103:21;;;;166081:113;;;;-1:-1:-1;;;166081:113:0;;;;;;;:::i;:::-;166230:9;:13;;;;;;;;;;;-1:-1:-1;;;;;166230:19:0;;;;;;;;;;166252:20;;;166230:42;;166294:17;;;;;;;:27;;166252:20;;166230:9;166294:27;;166252:20;;166294:27;:::i;:::-;;;;-1:-1:-1;;166339:46:0;;;38516:25:1;;;38572:2;38557:18;;38550:34;;;-1:-1:-1;;;;;166339:46:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;166339:46:0;38489:18:1;166339:46:0;;;;;;;166470:68;166501:8;166511:4;166517:2;166521;166525:6;166533:4;166470:30;:68::i;161573:326::-;161691:4;-1:-1:-1;;;;;;161728:41:0;;-1:-1:-1;;;161728:41:0;;:110;;-1:-1:-1;;;;;;;161786:52:0;;-1:-1:-1;;;161786:52:0;161728:110;:163;;;-1:-1:-1;;;;;;;;;;142286:40:0;;;161855:36;142161:173;92865:348;93009:7;93029:14;93046:25;93053:1;93056;93059:11;93046:6;:25::i;:::-;93029:42;-1:-1:-1;93098:11:0;93086:8;:23;;;;;;;;:::i;:::-;;:56;;;;;93141:1;93126:11;93113:25;;;;;:::i;:::-;93123:1;93120;93113:25;:29;93086:56;93082:100;;;93159:11;93169:1;93159:11;;:::i;118996:4221::-;119112:14;;;-1:-1:-1;;119685:1:0;119682;119675:20;119729:1;119726;119722:9;119713:18;;119785:5;119781:2;119778:13;119770:5;119766:2;119762:14;119758:34;119749:43;;;119890:5;119899:1;119890:10;119886:209;;119943:1;119929:11;:15;119921:24;;;;;;-1:-1:-1;120006:23:0;;;;-1:-1:-1;120066:13:0;;119886:209;120238:5;120224:11;:19;120216:28;;;;;;120553:17;120639:11;120636:1;120633;120626:25;121042:12;121058:15;;;121057:31;;121197:22;;;;;122092:1;122073;:15;;122072:21;;122339:17;;;122335:21;;122328:28;122402:17;;;122398:21;;122391:28;122466:17;;;122462:21;;122455:28;122530:17;;;122526:21;;122519:28;122594:17;;;122590:21;;122583:28;122659:17;;;122655:21;;;122648:28;121620:12;;;;121616:23;;;121641:1;121612:31;120788:20;;;120777:32;;;121681:12;;;;120836:21;;;;121346:16;;;;121672:21;;;;123159:11;;;;;-1:-1:-1;;118996:4221:0;;;;;:::o;178805:214::-;178941:16;;;178955:1;178941:16;;;;;;;;;178887;;178916:22;;178941:16;;;;;;;;;;;;-1:-1:-1;178941:16:0;178916:41;;178979:7;178968:5;178974:1;178968:8;;;;;;;;:::i;:::-;;;;;;;;;;:18;179006:5;178805:214;-1:-1:-1;;178805:214:0:o;177822:975::-;178062:15;:2;-1:-1:-1;;;;;178062:13:0;;:15::i;:::-;178058:732;;;178115:203;;-1:-1:-1;;;178115:203:0;;-1:-1:-1;;;;;178115:43:0;;;;;:203;;178181:8;;178212:4;;178239:3;;178265:7;;178295:4;;178115:203;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;178115:203:0;;;;;;;;-1:-1:-1;;178115:203:0;;;;;;;;;;;;:::i;:::-;;;178094:685;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;178652:6;178645:14;;-1:-1:-1;;;178645:14:0;;;;;;;;:::i;178094:685::-;;;178701:62;;-1:-1:-1;;;178701:62:0;;45911:2:1;178701:62:0;;;45893:21:1;45950:2;45930:18;;;45923:30;45989:34;45969:18;;;45962:62;-1:-1:-1;;;46040:18:1;;;46033:50;46100:19;;178701:62:0;45709:416:1;178094:685:0;-1:-1:-1;;;;;;178403:60:0;;-1:-1:-1;;;178403:60:0;178377:199;;178506:50;;-1:-1:-1;;;178506:50:0;;;;;;;:::i;146078:492::-;146167:22;146175:4;146181:7;146167;:22::i;:::-;146162:401;;146355:28;146375:7;146355:19;:28::i;:::-;146456:38;146484:4;146491:2;146456:19;:38::i;:::-;146260:257;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;146260:257:0;;;;;;;;;;-1:-1:-1;;;146206:345:0;;;;;;;:::i;152661:108::-;152388:7;;;;152720:41;;;;-1:-1:-1;;;152720:41:0;;47532:2:1;152720:41:0;;;47514:21:1;47571:2;47551:18;;;47544:30;-1:-1:-1;;;47590:18:1;;;47583:50;47650:18;;152720:41:0;47330:344:1;116408:723:0;116832:23;116858:106;116900:4;116858:106;;;;;;;;;;;;;;;;;116866:5;-1:-1:-1;;;;;116858:27:0;;;:106;;;;;:::i;:::-;116832:132;;116997:10;:17;117018:1;116997:22;:56;;;;117034:10;117023:30;;;;;;;;;;;;:::i;:::-;116975:148;;;;-1:-1:-1;;;116975:148:0;;47881:2:1;116975:148:0;;;47863:21:1;47920:2;47900:18;;;47893:30;47959:34;47939:18;;;47932:62;-1:-1:-1;;;48010:18:1;;;48003:40;48060:19;;116975:148:0;47679:406:1;176916:898:0;177131:15;:2;-1:-1:-1;;;;;177131:13:0;;:15::i;:::-;177127:680;;;177184:196;;-1:-1:-1;;;177184:196:0;;-1:-1:-1;;;;;177184:38:0;;;;;:196;;177245:8;;177276:4;;177303:2;;177328:6;;177357:4;;177184:196;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;177184:196:0;;;;;;;;-1:-1:-1;;177184:196:0;;;;;;;;;;;;:::i;:::-;;;177163:633;;;;:::i;:::-;-1:-1:-1;;;;;;177443:55:0;;-1:-1:-1;;;177443:55:0;177439:154;;177523:50;;-1:-1:-1;;;177523:50:0;;;;;;;:::i;125113:737::-;125265:17;125315:13;-1:-1:-1;;;;;125299:29:0;:13;-1:-1:-1;;;;;125299:29:0;;125295:111;;;125377:13;;125392;125295:111;125417:20;125440:113;125470:13;-1:-1:-1;;;;;125440:113:0;125498:13;-1:-1:-1;;;;;125440:113:0;-1:-1:-1;;;125440:15:0;:113::i;:::-;125417:136;;125613:218;125645:167;125687:7;125721:12;125776:13;125760;:29;-1:-1:-1;;;;;125645:167:0;:15;:167::i;:::-;125613:9;:218::i;126297:594::-;126449:17;126499:13;-1:-1:-1;;;;;126483:29:0;:13;-1:-1:-1;;;;;126483:29:0;;126479:111;;;126561:13;;126576;126479:111;126650:222;126682:171;126724:7;-1:-1:-1;;;126817:13:0;126801;:29;-1:-1:-1;;;;;126682:171:0;:15;:171::i;111376:214::-;111459:123;111493:5;111536:23;;;111561:2;111565:5;111513:58;;;;;;;;;:::i;111835:285::-;112033:68;;-1:-1:-1;;;;;48914:15:1;;;112033:68:0;;;48896:34:1;48966:15;;48946:18;;;48939:43;48998:18;;;48991:34;;;111979:133:0;;112013:5;;-1:-1:-1;;;112056:27:0;48831:18:1;;112033:68:0;48656:375:1;88402:4326:0;88518:14;;;-1:-1:-1;;89063:1:0;89060;89053:20;89107:1;89104;89100:9;89091:18;;89163:5;89159:2;89156:13;89148:5;89144:2;89140:14;89136:34;89127:43;;;89269:5;89278:1;89269:10;89265:373;;89611:11;89603:5;:19;;;;;:::i;:::-;;89596:26;;;;;;89265:373;89765:5;89751:11;:19;89743:53;;;;-1:-1:-1;;;89743:53:0;;49238:2:1;89743:53:0;;;49220:21:1;49277:2;49257:18;;;49250:30;-1:-1:-1;;;49296:18:1;;;49289:51;49357:18;;89743:53:0;49036:345:1;89743:53:0;90059:17;90197:11;90194:1;90191;90184:25;91604:1;90756;90741:12;;:16;;90726:32;;90864:22;;;;91585:1;:15;;91584:21;;91841;;;91837:25;;91826:36;91911:21;;;91907:25;;91896:36;91982:21;;;91978:25;;91967:36;92053:21;;;92049:25;;92038:36;92124:21;;;92120:25;;92109:36;92196:21;;;92192:25;;;92181:36;;;90711:12;91115;;;91111:23;;;91107:31;;;90314:20;;;90303:32;;;91231:12;;;;90362:21;;90965:16;;;;91222:21;;;;92666:15;;;-1:-1:-1;;;;88402:4326:0:o;101596:326::-;-1:-1:-1;;;;;101891:19:0;;:23;;;101596:326::o;140163:151::-;140221:13;140254:52;-1:-1:-1;;;;;140266:22:0;;137907:2;139534:472;139634:13;139660:19;139692:10;139696:6;139692:1;:10;:::i;:::-;:14;;139705:1;139692:14;:::i;:::-;-1:-1:-1;;;;;139682:25:0;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;139682:25:0;;139660:47;;-1:-1:-1;;;139718:6:0;139725:1;139718:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;139718:15:0;;;;;;;;;-1:-1:-1;;;139744:6:0;139751:1;139744:9;;;;;;;;:::i;:::-;;;;:15;-1:-1:-1;;;;;139744:15:0;;;;;;;;-1:-1:-1;139775:9:0;139787:10;139791:6;139787:1;:10;:::i;:::-;:14;;139800:1;139787:14;:::i;:::-;139775:26;;139770:131;139807:1;139803;:5;139770:131;;;-1:-1:-1;;;139851:5:0;139859:3;139851:11;139842:21;;;;;;;:::i;:::-;;;;139830:6;139837:1;139830:9;;;;;;;;:::i;:::-;;;;:33;-1:-1:-1;;;;;139830:33:0;;;;;;;;-1:-1:-1;139888:1:0;139878:11;;;;;139810:3;;;:::i;:::-;;;139770:131;;;-1:-1:-1;139919:10:0;;139911:55;;;;-1:-1:-1;;;139911:55:0;;49729:2:1;139911:55:0;;;49711:21:1;;;49748:18;;;49741:30;49807:34;49787:18;;;49780:62;49859:18;;139911:55:0;49527:356:1;104546:229:0;104683:12;104715:52;104737:6;104745:4;104751:1;104754:12;104715:21;:52::i;124525:112::-;124627:1;-1:-1:-1;;;;;124607:21:0;;;;124599:30;;;;;;124525:112;;;:::o;105762:612::-;105932:12;106004:5;105979:21;:30;;105957:118;;;;-1:-1:-1;;;105957:118:0;;50090:2:1;105957:118:0;;;50072:21:1;50129:2;50109:18;;;50102:30;50168:34;50148:18;;;50141:62;-1:-1:-1;;;50219:18:1;;;50212:36;50265:19;;105957:118:0;49888:402:1;105957:118:0;106087:12;106101:23;106128:6;-1:-1:-1;;;;;106128:11:0;106147:5;106168:4;106128:55;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;106086:97;;;;106214:152;106259:6;106284:7;106310:10;106339:12;106214:26;:152::i;:::-;106194:172;105762:612;-1:-1:-1;;;;;;;105762:612:0:o;108892:644::-;109077:12;109106:7;109102:427;;;109134:10;:17;109155:1;109134:22;109130:290;;109352:18;109363:6;109352:10;:18::i;:::-;109344:60;;;;-1:-1:-1;;;109344:60:0;;50776:2:1;109344:60:0;;;50758:21:1;50815:2;50795:18;;;50788:30;50854:31;50834:18;;;50827:59;50903:18;;109344:60:0;50574:353:1;109344:60:0;-1:-1:-1;109441:10:0;109434:17;;109102:427;109484:33;109492:10;109504:12;110264:17;;:21;110260:388;;110496:10;110490:17;110553:15;110540:10;110536:2;110532:19;110525:44;14:131:1;-1:-1:-1;;;;;89:31:1;;79:42;;69:70;;135:1;132;125:12;150:134;218:20;;247:31;218:20;247:31;:::i;289:315::-;357:6;365;418:2;406:9;397:7;393:23;389:32;386:52;;;434:1;431;424:12;386:52;473:9;460:23;492:31;517:5;492:31;:::i;:::-;542:5;594:2;579:18;;;;566:32;;-1:-1:-1;;;289:315:1:o;791:131::-;-1:-1:-1;;;;;;865:32:1;;855:43;;845:71;;912:1;909;902:12;927:245;985:6;1038:2;1026:9;1017:7;1013:23;1009:32;1006:52;;;1054:1;1051;1044:12;1006:52;1093:9;1080:23;1112:30;1136:5;1112:30;:::i;1369:200::-;-1:-1:-1;;;;;1531:31:1;;;;1513:50;;1501:2;1486:18;;1369:200::o;1574:180::-;1633:6;1686:2;1674:9;1665:7;1661:23;1657:32;1654:52;;;1702:1;1699;1692:12;1654:52;-1:-1:-1;1725:23:1;;1574:180;-1:-1:-1;1574:180:1:o;1759:258::-;1831:1;1841:113;1855:6;1852:1;1849:13;1841:113;;;1931:11;;;1925:18;1912:11;;;1905:39;1877:2;1870:10;1841:113;;;1972:6;1969:1;1966:13;1963:48;;;-1:-1:-1;;2007:1:1;1989:16;;1982:27;1759:258::o;2022:::-;2064:3;2102:5;2096:12;2129:6;2124:3;2117:19;2145:63;2201:6;2194:4;2189:3;2185:14;2178:4;2171:5;2167:16;2145:63;:::i;:::-;2262:2;2241:15;-1:-1:-1;;2237:29:1;2228:39;;;;2269:4;2224:50;;2022:258;-1:-1:-1;;2022:258:1:o;2285:220::-;2434:2;2423:9;2416:21;2397:4;2454:45;2495:2;2484:9;2480:18;2472:6;2454:45;:::i;2510:347::-;2561:8;2571:6;2625:3;2618:4;2610:6;2606:17;2602:27;2592:55;;2643:1;2640;2633:12;2592:55;-1:-1:-1;2666:20:1;;-1:-1:-1;;;;;2698:30:1;;2695:50;;;2741:1;2738;2731:12;2695:50;2778:4;2770:6;2766:17;2754:29;;2830:3;2823:4;2814:6;2806;2802:19;2798:30;2795:39;2792:59;;;2847:1;2844;2837:12;2862:544;2941:6;2949;2957;3010:2;2998:9;2989:7;2985:23;2981:32;2978:52;;;3026:1;3023;3016:12;2978:52;3065:9;3052:23;3084:31;3109:5;3084:31;:::i;:::-;3134:5;-1:-1:-1;3190:2:1;3175:18;;3162:32;-1:-1:-1;;;;;3206:30:1;;3203:50;;;3249:1;3246;3239:12;3203:50;3288:58;3338:7;3329:6;3318:9;3314:22;3288:58;:::i;:::-;2862:544;;3365:8;;-1:-1:-1;3262:84:1;;-1:-1:-1;;;;2862:544:1:o;3778:131::-;-1:-1:-1;;;;;3853:31:1;;3843:42;;3833:70;;3899:1;3896;3889:12;3914:315;3982:6;3990;4043:2;4031:9;4022:7;4018:23;4014:32;4011:52;;;4059:1;4056;4049:12;4011:52;4098:9;4085:23;4117:31;4142:5;4117:31;:::i;4442:409::-;4512:6;4520;4573:2;4561:9;4552:7;4548:23;4544:32;4541:52;;;4589:1;4586;4579:12;4541:52;4616:23;;-1:-1:-1;;;;;4651:30:1;;4648:50;;;4694:1;4691;4684:12;4648:50;4733:58;4783:7;4774:6;4763:9;4759:22;4733:58;:::i;:::-;4810:8;;4707:84;;-1:-1:-1;4442:409:1;-1:-1:-1;;;;4442:409:1:o;4856:435::-;4909:3;4947:5;4941:12;4974:6;4969:3;4962:19;5000:4;5029:2;5024:3;5020:12;5013:19;;5066:2;5059:5;5055:14;5087:1;5097:169;5111:6;5108:1;5105:13;5097:169;;;5172:13;;5160:26;;5206:12;;;;5241:15;;;;5133:1;5126:9;5097:169;;;-1:-1:-1;5282:3:1;;4856:435;-1:-1:-1;;;;;4856:435:1:o;5296:332::-;5503:2;5492:9;5485:21;5466:4;5523:56;5575:2;5564:9;5560:18;5552:6;5523:56;:::i;:::-;5515:64;;5615:6;5610:2;5599:9;5595:18;5588:34;5296:332;;;;;:::o;5633:127::-;5694:10;5689:3;5685:20;5682:1;5675:31;5725:4;5722:1;5715:15;5749:4;5746:1;5739:15;5765:249;5875:2;5856:13;;-1:-1:-1;;5852:27:1;5840:40;;-1:-1:-1;;;;;5895:34:1;;5931:22;;;5892:62;5889:88;;;5957:18;;:::i;:::-;5993:2;5986:22;-1:-1:-1;;5765:249:1:o;6019:247::-;6086:2;6080:9;6128:3;6116:16;;-1:-1:-1;;;;;6147:34:1;;6183:22;;;6144:62;6141:88;;;6209:18;;:::i;:::-;6245:2;6238:22;6019:247;:::o;6271:183::-;6331:4;-1:-1:-1;;;;;6353:30:1;;6350:56;;;6386:18;;:::i;:::-;-1:-1:-1;6431:1:1;6427:14;6443:4;6423:25;;6271:183::o;6459:724::-;6513:5;6566:3;6559:4;6551:6;6547:17;6543:27;6533:55;;6584:1;6581;6574:12;6533:55;6620:6;6607:20;6646:4;6669:43;6709:2;6669:43;:::i;:::-;6741:2;6735:9;6753:31;6781:2;6773:6;6753:31;:::i;:::-;6819:18;;;6911:1;6907:10;;;;6895:23;;6891:32;;;6853:15;;;;-1:-1:-1;6935:15:1;;;6932:35;;;6963:1;6960;6953:12;6932:35;6999:2;6991:6;6987:15;7011:142;7027:6;7022:3;7019:15;7011:142;;;7093:17;;7081:30;;7131:12;;;;7044;;7011:142;;;-1:-1:-1;7171:6:1;6459:724;-1:-1:-1;;;;;;6459:724:1:o;7188:555::-;7230:5;7283:3;7276:4;7268:6;7264:17;7260:27;7250:55;;7301:1;7298;7291:12;7250:55;7324:20;;-1:-1:-1;;;;;7356:26:1;;7353:52;;;7385:18;;:::i;:::-;7434:2;7428:9;7446:67;7501:2;7482:13;;-1:-1:-1;;7478:27:1;7507:4;7474:38;7428:9;7446:67;:::i;:::-;7537:2;7529:6;7522:18;7583:3;7576:4;7571:2;7563:6;7559:15;7555:26;7552:35;7549:55;;;7600:1;7597;7590:12;7549:55;7664:2;7657:4;7649:6;7645:17;7638:4;7630:6;7626:17;7613:54;7711:1;7687:15;;;7704:4;7683:26;7676:37;;;;7691:6;7188:555;-1:-1:-1;;;7188:555:1:o;7748:1071::-;7902:6;7910;7918;7926;7934;7987:3;7975:9;7966:7;7962:23;7958:33;7955:53;;;8004:1;8001;7994:12;7955:53;8043:9;8030:23;8062:31;8087:5;8062:31;:::i;:::-;8112:5;-1:-1:-1;8169:2:1;8154:18;;8141:32;8182:33;8141:32;8182:33;:::i;:::-;8234:7;-1:-1:-1;8292:2:1;8277:18;;8264:32;-1:-1:-1;;;;;8345:14:1;;;8342:34;;;8372:1;8369;8362:12;8342:34;8395:61;8448:7;8439:6;8428:9;8424:22;8395:61;:::i;:::-;8385:71;;8509:2;8498:9;8494:18;8481:32;8465:48;;8538:2;8528:8;8525:16;8522:36;;;8554:1;8551;8544:12;8522:36;8577:63;8632:7;8621:8;8610:9;8606:24;8577:63;:::i;:::-;8567:73;;8693:3;8682:9;8678:19;8665:33;8649:49;;8723:2;8713:8;8710:16;8707:36;;;8739:1;8736;8729:12;8707:36;;8762:51;8805:7;8794:8;8783:9;8779:24;8762:51;:::i;:::-;8752:61;;;7748:1071;;;;;;;;:::o;8824:315::-;8892:6;8900;8953:2;8941:9;8932:7;8928:23;8924:32;8921:52;;;8969:1;8966;8959:12;8921:52;9005:9;8992:23;8982:33;;9065:2;9054:9;9050:18;9037:32;9078:31;9103:5;9078:31;:::i;:::-;9128:5;9118:15;;;8824:315;;;;;:::o;9144:1277::-;9262:6;9270;9323:2;9311:9;9302:7;9298:23;9294:32;9291:52;;;9339:1;9336;9329:12;9291:52;9366:23;;-1:-1:-1;;;;;9438:14:1;;;9435:34;;;9465:1;9462;9455:12;9435:34;9503:6;9492:9;9488:22;9478:32;;9548:7;9541:4;9537:2;9533:13;9529:27;9519:55;;9570:1;9567;9560:12;9519:55;9606:2;9593:16;9628:4;9651:43;9691:2;9651:43;:::i;:::-;9723:2;9717:9;9735:31;9763:2;9755:6;9735:31;:::i;:::-;9801:18;;;9889:1;9885:10;;;;9877:19;;9873:28;;;9835:15;;;;-1:-1:-1;9913:19:1;;;9910:39;;;9945:1;9942;9935:12;9910:39;9969:11;;;;9989:217;10005:6;10000:3;9997:15;9989:217;;;10085:3;10072:17;10102:31;10127:5;10102:31;:::i;:::-;10146:18;;10022:12;;;;10184;;;;9989:217;;;10225:6;-1:-1:-1;;10269:18:1;;10256:32;;-1:-1:-1;;10300:16:1;;;10297:36;;;10329:1;10326;10319:12;10297:36;;10352:63;10407:7;10396:8;10385:9;10381:24;10352:63;:::i;:::-;10342:73;;;9144:1277;;;;;:::o;10426:261::-;10605:2;10594:9;10587:21;10568:4;10625:56;10677:2;10666:9;10662:18;10654:6;10625:56;:::i;10692:118::-;10779:5;10776:1;10765:20;10758:5;10755:31;10745:59;;10800:1;10797;10790:12;10815:130;10881:20;;10910:29;10881:20;10910:29;:::i;10950:685::-;11054:6;11062;11070;11078;11131:3;11119:9;11110:7;11106:23;11102:33;11099:53;;;11148:1;11145;11138:12;11099:53;11187:9;11174:23;11206:31;11231:5;11206:31;:::i;:::-;11256:5;-1:-1:-1;11313:2:1;11298:18;;11285:32;11326:31;11285:32;11326:31;:::i;:::-;11376:7;-1:-1:-1;11435:2:1;11420:18;;11407:32;11448:31;11407:32;11448:31;:::i;:::-;11498:7;-1:-1:-1;11557:2:1;11542:18;;11529:32;11570:33;11529:32;11570:33;:::i;:::-;10950:685;;;;-1:-1:-1;10950:685:1;;-1:-1:-1;;10950:685:1:o;11640:247::-;11699:6;11752:2;11740:9;11731:7;11727:23;11723:32;11720:52;;;11768:1;11765;11758:12;11720:52;11807:9;11794:23;11826:31;11851:5;11826:31;:::i;11892:104::-;-1:-1:-1;;;;;11958:31:1;11946:44;;11892:104::o;12001:461::-;12054:3;12092:5;12086:12;12119:6;12114:3;12107:19;12145:4;12174:2;12169:3;12165:12;12158:19;;12211:2;12204:5;12200:14;12232:1;12242:195;12256:6;12253:1;12250:13;12242:195;;;12321:13;;-1:-1:-1;;;;;12317:39:1;12305:52;;12377:12;;;;12412:15;;;;12353:1;12271:9;12242:195;;12467:465;12724:2;12713:9;12706:21;12687:4;12750:56;12802:2;12791:9;12787:18;12779:6;12750:56;:::i;:::-;12854:9;12846:6;12842:22;12837:2;12826:9;12822:18;12815:50;12882:44;12919:6;12911;12882:44;:::i;12937:119::-;13022:8;13015:5;13011:20;13004:5;13001:31;12991:59;;13046:1;13043;13036:12;13061:132;13128:20;;13157:30;13128:20;13157:30;:::i;13198:953::-;13293:6;13346:3;13334:9;13325:7;13321:23;13317:33;13314:53;;;13363:1;13360;13353:12;13314:53;13389:17;;:::i;:::-;13429:29;13448:9;13429:29;:::i;:::-;13422:5;13415:44;13491:38;13525:2;13514:9;13510:18;13491:38;:::i;:::-;13486:2;13479:5;13475:14;13468:62;13562:37;13595:2;13584:9;13580:18;13562:37;:::i;:::-;13557:2;13550:5;13546:14;13539:61;13632:38;13666:2;13655:9;13651:18;13632:38;:::i;:::-;13627:2;13620:5;13616:14;13609:62;13704:37;13736:3;13725:9;13721:19;13704:37;:::i;:::-;13698:3;13691:5;13687:15;13680:62;13775:37;13807:3;13796:9;13792:19;13775:37;:::i;:::-;13769:3;13758:15;;13751:62;13874:3;13859:19;;;13846:33;13829:15;;;13822:58;13941:3;13926:19;;;13913:33;13896:15;;;13889:58;13966:3;14014:18;;;14001:32;13985:14;;;13978:56;14053:3;14101:18;;;14088:32;14072:14;;;14065:56;;;;-1:-1:-1;13762:5:1;13198:953;-1:-1:-1;13198:953:1:o;14626:118::-;14712:5;14705:13;14698:21;14691:5;14688:32;14678:60;;14734:1;14731;14724:12;14749:382;14814:6;14822;14875:2;14863:9;14854:7;14850:23;14846:32;14843:52;;;14891:1;14888;14881:12;14843:52;14930:9;14917:23;14949:31;14974:5;14949:31;:::i;:::-;14999:5;-1:-1:-1;15056:2:1;15041:18;;15028:32;15069:30;15028:32;15069:30;:::i;15136:536::-;15421:2;15410:9;15403:21;15384:4;15447:56;15499:2;15488:9;15484:18;15476:6;15447:56;:::i;:::-;15551:9;15543:6;15539:22;15534:2;15523:9;15519:18;15512:50;15579:44;15616:6;15608;15579:44;:::i;:::-;15571:52;;;15659:6;15654:2;15643:9;15639:18;15632:34;15136:536;;;;;;:::o;15677:284::-;15735:6;15788:2;15776:9;15767:7;15763:23;15759:32;15756:52;;;15804:1;15801;15794:12;15756:52;15830:23;;-1:-1:-1;;;;;15882:30:1;;15872:41;;15862:69;;15927:1;15924;15917:12;15966:203;-1:-1:-1;;;;;16130:32:1;;;;16112:51;;16100:2;16085:18;;15966:203::o;16174:545::-;16262:6;16270;16278;16286;16339:2;16327:9;16318:7;16314:23;16310:32;16307:52;;;16355:1;16352;16345:12;16307:52;16378:23;;;-1:-1:-1;16448:2:1;16433:18;;16420:32;;-1:-1:-1;16503:2:1;16488:18;;16475:32;-1:-1:-1;;;;;16519:30:1;;16516:50;;;16562:1;16559;16552:12;16516:50;16601:58;16651:7;16642:6;16631:9;16627:22;16601:58;:::i;:::-;16174:545;;;;-1:-1:-1;16678:8:1;-1:-1:-1;;;;16174:545:1:o;16821:1133::-;-1:-1:-1;;;;;17330:15:1;;;17312:34;;17382:15;;;17377:2;17362:18;;17355:43;17434:15;;;17429:2;17414:18;;17407:43;17481:2;17466:18;;17459:34;;;17292:3;17509:19;;17502:35;;;17574:15;;;17568:3;17553:19;;17546:44;17627:15;;;17621:3;17606:19;;17599:44;-1:-1:-1;;;;;17680:31:1;;17674:3;17659:19;;17652:60;17749:15;;17743:3;17728:19;;17721:44;-1:-1:-1;;;;;17802:32:1;;17796:3;17781:19;;17774:61;17261:3;17246:19;;17844:48;17887:3;17872:19;;17863:7;17844:48;:::i;:::-;16800:8;16789:20;;17943:3;17928:19;;16777:33;16821:1133;;;;;;;;;;;;;;;:::o;17959:388::-;18027:6;18035;18088:2;18076:9;18067:7;18063:23;18059:32;18056:52;;;18104:1;18101;18094:12;18056:52;18143:9;18130:23;18162:31;18187:5;18162:31;:::i;:::-;18212:5;-1:-1:-1;18269:2:1;18254:18;;18241:32;18282:33;18241:32;18282:33;:::i;18352:734::-;18456:6;18464;18472;18480;18488;18541:3;18529:9;18520:7;18516:23;18512:33;18509:53;;;18558:1;18555;18548:12;18509:53;18597:9;18584:23;18616:31;18641:5;18616:31;:::i;:::-;18666:5;-1:-1:-1;18723:2:1;18708:18;;18695:32;18736:33;18695:32;18736:33;:::i;:::-;18788:7;-1:-1:-1;18842:2:1;18827:18;;18814:32;;-1:-1:-1;18893:2:1;18878:18;;18865:32;;-1:-1:-1;18948:3:1;18933:19;;18920:33;-1:-1:-1;;;;;18965:30:1;;18962:50;;;19008:1;19005;18998:12;18962:50;19031:49;19072:7;19063:6;19052:9;19048:22;19031:49;:::i;19502:380::-;19581:1;19577:12;;;;19624;;;19645:61;;19699:4;19691:6;19687:17;19677:27;;19645:61;19752:2;19744:6;19741:14;19721:18;19718:38;19715:161;;19798:10;19793:3;19789:20;19786:1;19779:31;19833:4;19830:1;19823:15;19861:4;19858:1;19851:15;19715:161;;19502:380;;;:::o;19887:903::-;19952:5;20000:4;19988:9;19983:3;19979:19;19975:30;19972:50;;;20018:1;20015;20008:12;19972:50;20051:2;20045:9;20093:4;20081:17;;-1:-1:-1;;;;;20113:34:1;;20149:22;;;20110:62;20107:88;;;20175:18;;:::i;:::-;20211:2;20204:22;20244:6;-1:-1:-1;20244:6:1;20274:23;;20306:33;20274:23;20306:33;:::i;:::-;20348:23;;20423:2;20408:18;;20395:32;20436:31;20395:32;20436:31;:::i;:::-;20495:2;20483:15;;20476:32;20560:2;20545:18;;20532:32;20573:31;20532:32;20573:31;:::i;:::-;20632:2;20620:15;;20613:32;20697:2;20682:18;;20669:32;20710:33;20669:32;20710:33;:::i;:::-;20771:2;20759:15;;;;20752:32;19887:903;;-1:-1:-1;;19887:903:1:o;20795:250::-;20890:6;20943:3;20931:9;20922:7;20918:23;20914:33;20911:53;;;20960:1;20957;20950:12;20911:53;20983:56;21031:7;21020:9;20983:56;:::i;21146:491::-;-1:-1:-1;;;;;21447:15:1;;;21429:34;;21499:15;;;;21494:2;21479:18;;21472:43;21562:1;21551:21;;;21546:2;21531:18;;21524:49;21609:21;;;;21604:2;21589:18;;21582:49;21378:3;21363:19;;21146:491::o;21642:367::-;21865:1;21854:21;;;21836:40;;21912:21;;;;21907:2;21892:18;;21885:49;-1:-1:-1;;;;;21970:32:1;;;21965:2;21950:18;;21943:60;21824:2;21809:18;;21642:367::o;22014:245::-;22093:6;22101;22154:2;22142:9;22133:7;22129:23;22125:32;22122:52;;;22170:1;22167;22160:12;22122:52;-1:-1:-1;;22193:16:1;;22249:2;22234:18;;;22228:25;22193:16;;22228:25;;-1:-1:-1;22014:245:1:o;22264:127::-;22325:10;22320:3;22316:20;22313:1;22306:31;22356:4;22353:1;22346:15;22380:4;22377:1;22370:15;22396:168;22436:7;22502:1;22498;22494:6;22490:14;22487:1;22484:21;22479:1;22472:9;22465:17;22461:45;22458:71;;;22509:18;;:::i;:::-;-1:-1:-1;22549:9:1;;22396:168::o;22569:127::-;22630:10;22625:3;22621:20;22618:1;22611:31;22661:4;22658:1;22651:15;22685:4;22682:1;22675:15;22701:120;22741:1;22767;22757:35;;22772:18;;:::i;:::-;-1:-1:-1;22806:9:1;;22701:120::o;22826:231::-;22866:4;-1:-1:-1;;;;;22964:10:1;;;;22934;;22986:12;;;22983:38;;;23001:18;;:::i;:::-;23038:13;;22826:231;-1:-1:-1;;;22826:231:1:o;23062:128::-;23102:3;23133:1;23129:6;23126:1;23123:13;23120:39;;;23139:18;;:::i;:::-;-1:-1:-1;23175:9:1;;23062:128::o;23195:567::-;-1:-1:-1;;;;;23464:32:1;;;;23446:51;;23544:1;23533:21;;;23528:2;23513:18;;23506:49;23591:21;;;;23586:2;23571:18;;23564:49;-1:-1:-1;;;;;23687:15:1;;;23682:2;23667:18;;23660:43;23740:15;23640:3;23719:19;;23712:44;23433:3;23418:19;;23195:567::o;23767:385::-;23846:6;23854;23907:2;23895:9;23886:7;23882:23;23878:32;23875:52;;;23923:1;23920;23913:12;23875:52;23955:9;23949:16;23974:31;23999:5;23974:31;:::i;:::-;24074:2;24059:18;;24053:25;24024:5;;-1:-1:-1;24087:33:1;24053:25;24087:33;:::i;24157:639::-;24436:25;;;-1:-1:-1;;;;;24497:32:1;;;;24492:2;24477:18;;24470:60;-1:-1:-1;;;;;24604:15:1;;;24599:2;24584:18;;24577:43;24656:15;;24651:2;24636:18;;24629:43;24720:1;24709:21;;;24517:3;24688:19;;24681:50;24768:21;24557:3;24747:19;;24740:50;24423:3;24408:19;;24157:639::o;25057:238::-;25097:3;-1:-1:-1;;;;;25164:10:1;;;25194;;;25224:12;;;25216:21;;25213:47;;;25240:18;;:::i;:::-;25276:13;;25057:238;-1:-1:-1;;;;25057:238:1:o;25300:127::-;25361:10;25356:3;25352:20;25349:1;25342:31;25392:4;25389:1;25382:15;25416:4;25413:1;25406:15;25432:274;25606:25;;;-1:-1:-1;;;;;25667:32:1;25662:2;25647:18;;25640:60;25594:2;25579:18;;25432:274::o;25711:410::-;25913:2;25895:21;;;25952:2;25932:18;;;25925:30;25991:34;25986:2;25971:18;;25964:62;-1:-1:-1;;;26057:2:1;26042:18;;26035:44;26111:3;26096:19;;25711:410::o;27201:135::-;27240:3;27261:17;;;27258:43;;27281:18;;:::i;:::-;-1:-1:-1;27328:1:1;27317:13;;27201:135::o;27341:643::-;27447:6;27455;27463;27471;27479;27532:3;27520:9;27511:7;27507:23;27503:33;27500:53;;;27549:1;27546;27539:12;27500:53;27581:9;27575:16;27600:31;27625:5;27600:31;:::i;:::-;27650:5;27640:15;;;27695:2;27684:9;27680:18;27674:25;27664:35;;27739:2;27728:9;27724:18;27718:25;27708:35;;27788:2;27777:9;27773:18;27767:25;27801:33;27826:7;27801:33;:::i;:::-;27905:3;27890:19;;27884:26;27853:7;;-1:-1:-1;27919:33:1;27884:26;27919:33;:::i;:::-;27971:7;27961:17;;;27341:643;;;;;;;;:::o;27989:543::-;28084:6;28092;28100;28153:2;28141:9;28132:7;28128:23;28124:32;28121:52;;;28169:1;28166;28159:12;28121:52;28208:9;28195:23;28227:31;28252:5;28227:31;:::i;:::-;28277:5;-1:-1:-1;28334:2:1;28319:18;;28306:32;28347:31;28306:32;28347:31;:::i;:::-;28397:7;-1:-1:-1;28456:2:1;28441:18;;28428:32;28469:31;28428:32;28469:31;:::i;:::-;28519:7;28509:17;;;27989:543;;;;;:::o;28537:184::-;28607:6;28660:2;28648:9;28639:7;28635:23;28631:32;28628:52;;;28676:1;28673;28666:12;28628:52;-1:-1:-1;28699:16:1;;28537:184;-1:-1:-1;28537:184:1:o;28726:274::-;-1:-1:-1;;;;;28918:32:1;;;;28900:51;;28982:2;28967:18;;28960:34;28888:2;28873:18;;28726:274::o;29005:245::-;29072:6;29125:2;29113:9;29104:7;29100:23;29096:32;29093:52;;;29141:1;29138;29131:12;29093:52;29173:9;29167:16;29192:28;29214:5;29192:28;:::i;29510:251::-;29580:6;29633:2;29621:9;29612:7;29608:23;29604:32;29601:52;;;29649:1;29646;29639:12;29601:52;29681:9;29675:16;29700:31;29725:5;29700:31;:::i;29766:249::-;29835:6;29888:2;29876:9;29867:7;29863:23;29859:32;29856:52;;;29904:1;29901;29894:12;29856:52;29936:9;29930:16;29955:30;29979:5;29955:30;:::i;30820:1154::-;30984:4;31026:3;31015:9;31011:19;31003:27;;31039:44;31073:9;31064:6;31058:13;31039:44;:::i;:::-;31130:4;31122:6;31118:17;31112:24;31145:54;31193:4;31182:9;31178:20;31164:12;31145:54;:::i;:::-;;31248:4;31240:6;31236:17;31230:24;31263:55;31312:4;31301:9;31297:20;31281:14;16800:8;16789:20;16777:33;;16724:92;31263:55;;31367:4;31359:6;31355:17;31349:24;31382:56;31432:4;31421:9;31417:20;31401:14;31382:56;:::i;:::-;;31487:4;31479:6;31475:17;31469:24;31502:54;31550:4;31539:9;31535:20;31519:14;21125:1;21114:20;21102:33;;21050:91;31502:54;;31605:4;31597:6;31593:17;31587:24;31620:54;31668:4;31657:9;31653:20;31637:14;21125:1;21114:20;21102:33;;21050:91;31620:54;;31730:4;31722:6;31718:17;31712:24;31705:4;31694:9;31690:20;31683:54;31793:4;31785:6;31781:17;31775:24;31768:4;31757:9;31753:20;31746:54;31819:6;31879:2;31871:6;31867:15;31861:22;31856:2;31845:9;31841:18;31834:50;;31903:6;31963:2;31955:6;31951:15;31945:22;31940:2;31929:9;31925:18;31918:50;;30820:1154;;;;:::o;31979:530::-;32098:6;32106;32114;32122;32175:3;32163:9;32154:7;32150:23;32146:33;32143:53;;;32192:1;32189;32182:12;32143:53;32224:9;32218:16;32243:31;32268:5;32243:31;:::i;:::-;32293:5;32283:15;;;32338:2;32327:9;32323:18;32317:25;32307:35;;32382:2;32371:9;32367:18;32361:25;32351:35;;32431:2;32420:9;32416:18;32410:25;32444:33;32469:7;32444:33;:::i;33180:163::-;33258:13;;33311:6;33300:18;;33290:29;;33280:57;;33333:1;33330;33323:12;33348:920;33462:6;33470;33478;33486;33494;33502;33510;33563:3;33551:9;33542:7;33538:23;33534:33;33531:53;;;33580:1;33577;33570:12;33531:53;33612:9;33606:16;33631:31;33656:5;33631:31;:::i;:::-;33731:2;33716:18;;33710:25;33681:5;;-1:-1:-1;33744:31:1;33710:25;33744:31;:::i;:::-;33794:7;-1:-1:-1;33820:48:1;33864:2;33849:18;;33820:48;:::i;:::-;33810:58;;33887:48;33931:2;33920:9;33916:18;33887:48;:::i;:::-;33877:58;;33954:49;33998:3;33987:9;33983:19;33954:49;:::i;:::-;33944:59;;34048:3;34037:9;34033:19;34027:26;34097:4;34088:7;34084:18;34075:7;34072:31;34062:59;;34117:1;34114;34107:12;34062:59;34192:3;34177:19;;34171:26;34140:7;;-1:-1:-1;34206:30:1;34171:26;34206:30;:::i;:::-;34255:7;34245:17;;;33348:920;;;;;;;;;;:::o;34820:579::-;-1:-1:-1;;;;;35071:32:1;;35053:51;;35151:1;35140:21;;;35135:2;35120:18;;35113:49;35198:21;;;35193:2;35178:18;;35171:49;-1:-1:-1;;;;;35256:32:1;;35251:2;35236:18;;35229:60;35091:3;35276;35305:19;;35298:32;;;-1:-1:-1;;35347:46:1;;35373:19;;35365:6;35347:46;:::i;35658:1236::-;35751:6;35795:9;35786:7;35782:23;35825:3;35821:2;35817:12;35814:32;;;35842:1;35839;35832:12;35814:32;35875:4;35869:11;;;35907:17;;-1:-1:-1;;;;;35976:18:1;;;35996:22;;;35973:46;35970:72;;;36022:18;;:::i;:::-;36064:10;36058:4;36051:24;36095:4;36091:2;36087:13;36084:33;;;36113:1;36110;36103:12;36084:33;36158:3;36150:6;36146:16;36126:36;;36216:10;36202:12;36199:28;36194:2;36180:12;36177:20;36174:54;36171:80;;;36231:18;;:::i;:::-;36171:80;36273:12;36267:4;36260:26;36321:9;36308:23;36295:36;;36340:31;36365:5;36340:31;:::i;:::-;36380:25;;;36457:2;36442:18;;36429:32;;36470:33;36429:32;36470:33;:::i;:::-;36538:7;36531:4;36523:6;36519:17;36512:34;36598:4;36587:9;36583:20;36570:34;36555:49;;36613:32;36637:7;36613:32;:::i;:::-;36679:7;36673:3;36665:6;36661:16;36654:33;36711:10;36703:6;36696:26;;36774:4;36763:9;36759:20;36746:34;36731:49;;36789:33;36814:7;36789:33;:::i;:::-;36850:2;36838:15;;36831:32;;;;36842:6;35658:1236;-1:-1:-1;;;35658:1236:1:o;39004:401::-;39206:2;39188:21;;;39245:2;39225:18;;;39218:30;39284:34;39279:2;39264:18;;39257:62;-1:-1:-1;;;39350:2:1;39335:18;;39328:35;39395:3;39380:19;;39004:401::o;39410:406::-;39612:2;39594:21;;;39651:2;39631:18;;;39624:30;39690:34;39685:2;39670:18;;39663:62;-1:-1:-1;;;39756:2:1;39741:18;;39734:40;39806:3;39791:19;;39410:406::o;39821:465::-;40078:2;40067:9;40060:21;40041:4;40104:56;40156:2;40145:9;40141:18;40133:6;40104:56;:::i;40291:236::-;40330:3;-1:-1:-1;;;;;40396:10:1;;;40426;;;40456:12;;;40448:21;;40445:47;;;40472:18;;:::i;40532:229::-;40571:4;-1:-1:-1;;;;;40668:10:1;;;;40638;;40690:12;;;40687:38;;;40705:18;;:::i;40766:272::-;40806:7;-1:-1:-1;;;;;40877:10:1;;;40907;;;40940:11;;40933:19;40962:12;;;40954:21;;40929:47;40926:73;;;40979:18;;:::i;:::-;41019:13;;40766:272;-1:-1:-1;;;;40766:272:1:o;41043:201::-;41083:1;-1:-1:-1;;;;;41148:10:1;;;;41167:37;;41184:18;;:::i;:::-;41222:10;;41218:20;;;;;41043:201;-1:-1:-1;;41043:201:1:o;43631:127::-;43692:10;43687:3;43683:20;43680:1;43673:31;43723:4;43720:1;43713:15;43747:4;43744:1;43737:15;43763:827;-1:-1:-1;;;;;44160:15:1;;;44142:34;;44212:15;;44207:2;44192:18;;44185:43;44122:3;44259:2;44244:18;;44237:31;;;44085:4;;44291:57;;44328:19;;44320:6;44291:57;:::i;:::-;44396:9;44388:6;44384:22;44379:2;44368:9;44364:18;44357:50;44430:44;44467:6;44459;44430:44;:::i;:::-;44416:58;;44523:9;44515:6;44511:22;44505:3;44494:9;44490:19;44483:51;44551:33;44577:6;44569;44551:33;:::i;:::-;44543:41;43763:827;-1:-1:-1;;;;;;;;43763:827:1:o;44595:249::-;44664:6;44717:2;44705:9;44696:7;44692:23;44688:32;44685:52;;;44733:1;44730;44723:12;44685:52;44765:9;44759:16;44784:30;44808:5;44784:30;:::i;44849:179::-;44884:3;44926:1;44908:16;44905:23;44902:120;;;44972:1;44969;44966;44951:23;-1:-1:-1;45009:1:1;45003:8;44998:3;44994:18;44902:120;44849:179;:::o;45033:671::-;45072:3;45114:4;45096:16;45093:26;45090:39;;;45033:671;:::o;45090:39::-;45156:2;45150:9;-1:-1:-1;;45221:16:1;45217:25;;45214:1;45150:9;45193:50;45266:11;;45296:16;-1:-1:-1;;;;;45364:14:1;;;45395:4;45383:17;;45380:25;-1:-1:-1;45361:45:1;45358:58;;;45409:5;;;;;45033:671;:::o;45358:58::-;45446:6;45440:4;45436:17;45425:28;;45482:3;45476:10;45509:2;45501:6;45498:14;45495:27;;;45515:5;;;;;;45033:671;:::o;45495:27::-;45599:2;45580:16;45574:4;45570:27;45566:36;45559:4;45550:6;45545:3;45541:16;45537:27;45534:69;45531:82;;;45606:5;;;;;;45033:671;:::o;45531:82::-;45622:57;45673:4;45664:6;45656;45652:19;45648:30;45642:4;45622:57;:::i;:::-;-1:-1:-1;45695:3:1;;45033:671;-1:-1:-1;;;;;45033:671:1:o;46130:404::-;46332:2;46314:21;;;46371:2;46351:18;;;46344:30;46410:34;46405:2;46390:18;;46383:62;-1:-1:-1;;;46476:2:1;46461:18;;46454:38;46524:3;46509:19;;46130:404::o;46539:786::-;-1:-1:-1;;;46945:3:1;46938:38;46920:3;47005:6;46999:13;47021:62;47076:6;47071:2;47066:3;47062:12;47055:4;47047:6;47043:17;47021:62;:::i;:::-;-1:-1:-1;;;47142:2:1;47102:16;;;47134:11;;;47127:40;47192:13;;47214:63;47192:13;47263:2;47255:11;;47248:4;47236:17;;47214:63;:::i;:::-;47297:17;47316:2;47293:26;;46539:786;-1:-1:-1;;;;46539:786:1:o;48090:561::-;-1:-1:-1;;;;;48387:15:1;;;48369:34;;48439:15;;48434:2;48419:18;;48412:43;48486:2;48471:18;;48464:34;;;48529:2;48514:18;;48507:34;;;48349:3;48572;48557:19;;48550:32;;;48312:4;;48599:46;;48625:19;;48617:6;48599:46;:::i;49386:136::-;49425:3;49453:5;49443:39;;49462:18;;:::i;:::-;-1:-1:-1;;;49498:18:1;;49386:136::o;50295:274::-;50424:3;50462:6;50456:13;50478:53;50524:6;50519:3;50512:4;50504:6;50500:17;50478:53;:::i;:::-;50547:16;;;;;50295:274;-1:-1:-1;;50295:274:1:o

Metadata Hash

ipfs://7f2be54bb6ed8fc7d1d504f3f73da6ad8136433bc335f28620b7bbc6624b1e75
Loading