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://_N_E/?8556","webpack://_N_E/./hooks/useFetchUserPosition.ts","webpack://_N_E/./views/Rebalance/Context.tsx","webpack://_N_E/./views/Rebalance/RebalanceEdit/style.ts","webpack://_N_E/./views/Rebalance/RebalanceEdit/index.tsx","webpack://_N_E/./views/Rebalance/RebalanceLayout/AutomatedRebalanceBtn.tsx","webpack://_N_E/./views/Rebalance/RebalanceLayout/ConfirmRebalanceBtn.tsx","webpack://_N_E/./views/Rebalance/RebalanceLayout/RebalanceWrapper.tsx","webpack://_N_E/./views/Rebalance/RebalanceLayout/index.tsx","webpack://_N_E/./views/Rebalance/RebalancePreview/style.ts","webpack://_N_E/./views/Rebalance/RebalancePreview/index.tsx","webpack://_N_E/./views/Rebalance/index.tsx","webpack://_N_E/./views/AddLiquidity/AddLiquidityContextV2.tsx","webpack://_N_E/./components/UseNative/UseNative.tsx","webpack://_N_E/./views/AddLiquidity/AddLiquidityEdit/ZapInSwapPath.tsx","webpack://_N_E/./views/AddLiquidity/AddLiquidityEdit/SwapDetail.tsx","webpack://_N_E/./views/AddLiquidity/AddLiquidityEdit/style.ts","webpack://_N_E/./views/AddLiquidity/AddLiquidityEdit/AddLiquidityEditV2.tsx","webpack://_N_E/./views/AddLiquidity/AddLiquidityLayout/AddLPBtnV2.tsx","webpack://_N_E/./views/AddLiquidity/AddLiquidityLayout/AddLiquidityLayoutV2.tsx","webpack://_N_E/./views/AddLiquidity/AddLiquidityPreview/AddLiquidityPreviewV2.tsx","webpack://_N_E/./views/AddLiquidity/index.tsx","webpack://_N_E/./views/RemoveLiquidity/Context.tsx","webpack://_N_E/./views/RemoveLiquidity/RemoveLiquidityEdit/style.ts","webpack://_N_E/./views/RemoveLiquidity/RemoveLiquidityEdit/index.tsx","webpack://_N_E/./views/RemoveLiquidity/RemoveLiquidityLayout/PrescheduledCloseBtn.tsx","webpack://_N_E/./views/RemoveLiquidity/RemoveLiquidityLayout/RemoveLPBtn.tsx","webpack://_N_E/./views/RemoveLiquidity/RemoveLiquidityLayout/index.tsx","webpack://_N_E/./views/RemoveLiquidity/RemoveLiquidityPreview/index.tsx","webpack://_N_E/./views/RemoveLiquidity/index.tsx","webpack://_N_E/./components/Button/CollectFeeBtn.tsx","webpack://_N_E/./components/Modal/ClaimFeeModal.tsx","webpack://_N_E/./components/Button/ReinvestBtn.tsx","webpack://_N_E/./views/PositionDetails/ReinvestWrapper.tsx","webpack://_N_E/./components/Modal/ReinvestModal.tsx","webpack://_N_E/./components/Modal/StakePositionModal.tsx","webpack://_N_E/./views/PositionDetails/styles.ts","webpack://_N_E/./views/PositionDetails/ReEnablePermit.tsx","webpack://_N_E/./views/PositionDetails/TriggerListWrapper.tsx","webpack://_N_E/./views/PositionDetails/PositionDetails.tsx","webpack://_N_E/./views/PositionDetails/index.tsx","webpack://_N_E/./views/ActivePositions/hook.ts","webpack://_N_E/./views/ActivePositions/index.tsx","webpack://_N_E/./pages/liquidity-management.tsx","webpack://_N_E/<anon>"],"sourcesContent":["\n    (window.__NEXT_P = window.__NEXT_P || []).push([\n      \"/liquidity-management\",\n      function () {\n        return require(\"private-next-pages/liquidity-management.tsx\");\n      }\n    ]);\n    if(module.hot) {\n      module.hot.dispose(function () {\n        window.__NEXT_P.push([\"/liquidity-management\"])\n      });\n    }\n  ","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { viem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport useSWR from \"swr/immutable\";\nimport { useAccount } from \"wagmi\";\n\n/**\n * Get the state and pool for a position by deploying an ephemeral contract via `eth_call`.\n */\nexport function useFetchUserPosition(positionId: string) {\n  const { isConnected } = useAccount();\n  const { ammEnum, networkId, publicClient, isChainSupported } = useNetwork();\n  const showFetch = isConnected && ammEnum && isChainSupported;\n  return useSWR(\n    showFetch ? `user-lp-${ammEnum}-${networkId}-${positionId}` : null,\n    () =>\n      viem.PositionDetails.fromPositionId(\n        networkId,\n        ammEnum,\n        BigInt(positionId),\n        publicClient\n      )\n  );\n}\n","import { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport {\n  useGlobalSlippage,\n  useSolverRoutingStore,\n} from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { IPositionDetails } from \"@/config/position/positionConfig\";\nimport { getTriggerDeadline } from \"@/helper/deadlineHelper\";\nimport {\n  offsetTickToPercentage,\n  percentageToOffsetTick,\n} from \"@/helper/liquiditySelectorHelper\";\nimport {\n  filterTriggers,\n  getInitializedPriceTrigger,\n  getInitializedRatioTrigger,\n  getInitializedTimeTrigger,\n  getInitializedTriggerTimeBuffer,\n  getTriggerCondition,\n  getTriggerType,\n} from \"@/helper/triggerHelper\";\nimport { useCurrentChainToken } from \"@/hooks/globalState/useCurrentChainToken\";\nimport { useOnNetworkAccountChange } from \"@/hooks/globalState/useOnNetworkAccountChange\";\nimport { useSwapInfo } from \"@/hooks/swapInfo/useSwapInfo\";\nimport { useFetchAllChainUserTriggers } from \"@/hooks/useFetchAllChainUserTriggers\";\nimport { useFetchTokenMap } from \"@/hooks/useFetchTokenMap\";\nimport { useFetchUserPosition } from \"@/hooks/useFetchUserPosition\";\nimport {\n  DEFAULT_REBALANCE_SLIPPAGE,\n  MAX_TRIGGER,\n  gasCeilingButtonError,\n  getGasCeiling,\n} from \"@/utils/helper\";\nimport {\n  ITransactionSettingsForm,\n  RebalanceActionTab,\n  SwapPathProps,\n  convertRelativePriceToHumanValue,\n} from \"@aperture/uikit\";\nimport {\n  CreateTriggerPayload,\n  PermitInfo,\n  RebalanceAction,\n  TriggerItem,\n  UpdateTriggerPayload,\n  viem,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { tickToPrice } from \"@aperture_finance/uniswap-v3-sdk\";\nimport { useDebounce } from \"ahooks\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport React, { useEffect, useMemo, useState } from \"react\";\nimport { useAccount } from \"wagmi\";\nimport { IRebalanceEditForm } from \"./RebalanceEdit/types\";\n\nexport type IRebalanceTab = \"Rebalance\" | \"Automated Rebalance\";\nexport interface IRebalanceContext {\n  tab: IRebalanceTab;\n  position: IPositionDetails;\n  trigger: TriggerItem | undefined;\n  tokenPrice: [string, string];\n  positionDetails: viem.PositionDetails;\n  form: IRebalanceEditForm;\n  projectedAmount: {\n    amount0: string;\n    amount1: string;\n  };\n  maxTriggersCreated: boolean;\n  txForm: ITransactionSettingsForm;\n  error: string;\n  isAutoBtnDisabled: boolean;\n  isRebalanceChanged: boolean;\n  automatedRebalancePayload?: CreateTriggerPayload | UpdateTriggerPayload;\n  isSyncing: boolean;\n  swapInfo?: SwapPathProps[];\n  swapInfoError?: Error;\n  suggestedSolver: number;\n  selectedSolver: number;\n  permitInfo?: PermitInfo;\n  gasEstimated?: bigint;\n  setTab: React.Dispatch<React.SetStateAction<IRebalanceTab>>;\n  setForm: React.Dispatch<React.SetStateAction<IRebalanceEditForm>>;\n  setProjectedAmount: React.Dispatch<\n    React.SetStateAction<{\n      amount0: string;\n      amount1: string;\n    }>\n  >;\n  setTxForm: React.Dispatch<React.SetStateAction<ITransactionSettingsForm>>;\n  setPermitInfo: React.Dispatch<React.SetStateAction<PermitInfo>>;\n  setGasEstimated: React.Dispatch<React.SetStateAction<bigint>>;\n  setError: React.Dispatch<React.SetStateAction<string>>;\n  setSelectedSolver: (idx: number) => void;\n}\n\nconst RebalanceContext = React.createContext<IRebalanceContext>(null as any);\n\ninterface RebalanceProviderProps {\n  position: IPositionDetails;\n  trigger: TriggerItem | undefined;\n  tabs: 0 | 1;\n}\n\nexport const RebalanceProvider: React.FC<\n  React.PropsWithChildren<RebalanceProviderProps>\n> = ({ children, position, trigger, tabs }) => {\n  const { address } = useAccount();\n  const { ammEnum, networkId } = useNetwork();\n  const tokenA = position.tokenA;\n  const tokenB = position.tokenB;\n  const { data: positionDetails } = useFetchUserPosition(position.positionId);\n  const { currentTokenPrice: tokenPrices } = useCurrentChainToken(networkId);\n  const { data: allChainsTriggerObj } = useFetchAllChainUserTriggers();\n  const { data: tokenMap } = useFetchTokenMap();\n  const { globalSlippage } = useGlobalSlippage();\n  const [tab, setTab] = useState<IRebalanceTab>(\n    tabs === 0 ? \"Rebalance\" : \"Automated Rebalance\"\n  );\n  const [projectedAmount, setProjectedAmount] = useState({\n    amount0: \"0\",\n    amount1: \"0\",\n  });\n  const [txForm, setTxForm] = useState<ITransactionSettingsForm>({\n    slippage:\n      (trigger?.action.type === \"Rebalance\" && trigger.action.slippage) ||\n      (globalSlippage ?? DEFAULT_REBALANCE_SLIPPAGE),\n    deadline: \"30\",\n  });\n  const [error, setError] = useState(\"\");\n  const [automatedRebalancePayload, setAutomatedRebalancePayload] = useState<\n    CreateTriggerPayload | UpdateTriggerPayload\n  >();\n  const [permitInfo, setPermitInfo] = useState<PermitInfo>();\n  const [gasEstimated, setGasEstimated] = useState<bigint>();\n\n  const existingTriggersLen = filterTriggers(\n    allChainsTriggerObj?.[networkId],\n    \"Rebalance\",\n    position.positionId\n  ).length;\n  const maxTriggersCreated = !trigger && existingTriggersLen >= MAX_TRIGGER;\n  const getPrice = (tick: number) =>\n    tickToPrice(\n      position.positionDataRaw.pool.token0,\n      position.positionDataRaw.pool.token1,\n      tick\n    );\n\n  const getPriceRange = () => {\n    const newTickLower =\n      trigger && !(trigger.action as RebalanceAction).isCurrentTickOffset\n        ? (trigger.action as RebalanceAction).tickLower\n        : position.tickLower;\n    const newTickUpper =\n      trigger && !(trigger.action as RebalanceAction).isCurrentTickOffset\n        ? (trigger.action as RebalanceAction).tickUpper\n        : position.tickUpper;\n    const lowerPrice = getPrice(newTickLower);\n    const upperPrice = getPrice(newTickUpper);\n    return {\n      min: lowerPrice.toFixed(18),\n      max: upperPrice.toFixed(18),\n      swapMin: upperPrice.invert().toFixed(18),\n      swapMax: lowerPrice.invert().toFixed(18),\n      tickLower: newTickLower,\n      tickUpper: newTickUpper,\n    };\n  };\n\n  const getPercentageRange = () => {\n    const newTickLower =\n      trigger && (trigger.action as RebalanceAction).isCurrentTickOffset\n        ? (trigger.action as RebalanceAction).tickLower\n        : percentageToOffsetTick(-20, -100, 0);\n    const newTickUpper =\n      trigger && (trigger.action as RebalanceAction).isCurrentTickOffset\n        ? (trigger.action as RebalanceAction).tickUpper\n        : percentageToOffsetTick(20, 0);\n    return {\n      min: offsetTickToPercentage(newTickLower),\n      max: offsetTickToPercentage(newTickUpper),\n      swapMin: offsetTickToPercentage(newTickUpper * -1),\n      swapMax: offsetTickToPercentage(newTickLower * -1),\n      tickLower: newTickLower,\n      tickUpper: newTickUpper,\n    };\n  };\n\n  const [form, setForm] = useState<IRebalanceEditForm>({\n    gasCeiling:\n      trigger?.action?.maxGasProportion ||\n      getGasCeiling(networkId, position.liquidity),\n    trigger: {\n      type: getTriggerType(trigger),\n      Price: {\n        ...getInitializedPriceTrigger(trigger, tokenA, tokenB),\n        ...getInitializedTriggerTimeBuffer(trigger),\n      },\n      Ratio: {\n        ...getInitializedRatioTrigger(\n          trigger,\n          tokenA,\n          position.tickLower,\n          position.tickUpper\n        ),\n        ...getInitializedTriggerTimeBuffer(trigger),\n      },\n      Time: getInitializedTimeTrigger(trigger),\n    },\n    priceRange: getPriceRange(),\n    percentageRange: getPercentageRange(),\n    useFutureSpot:\n      !!trigger && (trigger.action as RebalanceAction).isCurrentTickOffset,\n    // TODO: Get the futureSpotTab from trigger info when supporting token terms\n    futureSpotTab: RebalanceActionTab.PERCENTAGES,\n  });\n\n  const tokenPrice: [string, string] = useMemo(\n    () => [\n      tokenPrices?.[tokenA.address]?.price ?? \"0\",\n      tokenPrices?.[tokenB.address]?.price ?? \"0\",\n    ],\n    [tokenPrices, tokenA, tokenB]\n  );\n\n  const isRebalanceChanged = useMemo(\n    () =>\n      position.tickLower !== form.priceRange.tickLower ||\n      position.tickUpper !== form.priceRange.tickUpper,\n    [\n      form.priceRange.tickLower,\n      form.priceRange.tickUpper,\n      position.tickLower,\n      position.tickUpper,\n    ]\n  );\n  const [isAutoBtnDisabled, setIsAutoBtnDisabled] = useState(!!trigger);\n\n  useEffect(() => {\n    if (tab === \"Automated Rebalance\") {\n      const { trigger } = form;\n      if (maxTriggersCreated) {\n        setError(\"Maximum number of triggers\");\n      } else if (trigger.type === \"Price\" && trigger.Price.amount === \"0\") {\n        setError(\"Price Amount Is Required\");\n      } else if (trigger.type === \"Time\" && !form.trigger.Time.dateTime) {\n        setError(\"Trigger Time Is Required\");\n      } else if (\n        trigger.type === \"Time\" &&\n        moment(form.trigger.Time.dateTime).valueOf() < moment().valueOf()\n      ) {\n        setError(\"Trigger Time Is Before Current Time\");\n      } else {\n        setError(\n          gasCeilingButtonError(\n            networkId,\n            form.gasCeiling,\n            position.liquidity !== \"-\" ? position.liquidity : \"0\"\n          )\n        );\n      }\n    } else {\n      setError(\"\");\n    }\n  }, [tab, form, maxTriggersCreated]);\n\n  useEffect(() => {\n    if (tab === \"Rebalance\") return;\n    const generateData = () => {\n      const data = {\n        ownerAddr: address!,\n        chainId: networkId,\n        action: {\n          type: \"Rebalance\",\n          // TODO: Get the range for token terms when supporting it\n          tickLower:\n            form.useFutureSpot &&\n            form.futureSpotTab === RebalanceActionTab.PERCENTAGES\n              ? form.percentageRange.tickLower\n              : form.priceRange.tickLower,\n          tickUpper:\n            form.useFutureSpot &&\n            form.futureSpotTab === RebalanceActionTab.PERCENTAGES\n              ? form.percentageRange.tickUpper\n              : form.priceRange.tickUpper,\n          slippage: txForm.slippage,\n          maxGasProportion: form.gasCeiling,\n          isCurrentTickOffset: form.useFutureSpot,\n        },\n        condition: getTriggerCondition(\n          form.trigger,\n          position.tokenA,\n          position.tokenB,\n          position.tickLower,\n          position.tickUpper,\n          networkId,\n          true\n        ),\n        expiration: getTriggerDeadline(),\n      };\n      if (trigger) {\n        (data as UpdateTriggerPayload).taskId = trigger?.taskId;\n        for (const key in data.condition) {\n          if (data.condition[key] === undefined) {\n            delete data.condition[key];\n          }\n        }\n        const convertTrigger = _.cloneDeep(data);\n        if (\n          convertTrigger.condition.type === \"Price\" &&\n          convertTrigger.condition.frontendType === \"RELATIVE_PRICE\"\n        ) {\n          if (convertTrigger.condition.lte) {\n            convertTrigger.condition.lte = convertRelativePriceToHumanValue(\n              convertTrigger.condition.lte,\n              [position.tokenA, position.tokenB]\n            );\n          } else if (convertTrigger.condition.gte) {\n            convertTrigger.condition.gte = convertRelativePriceToHumanValue(\n              convertTrigger.condition.gte,\n              [position.tokenA, position.tokenB]\n            );\n          }\n        }\n        const isActionEqual = _.isEqual(data.action, trigger.action);\n        const isConditionEqual = _.isEqual(\n          convertTrigger.condition,\n          trigger.condition\n        );\n        setIsAutoBtnDisabled(isActionEqual && isConditionEqual);\n        if (isActionEqual) {\n          (data as UpdateTriggerPayload).action = undefined;\n        }\n        if (isConditionEqual) {\n          (data as UpdateTriggerPayload).condition = undefined;\n        }\n      } else {\n        (data as CreateTriggerPayload).amm = ammEnum;\n        (data as CreateTriggerPayload).nftId = position.positionId;\n      }\n      setAutomatedRebalancePayload(\n        data as CreateTriggerPayload | UpdateTriggerPayload\n      );\n    };\n    generateData();\n  }, [form, txForm]);\n  const debouncePriceRange = useDebounce(form.priceRange, { wait: 500 });\n  const { swapInfo, selectedSolver, suggestedSolver, setSelectedSolver } =\n    useSolverRoutingStore();\n  const { isSyncing, runSwapInfo, cancelSwapInfo, swapInfoError } =\n    useSwapInfo();\n  const { staked } = useUnstakePositionContext();\n\n  useEffect(() => {\n    if (tab === \"Rebalance\") {\n      if (!isRebalanceChanged) {\n        cancelSwapInfo();\n      } else {\n        const fetchKey =\n          `${ammEnum}-${networkId}-${address}-${position.positionId}` +\n          `:[${debouncePriceRange.tickLower},${debouncePriceRange.tickUpper}]_${txForm.slippage}`;\n        runSwapInfo({\n          type: \"Rebalance\",\n          positionId: position.positionId,\n          slippage: txForm.slippage,\n          tokenMap,\n          fetchKey,\n          options: {\n            tickLower: debouncePriceRange.tickLower,\n            tickUpper: debouncePriceRange.tickUpper,\n            tokenPrices: tokenPrice,\n          },\n        });\n      }\n    }\n  }, [\n    tab,\n    debouncePriceRange,\n    txForm,\n    isRebalanceChanged,\n    staked,\n    position.positionId,\n  ]);\n\n  useOnNetworkAccountChange(() => {\n    cancelSwapInfo();\n  });\n\n  return (\n    <RebalanceContext.Provider\n      value={{\n        tab,\n        position,\n        trigger,\n        tokenPrice,\n        positionDetails,\n        form,\n        projectedAmount,\n        maxTriggersCreated,\n        txForm,\n        error,\n        isAutoBtnDisabled,\n        isRebalanceChanged,\n        automatedRebalancePayload,\n        isSyncing,\n        swapInfo,\n        swapInfoError,\n        suggestedSolver,\n        selectedSolver,\n        permitInfo,\n        gasEstimated,\n        setTab,\n        setForm,\n        setTxForm,\n        setProjectedAmount,\n        setPermitInfo,\n        setGasEstimated,\n        setError,\n        setSelectedSolver,\n      }}\n    >\n      {children}\n    </RebalanceContext.Provider>\n  );\n};\n\nexport const useRebalanceContext = () => {\n  return React.useContext(RebalanceContext);\n};\n","import {\n  CommonLgText,\n  Flex,\n  Headline5,\n  SwapPath,\n} from \"@/../../packages/uikit/src\";\nimport { CommonContainer } from \"@/views/style\";\nimport styled from \"styled-components\";\n\nexport const Subtitle = styled(Headline5)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n  span:first-child {\n    margin-right: 4px;\n  }\n`;\n\nexport const PriceRangeHeader = styled.div`\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const FutureSpotContainer = styled(Flex)`\n  justify-content: space-between;\n  align-items: center;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\n\nexport const FutureSpotText = styled(Headline5)`\n  color: ${({ theme }) => theme.colors.global.text.T2};\n`;\n\nexport const StyledSwapPath = styled(SwapPath)`\n  margin-top: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const StatusWrapper = styled.div`\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\n\nexport const StyledCommonContainer = styled(CommonContainer)`\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const StyledCommonText = styled(CommonLgText)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n  gap: ${({ theme }) => theme.spacing.lg};\n`;\n","import { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport { OrderRoutingModal } from \"@/components/layout/hooks\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport {\n  offsetTickToPercentage,\n  percentageToOffsetTick,\n  plusOrMinusTick,\n  plusOrMinusType,\n} from \"@/helper/liquiditySelectorHelper\";\nimport {\n  getProjectedLiquidityPosition,\n  priceToTick,\n} from \"@/helper/positionHelper\";\nimport { getTokenPercentages, getTokensFromInfo } from \"@/helper/tokenHelper\";\nimport { useFetchLPDistribution } from \"@/hooks/useFetchLPDistribution\";\nimport { useFetchCurrentChainMarketPrice } from \"@/hooks/useFetchMarketPrice\";\nimport { MAX_TRIGGER, gasCeilingInputError, isProdEnv } from \"@/utils/helper\";\nimport { isManta } from \"@/utils/networkHelper\";\nimport { StyledTokenTab } from \"@/views/NewPosition/styles\";\nimport { Container, EmptyBox, Expires, RowWithGap } from \"@/views/style\";\nimport {\n  Flex,\n  FutureSpotSelector,\n  Headline3,\n  Headline5,\n  IPriceRangeWithTick,\n  LiquiditySelector,\n  NoteCard,\n  PercentageInputGroup,\n  QuestionPopover,\n  RebalanceActionTab,\n  StatusTab,\n  TokenInfo,\n  TriggerSetup,\n} from \"@aperture/uikit\";\nimport { E_ModalKey, useModal } from \"@aperture/uikitv2\";\nimport { AUTOMATION_EXPIRATION_IN_DAYS } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { TICK_SPACINGS, tickToPrice } from \"@aperture_finance/uniswap-v3-sdk\";\nimport bigDecimal from \"js-big-decimal\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useTheme } from \"styled-components\";\nimport { formatUnits } from \"viem\";\nimport { useRebalanceContext } from \"../Context\";\nimport {\n  FutureSpotContainer,\n  FutureSpotText,\n  PriceRangeHeader,\n  StatusWrapper,\n  StyledCommonContainer,\n  StyledCommonText,\n  StyledSwapPath,\n  Subtitle,\n} from \"./style\";\n\nfunction mockValidate(string: string) {\n  return string;\n}\n\nconst RebalanceEdit: React.FC = () => {\n  const { networkId, ammEnum } = useNetwork();\n  const theme = useTheme();\n  const {\n    tab,\n    position,\n    positionDetails,\n    tokenPrice,\n    form,\n    setForm: updateForm,\n    maxTriggersCreated,\n    isSyncing,\n    swapInfo,\n    swapInfoError,\n    suggestedSolver,\n    selectedSolver,\n    isRebalanceChanged,\n  } = useRebalanceContext();\n  const { staked } = useUnstakePositionContext();\n  const { setModalState } = useModal();\n\n  const tokenATicker = position.tokenA.ticker;\n  const tokenBTicker = position.tokenB.ticker;\n  const [baseToken, setBaseToken] = useState<\"tokenA\" | \"tokenB\">(\"tokenA\");\n  const [tickLower, setTickLower] = useState<number>(form.priceRange.tickLower);\n  const [tickUpper, setTickUpper] = useState<number>(form.priceRange.tickUpper);\n  const [percentageTickLower, setPercentageTickLower] = useState<number>(\n    form.percentageRange.tickLower\n  );\n  const [percentageTickUpper, setPercentageTickUpper] = useState<number>(\n    form.percentageRange.tickUpper\n  );\n  const [enableFutureSpot, setEnableFutureSpot] = useState<boolean>(false);\n  const [futureSpotStatus, setFutureSpotStatus] = useState<boolean>(\n    form.useFutureSpot\n  );\n  const [futureSpotTab, setFutureSpotTab] = useState<\n    RebalanceActionTab.TOKEN_TERMS | RebalanceActionTab.PERCENTAGES\n  >(form.futureSpotTab);\n\n  const selectedTokenList = networkId\n    ? getTokensFromInfo(position.tokenA, position.tokenB, networkId)\n    : null;\n\n  const estimate = useMemo(() => {\n    if (\n      !swapInfoError &&\n      swapInfo?.[selectedSolver]?.finalAmount0 !== undefined &&\n      swapInfo?.[selectedSolver]?.finalAmount1 !== undefined &&\n      positionDetails\n    ) {\n      const finalAmount0 = formatUnits(\n        swapInfo?.[selectedSolver]?.finalAmount0,\n        positionDetails.token0.decimals\n      );\n      const finalAmount1 = formatUnits(\n        swapInfo?.[selectedSolver]?.finalAmount1,\n        positionDetails.token1.decimals\n      );\n      return {\n        token0Amount: finalAmount0,\n        token1Amount: finalAmount1,\n        ...getTokenPercentages(\n          finalAmount0,\n          finalAmount1,\n          tokenPrice[0],\n          tokenPrice[1]\n        ),\n      };\n    } else if (positionDetails && tickLower < tickUpper) {\n      const res = getProjectedLiquidityPosition(\n        networkId,\n        position,\n        positionDetails.position,\n        tickLower,\n        tickUpper,\n        tokenPrice,\n        tab === \"Automated Rebalance\" ? form.trigger : undefined\n      );\n      return {\n        token0Amount: res[0].amount,\n        token1Amount: res[1].amount,\n        token0Percent: res[0].percent,\n        token1Percent: res[1].percent,\n      };\n    } else {\n      return {\n        token0Amount: position.tokenA.amount,\n        token1Amount: position.tokenB.amount,\n        ...getTokenPercentages(\n          position.tokenA.amount,\n          position.tokenB.amount,\n          tokenPrice[0],\n          tokenPrice[1]\n        ),\n      };\n    }\n  }, [\n    form.trigger,\n    tab,\n    tickLower,\n    tickUpper,\n    swapInfoError,\n    swapInfo,\n    selectedSolver,\n    positionDetails,\n  ]);\n\n  const useFutureSpot = useMemo(() => {\n    return tab === \"Automated Rebalance\" && futureSpotStatus;\n  }, [tab, futureSpotStatus]);\n\n  const poolKey =\n    ammEnum === \"SLIPSTREAM\" ? position.tickSpacing : position.feeTier;\n\n  const {\n    data: lpDistribution,\n    isLoading: lpDistributionLoading,\n    error: lpDistributionError,\n  } = useFetchLPDistribution(\n    position.tokenA.address,\n    position.tokenB.address,\n    poolKey\n  );\n\n  const { data: marketPrice } = useFetchCurrentChainMarketPrice(\n    position.tokenA.address,\n    position.tokenB.address,\n    [poolKey]\n  );\n  const baseTokenPrice = Number(marketPrice?.[poolKey]?.[baseToken] ?? 0);\n\n  const updatePrice = (priceForm: IPriceRangeWithTick) => {\n    updateForm({\n      ...form,\n      priceRange: priceForm,\n    });\n  };\n\n  const updatePercentage = (percentageForm: IPriceRangeWithTick) => {\n    updateForm({\n      ...form,\n      percentageRange: percentageForm,\n    });\n  };\n\n  const getPriceRange = useCallback(\n    (_tickLower: number, _tickUpper: number) => [\n      tickToPrice(\n        selectedTokenList!.token0,\n        selectedTokenList!.token1,\n        _tickLower\n      ),\n      tickToPrice(\n        selectedTokenList!.token0,\n        selectedTokenList!.token1,\n        _tickUpper\n      ),\n    ],\n    [selectedTokenList]\n  );\n\n  const updateMinMax = (val: string, type: \"Min\" | \"Max\") => {\n    if (selectedTokenList && baseToken) {\n      const tick = priceToTick(\n        selectedTokenList!.token0,\n        selectedTokenList!.token1,\n        val,\n        position.tickSpacing,\n        baseToken === \"tokenA\"\n      );\n      if (type === \"Min\") {\n        baseToken === \"tokenA\" ? setTickLower(tick) : setTickUpper(tick);\n      } else {\n        baseToken === \"tokenA\" ? setTickUpper(tick) : setTickLower(tick);\n      }\n    }\n  };\n\n  const updateMinMaxPercentage = (val: string, type: \"Min\" | \"Max\") => {\n    if (selectedTokenList && baseToken) {\n      const percentageTick = percentageToOffsetTick(\n        Math.abs(parseFloat(val)) * (type === \"Min\" ? -1 : 1),\n        type === \"Min\" ? -100 : 0,\n        type === \"Min\" ? 0 : undefined\n      );\n      if (type === \"Min\") {\n        baseToken === \"tokenA\"\n          ? setPercentageTickLower(percentageTick)\n          : setPercentageTickUpper(percentageTick * -1);\n      } else {\n        baseToken === \"tokenA\"\n          ? setPercentageTickUpper(percentageTick)\n          : setPercentageTickLower(percentageTick * -1);\n      }\n    }\n  };\n\n  const updateTickAfterPlusOrMinus = (actionType: plusOrMinusType) => {\n    const tick = plusOrMinusTick(\n      actionType,\n      tickLower,\n      tickUpper,\n      baseToken === \"tokenB\",\n      position.tickSpacing,\n      position.positionDataRaw?.pool\n    );\n    if (\n      actionType === \"getDecrementLower\" ||\n      actionType === \"getIncrementLower\"\n    ) {\n      baseToken === \"tokenA\" ? setTickLower(tick) : setTickUpper(tick);\n    } else {\n      baseToken === \"tokenA\" ? setTickUpper(tick) : setTickLower(tick);\n    }\n  };\n\n  const updatePercentageTickAfterPlusOrMinus = (\n    actionType: plusOrMinusType\n  ) => {\n    let newPercentage = 0;\n    let newTick = 0;\n    if (baseToken === \"tokenA\") {\n      switch (actionType) {\n        case \"getDecrementLower\":\n          newPercentage = parseFloat(form.percentageRange.min) - 1;\n          newTick = percentageToTick(newPercentage, -100);\n          if (\n            newTick === percentageTickLower &&\n            parseFloat(form.percentageRange.min) !== -100\n          )\n            newTick -= TICK_SPACINGS[position.feeTier];\n          setPercentageTickLower(newTick);\n          break;\n        case \"getIncrementLower\":\n          newPercentage = parseFloat(form.percentageRange.min) + 1;\n          newTick = percentageToTick(newPercentage, -100);\n          if (\n            newTick === percentageTickLower &&\n            parseFloat(form.percentageRange.min) !== 0\n          )\n            newTick += TICK_SPACINGS[position.feeTier];\n          setPercentageTickLower(newTick);\n          break;\n        case \"getDecrementUpper\":\n          newPercentage = parseFloat(form.percentageRange.max) - 1;\n          newTick = percentageToTick(newPercentage, 0);\n          if (\n            newTick === percentageTickUpper &&\n            parseFloat(form.percentageRange.max) !== 0\n          )\n            newTick -= TICK_SPACINGS[position.feeTier];\n          setPercentageTickUpper(newTick);\n          break;\n        case \"getIncrementUpper\":\n          newPercentage = parseFloat(form.percentageRange.max) + 1;\n          newTick = percentageToTick(newPercentage, 0);\n          if (newTick === percentageTickUpper)\n            newTick += TICK_SPACINGS[position.feeTier];\n          setPercentageTickUpper(newTick);\n          break;\n      }\n    } else {\n      switch (actionType) {\n        case \"getDecrementLower\":\n          newPercentage = parseFloat(form.percentageRange.swapMin) - 1;\n          newTick = percentageToTick(newPercentage, -100) * -1;\n          if (\n            newTick === percentageTickUpper &&\n            parseFloat(form.percentageRange.swapMin) !== -100\n          )\n            newTick += TICK_SPACINGS[position.feeTier];\n          setPercentageTickUpper(newTick);\n          break;\n        case \"getIncrementLower\":\n          newPercentage = parseFloat(form.percentageRange.swapMin) + 1;\n          newTick = percentageToTick(newPercentage, -100) * -1;\n          if (\n            newTick === percentageTickUpper &&\n            parseFloat(form.percentageRange.swapMin) !== 0\n          )\n            newTick -= TICK_SPACINGS[position.feeTier];\n          setPercentageTickUpper(newTick);\n          break;\n        case \"getDecrementUpper\":\n          newPercentage = parseFloat(form.percentageRange.swapMax) - 1;\n          newTick = percentageToTick(newPercentage, 0) * -1;\n          if (\n            newTick === percentageTickLower &&\n            parseFloat(form.percentageRange.swapMax) !== 0\n          )\n            newTick += TICK_SPACINGS[position.feeTier];\n          setPercentageTickLower(newTick);\n          break;\n        case \"getIncrementUpper\":\n          newPercentage = parseFloat(form.percentageRange.swapMax) + 1;\n          newTick = percentageToTick(newPercentage, 0) * -1;\n          if (newTick === percentageTickLower)\n            newTick -= TICK_SPACINGS[position.feeTier];\n          setPercentageTickLower(newTick);\n          break;\n      }\n    }\n  };\n\n  const percentageToTick = (percentage: number, minPercentage: number) => {\n    let newTick = percentageToOffsetTick(\n      percentage,\n      minPercentage,\n      minPercentage === -100 ? 0 : undefined\n    );\n    return newTick;\n  };\n\n  useEffect(() => {\n    if (selectedTokenList) {\n      const [priceLower, priceUpper] = getPriceRange(tickLower, tickUpper);\n      updatePrice({\n        min: priceLower.toFixed(18),\n        max: priceUpper.toFixed(18),\n        swapMin: priceUpper.invert().toFixed(18),\n        swapMax: priceLower.invert().toFixed(18),\n        tickLower: tickLower,\n        tickUpper: tickUpper,\n      });\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [tickLower, tickUpper]);\n\n  useEffect(() => {\n    if (selectedTokenList && enableFutureSpot) {\n      updatePercentage({\n        min: offsetTickToPercentage(percentageTickLower),\n        max: offsetTickToPercentage(percentageTickUpper),\n        swapMin: offsetTickToPercentage(percentageTickUpper * -1),\n        swapMax: offsetTickToPercentage(percentageTickLower * -1),\n        tickLower: percentageTickLower,\n        tickUpper: percentageTickUpper,\n      });\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [percentageTickLower, percentageTickUpper]);\n\n  useEffect(() => {\n    const timeId = setTimeout(() => {\n      setEnableFutureSpot(true);\n    }, 1000);\n    return () => {\n      clearTimeout(timeId);\n    };\n  }, []);\n\n  useEffect(() => {\n    if (selectedTokenList) {\n      updateForm({\n        ...form,\n        useFutureSpot: futureSpotStatus,\n      });\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [futureSpotStatus]);\n\n  useEffect(() => {\n    if (selectedTokenList) {\n      updateForm({\n        ...form,\n        futureSpotTab: futureSpotTab,\n      });\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [futureSpotTab]);\n\n  const priceRange: [number, number] = useMemo(() => {\n    if (selectedTokenList && baseToken) {\n      const [priceRangeLower, priceRangeUpper] = getPriceRange(\n        position.tickLower,\n        position.tickUpper\n      );\n      return baseToken === \"tokenA\"\n        ? [\n            Number(priceRangeLower.toFixed(18)),\n            Number(priceRangeUpper.toFixed(18)),\n          ]\n        : [\n            Number(priceRangeUpper.invert().toFixed(18)),\n            Number(priceRangeLower.invert().toFixed(18)),\n          ];\n    }\n    return undefined;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [baseToken]);\n\n  return tab === \"Automated Rebalance\" && isManta(networkId) ? (\n    <EmptyBox height={\"320px\"}>\n      <Headline5>Automation tool on ApertureSwap is coming soon!</Headline5>\n    </EmptyBox>\n  ) : (\n    <Container>\n      {tab === \"Automated Rebalance\" && (\n        <TriggerSetup\n          errorMsg={\n            maxTriggersCreated\n              ? `You have already set up the maximum number of triggers (${MAX_TRIGGER}).`\n              : undefined\n          }\n          tooltip=\"Use triggers to automatically rebalance your position based on asset prices, pool ratios, or time. Users can set up to 3 triggers for automated rebalancing.\"\n          initForm={form.trigger}\n          tokens={[position.tokenA, position.tokenB]}\n          expireDays={AUTOMATION_EXPIRATION_IN_DAYS}\n          onFormChange={(triggerSetupForm) => {\n            updateForm({ ...form, trigger: triggerSetupForm });\n          }}\n        />\n      )}\n      {!isProdEnv() && (\n        <StyledCommonText>\n          <div>\n            tickLower:{form.priceRange.tickLower} tickUpper:{\" \"}\n            {form.priceRange.tickUpper}\n          </div>\n          <div>\n            percentageTickLower: {form.percentageRange.tickLower}{\" \"}\n            percentageTickUpper: {form.percentageRange.tickUpper}\n          </div>\n        </StyledCommonText>\n      )}\n      <RowWithGap gap={theme.spacing.xl}>\n        <StyledCommonContainer width={\"100%\"}>\n          <PriceRangeHeader>\n            <Subtitle lineHeight={\"20px\"}>Set New Price Range</Subtitle>\n          </PriceRangeHeader>\n          <FutureSpotContainer>\n            <StyledTokenTab\n              menu={[tokenATicker, tokenBTicker]}\n              defaultSelected={baseToken === \"tokenA\" ? 0 : 1}\n              onSelect={(value: string) =>\n                setBaseToken(value === tokenATicker ? \"tokenA\" : \"tokenB\")\n              }\n              width={140}\n            />\n            {tab === \"Automated Rebalance\" && (\n              <StatusWrapper>\n                <StatusTab\n                  noText={true}\n                  onStatus={futureSpotStatus}\n                  onChange={(status: boolean) => {\n                    setFutureSpotStatus(status);\n                  }}\n                />\n                <FutureSpotText>\n                  Price range based on future spot price\n                </FutureSpotText>\n              </StatusWrapper>\n            )}\n          </FutureSpotContainer>\n          {useFutureSpot ? (\n            <FutureSpotSelector\n              price={baseTokenPrice}\n              priceLower={\n                baseToken === \"tokenA\"\n                  ? form.percentageRange.min\n                  : form.percentageRange.swapMin\n              }\n              priceUpper={\n                baseToken === \"tokenA\"\n                  ? form.percentageRange.max\n                  : form.percentageRange.swapMax\n              }\n              getDecrementLower={() => {\n                updatePercentageTickAfterPlusOrMinus(\"getDecrementLower\");\n              }}\n              getIncrementLower={() => {\n                updatePercentageTickAfterPlusOrMinus(\"getIncrementLower\");\n              }}\n              getDecrementUpper={() => {\n                updatePercentageTickAfterPlusOrMinus(\"getDecrementUpper\");\n              }}\n              getIncrementUpper={() => {\n                updatePercentageTickAfterPlusOrMinus(\"getIncrementUpper\");\n              }}\n              onLeftRangeInput={(val) => {\n                updateMinMaxPercentage(val, \"Min\");\n              }}\n              onRightRangeInput={(val) => {\n                updateMinMaxPercentage(val, \"Max\");\n              }}\n              feeAmount={position.feeTier}\n              currencyA={position[baseToken].ticker}\n              currencyB={baseToken === \"tokenB\" ? tokenATicker : tokenBTicker}\n              ticksAtLimit={{ LOWER: true, UPPER: true }}\n              interactive={true}\n              chartHeight={200}\n              futureSpotTab={futureSpotTab}\n              onSwitchFutureSpotTab={setFutureSpotTab}\n            />\n          ) : (\n            <LiquiditySelector\n              price={baseTokenPrice}\n              priceLower={\n                baseToken === \"tokenA\"\n                  ? form.priceRange.min\n                  : form.priceRange.swapMin\n              }\n              priceUpper={\n                baseToken === \"tokenA\"\n                  ? form.priceRange.max\n                  : form.priceRange.swapMax\n              }\n              warningMsg={\n                bigDecimal.compareTo(\n                  baseToken === \"tokenA\"\n                    ? form.priceRange.min\n                    : form.priceRange.swapMin,\n                  baseToken === \"tokenA\"\n                    ? form.priceRange.max\n                    : form.priceRange.swapMax\n                ) >= 0\n                  ? \"Invalid range selected. The min price must be lower than the max price.\"\n                  : tab === \"Rebalance\"\n                  ? \"Your position will not earn fees or be used in trades until the market price moves into your range.\"\n                  : undefined\n              }\n              validate={mockValidate}\n              getDecrementLower={() => {\n                updateTickAfterPlusOrMinus(\"getDecrementLower\");\n              }}\n              getIncrementLower={() => {\n                updateTickAfterPlusOrMinus(\"getIncrementLower\");\n              }}\n              getDecrementUpper={() => {\n                updateTickAfterPlusOrMinus(\"getDecrementUpper\");\n              }}\n              getIncrementUpper={() => {\n                updateTickAfterPlusOrMinus(\"getIncrementUpper\");\n              }}\n              onLeftRangeInput={(val) => updateMinMax(val, \"Min\")}\n              onRightRangeInput={(val) => updateMinMax(val, \"Max\")}\n              feeAmount={position.feeTier}\n              currencyA={position[baseToken].ticker}\n              currencyB={baseToken === \"tokenB\" ? tokenATicker : tokenBTicker}\n              ticksAtLimit={{ LOWER: true, UPPER: true }}\n              interactive={true}\n              chartHeight={200}\n              dataState={{\n                isLoading: lpDistributionLoading,\n                error: lpDistributionError,\n                formattedData: lpDistribution && lpDistribution[baseToken],\n              }}\n              currentRange={priceRange}\n            />\n          )}\n          {tab === \"Rebalance\" &&\n            isRebalanceChanged &&\n            (isSyncing ||\n              (swapInfoError && !swapInfo) ||\n              swapInfo?.[selectedSolver]) && (\n              <>\n                <StyledSwapPath\n                  loading={isSyncing}\n                  priceImpact={swapInfo?.[selectedSolver]?.priceImpact}\n                  api={swapInfo?.[selectedSolver]?.api}\n                  fromToken={swapInfo?.[selectedSolver]?.fromToken}\n                  swapData={swapInfo?.[selectedSolver]?.swapData}\n                  swapRoutes={swapInfo?.[selectedSolver]?.swapRoutes}\n                  showSwapRoutes={\n                    swapInfo?.[selectedSolver]?.swapRoutes?.length > 0\n                  }\n                  errorMsg={swapInfoError && !swapInfo}\n                  maxSwapRouteWidth={562}\n                  onBtnClick={() =>\n                    setModalState(E_ModalKey.ORDER_ROUTING_MODAL, true)\n                  }\n                  suggested={selectedSolver === suggestedSolver}\n                  gasFeeUSD={swapInfo?.[selectedSolver]?.gasFeeUSD}\n                  atStake={staked}\n                />\n                <OrderRoutingModal />\n              </>\n            )}\n        </StyledCommonContainer>\n      </RowWithGap>\n      {!useFutureSpot && (\n        <Flex justifyContent={\"space-between\"}>\n          <StyledCommonContainer\n            width={tab === \"Automated Rebalance\" ? \"463px\" : \"100%\"}\n          >\n            <Subtitle>Projected Liquidity Position</Subtitle>\n            <TokenInfo\n              key={position.tokenA.address}\n              Icon={position.tokenA.Icon}\n              ticker={position.tokenA.ticker}\n              address={position.tokenA.address}\n              native={position.tokenA.native}\n              decimals={position.tokenA.decimals}\n              amount={estimate.token0Amount}\n              price={tokenPrice[0]}\n              tag={`${estimate.token0Percent}%`}\n              maxWidth={500}\n              marginBottom={0}\n            />\n            <TokenInfo\n              key={position.tokenB.address}\n              Icon={position.tokenB.Icon}\n              ticker={position.tokenB.ticker}\n              address={position.tokenB.address}\n              native={position.tokenB.native}\n              decimals={position.tokenA.decimals}\n              amount={estimate.token1Amount}\n              price={tokenPrice[1]}\n              maxWidth={500}\n              marginBottom={0}\n              tag={`${estimate.token1Percent}%`}\n            />\n            <NoteCard text=\"Any uncollected fees will be collected and reinvested into the new position after rebalance.\" />\n          </StyledCommonContainer>\n          {tab === \"Automated Rebalance\" && (\n            <Expires>\n              <Subtitle>Expires In</Subtitle>\n              <Headline3>{`${AUTOMATION_EXPIRATION_IN_DAYS} Days`}</Headline3>\n            </Expires>\n          )}\n        </Flex>\n      )}\n      {tab === \"Automated Rebalance\" && (\n        <Flex justifyContent={\"space-between\"}>\n          <StyledCommonContainer width={useFutureSpot ? \"463px\" : \"100%\"}>\n            <Subtitle fontSize={16} lineHeight={\"20px\"}>\n              <span>Gas Fee Ceiling Setting</span>\n              <QuestionPopover content=\"Input the maximum gas fee in either dollars or percentage of position. However, the actual gas ceiling will be based on the percentage not the dollar amount (e.g. if you choose $50 which is currently 1% of your total liquidity position then we will set a gas ceiling of 1%).\" />\n            </Subtitle>\n            <PercentageInputGroup\n              color=\"primary\"\n              width={280}\n              amount={position.liquidity}\n              percentage={form.gasCeiling}\n              onChange={(percentage) => {\n                updateForm({ ...form, gasCeiling: percentage });\n              }}\n              onError={(percentage) =>\n                gasCeilingInputError(networkId, percentage, position.liquidity)\n              }\n            />\n          </StyledCommonContainer>\n          {useFutureSpot && (\n            <Expires>\n              <Subtitle>Expires In</Subtitle>\n              <Headline3>{`${AUTOMATION_EXPIRATION_IN_DAYS} Days`}</Headline3>\n            </Expires>\n          )}\n        </Flex>\n      )}\n    </Container>\n  );\n};\n\nexport default RebalanceEdit;\n","import ApproveOnChainBtn from \"@/components/Button/ApproveOnChainBtn\";\nimport SignPayloadBtn from \"@/components/Button/SignPayloadBtn\";\nimport SignPositionPermitBtn from \"@/components/Button/SignPositionPermitBtn\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport {\n  createTrigger,\n  getCreateTriggerFailure,\n  getTriggerType,\n  updateTrigger,\n} from \"@/helper/triggerHelper\";\nimport { useFetchAllChainUserTriggers } from \"@/hooks/useFetchAllChainUserTriggers\";\nimport { useFetchPositionPermission } from \"@/hooks/useFetchPositionPermission\";\nimport { useIfAuthorized } from \"@/hooks/useFetchUserAuthentication\";\nimport { useIsWalletContract } from \"@/hooks/useIsWalletContract\";\nimport {\n  CreateTriggerPayload,\n  PermitInfo,\n  UpdateTriggerPayload,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useEffect, useState } from \"react\";\nimport { Address } from \"viem\";\nimport { useRebalanceContext } from \"../Context\";\n\nconst AutomatedRebalanceBtn: React.FC<{\n  payload: CreateTriggerPayload | UpdateTriggerPayload | undefined;\n  onClose: () => void;\n}> = ({ payload, onClose }) => {\n  const { mutate } = useFetchAllChainUserTriggers();\n  const { addSnackbar } = useSnackbarV2();\n  const { ifAuthorized } = useIfAuthorized();\n  const { data: isWalletContract } = useIsWalletContract();\n  const { position, trigger: triggerTask } = useRebalanceContext();\n  const {\n    data: permitStatus,\n    isLoading: isPermitLoading,\n    mutate: mutatePositionPermit,\n  } = useFetchPositionPermission(position.positionId);\n  const [permitInfo, setPermitInfo] = useState<PermitInfo>(undefined);\n  const [signedPayload, setSignedPayload] = useState<Address>(undefined);\n  const [isLoading, setIsLoading] = useState(false);\n\n  useEffect(() => {\n    if (signedPayload && payload) {\n      setIsLoading(true);\n      if (!triggerTask) {\n        createTrigger(\n          payload as CreateTriggerPayload,\n          signedPayload,\n          permitInfo\n        )\n          .then((res) => {\n            if (res === \"Success\") {\n              const type = getTriggerType(payload);\n              mutatePositionPermit().then(() => {\n                mutate();\n              });\n              addSnackbar({\n                info: `You have successfully set up a ${type.toLowerCase()}-based automated rebalance for your ${\n                  position.tokenA.ticker\n                }-${position.tokenB.ticker} position.`,\n                status: \"completed\",\n              });\n              onClose();\n              setIsLoading(false);\n            }\n          })\n          .catch((err) => {\n            addSnackbar({\n              info:\n                \"Your automated rebalance request has failed: \" +\n                getCreateTriggerFailure(err),\n              status: \"failed\",\n            });\n            setIsLoading(false);\n          });\n      } else {\n        updateTrigger(payload as UpdateTriggerPayload, signedPayload)\n          .then((res) => {\n            const type = getTriggerType(triggerTask);\n            if (res === \"Success\") {\n              mutatePositionPermit().then(() => {\n                mutate();\n              });\n              addSnackbar({\n                info: `You have successfully updated the ${type.toLowerCase()} trigger for your ${\n                  position.tokenA.ticker\n                }-${position.tokenB.ticker} position rebalance.`,\n                status: \"completed\",\n              });\n              onClose();\n              setIsLoading(false);\n            }\n          })\n          .catch((err) => {\n            addSnackbar({\n              info:\n                \"Your automated rebalance update request has failed: \" + err,\n              status: \"failed\",\n            });\n            setIsLoading(false);\n          });\n      }\n    }\n  }, [signedPayload]);\n\n  return ifAuthorized || isPermitLoading || permitStatus || permitInfo ? (\n    <SignPayloadBtn\n      text=\"Confirm Automated Rebalance Intent\"\n      color=\"secondary\"\n      isLoading={isLoading}\n      {...{ payload, setSignedPayload }}\n    />\n  ) : isWalletContract ? (\n    <ApproveOnChainBtn\n      text=\"Approve on-chain\"\n      color=\"secondary\"\n      tokenPair={`${position.tokenA.ticker}-${position.tokenB.ticker}`}\n      positionIdBN={position.positionIdBN}\n      onApproved={mutatePositionPermit}\n    />\n  ) : (\n    <SignPositionPermitBtn\n      color=\"secondary\"\n      tokenPair={`${position.tokenA.ticker}-${position.tokenB.ticker}`}\n      positionId={position.positionIdBN}\n      setPermitInfo={(permitInfo: PermitInfo) =>\n        setPermitInfo({\n          signature: permitInfo.signature,\n          deadline: String(permitInfo.deadline),\n        })\n      }\n    />\n  );\n};\n\nexport default AutomatedRebalanceBtn;\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport { getRebalanceRequest } from \"@/helper/positionHelper\";\nimport { estimateGas } from \"@/helper/transactionHelper\";\nimport { usePositionSnackBar } from \"@/hooks/snackbar/usePositionSnackbar\";\nimport { useSendTransactionWithGas } from \"@/hooks/wagmi/useSendTransactionWithGas\";\nimport { calculateGasMargin } from \"@/utils/helper\";\nimport { Button, Spinner } from \"@aperture/uikit\";\nimport { getLogger } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { Color } from \"@ui/components/Button/types\";\nimport { useEffect, useState } from \"react\";\nimport { Address, EstimateGasExecutionError } from \"viem\";\nimport { useAccount } from \"wagmi\";\nimport { useRebalanceContext } from \"../Context\";\n\nconst ConfirmRebalanceBtn: React.FC<{\n  navBack: () => void;\n  onClose: () => void;\n  color?: Color;\n}> = ({ navBack, onClose, color = \"primary\" }) => {\n  const { address } = useAccount();\n  const { ammEnum, networkId, publicClient } = useNetwork();\n  const [txRequest, setTxRequest] = useState<any>();\n  const {\n    position,\n    error,\n    isSyncing,\n    form,\n    swapInfo,\n    swapInfoError,\n    selectedSolver,\n    permitInfo,\n    txForm,\n    tokenPrice,\n    setProjectedAmount,\n    setGasEstimated,\n    setError,\n  } = useRebalanceContext();\n  const {\n    ready,\n    data,\n    sendTransaction,\n    error: txErrorMsg,\n    isError,\n    isPending,\n    isSuccess,\n  } = useSendTransactionWithGas(txRequest);\n  const { addSnackbar } = useSnackbarV2();\n  const { addPositionSnackbar } = usePositionSnackBar();\n\n  useEffect(() => {\n    if (isError) {\n      addSnackbar({\n        info: \"Your rebalance request has failed.\",\n        status: \"failed\",\n      });\n      console.log(\"Failed to rebalance\", txErrorMsg);\n    }\n  }, [isError]);\n\n  useEffect(() => {\n    setGasEstimated(undefined);\n    setTxRequest(undefined);\n    if (swapInfo?.[selectedSolver]) {\n      getRebalanceRequest(\n        ammEnum,\n        position,\n        address as Address,\n        form.priceRange,\n        txForm,\n        permitInfo,\n        swapInfo?.[selectedSolver]?.swapDataHex,\n        swapInfo?.[selectedSolver]?.liquidity,\n        swapInfo?.[selectedSolver]?.feeBips,\n        publicClient\n      )\n        .then(({ tx }) => {\n          setProjectedAmount({\n            amount0: swapInfo[selectedSolver]?.finalAmount0?.toString(),\n            amount1: swapInfo[selectedSolver]?.finalAmount1?.toString(),\n          });\n          estimateGas(tx, networkId, publicClient)\n            .then(({ totalGasCost, gasCost, l2GasAmount }) => {\n              setTxRequest({ ...tx, gas: calculateGasMargin(l2GasAmount) });\n              setGasEstimated(totalGasCost ?? gasCost);\n            })\n            .catch((gasError) => {\n              const error = gasError as EstimateGasExecutionError;\n              getLogger().error(\"Failed to estimate gas on getRebalanceTx: \", {\n                error: JSON.stringify(error.message),\n              });\n              setError(error.details);\n            });\n        })\n        .catch((error) => {\n          getLogger().error(\"Failed to getRebalanceRequest: \", {\n            ammEnum,\n            networkId: position.chainId,\n            address,\n            positionId: position.positionId,\n            priceRange: form.priceRange,\n            txForm,\n            swapDataHex: swapInfo?.[selectedSolver]?.swapDataHex,\n            liquidity: swapInfo?.[selectedSolver]?.liquidity,\n            feeBips: swapInfo?.[selectedSolver]?.feeBips,\n            error: JSON.stringify(error),\n          });\n          setError(error.reason);\n        });\n    }\n  }, [form.priceRange, txForm, permitInfo, swapInfo, selectedSolver]);\n\n  useEffect(() => {\n    if (isSuccess) {\n      addPositionSnackbar({\n        info: \"Your rebalance request has been sent.\",\n        status: \"completed\",\n        url: undefined,\n        transaction: {\n          hash: data,\n          successMsg: `You have successfully rebalanced your ${position.tokenA.ticker}-${position.tokenB.ticker} position.`,\n        },\n      });\n\n      const feePips =\n        Math.floor(Number(swapInfo?.[selectedSolver]?.feeBips) / 1e14) / 1e4;\n      const context = {\n        ammEnum,\n        txHash: data,\n        feePips,\n        feeUSD: swapInfo?.[selectedSolver]?.feeUSD,\n        solver: swapInfo?.[selectedSolver]?.api?.solver,\n        tokenA: position.tokenA.address,\n        tokenB: position.tokenB.address,\n        tokenPrice,\n        finalAmount0: swapInfo?.[selectedSolver]?.finalAmount0?.toString(),\n        finalAmount1: swapInfo?.[selectedSolver]?.finalAmount1?.toString(),\n        swapData: swapInfo?.[selectedSolver]?.swapData,\n      };\n\n      if (feePips > 0.05) {\n        getLogger().warn(\"Rebalance Request Sent Success\", context);\n      } else {\n        getLogger().info(\"Rebalance Request Sent Success\", context);\n      }\n\n      navBack();\n      onClose();\n    }\n  }, [isSuccess]);\n\n  return (\n    <Button\n      onClick={() => {\n        getLogger().info(\"Rebalance.ClickConfirm.Start\", {\n          ammEnum,\n        });\n        sendTransaction?.();\n      }}\n      disabled={\n        !txRequest || !ready || !!error || isPending || isSuccess || isSyncing\n      }\n      variant=\"contained\"\n      color={color}\n      size=\"lg\"\n      width=\"100%\"\n    >\n      {error ? (\n        error\n      ) : isPending || isSyncing ? (\n        <Spinner />\n      ) : swapInfoError && !swapInfo?.[selectedSolver] ? (\n        \"Swap Info Unavailable\"\n      ) : (\n        \"Confirm Rebalance\"\n      )}\n    </Button>\n  );\n};\n\nexport default ConfirmRebalanceBtn;\n","import ApproveOnChainBtn from \"@/components/Button/ApproveOnChainBtn\";\nimport SignPositionPermitBtn from \"@/components/Button/SignPositionPermitBtn\";\nimport { useFetchPositionPermission } from \"@/hooks/useFetchPositionPermission\";\nimport { useIfAuthorized } from \"@/hooks/useFetchUserAuthentication\";\nimport { useIsWalletContract } from \"@/hooks/useIsWalletContract\";\nimport { useRebalanceContext } from \"../Context\";\nimport ConfirmRebalanceBtn from \"./ConfirmRebalanceBtn\";\n\nexport const RebalanceWrapper: React.FC<{\n  navBack: () => void;\n  onClose: () => void;\n}> = ({ navBack, onClose }) => {\n  const { ifAuthorized } = useIfAuthorized();\n  const { data: isWalletContract } = useIsWalletContract();\n  const { position, permitInfo, setPermitInfo } = useRebalanceContext();\n  const {\n    data: permitStatus,\n    isLoading: isPermitLoading,\n    mutate: mutatePositionPermit,\n  } = useFetchPositionPermission(position.positionId);\n\n  return (\n    <>\n      {ifAuthorized ||\n      (isWalletContract && (isPermitLoading || permitStatus)) ||\n      permitInfo ? (\n        <ConfirmRebalanceBtn\n          color=\"secondary\"\n          {...{\n            navBack,\n            onClose,\n          }}\n        />\n      ) : isWalletContract ? (\n        <ApproveOnChainBtn\n          text=\"Approve on-chain\"\n          color=\"secondary\"\n          tokenPair={`${position.tokenA.ticker}-${position.tokenB.ticker}`}\n          positionIdBN={position.positionIdBN}\n          onApproved={mutatePositionPermit}\n        />\n      ) : (\n        <SignPositionPermitBtn\n          color=\"secondary\"\n          tokenPair={`${position.tokenA.ticker}-${position.tokenB.ticker}`}\n          positionId={position.positionIdBN}\n          setPermitInfo={setPermitInfo}\n        />\n      )}\n    </>\n  );\n};\n","import { UnstakePositionBtn } from \"@/components/Button/StakePositionBtn\";\nimport { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport { useGlobalSlippage } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\n\nimport { useFetchStakePositionsIds } from \"@/hooks/useFetchStakePositionsIds\";\nimport { DEFAULT_REBALANCE_SLIPPAGE } from \"@/utils/helper\";\nimport { isManta } from \"@/utils/networkHelper\";\nimport { Title, TitleText } from \"@/views/style\";\nimport {\n  Button,\n  DRAWER_CONTENT_WIDTH,\n  DrawerTitle,\n  FlexColumn,\n  Headline5,\n  SelectMenuTab,\n  TransactionSettings,\n} from \"@aperture/uikit\";\nimport bigDecimal from \"js-big-decimal\";\nimport styled from \"styled-components\";\nimport { IMode } from \"..\";\nimport { IRebalanceTab, useRebalanceContext } from \"../Context\";\nimport AutomatedRebalanceBtn from \"./AutomatedRebalanceBtn\";\nimport { RebalanceWrapper } from \"./RebalanceWrapper\";\n\nconst Container = styled(FlexColumn)`\n  height: 100%;\n  gap: ${({ theme }) => theme.spacing[\"2xl\"]};\n`;\n\nconst StyledSelectMenuTab = styled(SelectMenuTab)<{ maxWidth: number }>`\n  height: 40px;\n  max-width: ${({ maxWidth }) => maxWidth}px;\n  background: ${({ theme }) => theme.colors.global.background.BG3};\n`;\n\nconst Content = styled.div`\n  width: ${DRAWER_CONTENT_WIDTH};\n`;\n\nconst Wrapper = styled.div<{ mode: string }>`\n  overflow-x: hidden;\n  overflow-y: auto;\n  &::-webkit-scrollbar {\n    width: 0;\n  }\n  height: ${({ mode }) =>\n    mode === \"edit\" ? \"calc(100% - 168px)\" : \"calc(100% - 156px)\"};\n`;\n\nconst ButtonsContainer = styled.div`\n  padding-bottom: 24px;\n  display: flex;\n  align-items: center;\n  width: ${DRAWER_CONTENT_WIDTH};\n  justify-content: flex-end;\n  box-sizing: border-box;\n  gap: 18px;\n`;\n\nconst StyledTransactionSettings = styled(TransactionSettings)`\n  margin-right: auto;\n`;\n\nconst RebalanceLayout: React.FC<{\n  mode: IMode;\n  children: React.ReactNode;\n  navBack: () => void;\n  onClose: () => void;\n  onModeChange: (mode: IMode) => void;\n}> = ({ mode, navBack, children, onClose, onModeChange }) => {\n  const { networkId } = useNetwork();\n  const { globalSlippage, setGlobalSlippage } = useGlobalSlippage();\n  const {\n    tab,\n    position,\n    form,\n    txForm,\n    setTxForm,\n    error,\n    swapInfo,\n    isAutoBtnDisabled,\n    isRebalanceChanged,\n    isSyncing,\n    automatedRebalancePayload,\n    setTab: onTabChange,\n    setProjectedAmount,\n  } = useRebalanceContext();\n  const { mutate: mutateStakePositionIds } = useFetchStakePositionsIds();\n  const { stakePool, staked, setStaked } = useUnstakePositionContext();\n\n  const isModePreview = mode === \"preview\";\n  const isModeEdit = mode === \"edit\";\n  const isTabRebalance = tab === \"Rebalance\";\n  const previewTitle = isTabRebalance\n    ? \"Preview Rebalance\"\n    : \"Preview Automated Rebalance Intent\";\n\n  return (\n    <Container>\n      <Title>\n        <DrawerTitle\n          onClick={() => {\n            isModeEdit ? onClose() : onModeChange(\"edit\");\n          }}\n          isDrawer\n        >\n          {isModePreview && (\n            <Headline5 fontSize={16} textAlign={\"end\"}>\n              {previewTitle}\n            </Headline5>\n          )}\n          {isModeEdit && (\n            <Headline5 fontSize={16} textAlign={\"end\"}>\n              Back to dashboard\n            </Headline5>\n          )}\n        </DrawerTitle>\n      </Title>\n      {isModePreview ? (\n        <TitleText>{previewTitle}</TitleText>\n      ) : (\n        <TitleText>Rebalance</TitleText>\n      )}\n      {isModeEdit && (\n        <StyledSelectMenuTab\n          maxWidth={315}\n          containerPadding={\"0px\"}\n          menu={[\"Rebalance\", \"Automated Rebalance\"]}\n          selectWidth={[115, 185]}\n          itemsWidth={[115, 188]}\n          isPro={[false, true]}\n          defaultSelected={[\"Rebalance\", \"Automated Rebalance\"].indexOf(tab)}\n          onSelect={(value: IRebalanceTab) => onTabChange(value)}\n        />\n      )}\n      <Wrapper mode={mode}>\n        <Content>{children}</Content>\n      </Wrapper>\n\n      {/* Buttons */}\n      {!(!isTabRebalance && isManta(networkId)) && (\n        <ButtonsContainer>\n          {isModeEdit && (\n            <StyledTransactionSettings\n              defaultSlippage={DEFAULT_REBALANCE_SLIPPAGE}\n              globalSlippage={globalSlippage}\n              settingsForm={txForm}\n              dropdownPosition=\"topRight\"\n              onFormChange={(form) => setTxForm(form)}\n              buttonSize={\"small\"}\n              setGlobalSlippage={(value) =>\n                setGlobalSlippage((prev) => ({ ...prev, [networkId]: value }))\n              }\n            />\n          )}\n          <Button\n            variant=\"contained\"\n            color=\"default\"\n            size=\"lg\"\n            width=\"100%\"\n            onClick={() => {\n              mode === \"edit\" ? onClose() : onModeChange(\"edit\");\n              isTabRebalance &&\n                setProjectedAmount({\n                  amount0: \"0\",\n                  amount1: \"0\",\n                });\n            }}\n          >\n            Cancel\n          </Button>\n          {isModeEdit &&\n            (stakePool && staked ? (\n              <UnstakePositionBtn\n                key={position.positionId}\n                atStake={staked}\n                gaugeAddress={stakePool.gaugeAddress}\n                positionId={position.positionIdBN}\n                handleTxSuccess={() => {\n                  setStaked(false);\n                  mutateStakePositionIds();\n                }}\n              />\n            ) : (\n              <Button\n                variant=\"contained\"\n                color=\"secondary\"\n                size=\"lg\"\n                width=\"100%\"\n                disabled={\n                  !!error ||\n                  (!isTabRebalance && isAutoBtnDisabled) ||\n                  (isTabRebalance &&\n                    (isSyncing ||\n                      !isRebalanceChanged ||\n                      !swapInfo ||\n                      swapInfo.length === 0)) ||\n                  bigDecimal.compareTo(\n                    form.priceRange.min,\n                    form.priceRange.max\n                  ) !== -1\n                }\n                onClick={() => {\n                  onModeChange(\"preview\");\n                }}\n              >\n                {error\n                  ? error\n                  : isTabRebalance\n                  ? \"Rebalance Now\"\n                  : \"Set Up Automated Rebalance\"}\n              </Button>\n            ))}\n          {isModePreview &&\n            (isTabRebalance ? (\n              <RebalanceWrapper\n                {...{\n                  navBack,\n                  onClose,\n                }}\n              />\n            ) : (\n              <AutomatedRebalanceBtn\n                {...{\n                  payload: automatedRebalancePayload,\n                  onClose,\n                }}\n              />\n            ))}\n        </ButtonsContainer>\n      )}\n    </Container>\n  );\n};\n\nexport default RebalanceLayout;\n","import { CommonContainer, Row } from \"@/views/style\";\nimport { FlexColumn } from \"@ui/common\";\nimport { CommonLgText, Headline5 } from \"@ui/components\";\nimport styled from \"styled-components\";\nimport { Subtitle } from \"../RebalanceEdit/style\";\n\nexport const Container = styled.div`\n  box-sizing: border-box;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing[\"xl\"]};\n`;\nexport const PriceRange = styled(CommonContainer)`\n  position: relative;\n`;\nexport const PositionContainer = styled(CommonContainer)`\n  width: 100%;\n`;\nexport const Wrapper = styled(FlexColumn)`\n  gap: ${({ theme }) => theme.spacing.lg};\n  margin-bottom: 12px;\n`;\n\nexport const FixedSubtitle = styled(Subtitle)`\n  margin-bottom: 12px;\n`;\n\nexport const StyledCommonText = styled(CommonLgText)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const H5 = styled(Headline5)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const StyledRow = styled(Row)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport {\n  calculateTotalValue,\n  getProjectedLiquidityPosition,\n} from \"@/helper/positionHelper\";\nimport { getTokenPercentages } from \"@/helper/tokenHelper\";\nimport {\n  DEFAULT_APERTURE_FLAT_FEE,\n  DEFAULT_APERTURE_REBALANCE_FEE,\n  DEFAULT_APERTURE_REINVEST_FEE,\n} from \"@/utils/helper\";\nimport { formatPrice } from \"@/utils/numberFormat\";\nimport {\n  DividerHorizontal,\n  OtherInfo,\n  Text1,\n  TimeZone,\n  RowTitle as Title,\n} from \"@/views/style\";\nimport { IToken } from \"@aperture/types\";\nimport {\n  FeeInfoCard,\n  Flex,\n  FlexColumn,\n  Headline5,\n  NoteCard,\n  PriceRangeKey,\n  RebalanceActionTab,\n  SwapRoute,\n  TokenInfo,\n  TokenPriceGroup,\n  TriggerSetupPreview,\n  formatUSDAmount,\n} from \"@aperture/uikit\";\nimport {\n  AUTOMATION_EXPIRATION_IN_DAYS,\n  viem,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport bigDecimal from \"js-big-decimal\";\nimport moment from \"moment\";\nimport momentTimeZone from \"moment-timezone\";\nimport { useMemo } from \"react\";\nimport { useTheme } from \"styled-components\";\nimport { formatUnits } from \"viem\";\nimport { useRebalanceContext } from \"../Context\";\nimport { Subtitle } from \"../RebalanceEdit/style\";\nimport {\n  Container,\n  FixedSubtitle,\n  PositionContainer,\n  PriceRange,\n  StyledCommonText,\n  StyledRow,\n  Wrapper,\n} from \"./style\";\n\nconst RebalancePreview: React.FC = () => {\n  const { ammEnum, networkId } = useNetwork();\n  const theme = useTheme();\n  const {\n    tab,\n    position,\n    trigger,\n    positionDetails,\n    tokenPrice,\n    form,\n    txForm,\n    isSyncing,\n    swapInfo,\n    selectedSolver,\n    suggestedSolver,\n    gasEstimated,\n  } = useRebalanceContext();\n  const isCreatingTrigger = !trigger;\n  const tokens: [IToken, IToken] = [position.tokenA, position.tokenB];\n  const nativeCurrency = viem.getNativeCurrency(networkId);\n  const estimate = useMemo(() => {\n    if (\n      swapInfo?.[selectedSolver]?.finalAmount0 !== undefined &&\n      swapInfo?.[selectedSolver]?.finalAmount1 !== undefined &&\n      positionDetails\n    ) {\n      const finalAmount0 = formatUnits(\n        swapInfo?.[selectedSolver]?.finalAmount0,\n        positionDetails.token0.decimals\n      );\n      const finalAmount1 = formatUnits(\n        swapInfo?.[selectedSolver]?.finalAmount1,\n        positionDetails.token1.decimals\n      );\n      return {\n        token0Amount: finalAmount0,\n        token1Amount: finalAmount1,\n        ...getTokenPercentages(\n          finalAmount0,\n          finalAmount1,\n          tokenPrice[0],\n          tokenPrice[1]\n        ),\n      };\n    } else if (positionDetails) {\n      const res = getProjectedLiquidityPosition(\n        networkId,\n        position,\n        positionDetails.position,\n        form.priceRange.tickLower,\n        form.priceRange.tickUpper,\n        tokenPrice,\n        tab === \"Automated Rebalance\" ? form.trigger : undefined\n      );\n      return {\n        token0Amount: res[0].amount,\n        token1Amount: res[1].amount,\n        token0Percent: res[0].percent,\n        token1Percent: res[1].percent,\n      };\n    } else {\n      return {\n        token0Amount: tokens[0].amount,\n        token1Amount: tokens[1].amount,\n        ...getTokenPercentages(\n          position.tokenA.amount,\n          position.tokenB.amount,\n          tokenPrice[0],\n          tokenPrice[1]\n        ),\n      };\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [\n    form.trigger,\n    tab,\n    form.priceRange.tickLower,\n    form.priceRange.tickUpper,\n    swapInfo,\n    selectedSolver,\n    tokenPrice,\n  ]);\n\n  const timeZone = momentTimeZone.tz.guess();\n\n  const formatTokenPrice = (type: PriceRangeKey) => {\n    switch (type) {\n      case PriceRangeKey.MIN:\n        return bigDecimal.compareTo(form.priceRange.swapMax, 0) > 0\n          ? formatPrice(form.priceRange.min)\n          : \"∞\";\n      case PriceRangeKey.MAX:\n        return bigDecimal.compareTo(form.priceRange.swapMin, 0) > 0\n          ? formatPrice(form.priceRange.max)\n          : \"∞\";\n      case PriceRangeKey.SWAP_MIN:\n        return bigDecimal.compareTo(form.priceRange.max, 0) > 0\n          ? formatPrice(form.priceRange.swapMin)\n          : \"∞\";\n      case PriceRangeKey.SWAP_MAX:\n        return bigDecimal.compareTo(form.priceRange.min, 0) > 0\n          ? formatPrice(form.priceRange.swapMax)\n          : \"∞\";\n    }\n  };\n\n  const formatFutureSpotPrice = (type: PriceRangeKey) => {\n    if (form.futureSpotTab !== RebalanceActionTab.PERCENTAGES) return \"-\";\n    switch (type) {\n      case PriceRangeKey.MIN:\n        return `${form.percentageRange.min}%`;\n      case PriceRangeKey.MAX:\n        return `${form.percentageRange.max}%`;\n      case PriceRangeKey.SWAP_MIN:\n        return `${form.percentageRange.swapMin}%`;\n      case PriceRangeKey.SWAP_MAX:\n        return `${form.percentageRange.swapMax}%`;\n    }\n  };\n\n  const feeDesc = `$${DEFAULT_APERTURE_FLAT_FEE} + ${bigDecimal.multiply(\n    DEFAULT_APERTURE_REBALANCE_FEE,\n    100\n  )}% of the swapped amount + ${\n    DEFAULT_APERTURE_REINVEST_FEE * 100\n  }% of the reinvested amount.`;\n\n  return (\n    <Container>\n      {tab === \"Automated Rebalance\" && (\n        <TriggerSetupPreview form={form.trigger} tokens={tokens} />\n      )}\n      <PriceRange>\n        <FixedSubtitle>New Price Range</FixedSubtitle>\n        <TokenPriceGroup\n          tabPosition=\"left\"\n          buyToken={{\n            ticker: tokens[0].ticker,\n            max: form.useFutureSpot\n              ? formatFutureSpotPrice(PriceRangeKey.MAX)\n              : formatTokenPrice(PriceRangeKey.MAX),\n            min: form.useFutureSpot\n              ? formatFutureSpotPrice(PriceRangeKey.MIN)\n              : formatTokenPrice(PriceRangeKey.MIN),\n          }}\n          sellToken={{\n            ticker: tokens[1].ticker,\n            max: form.useFutureSpot\n              ? formatFutureSpotPrice(PriceRangeKey.SWAP_MAX)\n              : formatTokenPrice(PriceRangeKey.SWAP_MAX),\n            min: form.useFutureSpot\n              ? formatFutureSpotPrice(PriceRangeKey.SWAP_MIN)\n              : formatTokenPrice(PriceRangeKey.SWAP_MIN),\n          }}\n          futureSpotTab={form.useFutureSpot ? form.futureSpotTab : undefined}\n          style={{ gap: 16 }}\n        />\n      </PriceRange>\n      {(tab === \"Rebalance\" || !form.useFutureSpot) && (\n        <PositionContainer>\n          <Wrapper>\n            <Subtitle>Projected Liquidity Position</Subtitle>\n            <div>\n              <TokenInfo\n                key={tokens[0].address}\n                Icon={tokens[0].Icon}\n                ticker={tokens[0].ticker}\n                address={tokens[0].address}\n                native={tokens[0].native}\n                decimals={tokens[0].decimals}\n                amount={estimate.token0Amount}\n                price={tokenPrice[0]}\n                maxWidth={999}\n                tag={`${estimate.token0Percent}%`}\n              />\n              <TokenInfo\n                key={tokens[1].address}\n                Icon={tokens[1].Icon}\n                ticker={tokens[1].ticker}\n                address={tokens[1].address}\n                native={tokens[1].native}\n                decimals={tokens[1].decimals}\n                amount={estimate.token1Amount}\n                price={tokenPrice[1]}\n                maxWidth={999}\n                tag={`${estimate.token1Percent}%`}\n              />\n            </div>\n          </Wrapper>\n          <NoteCard text=\"Any uncollected fees will be collected and reinvested into the new position after rebalance.\" />\n        </PositionContainer>\n      )}\n      <DividerHorizontal />\n      {tab === \"Rebalance\" &&\n        (isSyncing || swapInfo?.[selectedSolver]?.swapRoutes?.length > 0) && (\n          <OtherInfo>\n            <Text1>Order Routing</Text1>\n            <SwapRoute\n              maxWidth={571}\n              loading={isSyncing || !swapInfo}\n              priceImpact={swapInfo?.[selectedSolver]?.priceImpact}\n              api={swapInfo?.[selectedSolver]?.api}\n              fromToken={swapInfo?.[selectedSolver]?.fromToken}\n              routes={swapInfo?.[selectedSolver]?.swapRoutes ?? []}\n              wBorder={true}\n              suggested={selectedSolver === suggestedSolver}\n            />\n          </OtherInfo>\n        )}\n      <OtherInfo gap={theme.spacing.md}>\n        {tab === \"Automated Rebalance\" && (\n          <>\n            <StyledRow>\n              <Title>Gas Ceiling</Title>\n              <Headline5>\n                {bigDecimal.multiply(form.gasCeiling, 100)}% of the position\n              </Headline5>\n            </StyledRow>\n            <FlexColumn gap={\"md\"}>\n              <StyledRow>\n                <Title>Trigger Expiration</Title>\n                <Headline5>\n                  {moment()\n                    .add(AUTOMATION_EXPIRATION_IN_DAYS, \"days\")\n                    .format(\"MMM Do, YYYY\")}{\" \"}\n                  {`(${AUTOMATION_EXPIRATION_IN_DAYS} Days)`}\n                </Headline5>\n              </StyledRow>\n              <TimeZone>\n                {`${timeZone} (GMT${momentTimeZone.tz(timeZone).format(\"Z\")})`}\n              </TimeZone>\n            </FlexColumn>\n          </>\n        )}\n        {(tab === \"Rebalance\" || isCreatingTrigger) && (\n          <>\n            {tab === \"Rebalance\" && (\n              <>\n                <Flex justifyContent=\"space-between\">\n                  <Title>Est. Total Gas Fee</Title>\n                  <StyledCommonText>\n                    {`${\n                      (gasEstimated &&\n                        formatUnits(gasEstimated, nativeCurrency.decimals)) ??\n                      \"-\"\n                    } ${nativeCurrency.symbol}`}\n                  </StyledCommonText>\n                </Flex>\n                <Flex justifyContent=\"space-between\">\n                  <Title>Slippage Setting</Title>\n                  <StyledCommonText>\n                    {Math.floor(txForm.slippage * 10000) / 100}%\n                  </StyledCommonText>\n                </Flex>\n              </>\n            )}\n            <FeeInfoCard\n              styles={{ size: \"lg\" }}\n              amm={ammEnum}\n              feeInfo={{\n                fee: DEFAULT_APERTURE_REBALANCE_FEE,\n                amount: calculateTotalValue(\n                  tokens[0].amount,\n                  tokens[1].amount,\n                  tokenPrice[0],\n                  tokenPrice[1]\n                ),\n                feeUSD:\n                  tab === \"Rebalance\"\n                    ? `${formatUSDAmount(\n                        swapInfo?.[selectedSolver]?.feeUSD ?? \"-\"\n                      )}`\n                    : feeDesc,\n                active: true,\n              }}\n              hint={tab === \"Rebalance\" ? `Aperture charges ${feeDesc}` : \"\"}\n            />\n          </>\n        )}\n      </OtherInfo>\n    </Container>\n  );\n};\n\nexport default RebalancePreview;\n","import { IPositionDetails } from \"@/config/position/positionConfig\";\nimport { TriggerItem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useCallback, useState } from \"react\";\nimport { GotoType } from \"../types\";\nimport { RebalanceProvider } from \"./Context\";\nimport RebalanceEdit from \"./RebalanceEdit\";\nimport RebalanceLayout from \"./RebalanceLayout\";\nimport RebalancePreview from \"./RebalancePreview\";\n\nexport type IMode = \"edit\" | \"preview\";\n\nexport const Rebalance: React.FC<{\n  details: IPositionDetails;\n  goto: GotoType;\n  tabs: 0 | 1;\n  navBack: () => void;\n  trigger: TriggerItem | undefined;\n}> = ({ details, goto, tabs, trigger, navBack }) => {\n  const [mode, setMode] = useState<IMode>(\"edit\");\n  const goToDetails = useCallback(() => goto.details(), [goto]);\n\n  return (\n    <RebalanceProvider {...{ tabs, position: details, trigger }}>\n      <RebalanceLayout\n        mode={mode}\n        onClose={goToDetails}\n        navBack={navBack}\n        onModeChange={(mode: IMode) => setMode(mode)}\n      >\n        {mode === \"edit\" && <RebalanceEdit />}\n        {mode === \"preview\" && <RebalancePreview />}\n      </RebalanceLayout>\n    </RebalanceProvider>\n  );\n};\n","import {\n  useGlobalSlippage,\n  useSolverRoutingStore,\n} from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { IPositionDetails, SwapCall } from \"@/config/position/positionConfig\";\nimport {\n  calculateTotalValue,\n  getAddPositionRequest,\n  getIncreaseLiquidityOptimalTx,\n} from \"@/helper/positionHelper\";\nimport { isWrappedNative } from \"@/helper/tokenHelper\";\nimport { estimateGas } from \"@/helper/transactionHelper\";\nimport { useCurrentChainToken } from \"@/hooks/globalState/useCurrentChainToken\";\nimport { useOnNetworkAccountChange } from \"@/hooks/globalState/useOnNetworkAccountChange\";\nimport { useSwapInfo } from \"@/hooks/swapInfo/useSwapInfo\";\nimport { usePositionAutoCompound } from \"@/hooks/trigger/usePositionTrigger\";\nimport { useEventCallback } from \"@/hooks/useEventCallback\";\nimport { TokenPriceMap } from \"@/hooks/useFetchAllChainsTokensPrice\";\nimport { useFetchTokenMap } from \"@/hooks/useFetchTokenMap\";\nimport {\n  TokenBalanceMap,\n  useFetchUserTokensBalance,\n} from \"@/hooks/useFetchUserTokensBalance\";\nimport { DEFAULT_SLIPPAGE, calculateGasMargin } from \"@/utils/helper\";\nimport { ITokenPair } from \"@aperture/types\";\nimport { ITransactionSettingsForm, SwapPathProps } from \"@aperture/uikit\";\nimport { getLogger, viem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { Pool } from \"@aperture_finance/uniswap-v3-sdk\";\nimport { useDebounce } from \"ahooks\";\nimport bigDecimal from \"js-big-decimal\";\nimport React, {\n  useCallback,\n  useEffect,\n  useMemo,\n  useState,\n  useTransition,\n} from \"react\";\nimport {\n  EstimateGasExecutionError,\n  TransactionRequest,\n  formatUnits,\n} from \"viem\";\nimport { useAccount } from \"wagmi\";\nimport { IAddLiquidityEditForm } from \"./AddLiquidityEdit/types\";\n\nexport interface IAddLiquidityContextV2 {\n  position: IPositionDetails;\n  pool: Pool;\n  liquidityInUS: string;\n  collectableInUS: string;\n  tokenPairPrice: [string, string];\n  form: IAddLiquidityEditForm;\n  txnSetting: ITransactionSettingsForm;\n  isTokenNonZero: boolean;\n  showSwapPath: boolean;\n  error: string | null;\n  autoCompoundExists: boolean;\n  tokens: ITokenPair;\n  isSyncing: boolean;\n  setIsSyncing: (isSyncing: boolean) => void;\n  isSyncingTx: boolean;\n  swapInfo: SwapPathProps[] | undefined;\n  swapInfoError?: Error;\n  runSwapInfo: (swapCall: SwapCall) => void;\n  cancelSwapInfo: () => void;\n  suggestedSolver: number;\n  selectedSolver: number;\n  txErrorMsg: string | undefined;\n  txRequest: any;\n  minAmounts: {\n    amount0Min: string;\n    amount1Min: string;\n  };\n  gasEstimated: bigint | undefined;\n  openSettings: boolean;\n  setOpenSettings: React.Dispatch<React.SetStateAction<boolean>>;\n  setForm: React.Dispatch<React.SetStateAction<IAddLiquidityEditForm>>;\n  setTxnSetting: React.Dispatch<React.SetStateAction<ITransactionSettingsForm>>;\n  setError: React.Dispatch<React.SetStateAction<string>>;\n  setSelectedSolver: (idx: number) => void;\n}\n\nconst AddLiquidityContextV2 = React.createContext<IAddLiquidityContextV2>(\n  null as any\n);\n\ninterface AddLiquidityProviderV2Props {\n  position: IPositionDetails;\n}\n\nexport const AddLiquidityProviderV2: React.FC<\n  React.PropsWithChildren<AddLiquidityProviderV2Props>\n> = ({ children, position, ...props }) => {\n  const { ammEnum, networkId, publicClient } = useNetwork();\n  const { address } = useAccount();\n  const [, startTransition] = useTransition();\n  const { currentTokenPrice: tokenPriceList } = useCurrentChainToken(networkId);\n  const { data: balanceData } = useFetchUserTokensBalance();\n  const { globalSlippage } = useGlobalSlippage();\n  const { data: tokenMap } = useFetchTokenMap();\n\n  const autoCompound = usePositionAutoCompound(\n    position.positionId,\n    position.chainId\n  );\n  const [pool, setPool] = useState<Pool | null>(null);\n  const [error, setError] = useState<string | null>(null);\n  const [openSettings, setOpenSettings] = useState(false);\n\n  const tokenAPrice = tokenPriceList?.[position.tokenA.address]?.price ?? \"0\";\n  const tokenBPrice = tokenPriceList?.[position.tokenB.address]?.price ?? \"0\";\n\n  const tokenPairPrice = useMemo<[string, string]>(\n    () => [tokenAPrice, tokenBPrice],\n    [tokenAPrice, tokenBPrice]\n  );\n\n  const nativeStatus = {\n    tokenA: isWrappedNative(position.tokenA.address, position.chainId),\n    tokenB: isWrappedNative(position.tokenB.address, position.chainId),\n  };\n\n  const tokensInfo = useMemo(\n    () => ({\n      poolTokens: [\n        tokenMap?.[`${position.tokenA.address}-false`],\n        tokenMap?.[`${position.tokenB.address}-false`],\n      ],\n      poolTokensToNative: [\n        tokenMap?.[`${position.tokenA.address}-${nativeStatus.tokenA}`],\n        tokenMap?.[`${position.tokenB.address}-${nativeStatus.tokenB}`],\n      ],\n    }),\n    [tokenMap]\n  );\n\n  const [form, setForm] = useState<IAddLiquidityEditForm>({\n    tokenA: \"\",\n    tokenB: \"\",\n    useNative: nativeStatus.tokenA || nativeStatus.tokenB,\n  });\n\n  const debounceForm = useDebounce(form, { wait: 500 });\n  const tokens: ITokenPair = useMemo(() => {\n    if (tokenMap)\n      return (\n        form.useNative ? tokensInfo.poolTokensToNative : tokensInfo.poolTokens\n      ) as ITokenPair;\n\n    return getTokens(position, tokenPriceList, balanceData);\n  }, [form.useNative, tokensInfo]);\n\n  const isTokenNonZero = useMemo(() => {\n    const isTokenANonZero = bigDecimal.compareTo(debounceForm.tokenA, \"0\") > 0;\n    const isTokenBNonZero = bigDecimal.compareTo(debounceForm.tokenB, \"0\") > 0;\n    return isTokenANonZero || isTokenBNonZero;\n  }, [debounceForm]);\n  const showSwapPath = error === null && isTokenNonZero;\n\n  const liquidityInUS = calculateTotalValue(\n    position.tokenA.amount,\n    position.tokenB.amount,\n    tokenPairPrice[0],\n    tokenPairPrice[1]\n  );\n  const collectableInUS = calculateTotalValue(\n    position.tokenA.collectableAmount,\n    position.tokenB.collectableAmount,\n    tokenPairPrice[0],\n    tokenPairPrice[1]\n  );\n  const [txnSetting, setTxnSetting] = useState<ITransactionSettingsForm>({\n    slippage: globalSlippage ?? DEFAULT_SLIPPAGE,\n    deadline: \"30\",\n  });\n  const [txErrorMsg, setTxErrorMsg] = useState(undefined);\n\n  const [txRequest, setTxRequest] = useState<any>(undefined);\n  const [minAmounts, setMinAmounts] = useState({\n    amount0Min: \"0\",\n    amount1Min: \"0\",\n  });\n  const [gasEstimated, setGasEstimated] = useState<bigint>(undefined);\n\n  const poolKey =\n    ammEnum === \"SLIPSTREAM\" ? position.tickSpacing : position.feeTier;\n\n  useEffect(() => {\n    if (position.tokenA.address && position.tokenB.address && poolKey) {\n      viem\n        .getPool(\n          position.tokenA.address,\n          position.tokenB.address,\n          poolKey,\n          position.chainId,\n          ammEnum,\n          publicClient\n        )\n        .then((pool) => {\n          setPool(pool);\n        })\n        .catch((error) => {\n          getLogger().error(\"AddLPV2.getPoolFailed: \", {\n            ammEnum,\n            networkId: position.chainId,\n            tokenA: position.tokenA.address,\n            tokenB: position.tokenB.address,\n            poolKey,\n            error: JSON.stringify(error),\n          });\n          setError(\"Token pair not supported\");\n          setPool(null);\n        });\n    } else {\n      setError(\"Token pair not supported\");\n      setPool(null);\n    }\n  }, []);\n\n  useOnNetworkAccountChange(() => {\n    cancelSwapInfo();\n  });\n\n  const {\n    swapInfo,\n    selectedSolver,\n    suggestedSolver,\n    setSelectedSolver,\n    noNeedSwap,\n  } = useSolverRoutingStore();\n  const {\n    isSyncing,\n    setIsSyncing,\n    isSyncingTx,\n    setIsSyncingTx,\n    runSwapInfo,\n    cancelSwapInfo,\n    swapInfoError,\n  } = useSwapInfo();\n\n  useEffect(() => {\n    setIsSyncing(true);\n    const option_amounts = [\n      form.tokenA !== \"\" ? form.tokenA : \"0\",\n      form.tokenB !== \"\" ? form.tokenB : \"0\",\n    ];\n    if (\n      bigDecimal.compareTo(option_amounts[0], 0) === 0 &&\n      bigDecimal.compareTo(option_amounts[1], 0) === 0\n    ) {\n      cancelSwapInfo();\n    } else {\n      const fetchKey =\n        `${ammEnum}-${networkId}-${address}` +\n        `:${position.positionId}` +\n        `:${txnSetting.slippage}_${txnSetting.deadline}` +\n        `:[${option_amounts[0]},${option_amounts[1]}]`;\n      runSwapInfo({\n        type: \"IncreaseLiquidity\",\n        positionId: position.positionId,\n        slippage: txnSetting.slippage,\n        tokenMap,\n        fetchKey,\n        options: {\n          pool,\n          deadline: Number(txnSetting.deadline),\n          amounts: option_amounts as [string, string],\n        },\n      });\n    }\n  }, [\n    form.tokenA,\n    form.tokenB,\n    ammEnum,\n    networkId,\n    address,\n    pool,\n    position,\n    txnSetting,\n    tokenMap,\n    setIsSyncing,\n    runSwapInfo,\n    cancelSwapInfo,\n  ]);\n\n  const getEstimates = useEventCallback((tx: TransactionRequest) => {\n    estimateGas(tx, networkId, publicClient)\n      .then(({ l2GasAmount, totalGasCost, gasCost }) => {\n        setGasEstimated(totalGasCost ?? gasCost);\n        setTxRequest({ ...tx, gas: calculateGasMargin(l2GasAmount) });\n        setTxErrorMsg(undefined);\n      })\n      .catch((gasError) => {\n        const error = gasError as EstimateGasExecutionError;\n        getLogger().error(\n          \"AddLPV2.getIncreaseLiquidityV3TxEstimateGasFailed: \",\n          {\n            ammEnum,\n            networkId,\n            address,\n            positionId: position.positionId,\n            pool,\n            amounts: [form.tokenA, form.tokenB],\n            slippage: txnSetting.slippage,\n            deadline: txnSetting.deadline,\n            error: error.message,\n          }\n        );\n        cancelSwapInfo();\n        setGasEstimated(undefined);\n        setTxErrorMsg(error.details);\n      })\n      .finally(() => setIsSyncingTx(false));\n  });\n\n  const resetTxStatus = () => {\n    setIsSyncingTx(false);\n    startTransition(() => {\n      setMinAmounts({\n        amount0Min: \"0\",\n        amount1Min: \"0\",\n      });\n      setGasEstimated(undefined);\n    });\n  };\n\n  const getTx = useCallback(\n    async (formattedSwapInfo?: SwapPathProps) => {\n      const deadline = Number(txnSetting.deadline || 30);\n      if (noNeedSwap) {\n        if (error === null) {\n          getAddPositionRequest(\n            ammEnum,\n            networkId,\n            position,\n            pool,\n            txnSetting.slippage,\n            deadline,\n            [form.tokenA, form.tokenB],\n            address,\n            publicClient,\n            form.useNative\n          )\n            .then((tx) => {\n              getEstimates(tx);\n              setTxErrorMsg(undefined);\n            })\n            .catch((txErr) => {\n              getLogger().error(\"AddLPV2.getAddPositionRequestFailed: \", {\n                ammEnum,\n                networkId,\n                position,\n                pool,\n                slippage: txnSetting.slippage,\n                amounts: [form.tokenA, form.tokenB],\n                address,\n                useNative: form.useNative,\n                error: JSON.stringify(txErr),\n              });\n              setTxErrorMsg(\"Failed to generate transaction\");\n              cancelSwapInfo();\n            })\n            .finally(() => setIsSyncing(false));\n        }\n      } else {\n        if (!formattedSwapInfo || !showSwapPath) {\n          resetTxStatus();\n        } else {\n          if (formattedSwapInfo) {\n            getIncreaseLiquidityOptimalTx(\n              ammEnum,\n              networkId,\n              address,\n              position.positionId,\n              pool,\n              txnSetting.slippage,\n              deadline,\n              [form.tokenA, form.tokenB],\n              formattedSwapInfo?.swapDataHex,\n              formattedSwapInfo?.liquidity,\n              publicClient,\n              formattedSwapInfo?.token0FeeAmount,\n              formattedSwapInfo?.token1FeeAmount,\n              form.useNative\n            )\n              .then(({ tx, amounts }) => {\n                setMinAmounts({\n                  amount0Min: formatUnits(\n                    BigInt(amounts.amount0Min),\n                    position.tokenA.decimals\n                  ),\n                  amount1Min: formatUnits(\n                    BigInt(amounts.amount1Min),\n                    position.tokenB.decimals\n                  ),\n                });\n                getEstimates(tx);\n              })\n              .catch((txErr) => {\n                getLogger().error(\n                  \"AddLPV2.getIncreaseLiquidityOptimalV3TxFailed: \",\n                  {\n                    ammEnum,\n                    networkId,\n                    address,\n                    positionId: position.positionId,\n                    pool,\n                    slippage: txnSetting.slippage,\n                    amounts: [form.tokenA, form.tokenB],\n                    swapDataHex: formattedSwapInfo?.swapDataHex,\n                    liquidity: formattedSwapInfo?.liquidity,\n                    useNative: form.useNative,\n                    error: JSON.stringify(txErr),\n                  }\n                );\n                setTxErrorMsg(\"Failed to generate transaction\");\n                cancelSwapInfo();\n              });\n          }\n        }\n      }\n    },\n    [form, txnSetting, error, showSwapPath]\n  );\n\n  useEffect(() => {\n    if (swapInfo?.length) {\n      if (selectedSolver !== -1) getTx(swapInfo[selectedSolver]);\n    } else {\n      resetTxStatus();\n    }\n  }, [swapInfo, selectedSolver]);\n\n  return (\n    <AddLiquidityContextV2.Provider\n      value={{\n        tokenPairPrice,\n        form,\n        isTokenNonZero,\n        showSwapPath,\n        position,\n        pool,\n        liquidityInUS,\n        collectableInUS,\n        txnSetting,\n        error,\n        autoCompoundExists: !!autoCompound,\n        isSyncing,\n        setIsSyncing,\n        isSyncingTx,\n        swapInfo,\n        swapInfoError,\n        runSwapInfo,\n        cancelSwapInfo,\n        suggestedSolver,\n        selectedSolver,\n        setSelectedSolver,\n        tokens,\n        txErrorMsg,\n        txRequest,\n        minAmounts,\n        gasEstimated,\n        setForm,\n        setTxnSetting,\n        setError,\n        openSettings,\n        setOpenSettings,\n        ...props,\n      }}\n    >\n      {children}\n    </AddLiquidityContextV2.Provider>\n  );\n};\n\nexport const useAddLiquidityContextV2 = () => {\n  return React.useContext(AddLiquidityContextV2);\n};\n\nfunction getTokens(\n  position: IPositionDetails,\n  tokenPriceList: TokenPriceMap,\n  tokenBalanceList: TokenBalanceMap\n): ITokenPair {\n  return [\n    {\n      ...position.tokenA,\n      price: tokenPriceList?.[position.tokenA.address]?.price || \"0\",\n      amount: tokenBalanceList?.[position.tokenA.address]?.balance || \"0\",\n    },\n    {\n      ...position.tokenB,\n      price: tokenPriceList?.[position.tokenB.address]?.price || \"0\",\n      amount: tokenBalanceList?.[position.tokenB.address]?.balance || \"0\",\n    },\n  ];\n}\n","import { StatusTab, WhiteCard } from \"@aperture/uikit\";\nimport { viem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useState } from \"react\";\nimport styled from \"styled-components\";\nimport { useNetwork } from \"../NetworkContext/NetworkContext\";\n\nconst StyledWC = styled(WhiteCard)`\n  padding: 0;\n  display: flex;\n  align-items: center;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\nconst UseNative: React.FC<{\n  text: string;\n  nativeChange: (useNative: boolean) => void;\n}> = ({ text, nativeChange, ...props }) => {\n  const [useNative, setUseNative] = useState(true);\n  const { networkId } = useNetwork();\n  const native = viem.getNativeCurrency(networkId);\n\n  return (\n    <StyledWC {...props}>\n      <StatusTab\n        noText={true}\n        onChange={(onStatus: boolean) => {\n          setUseNative(onStatus);\n          nativeChange(onStatus);\n        }}\n        onStatus={useNative}\n      />\n      {text} any {native.wrapped.symbol} as {native.symbol}\n    </StyledWC>\n  );\n};\n\nexport default UseNative;\n","import { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport { useSolverRoutingStore } from \"@/components/GlobalStore\";\nimport { OrderRoutingModal } from \"@/components/layout/hooks\";\nimport { getSwapFailureMessage } from \"@/helper/positionHelper\";\nimport { DEFAULT_APERTURE_ZAPIN_FEE } from \"@/utils/helper\";\nimport { ApertureLogos } from \"@aperture/assetkit\";\nimport { SwapPath } from \"@aperture/uikit\";\nimport { E_ModalKey, FlexColumn, T2, useModal } from \"@aperture/uikitv2\";\nimport styled, { useTheme } from \"styled-components\";\nimport { useAddLiquidityContextV2 } from \"../AddLiquidityContextV2\";\n\nconst NoSwapInfoWrapper = styled(FlexColumn)`\n  margin: 32px 0;\n  align-items: center;\n  gap: ${({ theme }) => theme.spacing[\"3xl\"]};\n`;\nconst NoSwapInfoText = styled(T2)`\n  color: ${({ theme }) => theme.colors.global.text.T3};\n`;\n\nexport const ZapInSwapPath = (props: {\n  hide?: boolean;\n  keepDropdown?: boolean;\n}) => {\n  const { hide, keepDropdown } = props;\n  const theme = useTheme();\n  const { staked } = useUnstakePositionContext();\n  const { form, isSyncing, isSyncingTx, swapInfoError } =\n    useAddLiquidityContextV2();\n  const { swapInfo, selectedSolver, suggestedSolver, noNeedSwap } =\n    useSolverRoutingStore();\n  const { setModalState } = useModal();\n\n  const selectedSwapInfo = swapInfo?.[selectedSolver];\n  if (\n    (!isSyncing && !isSyncingTx && !selectedSwapInfo && !swapInfoError) ||\n    hide\n  ) {\n    return null;\n  } else if (!isSyncing && !isSyncingTx && noNeedSwap) {\n    return (\n      <NoSwapInfoWrapper>\n        <ApertureLogos.OutlineLogo fill={theme.colors.global.text.T1} />\n        <NoSwapInfoText>No need to swap</NoSwapInfoText>\n      </NoSwapInfoWrapper>\n    );\n  }\n\n  return (\n    <>\n      <SwapPath\n        maxSwapRouteWidth={562}\n        style={{ marginTop: 8 }}\n        loading={isSyncing || isSyncingTx}\n        priceImpact={selectedSwapInfo?.priceImpact}\n        api={selectedSwapInfo?.api}\n        fromToken={selectedSwapInfo?.fromToken}\n        swapData={selectedSwapInfo?.swapData}\n        swapRoutes={selectedSwapInfo?.swapRoutes}\n        showSwapRoutes={selectedSwapInfo?.swapRoutes?.length > 0}\n        errorMsg={getSwapFailureMessage(\n          swapInfo,\n          swapInfoError,\n          form.netDepositUSDValue ?? \"0\",\n          staked\n        )}\n        onBtnClick={() => setModalState(E_ModalKey.ORDER_ROUTING_MODAL, true)}\n        suggested={selectedSolver === suggestedSolver}\n        gasFeeUSD={selectedSwapInfo?.gasFeeUSD}\n        keepDropdown={keepDropdown}\n        feeUSD={selectedSwapInfo?.feeUSD}\n        feePercentage={DEFAULT_APERTURE_ZAPIN_FEE * 100}\n        atStake={staked}\n      />\n      <OrderRoutingModal />\n    </>\n  );\n};\n","import { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport { useSolverRoutingStore } from \"@/components/GlobalStore\";\nimport {\n  ErrorMsg,\n  getOtherTokenAmount,\n  getSwapFailureMessage,\n} from \"@/helper/positionHelper\";\nimport { AlignTokenAmounts } from \"@/views/NewPosition/Pool/SwapDetail\";\nimport { ChevronDown } from \"@aperture/uikit\";\nimport { Flex, RaindropSpinner, T3Regular } from \"@aperture/uikitv2\";\nimport bigDecimal from \"js-big-decimal\";\nimport { Dispatch, SetStateAction, useEffect, useMemo, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { useAddLiquidityContextV2 } from \"../AddLiquidityContextV2\";\nimport { ZapInSwapPath } from \"./ZapInSwapPath\";\nimport { IAddLiquidityEditForm } from \"./types\";\n\nconst Title = styled(Flex)<{ disabled: boolean }>`\n  cursor: ${({ disabled }) => (disabled ? \"auto\" : \"pointer\")};\n`;\nconst Headline = styled(T3Regular)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\nconst Wrapper = styled.div`\n  margin-top: 4px;\n`;\nconst ErrorMessage = styled(T3Regular)`\n  padding: 2px 12px;\n  border-radius: ${({ theme }) => theme.radii.md};\n  color: ${({ theme }) => theme.colors.global.warning};\n  background: ${({ theme }) =>\n    theme.isDark ? \"rgba(237,156,0,0.1)\" : \"rgba(202,109,0,0.2)\"};\n`;\n\ninterface IProps {\n  setTokenAAmount: Dispatch<SetStateAction<string>>;\n  setTokenBAmount: Dispatch<SetStateAction<string>>;\n}\n\nexport const SwapDetail = ({ setTokenAAmount, setTokenBAmount }: IProps) => {\n  const [hide, setHide] = useState(true);\n\n  const { staked } = useUnstakePositionContext();\n  const {\n    position,\n    pool,\n    tokenPairPrice: tokenPrices,\n    form,\n    setForm,\n    isSyncing,\n    isSyncingTx,\n    swapInfoError,\n    txErrorMsg,\n    setOpenSettings,\n  } = useAddLiquidityContextV2();\n  const { swapInfo } = useSolverRoutingStore();\n\n  const failureMessage = useMemo(() => {\n    if (isSyncing || isSyncingTx) return undefined;\n    return getSwapFailureMessage(\n      swapInfo,\n      swapInfoError ?? txErrorMsg,\n      form.netDepositUSDValue ?? \"0\",\n      staked\n    );\n  }, [\n    form.netDepositUSDValue,\n    isSyncing,\n    isSyncingTx,\n    staked,\n    swapInfo,\n    swapInfoError,\n    txErrorMsg,\n  ]);\n\n  const showAlignTokens = failureMessage === ErrorMsg.InsufficientPoolToken;\n\n  useEffect(() => {\n    if (failureMessage === ErrorMsg.InsufficientSlippage) setOpenSettings(true);\n  }, [failureMessage, setOpenSettings]);\n\n  const updateForm = (form: IAddLiquidityEditForm) => {\n    setForm(form);\n  };\n\n  const fetchTokenPairsAmount = (\n    amount: string | undefined,\n    ifTokenA: boolean\n  ) => {\n    let _tokenAAmount: string = \"\";\n    let _tokenBAmount: string = \"\";\n    if (amount !== \"\" && Number(amount) >= 0)\n      if (ifTokenA) {\n        _tokenAAmount = amount;\n        if (pool?.tickCurrent > position.tickLower)\n          _tokenBAmount = getOtherTokenAmount(\n            position.tokenA.address,\n            amount,\n            position.tickLower,\n            position.tickUpper,\n            pool\n          ).toExact();\n      } else {\n        _tokenBAmount = amount;\n        if (pool?.tickCurrent < position.tickUpper) {\n          _tokenAAmount = getOtherTokenAmount(\n            position.tokenB.address,\n            amount,\n            position.tickLower,\n            position.tickUpper,\n            pool\n          ).toExact();\n        }\n      }\n    setTokenAAmount(_tokenAAmount);\n    setTokenBAmount(_tokenBAmount);\n    const netDepositUSDValue = bigDecimal.add(\n      bigDecimal.multiply(_tokenAAmount, tokenPrices[0]),\n      bigDecimal.multiply(_tokenBAmount, tokenPrices[1])\n    );\n    updateForm({\n      ...form,\n      tokenA: _tokenAAmount,\n      tokenB: _tokenBAmount,\n      netDepositUSDValue,\n    });\n  };\n\n  return (\n    <Wrapper>\n      <Title\n        width=\"100%\"\n        justifyContent=\"space-between\"\n        disabled={!!failureMessage}\n        onClick={() => !failureMessage && setHide(!hide)}\n      >\n        <Headline>Swap Details</Headline>\n        <Flex alignItems=\"center\" gap={8}>\n          {hide && (isSyncing || isSyncingTx) && (\n            <RaindropSpinner width={16} height={16} />\n          )}\n          {failureMessage && <ErrorMessage>{failureMessage}</ErrorMessage>}\n          {!failureMessage && <ChevronDown isShow={!hide} />}\n        </Flex>\n      </Title>\n      {!failureMessage && <ZapInSwapPath hide={hide} keepDropdown={true} />}\n      {showAlignTokens && (\n        <AlignTokenAmounts\n          tokenA={position.tokenA.ticker}\n          tokenB={position.tokenB.ticker}\n          disableA={bigDecimal.compareTo(form.tokenB, 0) <= 0}\n          disableB={bigDecimal.compareTo(form.tokenA, 0) <= 0}\n          onAlignTokenA={() => fetchTokenPairsAmount(form.tokenB, false)}\n          onAlignTokenB={() => fetchTokenPairsAmount(form.tokenA, true)}\n          isAddLP={true}\n        />\n      )}\n    </Wrapper>\n  );\n};\n","import { Slider } from \"@/../../packages/uikit/src/components/Slider\";\nimport { CommonContainer, Row } from \"@/views/style\";\nimport {\n  ButtonText,\n  CommonLgText,\n  Headline3,\n  Headline5,\n  InputGroupRight,\n  TokenInfo,\n  WhiteCard,\n} from \"@aperture/uikit\";\nimport styled from \"styled-components\";\n\nexport const Container = styled.div`\n  box-sizing: border-box;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing[\"xl\"]};\n`;\n\nexport const StyledRow = styled(Row)`\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const TokenInfoContainer = styled(CommonContainer)<{\n  noBorder?: boolean;\n  gap?: string;\n  padding?: string;\n  minWidth?: string;\n}>`\n  height: fit-content;\n  display: flex;\n  flex-direction: column;\n  white-space: nowrap;\n  color: ${({ theme }) => theme.colors.global.text.T2};\n  gap: ${({ gap }) => gap || \"0px\"};\n  border: ${({ noBorder, theme }) =>\n    noBorder ? \"none\" : `1px solid ${theme.colors.global.line.Line2}`};\n  padding: ${({ theme, padding }) => padding || theme.spacing.xl};\n  ${({ minWidth }) => minWidth && `min-width: ${minWidth};`}\n  border-radius: ${({ theme }) => theme.radii.md};\n`;\n\nexport const InputGroupMaxContainer = styled(CommonContainer)`\n  display: flex;\n  justify-content: space-between;\n  gap: ${({ theme }) => theme.spacing.lg};\n`;\n\nexport const PaddingBox = styled.div`\n  padding: 16px;\n  height: 116px;\n  min-width: 260px;\n  border: 1px solid ${({ theme }) => theme.colors.global.line.Line2};\n  border-radius: ${({ theme }) => theme.radii.xl};\n`;\n\nexport const Amount = styled(Headline3)`\n  font-size: 24px;\n  line-height: 28px;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const Subtitle = styled(Headline5)`\n  color: ${({ theme }) => theme.colors.global.text.T2};\n  display: flex;\n  align-items: center;\n  span:first-child {\n    margin-right: 4px;\n    white-space: nowrap;\n    font-weight: 400;\n    line-height: 20px;\n  }\n  > div {\n    margin-left: auto;\n  }\n`;\n\nexport const StyledText = styled(CommonLgText)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const H3 = styled(Headline3)`\n  overflow: hidden;\n  text-overflow: ellipsis;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const GasCeiling = styled(CommonContainer)<{ tab: string }>`\n  width: ${({ tab }) => (tab === \"Rebalance\" ? \"100%\" : \"463px\")};\n`;\n\nexport const StyledSlider = styled(Slider)`\n  margin-bottom: 35px;\n`;\n\nexport const StyledInputGroupRight = styled(InputGroupRight)`\n  width: 220px;\n`;\n\nexport const RightNodeWrapper = styled.div`\n  display: flex;\n  height: 38px;\n  justify-content: center;\n  align-items: center;\n  padding: 0 16px;\n  background: ${({ theme }) => theme.colors.primary.purple};\n  border-radius: ${({ theme }) => theme.radii.round};\n  cursor: pointer;\n`;\n\nexport const RightNodeText = styled(ButtonText)`\n  width: 24px;\n  height: 24px;\n  line-height: 24px;\n  align-items: center;\n  text-align: center;\n  color: ${({ theme }) => theme.colors.grey.white};\n`;\n\nexport const StyledTokenInfo = styled(TokenInfo)`\n  width: calc(100% - 24px);\n  padding: 8px 12px 0;\n`;\n\nexport const ButtonGroup = styled.div`\n  display: flex;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const PreviewAddLiquidity = styled.div<{ zapIn: boolean }>`\n  display: flex;\n  flex-direction: column;\n  padding: ${({ theme }) => theme.spacing.xl};\n\n  & > div:first-child {\n    padding-bottom: ${({ zapIn }) => (zapIn ? \"12px\" : \"0\")};\n    border-bottom: 1px solid ${({ theme }) => theme.colors.global.line.Line2};\n  }\n\n  & > div:last-child {\n    padding-top: ${({ zapIn }) => (zapIn ? \"12px\" : \"0\")};\n    border-bottom: none !important;\n  }\n`;\n\nexport const CurrentLiquidity = styled.div`\n  display: flex;\n  justify-content: space-between;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const StyledCommonContainer = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const StyledWhiteCard = styled(WhiteCard)`\n  padding: 0;\n  border: 1px solid ${({ theme }) => theme.colors.global.line.Line2};\n  border-radius: ${({ theme }) => theme.radii.xl};\n`;\n","import { ApproveTokenBtn } from \"@/components/Button/ApprovalBtn\";\nimport { useSolverRoutingStore } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport UseNative from \"@/components/UseNative/UseNative\";\nimport { calculateTotalValue } from \"@/helper/positionHelper\";\nimport { isWrappedNative } from \"@/helper/tokenHelper\";\nimport { formatUSDAmount } from \"@/utils/numberFormat\";\nimport { DividerHorizontal } from \"@/views/style\";\nimport {\n  AutoCompoundTag,\n  FlexColumn,\n  InputGroupMax,\n  TokenInfo,\n} from \"@aperture/uikit\";\nimport { getChainInfo } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport bigDecimal from \"js-big-decimal\";\nimport React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport { useTheme } from \"styled-components\";\nimport { useAddLiquidityContextV2 } from \"../AddLiquidityContextV2\";\nimport { SwapDetail } from \"./SwapDetail\";\nimport {\n  Amount,\n  ButtonGroup,\n  Container,\n  H3,\n  InputGroupMaxContainer,\n  PaddingBox,\n  StyledRow,\n  StyledText,\n  Subtitle,\n  TokenInfoContainer,\n} from \"./style\";\nimport { IAddLiquidityEditForm } from \"./types\";\n\nconst AddLiquidityEditV2: React.FC = () => {\n  const {\n    position,\n    autoCompoundExists,\n    isTokenNonZero,\n    form,\n    tokenPairPrice: tokenPrices,\n    collectableInUS,\n    liquidityInUS,\n    tokens,\n    txnSetting,\n    setForm,\n    setError,\n  } = useAddLiquidityContextV2();\n  const { noNeedSwap } = useSolverRoutingStore();\n\n  const theme = useTheme();\n  const { ammEnum, networkId } = useNetwork();\n  const [tokenAAmount, setTokenAAmount] = React.useState<string>(form.tokenA);\n  const [tokenBAmount, setTokenBAmount] = React.useState<string>(form.tokenB);\n  const [approvalA, setApprovalA] = useState<boolean>(\n    position.tokenA?.native ?? false\n  );\n  const [approvalB, setApprovalB] = useState<boolean>(\n    position.tokenB?.native ?? false\n  );\n  const buttonGroupRef = useRef<HTMLDivElement>(null);\n\n  const insufficientTokenStatus: [boolean, boolean] = useMemo(\n    () => [\n      bigDecimal.compareTo(tokenAAmount, tokens[0]?.amount) > 0,\n      bigDecimal.compareTo(tokenBAmount, tokens[1]?.amount) > 0,\n    ],\n    [tokenAAmount, tokenBAmount, tokens]\n  );\n\n  const tokenAmountApproved = useMemo(\n    () =>\n      (!!form.tokenA || !!form.tokenB) &&\n      (!form.tokenA || approvalA) &&\n      (!form.tokenB || approvalB),\n    [approvalA, approvalB, form.tokenA, form.tokenB]\n  );\n\n  useEffect(() => {\n    if (insufficientTokenStatus[0]) {\n      setError(`Insufficient ${tokens[0]?.ticker} Balance`);\n    } else if (insufficientTokenStatus[1]) {\n      setError(`Insufficient ${tokens[1]?.ticker} Balance`);\n    } else if (!tokenAmountApproved) {\n      setError(\"\");\n    } else {\n      setError(null);\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [form, approvalA, approvalB, insufficientTokenStatus, tokens, txnSetting]);\n\n  const updateForm = (form: IAddLiquidityEditForm) => {\n    setForm(form);\n  };\n\n  const fetchTokenAmount = (amount: string | undefined, ifTokenA: boolean) => {\n    const _tokenAAmount: string = ifTokenA ? amount : form.tokenA;\n    const _tokenBAmount: string = ifTokenA ? form.tokenB : amount;\n    setTokenAAmount(_tokenAAmount);\n    setTokenBAmount(_tokenBAmount);\n    const netDepositUSDValue = bigDecimal.add(\n      bigDecimal.multiply(_tokenAAmount, tokenPrices[0]),\n      bigDecimal.multiply(_tokenBAmount, tokenPrices[1])\n    );\n    updateForm({\n      ...form,\n      tokenA: _tokenAAmount,\n      tokenB: _tokenBAmount,\n      netDepositUSDValue,\n    });\n  };\n\n  useEffect(() => {\n    if (\n      buttonGroupRef.current &&\n      buttonGroupRef.current.offsetHeight &&\n      !(approvalA && approvalB)\n    )\n      buttonGroupRef.current.scrollIntoView();\n  }, [buttonGroupRef?.current?.offsetHeight, approvalA, approvalB]);\n\n  const approveContractAddress = noNeedSwap\n    ? getChainInfo(networkId).amms[ammEnum]?.nonfungiblePositionManager\n    : getChainInfo(networkId).amms[ammEnum]?.apertureAutomanV3;\n\n  return (\n    <Container>\n      <StyledRow>\n        <PaddingBox>\n          <TokenInfoContainer\n            gap={theme.spacing.lg}\n            noBorder={true}\n            padding=\"0\"\n          >\n            <FlexColumn gap=\"md\">\n              <Subtitle fontWeight={400} fontSize={14}>\n                Liquidity\n              </Subtitle>\n              <Amount>{formatUSDAmount(liquidityInUS)}</Amount>\n            </FlexColumn>\n            {[position.tokenA, position.tokenB].map((token, index) => (\n              <TokenInfo\n                key={`liquidity-${index}`}\n                Icon={token.Icon}\n                ticker={token.ticker}\n                address={token.address}\n                native={token.native}\n                decimals={token.decimals}\n                amount={token.amount}\n                maxWidth={999}\n                marginBottom={0}\n                price={tokenPrices[index]}\n                tag={\n                  liquidityInUS === \"-\" ||\n                  bigDecimal.compareTo(liquidityInUS, 0) === 0\n                    ? \"-\"\n                    : `${bigDecimal.multiply(\n                        bigDecimal.divide(\n                          bigDecimal.multiply(token.amount, tokenPrices[index]),\n                          liquidityInUS,\n                          2\n                        ),\n                        100\n                      )}%`\n                }\n              />\n            ))}\n          </TokenInfoContainer>\n        </PaddingBox>\n        <PaddingBox>\n          <TokenInfoContainer\n            padding=\"0\"\n            gap={theme.spacing.lg}\n            noBorder={true}\n          >\n            <FlexColumn gap=\"md\">\n              <Subtitle fontWeight={400} fontSize={14}>\n                <span>Unclaimed Fees</span>\n                {autoCompoundExists && <AutoCompoundTag autoCompound={true} />}\n              </Subtitle>\n              <Amount>{formatUSDAmount(collectableInUS)}</Amount>\n            </FlexColumn>\n            {[position.tokenA, position.tokenB].map((token, index) => (\n              <TokenInfo\n                key={`unclaimed-fees-${index}`}\n                Icon={token.Icon}\n                ticker={token.ticker}\n                address={token.address}\n                decimals={token.decimals}\n                native={token.native}\n                amount={token.collectableAmount}\n                maxWidth={999}\n                marginBottom={0}\n                price={tokenPrices[index]}\n              />\n            ))}\n          </TokenInfoContainer>\n        </PaddingBox>\n      </StyledRow>\n      <FlexColumn gap=\"xl\">\n        <StyledText>Add Liquidity</StyledText>\n        <FlexColumn gap=\"xl\">\n          <FlexColumn gap=\"xl\">\n            <InputGroupMaxContainer>\n              {tokens.map(\n                (token, index) =>\n                  !!token && (\n                    <InputGroupMax\n                      key={`zapIn-${token.address}`}\n                      placeholder=\"0.00\"\n                      defaultValue={index === 0 ? tokenAAmount : tokenBAmount}\n                      subTitle={\n                        tokenPrices[index] === \"\"\n                          ? \"-\"\n                          : bigDecimal.multiply(\n                              index === 0 ? tokenAAmount : tokenBAmount,\n                              tokenPrices[index]\n                            )\n                      }\n                      balance={token.amount ?? \"0\"}\n                      displayBalance={token.formatAmount}\n                      onChange={(value) => {\n                        fetchTokenAmount(value, index === 0);\n                      }}\n                      onMaxClick={(value) => {\n                        fetchTokenAmount(value, index === 0);\n                      }}\n                      warning={\n                        insufficientTokenStatus[index] ||\n                        (!!(index === 0 ? tokenAAmount : tokenBAmount) &&\n                          bigDecimal.compareTo(\n                            index === 0 ? tokenAAmount : tokenBAmount,\n                            \"0\"\n                          ) <= 0 &&\n                          !(\n                            bigDecimal.compareTo(\n                              index === 0 ? tokenBAmount : tokenAAmount,\n                              \"0\"\n                            ) > 0\n                          ))\n                      }\n                      ticker={token.ticker}\n                    />\n                  )\n              )}\n            </InputGroupMaxContainer>\n          </FlexColumn>\n          {isTokenNonZero && (\n            <SwapDetail\n              setTokenAAmount={setTokenAAmount}\n              setTokenBAmount={setTokenBAmount}\n            />\n          )}\n        </FlexColumn>\n      </FlexColumn>\n      {(isWrappedNative(position.tokenA.address, networkId) ||\n        isWrappedNative(position.tokenB.address, networkId)) && (\n        <UseNative\n          text=\"Deposit\"\n          nativeChange={(useNative: boolean) => {\n            updateForm({\n              ...form,\n              useNative,\n            });\n          }}\n        />\n      )}\n      <DividerHorizontal />\n      <FlexColumn gap=\"lg\">\n        <Subtitle fontSize={14} lineHeight=\"16px\">\n          Net Deposit Amount\n        </Subtitle>\n        <H3 fontSize={24} lineHeight=\"28px\">\n          {formatUSDAmount(\n            calculateTotalValue(\n              tokenAAmount,\n              tokenBAmount,\n              tokenPrices[0],\n              tokenPrices[1]\n            )\n          )}\n        </H3>\n      </FlexColumn>\n      <ButtonGroup ref={buttonGroupRef}>\n        {tokens.map(\n          (token, index) =>\n            !!(index === 0 ? tokenAAmount : tokenBAmount) && (\n              <ApproveTokenBtn\n                key={`ApprovalStatus-${token?.address}`}\n                token={token}\n                variant=\"outlined\"\n                color=\"secondary\"\n                contractAddress={approveContractAddress}\n                amount={(index === 0 ? tokenAAmount : tokenBAmount) ?? \"0\"}\n                canBeZero={!!(index === 0 ? tokenAAmount : tokenBAmount)}\n                approveOnChange={(approve: boolean) =>\n                  index === 0 ? setApprovalA(approve) : setApprovalB(approve)\n                }\n                useNative={token?.native}\n              />\n            )\n        )}\n      </ButtonGroup>\n    </Container>\n  );\n};\n\nexport default AddLiquidityEditV2;\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport { usePositionSnackBar } from \"@/hooks/snackbar/usePositionSnackbar\";\nimport { useSendTransactionWithGas } from \"@/hooks/wagmi/useSendTransactionWithGas\";\nimport { Button, Spinner } from \"@aperture/uikit\";\nimport { getLogger } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useEffect } from \"react\";\nimport styled from \"styled-components\";\nimport { useAccount } from \"wagmi\";\nimport { useAddLiquidityContextV2 } from \"../AddLiquidityContextV2\";\n\nexport const SpinnerWrapper = styled.div`\n  margin: auto;\n`;\nexport const ButtonBox = styled(Button)`\n  background: ${({ theme }) => theme.colors.global.primary};\n  color: ${({ theme }) => theme.colors.global.textAlt.T1};\n  min-width: 300px;\n\n  :hover {\n    background-color: ${({ theme }) => theme.colors.global.primary};\n    ${({ disabled }) => !disabled && \"opacity: 0.8;\"}\n  }\n`;\n\nconst AddLPBtnV2: React.FC<{\n  onModeChange: (mode: string) => void;\n  onClose: () => void;\n}> = ({ onModeChange, onClose }) => {\n  const { addSnackbar } = useSnackbarV2();\n  const { addPositionSnackbar } = usePositionSnackBar();\n\n  const { address } = useAccount();\n  const { ammEnum, networkId } = useNetwork();\n  const {\n    position,\n    showSwapPath,\n    txRequest,\n    txErrorMsg,\n    isSyncing,\n    isSyncingTx,\n    swapInfo,\n    cancelSwapInfo,\n  } = useAddLiquidityContextV2();\n\n  const { ready, data, sendTransaction, isError, error, isPending, isSuccess } =\n    useSendTransactionWithGas(txRequest);\n\n  useEffect(() => {\n    if (isError) {\n      getLogger().error(\"AddLPV2.ConfirmAddLPFailed: \", {\n        walletAddress: address,\n        ammEnum,\n        networkId,\n        positionId: position.positionId,\n        txRequest,\n        swapInfo,\n        hash: data,\n        txErrorMsg,\n        error,\n      });\n      addSnackbar({\n        info: \"Your add liquidity request has failed.\",\n        status: \"failed\",\n      });\n      onModeChange(\"edit\");\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isError]);\n\n  useEffect(() => {\n    if (isSuccess) {\n      getLogger().info(\"AddLPV2.ConfirmAddLPSuccess\", {\n        positionId: position.positionId,\n        hash: data,\n        txRequest,\n      });\n      addPositionSnackbar({\n        info: \"Your add liquidity request has been sent.\",\n        status: \"completed\",\n        url: undefined,\n        transaction: {\n          hash: data,\n          successMsg: `You have successfully added liquidity to your ${position.tokenA.ticker}-${position.tokenB.ticker} position.`,\n        },\n      });\n      cancelSwapInfo();\n      onClose();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isSuccess]);\n\n  const swapInfoUnavailable =\n    showSwapPath && (!swapInfo || swapInfo.length === 0);\n\n  return (\n    <ButtonBox\n      onClick={() => sendTransaction?.()}\n      disabled={\n        !txRequest ||\n        !ready ||\n        !!txErrorMsg ||\n        isPending ||\n        isSuccess ||\n        isSyncing ||\n        isSyncingTx ||\n        swapInfoUnavailable\n      }\n      variant=\"contained\"\n      color=\"primary\"\n      size=\"lg\"\n    >\n      {isPending || isSyncing || isSyncingTx ? (\n        <SpinnerWrapper>\n          <Spinner />\n        </SpinnerWrapper>\n      ) : txErrorMsg ? (\n        txErrorMsg\n      ) : swapInfoUnavailable ? (\n        \"Swap Info Unavailable\"\n      ) : (\n        \"Confirm Add Liquidity\"\n      )}\n    </ButtonBox>\n  );\n};\n\nexport default AddLPBtnV2;\n","import { UnstakePositionBtn } from \"@/components/Button/StakePositionBtn\";\nimport { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport { useGlobalSlippage } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\n\nimport { useFetchStakePositionsIds } from \"@/hooks/useFetchStakePositionsIds\";\nimport { DEFAULT_SLIPPAGE, WARNING_SLIPPAGE } from \"@/utils/helper\";\nimport { Title, TitleText } from \"@/views/style\";\nimport {\n  Button,\n  DRAWER_CONTENT_WIDTH,\n  DrawerTitle,\n  Headline5,\n  ITransactionSettingsForm,\n  Spinner,\n  TransactionSettings,\n} from \"@aperture/uikit\";\nimport styled from \"styled-components\";\nimport { useAddLiquidityContextV2 } from \"../AddLiquidityContextV2\";\nimport AddLPBtnV2 from \"./AddLPBtnV2\";\n\nconst Container = styled.div`\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  gap: ${({ theme }) => theme.spacing[\"2xl\"]};\n`;\n\nconst Wrapper = styled.div<{ mode: string }>`\n  overflow-y: auto;\n  scrollbar-width: none;\n  height: ${({ mode }) =>\n    mode === \"edit\" ? \"calc(100% - 168px)\" : \"calc(100% - 156px)\"};\n`;\nconst Content = styled.div`\n  width: ${DRAWER_CONTENT_WIDTH};\n`;\n\nconst ButtonsContainer = styled.div`\n  padding-bottom: 24px;\n  display: flex;\n  align-items: center;\n  justify-content: flex-end;\n  box-sizing: border-box;\n  gap: ${({ theme }) => theme.spacing.xl};\n  width: ${DRAWER_CONTENT_WIDTH};\n`;\n\nexport const SpinnerWrapper = styled.div`\n  margin: auto;\n`;\n\nconst AddLiquidityLayoutV2: React.FC<{\n  mode: string;\n  children: React.ReactNode;\n  onClose: () => void;\n  onModeChange: (mode: string) => void;\n}> = ({ mode, children, onClose, onModeChange }) => {\n  const { networkId } = useNetwork();\n  const { globalSlippage, setGlobalSlippage } = useGlobalSlippage();\n  const {\n    position,\n    showSwapPath,\n    txnSetting,\n    setTxnSetting,\n    error: errorMessage,\n    isSyncing,\n    isSyncingTx,\n    swapInfo,\n    openSettings,\n  } = useAddLiquidityContextV2();\n  const { mutate: mutateStakePositionIds } = useFetchStakePositionsIds();\n  const { stakePool, staked, setStaked } = useUnstakePositionContext();\n\n  return (\n    <Container>\n      <Title\n        onClick={() => {\n          mode === \"edit\" ? onClose() : onModeChange(\"edit\");\n        }}\n      >\n        <DrawerTitle isDrawer>\n          <Headline5 fontWeight={500} textAlign={\"end\"}>\n            Back to Dashboard\n          </Headline5>\n        </DrawerTitle>\n      </Title>\n      {mode === \"preview\" && <TitleText>Preview Add Liquidity</TitleText>}\n      {mode === \"edit\" && <TitleText>Add Liquidity</TitleText>}\n      <Wrapper mode={mode}>\n        <Content>{children}</Content>\n      </Wrapper>\n      <ButtonsContainer>\n        <TransactionSettings\n          defaultSlippage={DEFAULT_SLIPPAGE}\n          globalSlippage={globalSlippage}\n          warningSlippage={WARNING_SLIPPAGE}\n          settingsForm={txnSetting}\n          openSettings={openSettings}\n          dropdownPosition=\"topRight\"\n          onFormChange={(form: ITransactionSettingsForm) => setTxnSetting(form)}\n          buttonSize={\"small\"}\n          setGlobalSlippage={(value) =>\n            setGlobalSlippage((prev) => ({ ...prev, [networkId]: value }))\n          }\n        />\n        <Button\n          variant=\"contained\"\n          color=\"default\"\n          size=\"lg\"\n          width=\"100%\"\n          onClick={() => {\n            mode === \"edit\" ? onClose() : onModeChange(\"edit\");\n          }}\n        >\n          Cancel\n        </Button>\n        {mode === \"edit\" &&\n          (stakePool && staked ? (\n            <UnstakePositionBtn\n              key={position.positionId}\n              atStake={staked}\n              gaugeAddress={stakePool.gaugeAddress}\n              positionId={position.positionIdBN}\n              handleTxSuccess={() => {\n                setStaked(false);\n                mutateStakePositionIds();\n              }}\n            />\n          ) : (\n            <Button\n              variant=\"contained\"\n              color=\"secondary\"\n              size=\"lg\"\n              width=\"100%\"\n              disabled={\n                typeof errorMessage === \"string\" ||\n                isSyncing ||\n                isSyncingTx ||\n                !showSwapPath ||\n                (showSwapPath && (!swapInfo || swapInfo.length === 0))\n              }\n              onClick={() => {\n                onModeChange(\"preview\");\n              }}\n            >\n              {errorMessage ? (\n                errorMessage\n              ) : isSyncing || isSyncingTx ? (\n                <SpinnerWrapper>\n                  <Spinner />\n                </SpinnerWrapper>\n              ) : (\n                \"Add Liquidity\"\n              )}\n            </Button>\n          ))}\n        {mode === \"preview\" && (\n          <AddLPBtnV2 onModeChange={onModeChange} onClose={onClose} />\n        )}\n      </ButtonsContainer>\n    </Container>\n  );\n};\n\nexport default AddLiquidityLayoutV2;\n","import { useSolverRoutingStore } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { calculateTotalValue } from \"@/helper/positionHelper\";\nimport { getTicker } from \"@/helper/tokenHelper\";\nimport { useFetchTokenMap } from \"@/hooks/useFetchTokenMap\";\nimport { formatUSDAmount } from \"@/utils/numberFormat\";\nimport { CommonContainer, Row, Text1, Text2 } from \"@/views/style\";\nimport { FlexColumn, SwapRoute, TokenInfo } from \"@aperture/uikit\";\nimport { viem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport bigDecimal from \"js-big-decimal\";\nimport React, { useEffect } from \"react\";\nimport { formatUnits } from \"viem\";\nimport { useAddLiquidityContextV2 } from \"../AddLiquidityContextV2\";\nimport {\n  Amount,\n  Container,\n  CurrentLiquidity,\n  PreviewAddLiquidity,\n  StyledWhiteCard,\n  Subtitle,\n  TokenInfoContainer,\n} from \"../AddLiquidityEdit/style\";\n\nconst AddLiquidityPreviewV2: React.FC = () => {\n  const { networkId } = useNetwork();\n  const { data: tokenMap } = useFetchTokenMap();\n  const {\n    liquidityInUS,\n    form,\n    position,\n    tokenPairPrice: tokenPrices,\n    swapInfo,\n    selectedSolver,\n    suggestedSolver,\n    txnSetting,\n    minAmounts,\n    gasEstimated,\n    isSyncing,\n    isSyncingTx,\n    setError,\n  } = useAddLiquidityContextV2();\n  const { noNeedSwap } = useSolverRoutingStore();\n  const tokens = [position.tokenA, position.tokenB];\n  const nativeCurrency = viem.getNativeCurrency(networkId);\n\n  const newTokenAAmount = bigDecimal.add(\n    tokens[0].amount,\n    noNeedSwap ? form.tokenA : minAmounts.amount0Min\n  );\n  const newTokenBAmount = bigDecimal.add(\n    tokens[1].amount,\n    noNeedSwap ? form.tokenB : minAmounts.amount1Min\n  );\n  const newLiquidity = calculateTotalValue(\n    newTokenAAmount,\n    newTokenBAmount,\n    tokenPrices[0],\n    tokenPrices[1]\n  );\n  const depositedItems = [\n    {\n      label: \"Add Liquidity\",\n      values: [form.tokenA, form.tokenB],\n      compareZero: false,\n      loading: false,\n    },\n    {\n      label: \"Token Deposited\",\n      values: [form.tokenA, form.tokenB],\n      compareZero: true,\n      loading: false,\n    },\n    {\n      label: \"Min.Amounts Of Liquidity To Add\",\n      values: [minAmounts.amount0Min, minAmounts.amount1Min],\n      compareZero: false,\n      loading: isSyncingTx,\n    },\n  ];\n  const liquidityItems = [\n    {\n      label: \"Current Liquidity Position\",\n      value: liquidityInUS,\n      amounts: [tokens[0].amount, tokens[1].amount],\n      loading: false,\n    },\n    {\n      label: \"New Liquidity Position\",\n      value: isSyncingTx ? \"-\" : newLiquidity,\n      amounts: [newTokenAAmount, newTokenBAmount],\n      loading: isSyncingTx,\n    },\n  ];\n\n  useEffect(() => {\n    setError(null);\n  }, [txnSetting]);\n\n  return (\n    <Container>\n      <StyledWhiteCard flexDirection={\"column\"}>\n        <PreviewAddLiquidity zapIn={!noNeedSwap}>\n          {(noNeedSwap\n            ? depositedItems.slice(0, 1)\n            : depositedItems.slice(1)\n          ).map(({ label, values, compareZero, loading }) => (\n            <FlexColumn gap=\"lg\" key={label}>\n              <FlexColumn gap=\"md\">\n                <Subtitle>{label}</Subtitle>\n                <Amount>\n                  {loading || tokenPrices[0] === \"\" || tokenPrices[1] === \"\"\n                    ? \"$-\"\n                    : formatUSDAmount(\n                        bigDecimal.add(\n                          bigDecimal.multiply(values[0], tokenPrices[0]),\n                          bigDecimal.multiply(values[1], tokenPrices[1])\n                        )\n                      )}\n                </Amount>\n              </FlexColumn>\n              <div>\n                {tokens.map(\n                  (token, index) =>\n                    (compareZero\n                      ? bigDecimal.compareTo(values[index], 0) > 0\n                      : true) && (\n                      <TokenInfo\n                        key={token.address}\n                        Icon={token.Icon}\n                        ticker={getTicker(\n                          token.ticker,\n                          networkId,\n                          form.useNative\n                        )}\n                        address={token.address}\n                        native={token.native}\n                        decimals={token.decimals}\n                        amount={bigDecimal.multiply(values[index], 1.0)}\n                        price={tokenPrices[index]}\n                        loading={loading}\n                        maxWidth={999}\n                      />\n                    )\n                )}\n              </div>\n            </FlexColumn>\n          ))}\n        </PreviewAddLiquidity>\n      </StyledWhiteCard>\n      <CurrentLiquidity>\n        {liquidityItems.map(({ label, value, amounts, loading }) => (\n          <TokenInfoContainer key={label} gap=\"12px\" minWidth={\"262px\"}>\n            <FlexColumn gap=\"md\">\n              <Subtitle>{label}</Subtitle>\n              <Amount>{formatUSDAmount(value)}</Amount>\n            </FlexColumn>\n            {tokens.map((token, index) => (\n              <TokenInfo\n                key={token.address}\n                Icon={token.Icon}\n                ticker={token.ticker}\n                amount={amounts[index]}\n                address={token.address}\n                native={token.native}\n                decimals={token.decimals}\n                price={tokenPrices[index]}\n                loading={loading}\n                maxWidth={999}\n                marginBottom={0}\n                tag={\n                  value === \"-\" || bigDecimal.compareTo(0, value) === 0\n                    ? \"-\"\n                    : `${bigDecimal.multiply(\n                        bigDecimal.divide(\n                          bigDecimal.multiply(\n                            amounts[index],\n                            tokenPrices[index]\n                          ),\n                          value,\n                          2\n                        ),\n                        100\n                      )}%`\n                }\n              />\n            ))}\n          </TokenInfoContainer>\n        ))}\n      </CurrentLiquidity>\n      {!noNeedSwap && (\n        <>\n          {swapInfo &&\n            tokenMap &&\n            swapInfo?.[selectedSolver]?.swapRoutes?.length > 0 && (\n              <CommonContainer>\n                <FlexColumn gap={\"xl\"}>\n                  <Text1>Order Routing</Text1>\n                  <SwapRoute\n                    {...swapInfo?.[selectedSolver]}\n                    loading={isSyncing}\n                    maxWidth={571}\n                    routes={swapInfo?.[selectedSolver]?.swapRoutes}\n                    wBorder={true}\n                    suggested={selectedSolver === suggestedSolver}\n                  />\n                </FlexColumn>\n              </CommonContainer>\n            )}\n          <CommonContainer>\n            <FlexColumn gap=\"md\">\n              <Row>\n                <Text2>Est. Total Gas Fee</Text2>\n                <Text2>\n                  {`${\n                    gasEstimated\n                      ? formatUnits(gasEstimated, nativeCurrency.decimals)\n                      : \"-\"\n                  } ${nativeCurrency.symbol}`}\n                </Text2>\n              </Row>\n              <Row>\n                <Text2>Slippage Setting</Text2>\n                <Text2>{`${\n                  Math.floor(txnSetting.slippage * 10000) / 100\n                }%`}</Text2>\n              </Row>\n            </FlexColumn>\n          </CommonContainer>\n        </>\n      )}\n    </Container>\n  );\n};\n\nexport default AddLiquidityPreviewV2;\n","import { IPositionDetails } from \"@/config/position/positionConfig\";\nimport React, { useState } from \"react\";\nimport { GotoType } from \"../types\";\nimport { AddLiquidityProviderV2 } from \"./AddLiquidityContextV2\";\nimport AddLiquidityEditV2 from \"./AddLiquidityEdit/AddLiquidityEditV2\";\nimport AddLiquidityLayoutV2 from \"./AddLiquidityLayout/AddLiquidityLayoutV2\";\nimport AddLiquidityPreviewV2 from \"./AddLiquidityPreview/AddLiquidityPreviewV2\";\n\nexport const AddLiquidity: React.FC<{\n  details: IPositionDetails;\n  goto: GotoType;\n}> = ({ details, goto }) => {\n  const [mode, setMode] = useState(\"edit\");\n\n  return (\n    <AddLiquidityProviderV2 position={details}>\n      <AddLiquidityLayoutV2\n        mode={mode}\n        onClose={() => {\n          goto.details();\n        }}\n        onModeChange={(mode: string) => {\n          setMode(mode);\n        }}\n      >\n        {mode === \"edit\" && <AddLiquidityEditV2 />}\n        {mode === \"preview\" && <AddLiquidityPreviewV2 />}\n      </AddLiquidityLayoutV2>\n    </AddLiquidityProviderV2>\n  );\n};\n","import { useGlobalSlippage } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { IPositionDetails, ITokenInfo } from \"@/config/position/positionConfig\";\nimport { getTriggerDeadline } from \"@/helper/deadlineHelper\";\nimport {\n  calculateTotalValue,\n  getProjectedLiquidityPosition,\n} from \"@/helper/positionHelper\";\nimport {\n  filterTriggers,\n  getInitializedPriceTrigger,\n  getInitializedRatioTrigger,\n  getInitializedTimeTrigger,\n  getTriggerCondition,\n  getTriggerType,\n} from \"@/helper/triggerHelper\";\nimport { useCurrentChainToken } from \"@/hooks/globalState/useCurrentChainToken\";\nimport { useFetchAllChainUserTriggers } from \"@/hooks/useFetchAllChainUserTriggers\";\nimport { useFetchUserPosition } from \"@/hooks/useFetchUserPosition\";\nimport {\n  DEFAULT_SLIPPAGE,\n  gasCeilingButtonError,\n  getGasCeiling,\n  MAX_TRIGGER,\n} from \"@/utils/helper\";\nimport {\n  CreateTriggerPayload,\n  TriggerItem,\n  UpdateTriggerPayload,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport {\n  convertRelativePriceToHumanValue,\n  ITransactionSettingsForm,\n} from \"@ui/components\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport React, { useEffect, useMemo, useState } from \"react\";\nimport { useAccount } from \"wagmi\";\nimport { IRemoveLiquidityEditForm } from \"./RemoveLiquidityEdit/types\";\n\nexport type IRemoveLiquidityTab =\n  | \"Remove Liquidity\"\n  | \"Prescheduled Position Close\";\nexport interface IRemoveLiquidityContext {\n  tab: IRemoveLiquidityTab;\n  position: IPositionDetails;\n  tokenPair: ITokenInfo[];\n  tokenPrice: [string, string];\n  trigger: TriggerItem | undefined;\n  form: IRemoveLiquidityEditForm;\n  estimatedAmounts: [string, string];\n  estimatedLiquidity: string;\n  maxTriggersCreated: boolean;\n  txForm: ITransactionSettingsForm;\n  error: string;\n  isPrescheduleBtnDisabled: boolean;\n  prescheduledPayload?: CreateTriggerPayload | UpdateTriggerPayload;\n  setTab: React.Dispatch<React.SetStateAction<IRemoveLiquidityTab>>;\n  setForm: React.Dispatch<React.SetStateAction<IRemoveLiquidityEditForm>>;\n  setTxForm: React.Dispatch<React.SetStateAction<ITransactionSettingsForm>>;\n  setError: React.Dispatch<React.SetStateAction<string>>;\n}\n\nconst RemoveLiquidityContext = React.createContext<IRemoveLiquidityContext>(\n  null as any\n);\n\ninterface RemoveLiquidityProviderProps {\n  position: IPositionDetails;\n  trigger: TriggerItem | undefined;\n  tabs: 0 | 1;\n}\n\nexport const RemoveLiquidityProvider: React.FC<\n  React.PropsWithChildren<RemoveLiquidityProviderProps>\n> = ({ children, position, trigger, tabs }) => {\n  const { address } = useAccount();\n  const { ammEnum, networkId } = useNetwork();\n  const { data: positionDetails } = useFetchUserPosition(position.positionId);\n  const tokenA = position.tokenA;\n  const tokenB = position.tokenB;\n  const tokenPair = [tokenA, tokenB];\n  const { currentTokenPrice: tokenPrices } = useCurrentChainToken(networkId);\n  const { data: allChainsTriggerObj } = useFetchAllChainUserTriggers();\n  const { globalSlippage } = useGlobalSlippage();\n  const [tab, setTab] = useState<IRemoveLiquidityTab>(\n    tabs === 0 ? \"Remove Liquidity\" : \"Prescheduled Position Close\"\n  );\n  const [txForm, setTxForm] = useState<ITransactionSettingsForm>({\n    slippage:\n      (trigger?.action?.type !== \"LimitOrderClose\" &&\n        trigger?.action?.slippage) ||\n      (globalSlippage ?? DEFAULT_SLIPPAGE),\n    deadline: \"30\",\n  });\n  const [error, setError] = useState(\"\");\n\n  const existingTriggersLen = filterTriggers(\n    allChainsTriggerObj?.[networkId],\n    \"Close\",\n    position.positionId\n  ).length;\n  const maxTriggersCreated = !trigger && existingTriggersLen >= MAX_TRIGGER;\n\n  const [form, setForm] = useState<IRemoveLiquidityEditForm>({\n    gasCeiling:\n      trigger?.action?.maxGasProportion ||\n      getGasCeiling(networkId, position.liquidity),\n    trigger: {\n      type: getTriggerType(trigger),\n      Price: getInitializedPriceTrigger(trigger, tokenA, tokenB),\n      Ratio: getInitializedRatioTrigger(\n        trigger,\n        tokenA,\n        position.tickLower,\n        position.tickUpper\n      ),\n      Time: getInitializedTimeTrigger(trigger),\n    },\n    removePercentage: 0.5,\n  });\n\n  const tokenPrice: [string, string] = useMemo(\n    () => [\n      tokenPrices?.[tokenA.address]?.price ?? \"0\",\n      tokenPrices?.[tokenB.address]?.price ?? \"0\",\n    ],\n    [tokenPrices, tokenA, tokenB]\n  );\n\n  const estimatedAmounts: [string, string] = useMemo(() => {\n    if (positionDetails) {\n      const res = getProjectedLiquidityPosition(\n        networkId,\n        position,\n        positionDetails.position,\n        positionDetails.tickLower,\n        positionDetails.tickUpper,\n        tokenPrice,\n        form.trigger\n      );\n      return [res[0].amount, res[1].amount];\n    }\n    return [position.tokenA.amount, position.tokenB.amount];\n  }, [form.trigger]);\n\n  const estimatedLiquidity = calculateTotalValue(\n    estimatedAmounts[0],\n    estimatedAmounts[1],\n    tokenPrice[0],\n    tokenPrice[1]\n  );\n\n  const [isPrescheduleBtnDisabled, setIsPrescheduleBtnDisabled] = useState(\n    !!trigger\n  );\n  const [prescheduledPayload, setPrescheduledPayload] = useState<\n    CreateTriggerPayload | UpdateTriggerPayload | undefined\n  >(undefined);\n\n  useEffect(() => {\n    if (tab === \"Prescheduled Position Close\") {\n      const { trigger } = form;\n      if (maxTriggersCreated) {\n        setError(\"Maximum number of triggers\");\n      } else if (trigger.type === \"Price\" && trigger.Price.amount === \"0\") {\n        setError(\"Price Amount Is Required\");\n      } else if (trigger.type === \"Time\" && !form.trigger.Time.dateTime) {\n        setError(\"Trigger Time Is Required\");\n      } else if (\n        trigger.type === \"Time\" &&\n        moment(form.trigger.Time.dateTime).valueOf() < moment().valueOf()\n      ) {\n        setError(\"Trigger Time Is Before Current Time\");\n      } else {\n        setError(\n          gasCeilingButtonError(\n            networkId,\n            form.gasCeiling,\n            position.liquidity !== \"-\" ? position.liquidity : \"0\"\n          )\n        );\n      }\n    } else {\n      setError(\"\");\n    }\n  }, [tab, form, maxTriggersCreated]);\n\n  useEffect(() => {\n    if (tab === \"Remove Liquidity\") return;\n    const generateData = () => {\n      const data = {\n        ownerAddr: address!,\n        chainId: networkId,\n        action: {\n          type: \"Close\",\n          slippage: txForm.slippage,\n          maxGasProportion: form.gasCeiling,\n        },\n        condition: getTriggerCondition(\n          form.trigger,\n          position.tokenA,\n          position.tokenB,\n          position.tickLower,\n          position.tickUpper,\n          networkId,\n          false\n        ),\n        expiration: getTriggerDeadline(),\n      };\n      if (trigger) {\n        (data as UpdateTriggerPayload).taskId = trigger.taskId;\n        for (const key in data.condition) {\n          if (data.condition[key] === undefined) {\n            delete data.condition[key];\n          }\n        }\n        const convertTrigger = _.cloneDeep(data);\n        if (\n          convertTrigger.condition.type === \"Price\" &&\n          convertTrigger.condition.frontendType === \"RELATIVE_PRICE\"\n        ) {\n          if (convertTrigger.condition.lte) {\n            convertTrigger.condition.lte = convertRelativePriceToHumanValue(\n              convertTrigger.condition.lte,\n              [position.tokenA, position.tokenB]\n            );\n          } else if (convertTrigger.condition.gte) {\n            convertTrigger.condition.gte = convertRelativePriceToHumanValue(\n              convertTrigger.condition.gte,\n              [position.tokenA, position.tokenB]\n            );\n          }\n        }\n        const isActionEqual = _.isEqual(data.action, trigger.action);\n        const isConditionEqual = _.isEqual(\n          convertTrigger.condition,\n          trigger.condition\n        );\n        if (isActionEqual) {\n          (data as UpdateTriggerPayload).action = undefined;\n        }\n        if (isConditionEqual) {\n          (data as UpdateTriggerPayload).condition = undefined;\n        }\n        setIsPrescheduleBtnDisabled(isActionEqual && isConditionEqual);\n      } else {\n        (data as CreateTriggerPayload).amm = ammEnum;\n        (data as CreateTriggerPayload).nftId = position.positionId;\n      }\n      setPrescheduledPayload(\n        data as CreateTriggerPayload | UpdateTriggerPayload\n      );\n    };\n    generateData();\n  }, [form, txForm]);\n\n  return (\n    <RemoveLiquidityContext.Provider\n      value={{\n        tab,\n        position,\n        tokenPair,\n        tokenPrice,\n        trigger,\n        form,\n        estimatedAmounts,\n        estimatedLiquidity,\n        maxTriggersCreated,\n        txForm,\n        error,\n        isPrescheduleBtnDisabled,\n        prescheduledPayload,\n        setTab,\n        setForm,\n        setTxForm,\n        setError,\n      }}\n    >\n      {children}\n    </RemoveLiquidityContext.Provider>\n  );\n};\n\nexport const useRemoveLiquidityContext = () => {\n  return React.useContext(RemoveLiquidityContext);\n};\n","import { Slider } from \"@/../../packages/uikit/src/components/Slider\";\nimport { CommonContainer, Row } from \"@/views/style\";\nimport {\n  ButtonText,\n  Headline3,\n  Headline5,\n  InputGroupRight,\n} from \"@aperture/uikit\";\nimport styled from \"styled-components\";\n\nexport const Container = styled.div`\n  box-sizing: border-box;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing[\"xl\"]};\n`;\n\nexport const StyledRow = styled(Row)`\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const PaddingBox = styled.div`\n  padding: 16px;\n  height: 112px;\n  min-width: calc(45% - 48px);\n  border: 1px solid ${({ theme }) => theme.colors.global.line.Line2};\n  border-radius: ${({ theme }) => theme.radii.xl};\n`;\n\nexport const TokenInfoContainer = styled(CommonContainer)<{\n  noBorder?: boolean;\n  gap?: string;\n  padding?: string;\n  minWidth?: string;\n}>`\n  height: fit-content;\n  display: flex;\n  flex-direction: column;\n  white-space: nowrap;\n  color: ${({ theme }) => theme.colors.global.text.T2};\n  gap: ${({ gap }) => gap || \"0px\"};\n  border: ${({ noBorder, theme }) =>\n    noBorder ? \"none\" : `1px solid ${theme.colors.global.line.Line2}`};\n  padding: ${({ theme, padding }) => padding || theme.spacing.xl};\n  ${({ minWidth }) => minWidth && `min-width: ${minWidth};`}\n`;\n\nexport const Amount = styled(Headline3)`\n  font-size: 24px;\n  line-height: 28px;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const Subtitle = styled(Headline5)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n  display: flex;\n  align-items: center;\n  span:first-child {\n    margin-right: 4px;\n    white-space: nowrap;\n    line-height: 20px;\n  }\n  > div {\n    margin-left: auto;\n    transform: translate(5px, 0);\n  }\n`;\n\nexport const Position = styled(CommonContainer)`\n  width: 100%;\n  margin-top: 8px;\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.lg};\n`;\n\nexport const GasCeiling = styled(CommonContainer)<{ tab: string }>`\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.lg};\n  width: ${({ tab }) => (tab === \"Rebalance\" ? \"100%\" : \"463px\")};\n`;\n\nexport const StyledSlider = styled(Slider)`\n  margin: 0 8px 16px;\n`;\n\nexport const StyledInputGroupRight = styled(InputGroupRight)`\n  position: relative;\n  height: 20px;\n  width: 160px;\n  padding: 12px 16px;\n  font-size: 16px;\n  line-height: 20px;\n  background: ${({ theme }) => theme.colors.global.background.BG3};\n  border-radius: ${({ theme }) => theme.radii.round};\n`;\n\nexport const RightNodeWrapper = styled.div`\n  position: absolute;\n  left: 141px;\n  top: 50%;\n  transform: translateY(-50%);\n  display: flex;\n  height: 44px;\n  justify-content: center;\n  align-items: center;\n  cursor: pointer;\n`;\n\nexport const RightNodeText = styled(ButtonText)`\n  height: 24px;\n  line-height: 24px;\n  align-items: center;\n  text-align: center;\n  color: ${({ theme }) => theme.colors.global.primary};\n`;\n\nexport const Hint = styled.div`\n  font-size: 14px;\n  font-weight: 500;\n  color: ${({ theme }) => theme.colors.global.warning};\n  display: flex;\n  align-items: center;\n  white-space: nowrap;\n  line-height: 1;\n  margin-top: 4px;\n  gap: 6px;\n  > svg {\n    flex-shrink: 0;\n    fill: ${({ theme }) => theme.colors.grey.mediumGrey};\n  }\n`;\n\nexport const StyledCommonContainer = styled(CommonContainer)`\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport UseNative from \"@/components/UseNative/UseNative\";\nimport { useIsZapOutEnabled } from \"@/config/feature_flags\";\nimport { getTicker, isWrappedNative } from \"@/helper/tokenHelper\";\nimport { MAX_TRIGGER, gasCeilingInputError } from \"@/utils/helper\";\nimport { isManta } from \"@/utils/networkHelper\";\nimport { formatUSDAmount } from \"@/utils/numberFormat\";\nimport { DividerHorizontal, EmptyBox, Expires } from \"@/views/style\";\nimport { AccessoryIcons } from \"@aperture/assetkit\";\nimport {\n  AutoCompoundTag,\n  Flex,\n  FlexColumn,\n  Headline3,\n  Headline5,\n  PercentageInputAdditional,\n  PercentageInputGroup,\n  QuestionPopover,\n  TokenInfo,\n  TriggerSetup,\n} from \"@aperture/uikit\";\nimport { ZapTag } from \"@aperture/uikitv2\";\nimport { AUTOMATION_EXPIRATION_IN_DAYS } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport bigDecimal from \"js-big-decimal\";\nimport React, { useEffect } from \"react\";\nimport { useTheme } from \"styled-components\";\nimport { useRemoveLiquidityContext } from \"../Context\";\nimport {\n  Amount,\n  Container,\n  GasCeiling,\n  Hint,\n  PaddingBox,\n  Position,\n  StyledCommonContainer,\n  StyledRow,\n  StyledSlider,\n  Subtitle,\n  TokenInfoContainer,\n} from \"./style\";\n\nconst RemoveLiquidityEdit: React.FC = () => {\n  const theme = useTheme();\n  const { networkId } = useNetwork();\n  const {\n    tab,\n    position,\n    tokenPair,\n    tokenPrice,\n    estimatedAmounts,\n    estimatedLiquidity,\n    maxTriggersCreated,\n    form,\n    setForm,\n  } = useRemoveLiquidityContext();\n  const isZapOutEnabled = useIsZapOutEnabled();\n\n  const [useNative, setUseNative] = React.useState(\n    isWrappedNative(position.tokenA.address, networkId) ||\n      isWrappedNative(position.tokenB.address, networkId)\n  );\n  useEffect(() => {\n    setForm({ ...form, useNative });\n  }, [useNative]);\n\n  return tab === \"Prescheduled Position Close\" && isManta(networkId) ? (\n    <EmptyBox height={\"320px\"}>\n      <Headline5>Automation tool on ApertureSwap is coming soon!</Headline5>\n    </EmptyBox>\n  ) : (\n    <Container>\n      <StyledRow>\n        <PaddingBox>\n          <TokenInfoContainer\n            noBorder={true}\n            gap={theme.spacing.lg}\n            padding=\"0\"\n          >\n            <FlexColumn gap=\"md\">\n              <Subtitle>Liquidity</Subtitle>\n              <Amount>{formatUSDAmount(position.liquidity)}</Amount>\n            </FlexColumn>\n            <div>\n              {tokenPair.map((token, index) => (\n                <TokenInfo\n                  key={token.address}\n                  Icon={token.Icon}\n                  ticker={token.ticker}\n                  address={token.address}\n                  native={token.native}\n                  decimals={token.decimals}\n                  amount={token.amount ?? \"0\"}\n                  price={tokenPrice[index]}\n                  maxWidth={999}\n                  tag={\n                    position.liquidity === \"-\" ||\n                    bigDecimal.compareTo(position.liquidity, 0) === 0\n                      ? \"-\"\n                      : `${bigDecimal.multiply(\n                          bigDecimal.divide(\n                            bigDecimal.multiply(\n                              token.amount,\n                              tokenPrice[index]\n                            ),\n                            position.liquidity,\n                            2\n                          ),\n                          100\n                        )}%`\n                  }\n                />\n              ))}\n            </div>\n          </TokenInfoContainer>\n        </PaddingBox>\n        <PaddingBox>\n          <TokenInfoContainer\n            noBorder={true}\n            gap={theme.spacing.lg}\n            padding=\"0\"\n          >\n            <FlexColumn gap=\"md\">\n              <Subtitle>\n                <span>Unclaimed Fees</span>\n                {position.autoCompound && (\n                  <AutoCompoundTag autoCompound={true} />\n                )}\n              </Subtitle>\n              <Amount>{formatUSDAmount(position.feeAmount)}</Amount>\n            </FlexColumn>\n            <div>\n              {tokenPair.map((token, index) => (\n                <TokenInfo\n                  key={token.address}\n                  Icon={token.Icon}\n                  ticker={token.ticker}\n                  address={token.address}\n                  native={token.native}\n                  decimals={token.decimals}\n                  amount={token.collectableAmount ?? \"0\"}\n                  price={tokenPrice[index]}\n                  maxWidth={999}\n                />\n              ))}\n            </div>\n          </TokenInfoContainer>\n        </PaddingBox>\n      </StyledRow>\n      {tab === \"Prescheduled Position Close\" && (\n        <TriggerSetup\n          errorMsg={\n            maxTriggersCreated\n              ? `You have already set up the maximum number of triggers (${MAX_TRIGGER}).`\n              : undefined\n          }\n          showTimeBuffer={false}\n          tooltip=\"Use triggers to automatically close your position (remove liquidity) based on asset prices, pool ratios, or time. Users can set up to 3 triggers for liquidity removal.\"\n          initForm={form.trigger}\n          tokens={[position.tokenA, position.tokenB]}\n          expireDays={AUTOMATION_EXPIRATION_IN_DAYS}\n          onFormChange={(triggerSetupForm) => {\n            setForm({ ...form, trigger: triggerSetupForm });\n          }}\n        />\n      )}\n      {tab === \"Remove Liquidity\" && (\n        <StyledCommonContainer>\n          <Flex justifyContent=\"space-between\">\n            <Subtitle lineHeight={\"20px\"}>\n              Remove Percentage of Position\n            </Subtitle>\n            {isZapOutEnabled && <ZapTag status=\"Out\" />}\n          </Flex>\n          <StyledSlider\n            value={form.removePercentage}\n            onChange={(value) => {\n              setForm({\n                ...form,\n                removePercentage: value,\n              });\n            }}\n          />\n          <PercentageInputAdditional\n            color=\"primary\"\n            width={280}\n            amount={position.liquidity}\n            additionalAmount={position.feeAmount}\n            percentage={form.removePercentage}\n            onChange={(percentage) => {\n              setForm({ ...form, removePercentage: percentage });\n            }}\n          />\n        </StyledCommonContainer>\n      )}\n      {!isZapOutEnabled &&\n        tab === \"Remove Liquidity\" &&\n        (isWrappedNative(position.tokenA.address, networkId) ||\n          isWrappedNative(position.tokenB.address, networkId)) && (\n          <UseNative\n            text=\"Collect\"\n            nativeChange={(useNative: boolean) => {\n              setUseNative(useNative);\n              setForm({ ...form, useNative });\n            }}\n          />\n        )}\n      {tab === \"Remove Liquidity\" && <DividerHorizontal />}\n      <Position>\n        {tab === \"Remove Liquidity\" ? (\n          <Subtitle>Projected Amount To Receive</Subtitle>\n        ) : (\n          <Subtitle>\n            <span>Current Value (If Closed Now)</span>\n            <QuestionPopover content=\"Actual amount received will depend on future asset prices at the time of closure.\" />\n          </Subtitle>\n        )}\n        <Amount>\n          {formatUSDAmount(\n            position.liquidity === \"-\"\n              ? \"-\"\n              : tab === \"Remove Liquidity\"\n              ? bigDecimal.add(\n                  bigDecimal.multiply(\n                    position.liquidity,\n                    form.removePercentage\n                  ),\n                  position.feeAmount === \"-\" ? \"0\" : position.feeAmount\n                )\n              : bigDecimal.add(\n                  estimatedLiquidity,\n                  position.feeAmount === \"-\" ? \"0\" : position.feeAmount\n                )\n          )}\n        </Amount>\n        <div>\n          {tokenPair.map((token, index) => (\n            <TokenInfo\n              key={token.address}\n              Icon={token.Icon}\n              ticker={getTicker(token.ticker, networkId, form.useNative)}\n              address={token.address}\n              native={token.native}\n              decimals={token.decimals}\n              maxWidth={999}\n              amount={\n                tab === \"Remove Liquidity\"\n                  ? bigDecimal.add(\n                      bigDecimal.multiply(token.amount, form.removePercentage),\n                      token.collectableAmount\n                    )\n                  : bigDecimal.add(\n                      estimatedAmounts[index],\n                      token.collectableAmount\n                    )\n              }\n              price={tokenPrice[index]}\n            />\n          ))}\n        </div>\n        {tab === \"Remove Liquidity\" && (\n          <Hint>\n            <AccessoryIcons.InfoIcon />\n            All accrued fees will be collected when removing liquidity.\n          </Hint>\n        )}\n      </Position>\n      {tab === \"Prescheduled Position Close\" && (\n        <Flex justifyContent={\"space-between\"}>\n          <GasCeiling tab={tab}>\n            <Subtitle>\n              <span>Gas Fee Ceiling Setting</span>\n              <QuestionPopover content=\"Input the maximum gas fee in either dollars or percentage of position. However, the actual gas ceiling will be based on the percentage not the dollar amount (e.g. if you choose $50 which is currently 1% of your total liquidity position then we will set a gas ceiling of 1%).\" />\n            </Subtitle>\n            <PercentageInputGroup\n              color=\"primary\"\n              width={280}\n              amount={position.liquidity}\n              percentage={form.gasCeiling}\n              onChange={(percentage) => {\n                setForm({ ...form, gasCeiling: percentage });\n              }}\n              onError={(percentage) =>\n                gasCeilingInputError(networkId, percentage, position.liquidity)\n              }\n            />\n          </GasCeiling>\n          <Expires>\n            <Subtitle>Expires In</Subtitle>\n            <Headline3>{`${AUTOMATION_EXPIRATION_IN_DAYS} Days`}</Headline3>\n          </Expires>\n        </Flex>\n      )}\n    </Container>\n  );\n};\n\nexport default RemoveLiquidityEdit;\n","import ApproveOnChainBtn from \"@/components/Button/ApproveOnChainBtn\";\nimport SignPayloadBtn from \"@/components/Button/SignPayloadBtn\";\nimport SignPositionPermitBtn from \"@/components/Button/SignPositionPermitBtn\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport {\n  createTrigger,\n  getCreateTriggerFailure,\n  getTriggerType,\n  updateTrigger,\n} from \"@/helper/triggerHelper\";\nimport { useFetchAllChainUserTriggers } from \"@/hooks/useFetchAllChainUserTriggers\";\nimport { useFetchPositionPermission } from \"@/hooks/useFetchPositionPermission\";\nimport { useIfAuthorized } from \"@/hooks/useFetchUserAuthentication\";\nimport { useIsWalletContract } from \"@/hooks/useIsWalletContract\";\nimport {\n  CreateTriggerPayload,\n  PermitInfo,\n  UpdateTriggerPayload,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useEffect, useState } from \"react\";\nimport { Address } from \"viem\";\nimport { useRemoveLiquidityContext } from \"../Context\";\n\nconst PrescheduledCloseBtn: React.FC<{\n  payload: CreateTriggerPayload | UpdateTriggerPayload | undefined;\n  onClose: () => void;\n}> = ({ payload, onClose }) => {\n  const { addSnackbar } = useSnackbarV2();\n  const { mutate } = useFetchAllChainUserTriggers();\n  const { ifAuthorized } = useIfAuthorized();\n  const { data: isWalletContract } = useIsWalletContract();\n  const { position, trigger } = useRemoveLiquidityContext();\n  const {\n    data: permitStatus,\n    isLoading: isPermitLoading,\n    mutate: mutatePositionPermit,\n  } = useFetchPositionPermission(position.positionId);\n  const [permitInfo, setPermitInfo] = useState<PermitInfo>(undefined);\n  const [signedPayload, setSignedPayload] = useState<Address>(undefined);\n  const [isLoading, setIsLoading] = useState(false);\n\n  useEffect(() => {\n    if (signedPayload && payload) {\n      setIsLoading(true);\n      if (!trigger) {\n        createTrigger(\n          payload as CreateTriggerPayload,\n          signedPayload,\n          permitInfo\n        )\n          .then((res) => {\n            if (res === \"Success\") {\n              const type = getTriggerType(payload);\n              mutatePositionPermit().then(() => {\n                mutate();\n              });\n              addSnackbar({\n                info: `You have successfully set up a ${type.toLowerCase()}-based trigger to close your ${\n                  position.tokenA.ticker\n                }-${position.tokenB.ticker} position.`,\n                status: \"completed\",\n              });\n              onClose();\n              setIsLoading(false);\n            }\n          })\n          .catch((err) => {\n            addSnackbar({\n              info:\n                \"Your prescheduled close request has failed: \" +\n                getCreateTriggerFailure(err),\n              status: \"failed\",\n            });\n            setIsLoading(false);\n          });\n      } else {\n        updateTrigger(payload as UpdateTriggerPayload, signedPayload)\n          .then((res) => {\n            if (res === \"Success\") {\n              const type = getTriggerType(trigger);\n              mutatePositionPermit().then(() => {\n                mutate();\n              });\n              addSnackbar({\n                info: `You have successfully updated your ${type.toLowerCase()} trigger for the ${\n                  position.tokenA.ticker\n                }-${position.tokenB.ticker} position closure.`,\n                status: \"completed\",\n              });\n              onClose();\n              setIsLoading(false);\n            }\n          })\n          .catch((err) => {\n            addSnackbar({\n              info: \"Your prescheduled close update request has failed: \" + err,\n              status: \"failed\",\n            });\n            setIsLoading(false);\n          });\n      }\n    }\n  }, [signedPayload]);\n\n  return ifAuthorized || isPermitLoading || permitStatus || permitInfo ? (\n    <SignPayloadBtn\n      text=\"Confirm Prescheduled Close Intent\"\n      color=\"secondary\"\n      isLoading={isLoading}\n      {...{ payload, setSignedPayload }}\n    />\n  ) : isWalletContract ? (\n    <ApproveOnChainBtn\n      text=\"Approve on-chain\"\n      color=\"secondary\"\n      tokenPair={`${position.tokenA.ticker}-${position.tokenB.ticker}`}\n      positionIdBN={position.positionIdBN}\n      onApproved={mutatePositionPermit}\n    />\n  ) : (\n    <SignPositionPermitBtn\n      color=\"secondary\"\n      tokenPair={`${position.tokenA.ticker}-${position.tokenB.ticker}`}\n      positionId={position.positionIdBN}\n      setPermitInfo={(permitInfo: PermitInfo) =>\n        setPermitInfo({\n          signature: permitInfo.signature,\n          deadline: String(permitInfo.deadline),\n        })\n      }\n    />\n  );\n};\n\nexport default PrescheduledCloseBtn;\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport { getRemovePositionRequest } from \"@/helper/positionHelper\";\nimport { usePositionSnackBar } from \"@/hooks/snackbar/usePositionSnackbar\";\nimport { useSendTransactionWithGas } from \"@/hooks/wagmi/useSendTransactionWithGas\";\nimport { calculateGasMargin } from \"@/utils/helper\";\nimport { numberToPercent } from \"@/utils/routing/utils/slippage\";\nimport { Button, Spinner } from \"@aperture/uikit\";\nimport { getLogger } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { EstimateGasExecutionError } from \"viem\";\nimport { useAccount } from \"wagmi\";\nimport { useRemoveLiquidityContext } from \"../Context\";\n\nexport const SpinnerWrapper = styled.div`\n  margin: auto;\n`;\n\nconst RemoveLPBtn: React.FC<{\n  onClose: () => void;\n}> = ({ onClose }) => {\n  const { address } = useAccount();\n  const { ammEnum, networkId, publicClient } = useNetwork();\n  const [txRequest, setTxRequest] = useState<any>(undefined);\n  const { addSnackbar } = useSnackbarV2();\n  const { addPositionSnackbar } = usePositionSnackBar();\n  const { position, form, txForm, error, setError } =\n    useRemoveLiquidityContext();\n  const { ready, data, sendTransaction, isError, isPending, isSuccess } =\n    useSendTransactionWithGas(txRequest);\n\n  useEffect(() => {\n    setError(undefined);\n    getRemovePositionRequest(\n      address!,\n      ammEnum,\n      networkId,\n      position.positionId,\n      numberToPercent(form.removePercentage),\n      numberToPercent(txForm.slippage),\n      Number(txForm.deadline),\n      publicClient,\n      form.useNative\n    )\n      .then((tx) => {\n        publicClient\n          .estimateGas({\n            ...tx,\n            account: address,\n          })\n          .then((gas) => {\n            setTxRequest({ ...tx, gas: calculateGasMargin(gas) });\n          })\n          .catch((gasError) => {\n            const error = gasError as EstimateGasExecutionError;\n            getLogger().error(\n              \"RemoveLiquidity.RemoveLPBtn.RemoveLiquidityTx.EstimateGasError \",\n              {\n                error: error.message,\n              }\n            );\n            setError(error.details);\n          });\n      })\n      .catch((error: any) => {\n        setError(error.message.split(\";\")[0]);\n        console.log(error);\n        getLogger().error(\n          \"RemoveLiquidity.RemoveLPBtn.getRemovePositionRequest.Error \",\n          {\n            ammEnum,\n            networkId,\n            walletAddress: address,\n            positionId: position.positionId,\n            removePercentage: form.removePercentage,\n            slippage: txForm.slippage,\n            useNative: form.useNative,\n            error: error?.message,\n          }\n        );\n      });\n  }, [txForm]);\n\n  useEffect(() => {\n    // when is error, send error message to snack bar\n    if (isError) {\n      addSnackbar({\n        info: \"Your remove liquidity request has failed.\",\n        status: \"failed\",\n      });\n    }\n  }, [isError]);\n\n  useEffect(() => {\n    // when is success, send success message to snack bar\n    if (data && isSuccess) {\n      addPositionSnackbar({\n        info: \"Your remove liquidity request has been sent.\",\n        status: \"completed\",\n        url: undefined,\n        transaction: {\n          hash: data,\n          successMsg:\n            form.removePercentage === 1\n              ? `You have successfully closed your ${position.tokenA.ticker}-${position.tokenB.ticker} position.`\n              : `You have successfully removed liquidity from your ${position.tokenA.ticker}-${position.tokenB.ticker} position.`,\n        },\n      });\n      onClose();\n    }\n  }, [isSuccess]);\n\n  return (\n    <Button\n      onClick={() => sendTransaction?.()}\n      disabled={!txRequest || !ready || !!error || isPending || isSuccess}\n      variant=\"contained\"\n      color=\"secondary\"\n      size=\"lg\"\n      width=\"100%\"\n    >\n      {error ? (\n        error\n      ) : isPending ? (\n        <SpinnerWrapper>\n          <Spinner />\n        </SpinnerWrapper>\n      ) : (\n        \"Confirm Remove Liquidity\"\n      )}\n    </Button>\n  );\n};\n\nexport default RemoveLPBtn;\n","import { UnstakePositionBtn } from \"@/components/Button/StakePositionBtn\";\nimport { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport { useGlobalSlippage } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\n\nimport { useFetchStakePositionsIds } from \"@/hooks/useFetchStakePositionsIds\";\nimport { DEFAULT_SLIPPAGE, WARNING_SLIPPAGE } from \"@/utils/helper\";\nimport { isManta } from \"@/utils/networkHelper\";\nimport { Title, TitleText } from \"@/views/style\";\nimport {\n  Button,\n  DRAWER_CONTENT_WIDTH,\n  DrawerTitle,\n  FlexColumn,\n  Headline5,\n  SelectMenuTab,\n  TransactionSettings,\n} from \"@aperture/uikit\";\nimport styled from \"styled-components\";\nimport { IMode } from \"..\";\nimport { IRemoveLiquidityTab, useRemoveLiquidityContext } from \"../Context\";\nimport PrescheduledCloseBtn from \"./PrescheduledCloseBtn\";\nimport RemoveLPBtn from \"./RemoveLPBtn\";\n\nconst Container = styled(FlexColumn)`\n  height: 100%;\n  gap: ${({ theme }) => theme.spacing[\"2xl\"]};\n`;\n\nconst StyledSelectMenuTab = styled(SelectMenuTab)<{ maxWidth: number }>`\n  height: 40px;\n  max-width: ${({ maxWidth }) => maxWidth}px;\n`;\n\nconst Wrapper = styled.div<{ mode: string }>`\n  overflow-x: hidden;\n  overflow-y: auto;\n  scrollbar-width: none;\n  height: ${({ mode }) =>\n    mode === \"edit\" ? \"calc(100% - 168px)\" : \"calc(100% - 156px)\"};\n`;\n\nconst Content = styled.div`\n  width: ${DRAWER_CONTENT_WIDTH};\n`;\n\nconst ButtonsContainer = styled.div`\n  padding-bottom: 24px;\n  display: flex;\n  align-items: center;\n  width: ${DRAWER_CONTENT_WIDTH};\n  justify-content: flex-end;\n  box-sizing: border-box;\n  gap: 18px;\n`;\n\nconst RemoveLiquidityLayout: React.FC<{\n  mode: string;\n  children: React.ReactNode;\n  onClose: () => void;\n  onModeChange: (mode: IMode) => void;\n}> = ({ mode, children, onClose, onModeChange }) => {\n  const { networkId } = useNetwork();\n  const { globalSlippage, setGlobalSlippage } = useGlobalSlippage();\n  const {\n    tab,\n    position,\n    error,\n    txForm,\n    isPrescheduleBtnDisabled,\n    prescheduledPayload,\n    setTab,\n    setTxForm,\n  } = useRemoveLiquidityContext();\n  const { mutate: mutateStakePositionIds } = useFetchStakePositionsIds();\n  const { stakePool, staked, setStaked } = useUnstakePositionContext();\n\n  const isModePreview = mode === \"preview\";\n  const isModeEdit = mode === \"edit\";\n  const isTabRemoveLP = tab === \"Remove Liquidity\";\n  const isTabRemoveLPTrigger = tab === \"Prescheduled Position Close\";\n\n  return (\n    <Container>\n      <Title>\n        <DrawerTitle\n          onClick={() => {\n            isModeEdit ? onClose() : onModeChange(\"edit\");\n          }}\n          isDrawer\n        >\n          <Headline5 fontWeight={500} textAlign={\"end\"}>\n            Back to Dashboard\n          </Headline5>\n        </DrawerTitle>\n      </Title>\n      {isModePreview && (\n        <TitleText>\n          {isTabRemoveLP\n            ? \"Preview Remove Liquidity\"\n            : \"Preview Prescheduled Close Intent\"}\n        </TitleText>\n      )}\n      {isModeEdit && <TitleText>Remove Liquidity</TitleText>}\n      {isModeEdit && (\n        <StyledSelectMenuTab\n          maxWidth={396}\n          containerPadding={\"2px\"}\n          menu={[\"Remove Liquidity\", \"Prescheduled Position Close\"]}\n          isPro={[false, true]}\n          selectWidth={[150, 225]}\n          itemsWidth={[156, 228]}\n          defaultSelected={[\n            \"Remove Liquidity\",\n            \"Prescheduled Position Close\",\n          ].indexOf(tab)}\n          onSelect={(value: IRemoveLiquidityTab) => {\n            setTab(value);\n          }}\n        />\n      )}\n      <Wrapper mode={mode}>\n        <Content>{children}</Content>\n      </Wrapper>\n      {!(isTabRemoveLPTrigger && isManta(networkId)) && (\n        <ButtonsContainer>\n          <TransactionSettings\n            defaultSlippage={DEFAULT_SLIPPAGE}\n            globalSlippage={globalSlippage}\n            warningSlippage={WARNING_SLIPPAGE}\n            settingsForm={txForm}\n            dropdownPosition=\"topRight\"\n            onFormChange={(form) => setTxForm(form)}\n            buttonSize={\"small\"}\n            setGlobalSlippage={(value) =>\n              setGlobalSlippage((prev) => ({ ...prev, [networkId]: value }))\n            }\n          />\n          <Button\n            variant=\"contained\"\n            color=\"default\"\n            size=\"lg\"\n            width=\"100%\"\n            onClick={() => {\n              isModeEdit ? onClose() : onModeChange(\"edit\");\n            }}\n          >\n            Cancel\n          </Button>\n          {isModeEdit &&\n            (stakePool && staked ? (\n              <UnstakePositionBtn\n                key={position.positionId}\n                atStake={staked}\n                gaugeAddress={stakePool.gaugeAddress}\n                positionId={position.positionIdBN}\n                handleTxSuccess={() => {\n                  setStaked(false);\n                  mutateStakePositionIds();\n                }}\n              />\n            ) : (\n              <Button\n                variant=\"contained\"\n                color=\"secondary\"\n                size=\"lg\"\n                width=\"100%\"\n                disabled={!!error || isPrescheduleBtnDisabled}\n                onClick={() => {\n                  onModeChange(\"preview\");\n                }}\n              >\n                {error\n                  ? error\n                  : isTabRemoveLP\n                  ? \"Remove Liquidity\"\n                  : \"Preschedule Position Close\"}\n              </Button>\n            ))}\n          {isModePreview &&\n            (isTabRemoveLP ? (\n              <RemoveLPBtn onClose={onClose} />\n            ) : (\n              <PrescheduledCloseBtn\n                payload={prescheduledPayload}\n                onClose={onClose}\n              />\n            ))}\n        </ButtonsContainer>\n      )}\n    </Container>\n  );\n};\n\nexport default RemoveLiquidityLayout;\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { getTicker } from \"@/helper/tokenHelper\";\nimport { DEFAULT_APERTURE_FEE } from \"@/utils/helper\";\nimport { formatUSDAmount } from \"@/utils/numberFormat\";\nimport {\n  CommonContainer,\n  Container,\n  DividerHorizontal,\n  OtherInfo,\n  Row,\n  TimeZone,\n  RowTitle as Title,\n} from \"@/views/style\";\nimport { AccessoryIcons } from \"@aperture/assetkit\";\nimport {\n  FeeInfoCard,\n  FlexColumn,\n  Headline3,\n  Headline5,\n  QuestionPopover,\n  TokenInfo,\n  TriggerSetupPreview,\n} from \"@aperture/uikit\";\nimport { AUTOMATION_EXPIRATION_IN_DAYS } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport bigDecimal from \"js-big-decimal\";\nimport moment from \"moment\";\nimport momentTimeZone from \"moment-timezone\";\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport { useRemoveLiquidityContext } from \"../Context\";\nimport { Amount, Hint, Subtitle } from \"../RemoveLiquidityEdit/style\";\n\nconst EarnedValue = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.lg};\n`;\n\nexport const StyledCommonContainer = styled(CommonContainer)<{ gap: number }>`\n  display: flex;\n  flex-direction: column;\n  gap: ${({ gap }) => gap}px;\n`;\n\nconst RemoveLiquidityPreview: React.FC = () => {\n  const { ammEnum, networkId } = useNetwork();\n  const timeZone = momentTimeZone.tz.guess();\n  const {\n    tab,\n    position,\n    tokenPair,\n    tokenPrice,\n    estimatedAmounts,\n    estimatedLiquidity,\n    trigger,\n    form,\n  } = useRemoveLiquidityContext();\n\n  return (\n    <Container>\n      {tab === \"Remove Liquidity\" ? (\n        <StyledCommonContainer gap={12}>\n          <Subtitle>Remove Liquidity</Subtitle>\n          <Headline3 fontSize={32} lineHeight={\"37.5px\"}>\n            {bigDecimal.multiply(form.removePercentage, 100)}%\n          </Headline3>\n        </StyledCommonContainer>\n      ) : (\n        <TriggerSetupPreview\n          form={form.trigger}\n          tokens={[position.tokenA, position.tokenB]}\n        />\n      )}\n      {tab === \"Remove Liquidity\" && (\n        <>\n          <DividerHorizontal />\n          <StyledCommonContainer gap={12}>\n            <Subtitle>Projected Amount To Receive</Subtitle>\n            <Amount fontSize={32} lineHeight={\"37.5px\"} marginBottom={0}>\n              {formatUSDAmount(\n                position.liquidity === \"-\"\n                  ? \"-\"\n                  : bigDecimal.add(\n                      bigDecimal.multiply(\n                        position.liquidity,\n                        form.removePercentage\n                      ),\n                      position.feeAmount\n                    )\n              )}\n            </Amount>\n            {tokenPair.map((token, index) => (\n              <TokenInfo\n                key={token.address}\n                Icon={token.Icon}\n                ticker={`Pooled ${getTicker(\n                  token.ticker,\n                  networkId,\n                  form.useNative\n                )}`}\n                address={token.address}\n                native={token.native}\n                decimals={token.decimals}\n                amount={bigDecimal.multiply(\n                  token.amount,\n                  form.removePercentage\n                )}\n                price={tokenPrice[index]}\n                marginBottom={0}\n                maxWidth={999}\n              />\n            ))}\n            <EarnedValue>\n              {tokenPair.map((token, index) => (\n                <TokenInfo\n                  key={token.address}\n                  Icon={token.Icon}\n                  ticker={`${getTicker(\n                    token.ticker,\n                    networkId,\n                    form.useNative\n                  )} Fees Earned`}\n                  address={token.address}\n                  native={token.native}\n                  decimals={token.decimals}\n                  amount={token.collectableAmount}\n                  price={tokenPrice[index]}\n                  marginBottom={0}\n                  maxWidth={999}\n                />\n              ))}\n              {tab === \"Remove Liquidity\" && (\n                <Hint>\n                  <AccessoryIcons.InfoIcon />\n                  All accrued fees will be collected when removing liquidity.\n                </Hint>\n              )}\n            </EarnedValue>\n          </StyledCommonContainer>\n        </>\n      )}\n\n      {tab === \"Prescheduled Position Close\" && (\n        <StyledCommonContainer gap={8}>\n          <Subtitle lineHeight={\"20px\"}>\n            <span>Current Value (If Closed Now)</span>\n            <QuestionPopover content=\"Actual amount received will depend on future asset prices at the time of closure.\" />\n          </Subtitle>\n          <Amount fontSize={32} lineHeight={\"37.gpx\"} marginBottom={0}>\n            {formatUSDAmount(\n              bigDecimal.add(estimatedLiquidity, position.feeAmount)\n            )}\n          </Amount>\n          {tokenPair.map((token, index) => (\n            <TokenInfo\n              key={token.address}\n              Icon={token.Icon}\n              ticker={token.ticker}\n              address={token.address}\n              native={token.native}\n              decimals={token.decimals}\n              amount={bigDecimal.add(\n                estimatedAmounts[index],\n                token.collectableAmount\n              )}\n              price={tokenPrice[index]}\n              marginBottom={0}\n              maxWidth={999}\n            />\n          ))}\n        </StyledCommonContainer>\n      )}\n\n      {tab === \"Prescheduled Position Close\" && (\n        <>\n          <DividerHorizontal />\n          <OtherInfo>\n            <Row>\n              <Title lineHeight={\"20px\"}>Gas Ceiling</Title>\n              <Headline5 lineHeight={\"20px\"}>\n                {bigDecimal.multiply(form.gasCeiling, 100)}% of the position\n              </Headline5>\n            </Row>\n            <FlexColumn gap={\"xl\"}>\n              <Row>\n                <Title lineHeight={\"20px\"}>Trigger Expiration</Title>\n                <Headline5 lineHeight={\"20px\"}>\n                  {moment()\n                    .add(AUTOMATION_EXPIRATION_IN_DAYS, \"days\")\n                    .format(\"MMM Do, YYYY\")}{\" \"}\n                  {`(${AUTOMATION_EXPIRATION_IN_DAYS} Days)`}\n                </Headline5>\n              </Row>\n              <TimeZone>\n                {`${timeZone} (GMT${momentTimeZone.tz(timeZone).format(\"Z\")})`}\n              </TimeZone>\n            </FlexColumn>\n            {!trigger && (\n              <FeeInfoCard\n                styles={{ size: \"lg\" }}\n                amm={ammEnum}\n                feeInfo={{\n                  fee: DEFAULT_APERTURE_FEE,\n                  amount: bigDecimal.add(\n                    position.liquidity,\n                    position.feeAmount\n                  ),\n                }}\n                hint={`${\n                  DEFAULT_APERTURE_FEE * 100\n                }% of the closed position size.`}\n              />\n            )}\n          </OtherInfo>\n        </>\n      )}\n    </Container>\n  );\n};\n\nexport default RemoveLiquidityPreview;\n","import { IPositionDetails } from \"@/config/position/positionConfig\";\nimport { TriggerItem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport React, { useCallback, useState } from \"react\";\nimport { GotoType } from \"../types\";\nimport { RemoveLiquidityProvider } from \"./Context\";\nimport RemoveLiquidityEdit from \"./RemoveLiquidityEdit\";\nimport RemoveLiquidityLayout from \"./RemoveLiquidityLayout\";\nimport RemoveLiquidityPreview from \"./RemoveLiquidityPreview\";\n\nexport type IMode = \"edit\" | \"preview\";\n\nexport const RemoveLiquidity: React.FC<{\n  details: IPositionDetails;\n  goto: GotoType;\n  tabs: 0 | 1;\n  trigger: TriggerItem | undefined;\n}> = ({ details, goto, tabs, trigger }) => {\n  const [mode, setMode] = useState<IMode>(\"edit\");\n  const goToDetails = useCallback(() => goto.details(), [goto]);\n\n  return (\n    <RemoveLiquidityProvider {...{ tabs, position: details, trigger }}>\n      <RemoveLiquidityLayout\n        mode={mode}\n        onClose={goToDetails}\n        onModeChange={(mode: IMode) => setMode(mode)}\n      >\n        {mode === \"edit\" && <RemoveLiquidityEdit />}\n        {mode === \"preview\" && <RemoveLiquidityPreview />}\n      </RemoveLiquidityLayout>\n    </RemoveLiquidityProvider>\n  );\n};\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { usePositionSnackBar } from \"@/hooks/snackbar/usePositionSnackbar\";\nimport { useSendTransactionWithGas } from \"@/hooks/wagmi/useSendTransactionWithGas\";\nimport { calculateGasMargin } from \"@/utils/helper\";\nimport { formatUSDAmount } from \"@/utils/numberFormat\";\nimport { Button, ClaimFeeToken, Spinner } from \"@aperture/uikit\";\nimport { getLogger, viem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { Color } from \"@ui/components/Button/types\";\nimport { useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { EstimateGasExecutionError } from \"viem\";\nimport { useAccount } from \"wagmi\";\nimport { useSnackbarV2 } from \"../SnackbarContext/SnackbarContextV2\";\n\nconst StyledButton = styled(Button)`\n  font-size: 16px;\n  line-height: 20px;\n`;\n\nconst CollectFeeBtn: React.FC<{\n  total: string;\n  tokenInfo: ClaimFeeToken[];\n  onClose: () => void;\n  positionId: bigint;\n  color?: Color;\n}> = ({ total, tokenInfo, positionId, onClose, color = \"primary\" }) => {\n  const { address } = useAccount();\n  const { ammEnum, networkId, publicClient } = useNetwork();\n  const { addSnackbar } = useSnackbarV2();\n  const { addPositionSnackbar } = usePositionSnackBar();\n  const [txRequest, setTxRequest] = useState<any>(undefined);\n  const [errorMsg, setErrorMsg] = useState(undefined);\n\n  useEffect(() => {\n    setErrorMsg(undefined);\n    viem\n      .getCollectTx(positionId, address!, networkId, ammEnum, publicClient)\n      .then((tx) => {\n        publicClient\n          .estimateGas({\n            ...tx,\n            account: address,\n          })\n          .then((gas) => {\n            setTxRequest({ ...tx, gas: calculateGasMargin(gas) });\n          })\n          .catch((gasError) => {\n            const error = gasError as EstimateGasExecutionError;\n            getLogger().error(\"Failed to estimate gas on CollectTx: \", {\n              error: JSON.stringify(error.message),\n            });\n            setErrorMsg(error.details);\n          });\n      })\n      .catch((error: any) => {\n        getLogger().error(\"Failed to getCollectTx: \", {\n          ammEnum,\n          networkId,\n          address,\n          positionId,\n          error: JSON.stringify(error),\n        });\n        setErrorMsg(error.message.split(\";\")[0]);\n      });\n  }, [networkId, address]);\n\n  const { ready, data, sendTransaction, isError, isPending, isSuccess } =\n    useSendTransactionWithGas(txRequest);\n\n  useEffect(() => {\n    if (isError) {\n      addSnackbar({\n        info: \"Your collect fee request has failed.\",\n        status: \"failed\",\n      });\n    }\n  }, [isError]);\n\n  useEffect(() => {\n    if (isSuccess && data) {\n      addPositionSnackbar({\n        info: \"Your collect fee request has been sent.\",\n        status: \"completed\",\n        url: undefined,\n        transaction: {\n          hash: data,\n          successMsg: `You have successfully collected ${formatUSDAmount(\n            total\n          )} fees from your ${tokenInfo[0].ticker}-${\n            tokenInfo[1].ticker\n          } position.`,\n        },\n      });\n      onClose();\n    }\n  }, [isSuccess]);\n\n  return (\n    <StyledButton\n      onClick={() => sendTransaction?.()}\n      disabled={!txRequest || !ready || errorMsg || isPending || isSuccess}\n      variant=\"contained\"\n      color={color}\n      size=\"lg\"\n      width=\"100%\"\n    >\n      {errorMsg ? errorMsg : isPending ? <Spinner /> : \"Collect\"}\n    </StyledButton>\n  );\n};\n\nexport default CollectFeeBtn;\n","import { UnstakePositionBtn } from \"@/components/Button/StakePositionBtn\";\n\nimport { useFetchStakePositionsIds } from \"@/hooks/useFetchStakePositionsIds\";\nimport { Button, ClaimFeeContent, ClaimFeeProps } from \"@aperture/uikit\";\nimport { viem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useState } from \"react\";\nimport styled from \"styled-components\";\nimport CollectFeeBtn from \"../Button/CollectFeeBtn\";\n\ninterface ClaimFeeModalProps extends ClaimFeeProps {\n  positionId: bigint;\n  stakePool?: viem.SlipStreamPool;\n  staked?: boolean;\n  setStaked?: React.Dispatch<React.SetStateAction<boolean>>;\n  onClose: () => void;\n}\nconst ButtonWrapper = styled.div`\n  display: flex;\n  margin-top: 16px;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\n\nconst StyledButton = styled(Button)`\n  font-size: 16px;\n  line-height: 20px;\n`;\n\nexport const ClaimFeeModal: React.FC<ClaimFeeModalProps> = ({\n  total,\n  tokenInfo,\n  positionId,\n  stakePool,\n  staked,\n  setStaked,\n  onClose,\n}) => {\n  const { mutate: mutateStakePositionIds } = useFetchStakePositionsIds();\n  const [stakeStatus, setStakeStatus] = useState(staked);\n  return (\n    <>\n      <ClaimFeeContent total={total} tokenInfo={tokenInfo} />\n      <ButtonWrapper>\n        <StyledButton\n          width=\"100%\"\n          variant=\"contained\"\n          color=\"default\"\n          size=\"lg\"\n          onClick={onClose}\n        >\n          Cancel\n        </StyledButton>\n        {stakePool && staked && stakeStatus ? (\n          <UnstakePositionBtn\n            key={positionId.toString()}\n            atStake={staked}\n            gaugeAddress={stakePool.gaugeAddress}\n            positionId={positionId}\n            handleTxSuccess={() => {\n              setStaked(false);\n              setStakeStatus(false);\n              mutateStakePositionIds();\n            }}\n          />\n        ) : (\n          <CollectFeeBtn\n            color=\"secondary\"\n            {...{ total, tokenInfo, positionId, onClose }}\n          />\n        )}\n      </ButtonWrapper>\n    </>\n  );\n};\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { getDeadlineWithMins } from \"@/helper/deadlineHelper\";\nimport { usePositionSnackBar } from \"@/hooks/snackbar/usePositionSnackbar\";\nimport { useSendTransactionWithGas } from \"@/hooks/wagmi/useSendTransactionWithGas\";\nimport { calculateGasMargin } from \"@/utils/helper\";\nimport { numberToPercent } from \"@/utils/routing/utils/slippage\";\nimport { Button, ITransactionSettingsForm, Spinner } from \"@aperture/uikit\";\nimport {\n  getLogger,\n  PermitInfo,\n  viem,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { Color } from \"@ui/components/Button/types\";\nimport bigDecimal from \"js-big-decimal\";\nimport { useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { EstimateGasExecutionError } from \"viem\";\nimport { useAccount } from \"wagmi\";\nimport { useSnackbarV2 } from \"../SnackbarContext/SnackbarContextV2\";\n\nconst StyledButton = styled(Button)`\n  font-size: 16px;\n  line-height: 20px;\n`;\n\nconst ReinvestBtn: React.FC<{\n  positionId: bigint;\n  feeAmount: string;\n  tokenPair: string;\n  txForm: ITransactionSettingsForm;\n  permitInfo: PermitInfo | undefined;\n  setProjectedAmount: React.Dispatch<\n    React.SetStateAction<{\n      amount0: string;\n      amount1: string;\n    }>\n  >;\n  onClose: () => void;\n  color?: Color;\n}> = ({\n  positionId,\n  feeAmount,\n  tokenPair,\n  txForm,\n  permitInfo,\n  setProjectedAmount,\n  onClose,\n  color = \"primary\",\n}) => {\n  const { address } = useAccount();\n  const { ammEnum, networkId, publicClient } = useNetwork();\n  const { addSnackbar } = useSnackbarV2();\n  const [txRequest, setTxRequest] = useState<any>(undefined);\n  const [errorMsg, setErrorMsg] = useState(undefined);\n  const { addPositionSnackbar } = usePositionSnackBar();\n\n  useEffect(() => {\n    setErrorMsg(undefined);\n    viem\n      .getReinvestNoNeedSwapTx(\n        networkId,\n        ammEnum,\n        address,\n        positionId,\n        numberToPercent(txForm.slippage),\n        BigInt(\n          getDeadlineWithMins(\n            Number(txForm.deadline) === 0 || txForm.deadline === \"\"\n              ? 30\n              : Number(txForm.deadline)\n          )\n        ),\n        publicClient,\n        permitInfo\n      )\n      .then(({ tx, amounts }) => {\n        setProjectedAmount({\n          amount0: amounts.amount0.toString(),\n          amount1: amounts.amount1.toString(),\n        });\n\n        publicClient\n          .estimateGas({\n            ...tx,\n            account: address,\n          })\n          .then((gas) => {\n            setTxRequest({ ...tx, gas: calculateGasMargin(gas) });\n          })\n          .catch((gasError) => {\n            const error = gasError as EstimateGasExecutionError;\n            getLogger().error(\"Failed to estimate gas on ReinvestTx: \", {\n              error: JSON.stringify(error.message),\n            });\n            setErrorMsg(error.details);\n          });\n      })\n      .catch((error) => {\n        getLogger().error(\"Failed to getReinvestTx: \", {\n          ammEnum,\n          networkId,\n          address,\n          positionId,\n          slippage: txForm.slippage,\n          error: JSON.stringify(error),\n        });\n        if (\n          bigDecimal.compareTo(feeAmount === \"-\" ? \"0\" : feeAmount, \"0.01\") < 1\n        ) {\n          setErrorMsg(\"Amount to be reinvested is too small\");\n        } else setErrorMsg(error.details);\n      });\n  }, [txForm]);\n\n  const { ready, data, sendTransaction, isError, isPending, isSuccess } =\n    useSendTransactionWithGas(txRequest);\n\n  useEffect(() => {\n    if (isError) {\n      addSnackbar({\n        info: \"Your reinvest unclaimed fees request has failed.\",\n        status: \"failed\",\n      });\n    }\n  }, [isError]);\n\n  useEffect(() => {\n    if (isSuccess && data) {\n      addPositionSnackbar({\n        info: \"Your reinvest unclaimed fees request has been sent.\",\n        status: \"completed\",\n        url: undefined,\n        transaction: {\n          hash: data,\n          successMsg: `You have successfully reinvested unclaimed fees to your ${tokenPair} position.`,\n        },\n      });\n      onClose();\n    }\n  }, [isSuccess]);\n\n  return (\n    <StyledButton\n      onClick={() => sendTransaction?.()}\n      disabled={!txRequest || !ready || errorMsg || isPending || isSuccess}\n      variant=\"contained\"\n      color={color}\n      size=\"lg\"\n      width=\"252px\"\n    >\n      {errorMsg ? errorMsg : isPending ? <Spinner /> : \"Reinvest\"}\n    </StyledButton>\n  );\n};\n\nexport default ReinvestBtn;\n","import ApproveOnChainBtn from \"@/components/Button/ApproveOnChainBtn\";\nimport ReinvestBtn from \"@/components/Button/ReinvestBtn\";\nimport SignPositionPermitBtn from \"@/components/Button/SignPositionPermitBtn\";\nimport { useFetchPositionPermission } from \"@/hooks/useFetchPositionPermission\";\nimport { useIfAuthorized } from \"@/hooks/useFetchUserAuthentication\";\nimport { useIsWalletContract } from \"@/hooks/useIsWalletContract\";\nimport { ITransactionSettingsForm } from \"@aperture/uikit\";\nimport { PermitInfo } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useState } from \"react\";\n\nexport const ReinvestWrapper: React.FC<{\n  positionId: string;\n  positionIdBN: bigint;\n  feeAmount: string;\n  tokenPair: string;\n  txForm: ITransactionSettingsForm;\n  setProjectedAmount: React.Dispatch<\n    React.SetStateAction<{\n      amount0: string;\n      amount1: string;\n    }>\n  >;\n  onClose: () => void;\n  signPositionPermitBtnText?: string;\n}> = ({\n  positionId,\n  positionIdBN,\n  feeAmount,\n  tokenPair,\n  txForm,\n  setProjectedAmount,\n  onClose,\n  signPositionPermitBtnText = \"Sign Position Permit\",\n}) => {\n  const { ifAuthorized } = useIfAuthorized();\n  const { data: isWalletContract } = useIsWalletContract();\n  const {\n    data: permitStatus,\n    isLoading: isPermitLoading,\n    mutate: mutatePositionPermit,\n  } = useFetchPositionPermission(positionId);\n\n  const [permitInfo, setPermitInfo] = useState<PermitInfo | undefined>(\n    undefined\n  );\n\n  return (\n    <>\n      {ifAuthorized ||\n      (isWalletContract && (isPermitLoading || permitStatus)) ||\n      permitInfo ? (\n        <ReinvestBtn\n          color=\"secondary\"\n          positionId={positionIdBN}\n          feeAmount={feeAmount}\n          tokenPair={tokenPair}\n          txForm={txForm}\n          permitInfo={permitInfo}\n          setProjectedAmount={setProjectedAmount}\n          onClose={onClose}\n        />\n      ) : isWalletContract ? (\n        <ApproveOnChainBtn\n          text=\"Approve on-chain\"\n          color=\"secondary\"\n          tokenPair={tokenPair}\n          positionIdBN={positionIdBN}\n          onApproved={mutatePositionPermit}\n        />\n      ) : (\n        <SignPositionPermitBtn\n          color=\"secondary\"\n          positionId={BigInt(positionId)}\n          tokenPair={tokenPair}\n          setPermitInfo={setPermitInfo}\n        >\n          {signPositionPermitBtnText}\n        </SignPositionPermitBtn>\n      )}\n    </>\n  );\n};\n","import { UnstakePositionBtn } from \"@/components/Button/StakePositionBtn\";\nimport { useGlobalSlippage } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\n\nimport { ITokenInfo } from \"@/config/position/positionConfig\";\nimport { getTokenPercentages } from \"@/helper/tokenHelper\";\nimport { useOnNetworkAccountChange } from \"@/hooks/globalState/useOnNetworkAccountChange\";\nimport { useFetchStakePositionsIds } from \"@/hooks/useFetchStakePositionsIds\";\nimport {\n  DEFAULT_APERTURE_REINVEST_FEE,\n  DEFAULT_SLIPPAGE,\n} from \"@/utils/helper\";\nimport { ReinvestWrapper } from \"@/views/PositionDetails/ReinvestWrapper\";\nimport {\n  Button,\n  ITransactionSettingsForm,\n  ReinvestFeesContent,\n  TransactionSettings,\n} from \"@aperture/uikit\";\nimport { getLogger, viem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport bigDecimal from \"js-big-decimal\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { formatUnits } from \"viem\";\nimport { useAccount } from \"wagmi\";\n\nconst ButtonWrapper = styled.div`\n  display: flex;\n  width: 100%;\n  padding-top: 24px;\n  align-items: center;\n  justify-content: flex-end;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\n\nconst StyledButton = styled(Button)`\n  font-size: 16px;\n  line-height: 20px;\n`;\n\nexport const ReinvestFeesModal: React.FC<{\n  positionId: string;\n  positionIdBN: bigint;\n  liquidity: string;\n  feeAmount: string;\n  tokens: [ITokenInfo, ITokenInfo];\n  tokenPrices: [string, string];\n  tokenPercentages: [string, string];\n  stakePool?: viem.SlipStreamPool;\n  staked?: boolean;\n  setStaked?: React.Dispatch<React.SetStateAction<boolean>>;\n  onClose: () => void;\n}> = ({\n  positionId,\n  positionIdBN,\n  liquidity,\n  feeAmount,\n  tokens,\n  tokenPrices,\n  tokenPercentages,\n  stakePool,\n  staked,\n  setStaked,\n  onClose,\n}) => {\n  const { address } = useAccount();\n  const { ammEnum, networkId, publicClient } = useNetwork();\n  const { globalSlippage, setGlobalSlippage } = useGlobalSlippage();\n  const { mutate: mutateStakePositionIds } = useFetchStakePositionsIds();\n  const [txForm, setTXForm] = useState<ITransactionSettingsForm>({\n    slippage: globalSlippage ?? DEFAULT_SLIPPAGE,\n    deadline: \"30\",\n  });\n  const [projectedAmount, setProjectedAmount] = useState({\n    amount0: \"0\",\n    amount1: \"0\",\n  });\n  const [stakeStatus, setStakeStatus] = useState(staked);\n\n  const newTokenAmount: [string, string] = useMemo(\n    () => [\n      bigDecimal.add(\n        tokens[0].amount,\n        formatUnits(BigInt(projectedAmount.amount0), tokens[0].decimals)\n      ),\n      bigDecimal.add(\n        tokens[1].amount,\n        formatUnits(BigInt(projectedAmount.amount1), tokens[1].decimals)\n      ),\n    ],\n    [tokens, projectedAmount]\n  );\n\n  const newPercentage = useMemo(\n    () =>\n      getTokenPercentages(\n        newTokenAmount[0],\n        newTokenAmount[1],\n        tokenPrices[0],\n        tokenPrices[1]\n      ),\n    [tokenPrices, newTokenAmount]\n  );\n\n  const newLPInUs: string = useMemo(\n    () =>\n      bigDecimal.add(\n        bigDecimal.multiply(newTokenAmount[0], tokenPrices[0]),\n        bigDecimal.multiply(newTokenAmount[1], tokenPrices[1])\n      ),\n    [tokenPrices, newTokenAmount]\n  );\n\n  useOnNetworkAccountChange(() => {\n    onClose();\n  });\n\n  useEffect(() => {\n    viem\n      .getReinvestedPosition(\n        networkId,\n        ammEnum,\n        BigInt(positionId),\n        publicClient\n      )\n      .then(([, amount0, amount1]) => {\n        setProjectedAmount({\n          amount0: amount0.toString(),\n          amount1: amount1.toString(),\n        });\n      })\n      .catch((error) => {\n        getLogger().error(\"Failed to getReinvestedPosition: \", {\n          ammEnum,\n          networkId,\n          address,\n          positionId,\n          error: JSON.stringify(error),\n        });\n      });\n  }, []);\n\n  return (\n    <>\n      <ReinvestFeesContent\n        amm={ammEnum}\n        liquidity={liquidity}\n        feeAmount={feeAmount}\n        tokens={[\n          {\n            Icon: tokens[0].Icon,\n            ticker: tokens[0].ticker,\n            amount: tokens[0].amount,\n            price: tokenPrices[0],\n            address: tokens[0].address,\n            native: tokens[0].native,\n            decimals: tokens[0].decimals,\n            tag: tokenPercentages[0],\n          },\n          {\n            Icon: tokens[1].Icon,\n            ticker: tokens[1].ticker,\n            amount: tokens[1].amount,\n            price: tokenPrices[1],\n            address: tokens[1].address,\n            native: tokens[1].native,\n            decimals: tokens[1].decimals,\n            tag: tokenPercentages[1],\n          },\n        ]}\n        unClaimedFees={[\n          tokens[0].collectableAmount,\n          tokens[1].collectableAmount,\n        ]}\n        predictedLiquidity={newLPInUs}\n        predictedProjection={[\n          {\n            amount: newTokenAmount[0],\n            percent: newPercentage.token0Percent,\n          },\n          {\n            amount: newTokenAmount[1],\n            percent: newPercentage.token1Percent,\n          },\n        ]}\n        fee={DEFAULT_APERTURE_REINVEST_FEE}\n      />\n      <ButtonWrapper>\n        <TransactionSettings\n          defaultSlippage={DEFAULT_SLIPPAGE}\n          globalSlippage={globalSlippage}\n          settingsForm={txForm}\n          dropdownPosition=\"topRight\"\n          onFormChange={(form) => {\n            setTXForm(form);\n          }}\n          buttonSize={\"small\"}\n          setGlobalSlippage={(value) =>\n            setGlobalSlippage((prev) => ({ ...prev, [networkId]: value }))\n          }\n        />\n        <StyledButton\n          width=\"252px\"\n          variant=\"contained\"\n          color=\"default\"\n          size=\"lg\"\n          onClick={onClose}\n        >\n          Cancel\n        </StyledButton>\n        {stakePool && staked && stakeStatus ? (\n          <UnstakePositionBtn\n            key={positionId}\n            atStake={staked}\n            gaugeAddress={stakePool.gaugeAddress}\n            positionId={positionIdBN}\n            handleTxSuccess={() => {\n              setStaked(false);\n              setStakeStatus(false);\n              mutateStakePositionIds();\n            }}\n          />\n        ) : (\n          <ReinvestWrapper\n            positionId={positionId}\n            positionIdBN={positionIdBN}\n            feeAmount={feeAmount}\n            tokenPair={`${tokens[0].ticker}-${tokens[1].ticker}`}\n            txForm={txForm}\n            setProjectedAmount={setProjectedAmount}\n            onClose={onClose}\n          />\n        )}\n      </ButtonWrapper>\n    </>\n  );\n};\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { useFetchStakePositionsIds } from \"@/hooks/useFetchStakePositionsIds\";\nimport { getSlipstreamAmmByNetworkId } from \"@/utils/helper\";\nimport { Button } from \"@aperture/uikit\";\nimport {\n  E_ModalKey,\n  FlexColumn,\n  StakePositionContent,\n  useModal,\n} from \"@aperture/uikitv2\";\nimport styled from \"styled-components\";\nimport {\n  StakePositionBtn,\n  UnstakePositionBtn,\n} from \"../Button/StakePositionBtn\";\nimport { useUnstakePositionContext } from \"../Context/UnstakePositionContext\";\n\nconst ButtonWrapper = styled.div`\n  display: flex;\n  margin-top: 16px;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\nconst StyledButton = styled(Button)`\n  font-size: 16px;\n  line-height: 20px;\n`;\n\nexport const StakePositionModal = () => {\n  const { setModalState } = useModal();\n  const { networkId } = useNetwork();\n  const { mutate: mutateStakePositionIds } = useFetchStakePositionsIds();\n  const { positionId, stakePool, staked, setStaked } =\n    useUnstakePositionContext();\n\n  const onClose = () => {\n    setModalState(E_ModalKey.STAKE_POSITION_MODAL, false);\n  };\n\n  const buttonProps = {\n    atStake: staked,\n    gaugeAddress: stakePool?.gaugeAddress,\n    positionId,\n    handleTxSuccess: () => {\n      setStaked(!staked);\n      mutateStakePositionIds();\n      onClose();\n    },\n  };\n  return (\n    <FlexColumn gap=\"lg\">\n      <StakePositionContent\n        amm={getSlipstreamAmmByNetworkId(networkId)}\n        atStake={staked}\n      />\n      <ButtonWrapper>\n        <StyledButton\n          width=\"100%\"\n          variant=\"contained\"\n          color=\"default\"\n          size=\"lg\"\n          onClick={onClose}\n        >\n          Cancel\n        </StyledButton>\n        {staked ? (\n          <UnstakePositionBtn\n            key={`${positionId.toString()}-unstake`}\n            {...buttonProps}\n          />\n        ) : (\n          <StakePositionBtn\n            key={`${positionId.toString()}-stake`}\n            {...buttonProps}\n          />\n        )}\n      </ButtonWrapper>\n    </FlexColumn>\n  );\n};\n","import ApproveOnChainBtn from \"@/components/Button/ApproveOnChainBtn\";\nimport SignPositionPermitBtn from \"@/components/Button/SignPositionPermitBtn\";\nimport {\n  Body1,\n  Body2,\n  Button,\n  DRAWER_CONTENT_WIDTH,\n  Flex,\n  FlexColumn,\n  Headline3,\n  RangeTag,\n  T1Regular,\n} from \"@aperture/uikit\";\nimport styled from \"styled-components\";\nimport {\n  FlexboxProps,\n  GridProps,\n  LayoutProps,\n  SpaceProps,\n  compose,\n  flexbox,\n  grid,\n  layout,\n  space,\n} from \"styled-system\";\n\nexport const Card = styled.div<\n  FlexboxProps &\n    GridProps &\n    LayoutProps &\n    SpaceProps & {\n      noBorder?: boolean;\n    }\n>`\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: row;\n  width: 100%;\n  padding: 16px;\n  gap: ${({ theme }) => theme.spacing.xl};\n  border: ${({ theme, noBorder }) =>\n    noBorder ? \"none\" : `1px solid ${theme.colors.global.line.Line2}`};\n  border-radius: ${({ theme }) => theme.radii.xl};\n  background-color: ${({ theme }) => theme.colors.global.background.BG2};\n  ${compose(flexbox, grid, layout, space)}\n`;\n\nexport const Container = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing[\"2xl\"]};\n`;\n\nexport const Wrapper = styled.div`\n  width: 100%;\n  height: calc(100vh - 216px);\n  overflow-x: hidden;\n  overflow-y: auto;\n  &::-webkit-scrollbar {\n    width: 0;\n  }\n`;\n\nexport const TitleWrapper = styled.div`\n  width: ${DRAWER_CONTENT_WIDTH};\n`;\n\nexport const Content = styled(FlexColumn)`\n  width: ${DRAWER_CONTENT_WIDTH};\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const Overview = styled.div`\n  box-sizing: border-box;\n  display: flex;\n  width: 100%;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const NFTCard = styled.div`\n  display: flex;\n  align-items: start;\n  width: 176px;\n  height: 308px;\n  img {\n    width: 176px;\n    height: 308px;\n  }\n`;\n\nexport const InfoWrapper = styled.div`\n  flex: 1;\n  width: 100%;\n  box-sizing: border-box;\n  display: flex;\n  min-width: 395px;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const Header = styled(Body1)`\n  line-height: 16px;\n  color: ${({ theme }) => theme.colors.global.text.T2};\n`;\n\nexport const LightHeader = styled(T1Regular)`\n  font-weight: 500;\n`;\n\nexport const StyledHeadline3 = styled(Headline3)`\n  line-height: 28px;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const RebalanceWrapper = styled.div`\n  margin-left: auto;\n`;\n\nexport const TokenInfoContainer = styled.div`\n  margin-top: ${({ theme }) => theme.spacing.md};\n`;\n\nexport const LeftContent = styled.div`\n  width: 215px;\n`;\n\nexport const ButtonGroupWrapper = styled.div`\n  display: flex;\n  flex-direction: column;\n  justify-content: flex-end;\n  align-items: flex-end;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\n\nexport const StyledBody2 = styled(Body2)`\n  padding: 4px;\n  line-height: 14px;\n`;\n\nexport const StyledButton = styled(Button)`\n  padding: 0;\n  width: 130px;\n  height: 20px;\n  border-radius: ${({ theme }) => theme.radii.round};\n`;\n\nexport const FeesContent = styled.div`\n  display: flex;\n  width: 100%;\n  justify-content: space-between;\n  gap: ${({ theme }) => theme.spacing.lg};\n`;\n\nexport const FeesButtonGroup = styled.div`\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: end;\n`;\n\nexport const RenableApproveOnChainBtn = styled(ApproveOnChainBtn)`\n  width: 94px;\n  height: 30px;\n  font-size: 14px;\n  padding: 8px;\n  background: ${({ theme }) => theme.colors.global.warning};\n  &:hover {\n    background: ${({ theme }) => theme.colors.global.warning};\n    opacity: 0.8;\n  }\n`;\n\nexport const ReEnablePermitButton = styled(SignPositionPermitBtn)`\n  width: 94px;\n  height: 30px;\n  font-size: 14px;\n  padding: 8px;\n  background: ${({ theme }) => theme.colors.global.warning};\n  &:hover {\n    background: ${({ theme }) => theme.colors.global.warning};\n    opacity: 0.8;\n  }\n`;\n\nexport const StyledTitle = styled(Body1)`\n  display: flex;\n  align-items: start;\n  flex-direction: column;\n  line-height: 20px;\n  color: ${({ theme }) => theme.colors.global.text.T3};\n`;\n\nexport const StyledValue = styled(Body1)`\n  display: flex;\n  line-height: 20px;\n  gap: ${({ theme }) => theme.spacing.md};\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\n\nexport const PriceRangeCard = styled(Card)`\n  padding: 0;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.lg};\n`;\n\nexport const PriceRangeTitleBar = styled(Flex)`\n  width: 100%;\n  align-items: center;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\n\nexport const RangeStatus = styled(RangeTag)`\n  margin-left: ${({ theme }) => theme.spacing.md};\n  margin-right: auto;\n`;\n\nexport const PureBox = styled.div`\n  font-weight: 400;\n  color: ${({ theme }) => theme.colors.global.text.T3};\n`;\n\nexport const IntentToolCard = styled(Card)`\n  padding: 0;\n  flex-direction: column;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\n","import { useAOStore } from \"@/components/GlobalStore\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport { IPositionDetails } from \"@/config/position/positionConfig\";\nimport { updatePositionPermit } from \"@/helper/positionHelper\";\nimport { useFetchPositionPermission } from \"@/hooks/useFetchPositionPermission\";\nimport { useIsWalletContract } from \"@/hooks/useIsWalletContract\";\nimport { isProdEnv } from \"@/utils/helper\";\nimport { Notification } from \"@aperture/uikit\";\nimport { PermitInfo } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { ReEnablePermitButton, RenableApproveOnChainBtn } from \"./styles\";\n\nexport const ReEnablePermit: React.FC<{\n  details: IPositionDetails;\n}> = ({ details }) => {\n  const { addSnackbar } = useSnackbarV2();\n  const { ammEnum, networkId } = useNetwork();\n  const { ifAuthorized, isAOStatusLoading } = useAOStore();\n  const { data: isWalletContract } = useIsWalletContract();\n  const {\n    data: permitStatus,\n    isLoading: isPermitLoading,\n    mutate: mutatePositionPermit,\n  } = useFetchPositionPermission(details.positionId);\n\n  const updatePermitInfo = (permitInfo: PermitInfo) => {\n    addSnackbar({\n      info: \"Re-enable position authorization in progress.\",\n      status: \"completed\",\n    });\n    updatePositionPermit(ammEnum, networkId, details.positionId, {\n      signature: permitInfo.signature,\n      deadline: String(permitInfo.deadline),\n    })\n      .then((res) => {\n        mutatePositionPermit();\n        addSnackbar({\n          info: \"Re-enable position authorization succeeded!\",\n          status: \"completed\",\n        });\n      })\n      .catch((err) => {\n        addSnackbar({\n          info: \"Re-enable position authorization has failed: \" + err,\n          status: \"failed\",\n        });\n      });\n  };\n\n  return (\n    <>\n      {!isProdEnv() && (\n        <div>\n          {\" \"}\n          PositionId: {details.positionId} tickLower: {details.tickLower}{\" \"}\n          tickUpper: {details.tickUpper}\n          <br />\n          AO: {String(ifAuthorized)} <br />\n          AO loading: {String(isAOStatusLoading)} <br />\n          PositionPermit: {String(permitStatus)}\n        </div>\n      )}\n      {!(ifAuthorized || isPermitLoading || permitStatus) &&\n        (details.autoCompound ||\n          details.rebalanced ||\n          details.prescheduled) && (\n          <Notification\n            variant=\"warning\"\n            text=\"Single position authorization permit expired or Authorized Operator status has been revoked. All triggers have become invalid. You can re-enable the singe position authorization to activate the triggers or go to Dashboard > Authorize Operator to grant operator status for all positions.\"\n            button={\n              isWalletContract ? (\n                <RenableApproveOnChainBtn\n                  text=\"Re-enable\"\n                  color=\"secondary\"\n                  positionIdBN={details.positionIdBN}\n                  tokenPair={`${details.tokenA.ticker}-${details.tokenB.ticker}`}\n                  onApproved={mutatePositionPermit}\n                />\n              ) : (\n                <ReEnablePermitButton\n                  color=\"secondary\"\n                  positionId={details.positionIdBN}\n                  tokenPair={`${details.tokenA.ticker}-${details.tokenB.ticker}`}\n                  setPermitInfo={(permitInfo: PermitInfo) =>\n                    updatePermitInfo(permitInfo)\n                  }\n                >\n                  Re-enable\n                </ReEnablePermitButton>\n              )\n            }\n            showClose={false}\n          />\n        )}\n    </>\n  );\n};\n","import { DeleteStrategyModal } from \"@/components/Modal/DeleteStrategyModal\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { StrategyNotification } from \"@/components/Notification/Strategy\";\nimport { usePage } from \"@/components/PageContext/PageContext\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport { IPositionDetails } from \"@/config/position/positionConfig\";\nimport { offsetTickToPercentage } from \"@/helper/liquiditySelectorHelper\";\nimport { getProjectedLiquidityPosition } from \"@/helper/positionHelper\";\nimport { getStrategyInfoCardProps } from \"@/helper/strategyHelper\";\nimport { getTokensFromInfo } from \"@/helper/tokenHelper\";\nimport { strategyActionTypes } from \"@/helper/trigger\";\nimport { deleteTrigger, getTriggerType } from \"@/helper/triggerHelper\";\nimport { useFetchAllChainUserTriggers } from \"@/hooks/useFetchAllChainUserTriggers\";\nimport { useFetchPositionPermission } from \"@/hooks/useFetchPositionPermission\";\nimport { useIfAuthorized } from \"@/hooks/useFetchUserAuthentication\";\nimport { CommonQueryKey } from \"@/utils/browserHistory\";\nimport { FlexColumn, TriggerGroup } from \"@aperture/uikit\";\nimport { Projection } from \"@aperture/uikit/src/components/TriggerList/types\";\nimport { E_ModalKey, Modal, useModal } from \"@aperture/uikitv2\";\nimport {\n  ActionTypeEnum,\n  DeleteTriggerPayload,\n  GetStrategyDetailResponse,\n  RebalanceAction,\n  RecurringAction,\n  TriggerItem,\n  viem,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { tickToPrice } from \"@aperture_finance/uniswap-v3-sdk\";\nimport stringify from \"json-stable-stringify\";\nimport _ from \"lodash\";\nimport { useRouter } from \"next/router\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useAccount, useSignMessage } from \"wagmi\";\nimport { GotoType } from \"../types\";\n\ntype IProps = {\n  details: IPositionDetails;\n  positionDetails: viem.PositionDetails | undefined;\n  tokenPrices: [string, string];\n  triggers: TriggerItem[];\n  goto: GotoType;\n  strategyDetail?: GetStrategyDetailResponse;\n  autoCompoundOn?: boolean;\n};\n\nexport const TriggerListWrapper: React.FC<IProps> = ({\n  details,\n  positionDetails,\n  tokenPrices,\n  triggers,\n  strategyDetail,\n  autoCompoundOn,\n  goto,\n}) => {\n  const tokenA = details.tokenA;\n  const tokenB = details.tokenB;\n  const { networkId } = useNetwork();\n  const { state, setModalState } = useModal();\n  const { isOpen } = state[E_ModalKey.DELETE_STRATEGY_MODAL];\n  const [selectedTrigger, setSelectedTrigger] = useState<TriggerItem>();\n\n  const getPrice = useCallback(\n    (tick: number) => {\n      const { token0, token1 } = getTokensFromInfo(\n        tokenA,\n        tokenB,\n        details.chainId\n      );\n      return tickToPrice(token0, token1, tick).toFixed(token0.decimals);\n    },\n    [details.chainId, tokenA, tokenB]\n  );\n\n  const projectLP = useCallback(\n    (trigger: TriggerItem): Projection => {\n      // if the rebalance trigger has a price condition for a targeted ratio, use that price to calculate the projected LP\n      if (positionDetails) {\n        return getProjectedLiquidityPosition(\n          networkId,\n          details,\n          positionDetails.position,\n          (trigger.action as RebalanceAction).tickLower,\n          (trigger.action as RebalanceAction).tickUpper,\n          tokenPrices,\n          undefined,\n          trigger\n        );\n      } else {\n        return [\n          { amount: \"0\", percent: \"0\" },\n          { amount: \"0\", percent: \"0\" },\n        ];\n      }\n    },\n    [details, positionDetails, tokenPrices]\n  );\n\n  const { address, chain } = useAccount();\n  const { mutate } = useFetchAllChainUserTriggers();\n  const {\n    data: signedPayload,\n    error,\n    isSuccess,\n    signMessage,\n    isError,\n  } = useSignMessage();\n  const { ifAuthorized } = useIfAuthorized();\n  const { data: permitStatus, isLoading: isPermitLoading } =\n    useFetchPositionPermission(details.positionId);\n  const { addSnackbar } = useSnackbarV2();\n  const [payload, setPayload] = useState<DeleteTriggerPayload | undefined>(\n    undefined\n  );\n  const router = useRouter();\n  const { setStrategyPage } = usePage();\n\n  const closeDeleteStrategyModal = () => {\n    setModalState(E_ModalKey.DELETE_STRATEGY_MODAL, false);\n    setSelectedTrigger(undefined);\n  };\n  const strategyInfo = useMemo(() => {\n    if (!selectedTrigger) return;\n    const { rebalancesExecuted, ...data } = getStrategyInfoCardProps(\n      details,\n      selectedTrigger,\n      strategyDetail\n    );\n    return data;\n  }, [details, selectedTrigger, strategyDetail]);\n\n  const handleGoToStrategy = useCallback(\n    (trigger: TriggerItem) => {\n      router.push({\n        pathname: \"/recurring-rebalance\",\n        query: {\n          [CommonQueryKey.STRATEGY_ID]: (trigger.action as RecurringAction)\n            .strategyId,\n        },\n      });\n    },\n    [router]\n  );\n\n  const handleCheck = useCallback(\n    (trigger: TriggerItem) => {\n      setStrategyPage(\"details\");\n      handleGoToStrategy(trigger);\n    },\n    [goto]\n  );\n\n  const handleEdit = useCallback(\n    (trigger: TriggerItem) => {\n      if (trigger.action.type === \"Close\") {\n        goto.removeLP(1, trigger);\n      } else if (trigger.action.type === \"Rebalance\") {\n        goto.rebalance(1, trigger);\n      } else if (strategyActionTypes.includes(trigger.action.type)) {\n        setStrategyPage(\"edit\");\n        handleGoToStrategy(trigger);\n      }\n    },\n    [goto]\n  );\n\n  const handleDeleteClick = (taskId: number) => {\n    const trigger = triggers.find((trigger) => trigger.taskId === taskId);\n    const triggerAction = trigger.action;\n    const isRecurringType =\n      triggerAction.type === \"RecurringPrice\" ||\n      triggerAction.type === \"RecurringPercentage\" ||\n      triggerAction.type === \"RecurringRatio\" ||\n      triggerAction.type === \"RecurringDualAction\";\n\n    if (!isRecurringType) {\n      handleDelete(taskId);\n    } else {\n      setSelectedTrigger(trigger);\n      setModalState(E_ModalKey.DELETE_STRATEGY_MODAL, true);\n    }\n  };\n\n  const handleDelete = useCallback(\n    (taskId: number) => {\n      const deletePayload: DeleteTriggerPayload = {\n        ownerAddr: address!,\n        chainId: chain!.id,\n        taskId,\n      };\n      setPayload(deletePayload);\n      const payloadInString = stringify(deletePayload);\n      signMessage({ account: address, message: payloadInString });\n    },\n    [address, chain, signMessage]\n  );\n\n  useEffect(() => {\n    if (isSuccess && payload && signedPayload) {\n      const trigger = triggers.find(\n        (trigger) => trigger.taskId === payload.taskId\n      );\n      const category =\n        trigger.action.type === \"Close\" ? \"Closure\" : trigger.action.type;\n      const type = getTriggerType(trigger);\n      deleteTrigger(payload, signedPayload)\n        .then((res) => {\n          addSnackbar({\n            info: `Your ${type.toLowerCase()} trigger for the ${\n              tokenA.ticker\n            }-${\n              tokenB.ticker\n            } position ${category.toLowerCase()} has been deleted.`,\n            status: \"completed\",\n          });\n          closeDeleteStrategyModal();\n          mutate();\n        })\n        .catch((err) => {\n          addSnackbar({\n            info: \"Your delete trigger request has failed: \" + err!.message,\n            status: \"failed\",\n          });\n        });\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isSuccess]);\n\n  useEffect(() => {\n    if (isError) {\n      addSnackbar({ info: \"Failed: \" + error!.message, status: \"failed\" });\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isError]);\n\n  const renderNotification = useCallback(() => {\n    return (\n      <StrategyNotification\n        chainId={details.chainId}\n        positionId={details.positionId}\n      />\n    );\n  }, [details.positionId]);\n\n  const groupedTriggers = _.groupBy(triggers, (trigger) => trigger.action.type);\n\n  const getErrorTag = useCallback(\n    (trigger: TriggerItem) => {\n      if (!ifAuthorized || trigger.lastFailedMessage) {\n        return \"Rebalance Failed\";\n      }\n      return \"\";\n    },\n    [ifAuthorized]\n  );\n\n  return (\n    <>\n      <FlexColumn gap=\"xl\">\n        {orderedKeys.map((key) => (\n          <TriggerGroup\n            key={key}\n            getErrorTag={getErrorTag}\n            getPrice={getPrice}\n            getPercentage={offsetTickToPercentage}\n            projectLP={projectLP}\n            tickRange={[details.tickLower, details.tickUpper]}\n            tokens={[tokenA, tokenB]}\n            chainId={details.chainId}\n            triggers={groupedTriggers[key]}\n            enableEdit={ifAuthorized || isPermitLoading || !!permitStatus}\n            onEdit={handleEdit}\n            onDelete={handleDeleteClick}\n            onClickGoTo={handleCheck}\n            executedTimes={strategyDetail?.executed}\n            autoCompoundOn={autoCompoundOn}\n            renderNotification={renderNotification}\n          />\n        ))}\n      </FlexColumn>\n      <Modal isModalOpen={isOpen} onClose={closeDeleteStrategyModal}>\n        {selectedTrigger && (\n          <DeleteStrategyModal\n            taskId={selectedTrigger.taskId}\n            strategyInfo={strategyInfo}\n            onClose={closeDeleteStrategyModal}\n          />\n        )}\n      </Modal>\n    </>\n  );\n};\n\nconst orderedKeys: ActionTypeEnum[] = [\n  \"Close\",\n  \"Rebalance\",\n  \"RecurringPercentage\",\n  \"RecurringPrice\",\n  \"RecurringRatio\",\n  \"RecurringDualAction\",\n];\n","import { useUnstakePositionContext } from \"@/components/Context/UnstakePositionContext\";\nimport { ClaimFeeModal } from \"@/components/Modal/ClaimFeeModal\";\nimport { ReinvestFeesModal } from \"@/components/Modal/ReinvestModal\";\nimport { StakePositionModal } from \"@/components/Modal/StakePositionModal\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { usePage } from \"@/components/PageContext/PageContext\";\nimport { IPositionDetails } from \"@/config/position/positionConfig\";\nimport {\n  getClosedPositions,\n  getPositionAnalytics,\n} from \"@/helper/positionHelper\";\nimport { getTokenPercentages } from \"@/helper/tokenHelper\";\nimport { strategyActionTypes } from \"@/helper/trigger\";\nimport { filterTriggers } from \"@/helper/triggerHelper\";\nimport { useCurrentChainToken } from \"@/hooks/globalState/useCurrentChainToken\";\nimport { useFetchPositionRebalanceHistory } from \"@/hooks/useFetch/useFetchPositionRebalanceHistory\";\nimport { useFetchStrategy } from \"@/hooks/useFetch/useFetchStrategy\";\nimport { useFetchAllChainsAnalytics } from \"@/hooks/useFetchAllChainAnalytics\";\nimport { useFetchAllChainUserTriggers } from \"@/hooks/useFetchAllChainUserTriggers\";\nimport { useFetchAllChainsPositions } from \"@/hooks/useFetchAllChainsPositions\";\nimport { useFetchCurrentChainMarketPrice } from \"@/hooks/useFetchMarketPrice\";\nimport { useFetchTokenURL } from \"@/hooks/useFetchTokenURL\";\nimport { useFetchUserPosition } from \"@/hooks/useFetchUserPosition\";\nimport { CommonQueryKey } from \"@/utils/browserHistory\";\nimport {\n  SLIPSTREAM_NETWORKS,\n  getSlipstreamAmmByNetworkId,\n} from \"@/utils/helper\";\nimport { isManta } from \"@/utils/networkHelper\";\nimport {\n  formatMarketPrice,\n  formatPrice,\n  formatUSDAmount,\n} from \"@/utils/numberFormat\";\nimport {\n  DrawerTitle,\n  FeeTierPercentage,\n  Headline5,\n  LinearLoader,\n  Notification,\n  TitleBar,\n  TokenInfo,\n  TokenPriceGroup,\n  ToolCard,\n} from \"@aperture/uikit\";\nimport {\n  ClosedPositions,\n  Flex,\n  NFTPositionCard,\n  PositionAnalytics,\n  useModal,\n} from \"@aperture/uikitv2\";\nimport {\n  ActionTypeEnum,\n  RecurringAction,\n} from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { E_ModalKey, Modal } from \"@uiv2/components/Modals\";\nimport bigDecimal from \"js-big-decimal\";\nimport { useRouter } from \"next/router\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { useAccount } from \"wagmi\";\nimport { GotoType } from \"../types\";\nimport { AutoCompoundWrapper } from \"./AutoCompoundWrapper\";\nimport { ReEnablePermit } from \"./ReEnablePermit\";\nimport { TriggerListWrapper } from \"./TriggerListWrapper\";\nimport {\n  ButtonGroupWrapper,\n  Card,\n  Container,\n  Content,\n  FeesButtonGroup,\n  FeesContent,\n  Header,\n  InfoWrapper,\n  IntentToolCard,\n  LeftContent,\n  LightHeader,\n  NFTCard,\n  Overview,\n  PriceRangeCard,\n  PriceRangeTitleBar,\n  PureBox,\n  RangeStatus,\n  RebalanceWrapper,\n  StyledBody2,\n  StyledButton,\n  StyledHeadline3,\n  StyledTitle,\n  StyledValue,\n  TitleWrapper,\n  TokenInfoContainer,\n  Wrapper,\n} from \"./styles\";\n\nexport const PositionDetails: React.FC<{\n  navBack: () => void;\n  details: IPositionDetails;\n  goto: GotoType;\n}> = ({ navBack, details, goto }) => {\n  const { address: walletAddress } = useAccount();\n  const { state, setModalState } = useModal();\n  const { isOpen } = state[E_ModalKey.STAKE_POSITION_MODAL];\n  const { isOpen: isClaimFeeModalOpen } = state[E_ModalKey.CLAIM_FEE_MODAL];\n  const { isOpen: isReinvestFeeModalOpen } =\n    state[E_ModalKey.REINVEST_FEE_MODAL];\n  const { ammEnum, network, networkId } = useNetwork();\n  const poolKey =\n    ammEnum === \"SLIPSTREAM\" ? details.tickSpacing : details.feeTier;\n  const {\n    data: marketPrice,\n    isLoading: marketPriceLoading,\n    mutate: mutateMarketPrice,\n  } = useFetchCurrentChainMarketPrice(\n    details.tokenA.address,\n    details.tokenB.address,\n    [poolKey]\n  );\n\n  const { data: allChainPositions } = useFetchAllChainsPositions(walletAddress);\n  const { data: positionDetails } = useFetchUserPosition(details.positionId);\n  const { data: positionRebalanceHistory } = useFetchPositionRebalanceHistory(\n    details.positionId\n  );\n\n  const { currentTokenPrice: tokenPriceList } = useCurrentChainToken(networkId);\n  const { data: NFTurl, isLoading: isNFTLoading } = useFetchTokenURL(\n    details.positionId\n  );\n  const [selected, setSelected] = useState(details.tokenB.ticker);\n  const router = useRouter();\n  const { setPosition, setStrategyPage } = usePage();\n  const { isLoading: isAnalyticsLoading, data: analyticsData } =\n    useFetchAllChainsAnalytics(walletAddress);\n\n  const latestPositionInHistory = useMemo(() => {\n    if (\n      !allChainPositions ||\n      !tokenPriceList ||\n      !allChainPositions[details.chainId]\n    )\n      return;\n    const positionMap = allChainPositions[details.chainId];\n\n    if (positionRebalanceHistory?.length > 0) {\n      const activePositionId =\n        positionRebalanceHistory[positionRebalanceHistory.length - 1];\n      return positionMap[activePositionId.tokenId];\n    }\n  }, [\n    allChainPositions,\n    tokenPriceList,\n    details.chainId,\n    positionRebalanceHistory,\n  ]);\n\n  const tokenPercentages = useMemo(\n    () =>\n      getTokenPercentages(\n        details.tokenA.amount,\n        details.tokenB.amount,\n        tokenPriceList?.[details.tokenA.address]?.price || \"0\",\n        tokenPriceList?.[details.tokenB.address]?.price || \"0\"\n      ),\n    [\n      details.tokenA.amount,\n      details.tokenA.address,\n      details.tokenB.amount,\n      details.tokenB.address,\n      tokenPriceList,\n    ]\n  );\n  const { stakePool, staked, setStaked } = useUnstakePositionContext();\n\n  // Get latest market price if marketPrice[poolKey] is undefined\n  useEffect(() => {\n    if (!marketPriceLoading && !marketPrice?.[poolKey]) {\n      mutateMarketPrice();\n    }\n  }, [marketPriceLoading]);\n\n  const formattedMarketPrice = marketPrice?.[poolKey]\n    ? formatMarketPrice(\n        marketPrice[poolKey][\n          selected === details.tokenA.ticker ? \"tokenA\" : \"tokenB\"\n        ]\n      )\n    : \"0\";\n\n  const { data: allChainsTriggerObj } = useFetchAllChainUserTriggers();\n  const triggers = details.closed\n    ? []\n    : filterTriggers(\n        allChainsTriggerObj?.[details.chainId],\n        [\n          ActionTypeEnum.Values.Close,\n          ActionTypeEnum.Values.Rebalance,\n          ...strategyActionTypes,\n        ],\n        details.positionId\n      );\n  const autoCompound = details.closed\n    ? undefined\n    : filterTriggers(\n        allChainsTriggerObj?.[details.chainId],\n        \"Reinvest\",\n        details.positionId\n      )[0];\n  const strategy = triggers.find((item) =>\n    strategyActionTypes.includes(item.action.type)\n  );\n\n  const strategyId = (strategy?.action as RecurringAction)?.strategyId;\n  const { data: strategyDetail } = useFetchStrategy(strategyId);\n\n  const unclaimedFees = [\n    {\n      Icon: details.tokenA.Icon,\n      ticker: details.tokenA.ticker,\n      amount: details.tokenA.collectableAmount,\n      address: details.tokenA.address,\n    },\n    {\n      Icon: details.tokenB.Icon,\n      ticker: details.tokenB.ticker,\n      amount: details.tokenB.collectableAmount,\n      address: details.tokenB.address,\n    },\n  ];\n\n  const toggleClaimFeeModal = (open: boolean) => {\n    setModalState(E_ModalKey.CLAIM_FEE_MODAL, open);\n  };\n  const toggleReinvestFeeModal = (open: boolean) => {\n    setModalState(E_ModalKey.REINVEST_FEE_MODAL, open);\n  };\n\n  const navToStrategy = useCallback(() => {\n    if (strategyId) {\n      setStrategyPage(\"edit\");\n      router.push({\n        pathname: \"/recurring-rebalance\",\n        query: {\n          [CommonQueryKey.STRATEGY_ID]: strategyId,\n        },\n      });\n    } else {\n      setPosition(details);\n      router.push({\n        pathname: \"/recurring-rebalance/create\",\n        query: {\n          [CommonQueryKey.PID]: `${details.chainId}-${details.positionId}`,\n        },\n      });\n    }\n  }, [details, strategyId]);\n\n  const actions = useMemo(\n    () => [\n      {\n        label: \"Add Liquidity\",\n        onClick: () => goto.addLP(),\n      },\n      {\n        label: \"Remove Liquidity\",\n        onClick: () => goto.removeLP(0),\n        disabled: details.closed,\n      },\n      {\n        label: \"Collect Fees\",\n        onClick: () => toggleClaimFeeModal(true),\n        disabled:\n          bigDecimal.compareTo(details.tokenA.collectableAmount, 0) <= 0 &&\n          bigDecimal.compareTo(details.tokenB.collectableAmount, 0) <= 0,\n      },\n      {\n        label: \"Rebalance\",\n        onClick: () => goto.rebalance(0),\n        disabled: details.closed,\n      },\n      {\n        label: \"Recurring Rebalance\",\n        onClick: navToStrategy,\n        disabled: isManta(network) || details.closed,\n      },\n      {\n        label: \"Automated Rebalance\",\n        onClick: () => goto.rebalance(1),\n        disabled: isManta(network) || details.closed,\n      },\n      {\n        label: \"Prescheduled Position Close\",\n        onClick: () => goto.removeLP(1),\n        disabled: isManta(network) || details.closed,\n      },\n    ],\n    [details.closed, details.feeAmount, goto]\n  );\n\n  const toggleStakePositionModal = (open: boolean) => {\n    setModalState(E_ModalKey.STAKE_POSITION_MODAL, open);\n  };\n\n  const handleGoToPositionDetail = useCallback(\n    (pid: string) => {\n      router.push({\n        pathname: \"/liquidity-management\",\n        query: {\n          [CommonQueryKey.PID]: pid,\n        },\n      });\n    },\n    [router]\n  );\n\n  return (\n    <>\n      <Container>\n        <DrawerTitle onClick={navBack} isDrawer>\n          <Headline5 fontWeight={500} textAlign={\"end\"}>\n            Back to Dashboard\n          </Headline5>\n        </DrawerTitle>\n        <TitleWrapper>\n          <TitleBar\n            actions={actions}\n            isInRange={details.inRange}\n            atStake={staked}\n            tokens={[details.tokenA, details.tokenB]}\n            tag={`${details.feeTier / FeeTierPercentage}%`}\n            closed={details.closed}\n          />\n        </TitleWrapper>\n        <Wrapper>\n          <Content>\n            <Overview>\n              {ammEnum === \"UNISWAP_V3\" && (\n                <NFTCard>\n                  {isNFTLoading ? (\n                    <LinearLoader size=\"100%\" height=\"308px\" radius=\"25px\" />\n                  ) : (\n                    NFTurl && <NFTPositionCard NFTStr={NFTurl} />\n                  )}\n                </NFTCard>\n              )}\n              <InfoWrapper>\n                <Card justifyContent={\"space-between\"}>\n                  <LeftContent>\n                    <Header mb={\"8px\"}>Liquidity</Header>\n                    <StyledHeadline3>\n                      {formatUSDAmount(details.liquidity)}\n                    </StyledHeadline3>\n                    <TokenInfoContainer>\n                      <TokenInfo\n                        marginBottom={12}\n                        key={details.tokenA.address}\n                        Icon={details.tokenA.Icon}\n                        ticker={details.tokenA.ticker}\n                        address={details.tokenA.address}\n                        native={details.tokenA.native}\n                        decimals={details.tokenA.decimals}\n                        amount={details.tokenA.amount}\n                        maxWidth={118}\n                        price={\n                          (tokenPriceList?.[details.tokenA.address]?.price ||\n                            \"0\") as string\n                        }\n                        tag={`${tokenPercentages.token0Percent}%`}\n                      />\n                      <TokenInfo\n                        key={details.tokenB.address}\n                        Icon={details.tokenB.Icon}\n                        ticker={details.tokenB.ticker}\n                        address={details.tokenB.address}\n                        native={details.tokenB.native}\n                        decimals={details.tokenB.decimals}\n                        amount={details.tokenB.amount}\n                        maxWidth={118}\n                        price={\n                          (tokenPriceList?.[details.tokenB.address]?.price ||\n                            \"0\") as string\n                        }\n                        tag={`${tokenPercentages.token1Percent}%`}\n                      />\n                    </TokenInfoContainer>\n                  </LeftContent>\n                  <ButtonGroupWrapper>\n                    <StyledButton\n                      variant=\"contained\"\n                      color=\"secondary\"\n                      size=\"xs\"\n                      onClick={() => goto.addLP()}\n                    >\n                      <StyledBody2>Add Liquidity</StyledBody2>\n                    </StyledButton>\n                    <StyledButton\n                      variant=\"contained\"\n                      color=\"default\"\n                      size=\"xs\"\n                      disabled={details.closed}\n                      onClick={() => goto.removeLP(0)}\n                    >\n                      <StyledBody2>Remove Liquidity</StyledBody2>\n                    </StyledButton>\n                  </ButtonGroupWrapper>\n                </Card>\n                <Card flexDirection={\"column\"}>\n                  <FeesContent>\n                    <LeftContent>\n                      <Header mb={\"8px\"}>Unclaimed Fees</Header>\n                      <StyledHeadline3 lineHeight={\"38px\"}>\n                        {formatUSDAmount(details.feeAmount)}\n                      </StyledHeadline3>\n                      <TokenInfoContainer>\n                        <TokenInfo\n                          marginBottom={12}\n                          key={details.tokenA.address}\n                          Icon={details.tokenA.Icon}\n                          ticker={details.tokenA.ticker}\n                          address={details.tokenA.address}\n                          native={details.tokenA.native}\n                          decimals={details.tokenA.decimals}\n                          amount={details.tokenA.collectableAmount}\n                          maxWidth={118}\n                          price={\n                            (tokenPriceList?.[details.tokenA.address]?.price ||\n                              \"0\") as string\n                          }\n                        />\n                        <TokenInfo\n                          key={details.tokenB.address}\n                          Icon={details.tokenB.Icon}\n                          ticker={details.tokenB.ticker}\n                          address={details.tokenB.address}\n                          native={details.tokenB.native}\n                          decimals={details.tokenB.decimals}\n                          amount={details.tokenB.collectableAmount}\n                          maxWidth={118}\n                          price={\n                            (tokenPriceList?.[details.tokenB.address]?.price ||\n                              \"0\") as string\n                          }\n                        />\n                      </TokenInfoContainer>\n                    </LeftContent>\n                    <FeesButtonGroup>\n                      {!isManta(network) && (\n                        <AutoCompoundWrapper\n                          details={details}\n                          autoCompound={autoCompound}\n                        />\n                      )}\n                      <ButtonGroupWrapper>\n                        <StyledButton\n                          variant=\"contained\"\n                          color=\"secondary\"\n                          size=\"xs\"\n                          width=\"130px\"\n                          onClick={() => toggleReinvestFeeModal(true)}\n                          disabled={\n                            bigDecimal.compareTo(\n                              details.tokenA.collectableAmount,\n                              0\n                            ) <= 0 &&\n                            bigDecimal.compareTo(\n                              details.tokenB.collectableAmount,\n                              0\n                            ) <= 0\n                          }\n                        >\n                          <StyledBody2>Reinvest</StyledBody2>\n                        </StyledButton>\n                        <StyledButton\n                          variant=\"contained\"\n                          color=\"secondary\"\n                          size=\"xs\"\n                          width=\"130px\"\n                          onClick={() => toggleClaimFeeModal(true)}\n                          disabled={\n                            bigDecimal.compareTo(\n                              details.tokenA.collectableAmount,\n                              0\n                            ) <= 0 &&\n                            bigDecimal.compareTo(\n                              details.tokenB.collectableAmount,\n                              0\n                            ) <= 0\n                          }\n                        >\n                          <StyledBody2>Collect Fees</StyledBody2>\n                        </StyledButton>\n                      </ButtonGroupWrapper>\n                    </FeesButtonGroup>\n                  </FeesContent>\n                </Card>\n              </InfoWrapper>\n            </Overview>\n            {details?.autoCompound && autoCompound?.lastFailedMessage && (\n              <Notification\n                variant=\"warning\"\n                text={autoCompound.lastFailedMessage}\n                showClose={true}\n              />\n            )}\n            <ReEnablePermit details={details} />\n            <PriceRangeCard noBorder={true}>\n              <PriceRangeTitleBar>\n                <LightHeader>Price Range</LightHeader>\n                {!details.closed && (\n                  <RangeStatus\n                    closed={details.closed}\n                    inRange={details.inRange}\n                  />\n                )}\n                <RebalanceWrapper>\n                  <StyledButton\n                    variant=\"contained\"\n                    color=\"secondary\"\n                    size=\"xs\"\n                    width=\"130px\"\n                    disabled={details.closed}\n                    onClick={() => goto.rebalance(0)}\n                  >\n                    <StyledBody2>Rebalance</StyledBody2>\n                  </StyledButton>\n                </RebalanceWrapper>\n              </PriceRangeTitleBar>\n              <TokenPriceGroup\n                buyToken={{\n                  ticker: details.tokenA.ticker,\n                  min:\n                    bigDecimal.compareTo(details.minPrice, 0) > 0 &&\n                    bigDecimal.compareTo(\n                      bigDecimal.divide(1, details.minPrice, 18),\n                      0\n                    ) === 0\n                      ? \"∞\"\n                      : formatPrice(details.minPrice),\n                  max:\n                    bigDecimal.compareTo(details.maxPrice, 0) > 0 &&\n                    bigDecimal.compareTo(\n                      bigDecimal.divide(1, details.maxPrice, 18),\n                      0\n                    ) === 0\n                      ? \"∞\"\n                      : formatPrice(details.maxPrice),\n                }}\n                sellToken={{\n                  ticker: details.tokenB.ticker,\n                  min:\n                    bigDecimal.compareTo(details.maxPrice, 0) === 0\n                      ? \"∞\"\n                      : formatPrice(bigDecimal.divide(1, details.maxPrice, 18)),\n                  max:\n                    bigDecimal.compareTo(details.minPrice, 0) === 0\n                      ? \"∞\"\n                      : formatPrice(bigDecimal.divide(1, details.minPrice, 18)),\n                }}\n                title={\n                  <StyledTitle>\n                    Market Price:\n                    <StyledValue>\n                      {formattedMarketPrice}\n                      <PureBox>\n                        {selected === details.tokenA.ticker\n                          ? `${details.tokenB.ticker} per ${details.tokenA.ticker}`\n                          : `${details.tokenA.ticker} per ${details.tokenB.ticker}`}\n                      </PureBox>\n                    </StyledValue>\n                  </StyledTitle>\n                }\n                setSelected={(value) => setSelected(value)}\n              />\n            </PriceRangeCard>\n            {triggers && triggers.length > 0 && (\n              <TriggerListWrapper\n                details={details}\n                positionDetails={positionDetails}\n                tokenPrices={[\n                  (tokenPriceList?.[details.tokenA.address]?.price ||\n                    \"0\") as string,\n                  (tokenPriceList?.[details.tokenB.address]?.price ||\n                    \"0\") as string,\n                ]}\n                triggers={triggers}\n                goto={goto}\n                strategyDetail={strategyDetail}\n                autoCompoundOn={!!autoCompound}\n              />\n            )}\n            <IntentToolCard noBorder={true}>\n              <LightHeader>Liquidity Intents Tools</LightHeader>\n              <Flex gap=\"xl\">\n                <ToolCard\n                  title=\"Recurring Rebalance\"\n                  subTitle=\"We will allow users to define a new recurring range around a future spot price triggered by price percentages, absolute token terms, or token ratios.\"\n                  disabled={details.closed}\n                  nextClick={navToStrategy}\n                  comingSoon={isManta(network)}\n                  width={\"224.5px\"}\n                />\n                <ToolCard\n                  title=\"Automated Rebalance\"\n                  subTitle=\"Create a trigger for a pre-set rebalance based on pricing signals or time based logic.\"\n                  disabled={details.closed}\n                  nextClick={() => goto.rebalance(1)}\n                  comingSoon={isManta(network)}\n                  width={\"224.5px\"}\n                />\n              </Flex>\n              <ToolCard\n                title=\"Prescheduled Position Close\"\n                subTitle=\"Create a trigger for a position closure based on pricing signals or time based logic.\"\n                disabled={details.closed}\n                nextClick={() => goto.removeLP(1)}\n                comingSoon={isManta(network)}\n              />\n            </IntentToolCard>\n            {ammEnum === \"SLIPSTREAM\" &&\n              SLIPSTREAM_NETWORKS.includes(networkId) && (\n                <IntentToolCard noBorder={true} flexDirection={\"column\"}>\n                  <LightHeader>Liquidity Position Stake</LightHeader>\n                  <ToolCard\n                    title={`${getSlipstreamAmmByNetworkId(\n                      networkId\n                    )} Position Stake`}\n                    nextClick={() => toggleStakePositionModal(true)}\n                  />\n                  <Modal\n                    disableBackgroundOnClose={true}\n                    isModalOpen={isOpen}\n                    onClose={() => toggleStakePositionModal(false)}\n                    padding={24}\n                  >\n                    <StakePositionModal />\n                  </Modal>\n                </IntentToolCard>\n              )}\n            {!isAnalyticsLoading &&\n              analyticsData?.[details.chainId]?.[details.positionId] && (\n                <>\n                  <PositionAnalytics\n                    {...getPositionAnalytics(\n                      details,\n                      analyticsData?.[details.chainId]?.[details.positionId]\n                    )}\n                  />\n                  <ClosedPositions\n                    {...getClosedPositions(\n                      details,\n                      latestPositionInHistory,\n                      positionRebalanceHistory,\n                      tokenPriceList,\n                      networkId,\n                      handleGoToPositionDetail\n                    )}\n                  />\n                </>\n              )}\n          </Content>\n        </Wrapper>\n      </Container>\n      <Modal\n        isModalOpen={isClaimFeeModalOpen}\n        onClose={() => toggleClaimFeeModal(false)}\n      >\n        <ClaimFeeModal\n          {...{\n            total: details.feeAmount,\n            tokenInfo: unclaimedFees,\n            positionId: details.positionIdBN,\n            stakePool,\n            staked,\n            setStaked,\n          }}\n          onClose={() => toggleClaimFeeModal(false)}\n        />\n      </Modal>\n      <Modal\n        isModalOpen={isReinvestFeeModalOpen}\n        onClose={() => toggleReinvestFeeModal(false)}\n      >\n        <ReinvestFeesModal\n          {...{\n            positionId: details.positionId,\n            positionIdBN: details.positionIdBN,\n            liquidity: details.liquidity,\n            feeAmount: details.feeAmount,\n            feeTier: details.feeTier,\n            tokens: [details.tokenA, details.tokenB],\n            tokenPrices: [\n              (tokenPriceList?.[details.tokenA.address]?.price ||\n                \"0\") as string,\n              (tokenPriceList?.[details.tokenB.address]?.price ||\n                \"0\") as string,\n            ],\n            tokenPercentages: [\n              tokenPercentages.token0Percent,\n              tokenPercentages.token1Percent,\n            ],\n            stakePool,\n            staked,\n            setStaked,\n          }}\n          onClose={() => toggleReinvestFeeModal(false)}\n        />\n      </Modal>\n    </>\n  );\n};\n","import { useSolverRoutingStore } from \"@/components/GlobalStore\";\nimport { IPositionDetails } from \"@/config/position/positionConfig\";\nimport { useOnNetworkAccountChange } from \"@/hooks/globalState/useOnNetworkAccountChange\";\nimport { Rebalance } from \"@/views/Rebalance\";\nimport { TriggerItem } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { AddLiquidity } from \"../AddLiquidity\";\nimport { RemoveLiquidity } from \"../RemoveLiquidity\";\nimport { GotoType, PositionPage } from \"../types\";\nimport { PositionDetails } from \"./PositionDetails\";\n\nexport const PositionDetail: React.FC<{\n  navBack: () => void;\n  details: IPositionDetails;\n  navToPage?: PositionPage;\n}> = ({ navBack, details, navToPage }) => {\n  const { resetSolver } = useSolverRoutingStore();\n  const [page, setPage] = useState<PositionPage>(navToPage ?? \"details\");\n  const [tabs, setTabs] = useState<0 | 1>(0);\n  const [trigger, setTrigger] = useState<TriggerItem | undefined>(undefined);\n\n  const goto: GotoType = useMemo(\n    () => ({\n      details: () => setPage(\"details\"),\n      addLP: () => setPage(\"addLP\"),\n      removeLP: (tabs: 0 | 1, trigger?: TriggerItem) => {\n        setPage(\"removeLP\");\n        setTabs(tabs);\n        setTrigger(trigger);\n      },\n      rebalance: (tabs: 0 | 1, trigger?: TriggerItem) => {\n        setPage(\"rebalance\");\n        setTabs(tabs);\n        setTrigger(trigger);\n      },\n    }),\n    [setPage, setTabs, setTrigger]\n  );\n\n  useEffect(() => {\n    resetSolver();\n    setPage(navToPage ?? \"details\");\n  }, [details.positionId]);\n\n  useOnNetworkAccountChange(() => {\n    navBack();\n    setPage(\"details\");\n  });\n\n  return (\n    <>\n      {page === \"details\" && (\n        <PositionDetails\n          {...{\n            navBack,\n            details,\n            goto,\n          }}\n        />\n      )}\n      {page === \"addLP\" && <AddLiquidity {...{ details, goto }} />}\n      {page === \"removeLP\" && (\n        <RemoveLiquidity\n          details={details}\n          goto={goto}\n          tabs={tabs}\n          trigger={trigger}\n        />\n      )}\n      {page === \"rebalance\" && (\n        <Rebalance\n          {...{\n            details,\n            amount: \"0\",\n            trigger,\n            tokens: [details.tokenA, details.tokenB],\n            feeTier: details.feeTier,\n            goto: goto,\n            tabs: tabs,\n            navBack,\n          }}\n        />\n      )}\n    </>\n  );\n};\n","import { useConnectStore } from \"@/components/GlobalStore\";\nimport { IActivePositionMap } from \"@/components/GlobalStore/allChain/types\";\nimport { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { useSnackbarV2 } from \"@/components/SnackbarContext/SnackbarContextV2\";\nimport { IPositionDetails } from \"@/config/position/positionConfig\";\nimport { filterPositions, sortActivePositions } from \"@/helper/positionHelper\";\nimport { TriggerStatus } from \"@/helper/triggerHelper\";\nimport { useEventCallback } from \"@/hooks/useEventCallback\";\nimport {\n  getNetworkId,\n  getSwitchNetworkError,\n  getValidChains,\n} from \"@/utils/networkHelper\";\nimport { IChain } from \"@aperture/uikit\";\nimport { getLogger } from \"@aperture_finance/uniswap-v3-automation-sdk\";\nimport { useEffect, useMemo } from \"react\";\nimport { useSwitchChain } from \"wagmi\";\n\nexport const useAllChainsPositions = (\n  allChainPositionResults: IActivePositionMap,\n  currentChainId: IChain\n) => {\n  return useMemo(() => {\n    const validChains = getValidChains();\n    const activePositions: IPositionDetails[] = allChainPositionResults\n      ? Object.entries(allChainPositionResults)\n          .reduce((acc, [chainId, chainPositions]) => {\n            if (currentChainId === \"ALL_CHAINS\") {\n              if (validChains.includes(parseInt(chainId)))\n                acc.push(Object.values(chainPositions));\n            } else {\n              if (parseInt(chainId) === getNetworkId(currentChainId))\n                acc.push(Object.values(chainPositions));\n            }\n            return acc;\n          }, [])\n          .flat()\n      : [];\n    return sortActivePositions(activePositions);\n  }, [allChainPositionResults, currentChainId]);\n};\n\nexport const useLimitOrders = (allChainLOTriggers: any) => {\n  return useMemo(() => {\n    const chainIds = Object.keys(allChainLOTriggers ?? {}).map(Number);\n    const chainsLOTriggers: {\n      [chainId: number]: string[];\n    } = {};\n    chainIds.map(async (chainId) => {\n      const triggers = (allChainLOTriggers?.[chainId]?.triggers).reduce(\n        (acc, trigger) => {\n          if (trigger.status !== TriggerStatus.DELETED) acc.push(trigger.nftId);\n          return acc;\n        },\n        []\n      );\n      chainsLOTriggers[chainId] = triggers;\n    });\n    return chainsLOTriggers;\n  }, [allChainLOTriggers]);\n};\n\nexport const useFilteredPositions = (\n  allChainsPositions: IPositionDetails[],\n  searchKeyword: string,\n  showAll: boolean,\n  stakePositionIds: bigint[] | undefined\n) => {\n  return useMemo(() => {\n    let filteredResults: IPositionDetails[] = allChainsPositions\n      ? showAll\n        ? allChainsPositions\n        : allChainsPositions.filter((position) => !position.closed)\n      : [];\n    return filterPositions(\n      searchKeyword,\n      filteredResults,\n      stakePositionIds ?? []\n    );\n  }, [allChainsPositions, searchKeyword, showAll, stakePositionIds]);\n};\n\nexport const useNetworkSwitching = (\n  selected: string | undefined,\n  setSelected: (value: string | undefined) => void\n) => {\n  const { networkId } = useNetwork();\n  const { addSnackbar } = useSnackbarV2();\n  const { connectType } = useConnectStore();\n  const {\n    switchChain,\n    isError: isSwitchChainError,\n    error: switchChainTxnErrorMsg,\n  } = useSwitchChain();\n\n  const handleSwitchNetwork = useEventCallback((chainId: number) => {\n    if (selected && chainId !== networkId) switchChain?.({ chainId: chainId });\n  });\n\n  useEffect(() => {\n    if (isSwitchChainError) {\n      getLogger().warn(\"SwitchActivePosition.SwitchNetworkError\", {\n        error: (switchChainTxnErrorMsg as Error).message,\n      });\n      addSnackbar({\n        info: getSwitchNetworkError(connectType),\n        status: \"failed\",\n      });\n      setSelected(undefined);\n    }\n  }, [isSwitchChainError]);\n\n  return { handleSwitchNetwork, networkId };\n};\n","import { UnstakePositionProvider } from \"@/components/Context/UnstakePositionContext\";\nimport { usePage } from \"@/components/PageContext/PageContext\";\nimport { getPid } from \"@/helper/positionHelper\";\nimport { useIsChainAndWalletReady } from \"@/hooks/globalState/useIsChainAccountReady\";\nimport { useSelected } from \"@/hooks/urls/useSelected\";\nimport { useFetchAllChainUserTriggers } from \"@/hooks/useFetchAllChainUserTriggers\";\nimport { useFetchAllChainsClosedPositions } from \"@/hooks/useFetchAllChainsClosedPositions\";\nimport { useFetchAllChainsPositions } from \"@/hooks/useFetchAllChainsPositions\";\nimport { useFetchStakePositionsIds } from \"@/hooks/useFetchStakePositionsIds\";\nimport { useOnFirstLoad } from \"@/hooks/useOnFirstLoad\";\nimport { CommonQueryKey } from \"@/utils/browserHistory\";\nimport { AccessoryIcons } from \"@aperture/assetkit\";\nimport { IChain, LinearLoaderGroup, useDrawer } from \"@aperture/uikit\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport styled from \"styled-components\";\nimport { Address } from \"viem\";\nimport { useAccount } from \"wagmi\";\nimport { PositionDetail } from \"../PositionDetails\";\nimport { EmptyBox } from \"../style\";\nimport { PositionPage } from \"../types\";\nimport { PositionList } from \"./PositionList\";\nimport {\n  useAllChainsPositions,\n  useFilteredPositions,\n  useLimitOrders,\n  useNetworkSwitching,\n} from \"./hook\";\n\nconst StyledEmptyWrapper = styled.div`\n  margin-bottom: 16px;\n`;\nconst StyledEmptyBox = styled(EmptyBox)`\n  border: none;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n  text-align: center;\n  font-family: \"Roboto Flex\";\n  font-size: 16px;\n  font-style: normal;\n  font-weight: 400;\n  line-height: 20px;\n`;\n\nexport const ActivePositions: React.FC<{\n  searchKeyword: string;\n  showAll: boolean;\n  currentChainId: IChain;\n}> = ({ searchKeyword, showAll, currentChainId }) => {\n  const { address: walletAddress } = useAccount();\n  const { data: allChainPositionResults, isLoading } =\n    useFetchAllChainsPositions(walletAddress);\n  const { data: allChainsClosedPositionResults } =\n    useFetchAllChainsClosedPositions(showAll, walletAddress);\n\n  const { data: stakePositionIds } = useFetchStakePositionsIds();\n  const { data: allChainTriggerObj } = useFetchAllChainUserTriggers();\n  const { data: allChainLOTriggers } = useFetchAllChainUserTriggers(true);\n\n  const { isReady } = useIsChainAndWalletReady();\n  const { positionPage } = usePage();\n  const [navToPage, setNavToPage] = useState<PositionPage>(\n    positionPage ?? \"details\"\n  );\n  const { selected, setSelected } = useSelected(CommonQueryKey.PID);\n  const { Drawer, showDrawer, hideDrawer, hideIntentDrawer } = useDrawer();\n\n  const allChainsPositions = useAllChainsPositions(\n    allChainPositionResults,\n    currentChainId\n  );\n  const limitOrders = useLimitOrders(allChainLOTriggers);\n  const filteredResults = useFilteredPositions(\n    allChainsPositions,\n    searchKeyword,\n    showAll,\n    stakePositionIds\n  );\n  const { handleSwitchNetwork, networkId } = useNetworkSwitching(\n    selected,\n    setSelected\n  );\n\n  const selectedPosition = useMemo(() => {\n    return selected\n      ? allChainsPositions?.find(\n          (position) =>\n            `${position.chainId}-${position.positionId}` === selected\n        )\n      : undefined;\n  }, [selected, allChainsPositions]);\n\n  useOnFirstLoad(allChainsPositions, () => {\n    if (!selected) return;\n    if (!selectedPosition) {\n      setSelected(undefined);\n      return;\n    }\n\n    setTimeout(() => {\n      document\n        .getElementById(`Position-${getPid(selectedPosition)}`)\n        ?.scrollIntoView({\n          behavior: \"smooth\",\n          block: \"nearest\",\n          inline: \"nearest\",\n        });\n      setNavToPage(\"details\");\n    }, 300);\n  });\n\n  useEffect(() => {\n    if (selectedPosition) {\n      const isCurrentChain = selectedPosition.chainId === networkId;\n      if (isCurrentChain) {\n        hideIntentDrawer();\n        showDrawer();\n      } else {\n        setTimeout(() => {\n          handleSwitchNetwork(selectedPosition.chainId);\n        }, 300);\n      }\n    } else {\n      hideDrawer();\n    }\n  }, [selectedPosition, networkId]);\n\n  const renderPositionList = () => {\n    if (!isReady) {\n      return (\n        <StyledEmptyBox>\n          <StyledEmptyWrapper>\n            <AccessoryIcons.HandEmptyIcon />\n          </StyledEmptyWrapper>\n          Connect wallet and select correct network.\n        </StyledEmptyBox>\n      );\n    }\n\n    if (isLoading) {\n      return <LinearLoaderGroup size=\"100%\" height=\"85px\" />;\n    }\n\n    if (!filteredResults?.length) {\n      return <EmptyBox>Your active positions will appear here.</EmptyBox>;\n    }\n\n    return (\n      <PositionList\n        walletAddress={walletAddress}\n        positions={filteredResults}\n        stakePositionIds={{ [networkId]: stakePositionIds }}\n        triggerObj={allChainTriggerObj}\n        limitOrders={limitOrders}\n        closedPositionResults={allChainsClosedPositionResults}\n      />\n    );\n  };\n\n  return (\n    <>\n      {renderPositionList()}\n      <Drawer>\n        {selectedPosition && networkId === selectedPosition.chainId && (\n          <UnstakePositionProvider\n            {...{\n              positionId: selectedPosition.positionIdBN,\n              token0Address: selectedPosition.tokenA.address as Address,\n              token1Address: selectedPosition.tokenB.address as Address,\n              feeTier: selectedPosition.feeTier,\n            }}\n          >\n            <PositionDetail\n              navBack={() => setSelected(undefined)}\n              details={selectedPosition}\n              navToPage={navToPage}\n            />\n          </UnstakePositionProvider>\n        )}\n      </Drawer>\n    </>\n  );\n};\n","import { useNetwork } from \"@/components/NetworkContext/NetworkContext\";\nimport { useSelected } from \"@/hooks/urls/useSelected\";\nimport { CommonQueryKey } from \"@/utils/browserHistory\";\nimport { getNetworkId, isManta } from \"@/utils/networkHelper\";\nimport { ActivePositions } from \"@/views/ActivePositions\";\nimport { Headline, PageContainer } from \"@/views/style\";\nimport { AccessoryIcons } from \"@aperture/assetkit\";\nimport {\n  AllChainsIcon,\n  BaseButton,\n  Button,\n  ButtonText,\n  ChainAMMLabel,\n  DrawerOpenCardWidth,\n  Flex,\n  FlexColumn,\n  Headline1,\n  Headline5,\n  IChain,\n  SearchInput,\n  StatusTab,\n  useDrawer,\n} from \"@aperture/uikit\";\nimport { useRouter } from \"next/router\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport styled, { useTheme } from \"styled-components\";\n\nconst StyledPageContainer = styled(PageContainer)<{ drawerOpen?: boolean }>`\n  max-width: 840px;\n  margin-top: 0px;\n  align-items: ${({ drawerOpen }) => (drawerOpen ? \"flex-end\" : \"center\")};\n`;\nconst Wrapper = styled(FlexColumn)<{\n  drawerOpen?: boolean;\n}>`\n  width: 100%;\n  gap: 0;\n  max-width: ${({ drawerOpen }) => (drawerOpen ? DrawerOpenCardWidth : \"100%\")};\n`;\nconst Container = styled(Flex)`\n  width: 100%;\n  margin-bottom: ${({ theme }) => theme.spacing.xl};\n  flex-wrap: wrap;\n  row-gap: ${({ theme }) => theme.spacing.xl};\n`;\nconst StyledButtonLink = styled(BaseButton)`\n  display: inline-flex;\n  height: 40px;\n  min-width: 224px;\n  padding: 12px 20px;\n  justify-content: center;\n  align-items: center;\n  gap: 4px;\n  flex-shrink: 0;\n  font-family: \"Roboto Flex\";\n  font-weight: 500;\n  line-height: 16px;\n  text-transform: capitalize;\n\n  color: ${({ theme }) => theme.colors.global.text.T1};\n  background: ${({ theme }) => theme.colors.global.background.BG2};\n\n  :hover {\n    background: ${({ theme }) => theme.colors.global.background.BG2};\n    opacity: 0.8;\n  }\n`;\nconst LinkIconBox = styled(AccessoryIcons.LinkIcon2)`\n  width: 12px;\n  height: 12px;\n  stroke: ${({ theme }) => theme.colors.global.primary};\n`;\nconst SearchButton = styled(BaseButton)`\n  min-width: 158px;\n  height: 42px;\n  gap: ${({ theme }) => theme.spacing.md};\n  color: ${({ theme }) => theme.colors.global.textAlt.T1};\n  background: ${({ theme }) => theme.colors.global.primary};\n  &:hover {\n    background: ${({ theme }) => theme.colors.global.primary};\n    opacity: 0.8;\n  }\n  &:disabled {\n    background: ${({ theme }) => theme.colors.primary.lightPurple};\n    opacity: 1;\n  }\n`;\nconst NewPosition = styled(Flex)<{ drawerOpen?: Boolean }>`\n  width: 100%;\n  margin: 20px 0;\n  gap: ${({ theme, drawerOpen }) => (drawerOpen ? theme.spacing.xl : 0)};\n  flex-direction: ${({ drawerOpen }) => (drawerOpen ? \"column\" : \"row\")};\n  justify-content: space-between;\n`;\nconst NewPositionText = styled(Headline1)`\n  color: ${({ theme }) => theme.colors.global.text.T1};\n  font-family: \"Dunbar Tall\";\n  font-style: normal;\n  transform: none;\n  backface-visibility: hidden;\n`;\nconst NewPositionButton = styled(Flex)`\n  margin: auto 0;\n  gap: ${({ theme }) => theme.spacing.lg};\n`;\nconst StyledCard = styled.div`\n  width: 100%;\n`;\nconst Title = styled(Flex)`\n  align-items: center;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\nconst LinkButton = styled(Flex)`\n  width: 100%;\n  justify-content: space-between;\n  margin-top: -8px;\n  margin-bottom: 12px;\n  gap: ${({ theme }) => theme.spacing.md};\n`;\nconst LinkButtonLink = styled(Flex)`\n  align-items: center;\n  gap: ${({ theme }) => theme.spacing.xl};\n`;\nconst AllChainsText = styled.div`\n  font-family: \"Roboto Flex\";\n  font-size: 16px;\n  font-weight: 400;\n  line-height: 20px;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n`;\nconst StyledTextButton = styled(Button)<{ black?: boolean }>`\n  margin-right: 8px;\n  text-decoration-line: none;\n  font-family: \"Roboto Flex\";\n  font-size: 14px;\n  font-weight: 400;\n  line-height: 16px;\n  text-transform: capitalize;\n  color: ${({ theme }) => theme.colors.global.text.T1};\n  :hover {\n    color: ${({ theme }) => theme.colors.global.text.T1};\n  }\n`;\nconst StyledChainAMMLabel = styled(ChainAMMLabel)`\n  align-self: flex-start;\n  margin-top: auto;\n  margin-bottom: auto;\n`;\n\nconst LiquidityManagement = () => {\n  const { amm, network } = useNetwork();\n  const router = useRouter();\n  const theme = useTheme();\n  const [searchKeyword, setSearchKeyword] = useState<string>(\"\");\n  const [showAll, setShowAll] = useState(false);\n  const { drawerOpen, intentDrawerOpen } = useDrawer();\n  const [currentChainId, setCurrentChainId] = useState<IChain>(network);\n  const { selected, setSelected } = useSelected(CommonQueryKey.PID);\n  const isAllChains = currentChainId === \"ALL_CHAINS\";\n  const _drawerOpen = drawerOpen || intentDrawerOpen;\n\n  const pageTitle = useMemo(() => {\n    switch (amm?.name) {\n      case \"Uniswap\":\n        return \"Uniswap V3\";\n      case \"PancakeSwap\":\n        return \"PancakeSwap V3\";\n      case \"ApertureSwap\":\n        return \"Aperture\";\n    }\n  }, [amm]);\n\n  useEffect(() => {\n    if (currentChainId !== \"ALL_CHAINS\" && currentChainId !== network)\n      setCurrentChainId(network);\n\n    // Open the selected position when switching from other network\n    if (selected) {\n      if (parseInt(selected.split(\"-\")[0]) === getNetworkId(network)) {\n        setSelected(selected);\n      } else {\n        setSelected(undefined);\n      }\n    }\n  }, [network]);\n\n  return (\n    <StyledPageContainer drawerOpen={_drawerOpen}>\n      <Wrapper drawerOpen={_drawerOpen}>\n        <NewPosition drawerOpen={_drawerOpen}>\n          <NewPositionText fontWeight={500}>\n            {pageTitle} <br />\n            Liquidity Positions\n          </NewPositionText>\n          <NewPositionButton>\n            <SearchInput\n              width={192}\n              placeholder=\"Search Position\"\n              onChange={(value: string) => setSearchKeyword(value.trim())}\n            />\n            <SearchButton onClick={() => router.push(\"/new-position\")}>\n              <AccessoryIcons.AddIcon\n                width={16}\n                height={16}\n                fill={theme.colors.global.textAlt.T1}\n              />\n              <Headline5 fontSize={\"14px\"}>New Position</Headline5>\n            </SearchButton>\n          </NewPositionButton>\n        </NewPosition>\n        {!drawerOpen && isManta(network) && (\n          <LinkButton>\n            <LinkButtonLink>\n              <StyledButtonLink\n                onClick={(event) => {\n                  event.stopPropagation();\n                  window.open(\n                    \"https://pacific-bridge.manta.network/\",\n                    \"_blank\"\n                  );\n                }}\n              >\n                <ButtonText\n                  padding={\"0 4px\"}\n                  fontSize={14}\n                  lineHeight={\"46px\"}\n                  height={\"46px\"}\n                >\n                  Bridge assets to Manta Pacific\n                </ButtonText>\n                <LinkIconBox />\n              </StyledButtonLink>\n            </LinkButtonLink>\n          </LinkButton>\n        )}\n        <Container justifyContent=\"space-between\">\n          <StyledChainAMMLabel amm={amm} chainId={network} />\n          <Flex gap=\"md\" alignItems=\"center\">\n            <StatusTab\n              noText\n              onStatus={isAllChains}\n              onChange={() =>\n                setCurrentChainId(isAllChains ? network : \"ALL_CHAINS\")\n              }\n            />\n            <AllChainsText>Show All Chains</AllChainsText>\n            <AllChainsIcon sm overlapRight />\n          </Flex>\n        </Container>\n        <StyledCard>\n          <FlexColumn>\n            <Headline lineHeight={\"20px\"}>\n              <Title>\n                <span>Active Positions</span>\n                <StatusTab\n                  initTop={2}\n                  initLeft={2}\n                  marginLeft={8}\n                  noText={true}\n                  onStatus={showAll}\n                  onChange={() => setShowAll(!showAll)}\n                />\n                <StyledTextButton\n                  variant=\"text\"\n                  color=\"default\"\n                  size=\"xs\"\n                  onClick={() => setShowAll(!showAll)}\n                >\n                  {showAll ? \"Hide\" : \"Show\"} Closed Positions\n                </StyledTextButton>\n              </Title>\n            </Headline>\n            <ActivePositions\n              searchKeyword={searchKeyword}\n              showAll={showAll}\n              currentChainId={currentChainId}\n            />\n          </FlexColumn>\n        </StyledCard>\n      </Wrapper>\n    </StyledPageContainer>\n  );\n};\n\nexport default LiquidityManagement;\n"],"names":["window","__NEXT_P","push","__webpack_require__","useFetchUserPosition","positionId","isConnected","useAccount","ammEnum","networkId","publicClient","isChainSupported","useNetwork","useSWR","showFetch","concat","viem","BigInt","RebalanceContext","React","RebalanceProvider","trigger","tokenPrices","children","position","tabs","param","address","tokenA","tokenB","data","positionDetails","currentTokenPrice","useCurrentChainToken","allChainsTriggerObj","useFetchAllChainUserTriggers","tokenMap","useFetchTokenMap","globalSlippage","useGlobalSlippage","tab","setTab","useState","projectedAmount","setProjectedAmount","amount0","amount1","txForm","setTxForm","slippage","action","type","DEFAULT_REBALANCE_SLIPPAGE","deadline","error","setError","automatedRebalancePayload","setAutomatedRebalancePayload","permitInfo","setPermitInfo","gasEstimated","setGasEstimated","existingTriggersLen","filterTriggers","length","maxTriggersCreated","MAX_TRIGGER","getPrice","tickToPrice","positionDataRaw","pool","token0","token1","tick","form","setForm","gasCeiling","maxGasProportion","getGasCeiling","liquidity","getTriggerType","Price","getInitializedPriceTrigger","getInitializedTriggerTimeBuffer","Ratio","getInitializedRatioTrigger","tickLower","tickUpper","Time","getInitializedTimeTrigger","priceRange","getPriceRange","newTickLower","isCurrentTickOffset","newTickUpper","lowerPrice","upperPrice","min","toFixed","max","swapMin","invert","swapMax","percentageRange","getPercentageRange","percentageToOffsetTick","offsetTickToPercentage","useFutureSpot","futureSpotTab","RebalanceActionTab","tokenPrice","useMemo","price","isRebalanceChanged","isAutoBtnDisabled","setIsAutoBtnDisabled","useEffect","amount","dateTime","moment","valueOf","gasCeilingButtonError","generateData","ownerAddr","chainId","condition","getTriggerCondition","expiration","getTriggerDeadline","key","taskId","undefined","convertTrigger","_","frontendType","lte","convertRelativePriceToHumanValue","gte","isActionEqual","isConditionEqual","amm","nftId","debouncePriceRange","useDebounce","wait","swapInfo","selectedSolver","suggestedSolver","setSelectedSolver","useSolverRoutingStore","isSyncing","runSwapInfo","cancelSwapInfo","swapInfoError","useSwapInfo","staked","useUnstakePositionContext","fetchKey","options","useOnNetworkAccountChange","jsx_runtime","jsx","Provider","value","useRebalanceContext","Subtitle","styled","Headline5","theme","colors","global","text","T1","PriceRangeHeader","spacing","xl","FutureSpotContainer","Flex","md","FutureSpotText","T2","StyledSwapPath","SwapPath","StatusWrapper","StyledCommonContainer","CommonContainer","StyledCommonText","CommonLgText","lg","mockValidate","string","RebalanceEdit","marketPrice","useTheme","updateForm","setModalState","useModal","tokenATicker","ticker","tokenBTicker","baseToken","setBaseToken","setTickLower","setTickUpper","percentageTickLower","setPercentageTickLower","percentageTickUpper","setPercentageTickUpper","enableFutureSpot","setEnableFutureSpot","futureSpotStatus","setFutureSpotStatus","setFutureSpotTab","selectedTokenList","getTokensFromInfo","estimate","finalAmount0","finalAmount1","formatUnits","decimals","token0Amount","token1Amount","getTokenPercentages","res","getProjectedLiquidityPosition","token0Percent","percent","token1Percent","poolKey","tickSpacing","feeTier","lpDistribution","isLoading","lpDistributionLoading","lpDistributionError","useFetchLPDistribution","useFetchCurrentChainMarketPrice","baseTokenPrice","Number","updatePrice","priceForm","updatePercentage","percentageForm","useCallback","_tickLower","_tickUpper","updateMinMax","val","priceToTick","updateMinMaxPercentage","percentageTick","Math","abs","parseFloat","updateTickAfterPlusOrMinus","plusOrMinusTick","actionType","updatePercentageTickAfterPlusOrMinus","newPercentage","newTick","percentageToTick","TICK_SPACINGS","percentage","minPercentage","priceLower","priceUpper","timeId","setTimeout","clearTimeout","priceRangeLower","priceRangeUpper","isManta","EmptyBox","height","jsxs","Container","TriggerSetup","errorMsg","tooltip","initForm","tokens","expireDays","AUTOMATION_EXPIRATION_IN_DAYS","onFormChange","triggerSetupForm","isProdEnv","div","RowWithGap","gap","width","lineHeight","StyledTokenTab","menu","defaultSelected","onSelect","StatusTab","noText","onStatus","onChange","status","FutureSpotSelector","getDecrementLower","getIncrementLower","getDecrementUpper","getIncrementUpper","onLeftRangeInput","onRightRangeInput","feeAmount","currencyA","currencyB","ticksAtLimit","LOWER","UPPER","interactive","chartHeight","onSwitchFutureSpotTab","LiquiditySelector","warningMsg","bigDecimal","validate","dataState","formattedData","currentRange","Fragment","loading","priceImpact","api","fromToken","swapData","swapRoutes","showSwapRoutes","maxSwapRouteWidth","onBtnClick","E_ModalKey","suggested","gasFeeUSD","atStake","OrderRoutingModal","justifyContent","TokenInfo","Icon","native","tag","maxWidth","marginBottom","NoteCard","Expires","Headline3","fontSize","span","QuestionPopover","content","PercentageInputGroup","color","onError","gasCeilingInputError","AutomatedRebalanceBtn","payload","onClose","mutate","addSnackbar","useSnackbarV2","ifAuthorized","useIfAuthorized","isWalletContract","useIsWalletContract","triggerTask","permitStatus","isPermitLoading","mutatePositionPermit","useFetchPositionPermission","signedPayload","setSignedPayload","setIsLoading","updateTrigger","then","info","toLowerCase","catch","err","createTrigger","getCreateTriggerFailure","SignPayloadBtn","ApproveOnChainBtn","tokenPair","positionIdBN","onApproved","SignPositionPermitBtn","signature","String","ConfirmRebalanceBtn","navBack","txRequest","setTxRequest","ready","sendTransaction","txErrorMsg","isError","isPending","isSuccess","useSendTransactionWithGas","addPositionSnackbar","usePositionSnackBar","console","log","getRebalanceRequest","swapDataHex","feeBips","tx","toString","estimateGas","totalGasCost","gasCost","l2GasAmount","gas","calculateGasMargin","getLogger","JSON","stringify","message","details","reason","url","transaction","hash","successMsg","feePips","floor","context","txHash","feeUSD","solver","warn","Button","onClick","disabled","variant","size","Spinner","RebalanceWrapper","FlexColumn","StyledSelectMenuTab","SelectMenuTab","background","BG3","Content","DRAWER_CONTENT_WIDTH","Wrapper","mode","ButtonsContainer","StyledTransactionSettings","TransactionSettings","RebalanceLayout","onModeChange","setGlobalSlippage","onTabChange","mutateStakePositionIds","useFetchStakePositionsIds","stakePool","setStaked","isModePreview","isModeEdit","isTabRebalance","previewTitle","Title","DrawerTitle","isDrawer","textAlign","TitleText","containerPadding","selectWidth","itemsWidth","isPro","indexOf","defaultSlippage","settingsForm","dropdownPosition","buttonSize","prev","UnstakePositionBtn","gaugeAddress","handleTxSuccess","PriceRange","PositionContainer","FixedSubtitle","StyledRow","Row","RebalancePreview","nativeCurrency","timeZone","momentTimeZone","formatTokenPrice","PriceRangeKey","formatPrice","formatFutureSpotPrice","feeDesc","DEFAULT_APERTURE_FLAT_FEE","DEFAULT_APERTURE_REINVEST_FEE","DEFAULT_APERTURE_REBALANCE_FEE","TriggerSetupPreview","TokenPriceGroup","tabPosition","buyToken","sellToken","style","DividerHorizontal","OtherInfo","Text1","SwapRoute","routes","wBorder","add","format","TimeZone","isCreatingTrigger","symbol","FeeInfoCard","styles","feeInfo","fee","calculateTotalValue","formatUSDAmount","active","hint","Rebalance","goto","setMode","goToDetails","AddLiquidityContextV2","AddLiquidityProviderV2","tokenPriceList","props","startTransition","useTransition","balanceData","useFetchUserTokensBalance","autoCompound","usePositionAutoCompound","setPool","openSettings","setOpenSettings","tokenAPrice","tokenBPrice","tokenPairPrice","nativeStatus","isWrappedNative","tokensInfo","poolTokens","poolTokensToNative","useNative","debounceForm","tokenBalanceList","balance","isTokenNonZero","isTokenANonZero","isTokenBNonZero","showSwapPath","liquidityInUS","collectableInUS","collectableAmount","txnSetting","setTxnSetting","DEFAULT_SLIPPAGE","setTxErrorMsg","minAmounts","setMinAmounts","amount0Min","amount1Min","noNeedSwap","setIsSyncing","isSyncingTx","setIsSyncingTx","option_amounts","amounts","getEstimates","useEventCallback","finally","resetTxStatus","getTx","formattedSwapInfo","getAddPositionRequest","txErr","getIncreaseLiquidityOptimalTx","token0FeeAmount","token1FeeAmount","autoCompoundExists","useAddLiquidityContextV2","StyledWC","WhiteCard","UseNative","nativeChange","setUseNative","wrapped","NoSwapInfoWrapper","NoSwapInfoText","T3","ZapInSwapPath","selectedSwapInfo","hide","keepDropdown","marginTop","getSwapFailureMessage","netDepositUSDValue","feePercentage","DEFAULT_APERTURE_ZAPIN_FEE","ApertureLogos","fill","Headline","T3Regular","ErrorMessage","radii","warning","isDark","SwapDetail","setTokenAAmount","setTokenBAmount","setHide","failureMessage","showAlignTokens","ErrorMsg","fetchTokenPairsAmount","ifTokenA","_tokenAAmount","_tokenBAmount","tickCurrent","getOtherTokenAmount","toExact","alignItems","RaindropSpinner","ChevronDown","isShow","AlignTokenAmounts","disableA","disableB","onAlignTokenA","onAlignTokenB","isAddLP","TokenInfoContainer","noBorder","line","Line2","padding","minWidth","InputGroupMaxContainer","PaddingBox","Amount","StyledText","H3","Slider","InputGroupRight","primary","purple","round","ButtonText","grey","white","ButtonGroup","PreviewAddLiquidity","zapIn","CurrentLiquidity","StyledWhiteCard","AddLiquidityEditV2","buttonGroupRef","getChainInfo","token","index","tokenAAmount","tokenBAmount","approvalA","setApprovalA","approvalB","setApprovalB","useRef","insufficientTokenStatus","tokenAmountApproved","fetchTokenAmount","current","offsetHeight","scrollIntoView","approveContractAddress","amms","nonfungiblePositionManager","apertureAutomanV3","fontWeight","map","AutoCompoundTag","InputGroupMax","placeholder","defaultValue","subTitle","displayBalance","formatAmount","onMaxClick","ref","ApproveTokenBtn","contractAddress","canBeZero","approveOnChange","approve","SpinnerWrapper","ButtonBox","textAlt","AddLPBtnV2","walletAddress","swapInfoUnavailable","AddLiquidityLayoutV2","errorMessage","warningSlippage","WARNING_SLIPPAGE","AddLiquidityPreviewV2","newTokenAAmount","newTokenBAmount","newLiquidity","depositedItems","label","values","compareZero","liquidityItems","flexDirection","slice","getTicker","Text2","AddLiquidity","RemoveLiquidityContext","RemoveLiquidityProvider","removePercentage","estimatedAmounts","estimatedLiquidity","isPrescheduleBtnDisabled","setIsPrescheduleBtnDisabled","prescheduledPayload","setPrescheduledPayload","useRemoveLiquidityContext","Position","GasCeiling","StyledSlider","Hint","mediumGrey","RemoveLiquidityEdit","isZapOutEnabled","useIsZapOutEnabled","showTimeBuffer","ZapTag","PercentageInputAdditional","additionalAmount","AccessoryIcons","PrescheduledCloseBtn","RemoveLPBtn","getRemovePositionRequest","numberToPercent","account","split","RemoveLiquidityLayout","isTabRemoveLP","isTabRemoveLPTrigger","EarnedValue","RemoveLiquidityPreview","DEFAULT_APERTURE_FEE","RemoveLiquidity","StyledButton","CollectFeeBtn","total","tokenInfo","setErrorMsg","ButtonWrapper","ClaimFeeModal","stakeStatus","setStakeStatus","ClaimFeeContent","ReinvestBtn","getDeadlineWithMins","ReinvestWrapper","signPositionPermitBtnText","ReinvestFeesModal","tokenPercentages","setTXForm","newTokenAmount","newLPInUs","ReinvestFeesContent","unClaimedFees","predictedLiquidity","predictedProjection","StakePositionModal","buttonProps","StakePositionContent","getSlipstreamAmmByNetworkId","StakePositionBtn","Card","BG2","compose","flexbox","grid","layout","space","TitleWrapper","Overview","NFTCard","InfoWrapper","Header","Body1","LightHeader","T1Regular","StyledHeadline3","LeftContent","ButtonGroupWrapper","StyledBody2","Body2","FeesContent","FeesButtonGroup","RenableApproveOnChainBtn","ReEnablePermitButton","StyledTitle","StyledValue","PriceRangeCard","PriceRangeTitleBar","RangeStatus","RangeTag","PureBox","IntentToolCard","ReEnablePermit","isAOStatusLoading","useAOStore","updatePermitInfo","updatePositionPermit","br","rebalanced","prescheduled","Notification","button","showClose","TriggerListWrapper","triggers","strategyDetail","autoCompoundOn","state","isOpen","selectedTrigger","setSelectedTrigger","projectLP","chain","signMessage","useSignMessage","setPayload","router","useRouter","setStrategyPage","usePage","closeDeleteStrategyModal","strategyInfo","rebalancesExecuted","getStrategyInfoCardProps","handleGoToStrategy","pathname","query","CommonQueryKey","strategyId","handleCheck","handleEdit","removeLP","rebalance","strategyActionTypes","handleDeleteClick","find","triggerAction","isRecurringType","handleDelete","deletePayload","id","payloadInString","category","deleteTrigger","renderNotification","StrategyNotification","groupedTriggers","getErrorTag","lastFailedMessage","orderedKeys","TriggerGroup","getPercentage","tickRange","enableEdit","onEdit","onDelete","onClickGoTo","executedTimes","executed","Modal","isModalOpen","DeleteStrategyModal","PositionDetails","_ref","analyticsData","isClaimFeeModalOpen","isReinvestFeeModalOpen","network","marketPriceLoading","mutateMarketPrice","allChainPositions","useFetchAllChainsPositions","positionRebalanceHistory","useFetchPositionRebalanceHistory","NFTurl","isNFTLoading","useFetchTokenURL","selected","setSelected","setPosition","isAnalyticsLoading","useFetchAllChainsAnalytics","latestPositionInHistory","positionMap","activePositionId","tokenId","formattedMarketPrice","formatMarketPrice","closed","ActionTypeEnum","strategy","item","useFetchStrategy","unclaimedFees","toggleClaimFeeModal","open","toggleReinvestFeeModal","navToStrategy","actions","addLP","toggleStakePositionModal","handleGoToPositionDetail","pid","TitleBar","isInRange","inRange","FeeTierPercentage","LinearLoader","radius","NFTPositionCard","NFTStr","mb","AutoCompoundWrapper","minPrice","maxPrice","title","ToolCard","nextClick","comingSoon","SLIPSTREAM_NETWORKS","disableBackgroundOnClose","PositionAnalytics","getPositionAnalytics","ClosedPositions","getClosedPositions","PositionDetail","navToPage","resetSolver","page","setPage","setTabs","setTrigger","useAllChainsPositions","allChainPositionResults","currentChainId","validChains","getValidChains","activePositions","Object","entries","reduce","acc","chainPositions","includes","parseInt","getNetworkId","flat","sortActivePositions","useLimitOrders","chainIds","keys","allChainLOTriggers","chainsLOTriggers","TriggerStatus","useFilteredPositions","allChainsPositions","searchKeyword","showAll","stakePositionIds","filteredResults","filter","filterPositions","useNetworkSwitching","connectType","useConnectStore","switchChain","isSwitchChainError","switchChainTxnErrorMsg","useSwitchChain","handleSwitchNetwork","getSwitchNetworkError","StyledEmptyWrapper","StyledEmptyBox","ActivePositions","allChainsClosedPositionResults","useFetchAllChainsClosedPositions","allChainTriggerObj","isReady","useIsChainAndWalletReady","positionPage","setNavToPage","useSelected","Drawer","showDrawer","hideDrawer","hideIntentDrawer","useDrawer","limitOrders","selectedPosition","useOnFirstLoad","document","getElementById","getPid","behavior","block","inline","isCurrentChain","LinearLoaderGroup","PositionList","positions","triggerObj","closedPositionResults","UnstakePositionProvider","token0Address","token1Address","StyledPageContainer","PageContainer","drawerOpen","DrawerOpenCardWidth","StyledButtonLink","BaseButton","LinkIconBox","withConfig","SearchButton","lightPurple","NewPosition","NewPositionText","Headline1","NewPositionButton","StyledCard","LinkButton","LinkButtonLink","AllChainsText","StyledTextButton","StyledChainAMMLabel","ChainAMMLabel","LiquidityManagement","setSearchKeyword","setShowAll","intentDrawerOpen","setCurrentChainId","isAllChains","_drawerOpen","pageTitle","name","SearchInput","trim","event","stopPropagation","AllChainsIcon","sm","overlapRight","initTop","initLeft","marginLeft","liquidity_management"],"sourceRoot":""}